{"version":3,"sources":["webpack:///./build-targets/theme/packages/core-asset/templates/assetSelectView.html","webpack:///./packages/core-asset/models/assetSelect.js","webpack:///./packages/core-asset/views/assetSelectView.js","webpack:///./build-targets/theme/packages/core-asset/views/assetSelectView.js","webpack:///./build-targets/theme/packages/core-app-system-branding/templates/index.html","webpack:///./build-targets/theme/packages/core-app-system-branding/templates/colorPalettes.html","webpack:///./build-targets/theme/packages/core-app-system-branding/templates/colorPalette.html","webpack:///./build-targets/theme/packages/core-app-system-branding/templates/color.html","webpack:///./build-targets/theme/packages/core-app-system-branding/templates/logo.html","webpack:///./build-targets/theme/packages/core-app-system-branding/templates/images.html","webpack:///./packages/core-app-system-branding/actions.js","webpack:///./packages/core-app-system-branding/menus.js","webpack:///./packages/core-app-system-branding/models/colorPalette.js","webpack:///./packages/core-app-system-branding/models/colorPalette_dark.js","webpack:///./packages/core-app-system-branding/collections/colorPalettes.js","webpack:///./packages/core-app-system-branding/models/colorPalette_light.js","webpack:///./packages/core-app-system-branding/models/customCSSProperties.js","webpack:///./packages/core-app-system-branding/views/color.js","webpack:///./build-targets/theme/packages/core-app-system-branding/views/color.js","webpack:///./packages/core-app-system-branding/views/logo.js","webpack:///./build-targets/theme/packages/core-app-system-branding/views/logo.js","webpack:///./packages/core-app-system-branding/views/colorPalette.js","webpack:///./build-targets/theme/packages/core-app-system-branding/views/colorPalette.js","webpack:///./packages/core-app-system-branding/views/colorPalettes.js","webpack:///./build-targets/theme/packages/core-app-system-branding/views/colorPalettes.js","webpack:///./packages/core-app-system-branding/views/images.js","webpack:///./packages/core-app-system-branding/views/index.js","webpack:///./build-targets/theme/packages/core-app-system-branding/views/index.js","webpack:///./packages/core-app-system-branding/routes.js","webpack:///./packages/core-app-system-branding/controller.js","webpack:///./packages/core-app-system-branding/index.js"],"names":["module","exports","obj","__t","__p","__j","Array","prototype","join","print","call","arguments","_","escape","i18n","t","hasAsset","AssetSelect","Base","rpc","url","Netx","URL","api","defaults","super","saveToProperty","propertyValue","clientAttrs","concat","constructor","attrs","opts","this","on","assetSelectModel","newId","fetch","get","id","dispatcher","trigger","label","value","assetId","Object","keys","length","listenTo","prop","parseInt","set","reset","__name__","AssetSelectView","className","events","template","Template","selectName","selectTitle","helpText","bindModelEvents","model","debouncedRender","preRender","assign","templateVars","postRender","$assetInput","$","$el","toggleClass","changeAsset","e","selectValue","target","assetModel","previewReset","removeClass","val","Select2","Collapsable","MaterialCard","values","icons","event","ColorPalette","primary","secondary","ColorPalette_Dark","getLogo","logoDark","now","setLogo","file","app","brand","name","Models","dark","DarkColorPaletteModel","light","logoLight","getData","palettes","data","map","palette","match","attributes","filter","key","includes","paletteData","forEach","replace","ColorPalettes","models","Model","getValues","normalizeValues","reduce","accum","curr","getNormalizedHexColor","parse","config","CSS_CUSTOM_PROPERTIES","all","undefined","CustomCSSProperties","methods","read","portalId","update","self","parsers","saveChanges","debounce","portalName","setStyleProperty","changed","colorPalettes","clear","save","wait","each","toString","Date","getTime","setBackground","unsetBackground","isNew","Color","colorKey","colorLabel","onColorLabel","currentValues","color","checkCustom","checked","currentTarget","colorChanged","onColorFocus","dataset","nxValue","onColorBlur","customInput","inputs","el","querySelector","colorDisplay","onLabel","onColor","style","background","updatedFromColorpicker","Plugins","Register","colorpicker","elementKey","multiple","options","align","format","Destroy","$colorPickers","Initialize","updateColorpicker","input","instance","GetInstance","setValue","Update","showColorPicker","closest","show","MaterialTextFields","Logo","headerTitle","uploader","filters","max_file_size","mime_types","title","extensions","plugin","Find","UploadModel","multi_selection","mapEvents","pluploadEvents","pluploadOptions","files","fileAdded","showUploadProgress","error","fileUploaded","msgMax","size","msgRecomended","width","height","msgEmail","logo","message","$error","$fileName","$uploadDetails","$progressBar","initializeUploader","remove","destroyUploader","html","start","then","m","render","err","selectFiles","css","percent","initializeIcons","faPlus","customPropertyPrefix","CSS_CUSTOM_PROPERTY_PREFIX","logoView","addSubView","LogoView","primaryColor","ColorView","secondaryColor","view","updateStyles","getThemeMode","$logoSelect","replaceWith","colorsEl","appendTo","setProperty","childView","viewClass","ChildView","eventStr","hideOnSubmit","formValues","collection","ChildViews","Form","changeColor","Images","selectedAsset","AssetSelectModel","assetSelectView","displayWatermark","getUserLevel","watermarkView","asset","$assetSelect","$watermarkSelect","Index","defaultTab","tabs","ColorPalettesView","viewOptions","ImagesView","once","NS","system","router","customCSSProperties","appViews","add","IndexView","showActions","Promise","resetBranding","setThemeMode","initialize","resolve","reject","routes","namespace","Actions","actions","addMenus","menus","controller"],"mappings":";wFAAAA,OAAOC,QAAU,SAASC,KAC1B,IAAIC,IAAIC,IAAI,GAAGC,IAAIC,MAAMC,UAAUC,KAAKC,MAAM,WAAWL,KAAKC,IAAIK,KAAKC,UAAU,GAAI,EACrF,KAAKT,KAAK,CAAC,EACXE,KAAK,8UACmB,OAAtBD,IAAI,aAAuB,GAAGA,KAChC,qIACuB,OAArBA,IAAI,YAAsB,GAAGS,EAAEC,OAAOV,MACxC,uGACuB,OAArBA,IAAI,YAAsB,GAAGS,EAAEC,OAAOV,MACxC,4IACgC,OAA9BA,IAAMW,KAAKC,EAAE,cAAsB,GAAGH,EAAEC,OAAOV,MACjD,8DACKa,WACLZ,KAAK,iCACe,OAAlBD,IAAI,SAAmB,GAAGS,EAAEC,OAAOV,MACrC,eACiB,OAAfA,IAAI,MAAgB,GAAGA,KACzB,2BAEAC,KAAK,yFACkB,OAArBD,IAAI,YAAsB,GAAGS,EAAEC,OAAOV,MACxC,sRACmC,OAAjCA,IAAMa,SAAW,OAAS,IAAY,GAAGJ,EAAEC,OAAOV,MACpD,cACqB,OAAnBA,IAAI,UAAoB,GAAGA,KAC7B,+BACuB,OAArBA,IAAI,YAAsB,GAAGS,EAAEC,OAAOV,MACxC,kEACoC,OAAlCA,IAAOa,SAAoB,GAAT,QAAqB,GAAGJ,EAAEC,OAAOV,MACrD,wBACuB,OAArBA,IAAI,YAAsB,GAAGS,EAAEC,OAAOV,MACxC,8mBAEA,OAAOC,GACP,C,inCC7Be,MAAMa,UAAoBC,IA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WC,QAAQ,6BAA8BuP,GACjDxP,WAAWC,QAAQ,kCAAmCuP,EAAG,IAG3C,QACdW,WAAW3Q,GACH,IAAIwQ,SAAQ,CAACI,EAASC,KAC5BrQ,WAAWuP,KAAK,mCAAmC,KAClDa,EAAQE,GAAO,IAEhBtQ,WAAWC,QAAQ,2BAA2B,KCnFlC,IACdsQ,UAAW,sBACXJ,WAAU,KAETtR,KAAK2R,QAAQ7H,SAAS8H,GAEtB5R,KAAK6R,SAASC,GAEPC,GAAWT,c","file":"19.bundle.min.js?2.22.11.78cb48d1.1676942939545","sourcesContent":["module.exports = function(obj){\nvar __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\nwith(obj||{}){\n__p+='\\n\\n
\\n\t
\\n\t\t
\\n\t\t\t
\\n\t\t\t\t'+\n((__t=( selectTitle ))==null?'':__t)+\n'\\n\t\t\t
\\n\t\t\t
\\n\t\t\t\t
\\n\t\t\t\t\t\\n\t\t\t\t\t\t';\n if (hasAsset) { \n__p+='\\n\t\t\t\t\t\t\\n\t\t\t\t\t\t';\n } \n__p+='\\n\t\t\t\t\t\\n\t\t\t\t\t\\n\t\t\t\t\t
\\n\t\t\t\t
\\n\t\t\t
\\n\t\t
\\n\t
\\n\t\\n\t
\\n\t\t
\\n\t\t\t'+\n((__t=( helpText ))==null?'':__t)+\n'\\n\t\t
\\n\t\t
\\n\t\t\t\\n\t\t
\\n\t
\\n
\\n\\n
\\n\t
\\n\t\t\\n\t\t\\n\t
\\n
';\n}\nreturn __p;\n};\n","/**\n * @class\n */\nimport Base from '@netx/core-asset/models/asset';\n\nexport default class AssetSelect extends Base {\n\t/**\n\t * @type {Netx.Rpc}\n\t * @private\n\t */\n\tget rpc() {\n\t\treturn true;\n\t}\n\t/**\n\t * @type {Netx.URL}\n\t * @private\n\t */\n\tget url() {\n\t\treturn Netx.URL.api;\n\t}\n\n\t/**\n\t * @property {object} defaults - Model defaults\n\t * @property {string} defaults.saveToProperty - Save to property\n\t * @property {string} defaults.propertyValue - Select assetId currently saved\n\t */\n\tget defaults() {\n\t\treturn {\n\t\t\t...super.defaults,\n\t\t\tsaveToProperty: '',\n\t\t\tpropertyValue: 0,\n\t\t};\n\t}\n\n\t/** @type {array} */\n\tget clientAttrs() {\n\t\treturn super.clientAttrs.concat(['saveToProperty', 'propertyValue']);\n\t}\n\n\t/** @override */\n\tconstructor(attrs, opts) {\n\t\tsuper(attrs, opts);\n\n\t\t// fetch when asset id changes\n\t\tthis.on('change:assetId', (assetSelectModel, newId) => {\n\t\t\t// if it's being reset, set to 0\n\t\t\tif (newId) {\n\t\t\t\tthis.fetch();\n\t\t\t} else {\n\t\t\t\tnewId = 0;\n\t\t\t}\n\n\t\t\t// TODO: this will only work if system is intiialized - should probably try and decouple at some point/re-work\n\t\t\t// only save property if it's different\n\t\t\tif (this.get('saveToProperty') && this.id !== this.get('propertyValue')) {\n\t\t\t\tdispatcher.trigger('system:property:save', {\n\t\t\t\t\tlabel: this.get('saveToProperty'),\n\t\t\t\t\tvalue: newId,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t// fetch now only if assetId was set on instantiation\n\t\tif (attrs.assetId > 0 && Object.keys(attrs).length === 1) {\n\t\t\tthis.fetch();\n\t\t}\n\n\t\t// TODO: this will only work if system is intiialized - should probably try and decouple at some point/re-work\n\t\t// Check for system property string\n\t\tif (this.get('saveToProperty').length) {\n\t\t\t// Listen for system property fetch success\n\t\t\tthis.listenTo(dispatcher, 'system:property:get:success', prop => {\n\t\t\t\t// Make sure we have a valid asset id\n\t\t\t\tvar assetId = prop.get('value') && parseInt(prop.get('value'));\n\t\t\t\tif (assetId && prop.get('label') === this.get('saveToProperty')) {\n\t\t\t\t\t// Fetch self with provided asset id and then listen for changes\n\t\t\t\t\tthis.set({\n\t\t\t\t\t\tassetId: assetId,\n\t\t\t\t\t\tpropertyValue: assetId,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t\t// Get the property representing our asset id\n\t\t\tdispatcher.trigger('system:property:get', {\n\t\t\t\tlabel: this.get('saveToProperty'),\n\t\t\t});\n\t\t}\n\t}\n\n\t/** @method */\n\treset() {\n\t\treturn this.set({assetId: 0});\n\t}\n\n\t/** @type {string} */\n\tstatic get __name__() {\n\t\treturn 'AssetSelect';\n\t}\n}\n","/**\n * @class AssetSelectView\n */\nimport Base from '@netx/core/lib/netx-view';\nimport Template from '../templates/assetSelectView.html';\n\nimport Select2 from '@netx/core/functionality/select2';\n\nexport default class AssetSelectView extends Base {\n\t/** @override */\n\tconstructor(opts = {}) {\n\t\topts.className = `asset-select-view ${opts.className || ''}`;\n\t\topts.events = {\n\t\t\t'select2:unselect': 'previewReset',\n\t\t\t'change [data-nx-control=\"asset-select\"]': 'changeAsset',\n\t\t\t'click [data-nx-control=\"asset-reset\"]': 'previewReset',\n\t\t\t...opts.events,\n\t\t};\n\t\topts.template = opts.template || Template;\n\t\tsuper(opts);\n\t\tthis.selectName = opts.selectName || 'assetSelect';\n\t\tthis.selectTitle = opts.selectTitle || '';\n\t\tthis.helpText = opts.helpText || '';\n\t}\n\n\t/** @override */\n\tbindModelEvents() {\n\t\tsuper.bindModelEvents();\n\t\treturn this.listenTo(this.model, 'change', this.debouncedRender);\n\t}\n\n\t/** @override */\n\tpreRender() {\n\t\tsuper.preRender();\n\n\t\t// Additional template vars\n\t\tObject.assign(this.templateVars, {\n\t\t\thasAsset: this.model.get('assetId') ? true : false,\n\t\t\tselectName: this.selectName,\n\t\t\tselectTitle: this.selectTitle,\n\t\t\thelpText: this.helpText,\n\t\t});\n\t}\n\n\t/** @override */\n\tpostRender() {\n\t\tsuper.postRender();\n\n\t\t// Cache\n\t\tthis.$assetInput = this.$('[data-nx-control=\"asset-select\"]');\n\n\t\tthis.$el.toggleClass('has-selection', this.model.id > 0);\n\t}\n\t/**\n\t * @method\n\t * @param {event} e `change` event\n\t */\n\tchangeAsset(e) {\n\t\tconst selectValue = e.target.value;\n\t\tif (!selectValue) return;\n\n\t\t// controller will set, model will fetch\n\t\tdispatcher.trigger('asset:selected', {\n\t\t\tassetModel: this.model,\n\t\t\tnewId: parseInt(selectValue),\n\t\t\tfetch: false,\n\t\t});\n\t}\n\n\t/**\n\t * Remove the current preview & reset its form field.\n\t * @method\n\t * @param {event} e Click event\n\t * @fires module:system#system:reset:model\n\t */\n\tpreviewReset(e) {\n\t\tthis.model.reset();\n\t\tthis.$el.removeClass('has-selection');\n\n\t\t// Update input and trigger change, listeners will do the rest\n\t\tthis.$assetInput && this.$assetInput.val('0').trigger('change');\n\t}\n\n\t/** @type {string} */\n\tstatic get __name__() {\n\t\treturn 'AssetSelectView';\n\t}\n}\n\nSelect2(AssetSelectView);\n","/**\n * @class\n * @override\n */\nimport Base from '@netx/core-asset/views/assetSelectView';\nimport '../css/lib/assetSelect.less';\n\nimport Collapsable from '@netx/core/functionality/collapsable';\nimport MaterialCard from '@netx/core/functionality/materialCard';\n\nclass AssetSelectView extends Base {\n\t/** @override */\n\tconstructor(opts = {}) {\n\t\topts.className = `mdc-card mdc-card--outlined nx-collapsable ${\n\t\t\topts.className || ''\n\t\t}`;\n\t\tsuper(opts);\n\t}\n}\n\nCollapsable(AssetSelectView);\nMaterialCard(AssetSelectView);\n\nexport default AssetSelectView;\n","module.exports = function(obj){\nvar __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\nwith(obj||{}){\n__p+='\\n\\n
\\n\\n
\\n';\n}\nreturn __p;\n};\n","module.exports = function(obj){\nvar __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\nwith(obj||{}){\n__p+='\\n\\n
\\n\t
\\n\t\t
\\n\t\t\ti18n.brand\\n\t\t\t/\\n\t\t\t'+\n((__t=( headerTitle ))==null?'':__t)+\n'\\n\t\t
\\n\t\\n\t\t
\\n\t\t\t
\\n\t\t\t\t
\\n\t\t\t\t\t\\n\t\t\t\t
\\n\t\t\t\t
\\n\t\t\t\t\t\\n\t\t\t\t
\\n\t\t\t
\\n\t\t
\\n\t
\\n\\n\t
\\n';\n}\nreturn __p;\n};\n","module.exports = function(obj){\nvar __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\nwith(obj||{}){\n__p+='\\n\\n
\\n\t
'+\n((__t=( headerTitle ))==null?'':_.escape(__t))+\n'
\\n
\\n\\n
\\n\t
\\n\t
\\n
\\n';\n}\nreturn __p;\n};\n","module.exports = function(obj){\nvar __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\nwith(obj||{}){\n__p+='\\n\\n
\\n\t
\\n\t\t
\\n\t\t\t\\n\t\t\t\\n\t\t\t
\\n\t\t\t
\\n\t\t
\\n\t
\\n
\\n\\n
\\n\t
\\n\t\t
\\n\t\t\t
\\n\t\t\t\t\\n\t\t\t\t\\n\t\t\t\t
\\n\t\t\t\t
\\n\t\t\t
\\n\t\t
\\n\t
\\n
';\n}\nreturn __p;\n};\n","module.exports = function(obj){\nvar __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\nwith(obj||{}){\n__p+='\\n\\n
\\n\t
'+\n((__t=( headerTitle ))==null?'':__t)+\n'
\\n\t
\\n\t\t\\n\t
\\n
\\n\\n
\\n\t
\\n\\n\t
\\n\t\t'+\n((__t=( message ))==null?'':__t)+\n'\\n\t
\\n\\n\t
\\n\t\t\\n\t\t
\\n\t\t\t
\\n\t\t\t\t
\\n\t\t\t\t\t\\n\t\t\t\t
\\n\t\t\t
\\n\t\t\t\\n\t\t
\\n\t
\\n\\n
';\n}\nreturn __p;\n};\n","module.exports = function(obj){\nvar __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\nwith(obj||{}){\n__p+='\\n\\n
\\n\t
\\n\t\ti18n.brand\\n\t\t/\\n\t\t'+\n((__t=( headerTitle ))==null?'':__t)+\n'\\n\t
\\n\t\\n\t\\n
\\n\\n
\\n\t
\\n\t
\\n
';\n}\nreturn __p;\n};\n","export default [\n\t{\n\t\tevent: 'app:system:branding:reset',\n\t\tlabel: i18n.t('i18n.reset'),\n\t},\n];\n","import Menu from '@netx/core/lib/netx-menu';\n\nexport default {};\n","/**\n * @class\n */\nimport Base from '@netx/core/lib/netx-model';\n\nexport default class ColorPalette extends Base {\n\tget defaults() {\n\t\treturn {\n\t\t\tprimary: '#000000',\n\t\t\t'on-primary': '#ffffff',\n\t\t\t'on-primary-custom': false,\n\t\t\tsecondary: '#000000',\n\t\t\t'on-secondary': '#ffffff',\n\t\t\t'on-secondary-custom': false,\n\t\t};\n\t}\n\n\t/** @type {string} */\n\tstatic get __name__() {\n\t\treturn 'ColorPalette';\n\t}\n}\n","/**\n * @class\n */\nimport Base from './colorPalette';\n\nclass ColorPalette_Dark extends Base {\n\t/**\n\t * @method\n\t * @return {string} Logo URL\n\t */\n\tgetLogo() {\n\t\treturn `${Netx.URL.logoDark}?${_.now()}`;\n\t}\n\n\t/**\n\t * @method\n\t * @param {object} file Plupload file\n\t */\n\tsetLogo(file) {\n\t\treturn Netx.app.brand.setLogo(file.name, 2);\n\t}\n\n\t/** @type {string} */\n\tstatic get __name__() {\n\t\treturn 'ColorPalette_Dark';\n\t}\n}\n\nexport default ColorPalette_Dark;\n","/**\n * @class\n */\nimport Base from '@netx/core/lib/netx-collection';\n\nimport Model from '../models/colorPalette';\nimport DarkColorPaletteModel from '../models/colorPalette_dark';\nimport LightColorPaletteModel from '../models/colorPalette_light';\n\nconst Models = {\n\tdark: DarkColorPaletteModel,\n\tlight: LightColorPaletteModel,\n};\n\nconst getData = (palettes, data) => {\n\treturn palettes.map((palette) => {\n\t\tconst match = `${palette}-`;\n\t\tconst keys = Object.keys(data.attributes).filter((key) =>\n\t\t\tkey.includes(match),\n\t\t);\n\t\tconst paletteData = {id: palette};\n\t\tkeys.forEach((key) => {\n\t\t\t// Turns something like \"light-on-primary\" -> \"on-primary\"\n\t\t\tpaletteData[key.replace(match, '')] = data.get(key);\n\t\t});\n\t\treturn new Models[palette](paletteData);\n\t});\n};\n\nexport default class ColorPalettes extends Base {\n\t/** @override */\n\tconstructor(models, opts = {}) {\n\t\topts.model = opts.model || Model;\n\n\t\tmodels = getData(opts.palettes, opts.data);\n\t\tsuper(models, opts);\n\n\t\tthis.data = opts.data;\n\t\tthis.palettes = opts.palettes;\n\n\t\t// Hey, listen!\n\t\tthis.listenTo(this.data, 'sync', () => {\n\t\t\tthis.reset(getData(this.palettes, this.data));\n\t\t});\n\t}\n\n\t/**\n\t * @method\n\t * @return {object} values\n\t */\n\tgetValues() {\n\t\tconst values = {};\n\t\tthis.forEach((palette) => {\n\t\t\t_.forEach(palette.attributes, (value, key) => {\n\t\t\t\tif (key === 'id') return;\n\t\t\t\tvalues[`${palette.id}-${key}`] = value;\n\t\t\t});\n\t\t});\n\t\treturn values;\n\t}\n\n\t/** @type {string} */\n\tstatic get __name__() {\n\t\treturn 'ColorPalettes';\n\t}\n}\n","/**\n * @class\n */\nimport Base from './colorPalette';\n\nclass ColorPalette_Light extends Base {\n\t/**\n\t * @method\n\t * @return {string} Logo URL\n\t */\n\tgetLogo() {\n\t\treturn `${Netx.URL.logoLight}?${_.now()}`;\n\t}\n\n\t/**\n\t * @method\n\t * @param {object} file Plupload file\n\t */\n\tsetLogo(file) {\n\t\treturn Netx.app.brand.setLogo(file.name, 4);\n\t}\n\n\t/** @type {string} */\n\tstatic get __name__() {\n\t\treturn 'ColorPalette_Light';\n\t}\n}\n\nexport default ColorPalette_Light;\n","/**\n * @class\n */\nimport Base from '@netx/core/lib/netx-model';\n\nimport {getNormalizedHexColor} from '@netx/core/utils';\nimport ColorPalettes from '../collections/colorPalettes';\nimport config from '@netx/core-app/config';\n\nconst normalizeValues = (values) => {\n\treturn Object.keys(values).reduce((accum, curr) => {\n\t\treturn Object.assign(accum, {\n\t\t\t[curr]:\n\t\t\t\tcurr === 'login-background-assetId' || curr.match(/-custom/)\n\t\t\t\t\t? values[curr]\n\t\t\t\t\t: getNormalizedHexColor(values[curr]),\n\t\t});\n\t}, {});\n};\n\nconst parse = (data, opts) => {\n\tdata = {...config.CSS_CUSTOM_PROPERTIES, ...data};\n\n\t_.forEach(data, (value, key, all) => {\n\t\tif (key === 'login-background-assetId') {\n\t\t\tall[key] = parseInt(value) || undefined;\n\t\t\treturn;\n\t\t}\n\t\t// We want a true boolean on the way in\n\t\tif (key.match(/-custom/)) {\n\t\t\tall[key] = value === 'true' ? true : false;\n\t\t\treturn;\n\t\t}\n\t});\n\n\treturn normalizeValues(data);\n};\n\nexport default class CustomCSSProperties extends Base {\n\t/**\n\t * @type {Netx.Rpc}\n\t * @private\n\t */\n\tget rpc() {\n\t\treturn true;\n\t}\n\t/**\n\t * @type {Netx.URL}\n\t * @private\n\t */\n\tget url() {\n\t\treturn Netx.URL.api;\n\t}\n\n\t/** @type {object} */\n\tget defaults() {\n\t\treturn {\n\t\t\t'login-background-assetId': undefined,\n\n\t\t\t'light-primary': '#000000',\n\t\t\t'light-secondary': '#000000',\n\t\t\t'light-on-primary': '#ffffff',\n\t\t\t'light-on-primary-custom': false,\n\t\t\t'light-on-secondary': '#ffffff',\n\t\t\t'light-on-secondary-custom': false,\n\n\t\t\t'dark-primary': '#ffffff',\n\t\t\t'dark-secondary': '#ffffff',\n\t\t\t'dark-on-primary': '#000000',\n\t\t\t'dark-on-primary-custom': false,\n\t\t\t'dark-on-secondary': '#000000',\n\t\t\t'dark-on-secondary-custom': false,\n\n\t\t\t...config.CSS_CUSTOM_PROPERTIES,\n\t\t};\n\t}\n\n\t/**\n\t * @property {object} methods - Methods\n\t * @property {method} methods.read - Read method\n\t * @property {method} methods.update - Update method\n\t */\n\tget methods() {\n\t\treturn {\n\t\t\t/**\n\t\t\t * @method\n\t\t\t * @param {object} opts Request options\n\t\t\t */\n\t\t\tread(opts) {\n\t\t\t\treturn ['getBrandingCSSCustomProperties', this.portalId];\n\t\t\t},\n\t\t\t/**\n\t\t\t * @method\n\t\t\t * @param {object} opts Request options\n\t\t\t */\n\t\t\tupdate(opts) {\n\t\t\t\treturn [\n\t\t\t\t\t'setBrandingCSSCustomProperties',\n\t\t\t\t\tthis.portalId,\n\t\t\t\t\tnormalizeValues(this.self()),\n\t\t\t\t];\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * @property {object} parsers - Parsers\n\t * @property {method} parsers.update - Update method\n\t */\n\tget parsers() {\n\t\treturn {\n\t\t\t/**\n\t\t\t * @method\n\t\t\t * @param {object} data Data\n\t\t\t * @param {object} opts Request options\n\t\t\t */\n\t\t\tread(data, opts) {\n\t\t\t\treturn parse(data);\n\t\t\t},\n\t\t\t/**\n\t\t\t * @method\n\t\t\t * @param {object} data Data\n\t\t\t * @param {object} opts Request options\n\t\t\t */\n\t\t\tupdate(data, opts) {\n\t\t\t\treturn parse(data);\n\t\t\t},\n\t\t};\n\t}\n\n\t/** @override */\n\tconstructor(attrs, opts = {}) {\n\t\tsuper(attrs, opts);\n\n\t\tthis.saveChanges = _.debounce(this.saveChanges, 1000);\n\n\t\tthis.portalId = opts.portalId || -1;\n\t\tthis.portalName = opts.portalName || 'netx';\n\n\t\tconst setStyleProperty = Netx.setStyleProperty;\n\n\t\t// Hey, listen!\n\t\tthis.on('change', (model, opts = {}) => {\n\t\t\tif (opts.parse) return;\n\n\t\t\t_.forEach(this.changed, (value, key) => {\n\t\t\t\tif (\n\t\t\t\t\t// This is \"magic\"\n\t\t\t\t\tkey === 'login-background-assetId' ||\n\t\t\t\t\t// These are just for us\n\t\t\t\t\tkey.match(/-custom/)\n\t\t\t\t)\n\t\t\t\t\treturn;\n\n\t\t\t\tsetStyleProperty(key, getNormalizedHexColor(value));\n\t\t\t});\n\t\t\tthis.saveChanges();\n\t\t});\n\n\t\tthis.colorPalettes = new ColorPalettes([], {\n\t\t\tdata: this,\n\t\t\tpalettes: ['light', 'dark'],\n\t\t});\n\t}\n\n\t/** @method */\n\treset(opts) {\n\t\t// We want to maintain the background image on a reset due\n\t\t// to the currently fractured branding setup\n\t\tconst assetId = this.get('login-background-assetId');\n\t\tthis.clear();\n\n\t\treturn this.save(\n\t\t\t{...parse(), 'login-background-assetId': assetId},\n\t\t\t{wait: true, ...opts},\n\t\t);\n\t}\n\n\t/** @override */\n\tself() {\n\t\tlet data = super.self();\n\t\t_.each(data, (value, key, all) => {\n\t\t\tif (key === 'login-background-assetId') {\n\t\t\t\tall[key] = (value || '').toString();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (key.match(/-custom/)) {\n\t\t\t\tall[key] = value === true ? 'true' : 'false';\n\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\t\t//Store last update time for cache busting the background image when updated\n\t\tdata['updated'] = new Date().getTime().toString();\n\n\t\treturn data;\n\t}\n\n\t/**\n\t * @method\n\t * @param {object} opts Options\n\t */\n\tsaveChanges(opts) {\n\t\treturn this.save({}, {wait: true, ...opts});\n\t}\n\n\t/**\n\t * @method\n\t * @param {number} assetId Asset ID\n\t * @param {object} opts Options\n\t */\n\tsetBackground(assetId, opts) {\n\t\tthis.save(\n\t\t\t{'login-background-assetId': assetId.toString()},\n\t\t\t{wait: true, ...opts},\n\t\t);\n\t}\n\n\t/**\n\t * @method\n\t * @param {object} opts Options\n\t */\n\tunsetBackground(opts) {\n\t\tthis.save({'login-background-assetId': ''}, {wait: true, ...opts});\n\t}\n\n\t/** @override */\n\tisNew() {\n\t\treturn false;\n\t}\n}\n","/**\n * @class\n */\nimport Base from '@netx/core/lib/netx-view';\nimport Template from '../templates/color.html';\n\nimport tinycolor from 'tinycolor2';\n\nconst getHexValue = (intInput) => {\n\tlet result = intInput.toString(16);\n\tif (result.length < 2) {\n\t\tresult = `0${result}`;\n\t}\n\treturn result;\n};\n\nconst getRedableTextColor = (backColor, testColor) => {\n\tif (testColor && tinycolor.readability(backColor, testColor) >= 3) {\n\t\treturn testColor;\n\t}\n\treturn tinycolor.mostReadable(backColor, ['#fff', '#000']).toHexString();\n};\n\nconst rgbaToHex = function (rgba) {\n\tconst alpha = rgba.a;\n\n\tfunction getTintValue(tint, bgTint) {\n\t\tconst tmp = Math.floor((1 - alpha) * bgTint + alpha * tint);\n\t\tif (tmp > 255) return 255;\n\t\treturn tmp;\n\t}\n\treturn (\n\t\tgetHexValue(getTintValue(rgba.r, 255)) +\n\t\tgetHexValue(getTintValue(rgba.g, 255)) +\n\t\tgetHexValue(getTintValue(rgba.b, 255))\n\t);\n};\n\nclass Color extends Base {\n\t/** @override */\n\tconstructor(opts = {}) {\n\t\topts.events = {\n\t\t\t'change [type=\"checkbox\"][name=\"on-color-custom\"]': 'checkCustom',\n\t\t\t'change [name=\"color\"]': 'colorChanged',\n\t\t\t'focus [name=\"on-color\"]': 'onColorFocus',\n\t\t\t'blur [name=\"on-color\"]': 'onColorBlur',\n\t\t\t...opts.events,\n\t\t};\n\t\topts.template = opts.template || Template;\n\t\tsuper(opts);\n\n\t\tthis.colorKey = opts.colorKey; // 'primary', 'secondary', etc\n\t\tthis.colorLabel = opts.colorLabel;\n\t\tthis.onColorLabel = opts.onColorLabel;\n\n\t\tthis.currentValues = {\n\t\t\tcolor: '',\n\t\t\t'on-color': '',\n\t\t};\n\t}\n\n\t/**\n\t * @method\n\t * @param {event} e `change` event\n\t */\n\tcheckCustom(e) {\n\t\tconst checked = e.currentTarget.checked;\n\t\tthis.model.set(`on-${this.colorKey}-custom`, checked);\n\n\t\t!checked && this.update();\n\t}\n\n\t/**\n\t * @method\n\t */\n\tcolorChanged(e) {\n\t\tif (e.target.value === this.currentValues[e.target.name]) return;\n\n\t\tthis.update();\n\t\tthis.trigger('color:updated', this);\n\t}\n\n\t/**\n\t * Track current value of color variant before editting\n\t * @method\n\t * @param {event} e `focus` event\n\t */\n\tonColorFocus(e) {\n\t\tconst currentTarget = e.currentTarget;\n\t\tcurrentTarget.dataset.nxValue = currentTarget.value;\n\t}\n\n\t/**\n\t * On blur, if color has changed set custom and save\n\t * @method\n\t * @param {event} e `blur` event\n\t */\n\tonColorBlur(e) {\n\t\tconst currentTarget = e.currentTarget;\n\t\tif (currentTarget.dataset.nxValue === currentTarget.value) return;\n\n\t\tconst customInput = this.inputs['on-color-custom'];\n\t\tif (customInput) {\n\t\t\tcustomInput.checked = true;\n\t\t}\n\n\t\tthis.model.set(`on-${this.colorKey}-custom`, true);\n\t\tcurrentTarget.dataset.nxValue = currentTarget.value;\n\t}\n\n\t/** @override */\n\tpostRender() {\n\t\tsuper.postRender();\n\n\t\tconst el = this.el;\n\t\tthis.inputs = {\n\t\t\tcolor: el.querySelector('[name=\"color\"]'),\n\t\t\t'on-color': el.querySelector('[name=\"on-color\"]'),\n\t\t\t'on-color-custom': el.querySelector('[name=\"on-color-custom\"]'),\n\t\t};\n\n\t\tthis.colorDisplay = {\n\t\t\tcolor: el.querySelector('.nx-color'),\n\t\t\t'on-color': el.querySelector('.nx-on-color'),\n\t\t};\n\n\t\tthis.update();\n\t}\n\n\t/** @override */\n\tpreRender() {\n\t\tsuper.preRender();\n\n\t\tconst model = this.model;\n\n\t\tconst values = {};\n\t\tconst match = this.colorKey;\n\t\tconst keys = Object.keys(model.attributes).filter((key) =>\n\t\t\tkey.includes(match),\n\t\t);\n\t\tkeys.forEach((key) => {\n\t\t\tvalues[key.replace(match, 'color')] = model.get(key);\n\t\t});\n\n\t\tObject.assign(this.templateVars, {\n\t\t\tlabel: this.colorLabel,\n\t\t\tonLabel: this.onColorLabel,\n\t\t\tvalues: values,\n\t\t});\n\t}\n\n\t/** @method */\n\tupdate() {\n\t\tconst model = this.model;\n\n\t\tconst color = (this.currentValues.color = this.inputs.color.value);\n\t\tmodel.set(`${this.colorKey}`, color);\n\n\t\t// Update primary text color\n\t\tconst prop = `on-${this.colorKey}`;\n\t\tconst onColor = model.get(prop);\n\n\t\tmodel.set(prop, onColor);\n\t\tthis.inputs['on-color'].value = onColor;\n\n\t\tthis.colorDisplay.color.style.background = color;\n\t\tthis.colorDisplay['on-color'].style.background = onColor;\n\t}\n}\n\nexport default Color;\n","/**\n * @Class\n * @override\n */\nimport Base from '@netx/core-app-system-branding/views/color';\n\nimport MaterialTextFields from '@netx/core/functionality/materialTextFields';\n\n// Color picker for visual searches\nimport 'theme-css/lib/bootstrap-colorpicker/bootstrap-colorpicker.less';\nimport 'theme-libs/bootstrap-colorpicker';\n\nclass Color extends Base {\n\t/** @override */\n\tconstructor(opts = {}) {\n\t\topts.events = {\n\t\t\t'changeColor [name=\"on-color\"]'(e) {\n\t\t\t\tthis.updatedFromColorpicker = true;\n\t\t\t\tthis.model.set(`on-${this.colorKey}`, e.target.value);\n\t\t\t\tthis.onColorBlur(e);\n\t\t\t\tthis.colorChanged(e);\n\t\t\t},\n\t\t\t'changeColor [name=\"color\"]'(e) {\n\t\t\t\tthis.updatedFromColorpicker = true;\n\t\t\t\tthis.colorChanged(e);\n\t\t\t},\n\t\t\t'click .nx-color': 'showColorPicker',\n\t\t\t'click .nx-on-color': 'showColorPicker',\n\t\t\t...opts.events,\n\t\t};\n\t\tsuper(opts);\n\n\t\t// Additonal plugins\n\t\tthis.Plugins.Register({\n\t\t\tcolorpicker: {\n\t\t\t\tname: 'colorpicker',\n\t\t\t\telementKey: 'element',\n\t\t\t\tmultiple: true,\n\t\t\t\toptions: {\n\t\t\t\t\talign: 'left',\n\t\t\t\t\tformat: 'hex',\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\t/** @override */\n\tpreRender() {\n\t\tthis.Plugins.Destroy('colorpicker');\n\n\t\tsuper.preRender();\n\t}\n\n\t/** @override */\n\tpostRender() {\n\t\tsuper.postRender();\n\n\t\t// Colorpickers\n\t\tthis.$colorPickers = this.$('.nx-colorpicker');\n\t\tthis.Plugins.Initialize('colorpicker', this.$colorPickers);\n\t}\n\n\t/** @override */\n\tupdate() {\n\t\tsuper.update();\n\n\t\tconst updateColorpicker = (input, value) => {\n\t\t\tlet instance = this.Plugins.GetInstance('colorpicker', input);\n\t\t\tinstance = instance && instance[0];\n\t\t\tif (!instance) return;\n\n\t\t\tinstance.setValue(value);\n\t\t\tthis.Plugins.Update('colorpicker', $(input));\n\t\t};\n\n\t\tif (!this.updatedFromColorpicker) {\n\t\t\tupdateColorpicker(this.inputs.color, this.currentValues.color);\n\t\t\tupdateColorpicker(\n\t\t\t\tthis.inputs['on-color'],\n\t\t\t\tthis.currentValues['on-color'],\n\t\t\t);\n\t\t}\n\t\tdelete this.updatedFromColorpicker;\n\t}\n\n\t/**\n\t * @method\n\t * @param {event} e `click` event\n\t */\n\tshowColorPicker(e) {\n\t\tconst input = e.target\n\t\t\t.closest('.mdc-text-field')\n\t\t\t.querySelector('.mdc-text-field__input');\n\t\tif (!input) return;\n\n\t\tlet instance = this.Plugins.GetInstance('colorpicker', input);\n\t\tinstance = instance && instance[0];\n\t\tif (!instance) return;\n\n\t\tinstance.show();\n\t}\n}\n\nMaterialTextFields(Color);\n\nexport default Color;\n","/**\n * @class\n */\nimport Base from '@netx/core/lib/netx-view';\nimport Template from '../templates/logo.html';\n\nimport UploadModel from '@netx/core-upload/models/upload';\n\nimport {events as pluploadEvents} from '@netx/core-upload/properties/plupload';\n\nexport default class Logo extends Base {\n\t/** @override */\n\tconstructor(opts = {}) {\n\t\topts.className = `brand-logo-view ${opts.className || ''}`;\n\t\topts.events = {\n\t\t\t// Doing the binding of the button in the upload.js model is no beuno\n\t\t\t'click [data-nx-control=\"upload\"]': 'selectFiles',\n\t\t\t...opts.events,\n\t\t};\n\t\topts.headerTitle = opts.headerTitle || i18n.t('i18n.logo');\n\t\topts.template = opts.template || Template;\n\t\tsuper(opts);\n\n\t\t// Register\n\t\t// One day this will be a real plugin and not this plupload nonsense\n\t\tthis.Plugins.Register({\n\t\t\tuploader: {\n\t\t\t\tname: 'plupload',\n\t\t\t\toptions: {\n\t\t\t\t\t// Allowed file types\n\t\t\t\t\tfilters: {\n\t\t\t\t\t\tmax_file_size: '600kb',\n\t\t\t\t\t\tmime_types: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: 'Images',\n\t\t\t\t\t\t\t\textensions: 'jpg,png',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\n\t\t// When we finally kill pluload (and I hope to use drop.js) - upload things like this belong in a view\n\t\t// it is silly that we touch elements in upload.js model - it is then not ran through the backbone event system\n\t\t// and we easily lose and/or n down on the events for the upload button (because once a render happens again- that is not the same $el as before)\n\t\t// The view should just have an element with [data-nx-control=\"upload\"] and utilize our new plugins object for init options\n\t\t// Then the models, collections and controllers can be agnostic about uploaders - all they want is data\n\t\t// For right now I am doing it like this as almost 99% of what is happening is view specific - I know I am preaching to the choir ;)\n\t\tconst plugin = this.Plugins.Find('uploader');\n\t\tthis.uploader = new UploadModel(\n\t\t\t{\n\t\t\t\tmulti_selection: false,\n\t\t\t\t// This should just happen by default\n\t\t\t\t// turn these plupload events into dispatcher events:\n\t\t\t\tmapEvents: _.keys(pluploadEvents),\n\t\t\t},\n\t\t\t{\n\t\t\t\t// This utilizes our plugins object\n\t\t\t\tpluploadOptions: (plugin && plugin.options) || {},\n\t\t\t},\n\t\t);\n\n\t\t// Hey, listen!\n\t\tthis.listenTo(this.uploader.files, 'add', this.fileAdded)\n\t\t\t.listenTo(this.uploader, 'progress', this.showUploadProgress)\n\t\t\t.listenTo(this.uploader, 'uploadError', this.error)\n\t\t\t.listenTo(this.uploader, 'fileUploaded', this.fileUploaded);\n\t}\n\n\t/** @override */\n\tpreRender() {\n\t\tsuper.preRender();\n\n\t\tconst msgMax = `

${i18n.t('i18n.maxFileSize', {size: '600kb'})}

`;\n\t\tconst msgRecomended = `

${i18n.t('i18n.maxDimensions', {\n\t\t\twidth: '300px',\n\t\t\theight: '35px',\n\t\t})}

`;\n\t\tconst msgEmail =\n\t\t\tthis.model.id === 'light'\n\t\t\t\t? `

${i18n.t('i18n.defaultLogoForEmails')}

`\n\t\t\t\t: '

 

';\n\n\t\t// Additonal template vars\n\t\tObject.assign(this.templateVars, {\n\t\t\tlogo: this.model.getLogo(),\n\t\t\tmessage: msgMax + msgRecomended + msgEmail,\n\t\t});\n\t}\n\n\t/**\n\t * Runs immediately after render; useful for decorating/updating HTML that was not handled by the template.\n\t * @override\n\t */\n\tpostRender() {\n\t\tsuper.postRender();\n\n\t\t// Cache\n\t\tthis.$error = this.$('[data-nx-control=\"error\"]');\n\t\tthis.$fileName = this.$('[data-nx-control=\"filename\"]');\n\t\tthis.$uploadDetails = this.$('.upload-details');\n\t\tthis.$progressBar = this.$('[role=\"progressbar\"]');\n\n\t\tthis.uploader.initializeUploader();\n\t}\n\n\t/** @override */\n\tremove() {\n\t\t// Cleanup\n\t\tthis.uploader.destroyUploader();\n\t\tsuper.remove();\n\t}\n\n\t/**\n\t * @method\n\t */\n\terror(error) {\n\t\tthis.$error.html(error.message).show();\n\t}\n\n\t/**\n\t * User selected a file to upload\n\t * @method\n\t * @param {Backbone.Model} file File selected\n\t */\n\tfileAdded(file) {\n\t\t// Set file name\n\t\tthis.$fileName.html(file.get('name'));\n\t\t// Show progress bar\n\t\tthis.$uploadDetails.show();\n\t\t// Start it up\n\t\tthis.uploader.start();\n\t}\n\n\tfileUploaded(file) {\n\t\tthis.model.setLogo(file).then(\n\t\t\tm => {\n\t\t\t\tthis.trigger('logo:updated', this);\n\t\t\t\tthis.render();\n\t\t\t},\n\t\t\terr => {\n\t\t\t\t// TODO: currently the server will not return an error when presented with an invalid file (read: any file that isn't JPG or PNG)\n\t\t\t\tthis.error(err, file);\n\t\t\t},\n\t\t);\n\t}\n\n\t/**\n\t * @method\n\t * @param {event} e Event\n\t */\n\tselectFiles(e) {\n\t\tthis.uploader.selectFiles(e);\n\t}\n\n\t/**\n\t * Update progress\n\t * @method\n\t * @param {object} file Plupload file\n\t */\n\tshowUploadProgress(file) {\n\t\tthis.$progressBar.css('width', `${file.percent}%`);\n\t}\n\n\t/** @type {string} */\n\tstatic get __name__() {\n\t\treturn 'Logo';\n\t}\n}\n","/**\n * @class\n * @override\n */\nimport Base from '@netx/core-app-system-branding/views/logo';\n\nimport {faPlus} from '@fortawesome/pro-solid-svg-icons';\nconst icons = Base.initializeIcons({\n\tfaPlus,\n});\n\nexport default class Logo extends Base {\n\t/** @override */\n\tconstructor(opts = {}) {\n\t\topts.icons = {...icons, ...opts.icons};\n\t\tsuper(opts);\n\t}\n}\n","/**\n * @class\n */\nimport Base from '@netx/core/lib/netx-view';\nimport Template from '../templates/colorPalette.html';\n\nimport ColorView from './color';\nimport LogoView from './logo';\n\nimport config from '@netx/core-app/config';\nconst customPropertyPrefix = config.CSS_CUSTOM_PROPERTY_PREFIX;\n\nclass ColorPalette extends Base {\n\t/** @override */\n\tconstructor(opts = {}) {\n\t\topts.headerTitle = opts.headerTitle || i18n.t(`i18n.${opts.model.id}`);\n\t\topts.template = opts.template || Template;\n\t\tsuper(opts);\n\n\t\tthis.logoView = this.addSubView(\n\t\t\tnew LogoView({\n\t\t\t\tmodel: this.model,\n\t\t\t}),\n\t\t);\n\t\tthis.primaryColor = this.addSubView(\n\t\t\tnew ColorView({\n\t\t\t\tcolorKey: 'primary',\n\t\t\t\tcolorLabel: i18n.t('i18n.primaryColor'),\n\t\t\t\tonColorLabel: i18n.t('i18n.onPrimaryColor'),\n\t\t\t\tmodel: this.model,\n\t\t\t}),\n\t\t);\n\t\tthis.secondaryColor = this.addSubView(\n\t\t\tnew ColorView({\n\t\t\t\tcolorKey: 'secondary',\n\t\t\t\tcolorLabel: i18n.t('i18n.secondaryColor'),\n\t\t\t\tonColorLabel: i18n.t('i18n.onSecondaryColor'),\n\t\t\t\tmodel: this.model,\n\t\t\t}),\n\t\t);\n\n\t\tthis.listenTo(this.primaryColor, 'color:updated', view => {\n\t\t\tthis.updateStyles();\n\t\t\tthis.trigger('palette:updated', this);\n\t\t})\n\t\t\t.listenTo(this.secondaryColor, 'color:updated', view => {\n\t\t\t\tthis.trigger('palette:updated', this);\n\t\t\t})\n\t\t\t.listenTo(this.logoView, 'logo:updated', view => {\n\t\t\t\tif (Netx.getThemeMode() !== this.model.id) return;\n\t\t\t\tdispatcher.trigger('app:system:branding:updated', this.model);\n\t\t\t});\n\t}\n\n\t/** @override */\n\tpreRender() {\n\t\tsuper.preRender();\n\n\t\tthis.updateStyles();\n\n\t\tObject.assign(this.templateVars, {\n\t\t\tvalues: this.model.self(),\n\t\t});\n\t}\n\n\t/** @override */\n\tpostRender() {\n\t\tsuper.postRender();\n\n\t\tconst el = this.el;\n\n\t\tthis.$logoSelect = this.$('.nx-logo-select');\n\t\tthis.$logoSelect.replaceWith(this.logoView.render().$el);\n\n\t\tconst colorsEl = this.el.querySelector('.nx-colors');\n\t\tif (colorsEl) {\n\t\t\tthis.primaryColor.render().$el.appendTo(colorsEl);\n\t\t\tthis.secondaryColor.render().$el.appendTo(colorsEl);\n\t\t}\n\t}\n\n\t/**\n\t * Set css variables to reflect current selections\n\t * @method\n\t */\n\tupdateStyles() {\n\t\t// Reflect styles within\n\t\tconst style = this.el.style;\n\t\t_.forEach(this.model.attributes, (value, key) => {\n\t\t\tstyle.setProperty(`${customPropertyPrefix}${key}`, value);\n\t\t});\n\t}\n\n\t/** @type {string} */\n\tstatic get __name__() {\n\t\treturn 'ColorPalette';\n\t}\n}\n\nexport default ColorPalette;\n","/**\n * @class\n * @override\n */\nimport Base from '@netx/core-app-system-branding/views/colorPalette';\n\nclass ColorPalette extends Base {\n\t/** @override */\n\tconstructor(opts = {}) {\n\t\topts.className = `mdc-card mdc-card--outlined theme-${opts.model.id} ${\n\t\t\topts.className || ''\n\t\t}`;\n\t\tsuper(opts);\n\t}\n}\n\nexport default ColorPalette;\n","/**\n * @class\n */\nimport Base from '@netx/core/lib/netx-view';\nimport Template from '../templates/colorPalettes.html';\n\nimport ChildView from './colorPalette';\nimport ChildViews from '@netx/core/functionality/childViews';\n\nimport Form from '@netx/core/functionality/form';\n\nexport default class ColorPalettes extends Base {\n\t/** @override */\n\tconstructor(opts = {}) {\n\t\topts.className = `brand-palettes-view ${opts.className || ''}`;\n\t\topts.childView = {\n\t\t\tviewClass: ChildView,\n\t\t\t...opts.childView,\n\t\t};\n\t\topts.eventStr = opts.eventStr || 'app:system:branding';\n\t\topts.headerTitle = opts.headerTitle || i18n.t('i18n.colorPalettes');\n\t\topts.template = opts.template || Template;\n\t\topts.hideOnSubmit = opts.hideOnSubmit === true;\n\t\tsuper(opts);\n\t}\n\n\t/** @override */\n\tformValues() {\n\t\treturn this.getValues();\n\t}\n\n\t/**\n\t * @method\n\t * @return {object} values\n\t */\n\tgetValues() {\n\t\treturn this.collection.getValues();\n\t}\n\n\t/** @type {string} */\n\tstatic get __name__() {\n\t\treturn 'ColorPalettes';\n\t}\n}\n\nChildViews(ColorPalettes);\nForm(ColorPalettes);\n","/**\n * @class\n * @override\n */\nimport Base from '@netx/core-app-system-branding/views/colorPalettes';\n\nexport default class ColorPalettes extends Base {\n\t/** @override */\n\tconstructor(opts = {}) {\n\t\topts.events = {\n\t\t\tchangeColor: 'inputChanged',\n\t\t\t...opts.events,\n\t\t};\n\t\tsuper(opts);\n\t}\n}\n","/**\n * @class\n */\nimport Base from '@netx/core/lib/netx-view';\nimport Template from '../templates/images.html';\n\nimport AssetModel from '@netx/core-asset/models/asset';\nimport AssetSelectModel from '@netx/core-asset/models/assetSelect';\nimport AssetSelectView from '@netx/core-asset/views/assetSelectView';\n\nexport default class Images extends Base {\n\t/** @override */\n\tconstructor(opts = {}) {\n\t\topts.headerTitle = opts.headerTitle || i18n.t('i18n.images');\n\t\topts.template = opts.template || Template;\n\t\tsuper(opts);\n\n\t\tconst selectedAsset = (this.selectedAsset = new AssetSelectModel({\n\t\t\tassetId: this.model.get('login-background-assetId'),\n\t\t}));\n\n\t\tthis.assetSelectView = this.addSubView(\n\t\t\tnew AssetSelectView({\n\t\t\t\tselectName: 'branding',\n\t\t\t\tselectTitle: i18n.t('i18n.loginBackground'),\n\t\t\t\tmodel: selectedAsset,\n\t\t\t}),\n\t\t);\n\n\t\t// this.logoView = this.addSubView(\n\t\t// \tnew LogoView({\n\t\t// \t\turl: Netx.URL.logo,\n\t\t// \t\tmodel: Netx.app.brand,\n\t\t// \t}),\n\t\t// );\n\t\t//\n\t\t// this.logoView2 = this.addSubView(\n\t\t// \tnew LogoView({\n\t\t// \t\tmodel: Netx.app.brand,\n\t\t// \t\tuploadEventStr: 'app:system:branding:logo2:upload',\n\t\t// \t\turl: Netx.URL.logo2,\n\t\t// \t}),\n\t\t// );\n\n\t\t// DAM-13196: Hide watermark control from directors\n\t\tthis.displayWatermark = Netx.getUserLevel() >= 9;\n\n\t\tif (this.displayWatermark) {\n\t\t\tthis.watermarkView = this.addSubView(\n\t\t\t\tnew AssetSelectView({\n\t\t\t\t\tselectTitle: i18n.t('i18n.watermark'),\n\t\t\t\t\tselectName: 'watermark',\n\t\t\t\t\thelpText: `

${i18n.t('i18n.watermarkHelpText')}

`,\n\t\t\t\t\tmodel: new AssetSelectModel({\n\t\t\t\t\t\tsaveToProperty: 'share.watermark.assetId',\n\t\t\t\t\t}),\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\n\t\tthis.listenTo(selectedAsset, 'change:assetId', (asset, id) => {\n\t\t\tid ? this.model.setBackground(id) : this.model.unsetBackground();\n\t\t});\n\t}\n\n\t/** @override */\n\tbindModelEvents() {\n\t\tsuper.bindModelEvents();\n\n\t\tconst model = this.model;\n\t\treturn this.listenTo(model, 'sync', () => {\n\t\t\tthis.selectedAsset.set('assetId', model.get('login-background-assetId'));\n\t\t});\n\t}\n\n\t/** @override */\n\tpostRender() {\n\t\tsuper.postRender();\n\n\t\tthis.$assetSelect = this.$('.nx-asset-select');\n\t\tthis.$assetSelect.replaceWith(this.assetSelectView.render().$el);\n\n\t\t// this.$logoSelect = this.$('.nx-logo-select');\n\t\t// this.$logoSelect.replaceWith(this.logoView.render().$el);\n\t\t//\n\t\t// this.$logoSelect = this.$('.nx-logo-select2');\n\t\t// this.$logoSelect.replaceWith(this.logoView2.render().$el);\n\n\t\tthis.$watermarkSelect = this.$('.nx-watermark-select');\n\t\tif (this.watermarkView) {\n\t\t\tthis.$watermarkSelect.replaceWith(this.watermarkView.render().$el);\n\t\t}\n\t}\n\n\t/** @type {string} */\n\tstatic get __name__() {\n\t\treturn 'Images';\n\t}\n}\n","/**\n * @class\n */\nimport Base from '@netx/core/lib/netx-tabView';\nimport Template from '../templates/index.html';\n\nimport ColorPalettesView from './colorPalettes';\nimport ImagesView from './images';\n\nexport default class Index extends Base {\n\t/** @override */\n\tconstructor(opts = {}) {\n\t\topts.defaultTab = 'color';\n\t\topts.headerTitle = opts.headerTitle || i18n.t('i18n.appSystemBranding');\n\t\topts.id = opts.id || 'app-system-branding';\n\t\topts.template = opts.template || Template;\n\t\tsuper(opts);\n\t}\n\n\t/** @override */\n\ttabs() {\n\t\treturn [\n\t\t\t{\n\t\t\t\tviewClass: ColorPalettesView,\n\t\t\t\tname: 'color',\n\t\t\t\tlabel: i18n.t('i18n.colors'),\n\t\t\t\tviewOptions: {\n\t\t\t\t\tcollection: this.model.colorPalettes,\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tviewClass: ImagesView,\n\t\t\t\tname: 'images',\n\t\t\t\tlabel: i18n.t('i18n.images'),\n\t\t\t\tviewOptions: {\n\t\t\t\t\tmodel: this.model,\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}\n\n\t/** @type {string} */\n\tstatic get __name__() {\n\t\treturn 'Index';\n\t}\n}\n","/**\n * @class\n * @override\n */\nimport Base from '@netx/core-app-system-branding/views/index';\nimport '../css/style.less';\n\nexport default Base;\n","export default {\n\t/** @route */\n\t'system/brand': 'app:system:branding',\n};\n","import CustomCSSProperties from './models/customCSSProperties';\n\n// Views\nimport IndexView from './views/index';\n\nimport routes from './routes';\n\n/**\n * @event module:app:system:branding#app:system:branding:init\n * @fires module:app:system:branding#app:system:branding:extend\n * @fires module:app:system:branding#app:system:branding:initialized\n */\ndispatcher.once('app:system:branding:init', () => {\n\t// Make sure we have an `app` namespace\n\tNetx.app = Netx.app || {};\n\n\tconst NS = (Netx.app.system = {});\n\tconst router = Netx.router;\n\n\tconst customCSSProperties = new CustomCSSProperties({}, {portalId: -1});\n\tcustomCSSProperties.fetch();\n\n\t/**\n\t * @event module:app:system:branding#app:system:branding:show\n\t * @param {object} viewOptions View options\n\t * @fires module:system#system\n\t */\n\tdispatcher.on('app:system:branding:show', viewOptions => {\n\t\tdispatcher.trigger('system', system => {\n\t\t\tsystem.appViews.add({\n\t\t\t\tviewClass: IndexView,\n\t\t\t\tshowActions: ['app:system:branding:show'],\n\t\t\t\tviewOptions: viewOptions,\n\t\t\t});\n\t\t});\n\t});\n\n\t/**\n\t * @route\n\t * @fires module:app:system:branding#app:system:branding\n\t */\n\trouter.on('route:app:system:branding', () => {\n\t\tdispatcher.trigger('app:system:branding');\n\t});\n\n\t/**\n\t * @event module:app:system:branding#app:system:branding\n\t * @fires module:app:system:branding#app:system:branding:show\n\t */\n\tdispatcher.on('app:system:branding', () => {\n\t\tdispatcher.trigger('app:system:branding:show', {\n\t\t\tmodel: customCSSProperties,\n\t\t});\n\t});\n\n\t/**\n\t * @event module:app:system:branding#app:system:branding:confirmed\n\t * @param {object} value Values\n\t * @param {module:app/system/branding/collections/colorPalettes} collection Color palettes\n\t */\n\tdispatcher.on('app:system:branding:confirmed', (values, collection) => {\n\t\tcustomCSSProperties.set(values);\n\t});\n\n\t/**\n\t * @event module:app:system:branding#app:system:branding:reset\n\t * @fires module:app#app:confirm\n\t */\n\tdispatcher.on('app:system:branding:reset', () => {\n\t\tdispatcher.trigger('app:confirm', {\n\t\t\tmessage: i18n.t('i18n.actionPermanent'),\n\t\t\teventStr: 'app:system:branding:reset',\n\t\t});\n\t});\n\n\t/**\n\t * @event module:app:system:branding#app:system:branding:reset:confirmed\n\t */\n\tdispatcher.on('app:system:branding:reset:confirmed', () => {\n\t\tPromise.all([\n\t\t\tNetx.app.brand.resetBranding(),\n\t\t\tcustomCSSProperties.reset(),\n\t\t]).then(() => {\n\t\t\t// Will get everything including logos updated\n\t\t\tNetx.setThemeMode(Netx.getThemeMode());\n\t\t});\n\t});\n\n\t// Finished\n\tdispatcher.trigger('app:system:branding:extend', NS);\n\tdispatcher.trigger('app:system:branding:initialized', NS);\n});\n\nexport default {\n\tinitialize(opts) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tdispatcher.once('app:system:branding:initialized', () => {\n\t\t\t\tresolve(routes);\n\t\t\t});\n\t\t\tdispatcher.trigger('app:system:branding:init');\n\t\t});\n\t},\n};\n","/**\n * App system branding module\n */\nimport System from '@netx/core-system';\n\nimport actions from './actions';\nimport menus from './menus';\nimport controller from './controller';\n\n// Testing\n\n/**\n * @property {object} exports - Our module exports\n * @property {string} exports.namespace - Module namespace\n * @property {function} exports.initialize - Module initializer\n */\nexport default {\n\tnamespace: 'app-system-branding',\n\tinitialize() {\n\t\t// Register actions\n\t\tNetx.Actions.Register(actions);\n\t\t// Extend menus\n\t\tNetx.addMenus(menus);\n\n\t\treturn controller.initialize();\n\t},\n};\n"],"sourceRoot":""}