/*! For license information please see theming-personal-theming.js.LICENSE.txt */ !function(){var e,n,r,o={65323:function(e,n,r){"use strict";var o=r(77958),i=r(20144);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:D(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function S(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}function E(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){S(i,r,o,a,l,"next",t)}function l(t){S(i,r,o,a,l,"throw",t)}a(void 0)}))}}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n.6},calculateLuma:function(t){var e,n,r=(e=this.hexToRGB(t),n=3,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,n)||function(t,e){if(t){if("string"==typeof t)return D(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(t,e):void 0}}(e,n)||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*r[0]+.7152*r[1]+.0722*r[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 E(k().mark((function n(){return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:e.backgroundImage=t.backgroundImage,e.Theming.color=t.backgroundColor,e.$emit("update:background"),e.loading=!1;case 4:case"end":return n.stop()}}),n)})))()},setDefault:function(){var t=this;return E(k().mark((function e(){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading="default",e.next=3,u.Z.post((0,l.generateUrl)("/apps/theming/background/default"));case 3:n=e.sent,t.update(n.data);case 5:case"end":return e.stop()}}),e)})))()},setShipped:function(t){var e=this;return E(k().mark((function n(){var r;return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.loading=t,n.next=3,u.Z.post((0,l.generateUrl)("/apps/theming/background/shipped"),{value:t});case 3:r=n.sent,e.update(r.data);case 5:case"end":return n.stop()}}),n)})))()},setFile:function(t){var e=arguments,n=this;return E(k().mark((function r(){var o,i;return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=e.length>1&&void 0!==e[1]?e[1]:null,n.loading="custom",r.next=4,u.Z.post((0,l.generateUrl)("/apps/theming/background/custom"),{value:t,color:o});case 4:i=r.sent,n.update(i.data);case 6:case"end":return r.stop()}}),r)})))()},removeBackground:function(){var t=this;return E(k().mark((function e(){var n;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading="remove",e.next=3,u.Z.delete((0,l.generateUrl)("/apps/theming/background/custom"));case 3:n=e.sent,t.update(n.data);case 5:case"end":return e.stop()}}),e)})))()},pickColor:function(t){var e=this;return E(k().mark((function n(){var r,o,i,a;return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.loading="color",i=(null==t||null===(r=t.target)||void 0===r||null===(r=r.dataset)||void 0===r?void 0:r.color)||(null===(o=e.Theming)||void 0===o?void 0:o.color)||"#0082c9",n.next=4,u.Z.post((0,l.generateUrl)("/apps/theming/background/color"),{color:i});case 4:a=n.sent,e.update(a.data);case 6:case"end":return n.stop()}}),n)})))()},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 n;e.applyFile(null===(n=t[0])||void 0===n?void 0:n.path)},type:"primary"}).build().pick()},applyFile:function(e){var n=this;return E(k().mark((function r(){var i,a,c,s,d,h;return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e&&"string"==typeof e&&0!==e.trim().length&&"/"!==e){r.next=4;break}return C.error("No valid background have been selected",{path:e}),(0,f.x2)(t("theming","No background has been selected")),r.abrupt("return");case 4:return n.loading="custom",i=null,a=null,r.prev=7,s=(0,l.generateRemoteUrl)("dav/files/"+(0,o.ts)().uid+e),r.next=11,u.Z.get(s,{responseType:"blob"});case 11:return i=r.sent,d=URL.createObjectURL(i.data),r.next=15,n.getColorPaletteFromBlob(d);case 15:h=r.sent,a=null==h||null===(c=h.DarkVibrant)||void 0===c?void 0:c.hex,n.setFile(e,a),C.debug("Extracted colour",a,"from custom image",e,h),r.next=25;break;case 21:r.prev=21,r.t0=r.catch(7),n.setFile(e),C.error("Unable to extract colour from custom image",{error:r.t0,path:e,response:i,color:a});case 25:case"end":return r.stop()}}),r,null,[[7,21]])})))()},getColorPaletteFromBlob:function(t){return new Promise((function(e,n){new(m())(t).getPalette((function(t,r){t&&n(t),e(r)}))}))}}},j=M,N=r(93379),B=r.n(N),F=r(7795),R=r.n(F),U=r(90569),G=r.n(U),Z=r(3565),H=r.n(Z),V=r(19216),Y=r.n(V),z=r(44589),q=r.n(z),X=r(36679),W={};W.styleTagTransform=q(),W.setAttributes=H(),W.insert=G().bind(null,"head"),W.domAPI=R(),W.insertStyleElement=Y(),B()(X.Z,W),X.Z&&X.Z.locals&&X.Z.locals;var $=(0,w.Z)(j,(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-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",{class:{"icon-loading":"default"===t.loading,"background background__default":!0,"background--active":"default"===t.backgroundImage},style:{"--border-color":t.Theming.defaultColor},attrs:{"aria-pressed":"default"===t.backgroundImage,"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",{class:{"background background__delete":!0,"background--active":t.isBackgroundDisabled},attrs:{"aria-pressed":t.isBackgroundDisabled,"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(n){return e("button",{key:n.name,class:{"background background__shipped":!0,"icon-loading":t.loading===n.name,"background--active":t.backgroundImage===n.name},style:{backgroundImage:"url("+n.preview+")","--border-color":n.details.primary_color},attrs:{title:n.details.attribution,"aria-label":n.details.description,"aria-pressed":t.backgroundImage===n.name,"data-color-bright":"dark"===n.details.theming,"data-user-theming-background-shipped":n.name,tabindex:"0"},on:{click:function(e){return t.setShipped(n.name)}}},[e("Check",{attrs:{size:44}})],1)}))],2)}),[],!1,null,"e836b210",null).exports,K=r(25108),Q={name:"ItemPreview",components:{NcCheckboxRadioSwitch:s.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,l.generateFilePath)("theming","img",this.theme.id+".jpg")},checked:{get:function(){return this.selected},set:function(t){K.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=r(22465),tt={};tt.styleTagTransform=q(),tt.setAttributes=H(),tt.insert=G().bind(null,"head"),tt.domAPI=R(),tt.insertStyleElement=Y(),B()(J.Z,tt),J.Z&&J.Z.locals&&J.Z.locals;var et=(0,w.Z)(Q,(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,nt=r(31352);function rt(t){return"function"==typeof t?t():(0,i.unref)(t)}i.default.util.warn,r(25108);const ot="undefined"!=typeof window&&"undefined"!=typeof document;function it(t){const e=Object.create(null);return n=>e[n]||(e[n]=t(n))}Object.prototype.toString;const at=/\B([A-Z])/g,lt=(it((t=>t.replace(at,"-$1").toLowerCase())),/-(\w)/g);it((t=>t.replace(lt,((t,e)=>e?e.toUpperCase():"")))),r(25108),ot&&window;const ct=ot?window.document:void 0;function ut(t){return ut="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},ut(t)}function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dt(){return dt=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 xt(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function kt(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Ct(t,e):Ct(t,e))||r&&t===n)return t;if(t===n)break}while(t=xt(t))}return null}var St,Et=/\s+/g;function Dt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(Et," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(Et," ")}}function Tt(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function Ot(t,e){var n="";if("string"==typeof t)n=t;else do{var r=Tt(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function It(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o=i:o<=i))return r;if(r===Lt())break;r=Rt(r,!1)}return!1}function jt(t,e,n){for(var r=0,o=0,i=t.children;o2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(n,["evt"]);qt.pluginEvent.bind(Ue)(t,e,ft({dragEl:$t,parentEl:Kt,ghostEl:Qt,rootEl:Jt,nextEl:te,lastDownEl:ee,cloneEl:ne,cloneHidden:re,dragStarted:ve,putSortable:ue,activeSortable:Ue.active,originalEvent:r,oldIndex:oe,oldDraggableIndex:ae,newIndex:ie,newDraggableIndex:le,hideGhostForTarget:Ne,unhideGhostForTarget:Be,cloneNowHidden:function(){re=!0},cloneNowShown:function(){re=!1},dispatchSortableEvent:function(t){Wt({sortable:e,name:t,originalEvent:r})}},o))};function Wt(t){!function(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,i=t.cloneEl,a=t.toEl,l=t.fromEl,c=t.oldIndex,u=t.newIndex,s=t.oldDraggableIndex,d=t.newDraggableIndex,f=t.originalEvent,h=t.putSortable,p=t.extraEventProperties;if(e=e||n&&n[Vt]){var g,v=e.options,m="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||pt||gt?(g=document.createEvent("Event")).initEvent(r,!0,!0):g=new CustomEvent(r,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=l||n,g.item=o||n,g.clone=i,g.oldIndex=c,g.newIndex=u,g.oldDraggableIndex=s,g.newDraggableIndex=d,g.originalEvent=f,g.pullMode=h?h.lastPutMode:void 0;var b=ft({},p,qt.getEventProperties(r,e));for(var y in b)g[y]=b[y];n&&n.dispatchEvent(g),v[m]&&v[m].call(e,g)}}(ft({putSortable:ue,cloneEl:ne,targetEl:$t,rootEl:Jt,oldIndex:oe,oldDraggableIndex:ae,newIndex:ie,newDraggableIndex:le},t))}var $t,Kt,Qt,Jt,te,ee,ne,re,oe,ie,ae,le,ce,ue,se,de,fe,he,pe,ge,ve,me,be,ye,Ae,we=!1,_e=!1,Ce=[],xe=!1,ke=!1,Se=[],Ee=!1,De=[],Te="undefined"!=typeof document,Oe=bt,Ie=gt||pt?"cssFloat":"float",Le=Te&&!yt&&!bt&&"draggable"in document.createElement("div"),Pe=function(){if(Te){if(pt)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Me=function(t,e){var n=Tt(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=jt(t,0,e),i=jt(t,1,e),a=o&&Tt(o),l=i&&Tt(i),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Pt(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Pt(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var s="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==s?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=r&&"none"===n[Ie]||i&&"none"===n[Ie]&&c+u>r)?"vertical":"horizontal"},je=function(t){function e(t,n){return function(r,o,i,a){var l=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,o,i,a),n)(r,o,i,a);var c=(n?r:o).options.group.name;return!0===t||"string"==typeof t&&t===c||t.join&&t.indexOf(c)>-1}}var n={},r=t.group;r&&"object"==ut(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Ne=function(){!Pe&&Qt&&Tt(Qt,"display","none")},Be=function(){!Pe&&Qt&&Tt(Qt,"display","")};Te&&document.addEventListener("click",(function(t){if(_e)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),_e=!1,!1}),!0);var Fe=function(t){if($t){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,i=t.clientY,Ce.some((function(t){if(!Nt(t)){var e=Pt(t),n=t[Vt].options.emptyInsertThreshold,r=o>=e.left-n&&o<=e.right+n,l=i>=e.top-n&&i<=e.bottom+n;return n&&r&&l?a=t:void 0}})),a);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Vt]._onDragOver(n)}}var o,i,a},Re=function(t){$t&&$t.parentNode[Vt]._isOutsideThisEl(t.target)};function Ue(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=dt({},e),t[Vt]=this;var n,r,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 Me(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!==Ue.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var i in qt.initializePlugins(this,t,o),o)!(i in e)&&(e[i]=o[i]);for(var a in je(e),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!e.forceFallback&&Le,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?wt(t,"pointerdown",this._onTapStart):(wt(t,"mousedown",this._onTapStart),wt(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(wt(t,"dragover",this),wt(t,"dragenter",this)),Ce.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),dt(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Tt(t,"display")&&t!==Ue.ghost){r.push({target:t,rect:Pt(t)});var e=ft({},r[r.length-1].rect);if(t.thisAnimationDuration){var n=Ot(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}}))},addAnimationState:function(t){r.push(t)},removeAnimationState:function(t){r.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}(r,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof t&&t());var o=!1,i=0;r.forEach((function(t){var n=0,r=t.target,a=r.fromRect,l=Pt(r),c=r.prevFromRect,u=r.prevToRect,s=t.rect,d=Ot(r,!0);d&&(l.top-=d.f,l.left-=d.e),r.toRect=l,r.thisAnimationDuration&&Ut(c,l)&&!Ut(a,l)&&(s.top-l.top)/(s.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(n=function(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}(s,c,u,e.options)),Ut(l,a)||(r.prevFromRect=a,r.prevToRect=l,n||(n=e.options.animation),e.animate(r,s,l,n)),n&&(o=!0,i=Math.max(i,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof t&&t()}),i):"function"==typeof t&&t(),r=[]},animate:function(t,e,n,r){if(r){Tt(t,"transition",""),Tt(t,"transform","");var o=Ot(this.el),i=o&&o.a,a=o&&o.d,l=(e.left-n.left)/(i||1),c=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!c,Tt(t,"transform","translate3d("+l+"px,"+c+"px,0)"),function(t){t.offsetWidth}(t),Tt(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Tt(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Tt(t,"transition",""),Tt(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}))}function Ge(t,e,n,r,o,i,a,l){var c,u,s=t[Vt],d=s.options.onMove;return!window.CustomEvent||pt||gt?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=e,c.from=t,c.dragged=n,c.draggedRect=r,c.related=o||e,c.relatedRect=i||Pt(e),c.willInsertAfter=l,c.originalEvent=a,t.dispatchEvent(c),d&&(u=d.call(s,c,a)),u}function Ze(t){t.draggable=!1}function He(){Ee=!1}function Ve(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Ye(t){return setTimeout(t,0)}function ze(t){return clearTimeout(t)}Ue.prototype={constructor:Ue,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(me=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,$t):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=r.filter;if(function(t){De.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&De.push(r)}}(n),!$t&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||r.disabled||c.isContentEditable||(l=kt(l,r.draggable,n,!1))&&l.animated||ee===l)){if(oe=Bt(l),ae=Bt(l,r.draggable),"function"==typeof u){if(u.call(this,t,l,this))return Wt({sortable:e,rootEl:c,name:"filter",targetEl:l,toEl:n,fromEl:n}),Xt("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(r){if(r=kt(c,r.trim(),n,!1))return Wt({sortable:e,rootEl:r,name:"filter",targetEl:l,fromEl:n,toEl:n}),Xt("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!kt(c,r.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var r,o=this,i=o.el,a=o.options,l=i.ownerDocument;if(n&&!$t&&n.parentNode===i){var c=Pt(n);if(Jt=i,Kt=($t=n).parentNode,te=$t.nextSibling,ee=n,ce=a.group,Ue.dragged=$t,se={target:$t,clientX:(e||t).clientX,clientY:(e||t).clientY},pe=se.clientX-c.left,ge=se.clientY-c.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,$t.style["will-change"]="all",r=function(){Xt("delayEnded",o,{evt:t}),Ue.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!vt&&o.nativeDraggable&&($t.draggable=!0),o._triggerDragStart(t,e),Wt({sortable:o,name:"choose",originalEvent:t}),Dt($t,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){It($t,t.trim(),Ze)})),wt(l,"dragover",Fe),wt(l,"mousemove",Fe),wt(l,"touchmove",Fe),wt(l,"mouseup",o._onDrop),wt(l,"touchend",o._onDrop),wt(l,"touchcancel",o._onDrop),vt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$t.draggable=!0),Xt("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(gt||pt))r();else{if(Ue.eventCanceled)return void this._onDrop();wt(l,"mouseup",o._disableDelayedDrag),wt(l,"touchend",o._disableDelayedDrag),wt(l,"touchcancel",o._disableDelayedDrag),wt(l,"mousemove",o._delayedDragTouchMoveHandler),wt(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&wt(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.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(){$t&&Ze($t),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;_t(t,"mouseup",this._disableDelayedDrag),_t(t,"touchend",this._disableDelayedDrag),_t(t,"touchcancel",this._disableDelayedDrag),_t(t,"mousemove",this._delayedDragTouchMoveHandler),_t(t,"touchmove",this._delayedDragTouchMoveHandler),_t(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?wt(document,"pointermove",this._onTouchMove):wt(document,e?"touchmove":"mousemove",this._onTouchMove):(wt($t,"dragend",this),wt(Jt,"dragstart",this._onDragStart));try{document.selection?Ye((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(we=!1,Jt&&$t){Xt("dragStarted",this,{evt:e}),this.nativeDraggable&&wt(document,"dragover",Re);var n=this.options;!t&&Dt($t,n.dragClass,!1),Dt($t,n.ghostClass,!0),Ue.active=this,t&&this._appendGhost(),Wt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(de){this._lastX=de.clientX,this._lastY=de.clientY,Ne();for(var t=document.elementFromPoint(de.clientX,de.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(de.clientX,de.clientY))!==e;)e=t;if($t.parentNode[Vt]._isOutsideThisEl(t),e)do{if(e[Vt]&&e[Vt]._onDragOver({clientX:de.clientX,clientY:de.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);Be()}},_onTouchMove:function(t){if(se){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,i=Qt&&Ot(Qt,!0),a=Qt&&i&&i.a,l=Qt&&i&&i.d,c=Oe&&Ae&&Ft(Ae),u=(o.clientX-se.clientX+r.x)/(a||1)+(c?c[0]-Se[0]:0)/(a||1),s=(o.clientY-se.clientY+r.y)/(l||1)+(c?c[1]-Se[1]:0)/(l||1);if(!Ue.active&&!we){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))r.right+10||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+10}(t,o,this)&&!g.animated){if(g===$t)return O(!1);if(g&&i===t.target&&(a=g),a&&(n=Pt(a)),!1!==Ge(Jt,i,$t,e,a,n,t,!!a))return T(),i.appendChild($t),Kt=i,I(),O(!0)}else if(a.parentNode===i){n=Pt(a);var v,m,b,y=$t.parentNode!==i,A=!function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,i=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,c=n?e.width:e.height;return r===a||o===l||r+i/2===a+c/2}($t.animated&&$t.toRect||e,a.animated&&a.toRect||n,o),w=o?"top":"left",_=Mt(a,"top","top")||Mt($t,"top","top"),C=_?_.scrollTop:void 0;if(me!==a&&(m=n[w],xe=!1,ke=!A&&l.invertSwap||y),v=function(t,e,n,r,o,i,a,l){var c=r?t.clientY:t.clientX,u=r?n.height:n.width,s=r?n.top:n.left,d=r?n.bottom:n.right,f=!1;if(!a)if(l&&yes+u*i/2:cd-ye)return-be}else if(c>s+u*(1-o)/2&&cd-u*i/2)?c>s+u/2?1:-1:0}(t,a,n,o,A?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ke,me===a),0!==v){var x=Bt($t);do{x-=v,b=Kt.children[x]}while(b&&("none"===Tt(b,"display")||b===Qt))}if(0===v||b===a)return O(!1);me=a,be=v;var k=a.nextElementSibling,S=!1,E=Ge(Jt,i,$t,e,a,n,t,S=1===v);if(!1!==E)return 1!==E&&-1!==E||(S=1===E),Ee=!0,setTimeout(He,30),T(),S&&!k?i.appendChild($t):a.parentNode.insertBefore($t,S?k:a),_&&Zt(_,0,C-_.scrollTop),Kt=$t.parentNode,void 0===m||ke||(ye=Math.abs(m-Pt(a)[w])),I(),O(!0)}if(i.contains($t))return O(!1)}return!1}function D(l,c){Xt(l,h,ft({evt:t,isOwner:s,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:d,fromSortable:f,target:a,completed:O,onMove:function(n,r){return Ge(Jt,i,$t,e,n,Pt(n),t,r)},changed:I},c))}function T(){D("dragOverAnimationCapture"),h.captureAnimationState(),h!==f&&f.captureAnimationState()}function O(e){return D("dragOverCompleted",{insertion:e}),e&&(s?u._hideClone():u._showClone(h),h!==f&&(Dt($t,ue?ue.options.ghostClass:u.options.ghostClass,!1),Dt($t,l.ghostClass,!0)),ue!==h&&h!==Ue.active?ue=h:h===Ue.active&&ue&&(ue=null),f===h&&(h._ignoreWhileAnimating=a),h.animateAll((function(){D("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===$t&&!$t.animated||a===i&&!a.animated)&&(me=null),l.dragoverBubble||t.rootEl||a===document||($t.parentNode[Vt]._isOutsideThisEl(t.target),!e&&Fe(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),p=!0}function I(){ie=Bt($t),le=Bt($t,l.draggable),Wt({sortable:h,name:"change",toEl:i,newIndex:ie,newDraggableIndex:le,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){_t(document,"mousemove",this._onTouchMove),_t(document,"touchmove",this._onTouchMove),_t(document,"pointermove",this._onTouchMove),_t(document,"dragover",Fe),_t(document,"mousemove",Fe),_t(document,"touchmove",Fe)},_offUpEvents:function(){var t=this.el.ownerDocument;_t(t,"mouseup",this._onDrop),_t(t,"touchend",this._onDrop),_t(t,"pointerup",this._onDrop),_t(t,"touchcancel",this._onDrop),_t(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;ie=Bt($t),le=Bt($t,n.draggable),Xt("drop",this,{evt:t}),Kt=$t&&$t.parentNode,ie=Bt($t),le=Bt($t,n.draggable),Ue.eventCanceled||(we=!1,ke=!1,xe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ze(this.cloneId),ze(this._dragStartId),this.nativeDraggable&&(_t(document,"drop",this),_t(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),mt&&Tt(document.body,"user-select",""),Tt($t,"transform",""),t&&(ve&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Qt&&Qt.parentNode&&Qt.parentNode.removeChild(Qt),(Jt===Kt||ue&&"clone"!==ue.lastPutMode)&&ne&&ne.parentNode&&ne.parentNode.removeChild(ne),$t&&(this.nativeDraggable&&_t($t,"dragend",this),Ze($t),$t.style["will-change"]="",ve&&!we&&Dt($t,ue?ue.options.ghostClass:this.options.ghostClass,!1),Dt($t,this.options.chosenClass,!1),Wt({sortable:this,name:"unchoose",toEl:Kt,newIndex:null,newDraggableIndex:null,originalEvent:t}),Jt!==Kt?(ie>=0&&(Wt({rootEl:Kt,name:"add",toEl:Kt,fromEl:Jt,originalEvent:t}),Wt({sortable:this,name:"remove",toEl:Kt,originalEvent:t}),Wt({rootEl:Kt,name:"sort",toEl:Kt,fromEl:Jt,originalEvent:t}),Wt({sortable:this,name:"sort",toEl:Kt,originalEvent:t})),ue&&ue.save()):ie!==oe&&ie>=0&&(Wt({sortable:this,name:"update",toEl:Kt,originalEvent:t}),Wt({sortable:this,name:"sort",toEl:Kt,originalEvent:t})),Ue.active&&(null!=ie&&-1!==ie||(ie=oe,le=ae),Wt({sortable:this,name:"end",toEl:Kt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Xt("nulling",this),Jt=$t=Kt=Qt=te=ne=ee=re=se=de=ve=ie=le=oe=ae=me=be=ue=ce=Ue.dragged=Ue.ghost=Ue.clone=Ue.active=null,De.forEach((function(t){t.checked=!0})),De.length=fe=he=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":$t&&(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=[],n=this.el.children,r=0,o=n.length,i=this.options;r{!function(t,e,n){const r=(0,i.isRef)(t),o=r?[...rt(t)]:rt(t);if(n>=0&&n{o.splice(n,0,a),r&&(t.value=o)}))}}(e,t.oldIndex,t.newIndex)}},c=()=>{const e="string"==typeof t?null==o?void 0:o.querySelector(t):function(t){var e;const n=rt(t);return null!=(e=null==n?void 0:n.$el)?e:n}(t);e&&(r=new cn(e,{...l,...a}))},u=()=>null==r?void 0:r.destroy();return function(t,e=!0){(0,i.getCurrentInstance)()?(0,i.onMounted)(t):e?t():(0,i.nextTick)(t)}(c),s=u,!!(0,i.getCurrentScope)()&&(0,i.onScopeDispose)(s),{stop:u,start:c,option:(t,e)=>{if(void 0===e)return null==r?void 0:r.option(t);null==r||r.option(t,e)}};var s}var sn=r(74139),dn=r(76236),fn=r(85313),hn=r(57274),pn=(0,i.defineComponent)({name:"AppOrderSelectorElement",components:{IconArrowDown:dn.Z,IconArrowUp:fn.Z,NcButton:hn.Z},props:{ariaDescribedby:{type:String,default:null},ariaDetails:{type:String,default:null},app:{type:Object,required:!0},isFirst:{type:Boolean,default:!1},isLast:{type:Boolean,default:!1}},emits:{"move:up":function(){return!0},"move:down":function(){return!0},"update:focus":function(){return!0}},setup:function(t,e){var n=e.emit,r=(0,i.ref)(),o=(0,i.ref)(),a=0;return{buttonUp:r,buttonDown:o,moveUp:function(){n("move:up"),a=1},moveDown:function(){n("move:down"),a=-1},keepFocus:function(){0!==a&&(1!==a&&!t.isLast||t.isFirst?(0,i.nextTick)((function(){return o.value.$el.focus()})):(0,i.nextTick)((function(){return r.value.$el.focus()}))),a=0},t:nt.Iu}}}),gn=r(77004),vn={};vn.styleTagTransform=q(),vn.setAttributes=H(),vn.insert=G().bind(null,"head"),vn.domAPI=R(),vn.insertStyleElement=Y(),B()(gn.Z,vn),gn.Z&&gn.Z.locals&&gn.Z.locals;var mn=(0,w.Z)(pn,(function(){var t,e=this,n=e._self._c;return e._self._setupProxy,n("li",{class:{"order-selector-element":!0,"order-selector-element--disabled":e.app.default},attrs:{"data-cy-app-order-element":e.app.id},on:{focusin:function(t){return e.$emit("update:focus")}}},[n("svg",{attrs:{width:"20",height:"20",viewBox:"0 0 20 20",role:"presentation"}},[n("image",{staticClass:"order-selector-element__icon",attrs:{preserveAspectRatio:"xMinYMin meet",x:"0",y:"0",width:"20",height:"20","xlink:href":e.app.icon}})]),e._v(" "),n("div",{staticClass:"order-selector-element__label"},[e._v("\n\t\t"+e._s(null!==(t=e.app.label)&&void 0!==t?t:e.app.id)+"\n\t")]),e._v(" "),n("div",{staticClass:"order-selector-element__actions"},[n("NcButton",{directives:[{name:"show",rawName:"v-show",value:!e.isFirst&&!e.app.default,expression:"!isFirst && !app.default"}],ref:"buttonUp",attrs:{"aria-label":e.t("settings","Move up"),"aria-describedby":e.ariaDescribedby,"aria-details":e.ariaDetails,"data-cy-app-order-button":"up",type:"tertiary-no-background"},on:{click:e.moveUp},scopedSlots:e._u([{key:"icon",fn:function(){return[n("IconArrowUp",{attrs:{size:20}})]},proxy:!0}])}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isFirst||!!e.app.default,expression:"isFirst || !!app.default"}],staticClass:"order-selector-element__placeholder",attrs:{"aria-hidden":"true"}}),e._v(" "),n("NcButton",{directives:[{name:"show",rawName:"v-show",value:!e.isLast&&!e.app.default,expression:"!isLast && !app.default"}],ref:"buttonDown",attrs:{"aria-label":e.t("settings","Move down"),"aria-describedby":e.ariaDescribedby,"aria-details":e.ariaDetails,"data-cy-app-order-button":"down",type:"tertiary-no-background"},on:{click:e.moveDown},scopedSlots:e._u([{key:"icon",fn:function(){return[n("IconArrowDown",{attrs:{size:20}})]},proxy:!0}])}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isLast||!!e.app.default,expression:"isLast || !!app.default"}],staticClass:"order-selector-element__placeholder",attrs:{"aria-hidden":"true"}})],1)])}),[],!1,null,"081ebc45",null).exports;function bn(t){return function(t){if(Array.isArray(t))return yn(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 yn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yn(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 yn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0?t.value.slice(0,e):[];r.push(t.value[e+1]);var o=e1?t.value.slice(0,e-1):[];if(null===(r=t.value[e-1])||void 0===r||!r.default){var i=[t.value[e-1]];e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function In(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}function Ln(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){In(i,r,o,a,l,"next",t)}function l(t){In(i,r,o,a,l,"throw",t)}a(void 0)}))}}function Pn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0),s=(0,i.computed)((function(){return o.some((function(t,e){return t.id!==g.value[e].id}))})),d="theming-apporder-changed-infocard",h="theming-apporder-changed-infocard",p=(0,i.computed)((function(){return(s.value?"".concat(d," "):"")+(r?h:"")})),g=(0,i.ref)(function(t){if(Array.isArray(t))return Pn(t)}(t=o)||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 Pn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pn(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.")}()),v=function(){var t=Ln(On().mark((function t(){var e,n;return On().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,m("apporder",[]);case 3:return a.value=!1,t.next=6,u.Z.get((0,l.generateOcsUrl)("/core/navigation/apps"),{headers:{"OCS-APIRequest":"true"}});case 6:e=t.sent,n=e.data,g.value=n.ocs.data.map((function(t){return jn(jn({},t),{},{label:t.name,default:t.default&&t.app===r})})),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),Dn.warn(t.t0),(0,f.x2)((0,nt.Iu)("theming","Could not reset the app order"));case 15:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(){return t.apply(this,arguments)}}(),m=function(){var t=Ln(On().mark((function t(e,n){var r;return On().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,l.generateOcsUrl)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"core",configKey:e}),t.next=3,u.Z.post(r,{configValue:JSON.stringify(n)});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}();return{appOrder:g,updateAppOrder:function(t){var e={};t.forEach((function(t,n){var r=t.app,o=t.key;e[r]=jn(jn({},e[r]),{},Nn({},o,n))})),m("apporder",e).then((function(){g.value=t,a.value=!0})).catch((function(t){Dn.warn("Could not set the app order",t),(0,f.x2)((0,nt.Iu)("theming","Could not set the app order"))}))},resetAppOrder:v,enforcedDefaultApp:r,hasAppOrderChanged:s,hasCustomAppOrder:a,ariaDetailsAppOrder:p,elementIdAppOrderChanged:d,elementIdEnforcedDefaultApp:h,t:nt.Iu}}}),Fn=Bn,Rn=r(1563),Un={};Un.styleTagTransform=q(),Un.setAttributes=H(),Un.insert=G().bind(null,"head"),Un.domAPI=R(),Un.insertStyleElement=Y(),B()(Rn.Z,Un),Rn.Z&&Rn.Z.locals&&Rn.Z.locals;var Gn=(0,w.Z)(Fn,(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,"0b68cf15",null).exports,Zn=r(25108);function Hn(t){return Hn="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},Hn(t)}function Vn(){Vn=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),l=new k(o||[]);return r(a,"_invoke",{value:w(t,n,l)}),a}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function h(){}function p(){}var g={};c(g,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==e&&n.call(m,i)&&(g=m);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(r,i,a,l){var c=s(t[r],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==Hn(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=_(a,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=s(r,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 C(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,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 r=-1,o=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function Yn(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}function zn(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Yn(i,r,o,a,l,"next",t)}function l(t){Yn(i,r,o,a,l,"throw",t)}a(void 0)}))}}function qn(t){return function(t){if(Array.isArray(t))return Xn(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 Xn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xn(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 Xn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n")},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(){qn(document.head.querySelectorAll("link.theme")).forEach((function(t){var e=new URL(t.href);e.searchParams.set("v",Date.now());var n=t.cloneNode();n.href=e.toString(),n.onload=function(){return t.remove()},document.head.append(n)}))},updateBackground:function(t){this.background="custom"===t.type||"default"===t.type?t.type:t.value,this.refreshGlobalStyles()},changeTheme:function(t){var e=t.enabled,n=t.id;this.themes.forEach((function(t){t.id===n&&e?t.enabled=!0:t.enabled=!1})),this.updateBodyAttributes(),this.selectItem(e,n)},changeFont:function(t){var e=t.enabled,n=t.id;this.fonts.forEach((function(t){t.id===n&&e?t.enabled=!0:t.enabled=!1})),this.updateBodyAttributes(),this.selectItem(e,n)},changeShortcutsDisabled:function(t){return zn(Vn().mark((function e(){return Vn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=5;break}return e.next=3,(0,u.Z)({url:(0,l.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,u.Z)({url:(0,l.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(qn(t),qn(e)).join(","))},selectItem:function(e,n){return zn(Vn().mark((function r(){return Vn().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,!e){r.next=6;break}return r.next=4,(0,u.Z)({url:(0,l.generateOcsUrl)("apps/theming/api/v1/theme/{themeId}/enable",{themeId:n}),method:"PUT"});case 4:r.next=8;break;case 6:return r.next=8,(0,u.Z)({url:(0,l.generateOcsUrl)("apps/theming/api/v1/theme/{themeId}",{themeId:n}),method:"DELETE"});case 8:r.next=14;break;case 10:r.prev=10,r.t0=r.catch(0),Zn.error(r.t0,r.t0.response),OC.Notification.showTemporary(t("theming",r.t0.response.data.ocs.meta.message+". Unable to apply the setting."));case 14:case"end":return r.stop()}}),r,null,[[0,10]])})))()}}},tr=r(67053),er={};er.styleTagTransform=q(),er.setAttributes=H(),er.insert=G().bind(null,"head"),er.domAPI=R(),er.insertStyleElement=Y(),B()(tr.Z,er),tr.Z&&tr.Z.locals&&tr.Z.locals;var nr=(0,w.Z)(Jn,(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(n){return e("ItemPreview",{key:n.id,attrs:{enforced:n.id===t.enforceTheme,selected:t.selectedTheme.id===n.id,theme:n,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(n){return e("ItemPreview",{key:n.id,attrs:{selected:n.enabled,theme:n,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),t._v(" "),e("UserAppMenuSection")],1)}),[],!1,null,"552ffff3",null).exports;r.nc=btoa((0,o.IH)()),i.default.prototype.OC=OC,i.default.prototype.t=t;var rr=new(i.default.extend(nr));rr.$mount("#theming"),rr.$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 n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?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 n=t.cloneNode();n.href=e.toString(),n.onload=function(){return t.remove()},document.head.append(n)}))}))},67053:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".theming p[data-v-552ffff3]{max-width:800px}.theming[data-v-552ffff3] a{font-weight:bold}.theming[data-v-552ffff3] a:hover,.theming[data-v-552ffff3] a:focus{text-decoration:underline}.theming__preview-list[data-v-552ffff3]{--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-552ffff3]{margin-top:30px}@media(max-width: 1440px){.theming__preview-list[data-v-552ffff3]{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},78741:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".order-selector[data-v-df3bf8da]{width:max-content;min-width:260px}","",{version:3,sources:["webpack://./apps/theming/src/components/AppOrderSelector.vue"],names:[],mappings:"AACA,iCACC,iBAAA,CACA,eAAA",sourcesContent:["\n.order-selector {\n\twidth: max-content;\n\tmin-width: 260px; // align with NcSelect\n}\n"],sourceRoot:""}]),e.Z=a},77004:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".order-selector-element[data-v-081ebc45]{list-style:none;display:flex;flex-direction:row;align-items:center;gap:12px;padding-inline:12px}.order-selector-element[data-v-081ebc45]:hover{background-color:var(--color-background-hover);border-radius:var(--border-radius-large)}.order-selector-element--disabled[data-v-081ebc45]{border-color:var(--color-text-maxcontrast);color:var(--color-text-maxcontrast)}.order-selector-element--disabled .order-selector-element__icon[data-v-081ebc45]{opacity:75%}.order-selector-element__actions[data-v-081ebc45]{flex:0 0;display:flex;flex-direction:row;gap:6px}.order-selector-element__label[data-v-081ebc45]{flex:1 1;text-overflow:ellipsis;overflow:hidden}.order-selector-element__placeholder[data-v-081ebc45]{height:44px;width:44px}.order-selector-element__icon[data-v-081ebc45]{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",sourcesContent:["\n.order-selector-element {\n\t// hide default styling\n\tlist-style: none;\n\t// Align children\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\t// Spacing\n\tgap: 12px;\n\tpadding-inline: 12px;\n\n\t&:hover {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t}\n\n\t&--disabled {\n\t\tborder-color: var(--color-text-maxcontrast);\n\t\tcolor: var(--color-text-maxcontrast);\n\n\t\t.order-selector-element__icon {\n\t\t\topacity: 75%;\n\t\t}\n\t}\n\n\t&__actions {\n\t\tflex: 0 0;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tgap: 6px;\n\t}\n\n\t&__label {\n\t\tflex: 1 1;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t}\n\n\t&__placeholder {\n\t\theight: 44px;\n\t\twidth: 44px;\n\t}\n\n\t&__icon {\n\t\tfilter: var(--background-invert-if-bright);\n\t}\n}\n"],sourceRoot:""}]),e.Z=a},36679:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".background-selector[data-v-e836b210]{display:flex;flex-wrap:wrap;justify-content:center}.background-selector .background[data-v-e836b210]{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-e836b210]{color:#fff;background-image:var(--image-background)}.background-selector .background__default[data-v-e836b210]{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-e836b210],.background-selector .background__default[data-v-e836b210],.background-selector .background__color[data-v-e836b210]{border-color:var(--color-border)}.background-selector .background__color[data-v-e836b210]{color:var(--color-primary-text);background-color:var(--color-primary-default)}.background-selector .background__default[data-v-e836b210],.background-selector .background__shipped[data-v-e836b210]{color:#fff}.background-selector .background[data-color-bright][data-v-e836b210]{color:#000}.background-selector .background--active[data-v-e836b210],.background-selector .background[data-v-e836b210]:hover,.background-selector .background[data-v-e836b210]:focus{outline:2px solid var(--color-main-text) !important;border-color:var(--color-main-background) !important}.background-selector .background span[data-v-e836b210]{margin:4px}.background-selector .background .check-icon[data-v-e836b210]{display:none}.background-selector .background--active:not(.icon-loading) .check-icon[data-v-e836b210]{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,0KAGC,mDAAA,CACA,oDAAA,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\toutline: 2px solid var(--color-main-text) !important;\n\t\t\tborder-color: var(--color-main-background) !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,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.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},1563:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".user-app-menu-order[data-v-0b68cf15]{margin-block:12px}","",{version:3,sources:["webpack://./apps/theming/src/components/UserAppMenuSection.vue"],names:[],mappings:"AACA,sCACC,iBAAA",sourcesContent:["\n.user-app-menu-order {\n\tmargin-block: 12px;\n}\n"],sourceRoot:""}]),e.Z=a},89881:function(t,e,n){var r=n(47816),o=n(99291)(r);t.exports=o},80760:function(t,e,n){var r=n(89881);t.exports=function(t,e){var n=[];return r(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}},47816:function(t,e,n){var r=n(28483),o=n(3674);t.exports=function(t,e){return t&&r(t,e,o)}},99291:function(t,e,n){var r=n(98612);t.exports=function(t,e){return function(n,o){if(null==n)return n;if(!r(n))return t(n,o);for(var i=n.length,a=e?i:-1,l=Object(n);(e?a--:++a2?e[2]:void 0;for(u&&i(e[0],e[1],u)&&(r=1);++n0&&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,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Swatch=void 0;var r=n(67294),o=n(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 n=t.r,r=t.g,o=t.b;return e(n,r,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],n=t[1],o=t[2];this._hsl=r.rgbToHsl(e,n,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],n=t[1],o=t[2];this._hex=r.rgbToHex(e,n,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,n,r){return r>=125&&!(t>250&&e>250&&n>250)}},63096:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineFilters=void 0;var r=n(68498);Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return r.default}}),e.combineFilters=function(t){return Array.isArray(t)&&0!==t.length?function(e,n,r,o){if(0===o)return!1;for(var i=0;i=l&&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,n,r,o,i,a){function l(t,e){return 1-Math.abs(t-e)}return function(){for(var t=[],e=0;ed)&&(s=e,d=g)}})),s}e.default=function(t,e){e=i({},e,a);var n=function(t){var e=0;return t.forEach((function(t){e=Math.max(e,t.getPopulation())})),e}(t),c=function(t,e,n){var r={};return r.Vibrant=l(r,t,e,n.targetNormalLuma,n.minNormalLuma,n.maxNormalLuma,n.targetVibrantSaturation,n.minVibrantSaturation,1,n),r.LightVibrant=l(r,t,e,n.targetLightLuma,n.minLightLuma,1,n.targetVibrantSaturation,n.minVibrantSaturation,1,n),r.DarkVibrant=l(r,t,e,n.targetDarkLuma,0,n.maxDarkLuma,n.targetVibrantSaturation,n.minVibrantSaturation,1,n),r.Muted=l(r,t,e,n.targetNormalLuma,n.minNormalLuma,n.maxNormalLuma,n.targetMutesSaturation,0,n.maxMutesSaturation,n),r.LightMuted=l(r,t,e,n.targetLightLuma,n.minLightLuma,1,n.targetMutesSaturation,0,n.maxMutesSaturation,n),r.DarkMuted=l(r,t,e,n.targetDarkLuma,0,n.maxDarkLuma,n.targetMutesSaturation,0,n.maxMutesSaturation,n),r}(t,n,e);return function(t,e,n){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],l=i[1],c=i[2];c=n.targetDarkLuma,t.DarkVibrant=new r.Swatch(o.hslToRgb(a,l,c),0)}if(null===t.LightVibrant&&null!==t.LightMuted){var u=t.LightMuted.getHsl();a=u[0],l=u[1],c=u[2],c=n.targetDarkLuma,t.DarkVibrant=new r.Swatch(o.hslToRgb(a,l,c),0)}}if(null===t.Vibrant&&null!==t.DarkVibrant){var s=t.DarkVibrant.getHsl();a=s[0],l=s[1],c=s[2],c=n.targetNormalLuma,t.Vibrant=new r.Swatch(o.hslToRgb(a,l,c),0)}else if(null===t.Vibrant&&null!==t.LightVibrant){var d=t.LightVibrant.getHsl();a=d[0],l=d[1],c=d[2],c=n.targetNormalLuma,t.Vibrant=new r.Swatch(o.hslToRgb(a,l,c),0)}if(null===t.DarkVibrant&&null!==t.Vibrant){var f=t.Vibrant.getHsl();a=f[0],l=f[1],c=f[2],c=n.targetDarkLuma,t.DarkVibrant=new r.Swatch(o.hslToRgb(a,l,c),0)}if(null===t.LightVibrant&&null!==t.Vibrant){var h=t.Vibrant.getHsl();a=h[0],l=h[1],c=h[2],c=n.targetLightLuma,t.LightVibrant=new r.Swatch(o.hslToRgb(a,l,c),0)}if(null===t.Muted&&null!==t.Vibrant){var p=t.Vibrant.getHsl();a=p[0],l=p[1],c=p[2],c=n.targetMutesSaturation,t.Muted=new r.Swatch(o.hslToRgb(a,l,c),0)}if(null===t.DarkMuted&&null!==t.DarkVibrant){var g=t.DarkVibrant.getHsl();a=g[0],l=g[1],c=g[2],c=n.targetMutesSaturation,t.DarkMuted=new r.Swatch(o.hslToRgb(a,l,c),0)}if(null===t.LightMuted&&null!==t.LightVibrant){var v=t.LightVibrant.getHsl();a=v[0],l=v[1],c=v[2],c=n.targetMutesSaturation,t.LightMuted=new r.Swatch(o.hslToRgb(a,l,c),0)}}(c,0,e),c}},77234:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(73977);Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return r.default}})},83614:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImageBase=void 0;var n=function(){function t(){}return t.prototype.scaleDown=function(t){var e=this.getWidth(),n=this.getHeight(),r=1;if(t.maxDimension>0){var o=Math.max(e,n);o>t.maxDimension&&(r=t.maxDimension/o)}else r=1/t.quality;r<1&&this.resize(e*r,n*r,r)},t.prototype.applyFilter=function(t){var e=this.getImageData();if("function"==typeof t)for(var n=e.data,r=n.length/4,o=void 0,i=0;i0))break;var o=r.split(),i=o[0],a=o[1];if(t.push(i),a&&a.count()>0&&t.push(a),t.size()===n)break;n=t.size()}}e.default=function(t,e){if(0===t.length||e.colorCount<2||e.colorCount>256)throw new Error("Wrong MMCQ parameters");var n=i.default.build(t),r=n.hist,c=(Object.keys(r).length,new a.default((function(t,e){return t.count()-e.count()})));c.push(n),l(c,.75*e.colorCount);var u=new a.default((function(t,e){return t.count()*t.volume()-e.count()*e.volume()}));return u.contents=c.contents,l(u,e.colorCount-u.size()),function(t){for(var e=[];t.size();){var n=t.pop(),r=n.avg();r[0],r[1],r[2],e.push(new o.Swatch(r,n.count()))}return e}(u)}},37514:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=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=n},5828:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(67294),o=function(){function t(t,e,n,r,o,i,a){this._volume=-1,this._count=-1,this.dimension={r1:t,r2:e,g1:n,g2:r,b1:o,b2:i},this.hist=a}return t.build=function(e,n){var o,i,a,l,c,u,s,d,f,h=1<<3*r.SIGBITS,p=new Uint32Array(h);o=a=c=0,i=l=u=Number.MAX_VALUE;for(var g=e.length/4,v=0;v>=r.RSHIFT,d>>=r.RSHIFT,f>>=r.RSHIFT,p[r.getColorIndex(s,d,f)]+=1,s>o&&(o=s),sa&&(a=d),dc&&(c=f),f>=r.RSHIFT,n>>=r.RSHIFT,o>>=r.RSHIFT,e>=a&&e<=l&&n>=c&&n<=u&&o>=s&&o<=d},t.prototype.split=function(){var t=this.hist,e=this.dimension,n=e.r1,o=e.r2,i=e.g1,a=e.g2,l=e.b1,c=e.b2,u=this.count();if(!u)return[];if(1===u)return[this.clone()];var s,d,f=o-n+1,h=a-i+1,p=c-l+1,g=Math.max(f,h,p),v=null;s=d=0;var m=null;if(g===f){m="r",v=new Uint32Array(o+1);for(var b=n;b<=o;b++){s=0;for(var y=i;y<=a;y++)for(var A=l;A<=c;A++)s+=t[r.getColorIndex(b,y,A)];d+=s,v[b]=d}}else if(g===h)for(m="g",v=new Uint32Array(a+1),y=i;y<=a;y++){for(s=0,b=n;b<=o;b++)for(A=l;A<=c;A++)s+=t[r.getColorIndex(b,y,A)];d+=s,v[y]=d}else for(m="b",v=new Uint32Array(c+1),A=l;A<=c;A++){for(s=0,b=n;b<=o;b++)for(y=i;y<=a;y++)s+=t[r.getColorIndex(b,y,A)];d+=s,v[A]=d}for(var w=-1,_=new Uint32Array(v.length),C=0;Cd/2&&(w=C),_[C]=d-x}var k=this;return function(t){var e=t+"1",n=t+"2",r=k.dimension[e],o=k.dimension[n],i=k.clone(),a=k.clone(),l=w-r,c=o-w;for(l<=c?(o=Math.min(o-1,~~(w+c/2)),o=Math.max(0,o)):(o=Math.max(r,~~(w-1-l/2)),o=Math.min(k.dimension[n],o));!v[o];)o++;for(var u=_[o];!u&&v[o-1];)u=_[--o];return i.dimension[n]=o,a.dimension[e]=o+1,[i,a]}(m)},t}();e.default=o},67294:function(t,e){"use strict";function n(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 r(t,e,n){return e/=255,n/=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,n=n>.04045?Math.pow((n+.005)/1.055,2.4):n/12.92,[.4124*(t*=100)+.3576*(e*=100)+.1805*(n*=100),.2126*t+.7152*e+.0722*n,.0193*t+.1192*e+.9505*n]}function o(t,e,n){return e/=100,n/=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-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function i(t,e,n){var i=r(t,e,n);return o(i[0],i[1],i[2])}function a(t,e){var n=t[0],r=t[1],o=t[2],i=e[0],a=e[1],l=e[2],c=n-i,u=r-a,s=o-l,d=Math.sqrt(r*r+o*o),f=i-n,h=Math.sqrt(a*a+l*l)-d,p=Math.sqrt(c*c+u*u+s*s),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 l(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,n=new Promise((function(n,r){t=n,e=r}));return{resolve:t,reject:e,promise:n}},e.hexToRgb=n,e.rgbToHex=function(t,e,n){return"#"+((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1,7)},e.rgbToHsl=function(t,e,n){t/=255,e/=255,n/=255;var r,o,i=Math.max(t,e,n),a=Math.min(t,e,n),l=(i+a)/2;if(i===a)r=o=0;else{var c=i-a;switch(o=l>.5?c/(2-i-a):c/(i+a),i){case t:r=(e-n)/c+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(0===e)r=o=i=n;else{var l=n<.5?n*(1+e):n+e-n*e,c=2*n-l;r=a(c,l,t+1/3),o=a(c,l,t),i=a(c,l,t-1/3)}return[255*r,255*o,255*i]},e.rgbToXyz=r,e.xyzToCIELab=o,e.rgbToCIELab=i,e.deltaE94=a,e.rgbDiff=l,e.hexDiff=function(t,e){return l(n(t),n(e))},e.getColorDiffStatus=function(t){return t=o)&&Object.keys(a.O).every((function(t){return a.O[t](n[c])}))?n.splice(c--,1):(l=!1,o0&&e[s-1][2]>o;s--)e[s]=e[s-1];e[s]=[n,r,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 n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.f={},a.e=function(t){return Promise.all(Object.keys(a.f).reduce((function(e,n){return a.f[n](t,e),e}),[]))},a.u=function(t){return t+"-"+t+".js?v="+{2250:"34f75a254de23027f023",7608:"79fdfed407dde075e048"}[t]},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)},n={},r="nextcloud:",a.l=function(t,e,o,i){if(n[t])n[t].push(e);else{var l,c;if(void 0!==o)for(var u=document.getElementsByTagName("script"),s=0;s-1&&!t;)t=n[r--].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,n){var r=a.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,o){r=t[e]=[n,o]}));n.push(r[2]=o);var i=a.p+a.u(e),l=new Error;a.l(i,(function(n){if(a.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+e+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,r[1](l)}}),"chunk-"+e,e)}},a.O.j=function(e){return 0===t[e]};var e=function(e,n){var r,o,i=n[0],l=n[1],c=n[2],u=0;if(i.some((function(e){return 0!==t[e]}))){for(r in l)a.o(l,r)&&(a.m[r]=l[r]);if(c)var s=c(a)}for(e&&e(n);u