(()=>{var e,r,n,o={10340:(e,r,n)=>{"use strict";var o=n(21777),a=n(85471);async function i(){const t=[...document.head.querySelectorAll("link.theme")].map((t=>new Promise((e=>{const r=new URL(t.href);r.searchParams.set("v",Date.now());const n=t.cloneNode();n.href=r.toString(),n.onload=()=>{t.remove(),e()},document.head.append(n)}))));await Promise.allSettled(t)}var s=n(63814),l=n(32981),c=n(65043),u=n(32073),d=n(88837),p=n(85168),h=(n(93525),n(17334)),g=n.n(h),f=n(63536),m=n(64866),v=n.n(m),b=n(85338);const A={name:"ImageEditIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var y=n(14486);const C=(0,y.A)(A,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon image-edit-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M22.7 14.3L21.7 15.3L19.7 13.3L20.7 12.3C20.8 12.2 20.9 12.1 21.1 12.1C21.2 12.1 21.4 12.2 21.5 12.3L22.8 13.6C22.9 13.8 22.9 14.1 22.7 14.3M13 19.9V22H15.1L21.2 15.9L19.2 13.9L13 19.9M21 5C21 3.9 20.1 3 19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H11V19.1L12.1 18H5L8.5 13.5L11 16.5L14.5 12L16.1 14.1L21 9.1V5Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,_={name:"PaletteIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},w=(0,y.A)(_,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon palette-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,k=(0,l.C)("theming","shippedBackgrounds"),x=(0,l.C)("theming","userBackgroundImage"),{backgroundImage:S,backgroundMime:D,defaultShippedBackground:T}=(0,l.C)("theming","themingDefaults"),E=t=>(0,s.fg)("theming","","img/background/")+t,I={name:"BackgroundSettings",components:{Check:b.A,ColorPalette:w,ImageEdit:C,NcColorPicker:f.N},data:()=>({loading:!1,Theming:(0,l.C)("theming","data",{}),backgroundImage:x}),computed:{shippedBackgrounds(){return Object.keys(k).filter((t=>t!==T||!this.isGlobalBackgroundDefault)).map((t=>({name:t,url:E(t),preview:E("preview/"+t),details:k[t]})))},isGlobalBackgroundDefault:()=>""===D,isGlobalBackgroundDeleted:()=>"backgroundColor"===D,cssDefaultBackgroundImage:()=>`url('${S}')`},methods:{invertTextColor(t){return this.calculateLuma(t)>.6},calculateLuma(t){const[e,r,n]=this.hexToRGB(t);return(.2126*e+.7152*r+.0722*n)/255},hexToRGB(t){const 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},async update(t){this.backgroundImage=t.backgroundImage,this.Theming.backgroundColor=t.backgroundColor,this.$emit("update:background"),this.loading=!1},async setDefault(){this.loading="default";const t=await c.Ay.post((0,s.Jv)("/apps/theming/background/default"));this.update(t.data)},async setShipped(t){this.loading=t;const e=await c.Ay.post((0,s.Jv)("/apps/theming/background/shipped"),{value:t});this.update(e.data)},async setFile(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.loading="custom";const r=await c.Ay.post((0,s.Jv)("/apps/theming/background/custom"),{value:t,color:e});this.update(r.data)},async removeBackground(){this.loading="remove";const t=await c.Ay.delete((0,s.Jv)("/apps/theming/background/custom"));this.update(t.data)},async pickColor(t){this.loading="color";const{data:e}=await c.Ay.post((0,s.Jv)("/apps/theming/background/color"),{color:t||"#0082c9"});this.update(e)},debouncePickColor:g()((function(){this.pickColor(...arguments)}),200),pickFile(){(0,p.a1)(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:t=>{this.applyFile(t[0]?.path)},type:"primary"}).build().pick()},async applyFile(e){if(!e||"string"!=typeof e||0===e.trim().length||"/"===e)return console.error("No valid background have been selected",{path:e}),void(0,p.Qg)(t("theming","No background has been selected"));this.loading="custom";let r=null,n=null;try{const t=(0,s.dC)("dav/files/"+(0,o.HW)().uid+e);r=await c.Ay.get(t,{responseType:"blob"});const a=URL.createObjectURL(r.data),i=await this.getColorPaletteFromBlob(a);n=i?.DarkVibrant?.hex,this.setFile(e,n),console.debug("Extracted colour",n,"from custom image",e,i)}catch(t){this.setFile(e),console.error("Unable to extract colour from custom image",{error:t,path:e,response:r,color:n})}},getColorPaletteFromBlob:t=>new Promise(((e,r)=>{new(v())(t).getPalette(((t,n)=>{t&&r(t),e(n)}))}))}},M=()=>{(0,a.$9)(((t,e)=>({d4172c58:t.cssDefaultBackgroundImage})))},O=I.setup;I.setup=O?(t,e)=>(M(),O(t,e)):M;const P=I;var N=n(85072),L=n.n(N),B=n(97825),F=n.n(B),R=n(77659),j=n.n(R),H=n(55056),U=n.n(H),V=n(10540),z=n.n(V),Y=n(41113),q=n.n(Y),G=n(19454),W={};W.styleTagTransform=q(),W.setAttributes=U(),W.insert=j().bind(null,"head"),W.domAPI=F(),W.insertStyleElement=z(),L()(G.A,W),G.A&&G.A.locals&&G.A.locals;const $=(0,y.A)(P,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"background-selector",attrs:{"data-user-theming-background-settings":""}},[e("button",{class:{"icon-loading":"custom"===t.loading,"background background__filepicker":!0,"background--active":"custom"===t.backgroundImage},attrs:{"aria-pressed":"custom"===t.backgroundImage,"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:20}}):t._e(),t._v(" "),e("Check",{attrs:{size:44}})],1),t._v(" "),e("NcColorPicker",{on:{"update:value":t.debouncePickColor},model:{value:t.Theming.backgroundColor,callback:function(e){t.$set(t.Theming,"backgroundColor",e)},expression:"Theming.backgroundColor"}},[e("button",{class:{"icon-loading":"color"===t.loading,"background background__color":!0,"background--active":"color"===t.backgroundImage},style:{backgroundColor:t.Theming.backgroundColor,"--border-color":t.Theming.backgroundColor},attrs:{"aria-pressed":"color"===t.backgroundImage,"data-color":t.Theming.backgroundColor,"data-color-bright":t.invertTextColor(t.Theming.backgroundColor),"data-user-theming-background-color":"",tabindex:"0"},on:{click:function(e){"color"!==t.backgroundImage&&t.debouncePickColor(t.Theming.backgroundColor)}}},[t._v("\n\t\t\t"+t._s(t.t("theming","Plain background"))+"\n\t\t\t"),"color"!==t.backgroundImage?e("ColorPalette",{attrs:{size:20}}):t._e(),t._v(" "),e("Check",{attrs:{size:44}})],1)]),t._v(" "),e("button",{class:{"icon-loading":"default"===t.loading,"background background__default":!0,"background--active":"default"===t.backgroundImage},style:{"--border-color":t.Theming.defaultBackgroundColor},attrs:{"aria-pressed":"default"===t.backgroundImage,"data-color-bright":t.invertTextColor(t.Theming.defaultBackgroundColor),"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(" "),t._l(t.shippedBackgrounds,(function(r){return e("button",{key:r.name,class:{"background background__shipped":!0,"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.description,"aria-pressed":t.backgroundImage===r.name,"data-color-bright":t.invertTextColor(r.details.background_color),"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,"5e1df51d",null).exports,X={name:"ItemPreview",components:{NcCheckboxRadioSwitch:u.A},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(){return this.unique?"switch":"radio"},name(){return this.unique?null:this.type},img(){return(0,s.fg)("theming","img",this.theme.id+".jpg")},checked:{get(){return this.selected},set(t){this.enforced||(console.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(){this.enforced||("radio"!==this.switchType?this.checked=!this.checked:this.checked=!0)}}};var K=n(83685),Q={};Q.styleTagTransform=q(),Q.setAttributes=U(),Q.insert=j().bind(null,"head"),Q.domAPI=F(),Q.insertStyleElement=z(),L()(K.A,Q),K.A&&K.A.locals&&K.A.locals;const J=(0,y.A)(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("\n\t\t\t"+t._s(t.theme.description)+"\n\t\t")]),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",{directives:[{name:"show",rawName:"v-show",value:!t.enforced,expression:"!enforced"}],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,"e3bab014",null).exports;var Z=n(53334),tt=n(13073),et=n(59271);function rt(t){return rt="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},rt(t)}function nt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ot(){return ot=Object.assign||function(t){for(var e=1;e"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function vt(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function bt(t,e,r,n){if(t){r=r||document;do{if(null!=e&&(">"===e[0]?t.parentNode===r&&mt(t,e):mt(t,e))||n&&t===r)return t;if(t===r)break}while(t=vt(t))}return null}var At,yt=/\s+/g;function Ct(t,e,r){if(t&&e)if(t.classList)t.classList[r?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(yt," ").replace(" "+e+" "," ");t.className=(n+(r?" "+e:"")).replace(yt," ")}}function _t(t,e,r){var n=t&&t.style;if(n){if(void 0===r)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(r=t.currentStyle),void 0===e?r:r[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=r+("string"==typeof r?"":"px")}}function wt(t,e){var r="";if("string"==typeof t)r=t;else do{var n=_t(t,"transform");n&&"none"!==n&&(r=n+" "+r)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(r)}function kt(t,e,r){if(t){var n=t.getElementsByTagName(e),o=0,a=n.length;if(r)for(;o=a:o<=a))return n;if(n===xt())break;n=Ot(n,!1)}return!1}function Tt(t,e,r){for(var n=0,o=0,a=t.children;o2&&void 0!==arguments[2]?arguments[2]:{},n=r.evt,o=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(r,["evt"]);Ht.pluginEvent.bind(Pe)(t,e,at({dragEl:zt,parentEl:Yt,ghostEl:qt,rootEl:Gt,nextEl:Wt,lastDownEl:$t,cloneEl:Xt,cloneHidden:Kt,dragStarted:ce,putSortable:re,activeSortable:Pe.active,originalEvent:n,oldIndex:Qt,oldDraggableIndex:Zt,newIndex:Jt,newDraggableIndex:te,hideGhostForTarget:Ee,unhideGhostForTarget:Ie,cloneNowHidden:function(){Kt=!0},cloneNowShown:function(){Kt=!1},dispatchSortableEvent:function(t){Vt({sortable:e,name:t,originalEvent:n})}},o))};function Vt(t){!function(t){var e=t.sortable,r=t.rootEl,n=t.name,o=t.targetEl,a=t.cloneEl,i=t.toEl,s=t.fromEl,l=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,p=t.originalEvent,h=t.putSortable,g=t.extraEventProperties;if(e=e||r&&r[Ft]){var f,m=e.options,v="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||st||lt?(f=document.createEvent("Event")).initEvent(n,!0,!0):f=new CustomEvent(n,{bubbles:!0,cancelable:!0}),f.to=i||r,f.from=s||r,f.item=o||r,f.clone=a,f.oldIndex=l,f.newIndex=c,f.oldDraggableIndex=u,f.newDraggableIndex=d,f.originalEvent=p,f.pullMode=h?h.lastPutMode:void 0;var b=at({},g,Ht.getEventProperties(n,e));for(var A in b)f[A]=b[A];r&&r.dispatchEvent(f),m[v]&&m[v].call(e,f)}}(at({putSortable:re,cloneEl:Xt,targetEl:zt,rootEl:Gt,oldIndex:Qt,oldDraggableIndex:Zt,newIndex:Jt,newDraggableIndex:te},t))}var zt,Yt,qt,Gt,Wt,$t,Xt,Kt,Qt,Jt,Zt,te,ee,re,ne,oe,ae,ie,se,le,ce,ue,de,pe,he,ge=!1,fe=!1,me=[],ve=!1,be=!1,Ae=[],ye=!1,Ce=[],_e="undefined"!=typeof document,we=dt,ke=lt||st?"cssFloat":"float",xe=_e&&!pt&&!dt&&"draggable"in document.createElement("div"),Se=function(){if(_e){if(st)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),De=function(t,e){var r=_t(t),n=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=Tt(t,0,e),a=Tt(t,1,e),i=o&&_t(o),s=a&&_t(a),l=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+St(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+St(a).width;if("flex"===r.display)return"column"===r.flexDirection||"column-reverse"===r.flexDirection?"vertical":"horizontal";if("grid"===r.display)return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!a||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return o&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||l>=n&&"none"===r[ke]||a&&"none"===r[ke]&&l+c>n)?"vertical":"horizontal"},Te=function(t){function e(t,r){return function(n,o,a,i){var s=n.options.group.name&&o.options.group.name&&n.options.group.name===o.options.group.name;if(null==t&&(r||s))return!0;if(null==t||!1===t)return!1;if(r&&"clone"===t)return t;if("function"==typeof t)return e(t(n,o,a,i),r)(n,o,a,i);var l=(r?n:o).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var r={},n=t.group;n&&"object"==rt(n)||(n={name:n}),r.name=n.name,r.checkPull=e(n.pull,!0),r.checkPut=e(n.put),r.revertClone=n.revertClone,t.group=r},Ee=function(){!Se&&qt&&_t(qt,"display","none")},Ie=function(){!Se&&qt&&_t(qt,"display","")};_e&&document.addEventListener("click",(function(t){if(fe)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),fe=!1,!1}),!0);var Me=function(t){if(zt){var e=function(t,e){var r;return me.some((function(n){if(!Et(n)){var o=St(n),a=n[Ft].options.emptyInsertThreshold,i=t>=o.left-a&&t<=o.right+a,s=e>=o.top-a&&e<=o.bottom+a;return a&&i&&s?r=n:void 0}})),r}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(e){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.target=r.rootEl=e,r.preventDefault=void 0,r.stopPropagation=void 0,e[Ft]._onDragOver(r)}}},Oe=function(t){zt&&zt.parentNode[Ft]._isOutsideThisEl(t.target)};function Pe(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=ot({},e),t[Ft]=this;var r,n,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return De(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Pe.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var a in Ht.initializePlugins(this,t,o),o)!(a in e)&&(e[a]=o[a]);for(var i in Te(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&xe,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?gt(t,"pointerdown",this._onTapStart):(gt(t,"mousedown",this._onTapStart),gt(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(gt(t,"dragover",this),gt(t,"dragenter",this)),me.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ot(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==_t(t,"display")&&t!==Pe.ghost){n.push({target:t,rect:St(t)});var e=at({},n[n.length-1].rect);if(t.thisAnimationDuration){var r=wt(t,!0);r&&(e.top-=r.f,e.left-=r.e)}t.fromRect=e}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,e){for(var r in t)if(t.hasOwnProperty(r))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[r][n])return Number(r);return-1}(n,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(r),void("function"==typeof t&&t());var o=!1,a=0;n.forEach((function(t){var r=0,n=t.target,i=n.fromRect,s=St(n),l=n.prevFromRect,c=n.prevToRect,u=t.rect,d=wt(n,!0);d&&(s.top-=d.f,s.left-=d.e),n.toRect=s,n.thisAnimationDuration&&Pt(l,s)&&!Pt(i,s)&&(u.top-s.top)/(u.left-s.left)==(i.top-s.top)/(i.left-s.left)&&(r=function(t,e,r,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))*n.animation}(u,l,c,e.options)),Pt(s,i)||(n.prevFromRect=i,n.prevToRect=s,r||(r=e.options.animation),e.animate(n,u,s,r)),r&&(o=!0,a=Math.max(a,r),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),r),n.thisAnimationDuration=r)})),clearTimeout(r),o?r=setTimeout((function(){"function"==typeof t&&t()}),a):"function"==typeof t&&t(),n=[]},animate:function(t,e,r,n){if(n){_t(t,"transition",""),_t(t,"transform","");var o=wt(this.el),a=o&&o.a,i=o&&o.d,s=(e.left-r.left)/(a||1),l=(e.top-r.top)/(i||1);t.animatingX=!!s,t.animatingY=!!l,_t(t,"transform","translate3d("+s+"px,"+l+"px,0)"),function(t){t.offsetWidth}(t),_t(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),_t(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){_t(t,"transition",""),_t(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}))}function Ne(t,e,r,n,o,a,i,s){var l,c,u=t[Ft],d=u.options.onMove;return!window.CustomEvent||st||lt?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=r,l.draggedRect=n,l.related=o||e,l.relatedRect=a||St(e),l.willInsertAfter=s,l.originalEvent=i,t.dispatchEvent(l),d&&(c=d.call(u,l,i)),c}function Le(t){t.draggable=!1}function Be(){ye=!1}function Fe(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,r=e.length,n=0;r--;)n+=e.charCodeAt(r);return n.toString(36)}function Re(t){return setTimeout(t,0)}function je(t){return clearTimeout(t)}Pe.prototype={constructor:Pe,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ue=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,zt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,r=this.el,n=this.options,o=n.preventOnFilter,a=t.type,i=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(i||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=n.filter;if(function(t){Ce.length=0;for(var e=t.getElementsByTagName("input"),r=e.length;r--;){var n=e[r];n.checked&&Ce.push(n)}}(r),!zt&&!(/mousedown|pointerdown/.test(a)&&0!==t.button||n.disabled||l.isContentEditable||(s=bt(s,n.draggable,r,!1))&&s.animated||$t===s)){if(Qt=It(s),Zt=It(s,n.draggable),"function"==typeof c){if(c.call(this,t,s,this))return Vt({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:r,fromEl:r}),Ut("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=bt(l,n.trim(),r,!1))return Vt({sortable:e,rootEl:n,name:"filter",targetEl:s,fromEl:r,toEl:r}),Ut("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());n.handle&&!bt(l,n.handle,r,!1)||this._prepareDragStart(t,i,s)}}},_prepareDragStart:function(t,e,r){var n,o=this,a=o.el,i=o.options,s=a.ownerDocument;if(r&&!zt&&r.parentNode===a){var l=St(r);if(Gt=a,Yt=(zt=r).parentNode,Wt=zt.nextSibling,$t=r,ee=i.group,Pe.dragged=zt,ne={target:zt,clientX:(e||t).clientX,clientY:(e||t).clientY},se=ne.clientX-l.left,le=ne.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,zt.style["will-change"]="all",n=function(){Ut("delayEnded",o,{evt:t}),Pe.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!ct&&o.nativeDraggable&&(zt.draggable=!0),o._triggerDragStart(t,e),Vt({sortable:o,name:"choose",originalEvent:t}),Ct(zt,i.chosenClass,!0))},i.ignore.split(",").forEach((function(t){kt(zt,t.trim(),Le)})),gt(s,"dragover",Me),gt(s,"mousemove",Me),gt(s,"touchmove",Me),gt(s,"mouseup",o._onDrop),gt(s,"touchend",o._onDrop),gt(s,"touchcancel",o._onDrop),ct&&this.nativeDraggable&&(this.options.touchStartThreshold=4,zt.draggable=!0),Ut("delayStart",this,{evt:t}),!i.delay||i.delayOnTouchOnly&&!e||this.nativeDraggable&&(lt||st))n();else{if(Pe.eventCanceled)return void this._onDrop();gt(s,"mouseup",o._disableDelayedDrag),gt(s,"touchend",o._disableDelayedDrag),gt(s,"touchcancel",o._disableDelayedDrag),gt(s,"mousemove",o._delayedDragTouchMoveHandler),gt(s,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&>(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,i.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){zt&&Le(zt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ft(t,"mouseup",this._disableDelayedDrag),ft(t,"touchend",this._disableDelayedDrag),ft(t,"touchcancel",this._disableDelayedDrag),ft(t,"mousemove",this._delayedDragTouchMoveHandler),ft(t,"touchmove",this._delayedDragTouchMoveHandler),ft(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?gt(document,"pointermove",this._onTouchMove):gt(document,e?"touchmove":"mousemove",this._onTouchMove):(gt(zt,"dragend",this),gt(Gt,"dragstart",this._onDragStart));try{document.selection?Re((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(ge=!1,Gt&&zt){Ut("dragStarted",this,{evt:e}),this.nativeDraggable&>(document,"dragover",Oe);var r=this.options;!t&&Ct(zt,r.dragClass,!1),Ct(zt,r.ghostClass,!0),Pe.active=this,t&&this._appendGhost(),Vt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(oe){this._lastX=oe.clientX,this._lastY=oe.clientY,Ee();for(var t=document.elementFromPoint(oe.clientX,oe.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(oe.clientX,oe.clientY))!==e;)e=t;if(zt.parentNode[Ft]._isOutsideThisEl(t),e)do{if(e[Ft]&&e[Ft]._onDragOver({clientX:oe.clientX,clientY:oe.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);Ie()}},_onTouchMove:function(t){if(ne){var e=this.options,r=e.fallbackTolerance,n=e.fallbackOffset,o=t.touches?t.touches[0]:t,a=qt&&wt(qt,!0),i=qt&&a&&a.a,s=qt&&a&&a.d,l=we&&he&&Mt(he),c=(o.clientX-ne.clientX+n.x)/(i||1)+(l?l[0]-Ae[0]:0)/(i||1),u=(o.clientY-ne.clientY+n.y)/(s||1)+(l?l[1]-Ae[1]:0)/(s||1);if(!Pe.active&&!ge){if(r&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))n.right+10||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+10}(t,o,this)&&!f.animated){if(f===zt)return I(!1);if(f&&a===t.target&&(i=f),i&&(r=St(i)),!1!==Ne(Gt,a,zt,e,i,r,t,!!i))return E(),a.appendChild(zt),Yt=a,M(),I(!0)}else if(i.parentNode===a){r=St(i);var m,v,b,A=zt.parentNode!==a,y=!function(t,e,r){var n=r?t.left:t.top,o=r?t.right:t.bottom,a=r?t.width:t.height,i=r?e.left:e.top,s=r?e.right:e.bottom,l=r?e.width:e.height;return n===i||o===s||n+a/2===i+l/2}(zt.animated&&zt.toRect||e,i.animated&&i.toRect||r,o),C=o?"top":"left",_=Dt(i,"top","top")||Dt(zt,"top","top"),w=_?_.scrollTop:void 0;if(ue!==i&&(v=r[C],ve=!1,be=!y&&s.invertSwap||A),m=function(t,e,r,n,o,a,i,s){var l=n?t.clientY:t.clientX,c=n?r.height:r.width,u=n?r.top:r.left,d=n?r.bottom:r.right,p=!1;if(!i)if(s&&peu+c*a/2:ld-pe)return-de}else if(l>u+c*(1-o)/2&&ld-c*a/2)?l>u+c/2?1:-1:0}(t,i,r,o,y?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,be,ue===i),0!==m){var k=It(zt);do{k-=m,b=Yt.children[k]}while(b&&("none"===_t(b,"display")||b===qt))}if(0===m||b===i)return I(!1);ue=i,de=m;var x=i.nextElementSibling,S=!1,D=Ne(Gt,a,zt,e,i,r,t,S=1===m);if(!1!==D)return 1!==D&&-1!==D||(S=1===D),ye=!0,setTimeout(Be,30),E(),S&&!x?a.appendChild(zt):i.parentNode.insertBefore(zt,S?x:i),_&&Lt(_,0,w-_.scrollTop),Yt=zt.parentNode,void 0===v||be||(pe=Math.abs(v-St(i)[C])),M(),I(!0)}if(a.contains(zt))return I(!1)}return!1}function T(s,l){Ut(s,h,at({evt:t,isOwner:u,axis:o?"vertical":"horizontal",revert:n,dragRect:e,targetRect:r,canSort:d,fromSortable:p,target:i,completed:I,onMove:function(r,n){return Ne(Gt,a,zt,e,r,St(r),t,n)},changed:M},l))}function E(){T("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function I(e){return T("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(h),h!==p&&(Ct(zt,re?re.options.ghostClass:c.options.ghostClass,!1),Ct(zt,s.ghostClass,!0)),re!==h&&h!==Pe.active?re=h:h===Pe.active&&re&&(re=null),p===h&&(h._ignoreWhileAnimating=i),h.animateAll((function(){T("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===zt&&!zt.animated||i===a&&!i.animated)&&(ue=null),s.dragoverBubble||t.rootEl||i===document||(zt.parentNode[Ft]._isOutsideThisEl(t.target),!e&&Me(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function M(){Jt=It(zt),te=It(zt,s.draggable),Vt({sortable:h,name:"change",toEl:a,newIndex:Jt,newDraggableIndex:te,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){ft(document,"mousemove",this._onTouchMove),ft(document,"touchmove",this._onTouchMove),ft(document,"pointermove",this._onTouchMove),ft(document,"dragover",Me),ft(document,"mousemove",Me),ft(document,"touchmove",Me)},_offUpEvents:function(){var t=this.el.ownerDocument;ft(t,"mouseup",this._onDrop),ft(t,"touchend",this._onDrop),ft(t,"pointerup",this._onDrop),ft(t,"touchcancel",this._onDrop),ft(document,"selectstart",this)},_onDrop:function(t){var e=this.el,r=this.options;Jt=It(zt),te=It(zt,r.draggable),Ut("drop",this,{evt:t}),Yt=zt&&zt.parentNode,Jt=It(zt),te=It(zt,r.draggable),Pe.eventCanceled||(ge=!1,be=!1,ve=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),je(this.cloneId),je(this._dragStartId),this.nativeDraggable&&(ft(document,"drop",this),ft(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ut&&_t(document.body,"user-select",""),_t(zt,"transform",""),t&&(ce&&(t.cancelable&&t.preventDefault(),!r.dropBubble&&t.stopPropagation()),qt&&qt.parentNode&&qt.parentNode.removeChild(qt),(Gt===Yt||re&&"clone"!==re.lastPutMode)&&Xt&&Xt.parentNode&&Xt.parentNode.removeChild(Xt),zt&&(this.nativeDraggable&&ft(zt,"dragend",this),Le(zt),zt.style["will-change"]="",ce&&!ge&&Ct(zt,re?re.options.ghostClass:this.options.ghostClass,!1),Ct(zt,this.options.chosenClass,!1),Vt({sortable:this,name:"unchoose",toEl:Yt,newIndex:null,newDraggableIndex:null,originalEvent:t}),Gt!==Yt?(Jt>=0&&(Vt({rootEl:Yt,name:"add",toEl:Yt,fromEl:Gt,originalEvent:t}),Vt({sortable:this,name:"remove",toEl:Yt,originalEvent:t}),Vt({rootEl:Yt,name:"sort",toEl:Yt,fromEl:Gt,originalEvent:t}),Vt({sortable:this,name:"sort",toEl:Yt,originalEvent:t})),re&&re.save()):Jt!==Qt&&Jt>=0&&(Vt({sortable:this,name:"update",toEl:Yt,originalEvent:t}),Vt({sortable:this,name:"sort",toEl:Yt,originalEvent:t})),Pe.active&&(null!=Jt&&-1!==Jt||(Jt=Qt,te=Zt),Vt({sortable:this,name:"end",toEl:Yt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Ut("nulling",this),Gt=zt=Yt=qt=Wt=Xt=$t=Kt=ne=oe=ce=Jt=te=Qt=Zt=ue=de=re=ee=Pe.dragged=Pe.ghost=Pe.clone=Pe.active=null,Ce.forEach((function(t){t.checked=!0})),Ce.length=ae=ie=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":zt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],r=this.el.children,n=0,o=r.length,a=this.options;n!0,"move:down":()=>!0,"update:focus":()=>!0},setup(t,e){let{emit:r}=e;const n=(0,a.KR)(),o=(0,a.KR)();let i=0;return{buttonUp:n,buttonDown:o,moveUp:()=>{r("move:up"),i=1},moveDown:()=>{r("move:down"),i=-1},keepFocus:()=>{0!==i&&(1!==i&&!t.isLast||t.isFirst?(0,a.dY)((()=>o.value.$el.focus())):(0,a.dY)((()=>n.value.$el.focus()))),i=0},t:Z.Tl}}});var ir=n(56725),sr={};sr.styleTagTransform=q(),sr.setAttributes=U(),sr.insert=j().bind(null,"head"),sr.domAPI=F(),sr.insertStyleElement=z(),L()(ir.A,sr),ir.A&&ir.A.locals&&ir.A.locals;const lr=(0,y.A)(ar,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("li",{class:{"order-selector-element":!0,"order-selector-element--disabled":t.app.default},attrs:{"data-cy-app-order-element":t.app.id},on:{focusin:function(e){return t.$emit("update:focus")}}},[e("svg",{attrs:{width:"20",height:"20",viewBox:"0 0 20 20",role:"presentation"}},[e("image",{staticClass:"order-selector-element__icon",attrs:{preserveAspectRatio:"xMinYMin meet",x:"0",y:"0",width:"20",height:"20","xlink:href":t.app.icon}})]),t._v(" "),e("div",{staticClass:"order-selector-element__label"},[t._v("\n\t\t"+t._s(t.app.label??t.app.id)+"\n\t")]),t._v(" "),e("div",{staticClass:"order-selector-element__actions"},[e("NcButton",{directives:[{name:"show",rawName:"v-show",value:!t.isFirst&&!t.app.default,expression:"!isFirst && !app.default"}],ref:"buttonUp",attrs:{"aria-label":t.t("settings","Move up"),"aria-describedby":t.ariaDescribedby,"aria-details":t.ariaDetails,"data-cy-app-order-button":"up",type:"tertiary-no-background"},on:{click:t.moveUp},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconArrowUp",{attrs:{size:20}})]},proxy:!0}])}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isFirst||!!t.app.default,expression:"isFirst || !!app.default"}],staticClass:"order-selector-element__placeholder",attrs:{"aria-hidden":"true"}}),t._v(" "),e("NcButton",{directives:[{name:"show",rawName:"v-show",value:!t.isLast&&!t.app.default,expression:"!isLast && !app.default"}],ref:"buttonDown",attrs:{"aria-label":t.t("settings","Move down"),"aria-describedby":t.ariaDescribedby,"aria-details":t.ariaDetails,"data-cy-app-order-button":"down",type:"tertiary-no-background"},on:{click:t.moveDown},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconArrowDown",{attrs:{size:20}})]},proxy:!0}])}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isLast||!!t.app.default,expression:"isLast || !!app.default"}],staticClass:"order-selector-element__placeholder",attrs:{"aria-hidden":"true"}})],1)])}),[],!1,null,"e25020e8",null).exports,cr=(0,a.pM)({name:"AppOrderSelector",components:{AppOrderSelectorElement:lr,Fragment:er.F},props:{ariaDetails:{type:String,default:null},value:{type:Array,required:!0}},emits:{"update:value":t=>Array.isArray(t)},setup(t,e){let{emit:r}=e;const n=(0,a.KR)(null),o=(0,a.EW)({get:()=>t.value,set:e=>{const n=[...e].sort(((t,r)=>(r.default?1:0)-(t.default?1:0)||e.indexOf(t)-e.indexOf(r)));n.some(((e,r)=>{let{id:n}=e;return n!==t.value[r].id}))?r("update:value",n):i.value+=1}}),i=(0,a.KR)(0);!function(t,e,r={}){let n;const{document:o=tt.PWG,...i}=r,s={onUpdate:t=>{!function(t,e,r){const n=(0,a.i9)(t),o=n?[...(0,et.BA)(t)]:(0,et.BA)(t);if(r>=0&&r{o.splice(r,0,i),n&&(t.value=o)}))}}(e,t.oldIndex,t.newIndex)}},l=()=>{const e="string"==typeof t?null==o?void 0:o.querySelector(t):(0,tt.F4c)(t);e&&void 0===n&&(n=new tr(e,{...s,...i}))},c=()=>{null==n||n.destroy(),n=void 0};(0,et.rd)(l),(0,et.Uo)(c)}(n,o,{filter:".order-selector-element--disabled"});const s=(0,a.KR)([]);(0,a.$u)((()=>{s.value.forEach((t=>t.keepFocus()))}));const l=(0,a.KR)("");return{appList:o,listElement:n,moveDown:e=>{const n=e>0?t.value.slice(0,e):[];n.push(t.value[e+1]);const o=e{const n=e>1?t.value.slice(0,e-1):[];if(t.value[e-1]?.default)return;const o=[t.value[e-1]];e{l.value=(0,Z.Tl)("theming","Current selected app: {app}, position {position} of {total}",{app:t.value[e].label,position:e+1,total:t.value.length})},renderCount:i,selectorElements:s}}}),ur=cr;var dr=n(42797),pr={};pr.styleTagTransform=q(),pr.setAttributes=U(),pr.insert=j().bind(null,"head"),pr.domAPI=F(),pr.insertStyleElement=z(),L()(dr.A,pr),dr.A&&dr.A.locals&&dr.A.locals;var hr=(0,y.A)(ur,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("Fragment",[e("div",{staticClass:"hidden-visually",attrs:{id:t.statusInfoId,"aria-live":"polite",role:"status"}},[t._v("\n\t\t"+t._s(t.statusInfo)+"\n\t")]),t._v(" "),e("ol",{ref:"listElement",staticClass:"order-selector",attrs:{"data-cy-app-order":""}},t._l(t.appList,(function(r,n){return e("AppOrderSelectorElement",t._g({key:`${r.id}${t.renderCount}`,ref:"selectorElements",refInFor:!0,attrs:{app:r,"aria-details":t.ariaDetails,"aria-describedby":t.statusInfoId,"is-first":0===n||!!t.appList[n-1].default,"is-last":n===t.value.length-1}},r.default?{}:{"move:up":()=>t.moveUp(n),"move:down":()=>t.moveDown(n),"update:focus":()=>t.updateStatusInfo(n)}))})),1)])}),[],!1,null,"3c4840b5",null);const gr=hr.exports,fr={name:"UndoIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},mr=(0,y.A)(fr,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon undo-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var vr=n(80910);const br=(0,a.pM)({name:"UserAppMenuSection",components:{AppOrderSelector:gr,IconUndo:mr,NcButton:or.A,NcNoteCard:vr.A,NcSettingsSection:d.A},setup(){const{userAppOrder:t,enforcedDefaultApp:e}=(0,l.C)("theming","navigationBar"),r=(0,l.C)("core","apps").filter((t=>{let{type:e}=t;return"link"===e})).map((t=>({...t,label:t.name,default:t.default&&t.id===e}))),n=(0,a.KR)(!Array.isArray(t)||Object.values(t).length>0),o=(0,a.EW)((()=>r.some(((t,e)=>{let{id:r}=t;return r!==h.value[e].id})))),i="theming-apporder-changed-infocard",u="theming-apporder-changed-infocard",d=(0,a.EW)((()=>(o.value?`${i} `:"")+(e?u:""))),h=(0,a.KR)([...r]),g=async(t,e)=>{const r=(0,s.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"core",configKey:t});return await c.Ay.post(r,{configValue:JSON.stringify(e)})};return{appOrder:h,updateAppOrder:t=>{const e={};t.forEach(((t,r)=>{let{app:n,id:o}=t;e[o]={order:r,app:n}})),g("apporder",e).then((()=>{h.value=t,n.value=!0})).catch((t=>{console.warn("Could not set the app order",t),(0,p.Qg)((0,Z.Tl)("theming","Could not set the app order"))}))},resetAppOrder:async()=>{try{await g("apporder",[]),n.value=!1;const{data:t}=await c.Ay.get((0,s.KT)("/core/navigation/apps"),{headers:{"OCS-APIRequest":"true"}});h.value=t.ocs.data.map((t=>({...t,label:t.name,default:t.default&&t.app===e})))}catch(t){console.warn(t),(0,p.Qg)((0,Z.Tl)("theming","Could not reset the app order"))}},enforcedDefaultApp:e,hasAppOrderChanged:o,hasCustomAppOrder:n,ariaDetailsAppOrder:d,elementIdAppOrderChanged:i,elementIdEnforcedDefaultApp:u,t:Z.Tl}}}),Ar=br;var yr=n(66167),Cr={};Cr.styleTagTransform=q(),Cr.setAttributes=U(),Cr.insert=j().bind(null,"head"),Cr.domAPI=F(),Cr.insertStyleElement=z(),L()(yr.A,Cr),yr.A&&yr.A.locals&&yr.A.locals;const _r=(0,y.A)(Ar,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcSettingsSection",{attrs:{name:t.t("theming","Navigation bar settings")}},[e("p",[t._v("\n\t\t"+t._s(t.t("theming","You can configure the app order used for the navigation bar. The first entry will be the default app, opened after login or when clicking on the logo."))+"\n\t")]),t._v(" "),t.enforcedDefaultApp?e("NcNoteCard",{attrs:{id:t.elementIdEnforcedDefaultApp,type:"info"}},[t._v("\n\t\t"+t._s(t.t("theming","The default app can not be changed because it was configured by the administrator."))+"\n\t")]):t._e(),t._v(" "),t.hasAppOrderChanged?e("NcNoteCard",{attrs:{id:t.elementIdAppOrderChanged,type:"info"}},[t._v("\n\t\t"+t._s(t.t("theming","The app order was changed, to see it in action you have to reload the page."))+"\n\t")]):t._e(),t._v(" "),e("AppOrderSelector",{staticClass:"user-app-menu-order",attrs:{"aria-details":t.ariaDetailsAppOrder,value:t.appOrder},on:{"update:value":t.updateAppOrder}}),t._v(" "),e("NcButton",{attrs:{"data-test-id":"btn-apporder-reset",disabled:!t.hasCustomAppOrder,type:"tertiary"},on:{click:t.resetAppOrder},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconUndo",{attrs:{size:20}})]},proxy:!0}])},[t._v("\n\t\t"+t._s(t.t("theming","Reset default app order"))+"\n\t")])],1)}),[],!1,null,"08dfaa90",null).exports;var wr={grad:.9,turn:360,rad:360/(2*Math.PI)},kr=function(t){return"string"==typeof t?t.length>0:"number"==typeof t},xr=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},Sr=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=1),t>r?r:t>e?t:e},Dr=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Tr=function(t){return{r:Sr(t.r,0,255),g:Sr(t.g,0,255),b:Sr(t.b,0,255),a:Sr(t.a)}},Er=function(t){return{r:xr(t.r),g:xr(t.g),b:xr(t.b),a:xr(t.a,3)}},Ir=/^#([0-9a-f]{3,8})$/i,Mr=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Or=function(t){var e=t.r,r=t.g,n=t.b,o=t.a,a=Math.max(e,r,n),i=a-Math.min(e,r,n),s=i?a===e?(r-n)/i:a===r?2+(n-e)/i:4+(e-r)/i:0;return{h:60*(s<0?s+6:s),s:a?i/a*100:0,v:a/255*100,a:o}},Pr=function(t){var e=t.h,r=t.s,n=t.v,o=t.a;e=e/360*6,r/=100,n/=100;var a=Math.floor(e),i=n*(1-r),s=n*(1-(e-a)*r),l=n*(1-(1-e+a)*r),c=a%6;return{r:255*[n,s,i,i,l,n][c],g:255*[l,n,n,s,i,i][c],b:255*[i,i,l,n,n,s][c],a:o}},Nr=function(t){return{h:Dr(t.h),s:Sr(t.s,0,100),l:Sr(t.l,0,100),a:Sr(t.a)}},Lr=function(t){return{h:xr(t.h),s:xr(t.s),l:xr(t.l),a:xr(t.a,3)}},Br=function(t){return Pr((r=(e=t).s,{h:e.h,s:(r*=((n=e.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:e.a}));var e,r,n},Fr=function(t){return{h:(e=Or(t)).h,s:(o=(200-(r=e.s))*(n=e.v)/100)>0&&o<200?r*n/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,r,n,o},Rr=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jr=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Hr=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ur=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vr={string:[[function(t){var e=Ir.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:4===t.length?xr(parseInt(t[3]+t[3],16)/255,2):1}:6===t.length||8===t.length?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:8===t.length?xr(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Hr.exec(t)||Ur.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Tr({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:void 0===e[7]?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=Rr.exec(t)||jr.exec(t);if(!e)return null;var r,n,o=Nr({h:(r=e[1],n=e[2],void 0===n&&(n="deg"),Number(r)*(wr[n]||1)),s:Number(e[3]),l:Number(e[4]),a:void 0===e[5]?1:Number(e[5])/(e[6]?100:1)});return Br(o)},"hsl"]],object:[[function(t){var e=t.r,r=t.g,n=t.b,o=t.a,a=void 0===o?1:o;return kr(e)&&kr(r)&&kr(n)?Tr({r:Number(e),g:Number(r),b:Number(n),a:Number(a)}):null},"rgb"],[function(t){var e=t.h,r=t.s,n=t.l,o=t.a,a=void 0===o?1:o;if(!kr(e)||!kr(r)||!kr(n))return null;var i=Nr({h:Number(e),s:Number(r),l:Number(n),a:Number(a)});return Br(i)},"hsl"],[function(t){var e=t.h,r=t.s,n=t.v,o=t.a,a=void 0===o?1:o;if(!kr(e)||!kr(r)||!kr(n))return null;var i=function(t){return{h:Dr(t.h),s:Sr(t.s,0,100),v:Sr(t.v,0,100),a:Sr(t.a)}}({h:Number(e),s:Number(r),v:Number(n),a:Number(a)});return Pr(i)},"hsv"]]},zr=function(t,e){for(var r=0;r=.5},t.prototype.toHex=function(){return e=(t=Er(this.rgba)).r,r=t.g,n=t.b,a=(o=t.a)<1?Mr(xr(255*o)):"","#"+Mr(e)+Mr(r)+Mr(n)+a;var t,e,r,n,o,a},t.prototype.toRgb=function(){return Er(this.rgba)},t.prototype.toRgbString=function(){return e=(t=Er(this.rgba)).r,r=t.g,n=t.b,(o=t.a)<1?"rgba("+e+", "+r+", "+n+", "+o+")":"rgb("+e+", "+r+", "+n+")";var t,e,r,n,o},t.prototype.toHsl=function(){return Lr(Fr(this.rgba))},t.prototype.toHslString=function(){return e=(t=Lr(Fr(this.rgba))).h,r=t.s,n=t.l,(o=t.a)<1?"hsla("+e+", "+r+"%, "+n+"%, "+o+")":"hsl("+e+", "+r+"%, "+n+"%)";var t,e,r,n,o},t.prototype.toHsv=function(){return t=Or(this.rgba),{h:xr(t.h),s:xr(t.s),v:xr(t.v),a:xr(t.a,3)};var t},t.prototype.invert=function(){return $r({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},t.prototype.saturate=function(t){return void 0===t&&(t=.1),$r(Yr(this.rgba,t))},t.prototype.desaturate=function(t){return void 0===t&&(t=.1),$r(Yr(this.rgba,-t))},t.prototype.grayscale=function(){return $r(Yr(this.rgba,-1))},t.prototype.lighten=function(t){return void 0===t&&(t=.1),$r(Gr(this.rgba,t))},t.prototype.darken=function(t){return void 0===t&&(t=.1),$r(Gr(this.rgba,-t))},t.prototype.rotate=function(t){return void 0===t&&(t=15),this.hue(this.hue()+t)},t.prototype.alpha=function(t){return"number"==typeof t?$r({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):xr(this.rgba.a,3);var e},t.prototype.hue=function(t){var e=Fr(this.rgba);return"number"==typeof t?$r({h:t,s:e.s,l:e.l,a:e.a}):xr(e.h)},t.prototype.isEqual=function(t){return this.toHex()===$r(t).toHex()},t}(),$r=function(t){return t instanceof Wr?t:new Wr(t)},Xr=n(84237);const Kr={name:"UndoVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Qr=(0,y.A)(Kr,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon undo-variant-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M13.5,7A6.5,6.5 0 0,1 20,13.5A6.5,6.5 0 0,1 13.5,20H10V18H13.5C16,18 18,16 18,13.5C18,11 16,9 13.5,9H7.83L10.91,12.09L9.5,13.5L4,8L9.5,2.5L10.92,3.91L7.83,7H13.5M6,18H8V20H6V18Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,{primaryColor:Jr,defaultPrimaryColor:Zr}=(0,l.C)("theming","data",{primaryColor:"#0082c9",defaultPrimaryColor:"#0082c9"}),tn=(0,a.pM)({name:"UserPrimaryColor",components:{IconColorPalette:w,IconUndo:Qr,NcButton:or.A,NcColorPicker:f.N,NcLoadingIcon:Xr.A},emits:["refresh-styles"],data:()=>({primaryColor:Jr,loading:!1}),computed:{isdefaultPrimaryColor(){return $r(this.primaryColor).isEqual($r(Zr))},debouncedOnUpdate(){return g()(this.onUpdate,500)}},methods:{t:Z.Tl,reload(){const t=this.$refs.trigger,e=window.getComputedStyle(t).backgroundColor;e.toLowerCase()!==this.primaryColor&&(this.primaryColor=e)},onReset(){this.primaryColor=Zr,this.onUpdate(null)},async onUpdate(t){this.loading=!0;const e=(0,s.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"primary_color"});try{t?await c.Ay.post(e,{configValue:t}):await c.Ay.delete(e),this.$emit("refresh-styles")}catch(t){console.error("Could not update primary color",t),(0,p.Qg)((0,Z.Tl)("theming","Could not set primary color"))}this.loading=!1}}}),en=tn;var rn=n(79799),nn={};nn.styleTagTransform=q(),nn.setAttributes=U(),nn.insert=j().bind(null,"head"),nn.domAPI=F(),nn.insertStyleElement=z(),L()(rn.A,nn),rn.A&&rn.A.locals&&rn.A.locals;const on=(0,y.A)(en,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{staticClass:"primary-color__wrapper"},[e("NcColorPicker",{attrs:{"data-user-theming-primary-color":""},on:{"update:value":t.debouncedOnUpdate},model:{value:t.primaryColor,callback:function(e){t.primaryColor=e},expression:"primaryColor"}},[e("button",{ref:"trigger",staticClass:"color-container primary-color__trigger",style:{"background-color":t.primaryColor},attrs:{"data-user-theming-primary-color-trigger":""}},[t._v("\n\t\t\t"+t._s(t.t("theming","Primary color"))+"\n\t\t\t"),t.loading?e("NcLoadingIcon"):e("IconColorPalette",{attrs:{size:20}})],1)]),t._v(" "),e("NcButton",{attrs:{type:"tertiary",disabled:t.isdefaultPrimaryColor},on:{click:t.onReset},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconUndo",{attrs:{size:20}})]},proxy:!0}])},[t._v("\n\t\t"+t._s(t.t("theming","Reset primary color"))+"\n\t")])],1)}),[],!1,null,"c7fa82d2",null).exports,an=(0,l.C)("theming","themes",[]),sn=(0,l.C)("theming","enforceTheme",""),ln=(0,l.C)("theming","shortcutsDisabled",!1),cn=(0,l.C)("theming","enableBlurFilter",""),un=(0,l.C)("theming","isUserThemingDisabled"),dn={name:"UserTheming",components:{ItemPreview:J,NcCheckboxRadioSwitch:u.A,NcSettingsSection:d.A,BackgroundSettings:$,UserAppMenuSection:_r,UserPrimaryColor:on},data:()=>({availableThemes:an,enforceTheme:sn,shortcutsDisabled:ln,isUserThemingDisabled:un,enableBlurFilter:cn}),computed:{themes(){return this.availableThemes.filter((t=>1===t.type))},fonts(){return this.availableThemes.filter((t=>2===t.type))},selectedTheme(){return this.themes.find((t=>!0===t.enabled))||this.themes[0]},description(){return t("theming","Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level.").replace("{guidelines}",this.guidelinesLink).replace("{linkend}","")},guidelinesLink:()=>'',descriptionDetail(){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:()=>'',designteamLink:()=>''},watch:{shortcutsDisabled(t){this.changeShortcutsDisabled(t)}},methods:{async refreshGlobalStyles(){await i(),this.$nextTick((()=>this.$refs.primaryColor.reload()))},changeTheme(t){let{enabled:e,id:r}=t;this.themes.forEach((t=>{t.id===r&&e?t.enabled=!0:t.enabled=!1})),this.updateBodyAttributes(),this.selectItem(e,r)},changeFont(t){let{enabled:e,id:r}=t;this.fonts.forEach((t=>{t.id===r&&e?t.enabled=!0:t.enabled=!1})),this.updateBodyAttributes(),this.selectItem(e,r)},async changeShortcutsDisabled(t){t?await(0,c.Ay)({url:(0,s.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),data:{configValue:"yes"},method:"POST"}):await(0,c.Ay)({url:(0,s.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),method:"DELETE"})},async changeEnableBlurFilter(){this.enableBlurFilter="no"===this.enableBlurFilter?"yes":"no",await(0,c.Ay)({url:(0,s.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"force_enable_blur_filter"}),data:{configValue:this.enableBlurFilter},method:"POST"}),this.$emit("update:background")},updateBodyAttributes(){const t=this.themes.filter((t=>!0===t.enabled)).map((t=>t.id)),e=this.fonts.filter((t=>!0===t.enabled)).map((t=>t.id));this.themes.forEach((t=>{document.body.toggleAttribute(`data-theme-${t.id}`,t.enabled)})),this.fonts.forEach((t=>{document.body.toggleAttribute(`data-theme-${t.id}`,t.enabled)})),document.body.setAttribute("data-themes",[...t,...e].join(","))},async selectItem(e,r){try{e?await(0,c.Ay)({url:(0,s.KT)("apps/theming/api/v1/theme/{themeId}/enable",{themeId:r}),method:"PUT"}):await(0,c.Ay)({url:(0,s.KT)("apps/theming/api/v1/theme/{themeId}",{themeId:r}),method:"DELETE"})}catch(e){console.error(e,e.response),OC.Notification.showTemporary(t("theming",e.response.data.ocs.meta.message+". Unable to apply the setting."))}}}};var pn=n(75237),hn={};hn.styleTagTransform=q(),hn.setAttributes=U(),hn.insert=j().bind(null,"head"),hn.domAPI=F(),hn.insertStyleElement=z(),L()(pn.A,hn),pn.A&&pn.A.locals&&pn.A.locals;const gn=(0,y.A)(dn,(function(){var t=this,e=t._self._c;return e("section",[e("NcSettingsSection",{staticClass:"theming",attrs:{name:t.t("theming","Appearance and accessibility settings")}},[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("h3",[t._v(t._s(t.t("theming","Misc accessibility options")))]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{type:"checkbox",checked:"yes"===t.enableBlurFilter,indeterminate:""===t.enableBlurFilter},on:{"update:checked":t.changeEnableBlurFilter}},[t._v("\n\t\t\t"+t._s(t.t("theming","Enable blur background filter (may increase GPU load)"))+"\n\t\t")])],1),t._v(" "),e("NcSettingsSection",{attrs:{name:t.t("theming","Primary color"),description:t.isUserThemingDisabled?t.t("theming","Customization has been disabled by your administrator"):t.t("theming","Set a primary color to highlight important elements. The color used for elements such as primary buttons might differ a bit as it gets adjusted to fulfill accessibility requirements.")}},[t.isUserThemingDisabled?t._e():e("UserPrimaryColor",{ref:"primaryColor",on:{"refresh-styles":t.refreshGlobalStyles}})],1),t._v(" "),e("NcSettingsSection",{staticClass:"background",attrs:{name:t.t("theming","Background and color"),description:t.isUserThemingDisabled?t.t("theming","Customization has been disabled by your administrator"):t.t("theming","The background can be set to an image from the default set, a custom uploaded image, or a plain color.")}},[t.isUserThemingDisabled?t._e():e("BackgroundSettings",{staticClass:"background__grid",on:{"update:background":t.refreshGlobalStyles}})],1),t._v(" "),e("NcSettingsSection",{attrs:{name:t.t("theming","Keyboard shortcuts"),description: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.")}},[e("NcCheckboxRadioSwitch",{staticClass:"theming__preview-toggle",attrs:{checked:t.shortcutsDisabled,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),t._v(" "),e("UserAppMenuSection")],1)}),[],!1,null,"085d6e4c",null).exports;n.nc=(0,o.aV)(),a.Ay.prototype.OC=OC,a.Ay.prototype.t=t;const fn=new(a.Ay.extend(gn));fn.$mount("#theming"),fn.$on("update:background",i)},75237:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".theming p[data-v-085d6e4c]{max-width:800px}.theming[data-v-085d6e4c] a{font-weight:bold}.theming[data-v-085d6e4c] a:hover,.theming[data-v-085d6e4c] a:focus{text-decoration:underline}.theming__preview-list[data-v-085d6e4c]{--gap: 30px;display:grid;margin-top:var(--gap);column-gap:var(--gap);row-gap:var(--gap)}.background__grid[data-v-085d6e4c]{margin-top:30px}@media(max-width: 1440px){.theming__preview-list[data-v-085d6e4c]{display:flex;flex-direction:column}}","",{version:3,sources:["webpack://./apps/theming/src/UserTheming.vue"],names:[],mappings:"AAGC,4BACC,eAAA,CAID,4BACC,gBAAA,CAEA,oEAEC,yBAAA,CAIF,wCACC,WAAA,CAEA,YAAA,CACA,qBAAA,CACA,qBAAA,CACA,kBAAA,CAKD,mCACC,eAAA,CAIF,0BACC,wCACC,YAAA,CACA,qBAAA,CAAA",sourceRoot:""}]);const s=i},42797:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".order-selector[data-v-3c4840b5]{width:max-content;min-width:260px}","",{version:3,sources:["webpack://./apps/theming/src/components/AppOrderSelector.vue"],names:[],mappings:"AACA,iCACC,iBAAA,CACA,eAAA",sourceRoot:""}]);const s=i},56725:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".order-selector-element[data-v-e25020e8]{list-style:none;display:flex;flex-direction:row;align-items:center;gap:12px;padding-inline:12px}.order-selector-element[data-v-e25020e8]:hover{background-color:var(--color-background-hover);border-radius:var(--border-radius-large)}.order-selector-element--disabled[data-v-e25020e8]{border-color:var(--color-text-maxcontrast);color:var(--color-text-maxcontrast)}.order-selector-element--disabled .order-selector-element__icon[data-v-e25020e8]{opacity:75%}.order-selector-element__actions[data-v-e25020e8]{flex:0 0;display:flex;flex-direction:row;gap:6px}.order-selector-element__label[data-v-e25020e8]{flex:1 1;text-overflow:ellipsis;overflow:hidden}.order-selector-element__placeholder[data-v-e25020e8]{height:44px;width:44px}.order-selector-element__icon[data-v-e25020e8]{filter:var(--background-invert-if-bright)}","",{version:3,sources:["webpack://./apps/theming/src/components/AppOrderSelectorElement.vue"],names:[],mappings:"AACA,yCAEC,eAAA,CAEA,YAAA,CACA,kBAAA,CACA,kBAAA,CAEA,QAAA,CACA,mBAAA,CAEA,+CACC,8CAAA,CACA,wCAAA,CAGD,mDACC,0CAAA,CACA,mCAAA,CAEA,iFACC,WAAA,CAIF,kDACC,QAAA,CACA,YAAA,CACA,kBAAA,CACA,OAAA,CAGD,gDACC,QAAA,CACA,sBAAA,CACA,eAAA,CAGD,sDACC,WAAA,CACA,UAAA,CAGD,+CACC,yCAAA",sourceRoot:""}]);const s=i},19454:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".background-selector[data-v-5e1df51d]{display:flex;flex-wrap:wrap;justify-content:center}.background-selector .background-color[data-v-5e1df51d]{display:flex;justify-content:center;align-items:center;width:176px;height:96px;margin:8px;border-radius:var(--border-radius-large);background-color:var(--color-primary)}.background-selector .background[data-v-5e1df51d]{overflow:hidden;width:176px;height:96px;margin:8px;text-align:center;word-wrap:break-word;hyphens:auto;border:2px solid var(--color-main-background);border-radius:var(--border-radius-large);background-position:center center;background-size:cover}.background-selector .background__filepicker[data-v-5e1df51d]{background-color:var(--color-main-text);background-color:var(--color-background-dark)}.background-selector .background__filepicker.background--active[data-v-5e1df51d]{color:var(--color-background-plain-text);background-image:var(--image-background)}.background-selector .background__default[data-v-5e1df51d]{background-color:var(--color-background-plain);background-image:linear-gradient(to bottom, rgba(23, 23, 23, 0.5), rgba(23, 23, 23, 0.5)),var(--d4172c58)}.background-selector .background__filepicker[data-v-5e1df51d],.background-selector .background__default[data-v-5e1df51d],.background-selector .background__color[data-v-5e1df51d]{border-color:var(--color-border)}.background-selector .background__default[data-v-5e1df51d],.background-selector .background__shipped[data-v-5e1df51d]{color:#fff}.background-selector .background[data-color-bright][data-v-5e1df51d]{color:#000}.background-selector .background--active[data-v-5e1df51d],.background-selector .background[data-v-5e1df51d]:hover,.background-selector .background[data-v-5e1df51d]:focus{outline:2px solid var(--color-main-text) !important;border-color:var(--color-main-background) !important}.background-selector .background span[data-v-5e1df51d]{margin:4px}.background-selector .background .check-icon[data-v-5e1df51d]{display:none}.background-selector .background--active:not(.icon-loading) .check-icon[data-v-5e1df51d]{display:block !important}","",{version:3,sources:["webpack://./apps/theming/src/components/BackgroundSettings.vue"],names:[],mappings:"AACA,sCACC,YAAA,CACA,cAAA,CACA,sBAAA,CAEA,wDACC,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,WAAA,CACA,UAAA,CACA,wCAAA,CACA,qCAAA,CAGD,kDACC,eAAA,CACA,WAAA,CACA,WAAA,CACA,UAAA,CACA,iBAAA,CACA,oBAAA,CACA,YAAA,CACA,6CAAA,CACA,wCAAA,CACA,iCAAA,CACA,qBAAA,CAEA,8DACC,uCAAA,CACA,6CAAA,CAEA,iFACC,wCAAA,CACA,wCAAA,CAIF,2DACC,8CAAA,CACA,yGAAA,CAGD,kLACC,gCAAA,CAID,sHAEC,UAAA,CAID,qEACC,UAAA,CAGD,0KAGC,mDAAA,CACA,oDAAA,CAID,uDACC,UAAA,CAGD,8DACC,YAAA,CAIA,yFAEC,wBAAA",sourceRoot:""}]);const s=i},83685:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".theming__preview[data-v-e3bab014]{--ratio: 16;position:relative;display:flex;justify-content:flex-start}.theming__preview[data-v-e3bab014],.theming__preview *[data-v-e3bab014]{user-select:none}.theming__preview-image[data-v-e3bab014]{flex-basis:calc(16px*var(--ratio));flex-shrink:0;height:calc(10px*var(--ratio));margin-inline-end: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-e3bab014]{margin-bottom:10px}.theming__preview-description[data-v-e3bab014]{display:flex;flex-direction:column}.theming__preview-description h3[data-v-e3bab014]{font-weight:bold;margin-bottom:0}.theming__preview-description label[data-v-e3bab014]{padding:12px 0}.theming__preview-warning[data-v-e3bab014]{color:var(--color-warning)}@media(max-width: 682.6666666667px){.theming__preview[data-v-e3bab014]{flex-direction:column}.theming__preview-image[data-v-e3bab014]{margin:0}}","",{version:3,sources:["webpack://./apps/theming/src/components/ItemPreview.vue"],names:[],mappings:"AAGA,mCAEC,WAAA,CAEA,iBAAA,CACA,YAAA,CACA,0BAAA,CAEA,wEAEC,gBAAA,CAGD,yCACC,kCAAA,CACA,aAAA,CACA,8BAAA,CACA,4BAAA,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,2CACC,0BAAA,CAIF,oCACC,mCACC,qBAAA,CAEA,yCACC,QAAA,CAAA",sourceRoot:""}]);const s=i},66167:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".user-app-menu-order[data-v-08dfaa90]{margin-block:12px}","",{version:3,sources:["webpack://./apps/theming/src/components/UserAppMenuSection.vue"],names:[],mappings:"AACA,sCACC,iBAAA",sourceRoot:""}]);const s=i},79799:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(71354),o=r.n(n),a=r(76314),i=r.n(a)()(o());i.push([t.id,".primary-color__wrapper[data-v-c7fa82d2]{display:flex;flex-direction:row;flex-wrap:wrap;gap:12px}.primary-color__trigger[data-v-c7fa82d2]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background-color:var(--color-primary);color:var(--color-primary-text);width:350px;max-width:100vw;height:96px;word-wrap:break-word;hyphens:auto;border:2px solid var(--color-main-background);border-radius:var(--border-radius-large)}.primary-color__trigger[data-v-c7fa82d2]:active{background-color:var(--color-primary-hover) !important}.primary-color__trigger[data-v-c7fa82d2]:hover,.primary-color__trigger[data-v-c7fa82d2]:focus,.primary-color__trigger[data-v-c7fa82d2]:focus-visible{border-color:var(--color-main-background) !important;outline:2px solid var(--color-main-text) !important}","",{version:3,sources:["webpack://./apps/theming/src/components/UserPrimaryColor.vue"],names:[],mappings:"AAEC,yCACC,YAAA,CACA,kBAAA,CACA,cAAA,CACA,QAAA,CAGD,yCACC,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA,CACA,OAAA,CAEA,qCAAA,CACA,+BAAA,CACA,WAAA,CACA,eAAA,CACA,WAAA,CAEA,oBAAA,CACA,YAAA,CAEA,6CAAA,CACA,wCAAA,CAEA,gDACC,sDAAA,CAGD,qJAGC,oDAAA,CACA,mDAAA",sourceRoot:""}]);const s=i},80909:(t,e,r)=>{var n=r(30641),o=r(38329)(n);t.exports=o},16574:(t,e,r)=>{var n=r(80909);t.exports=function(t,e){var r=[];return n(t,(function(t,n,o){e(t,n,o)&&r.push(t)})),r}},30641:(t,e,r)=>{var n=r(86649),o=r(95950);t.exports=function(t,e){return t&&n(t,e,o)}},38329:(t,e,r)=>{var n=r(64894);t.exports=function(t,e){return function(r,o){if(null==r)return r;if(!n(r))return t(r,o);for(var a=r.length,i=e?a:-1,s=Object(r);(e?i--:++i{var n=r(69302),o=r(75288),a=r(36800),i=r(37241),s=Object.prototype,l=s.hasOwnProperty,c=n((function(t,e){t=Object(t);var r=-1,n=e.length,c=n>2?e[2]:void 0;for(c&&a(e[0],e[1],c)&&(n=1);++r{var n=r(79770),o=r(16574),a=r(15389),i=r(56449);t.exports=function(t,e){return(i(t)?n:o)(t,a(e,3))}},64866:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=n(r(3772)),a=n(r(5820));o.default.DefaultOpts.ImageClass=a.default,t.exports=o.default},38445:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(r(3772)),a=r(32629),i=function(){function t(t,e){void 0===e&&(e={}),this._src=t,this._opts=e,this._opts.filters=a(o.default.DefaultOpts.filters)}return t.prototype.maxColorCount=function(t){return this._opts.colorCount=t,this},t.prototype.maxDimension=function(t){return this._opts.maxDimension=t,this},t.prototype.addFilter=function(t){return this._opts.filters.push(t),this},t.prototype.removeFilter=function(t){var e=this._opts.filters.indexOf(t);return e>0&&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=i},93525:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Swatch=void 0;var n=r(17388),o=r(87612),a=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=a},54824:(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)}},53565:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineFilters=void 0;var n=r(54824);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 a=0;a{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(93525),o=r(17388),a=r(84684),i={targetDarkLuma:.26,maxDarkLuma:.45,minLightLuma:.55,targetLightLuma:.74,minNormalLuma:.3,targetNormalLuma:.5,maxNormalLuma:.7,targetMutesSaturation:.3,maxMutesSaturation:.4,targetVibrantSaturation:1,minVibrantSaturation:.35,weightSaturation:3,weightLuma:6.5,weightPopulation:.5};function s(t,e,r,n,o,a,i,s,l,c){var u=null,d=0;return e.forEach((function(e){var p=e.getHsl(),h=p[1],g=p[2];if(h>=s&&h<=l&&g>=o&&g<=a&&!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 f=function(t,e,r,n,o,a,i){function s(t,e){return 1-Math.abs(t-e)}return function(){for(var t=[],e=0;ed)&&(u=e,d=f)}})),u}e.default=function(t,e){e=a({},e,i);var r=function(t){var e=0;return t.forEach((function(t){e=Math.max(e,t.getPopulation())})),e}(t),l=function(t,e,r){var n={};return n.Vibrant=s(n,t,e,r.targetNormalLuma,r.minNormalLuma,r.maxNormalLuma,r.targetVibrantSaturation,r.minVibrantSaturation,1,r),n.LightVibrant=s(n,t,e,r.targetLightLuma,r.minLightLuma,1,r.targetVibrantSaturation,r.minVibrantSaturation,1,r),n.DarkVibrant=s(n,t,e,r.targetDarkLuma,0,r.maxDarkLuma,r.targetVibrantSaturation,r.minVibrantSaturation,1,r),n.Muted=s(n,t,e,r.targetNormalLuma,r.minNormalLuma,r.maxNormalLuma,r.targetMutesSaturation,0,r.maxMutesSaturation,r),n.LightMuted=s(n,t,e,r.targetLightLuma,r.minLightLuma,1,r.targetMutesSaturation,0,r.maxMutesSaturation,r),n.DarkMuted=s(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 a=t.DarkMuted.getHsl(),i=a[0],s=a[1],l=a[2];l=r.targetDarkLuma,t.DarkVibrant=new n.Swatch(o.hslToRgb(i,s,l),0)}if(null===t.LightVibrant&&null!==t.LightMuted){var c=t.LightMuted.getHsl();i=c[0],s=c[1],l=c[2],l=r.targetDarkLuma,t.DarkVibrant=new n.Swatch(o.hslToRgb(i,s,l),0)}}if(null===t.Vibrant&&null!==t.DarkVibrant){var u=t.DarkVibrant.getHsl();i=u[0],s=u[1],l=u[2],l=r.targetNormalLuma,t.Vibrant=new n.Swatch(o.hslToRgb(i,s,l),0)}else if(null===t.Vibrant&&null!==t.LightVibrant){var d=t.LightVibrant.getHsl();i=d[0],s=d[1],l=d[2],l=r.targetNormalLuma,t.Vibrant=new n.Swatch(o.hslToRgb(i,s,l),0)}if(null===t.DarkVibrant&&null!==t.Vibrant){var p=t.Vibrant.getHsl();i=p[0],s=p[1],l=p[2],l=r.targetDarkLuma,t.DarkVibrant=new n.Swatch(o.hslToRgb(i,s,l),0)}if(null===t.LightVibrant&&null!==t.Vibrant){var h=t.Vibrant.getHsl();i=h[0],s=h[1],l=h[2],l=r.targetLightLuma,t.LightVibrant=new n.Swatch(o.hslToRgb(i,s,l),0)}if(null===t.Muted&&null!==t.Vibrant){var g=t.Vibrant.getHsl();i=g[0],s=g[1],l=g[2],l=r.targetMutesSaturation,t.Muted=new n.Swatch(o.hslToRgb(i,s,l),0)}if(null===t.DarkMuted&&null!==t.DarkVibrant){var f=t.DarkVibrant.getHsl();i=f[0],s=f[1],l=f[2],l=r.targetMutesSaturation,t.DarkMuted=new n.Swatch(o.hslToRgb(i,s,l),0)}if(null===t.LightMuted&&null!==t.LightVibrant){var m=t.LightVibrant.getHsl();i=m[0],s=m[1],l=m[2],l=r.targetMutesSaturation,t.LightMuted=new n.Swatch(o.hslToRgb(i,s,l),0)}}(l,0,e),l}},3528:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(71593);Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return n.default}})},59327:(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,a=0;a{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebWorker=void 0;var n=r(89950);Object.defineProperty(e,"MMCQ",{enumerable:!0,get:function(){return n.default}}),e.WebWorker=null},89950:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(93525),a=n(r(72747)),i=n(r(46839));function s(t,e){for(var r=t.size();t.size()0))break;var o=n.split(),a=o[0],i=o[1];if(t.push(a),i&&i.count()>0&&t.push(i),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=a.default.build(t),n=r.hist,l=(Object.keys(n).length,new i.default((function(t,e){return t.count()-e.count()})));l.push(r),s(l,.75*e.colorCount);var c=new i.default((function(t,e){return t.count()*t.volume()-e.count()*e.volume()}));return c.contents=l.contents,s(c,e.colorCount-c.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}(c)}},46839:(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},72747:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(17388),o=function(){function t(t,e,r,n,o,a,i){this._volume=-1,this._count=-1,this.dimension={r1:t,r2:e,g1:r,g2:n,b1:o,b2:a},this.hist=i}return t.build=function(e,r){var o,a,i,s,l,c,u,d,p,h=1<<3*n.SIGBITS,g=new Uint32Array(h);o=i=l=0,a=s=c=Number.MAX_VALUE;for(var f=e.length/4,m=0;m>=n.RSHIFT,d>>=n.RSHIFT,p>>=n.RSHIFT,g[n.getColorIndex(u,d,p)]+=1,u>o&&(o=u),ui&&(i=d),dl&&(l=p),p>=n.RSHIFT,r>>=n.RSHIFT,o>>=n.RSHIFT,e>=i&&e<=s&&r>=l&&r<=c&&o>=u&&o<=d},t.prototype.split=function(){var t=this.hist,e=this.dimension,r=e.r1,o=e.r2,a=e.g1,i=e.g2,s=e.b1,l=e.b2,c=this.count();if(!c)return[];if(1===c)return[this.clone()];var u,d,p=o-r+1,h=i-a+1,g=l-s+1,f=Math.max(p,h,g),m=null;u=d=0;var v=null;if(f===p){v="r",m=new Uint32Array(o+1);for(var b=r;b<=o;b++){u=0;for(var A=a;A<=i;A++)for(var y=s;y<=l;y++)u+=t[n.getColorIndex(b,A,y)];d+=u,m[b]=d}}else if(f===h)for(v="g",m=new Uint32Array(i+1),A=a;A<=i;A++){for(u=0,b=r;b<=o;b++)for(y=s;y<=l;y++)u+=t[n.getColorIndex(b,A,y)];d+=u,m[A]=d}else for(v="b",m=new Uint32Array(l+1),y=s;y<=l;y++){for(u=0,b=r;b<=o;b++)for(A=a;A<=i;A++)u+=t[n.getColorIndex(b,A,y)];d+=u,m[y]=d}for(var C=-1,_=new Uint32Array(m.length),w=0;wd/2&&(C=w),_[w]=d-k}var x=this;return function(t){var e=t+"1",r=t+"2",n=x.dimension[e],o=x.dimension[r],a=x.clone(),i=x.clone(),s=C-n,l=o-C;for(s<=l?(o=Math.min(o-1,~~(C+l/2)),o=Math.max(0,o)):(o=Math.max(n,~~(C-1-s/2)),o=Math.min(x.dimension[r],o));!m[o];)o++;for(var c=_[o];!c&&m[o-1];)c=_[--o];return a.dimension[r]=o,i.dimension[e]=o+1,[a,i]}(v)},t}();e.default=o},17388:(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 a(t,e,r){var a=n(t,e,r);return o(a[0],a[1],a[2])}function i(t,e){var r=t[0],n=t[1],o=t[2],a=e[0],i=e[1],s=e[2],l=r-a,c=n-i,u=o-s,d=Math.sqrt(n*n+o*o),p=a-r,h=Math.sqrt(i*i+s*s)-d,g=Math.sqrt(l*l+c*c+u*u),f=Math.sqrt(g)>Math.sqrt(Math.abs(p))+Math.sqrt(Math.abs(h))?Math.sqrt(g*g-p*p-h*h):0;return p/=1,h/=1*(1+.045*d),f/=1*(1+.015*d),Math.sqrt(p*p+h*h+f*f)}function s(t,e){return i(a.apply(void 0,t),a.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,a=Math.max(t,e,r),i=Math.min(t,e,r),s=(a+i)/2;if(a===i)n=o=0;else{var l=a-i;switch(o=s>.5?l/(2-a-i):l/(a+i),a){case t:n=(e-r)/l+(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=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=i(l,s,t+1/3),o=i(l,s,t),a=i(l,s,t-1/3)}return[255*n,255*o,255*a]},e.rgbToXyz=n,e.xyzToCIELab=o,e.rgbToCIELab=a,e.deltaE94=i,e.rgbDiff=s,e.hexDiff=function(t,e){return s(r(t),r(e))},e.getColorDiffStatus=function(t){return t{}},a={};function i(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={id:t,loaded:!1,exports:{}};return o[t].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.m=o,e=[],i.O=(t,r,n,o)=>{if(!r){var a=1/0;for(u=0;u=o)&&Object.keys(i.O).every((t=>i.O[t](r[l])))?r.splice(l--,1):(s=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,n,o]},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.f={},i.e=t=>Promise.all(Object.keys(i.f).reduce(((e,r)=>(i.f[r](t,e),e)),[])),i.u=t=>t+"-"+t+".js?v="+{802:"4fc65efe0f2d990c9ac5",9291:"077955af818a227340aa"}[t],i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r={},n="nextcloud:",i.l=(t,e,o,a)=>{if(r[t])r[t].push(e);else{var s,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{s.onerror=s.onload=null,clearTimeout(h);var o=r[t];if(delete r[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((t=>t(n))),e)return e(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),l&&document.head.appendChild(s)}},i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),i.j=6673,(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t})(),(()=>{i.b=document.baseURI||self.location.href;var t={6673:0};i.f.j=(e,r)=>{var n=i.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=t[e]=[r,o]));r.push(n[2]=o);var a=i.p+i.u(e),s=new Error;i.l(a,(r=>{if(i.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,n[1](s)}}),"chunk-"+e,e)}},i.O.j=e=>0===t[e];var e=(e,r)=>{var n,o,a=r[0],s=r[1],l=r[2],c=0;if(a.some((e=>0!==t[e]))){for(n in s)i.o(s,n)&&(i.m[n]=s[n]);if(l)var u=l(i)}for(e&&e(r);ci(10340)));s=i.O(s)})(); //# sourceMappingURL=theming-personal-theming.js.map?v=66bf51c9407d034b09e5