{"version":3,"sources":["webpack:///../WCC.UI/App/components/tags/entityTag/model.js","webpack:///../WCC.UI/App/components/tags/entityTag/styles.scss?e4b8","webpack:///../WCC.UI/App/components/tags/entityTag/template.html?4e48","webpack:///../WCC.UI/App/components/tags/entityTag/viewmodel.js","webpack:///../WCC.UI/App/viewmodels/base_es5.js","webpack:///../WCC.UI/App/viewmodels/disposable_es5.js","webpack:///../WCC.UI/App/webpack/runtime/htmlExposer.js","webpack:///../WCC.UI/App/components/tags/entityTag/styles.scss","webpack:///../WCC.UI/App/components/tags/entityTag/template.html"],"names":["define","jsonModel","this","tag","ko","observable","unwrap","manager","api","content","__esModule","default","module","i","options","exports","locals","expose","Base","Model","ViewModel","config","call","labels","model","allowEdit","pluck","allowRemove","tagId","visibility","visibilityOptions","_","enums","ContentTagVisibilityType","toArray","components","preload","prototype","Object","create","costructor","edit","invokeNotNull","remove","setVisibility","data","toJson","extend","Visibility","updateTag","beforeInit","applyBindingsToNode","element","_ref","_ref2","ServicesContext","ManagersContext","templateNodes","ctx","_register","storage","managers","constructor","Disposables","__initialized","__initTasks","disposables","each","func","init","dispose","field","register","push","bind","_registerObservable","registerObservable","system","SystemHelpers","html","getTemplatesAndResources","forEach","node","document","head","appendChild","___CSS_LOADER_API_IMPORT___"],"mappings":"uIAAAA,uBAQC,KAPE,EAAF,WAMG,OALA,SAAeC,GACXC,KAAKC,IAAMC,EAAGC,WAAWJ,EAAUE,KAAKG,SACxCJ,KAAKK,QAAUH,EAAGC,WAAWJ,EAAUM,SAASD,WAIvD,QARyC,OAQzC,e,6ICRD,IAAIE,EAAM,EAAQ,gFACFC,EAAU,EAAQ,oJAIC,iBAFvBA,EAAUA,EAAQC,WAAaD,EAAQE,QAAUF,KAG/CA,EAAU,CAAC,CAACG,EAAOC,EAAIJ,EAAS,MAG9C,IAAIK,EAAU,CAEd,OAAiB,OACjB,WAAoB,GAEPN,EAAIC,EAASK,GAI1BF,EAAOG,QAAUN,EAAQO,QAAU,I,wEClBnC,UA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,mBAAmBL,EAAOF,EAAMC,GAEjDpE,KAAK+D,YAAYQ,KAAK,WAClBvE,KAAKgE,YAAYU,mBAAmBL,EAAOF,EAAMC,IACnDI,KAAKxE,OAGJqE,GAGJnD,GACV,6B,8HC9CD,WAOC,KAPD,aACI,MAAMyD,EAAS,EAAQ,mCAAkBC,cAEzC,OAAO,SAAUC,GACbF,EAAOG,yBAAyBD,GAC3BE,SAAQ,SAAUC,GAAQC,SAASC,KAAKC,YAAYH,QAEhE,+B,oKCLDnE,EADkC,EAAQ,wDAChCuE,EAA4B,IAE9Bb,KAAK,CAAC7D,EAAOC,EAAI,oCAAqC,KAE9DD,EAAOG,QAAUA,G,sHCHjBH,EAAOG,QAFI","file":"200.fc1e8040364f73be0846.js","sourcesContent":["define('components/tags/entityTag/model', [\r\n], function () {\r\n function Model(jsonModel) {\r\n this.tag = ko.observable(jsonModel.tag).unwrap();\r\n this.manager = ko.observable(jsonModel.manager).unwrap();\r\n }\r\n\r\n return Model;\r\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!./styles.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 || {};","define([\n \"!!../../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./template.html\", \n \"!../../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","define('components/tags/entityTag/viewmodel',\r\n [\r\n 'viewmodels/base_es5',\r\n 'components/tags/entityTag/model',\r\n './template.html',\r\n './styles.scss'\r\n ],\r\n\r\n function (Base, Model) {\r\n components.preload('wcc-list', 'tag');\r\n\r\n function ViewModel(config) {\r\n Base.call(this, config);\r\n\r\n this.labels = labels;\r\n\r\n this.manager = this.model.manager;\r\n this.allowEdit = this.manager.pluck('allowEdit', false);\r\n this.allowRemove = this.manager.pluck('allowRemove', false);\r\n\r\n this.tag = this.model.tag;\r\n this.tagId = this.tag.pluck('contentTagId');\r\n this.visibility = this.tag.pluck('visibility');\r\n\r\n this.visibilityOptions = _(enums.ContentTagVisibilityType).toArray();\r\n }\r\n\r\n ViewModel.Model = Model;\r\n\r\n ViewModel.prototype = Object.create(Base.prototype);\r\n ViewModel.prototype.costructor = ViewModel;\r\n\r\n ViewModel.prototype.edit = function () {\r\n this.manager.invokeNotNull('editTag', this.tag());\r\n };\r\n\r\n ViewModel.prototype.remove = function () {\r\n this.manager.invokeNotNull('removeTag', this.tag());\r\n };\r\n\r\n ViewModel.prototype.setVisibility = function (visibility) {\r\n this.manager.invokeNotNull(function (manager) {\r\n var data = _(this.tag().toJson()).extend({\r\n Visibility: visibility\r\n });\r\n\r\n manager.updateTag(data);\r\n }, this);\r\n };\r\n\r\n ViewModel.prototype.beforeInit = function () {\r\n Base.prototype.beforeInit.call(this);\r\n\r\n ko.applyBindingsToNode(this.element, {\r\n 'css': {\r\n 'entity-tag': true\r\n }\r\n });\r\n };\r\n\r\n return ViewModel;\r\n });","define('viewmodels/base_es5', [\r\n 'viewmodels/disposable_es5',\r\n 'services/context',\r\n 'managers/context'\r\n], function (Base, { ServicesContext }, { ManagersContext }) {\r\n function ViewModel(config) {\r\n Base.call(this);\r\n\r\n this.model = config.model;\r\n this.data = config.data;\r\n this.element = config.element;\r\n this.templateNodes = config.templateNodes;\r\n this.ctx = this._register(new ServicesContext());\r\n this.components = this.ctx.components;\r\n this.storage = this.ctx.storage;\r\n this.managers = this._register(new ManagersContext()); \r\n }\r\n\r\n ViewModel.prototype = Object.create(Base.prototype);\r\n ViewModel.prototype.constructor = ViewModel;\r\n\r\n return ViewModel;\r\n})","define('viewmodels/disposable_es5', [\r\n 'managers/disposables'\r\n], function (Disposables) {\r\n function ViewModel() {\r\n this.__initialized = false;\r\n this.__initTasks = [];\r\n\r\n this.disposables = new Disposables();\r\n }\r\n\r\n ViewModel.prototype.beforeInit = function () {\r\n _(this.__initTasks).each(function (func) { func() });\r\n this.__initialized = true;\r\n };\r\n\r\n ViewModel.prototype.init = function () {};\r\n\r\n ViewModel.prototype.dispose = function () {\r\n this.disposables.dispose();\r\n };\r\n\r\n ViewModel.prototype._register = function (field) {\r\n if (this.__initialized) {\r\n this.disposables.register(field);\r\n } else {\r\n this.__initTasks.push(function () {\r\n this.disposables.register(field);\r\n }.bind(this));\r\n }\r\n\r\n return field;\r\n };\r\n\r\n ViewModel.prototype._registerObservable = function (field, init, dispose) {\r\n if (this.__initialized) {\r\n this.disposables.registerObservable(field, init, dispose);\r\n } else {\r\n this.__initTasks.push(function () {\r\n this.disposables.registerObservable(field, init, dispose);\r\n }.bind(this));\r\n }\r\n\r\n return field;\r\n };\r\n\r\n return ViewModel;\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, \".entity-tag{display:inline-block}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;"],"sourceRoot":""}