{"version":3,"sources":["webpack:///../WCC.UI/App/components/editors/content/box/viewer.html?1ea0","webpack:///../WCC.UI/App/components/editors/content/box/viewer.scss?58ec","webpack:///../WCC.UI/App/components/editors/content/box/viewer.ts","webpack:///../WCC.UI/App/decorators/componentModel.ts","webpack:///../WCC.UI/App/libraries/contentbox.js","webpack:///../WCC.UI/App/webpack/runtime/htmlExposer.js","webpack:///../WCC.UI/App/components/editors/content/box/viewer.scss","webpack:///../WCC.UI/App/components/editors/content/box/viewer.html"],"names":["content","expose","__esModule","default","api","module","i","options","exports","locals","ContentBoxViewer","constructor","jsonModel","this","html","ko","flattenComputed","footer","height","ContentBoxViewerVM","model","info","wrapperNode","observable","onRender","_updateScrollr","templateNodes","htmlNodes","pureComputed","getHtmlNodes","footerTemplateId","applyBindingsToNode","element","length","forEach","node","appendChild","_WCC","_WCC$Settings","_WCC$Settings$Current","_WCC$Settings$Current2","container","document","createElement","innerHTML","WCC","Settings","CurrentUser","ParticipantTags","tagsParser","processTags","childNodes","s","skrollr","get","refresh","__decorate","injectable","componentModel","__param","inject","wccModules","componentConfig","componentInfo","componentModelMetadataKey","Symbol","ctor","Reflect","defineMetadata","isIE","require","system","SystemHelpers","getTemplatesAndResources","head","___CSS_LOADER_API_IMPORT___","push"],"mappings":"8IAAA,UAAO,CACC,8GACA,wDAIC,KAJ+C,EAAF,SAAYA,EAASC,GAG/D,OADAA,EADAD,EAAUA,EAAQE,WAAaF,EAAQG,QAAUH,GAE1CA,GACV,4B,2ECNT,IAAII,EAAM,EAAQ,gFACFJ,EAAU,EAAQ,yJAIC,iBAFvBA,EAAUA,EAAQE,WAAaF,EAAQG,QAAUH,KAG/CA,EAAU,CAAC,CAACK,EAAOC,EAAIN,EAAS,MAG9C,IAAIO,EAAU,CAEd,OAAiB,OACjB,WAAoB,GAEPH,EAAIJ,EAASO,GAI1BF,EAAOG,QAAUR,EAAQS,QAAU,I,48BCH7B,MAAOC,EAKTC,YAAYC,GACRC,KAAKC,KAAOC,EAAG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QC,eAAeJ,EAA2B5C,EAAO8C,GAClDA,K,qECLf,yMAIIrB,EAAIwB,MACJC,EAAQ,uD,2HCLZ,WAOC,KAPD,aACI,MAAMC,EAAS,EAAQ,mCAAkBC,cAEzC,OAAO,SAAU1D,GACbyD,EAAOE,yBAAyB3D,GAC3BoB,SAAQ,SAAUC,GAAQO,SAASgC,KAAKtC,YAAYD,QAEhE,+B,yKCLD3B,EADkC,EAAQ,wDAChCmE,EAA4B,IAE9BC,KAAK,CAACvE,EAAOC,EAAI,sLAAuL,KAEhND,EAAOG,QAAUA,G,yHCHjBH,EAAOG,QAFI","file":"214.2bd1aa5c075ef4d7f5c6.js","sourcesContent":["define([\n \"!!../../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./viewer.html\", \n \"!../../../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","var api = require(\"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./viewer.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import componentModel from 'decorators/componentModel';\r\nimport { wccModules } from 'enums/wccModules';\r\nimport { inject, injectable } from 'inversify';\r\nimport { Subscribable, SubscribableOrNullableValue } from 'knockout';\r\nimport 'libraries/contentbox';\r\nimport tagsParser from '../../../../managers/tagsParser';\r\nimport './viewer.html';\r\nimport './viewer.scss';\r\n\r\ninterface ContentBoxViewerConfig {\r\n html: SubscribableOrNullableValue\r\n footer: SubscribableOrNullableValue\r\n height: SubscribableOrNullableValue\r\n}\r\n\r\nexport class ContentBoxViewer {\r\n html: Subscribable\r\n footer: Subscribable\r\n height: Subscribable\r\n\r\n constructor(jsonModel: ContentBoxViewerConfig) {\r\n this.html = ko.flattenComputed(jsonModel.html, '');\r\n this.footer = ko.flattenComputed(jsonModel.footer);\r\n this.height = ko.flattenComputed(jsonModel.height, '100vh');\r\n }\r\n}\r\n\r\n@injectable()\r\n@componentModel(ContentBoxViewer)\r\nexport default class ContentBoxViewerVM {\r\n wrapperNode = ko.observable();\r\n\r\n templateNodes: Array\r\n htmlNodes: Subscribable>\r\n footerTemplateId: Subscribable\r\n height: Subscribable\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) private model: ContentBoxViewer,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo\r\n ) {\r\n this.templateNodes = info.templateNodes;\r\n this.htmlNodes = ko.pureComputed(() => this.getHtmlNodes());\r\n this.footerTemplateId = model.footer;\r\n this.height = model.height;\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'css': {\r\n 'content-box-viewer': true,\r\n 'content-box-viewer--no-pace': true,\r\n 'wcc-content-box': true\r\n },\r\n\r\n 'widgetsContainer': true\r\n });\r\n\r\n if (info.templateNodes.length > 0)\r\n info.templateNodes.forEach(node => info.element.appendChild(node));\r\n }\r\n\r\n onRender = () => {\r\n this._updateScrollr();\r\n }\r\n\r\n private getHtmlNodes(): Array {\r\n const container = document.createElement('div');\r\n container.innerHTML = this.model.html();\r\n\r\n if (WCC?.Settings?.CurrentUser?.ParticipantTags?.length || 0 != 0) {\r\n container.innerHTML = tagsParser.processTags(container.innerHTML, WCC.Settings.CurrentUser.ParticipantTags);\r\n }\r\n\r\n return [...container.childNodes];\r\n }\r\n\r\n private _updateScrollr() {\r\n var s = skrollr.get();\r\n\r\n if (s != null)\r\n s.refresh();\r\n }\r\n}","export const componentModelMetadataKey = Symbol('component:template');\r\n\r\nexport default function componentModel(model: any) {\r\n return (ctor: any) => {\r\n Reflect.defineMetadata(componentModelMetadataKey, model, ctor);\r\n return ctor;\r\n }\r\n}","import 'Scripts/ContentBox-4.1.1/assets/minimalist-blocks/content.scss';\r\nimport 'Scripts/ContentBox-4.1.1/box/box.js';\r\nimport 'Scripts/ContentBox-4.1.1/box/box.scss';\r\n\r\nif (WCC.isIE)\r\n require('Scripts/ContentBox-4.1.1/box/box-ie.scss');","define(function () {\r\n const system = require('helpers/system').SystemHelpers;\r\n\r\n return function (html) {\r\n system.getTemplatesAndResources(html)\r\n .forEach(function (node) { document.head.appendChild(node) });\r\n }\r\n});","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".content-box-viewer{position:relative;display:block;overflow:hidden}.content-box-viewer .is-wrapper{min-height:600px}.content-box-viewer--no-pace .is-wrapper{opacity:1 !important}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;"],"sourceRoot":""}