{"version":3,"sources":["webpack:///../WCC.UI/App/components/attachments/vimeo/vimeo.html?edbe","webpack:///../WCC.UI/App/components/attachments/vimeo/vimeo.scss?f33b","webpack:///../WCC.UI/App/components/attachments/vimeo/vimeo.ts","webpack:///../WCC.UI/App/webpack/runtime/htmlExposer.js","webpack:///../WCC.UI/App/components/attachments/vimeo/vimeo.scss","webpack:///../WCC.UI/App/components/attachments/vimeo/vimeo.html"],"names":["content","expose","__esModule","default","api","module","i","options","exports","locals","WCCVimeoVideoVM","constructor","config","info","player","ko","observable","video","flattenComputed","this","code","pluck","v","link","ratio","isReady","pureComputed","_this$player$isReady","_this$player","applyBindingsToNode","element","__decorate","injectable","__param","inject","wccModules","componentConfig","componentInfo","system","SystemHelpers","html","getTemplatesAndResources","forEach","node","document","head","appendChild","___CSS_LOADER_API_IMPORT___","push"],"mappings":"2IAAA,UAAO,CACC,2GACA,wDAIC,KAJ4C,EAAF,SAAYA,EAASC,GAG5D,OADAA,EADAD,EAAUA,EAAQE,WAAaF,EAAQG,QAAUH,GAE1CA,GACV,4B,wECNT,IAAII,EAAM,EAAQ,gFACFJ,EAAU,EAAQ,sJAIC,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,qwBCJnC,IAAqBC,EAArB,MAMIC,YACwCC,EACFC,GAPtC,KAAAC,OAASC,EAAGC,aASR,MAAMC,EAAQF,EAAGG,gBAAgBN,EAAOK,OACxCE,KAAKC,KAAOH,EAAMI,MAAMC,GAAKA,EAAEC,MAE/BJ,KAAKK,MAAQT,EAAGG,gBAAgBN,EAAOY,OAEvC,MAAMC,EAAUV,EAAGW,aAAa,SAAAC,EAAAC,EAAA,OAA8B,QAA9BD,EAAmB,OAAnBC,EAAMT,KAAKL,eAAQ,EAAbc,EAAeH,iBAAS,IAAAE,OAE9DZ,EAAGc,oBAAoBhB,EAAKiB,QAAS,CACjC,QAAWL,EAEX,IAAO,CACH,mBAAmB,OArBdf,EAAeqB,EAAA,CADnCC,cAQQC,EAAA,EAAAC,YAAOC,IAAWC,kBAClBH,EAAA,EAAAC,YAAOC,IAAWE,iBARN3B,gB,sICdrB,WAOC,KAPD,aACI,MAAM4B,EAAS,EAAQ,mCAAkBC,cAEzC,OAAO,SAAUC,GACbF,EAAOG,yBAAyBD,GAC3BE,SAAQ,SAAUC,GAAQC,SAASC,KAAKC,YAAYH,QAEhE,+B,sKCLDnC,EADkC,EAAQ,wDAChCuC,EAA4B,IAE9BC,KAAK,CAAC3C,EAAOC,EAAI,iIAAkI,KAE3JD,EAAOG,QAAUA,G,sHCHjBH,EAAOG,QAFI","file":"270.e425ed76801fa0860b26.js","sourcesContent":["define([\n \"!!../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./vimeo.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!./vimeo.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 { wccModules } from 'enums/wccModules';\r\nimport { inject, injectable } from 'inversify';\r\nimport { Subscribable, SubscribableOrNullableValue } from 'knockout';\r\nimport WCCVimeoVideo from 'models/attachments/vimeo';\r\nimport { IWCCPlayerVM } from '../../players/player.interfaces';\r\nimport './vimeo.html';\r\nimport './vimeo.scss';\r\n\r\nexport interface WCCVimeoVideoVMConfig {\r\n video: SubscribableOrNullableValue\r\n ratio: SubscribableOrNullableValue\r\n}\r\n\r\n@injectable()\r\nexport default class WCCVimeoVideoVM {\r\n player = ko.observable();\r\n\r\n code: Subscribable\r\n ratio: Subscribable\r\n\r\n constructor(\r\n @inject(wccModules.componentConfig) config: WCCVimeoVideoVMConfig,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo\r\n ) {\r\n const video = ko.flattenComputed(config.video);\r\n this.code = video.pluck(v => v.link);\r\n\r\n this.ratio = ko.flattenComputed(config.ratio);\r\n\r\n const isReady = ko.pureComputed(() => this.player()?.isReady() ?? false);\r\n\r\n ko.applyBindingsToNode(info.element, {\r\n 'visible': isReady,\r\n\r\n 'css': {\r\n 'wcc-vimeo-video': true\r\n }\r\n });\r\n }\r\n}","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, \".wcc-vimeo-video{display:block;border-radius:4px;overflow:hidden;display:block;background-color:#000;border:1px solid #c6c6c6}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;"],"sourceRoot":""}