/*! For license information please see theming-personal-theming.js.LICENSE.txt */ !function(){var e,r,n,o={21613:function(e,r,n){"use strict";var o=n(77958),i=n(20144);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function S(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function L(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){S(i,n,o,a,u,"next",t)}function u(t){S(i,n,o,a,u,"throw",t)}a(void 0)}))}}function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r.6},calculateLuma:function(t){var e,r,n=(e=this.hexToRGB(t),r=3,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,r)||function(t,e){if(t){if("string"==typeof t)return T(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return(.2126*n[0]+.7152*n[1]+.0722*n[2])/255},hexToRGB:function(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:null},update:function(t){var e=this;return L(x().mark((function r(){return x().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e.backgroundImage=t.backgroundImage,e.Theming.color=t.backgroundColor,e.$emit("update:background"),e.loading=!1;case 4:case"end":return r.stop()}}),r)})))()},setDefault:function(){var t=this;return L(x().mark((function e(){var r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading="default",e.next=3,s.Z.post((0,u.generateUrl)("/apps/theming/background/default"));case 3:r=e.sent,t.update(r.data);case 5:case"end":return e.stop()}}),e)})))()},setShipped:function(t){var e=this;return L(x().mark((function r(){var n;return x().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.loading=t,r.next=3,s.Z.post((0,u.generateUrl)("/apps/theming/background/shipped"),{value:t});case 3:n=r.sent,e.update(n.data);case 5:case"end":return r.stop()}}),r)})))()},setFile:function(t){var e=arguments,r=this;return L(x().mark((function n(){var o,i;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=e.length>1&&void 0!==e[1]?e[1]:null,r.loading="custom",n.next=4,s.Z.post((0,u.generateUrl)("/apps/theming/background/custom"),{value:t,color:o});case 4:i=n.sent,r.update(i.data);case 6:case"end":return n.stop()}}),n)})))()},removeBackground:function(){var t=this;return L(x().mark((function e(){var r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading="remove",e.next=3,s.Z.delete((0,u.generateUrl)("/apps/theming/background/custom"));case 3:r=e.sent,t.update(r.data);case 5:case"end":return e.stop()}}),e)})))()},pickColor:function(t){var e=this;return L(x().mark((function r(){var n,o,i,a;return x().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.loading="color",i=(null==t||null===(n=t.target)||void 0===n||null===(n=n.dataset)||void 0===n?void 0:n.color)||(null===(o=e.Theming)||void 0===o?void 0:o.color)||"#0082c9",r.next=4,s.Z.post((0,u.generateUrl)("/apps/theming/background/color"),{color:i});case 4:a=r.sent,e.update(a.data);case 6:case"end":return r.stop()}}),r)})))()},debouncePickColor:p()((function(){this.pickColor.apply(this,arguments)}),200),pickFile:function(){var e=this;(0,f.fn)(t("theming","Select a background from your files")).allowDirectories(!1).setMimeTypeFilter(["image/png","image/gif","image/jpeg","image/svg+xml","image/svg"]).setMultiSelect(!1).addButton({id:"select",label:t("theming","Select background"),callback:function(t){var r;e.applyFile(null===(r=t[0])||void 0===r?void 0:r.path)},type:"primary"}).build().pick()},applyFile:function(e){var r=this;return L(x().mark((function n(){var i,a,c,l,d,h;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e&&"string"==typeof e&&0!==e.trim().length&&"/"!==e){n.next=4;break}return k.error("No valid background have been selected",{path:e}),(0,f.x2)(t("theming","No background has been selected")),n.abrupt("return");case 4:return r.loading="custom",i=null,a=null,n.prev=7,l=(0,u.generateRemoteUrl)("dav/files/"+(0,o.ts)().uid+e),n.next=11,s.Z.get(l,{responseType:"blob"});case 11:return i=n.sent,d=URL.createObjectURL(i.data),n.next=15,r.getColorPaletteFromBlob(d);case 15:h=n.sent,a=null==h||null===(c=h.DarkVibrant)||void 0===c?void 0:c.hex,r.setFile(e,a),k.debug("Extracted colour",a,"from custom image",e,h),n.next=25;break;case 21:n.prev=21,n.t0=n.catch(7),r.setFile(e),k.error("Unable to extract colour from custom image",{error:n.t0,path:e,response:i,color:a});case 25:case"end":return n.stop()}}),n,null,[[7,21]])})))()},getColorPaletteFromBlob:function(t){return new Promise((function(e,r){new(v())(t).getPalette((function(t,n){t&&r(t),e(n)}))}))}}},M=P,B=n(93379),F=n.n(B),N=n(7795),G=n.n(N),V=n(90569),U=n.n(V),R=n(3565),q=n.n(R),H=n(19216),Z=n.n(H),z=n(44589),W=n.n(z),$=n(28636),Y={};Y.styleTagTransform=W(),Y.setAttributes=q(),Y.insert=U().bind(null,"head"),Y.domAPI=G(),Y.insertStyleElement=Z(),F()($.Z,Y),$.Z&&$.Z.locals&&$.Z.locals;var K=(0,_.Z)(M,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"background-selector",attrs:{"data-user-theming-background-settings":""}},[e("button",{staticClass:"background background__filepicker",class:{"icon-loading":"custom"===t.loading,"background--active":"custom"===t.backgroundImage},attrs:{"data-color-bright":t.invertTextColor(t.Theming.color),"data-user-theming-background-custom":"",tabindex:"0"},on:{click:t.pickFile}},[t._v("\n\t\t"+t._s(t.t("theming","Custom background"))+"\n\t\t"),"custom"!==t.backgroundImage?e("ImageEdit",{attrs:{size:26}}):t._e(),t._v(" "),e("Check",{attrs:{size:44}})],1),t._v(" "),e("button",{staticClass:"background background__default",class:{"icon-loading":"default"===t.loading,"background--active":"default"===t.backgroundImage},style:{"--border-color":t.Theming.defaultColor},attrs:{"data-color-bright":t.invertTextColor(t.Theming.defaultColor),"data-user-theming-background-default":"",tabindex:"0"},on:{click:t.setDefault}},[t._v("\n\t\t"+t._s(t.t("theming","Default background"))+"\n\t\t"),e("Check",{attrs:{size:44}})],1),t._v(" "),e("NcColorPicker",{on:{input:t.debouncePickColor},model:{value:t.Theming.color,callback:function(e){t.$set(t.Theming,"color",e)},expression:"Theming.color"}},[e("button",{staticClass:"background background__color",style:{backgroundColor:t.Theming.color,"--border-color":t.Theming.color},attrs:{"data-color":t.Theming.color,"data-color-bright":t.invertTextColor(t.Theming.color),"data-user-theming-background-color":"",tabindex:"0"}},[t._v("\n\t\t\t"+t._s(t.t("theming","Change color"))+"\n\t\t")])]),t._v(" "),e("button",{staticClass:"background background__delete",class:{"background--active":t.isBackgroundDisabled},attrs:{"data-user-theming-background-clear":"",tabindex:"0"},on:{click:t.removeBackground}},[t._v("\n\t\t"+t._s(t.t("theming","No background"))+"\n\t\t"),t.isBackgroundDisabled?t._e():e("Close",{attrs:{size:32}}),t._v(" "),e("Check",{attrs:{size:44}})],1),t._v(" "),t._l(t.shippedBackgrounds,(function(r){return e("button",{key:r.name,staticClass:"background background__shipped",class:{"icon-loading":t.loading===r.name,"background--active":t.backgroundImage===r.name},style:{backgroundImage:"url("+r.preview+")","--border-color":r.details.primary_color},attrs:{title:r.details.attribution,"aria-label":r.details.attribution,"data-color-bright":"dark"===r.details.theming,"data-user-theming-background-shipped":r.name,tabindex:"0"},on:{click:function(e){return t.setShipped(r.name)}}},[e("Check",{attrs:{size:44}})],1)}))],2)}),[],!1,null,"4e3fc802",null).exports,Q=n(25108),X={name:"ItemPreview",components:{NcCheckboxRadioSwitch:l.Z},props:{enforced:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},theme:{type:Object,required:!0},type:{type:String,default:""},unique:{type:Boolean,default:!1}},computed:{switchType:function(){return this.unique?"switch":"radio"},name:function(){return this.unique?null:this.type},img:function(){return(0,u.generateFilePath)("theming","img",this.theme.id+".jpg")},checked:{get:function(){return this.selected},set:function(t){Q.debug("Changed theme",this.theme.id,t),this.unique?this.$emit("change",{enabled:!0===t,id:this.theme.id}):this.$emit("change",{enabled:!0,id:this.theme.id})}}},methods:{onToggle:function(){"radio"!==this.switchType?this.checked=!this.checked:this.checked=!0}}},J=n(22465),tt={};tt.styleTagTransform=W(),tt.setAttributes=q(),tt.insert=U().bind(null,"head"),tt.domAPI=G(),tt.insertStyleElement=Z(),F()(J.Z,tt),J.Z&&J.Z.locals&&J.Z.locals;var et=(0,_.Z)(X,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"theming__preview",class:"theming__preview--"+t.theme.id},[e("div",{staticClass:"theming__preview-image",style:{backgroundImage:"url("+t.img+")"},on:{click:t.onToggle}}),t._v(" "),e("div",{staticClass:"theming__preview-description"},[e("h3",[t._v(t._s(t.theme.title))]),t._v(" "),e("p",{staticClass:"theming__preview-explanation"},[t._v(t._s(t.theme.description))]),t._v(" "),t.enforced?e("span",{staticClass:"theming__preview-warning",attrs:{role:"note"}},[t._v("\n\t\t\t"+t._s(t.t("theming","Theme selection is enforced"))+"\n\t\t")]):t._e(),t._v(" "),e("NcCheckboxRadioSwitch",{staticClass:"theming__preview-toggle",attrs:{checked:t.checked,disabled:t.enforced,name:t.name,type:t.switchType},on:{"update:checked":function(e){t.checked=e}}},[t._v("\n\t\t\t"+t._s(t.theme.enableLabel)+"\n\t\t")])],1)])}),[],!1,null,"1a08e35a",null).exports,rt=n(25108);function nt(t){return nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nt(t)}function ot(){ot=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),u=new x(o||[]);return n(a,"_invoke",{value:_(t,r,u)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d={};function f(){}function h(){}function p(){}var g={};c(g,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==e&&r.call(v,i)&&(g=v);var b=p.prototype=f.prototype=Object.create(g);function y(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(n,i,a,u){var c=l(t[n],t,i);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==nt(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(d).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function _(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function w(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function it(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function at(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){it(i,n,o,a,u,"next",t)}function u(t){it(i,n,o,a,u,"throw",t)}a(void 0)}))}}function ut(t){return function(t){if(Array.isArray(t))return ct(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ct(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ct(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r")},guidelinesLink:function(){return''},descriptionDetail:function(){return t("theming","If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!").replace("{issuetracker}",this.issuetrackerLink).replace("{designteam}",this.designteamLink).replace(/\{linkend\}/g,"")},issuetrackerLink:function(){return''},designteamLink:function(){return''}},watch:{shortcutsDisabled:function(t){this.changeShortcutsDisabled(t)}},methods:{refreshGlobalStyles:function(){ut(document.head.querySelectorAll("link.theme")).forEach((function(t){var e=new URL(t.href);e.searchParams.set("v",Date.now());var r=t.cloneNode();r.href=e.toString(),r.onload=function(){return t.remove()},document.head.append(r)}))},updateBackground:function(t){this.background="custom"===t.type||"default"===t.type?t.type:t.value,this.refreshGlobalStyles()},changeTheme:function(t){var e=t.enabled,r=t.id;this.themes.forEach((function(t){t.id===r&&e?t.enabled=!0:t.enabled=!1})),this.updateBodyAttributes(),this.selectItem(e,r)},changeFont:function(t){var e=t.enabled,r=t.id;this.fonts.forEach((function(t){t.id===r&&e?t.enabled=!0:t.enabled=!1})),this.updateBodyAttributes(),this.selectItem(e,r)},changeShortcutsDisabled:function(t){return at(ot().mark((function e(){return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=5;break}return e.next=3,(0,s.Z)({url:(0,u.generateOcsUrl)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),data:{configValue:"yes"},method:"POST"});case 3:e.next=7;break;case 5:return e.next=7,(0,s.Z)({url:(0,u.generateOcsUrl)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),method:"DELETE"});case 7:case"end":return e.stop()}}),e)})))()},updateBodyAttributes:function(){var t=this.themes.filter((function(t){return!0===t.enabled})).map((function(t){return t.id})),e=this.fonts.filter((function(t){return!0===t.enabled})).map((function(t){return t.id}));this.themes.forEach((function(t){document.body.toggleAttribute("data-theme-".concat(t.id),t.enabled)})),this.fonts.forEach((function(t){document.body.toggleAttribute("data-theme-".concat(t.id),t.enabled)})),document.body.setAttribute("data-themes",[].concat(ut(t),ut(e)).join(","))},selectItem:function(e,r){return at(ot().mark((function n(){return ot().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,!e){n.next=6;break}return n.next=4,(0,s.Z)({url:(0,u.generateOcsUrl)("apps/theming/api/v1/theme/{themeId}/enable",{themeId:r}),method:"PUT"});case 4:n.next=8;break;case 6:return n.next=8,(0,s.Z)({url:(0,u.generateOcsUrl)("apps/theming/api/v1/theme/{themeId}",{themeId:r}),method:"DELETE"});case 8:n.next=14;break;case 10:n.prev=10,n.t0=n.catch(0),rt.error(n.t0,n.t0.response),OC.Notification.showTemporary(t("theming",n.t0.response.data.ocs.meta.message+". Unable to apply the setting."));case 14:case"end":return n.stop()}}),n,null,[[0,10]])})))()}}},pt=n(82599),gt={};gt.styleTagTransform=W(),gt.setAttributes=q(),gt.insert=U().bind(null,"head"),gt.domAPI=G(),gt.insertStyleElement=Z(),F()(pt.Z,gt),pt.Z&&pt.Z.locals&&pt.Z.locals;var mt=(0,_.Z)(ht,(function(){var t=this,e=t._self._c;return e("section",[e("NcSettingsSection",{staticClass:"theming",attrs:{name:t.t("theming","Appearance and accessibility"),"limit-width":!1}},[e("p",{domProps:{innerHTML:t._s(t.description)}}),t._v(" "),e("p",{domProps:{innerHTML:t._s(t.descriptionDetail)}}),t._v(" "),e("div",{staticClass:"theming__preview-list"},t._l(t.themes,(function(r){return e("ItemPreview",{key:r.id,attrs:{enforced:r.id===t.enforceTheme,selected:t.selectedTheme.id===r.id,theme:r,unique:1===t.themes.length,type:"theme"},on:{change:t.changeTheme}})})),1),t._v(" "),e("div",{staticClass:"theming__preview-list"},t._l(t.fonts,(function(r){return e("ItemPreview",{key:r.id,attrs:{selected:r.enabled,theme:r,unique:1===t.fonts.length,type:"font"},on:{change:t.changeFont}})})),1)]),t._v(" "),e("NcSettingsSection",{staticClass:"background",attrs:{name:t.t("theming","Background"),"data-user-theming-background-disabled":""}},[t.isUserThemingDisabled?[e("p",[t._v(t._s(t.t("theming","Customization has been disabled by your administrator")))])]:[e("p",[t._v(t._s(t.t("theming","Set a custom background")))]),t._v(" "),e("BackgroundSettings",{staticClass:"background__grid",on:{"update:background":t.refreshGlobalStyles}})]],2),t._v(" "),e("NcSettingsSection",{attrs:{name:t.t("theming","Keyboard shortcuts")}},[e("p",[t._v(t._s(t.t("theming","In some cases keyboard shortcuts can interfere with accessibility tools. In order to allow focusing on your tool correctly you can disable all keyboard shortcuts here. This will also disable all available shortcuts in apps.")))]),t._v(" "),e("NcCheckboxRadioSwitch",{staticClass:"theming__preview-toggle",attrs:{checked:t.shortcutsDisabled,name:"shortcuts_disabled",type:"switch"},on:{"update:checked":function(e){t.shortcutsDisabled=e},change:t.changeShortcutsDisabled}},[t._v("\n\t\t\t"+t._s(t.t("theming","Disable all keyboard shortcuts"))+"\n\t\t")])],1)],1)}),[],!1,null,"8a8d5388",null).exports;n.nc=btoa((0,o.IH)()),i.default.prototype.OC=OC,i.default.prototype.t=t;var vt=new(i.default.extend(mt));vt.$mount("#theming"),vt.$on("update:background",(function(){var t;(t=document.head.querySelectorAll("link.theme"),function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).forEach((function(t){var e=new URL(t.href);e.searchParams.set("v",Date.now());var r=t.cloneNode();r.href=e.toString(),r.onload=function(){return t.remove()},document.head.append(r)}))}))},82599:function(t,e,r){"use strict";var n=r(87537),o=r.n(n),i=r(23645),a=r.n(i)()(o());a.push([t.id,".theming p[data-v-8a8d5388]{max-width:800px}.theming[data-v-8a8d5388] a{font-weight:bold}.theming[data-v-8a8d5388] a:hover,.theming[data-v-8a8d5388] a:focus{text-decoration:underline}.theming__preview-list[data-v-8a8d5388]{--gap: 30px;display:grid;margin-top:var(--gap);column-gap:var(--gap);row-gap:var(--gap);grid-template-columns:1fr 1fr}.background__grid[data-v-8a8d5388]{margin-top:30px}@media(max-width: 1440px){.theming__preview-list[data-v-8a8d5388]{display:flex;flex-direction:column}}","",{version:3,sources:["webpack://./apps/theming/src/UserThemes.vue"],names:[],mappings:"AAGC,4BACC,eAAA,CAID,4BACC,gBAAA,CAEA,oEAEC,yBAAA,CAIF,wCACC,WAAA,CAEA,YAAA,CACA,qBAAA,CACA,qBAAA,CACA,kBAAA,CACA,6BAAA,CAKD,mCACC,eAAA,CAIF,0BACC,wCACC,YAAA,CACA,qBAAA,CAAA",sourcesContent:["\n.theming {\n\t// Limit width of settings sections for readability\n\tp {\n\t\tmax-width: 800px;\n\t}\n\n\t// Proper highlight for links and focus feedback\n\t&::v-deep a {\n\t\tfont-weight: bold;\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t}\n\n\t&__preview-list {\n\t\t--gap: 30px;\n\n\t\tdisplay: grid;\n\t\tmargin-top: var(--gap);\n\t\tcolumn-gap: var(--gap);\n\t\trow-gap: var(--gap);\n\t\tgrid-template-columns: 1fr 1fr;\n\t}\n}\n\n.background {\n\t&__grid {\n\t\tmargin-top: 30px;\n\t}\n}\n\n@media (max-width: 1440px) {\n\t.theming__preview-list {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n}\n"],sourceRoot:""}]),e.Z=a},28636:function(t,e,r){"use strict";var n=r(87537),o=r.n(n),i=r(23645),a=r.n(i)()(o());a.push([t.id,".background-selector[data-v-4e3fc802]{display:flex;flex-wrap:wrap;justify-content:center}.background-selector .background[data-v-4e3fc802]{overflow:hidden;width:176px;height:96px;margin:8px;text-align:center;border:2px solid var(--color-main-background);border-radius:var(--border-radius-large);background-position:center center;background-size:cover}.background-selector .background__filepicker.background--active[data-v-4e3fc802]{color:#fff;background-image:var(--image-background)}.background-selector .background__default[data-v-4e3fc802]{background-color:var(--color-primary-default);background-image:linear-gradient(to bottom, rgba(23, 23, 23, 0.5), rgba(23, 23, 23, 0.5)),var(--image-background-plain, var(--image-background-default))}.background-selector .background__filepicker[data-v-4e3fc802],.background-selector .background__default[data-v-4e3fc802],.background-selector .background__color[data-v-4e3fc802]{border-color:var(--color-border)}.background-selector .background__color[data-v-4e3fc802]{color:var(--color-primary-text);background-color:var(--color-primary-default)}.background-selector .background__default[data-v-4e3fc802],.background-selector .background__shipped[data-v-4e3fc802]{color:#fff}.background-selector .background[data-color-bright][data-v-4e3fc802]{color:#000}.background-selector .background--active[data-v-4e3fc802],.background-selector .background[data-v-4e3fc802]:hover,.background-selector .background[data-v-4e3fc802]:focus{border:2px solid var(--border-color, var(--color-primary-element)) !important}.background-selector .background span[data-v-4e3fc802]{margin:4px}.background-selector .background .check-icon[data-v-4e3fc802]{display:none}.background-selector .background--active:not(.icon-loading) .check-icon[data-v-4e3fc802]{display:block !important}","",{version:3,sources:["webpack://./apps/theming/src/components/BackgroundSettings.vue"],names:[],mappings:"AACA,sCACC,YAAA,CACA,cAAA,CACA,sBAAA,CAEA,kDACC,eAAA,CACA,WAAA,CACA,WAAA,CACA,UAAA,CACA,iBAAA,CACA,6CAAA,CACA,wCAAA,CACA,iCAAA,CACA,qBAAA,CAGC,iFACC,UAAA,CACA,wCAAA,CAIF,2DACC,6CAAA,CACA,wJAAA,CAGD,kLACC,gCAAA,CAGD,yDACC,+BAAA,CACA,6CAAA,CAID,sHAEC,UAAA,CAID,qEACC,UAAA,CAGD,0KAIC,6EAAA,CAID,uDACC,UAAA,CAGD,8DACC,YAAA,CAIA,yFAEC,wBAAA",sourcesContent:["\n.background-selector {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjustify-content: center;\n\n\t.background {\n\t\toverflow: hidden;\n\t\twidth: 176px;\n\t\theight: 96px;\n\t\tmargin: 8px;\n\t\ttext-align: center;\n\t\tborder: 2px solid var(--color-main-background);\n\t\tborder-radius: var(--border-radius-large);\n\t\tbackground-position: center center;\n\t\tbackground-size: cover;\n\n\t\t&__filepicker {\n\t\t\t&.background--active {\n\t\t\t\tcolor: white;\n\t\t\t\tbackground-image: var(--image-background);\n\t\t\t}\n\t\t}\n\n\t\t&__default {\n\t\t\tbackground-color: var(--color-primary-default);\n\t\t\tbackground-image: linear-gradient(to bottom, rgba(23, 23, 23, 0.5), rgba(23, 23, 23, 0.5)), var(--image-background-plain, var(--image-background-default));\n\t\t}\n\n\t\t&__filepicker, &__default, &__color {\n\t\t\tborder-color: var(--color-border);\n\t\t}\n\n\t\t&__color {\n\t\t\tcolor: var(--color-primary-text);\n\t\t\tbackground-color: var(--color-primary-default);\n\t\t}\n\n\t\t// Over a background image\n\t\t&__default,\n\t\t&__shipped {\n\t\t\tcolor: white;\n\t\t}\n\n\t\t// Text and svg icon dark on bright background\n\t\t&[data-color-bright] {\n\t\t\tcolor: black;\n\t\t}\n\n\t\t&--active,\n\t\t&:hover,\n\t\t&:focus {\n\t\t\t// Use theme color primary, see inline css variable in template\n\t\t\tborder: 2px solid var(--border-color, var(--color-primary-element)) !important;\n\t\t}\n\n\t\t// Icon\n\t\tspan {\n\t\t\tmargin: 4px;\n\t\t}\n\n\t\t.check-icon {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t&--active:not(.icon-loading) {\n\t\t\t.check-icon {\n\t\t\t\t// Show checkmark\n\t\t\t\tdisplay: block !important;\n\t\t\t}\n\t\t}\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},22465:function(t,e,r){"use strict";var n=r(87537),o=r.n(n),i=r(23645),a=r.n(i)()(o());a.push([t.id,".theming__preview[data-v-1a08e35a]{--ratio: 16;position:relative;display:flex;justify-content:flex-start;max-width:800px}.theming__preview[data-v-1a08e35a],.theming__preview *[data-v-1a08e35a]{user-select:none}.theming__preview-image[data-v-1a08e35a]{flex-basis:calc(16px*var(--ratio));flex-shrink:0;height:calc(10px*var(--ratio));margin-right:var(--gap);cursor:pointer;border-radius:var(--border-radius);background-repeat:no-repeat;background-position:top left;background-size:cover}.theming__preview-explanation[data-v-1a08e35a]{margin-bottom:10px}.theming__preview-description[data-v-1a08e35a]{display:flex;flex-direction:column}.theming__preview-description h3[data-v-1a08e35a]{font-weight:bold;margin-bottom:0}.theming__preview-description label[data-v-1a08e35a]{padding:12px 0}.theming__preview--default[data-v-1a08e35a]{grid-column:span 2}.theming__preview-warning[data-v-1a08e35a]{color:var(--color-warning)}@media(max-width: 682.6666666667px){.theming__preview[data-v-1a08e35a]{flex-direction:column}.theming__preview-image[data-v-1a08e35a]{margin:0}}","",{version:3,sources:["webpack://./apps/theming/src/components/ItemPreview.vue"],names:[],mappings:"AAGA,mCAEC,WAAA,CAEA,iBAAA,CACA,YAAA,CACA,0BAAA,CACA,eAAA,CAEA,wEAEC,gBAAA,CAGD,yCACC,kCAAA,CACA,aAAA,CACA,8BAAA,CACA,uBAAA,CACA,cAAA,CACA,kCAAA,CACA,2BAAA,CACA,4BAAA,CACA,qBAAA,CAGD,+CACC,kBAAA,CAGD,+CACC,YAAA,CACA,qBAAA,CAEA,kDACC,gBAAA,CACA,eAAA,CAGD,qDACC,cAAA,CAIF,4CACC,kBAAA,CAGD,2CACC,0BAAA,CAIF,oCACC,mCACC,qBAAA,CAEA,yCACC,QAAA,CAAA",sourcesContent:["\n@use 'sass:math';\n\n.theming__preview {\n\t// We make previews on 16/10 screens\n\t--ratio: 16;\n\n\tposition: relative;\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\tmax-width: 800px;\n\n\t&,\n\t* {\n\t\tuser-select: none;\n\t}\n\n\t&-image {\n\t\tflex-basis: calc(16px * var(--ratio));\n\t\tflex-shrink: 0;\n\t\theight: calc(10px * var(--ratio));\n\t\tmargin-right: var(--gap);\n\t\tcursor: pointer;\n\t\tborder-radius: var(--border-radius);\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: top left;\n\t\tbackground-size: cover;\n\t}\n\n\t&-explanation {\n\t\tmargin-bottom: 10px;\n\t}\n\n\t&-description {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3 {\n\t\t\tfont-weight: bold;\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tlabel {\n\t\t\tpadding: 12px 0;\n\t\t}\n\t}\n\n\t&--default {\n\t\tgrid-column: span 2;\n\t}\n\n\t&-warning {\n\t\tcolor: var(--color-warning);\n\t}\n}\n\n@media (max-width: math.div(1024px, 1.5)) {\n\t.theming__preview {\n\t\tflex-direction: column;\n\n\t\t&-image {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},89881:function(t,e,r){var n=r(47816),o=r(99291)(n);t.exports=o},80760:function(t,e,r){var n=r(89881);t.exports=function(t,e){var r=[];return n(t,(function(t,n,o){e(t,n,o)&&r.push(t)})),r}},47816:function(t,e,r){var n=r(28483),o=r(3674);t.exports=function(t,e){return t&&n(t,e,o)}},99291:function(t,e,r){var n=r(98612);t.exports=function(t,e){return function(r,o){if(null==r)return r;if(!n(r))return t(r,o);for(var i=r.length,a=e?i:-1,u=Object(r);(e?a--:++a2?e[2]:void 0;for(s&&i(e[0],e[1],s)&&(n=1);++r0&&this._opts.filters.splice(e),this},t.prototype.clearFilters=function(){return this._opts.filters=[],this},t.prototype.quality=function(t){return this._opts.quality=t,this},t.prototype.useImageClass=function(t){return this._opts.ImageClass=t,this},t.prototype.useGenerator=function(t){return this._opts.generator=t,this},t.prototype.useQuantizer=function(t){return this._opts.quantizer=t,this},t.prototype.build=function(){return new o.default(this._src,this._opts)},t.prototype.getPalette=function(t){return this.build().getPalette(t)},t.prototype.getSwatches=function(t){return this.build().getPalette(t)},t}();e.default=a},97248:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Swatch=void 0;var n=r(67294),o=r(63105),i=function(){function t(t,e){this._rgb=t,this._population=e}return t.applyFilter=function(t,e){return"function"==typeof e?o(t,(function(t){var r=t.r,n=t.g,o=t.b;return e(r,n,o,255)})):t},Object.defineProperty(t.prototype,"r",{get:function(){return this._rgb[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this._rgb[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this._rgb[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgb",{get:function(){return this._rgb},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hsl",{get:function(){if(!this._hsl){var t=this._rgb,e=t[0],r=t[1],o=t[2];this._hsl=n.rgbToHsl(e,r,o)}return this._hsl},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hex",{get:function(){if(!this._hex){var t=this._rgb,e=t[0],r=t[1],o=t[2];this._hex=n.rgbToHex(e,r,o)}return this._hex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"population",{get:function(){return this._population},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return{rgb:this.rgb,population:this.population}},t.prototype.getRgb=function(){return this._rgb},t.prototype.getHsl=function(){return this.hsl},t.prototype.getPopulation=function(){return this._population},t.prototype.getHex=function(){return this.hex},t.prototype.getYiq=function(){if(!this._yiq){var t=this._rgb;this._yiq=(299*t[0]+587*t[1]+114*t[2])/1e3}return this._yiq},Object.defineProperty(t.prototype,"titleTextColor",{get:function(){return this._titleTextColor||(this._titleTextColor=this.getYiq()<200?"#fff":"#000"),this._titleTextColor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bodyTextColor",{get:function(){return this._bodyTextColor||(this._bodyTextColor=this.getYiq()<150?"#fff":"#000"),this._bodyTextColor},enumerable:!1,configurable:!0}),t.prototype.getTitleTextColor=function(){return this.titleTextColor},t.prototype.getBodyTextColor=function(){return this.bodyTextColor},t}();e.Swatch=i},68498:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,n){return n>=125&&!(t>250&&e>250&&r>250)}},63096:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineFilters=void 0;var n=r(68498);Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return n.default}}),e.combineFilters=function(t){return Array.isArray(t)&&0!==t.length?function(e,r,n,o){if(0===o)return!1;for(var i=0;i=u&&h<=c&&p>=o&&p<=i&&!function(t,e){return t.Vibrant===e||t.DarkVibrant===e||t.LightVibrant===e||t.Muted===e||t.DarkMuted===e||t.LightMuted===e}(t,e)){var g=function(t,e,r,n,o,i,a){function u(t,e){return 1-Math.abs(t-e)}return function(){for(var t=[],e=0;ed)&&(l=e,d=g)}})),l}e.default=function(t,e){e=i({},e,a);var r=function(t){var e=0;return t.forEach((function(t){e=Math.max(e,t.getPopulation())})),e}(t),c=function(t,e,r){var n={};return n.Vibrant=u(n,t,e,r.targetNormalLuma,r.minNormalLuma,r.maxNormalLuma,r.targetVibrantSaturation,r.minVibrantSaturation,1,r),n.LightVibrant=u(n,t,e,r.targetLightLuma,r.minLightLuma,1,r.targetVibrantSaturation,r.minVibrantSaturation,1,r),n.DarkVibrant=u(n,t,e,r.targetDarkLuma,0,r.maxDarkLuma,r.targetVibrantSaturation,r.minVibrantSaturation,1,r),n.Muted=u(n,t,e,r.targetNormalLuma,r.minNormalLuma,r.maxNormalLuma,r.targetMutesSaturation,0,r.maxMutesSaturation,r),n.LightMuted=u(n,t,e,r.targetLightLuma,r.minLightLuma,1,r.targetMutesSaturation,0,r.maxMutesSaturation,r),n.DarkMuted=u(n,t,e,r.targetDarkLuma,0,r.maxDarkLuma,r.targetMutesSaturation,0,r.maxMutesSaturation,r),n}(t,r,e);return function(t,e,r){if(null===t.Vibrant&&null===t.DarkVibrant&&null===t.LightVibrant){if(null===t.DarkVibrant&&null!==t.DarkMuted){var i=t.DarkMuted.getHsl(),a=i[0],u=i[1],c=i[2];c=r.targetDarkLuma,t.DarkVibrant=new n.Swatch(o.hslToRgb(a,u,c),0)}if(null===t.LightVibrant&&null!==t.LightMuted){var s=t.LightMuted.getHsl();a=s[0],u=s[1],c=s[2],c=r.targetDarkLuma,t.DarkVibrant=new n.Swatch(o.hslToRgb(a,u,c),0)}}if(null===t.Vibrant&&null!==t.DarkVibrant){var l=t.DarkVibrant.getHsl();a=l[0],u=l[1],c=l[2],c=r.targetNormalLuma,t.Vibrant=new n.Swatch(o.hslToRgb(a,u,c),0)}else if(null===t.Vibrant&&null!==t.LightVibrant){var d=t.LightVibrant.getHsl();a=d[0],u=d[1],c=d[2],c=r.targetNormalLuma,t.Vibrant=new n.Swatch(o.hslToRgb(a,u,c),0)}if(null===t.DarkVibrant&&null!==t.Vibrant){var f=t.Vibrant.getHsl();a=f[0],u=f[1],c=f[2],c=r.targetDarkLuma,t.DarkVibrant=new n.Swatch(o.hslToRgb(a,u,c),0)}if(null===t.LightVibrant&&null!==t.Vibrant){var h=t.Vibrant.getHsl();a=h[0],u=h[1],c=h[2],c=r.targetLightLuma,t.LightVibrant=new n.Swatch(o.hslToRgb(a,u,c),0)}if(null===t.Muted&&null!==t.Vibrant){var p=t.Vibrant.getHsl();a=p[0],u=p[1],c=p[2],c=r.targetMutesSaturation,t.Muted=new n.Swatch(o.hslToRgb(a,u,c),0)}if(null===t.DarkMuted&&null!==t.DarkVibrant){var g=t.DarkVibrant.getHsl();a=g[0],u=g[1],c=g[2],c=r.targetMutesSaturation,t.DarkMuted=new n.Swatch(o.hslToRgb(a,u,c),0)}if(null===t.LightMuted&&null!==t.LightVibrant){var m=t.LightVibrant.getHsl();a=m[0],u=m[1],c=m[2],c=r.targetMutesSaturation,t.LightMuted=new n.Swatch(o.hslToRgb(a,u,c),0)}}(c,0,e),c}},77234:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(73977);Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return n.default}})},83614:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImageBase=void 0;var r=function(){function t(){}return t.prototype.scaleDown=function(t){var e=this.getWidth(),r=this.getHeight(),n=1;if(t.maxDimension>0){var o=Math.max(e,r);o>t.maxDimension&&(n=t.maxDimension/o)}else n=1/t.quality;n<1&&this.resize(e*n,r*n,n)},t.prototype.applyFilter=function(t){var e=this.getImageData();if("function"==typeof t)for(var r=e.data,n=r.length/4,o=void 0,i=0;i0))break;var o=n.split(),i=o[0],a=o[1];if(t.push(i),a&&a.count()>0&&t.push(a),t.size()===r)break;r=t.size()}}e.default=function(t,e){if(0===t.length||e.colorCount<2||e.colorCount>256)throw new Error("Wrong MMCQ parameters");var r=i.default.build(t),n=r.hist,c=(Object.keys(n).length,new a.default((function(t,e){return t.count()-e.count()})));c.push(r),u(c,.75*e.colorCount);var s=new a.default((function(t,e){return t.count()*t.volume()-e.count()*e.volume()}));return s.contents=c.contents,u(s,e.colorCount-s.size()),function(t){for(var e=[];t.size();){var r=t.pop(),n=r.avg();n[0],n[1],n[2],e.push(new o.Swatch(n,r.count()))}return e}(s)}},37514:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this._comparator=t,this.contents=[],this._sorted=!1}return t.prototype._sort=function(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)},t.prototype.push=function(t){this.contents.push(t),this._sorted=!1},t.prototype.peek=function(t){return this._sort(),t="number"==typeof t?t:this.contents.length-1,this.contents[t]},t.prototype.pop=function(){return this._sort(),this.contents.pop()},t.prototype.size=function(){return this.contents.length},t.prototype.map=function(t){return this._sort(),this.contents.map(t)},t}();e.default=r},5828:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(67294),o=function(){function t(t,e,r,n,o,i,a){this._volume=-1,this._count=-1,this.dimension={r1:t,r2:e,g1:r,g2:n,b1:o,b2:i},this.hist=a}return t.build=function(e,r){var o,i,a,u,c,s,l,d,f,h=1<<3*n.SIGBITS,p=new Uint32Array(h);o=a=c=0,i=u=s=Number.MAX_VALUE;for(var g=e.length/4,m=0;m>=n.RSHIFT,d>>=n.RSHIFT,f>>=n.RSHIFT,p[n.getColorIndex(l,d,f)]+=1,l>o&&(o=l),la&&(a=d),dc&&(c=f),f>=n.RSHIFT,r>>=n.RSHIFT,o>>=n.RSHIFT,e>=a&&e<=u&&r>=c&&r<=s&&o>=l&&o<=d},t.prototype.split=function(){var t=this.hist,e=this.dimension,r=e.r1,o=e.r2,i=e.g1,a=e.g2,u=e.b1,c=e.b2,s=this.count();if(!s)return[];if(1===s)return[this.clone()];var l,d,f=o-r+1,h=a-i+1,p=c-u+1,g=Math.max(f,h,p),m=null;l=d=0;var v=null;if(g===f){v="r",m=new Uint32Array(o+1);for(var b=r;b<=o;b++){l=0;for(var y=i;y<=a;y++)for(var A=u;A<=c;A++)l+=t[n.getColorIndex(b,y,A)];d+=l,m[b]=d}}else if(g===h)for(v="g",m=new Uint32Array(a+1),y=i;y<=a;y++){for(l=0,b=r;b<=o;b++)for(A=u;A<=c;A++)l+=t[n.getColorIndex(b,y,A)];d+=l,m[y]=d}else for(v="b",m=new Uint32Array(c+1),A=u;A<=c;A++){for(l=0,b=r;b<=o;b++)for(y=i;y<=a;y++)l+=t[n.getColorIndex(b,y,A)];d+=l,m[A]=d}for(var _=-1,w=new Uint32Array(m.length),k=0;kd/2&&(_=k),w[k]=d-C}var x=this;return function(t){var e=t+"1",r=t+"2",n=x.dimension[e],o=x.dimension[r],i=x.clone(),a=x.clone(),u=_-n,c=o-_;for(u<=c?(o=Math.min(o-1,~~(_+c/2)),o=Math.max(0,o)):(o=Math.max(n,~~(_-1-u/2)),o=Math.min(x.dimension[r],o));!m[o];)o++;for(var s=w[o];!s&&m[o-1];)s=w[--o];return i.dimension[r]=o,a.dimension[e]=o+1,[i,a]}(v)},t}();e.default=o},67294:function(t,e){"use strict";function r(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return null===e?null:[e[1],e[2],e[3]].map((function(t){return parseInt(t,16)}))}function n(t,e,r){return e/=255,r/=255,t=(t/=255)>.04045?Math.pow((t+.005)/1.055,2.4):t/12.92,e=e>.04045?Math.pow((e+.005)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.005)/1.055,2.4):r/12.92,[.4124*(t*=100)+.3576*(e*=100)+.1805*(r*=100),.2126*t+.7152*e+.0722*r,.0193*t+.1192*e+.9505*r]}function o(t,e,r){return e/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(e=e>.008856?Math.pow(e,1/3):7.787*e+16/116)-16,500*(t-e),200*(e-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]}function i(t,e,r){var i=n(t,e,r);return o(i[0],i[1],i[2])}function a(t,e){var r=t[0],n=t[1],o=t[2],i=e[0],a=e[1],u=e[2],c=r-i,s=n-a,l=o-u,d=Math.sqrt(n*n+o*o),f=i-r,h=Math.sqrt(a*a+u*u)-d,p=Math.sqrt(c*c+s*s+l*l),g=Math.sqrt(p)>Math.sqrt(Math.abs(f))+Math.sqrt(Math.abs(h))?Math.sqrt(p*p-f*f-h*h):0;return f/=1,h/=1*(1+.045*d),g/=1*(1+.015*d),Math.sqrt(f*f+h*h+g*g)}function u(t,e){return a(i.apply(void 0,t),i.apply(void 0,e))}Object.defineProperty(e,"__esModule",{value:!0}),e.getColorIndex=e.getColorDiffStatus=e.hexDiff=e.rgbDiff=e.deltaE94=e.rgbToCIELab=e.xyzToCIELab=e.rgbToXyz=e.hslToRgb=e.rgbToHsl=e.rgbToHex=e.hexToRgb=e.defer=e.RSHIFT=e.SIGBITS=e.DELTAE94_DIFF_STATUS=void 0,e.DELTAE94_DIFF_STATUS={NA:0,PERFECT:1,CLOSE:2,GOOD:10,SIMILAR:50},e.SIGBITS=5,e.RSHIFT=8-e.SIGBITS,e.defer=function(){var t,e,r=new Promise((function(r,n){t=r,e=n}));return{resolve:t,reject:e,promise:r}},e.hexToRgb=r,e.rgbToHex=function(t,e,r){return"#"+((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1,7)},e.rgbToHsl=function(t,e,r){t/=255,e/=255,r/=255;var n,o,i=Math.max(t,e,r),a=Math.min(t,e,r),u=(i+a)/2;if(i===a)n=o=0;else{var c=i-a;switch(o=u>.5?c/(2-i-a):c/(i+a),i){case t:n=(e-r)/c+(e1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(0===e)n=o=i=r;else{var u=r<.5?r*(1+e):r+e-r*e,c=2*r-u;n=a(c,u,t+1/3),o=a(c,u,t),i=a(c,u,t-1/3)}return[255*n,255*o,255*i]},e.rgbToXyz=n,e.xyzToCIELab=o,e.rgbToCIELab=i,e.deltaE94=a,e.rgbDiff=u,e.hexDiff=function(t,e){return u(r(t),r(e))},e.getColorDiffStatus=function(t){return t=o)&&Object.keys(a.O).every((function(t){return a.O[t](r[c])}))?r.splice(c--,1):(u=!1,o0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[r,n,o]},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.f={},a.e=function(t){return Promise.all(Object.keys(a.f).reduce((function(e,r){return a.f[r](t,e),e}),[]))},a.u=function(t){return t+"-"+t+".js?v=9712b63e6d8aa316e55f"},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r={},n="nextcloud:",a.l=function(t,e,o,i){if(r[t])r[t].push(e);else{var u,c;if(void 0!==o)for(var s=document.getElementsByTagName("script"),l=0;l-1&&!t;)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t}(),function(){a.b=document.baseURI||self.location.href;var t={1474:0};a.f.j=function(e,r){var n=a.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise((function(r,o){n=t[e]=[r,o]}));r.push(n[2]=o);var i=a.p+a.u(e),u=new Error;a.l(i,(function(r){if(a.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;u.message="Loading chunk "+e+" failed.\n("+o+": "+i+")",u.name="ChunkLoadError",u.type=o,u.request=i,n[1](u)}}),"chunk-"+e,e)}},a.O.j=function(e){return 0===t[e]};var e=function(e,r){var n,o,i=r[0],u=r[1],c=r[2],s=0;if(i.some((function(e){return 0!==t[e]}))){for(n in u)a.o(u,n)&&(a.m[n]=u[n]);if(c)var l=c(a)}for(e&&e(r);s