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AA,IAA8E,MAA9EW,KAPRC,EAAAA,EAAAA,IAAA,YAQQT,EAAAA,EAAAA,IAIM,MAJNU,EAIM,CAHUX,EAAAhB,UAAYgB,EAAAV,gBAAa,WAAvCQ,EAAAA,EAAAA,IAES,UAXnBlB,IAAA,EASmDG,MAAM,iCAAiCE,KAAK,SAAU2B,QAAKC,EAAA,KAAAA,EAAA,IAT9GC,EAAAA,EAAAA,KAAA,kBASwHd,EAAAH,gBAAAG,EAAAH,kBAAAkB,UAAc,kBAAE,UACvHC,EAAAA,EAAAA,IAAGhB,EAAAX,SAAW,OAAS,QAAZ,KAV5BqB,EAAAA,EAAAA,IAAA,gB","sources":["webpack://secprint-frontend/./node_modules/vue-loader/dist/exportHelper.js","webpack://secprint-frontend/./src/js/vuejs/components/TruncatedBlock.vue","webpack://secprint-frontend/./src/js/vuejs/components/TruncatedBlock.vue?241d"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// runtime helper for setting properties on components\n// in a tree-shakable way\nexports.default = (sfc, props) => {\n    const target = sfc.__vccOpts || sfc;\n    for (const [key, val] of props) {\n        target[key] = val;\n    }\n    return target;\n};\n","<template>\r\n    <div class=\"truncated-block\" :class=\"{ 'read-more': readMore }\">\r\n        <div class=\"truncated-block__content-wrapper\" :style=\"{ maxHeight: readMore ? contentHeight + 'px' : minHeight + 'px' }\">\r\n          <div ref=\"contentBox\">\r\n            <slot name=\"content\"></slot>\r\n          </div>\r\n        </div>\r\n        <div v-if=\"minHeight < contentHeight\" class=\"truncated-block__gradient\"></div>\r\n        <div class=\"truncated-block__controls\">\r\n          <button v-if=\"minHeight < contentHeight\" class=\"truncated-block__toggle-button\" type=\"button\" @click.prevent=\"toggleReadMore\">\r\n            Show {{ readMore ? 'less' : 'more' }}\r\n          </button>\r\n        </div>\r\n    </div>\r\n</template>\r\n  \r\n<script>\r\nimport { ref, onMounted, nextTick } from 'vue';\r\n\r\nexport default {\r\n  props: {\r\n    minHeight: {\r\n      type: Number,\r\n      default: 230\r\n    }\r\n  },\r\n  setup(props) {\r\n    const readMore = ref(false);\r\n    const contentHeight = ref(0);\r\n    const contentBox = ref(null);\r\n\r\n    const calculateContentHeight = () => {\r\n      if (contentBox.value) {\r\n        contentHeight.value = contentBox.value.scrollHeight;\r\n      }\r\n    };\r\n\r\n    const toggleReadMore = () => {\r\n      readMore.value = !readMore.value;\r\n      if (readMore.value) {\r\n        nextTick(() => {\r\n          calculateContentHeight();\r\n        });\r\n      }\r\n    };\r\n\r\n    onMounted(() => {\r\n      nextTick(() => {\r\n        calculateContentHeight();\r\n      });\r\n    });\r\n\r\n    return {\r\n      readMore,\r\n      contentHeight,\r\n      minHeight: ref(props.minHeight),\r\n      toggleReadMore,\r\n      contentBox\r\n    };\r\n  }\r\n};\r\n</script>\r\n","import { render } from \"./TruncatedBlock.vue?vue&type=template&id=7fe17369\"\nimport script from \"./TruncatedBlock.vue?vue&type=script&lang=js\"\nexport * from \"./TruncatedBlock.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"names":["exports","sfc","props","target","__vccOpts","key","val","ref","class","minHeight","type","Number","default","setup","readMore","contentHeight","contentBox","calculateContentHeight","value","scrollHeight","onMounted","nextTick","toggleReadMore","_createElementBlock","_normalizeClass","$setup","_createElementVNode","style","_normalizeStyle","maxHeight","_hoisted_1","_renderSlot","_ctx","$slots","_hoisted_2","_createCommentVNode","_hoisted_3","onClick","_cache","_withModifiers","arguments","_toDisplayString"],"sourceRoot":""}