You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
59 KiB
2 lines
59 KiB
import{ao as bn,R as yn,r as Y,b as $e,G as He,a7 as Ie,o as b,g as E,h as _,t as A,i as $,m as te,c as nt,w as X,F as Dt,u as Te,L as wn,k as tt,M as Sn,p as Me,z as et,l as _t,D as Ne,f as _n}from"./Web-CGrAivgv.chunk.mjs";import{g as En,c as Yt,b as Dn,a as se}from"./index-kP1pdrFW.chunk.mjs";import{c as jt}from"./index-ChXuPuJU.chunk.mjs";import{_ as Ft,l as xt}from"./public-C1mLBHT3.chunk.mjs";import{t as F}from"./translation-DoG5ZELJ-Cnt4vXgN.chunk.mjs";import{N as Ge}from"./logger-D3RVzcfQ-k6GV3wRV.chunk.mjs";import{b as Cn}from"./NcModal-DiDvgcU8-AyGpO2Wl.chunk.mjs";import{N as xn}from"./NcUserStatusIcon-BF5OEQFU-CflDfVCi.chunk.mjs";import{N as kn,a as In}from"./NcDashboardWidget-zmbDEGL--BdmPJpkj.chunk.mjs";import{N as Tn}from"./MapMarkerOutline-CaDE-M5O.chunk.mjs";import{I as Mn}from"./Check-B8g3wLRC.chunk.mjs";import{N as Nn}from"./NcAvatar-1KxMUN7V-CiZW3sVm.chunk.mjs";import"./util-C9Hc1fff.chunk.mjs";import"./createElementId-DhjFt1I9-DwrDuyxe.chunk.mjs";import"./PencilOutline-m7gX2JJw.chunk.mjs";import"./ArrowRight-Bo5pSHoF.chunk.mjs";import"./colors-Cv9F-jWS-BOqQ6yCH.chunk.mjs";import"./NcActionLink-BFiaYt9A-C66mrFQH.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-B9ePistO.chunk.mjs";import"./NcActionText-CQ9qwJ0p-CzEyGOHa.chunk.mjs";function Ae(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function K(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ae(Object(n),!0).forEach(function(o){An(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function qt(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qt=function(e){return typeof e}:qt=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qt(t)}function An(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function it(){return it=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},it.apply(this,arguments)}function On(t,e){if(t==null)return{};var n={},o=Object.keys(t),i,a;for(a=0;a<o.length;a++)i=o[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Pn(t,e){if(t==null)return{};var n=On(t,e),o,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)o=a[i],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(n[o]=t[o])}return n}var Ln="1.14.0";function ot(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var at=ot(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ut=ot(/Edge/i),Oe=ot(/firefox/i),Pt=ot(/safari/i)&&!ot(/chrome/i)&&!ot(/android/i),qe=ot(/iP(ad|od|hone)/i),Wn=ot(/chrome/i)&&ot(/android/i),Ke={capture:!1,passive:!1};function w(t,e,n){t.addEventListener(e,n,!at&&Ke)}function y(t,e,n){t.removeEventListener(e,n,!at&&Ke)}function ee(t,e){if(e){if(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{return!1}return!1}}function Rn(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function G(t,e,n,o){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&ee(t,e):ee(t,e))||o&&t===n)return t;if(t===n)break}while(t=Rn(t))}return null}var Pe=/\s+/g;function B(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(Pe," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(Pe," ")}}function m(t,e,n){var o=t&&t.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=n+(typeof n=="string"?"":"px")}}function kt(t,e){var n="";if(typeof t=="string")n=t;else do{var o=m(t,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Ze(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,a=o.length;if(n)for(;i<a;i++)n(o[i],i);return o}return[]}function q(){var t=document.scrollingElement;return t||document.documentElement}function T(t,e,n,o,i){if(!(!t.getBoundingClientRect&&t!==window)){var a,r,l,s,h,u,p;if(t!==window&&t.parentNode&&t!==q()?(a=t.getBoundingClientRect(),r=a.top,l=a.left,s=a.bottom,h=a.right,u=a.height,p=a.width):(r=0,l=0,s=window.innerHeight,h=window.innerWidth,u=window.innerHeight,p=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!at))do if(i&&i.getBoundingClientRect&&(m(i,"transform")!=="none"||n&&m(i,"position")!=="static")){var c=i.getBoundingClientRect();r-=c.top+parseInt(m(i,"border-top-width")),l-=c.left+parseInt(m(i,"border-left-width")),s=r+a.height,h=l+a.width;break}while(i=i.parentNode);if(o&&t!==window){var f=kt(i||t),I=f&&f.a,S=f&&f.d;f&&(r/=S,l/=I,p/=I,u/=S,s=r+u,h=l+p)}return{top:r,left:l,bottom:s,right:h,width:p,height:u}}}function Le(t,e,n){for(var o=ct(t,!0),i=T(t)[e];o;){var a=T(o)[n],r=void 0;if(r=i>=a,!r)return o;if(o===q())break;o=ct(o,!1)}return!1}function It(t,e,n,o){for(var i=0,a=0,r=t.children;a<r.length;){if(r[a].style.display!=="none"&&r[a]!==g.ghost&&(o||r[a]!==g.dragged)&&G(r[a],n.draggable,t,!1)){if(i===e)return r[a];i++}a++}return null}function xe(t,e){for(var n=t.lastElementChild;n&&(n===g.ghost||m(n,"display")==="none"||e&&!ee(n,e));)n=n.previousElementSibling;return n||null}function V(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==g.clone&&(!e||ee(t,e))&&n++;return n}function We(t){var e=0,n=0,o=q();if(t)do{var i=kt(t),a=i.a,r=i.d;e+=t.scrollLeft*a,n+=t.scrollTop*r}while(t!==o&&(t=t.parentNode));return[e,n]}function Bn(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n)}return-1}function ct(t,e){if(!t||!t.getBoundingClientRect)return q();var n=t,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=m(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return q();if(o||e)return n;o=!0}}while(n=n.parentNode);return q()}function Fn(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function le(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var Lt;function Qe(t,e){return function(){if(!Lt){var n=arguments,o=this;n.length===1?t.call(o,n[0]):t.apply(o,n),Lt=setTimeout(function(){Lt=void 0},e)}}}function Un(){clearTimeout(Lt),Lt=void 0}function Je(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function tn(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var z="Sortable"+new Date().getTime();function zn(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(o){if(!(m(o,"display")==="none"||o===g.ghost)){t.push({target:o,rect:T(o)});var i=K({},t[t.length-1].rect);if(o.thisAnimationDuration){var a=kt(o,!0);a&&(i.top-=a.f,i.left-=a.e)}o.fromRect=i}})}},addAnimationState:function(n){t.push(n)},removeAnimationState:function(n){t.splice(Bn(t,{target:n}),1)},animateAll:function(n){var o=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var i=!1,a=0;t.forEach(function(r){var l=0,s=r.target,h=s.fromRect,u=T(s),p=s.prevFromRect,c=s.prevToRect,f=r.rect,I=kt(s,!0);I&&(u.top-=I.f,u.left-=I.e),s.toRect=u,s.thisAnimationDuration&&le(p,u)&&!le(h,u)&&(f.top-u.top)/(f.left-u.left)===(h.top-u.top)/(h.left-u.left)&&(l=Yn(f,p,c,o.options)),le(u,h)||(s.prevFromRect=h,s.prevToRect=u,l||(l=o.options.animation),o.animate(s,f,u,l)),l&&(i=!0,a=Math.max(a,l),clearTimeout(s.animationResetTimer),s.animationResetTimer=setTimeout(function(){s.animationTime=0,s.prevFromRect=null,s.fromRect=null,s.prevToRect=null,s.thisAnimationDuration=null},l),s.thisAnimationDuration=l)}),clearTimeout(e),i?e=setTimeout(function(){typeof n=="function"&&n()},a):typeof n=="function"&&n(),t=[]},animate:function(n,o,i,a){if(a){m(n,"transition",""),m(n,"transform","");var r=kt(this.el),l=r&&r.a,s=r&&r.d,h=(o.left-i.left)/(l||1),u=(o.top-i.top)/(s||1);n.animatingX=!!h,n.animatingY=!!u,m(n,"transform","translate3d("+h+"px,"+u+"px,0)"),this.forRepaintDummy=Vn(n),m(n,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),m(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){m(n,"transition",""),m(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},a)}}}}function Vn(t){return t.offsetWidth}function Yn(t,e,n,o){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))*o.animation}var wt=[],de={initializeByDefault:!0},zt={mount:function(t){for(var e in de)de.hasOwnProperty(e)&&!(e in t)&&(t[e]=de[e]);wt.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),wt.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=t+"Global";wt.forEach(function(a){e[a.pluginName]&&(e[a.pluginName][i]&&e[a.pluginName][i](K({sortable:e},n)),e.options[a.pluginName]&&e[a.pluginName][t]&&e[a.pluginName][t](K({sortable:e},n)))})},initializePlugins:function(t,e,n,o){wt.forEach(function(r){var l=r.pluginName;if(!(!t.options[l]&&!r.initializeByDefault)){var s=new r(t,e,t.options);s.sortable=t,s.options=t.options,t[l]=s,it(n,s.defaults)}});for(var i in t.options)if(t.options.hasOwnProperty(i)){var a=this.modifyOption(t,i,t.options[i]);typeof a<"u"&&(t.options[i]=a)}},getEventProperties:function(t,e){var n={};return wt.forEach(function(o){typeof o.eventProperties=="function"&&it(n,o.eventProperties.call(e[o.pluginName],t))}),n},modifyOption:function(t,e,n){var o;return wt.forEach(function(i){t[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[e]=="function"&&(o=i.optionListeners[e].call(t[i.pluginName],n))}),o}};function jn(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,a=t.cloneEl,r=t.toEl,l=t.fromEl,s=t.oldIndex,h=t.newIndex,u=t.oldDraggableIndex,p=t.newDraggableIndex,c=t.originalEvent,f=t.putSortable,I=t.extraEventProperties;if(e=e||n&&n[z],!!e){var S,Z=e.options,O="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!at&&!Ut?S=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(S=document.createEvent("Event"),S.initEvent(o,!0,!0)),S.to=r||n,S.from=l||n,S.item=i||n,S.clone=a,S.oldIndex=s,S.newIndex=h,S.oldDraggableIndex=u,S.newDraggableIndex=p,S.originalEvent=c,S.pullMode=f?f.lastPutMode:void 0;var Q=K(K({},I),zt.getEventProperties(o,e));for(var W in Q)S[W]=Q[W];n&&n.dispatchEvent(S),Z[O]&&Z[O].call(e,S)}}var Xn=["evt"],L=function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.evt,i=Pn(n,Xn);zt.pluginEvent.bind(g)(t,e,K({dragEl:d,parentEl:C,ghostEl:v,rootEl:D,nextEl:vt,lastDownEl:Kt,cloneEl:x,cloneHidden:dt,dragStarted:Nt,putSortable:M,activeSortable:g.active,originalEvent:o,oldIndex:Ct,oldDraggableIndex:Wt,newIndex:U,newDraggableIndex:lt,hideGhostForTarget:an,unhideGhostForTarget:rn,cloneNowHidden:function(){dt=!0},cloneNowShown:function(){dt=!1},dispatchSortableEvent:function(a){P({sortable:e,name:a,originalEvent:o})}},i))};function P(t){jn(K({putSortable:M,cloneEl:x,targetEl:d,rootEl:D,oldIndex:Ct,oldDraggableIndex:Wt,newIndex:U,newDraggableIndex:lt},t))}var d,C,v,D,vt,Kt,x,dt,Ct,U,Wt,lt,Xt,M,Et=!1,ne=!1,oe=[],gt,j,ce,ue,Re,Be,Nt,St,Rt,Bt=!1,$t=!1,Zt,N,he=[],we=!1,ie=[],re=typeof document<"u",Ht=qe,Fe=Ut||at?"cssFloat":"float",$n=re&&!Wn&&!qe&&"draggable"in document.createElement("div"),en=(function(){if(re){if(at)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}})(),nn=function(t,e){var n=m(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=It(t,0,e),a=It(t,1,e),r=i&&m(i),l=a&&m(a),s=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+T(i).width,h=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&r.float&&r.float!=="none"){var u=r.float==="left"?"left":"right";return a&&(l.clear==="both"||l.clear===u)?"vertical":"horizontal"}return i&&(r.display==="block"||r.display==="flex"||r.display==="table"||r.display==="grid"||s>=o&&n[Fe]==="none"||a&&n[Fe]==="none"&&s+h>o)?"vertical":"horizontal"},Hn=function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,a=n?t.width:t.height,r=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return o===r||i===l||o+a/2===r+s/2},Gn=function(t,e){var n;return oe.some(function(o){var i=o[z].options.emptyInsertThreshold;if(!(!i||xe(o))){var a=T(o),r=t>=a.left-i&&t<=a.right+i,l=e>=a.top-i&&e<=a.bottom+i;if(r&&l)return n=o}}),n},on=function(t){function e(i,a){return function(r,l,s,h){var u=r.options.group.name&&l.options.group.name&&r.options.group.name===l.options.group.name;if(i==null&&(a||u))return!0;if(i==null||i===!1)return!1;if(a&&i==="clone")return i;if(typeof i=="function")return e(i(r,l,s,h),a)(r,l,s,h);var p=(a?r:l).options.group.name;return i===!0||typeof i=="string"&&i===p||i.join&&i.indexOf(p)>-1}}var n={},o=t.group;(!o||qt(o)!="object")&&(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},an=function(){!en&&v&&m(v,"display","none")},rn=function(){!en&&v&&m(v,"display","")};re&&document.addEventListener("click",function(t){if(ne)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ne=!1,!1},!0);var ft=function(t){if(d){t=t.touches?t.touches[0]:t;var e=Gn(t.clientX,t.clientY);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[z]._onDragOver(n)}}},qn=function(t){d&&d.parentNode[z]._isOutsideThisEl(t.target)};function g(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=it({},e),t[z]=this;var n={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 nn(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(a,r){a.setData("Text",r.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:g.supportPointer!==!1&&"PointerEvent"in window&&!Pt,emptyInsertThreshold:5};zt.initializePlugins(this,t,n);for(var o in n)!(o in e)&&(e[o]=n[o]);on(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:$n,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?w(t,"pointerdown",this._onTapStart):(w(t,"mousedown",this._onTapStart),w(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(w(t,"dragover",this),w(t,"dragenter",this)),oe.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),it(this,zn())}g.prototype={constructor:g,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(St=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,d):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,a=t.type,r=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(r||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,h=o.filter;if(oo(n),!d&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||o.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&Pt&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=G(l,o.draggable,n,!1),!(l&&l.animated)&&Kt!==l)){if(Ct=V(l),Wt=V(l,o.draggable),typeof h=="function"){if(h.call(this,t,l,this)){P({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),L("filter",e,{evt:t}),i&&t.cancelable&&t.preventDefault();return}}else if(h&&(h=h.split(",").some(function(u){if(u=G(s,u.trim(),n,!1),u)return P({sortable:e,rootEl:u,name:"filter",targetEl:l,fromEl:n,toEl:n}),L("filter",e,{evt:t}),!0}),h)){i&&t.cancelable&&t.preventDefault();return}o.handle&&!G(s,o.handle,n,!1)||this._prepareDragStart(t,r,l)}}},_prepareDragStart:function(t,e,n){var o=this,i=o.el,a=o.options,r=i.ownerDocument,l;if(n&&!d&&n.parentNode===i){var s=T(n);if(D=i,d=n,C=d.parentNode,vt=d.nextSibling,Kt=n,Xt=a.group,g.dragged=d,gt={target:d,clientX:(e||t).clientX,clientY:(e||t).clientY},Re=gt.clientX-s.left,Be=gt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,d.style["will-change"]="all",l=function(){if(L("delayEnded",o,{evt:t}),g.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Oe&&o.nativeDraggable&&(d.draggable=!0),o._triggerDragStart(t,e),P({sortable:o,name:"choose",originalEvent:t}),B(d,a.chosenClass,!0)},a.ignore.split(",").forEach(function(h){Ze(d,h.trim(),pe)}),w(r,"dragover",ft),w(r,"mousemove",ft),w(r,"touchmove",ft),w(r,"mouseup",o._onDrop),w(r,"touchend",o._onDrop),w(r,"touchcancel",o._onDrop),Oe&&this.nativeDraggable&&(this.options.touchStartThreshold=4,d.draggable=!0),L("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Ut||at))){if(g.eventCanceled){this._onDrop();return}w(r,"mouseup",o._disableDelayedDrag),w(r,"touchend",o._disableDelayedDrag),w(r,"touchcancel",o._disableDelayedDrag),w(r,"mousemove",o._delayedDragTouchMoveHandler),w(r,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&w(r,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,a.delay)}else l()}},_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(){d&&pe(d),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._disableDelayedDrag),y(t,"touchend",this._disableDelayedDrag),y(t,"touchcancel",this._disableDelayedDrag),y(t,"mousemove",this._delayedDragTouchMoveHandler),y(t,"touchmove",this._delayedDragTouchMoveHandler),y(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?w(document,"pointermove",this._onTouchMove):e?w(document,"touchmove",this._onTouchMove):w(document,"mousemove",this._onTouchMove):(w(d,"dragend",this),w(D,"dragstart",this._onDragStart));try{document.selection?Qt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Et=!1,D&&d){L("dragStarted",this,{evt:e}),this.nativeDraggable&&w(document,"dragover",qn);var n=this.options;!t&&B(d,n.dragClass,!1),B(d,n.ghostClass,!0),g.active=this,t&&this._appendGhost(),P({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(j){this._lastX=j.clientX,this._lastY=j.clientY,an();for(var t=document.elementFromPoint(j.clientX,j.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(j.clientX,j.clientY),t!==e);)e=t;if(d.parentNode[z]._isOutsideThisEl(t),e)do{if(e[z]){var n=void 0;if(n=e[z]._onDragOver({clientX:j.clientX,clientY:j.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);rn()}},_onTouchMove:function(t){if(gt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,a=v&&kt(v,!0),r=v&&a&&a.a,l=v&&a&&a.d,s=Ht&&N&&We(N),h=(i.clientX-gt.clientX+o.x)/(r||1)+(s?s[0]-he[0]:0)/(r||1),u=(i.clientY-gt.clientY+o.y)/(l||1)+(s?s[1]-he[1]:0)/(l||1);if(!g.active&&!Et){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(v){a?(a.e+=h-(ce||0),a.f+=u-(ue||0)):a={a:1,b:0,c:0,d:1,e:h,f:u};var p="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");m(v,"webkitTransform",p),m(v,"mozTransform",p),m(v,"msTransform",p),m(v,"transform",p),ce=h,ue=u,j=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!v){var t=this.options.fallbackOnBody?document.body:D,e=T(d,!0,Ht,!0,t),n=this.options;if(Ht){for(N=t;m(N,"position")==="static"&&m(N,"transform")==="none"&&N!==document;)N=N.parentNode;N!==document.body&&N!==document.documentElement?(N===document&&(N=q()),e.top+=N.scrollTop,e.left+=N.scrollLeft):N=q(),he=We(N)}v=d.cloneNode(!0),B(v,n.ghostClass,!1),B(v,n.fallbackClass,!0),B(v,n.dragClass,!0),m(v,"transition",""),m(v,"transform",""),m(v,"box-sizing","border-box"),m(v,"margin",0),m(v,"top",e.top),m(v,"left",e.left),m(v,"width",e.width),m(v,"height",e.height),m(v,"opacity","0.8"),m(v,"position",Ht?"absolute":"fixed"),m(v,"zIndex","100000"),m(v,"pointerEvents","none"),g.ghost=v,t.appendChild(v),m(v,"transform-origin",Re/parseInt(v.style.width)*100+"% "+Be/parseInt(v.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;if(L("dragStart",this,{evt:t}),g.eventCanceled){this._onDrop();return}L("setupClone",this),g.eventCanceled||(x=tn(d),x.draggable=!1,x.style["will-change"]="",this._hideClone(),B(x,this.options.chosenClass,!1),g.clone=x),n.cloneId=Qt(function(){L("clone",n),!g.eventCanceled&&(n.options.removeCloneOnHide||D.insertBefore(x,d),n._hideClone(),P({sortable:n,name:"clone"}))}),!e&&B(d,i.dragClass,!0),e?(ne=!0,n._loopId=setInterval(n._emulateDragOver,50)):(y(document,"mouseup",n._onDrop),y(document,"touchend",n._onDrop),y(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,d)),w(document,"drop",n),m(d,"transform","translateZ(0)")),Et=!0,n._dragStartId=Qt(n._dragStarted.bind(n,e,t)),w(document,"selectstart",n),Nt=!0,Pt&&m(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,n=t.target,o,i,a,r=this.options,l=r.group,s=g.active,h=Xt===l,u=r.sort,p=M||s,c,f=this,I=!1;if(we)return;function S(Mt,fn){L(Mt,f,K({evt:t,isOwner:h,axis:c?"vertical":"horizontal",revert:a,dragRect:o,targetRect:i,canSort:u,fromSortable:p,target:n,completed:O,onMove:function(ke,vn){return Gt(D,e,d,o,ke,T(ke),t,vn)},changed:Q},fn))}function Z(){S("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function O(Mt){return S("dragOverCompleted",{insertion:Mt}),Mt&&(h?s._hideClone():s._showClone(f),f!==p&&(B(d,M?M.options.ghostClass:s.options.ghostClass,!1),B(d,r.ghostClass,!0)),M!==f&&f!==g.active?M=f:f===g.active&&M&&(M=null),p===f&&(f._ignoreWhileAnimating=n),f.animateAll(function(){S("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(n===d&&!d.animated||n===e&&!n.animated)&&(St=null),!r.dragoverBubble&&!t.rootEl&&n!==document&&(d.parentNode[z]._isOutsideThisEl(t.target),!Mt&&ft(t)),!r.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),I=!0}function Q(){U=V(d),lt=V(d,r.draggable),P({sortable:f,name:"change",toEl:e,newIndex:U,newDraggableIndex:lt,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=G(n,r.draggable,e,!0),S("dragOver"),g.eventCanceled)return I;if(d.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||f._ignoreWhileAnimating===n)return O(!1);if(ne=!1,s&&!r.disabled&&(h?u||(a=C!==D):M===this||(this.lastPutMode=Xt.checkPull(this,s,d,t))&&l.checkPut(this,s,d,t))){if(c=this._getDirection(t,n)==="vertical",o=T(d),S("dragOverValid"),g.eventCanceled)return I;if(a)return C=D,Z(),this._hideClone(),S("revert"),g.eventCanceled||(vt?D.insertBefore(d,vt):D.appendChild(d)),O(!0);var W=xe(e,r.draggable);if(!W||Jn(t,c,this)&&!W.animated){if(W===d)return O(!1);if(W&&e===t.target&&(n=W),n&&(i=T(n)),Gt(D,e,d,o,n,i,t,!!n)!==!1)return Z(),e.appendChild(d),C=e,Q(),O(!0)}else if(W&&Qn(t,c,this)){var ut=It(e,0,r,!0);if(ut===d)return O(!1);if(n=ut,i=T(n),Gt(D,e,d,o,n,i,t,!1)!==!1)return Z(),e.insertBefore(d,ut),C=e,Q(),O(!0)}else if(n.parentNode===e){i=T(n);var H=0,ht,Tt=d.parentNode!==e,bt=!Hn(d.animated&&d.toRect||o,n.animated&&n.toRect||i,c),R=c?"top":"left",rt=Le(n,"top","top")||Le(d,"top","top"),Vt=rt?rt.scrollTop:void 0;St!==n&&(ht=i[R],Bt=!1,$t=!bt&&r.invertSwap||Tt),H=to(t,n,i,c,bt?1:r.swapThreshold,r.invertedSwapThreshold==null?r.swapThreshold:r.invertedSwapThreshold,$t,St===n);var J;if(H!==0){var yt=V(d);do yt-=H,J=C.children[yt];while(J&&(m(J,"display")==="none"||J===v))}if(H===0||J===n)return O(!1);St=n,Rt=H;var pt=n.nextElementSibling,st=!1;st=H===1;var mt=Gt(D,e,d,o,n,i,t,st);if(mt!==!1)return(mt===1||mt===-1)&&(st=mt===1),we=!0,setTimeout(Zn,30),Z(),st&&!pt?e.appendChild(d):n.parentNode.insertBefore(d,st?pt:n),rt&&Je(rt,0,Vt-rt.scrollTop),C=d.parentNode,ht!==void 0&&!$t&&(Zt=Math.abs(ht-T(n)[R])),Q(),O(!0)}if(e.contains(d))return O(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",ft),y(document,"mousemove",ft),y(document,"touchmove",ft)},_offUpEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._onDrop),y(t,"touchend",this._onDrop),y(t,"pointerup",this._onDrop),y(t,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;if(U=V(d),lt=V(d,n.draggable),L("drop",this,{evt:t}),C=d&&d.parentNode,U=V(d),lt=V(d,n.draggable),g.eventCanceled){this._nulling();return}Et=!1,$t=!1,Bt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Se(this.cloneId),Se(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Pt&&m(document.body,"user-select",""),m(d,"transform",""),t&&(Nt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),v&&v.parentNode&&v.parentNode.removeChild(v),(D===C||M&&M.lastPutMode!=="clone")&&x&&x.parentNode&&x.parentNode.removeChild(x),d&&(this.nativeDraggable&&y(d,"dragend",this),pe(d),d.style["will-change"]="",Nt&&!Et&&B(d,M?M.options.ghostClass:this.options.ghostClass,!1),B(d,this.options.chosenClass,!1),P({sortable:this,name:"unchoose",toEl:C,newIndex:null,newDraggableIndex:null,originalEvent:t}),D!==C?(U>=0&&(P({rootEl:C,name:"add",toEl:C,fromEl:D,originalEvent:t}),P({sortable:this,name:"remove",toEl:C,originalEvent:t}),P({rootEl:C,name:"sort",toEl:C,fromEl:D,originalEvent:t}),P({sortable:this,name:"sort",toEl:C,originalEvent:t})),M&&M.save()):U!==Ct&&U>=0&&(P({sortable:this,name:"update",toEl:C,originalEvent:t}),P({sortable:this,name:"sort",toEl:C,originalEvent:t})),g.active&&((U==null||U===-1)&&(U=Ct,lt=Wt),P({sortable:this,name:"end",toEl:C,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){L("nulling",this),D=d=C=v=vt=x=Kt=dt=gt=j=Nt=U=lt=Ct=Wt=St=Rt=M=Xt=g.dragged=g.ghost=g.clone=g.active=null,ie.forEach(function(t){t.checked=!0}),ie.length=ce=ue=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":d&&(this._onDragOver(t),Kn(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,o=0,i=n.length,a=this.options;o<i;o++)e=n[o],G(e,a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||no(e));return t},sort:function(t,e){var n={},o=this.el;this.toArray().forEach(function(i,a){var r=o.children[a];G(r,this.options.draggable,o,!1)&&(n[i]=r)},this),e&&this.captureAnimationState(),t.forEach(function(i){n[i]&&(o.removeChild(n[i]),o.appendChild(n[i]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return G(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(e===void 0)return n[t];var o=zt.modifyOption(this,t,e);typeof o<"u"?n[t]=o:n[t]=e,t==="group"&&on(n)},destroy:function(){L("destroy",this);var t=this.el;t[z]=null,y(t,"mousedown",this._onTapStart),y(t,"touchstart",this._onTapStart),y(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(y(t,"dragover",this),y(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),oe.splice(oe.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!dt){if(L("hideClone",this),g.eventCanceled)return;m(x,"display","none"),this.options.removeCloneOnHide&&x.parentNode&&x.parentNode.removeChild(x),dt=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(dt){if(L("showClone",this),g.eventCanceled)return;d.parentNode==D&&!this.options.group.revertClone?D.insertBefore(x,d):vt?D.insertBefore(x,vt):D.appendChild(x),this.options.group.revertClone&&this.animate(d,x),m(x,"display",""),dt=!1}}};function Kn(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Gt(t,e,n,o,i,a,r,l){var s,h=t[z],u=h.options.onMove,p;return window.CustomEvent&&!at&&!Ut?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=a||T(e),s.willInsertAfter=l,s.originalEvent=r,t.dispatchEvent(s),u&&(p=u.call(h,s,r)),p}function pe(t){t.draggable=!1}function Zn(){we=!1}function Qn(t,e,n){var o=T(It(n.el,0,n.options,!0)),i=10;return e?t.clientX<o.left-i||t.clientY<o.top&&t.clientX<o.right:t.clientY<o.top-i||t.clientY<o.bottom&&t.clientX<o.left}function Jn(t,e,n){var o=T(xe(n.el,n.options.draggable)),i=10;return e?t.clientX>o.right+i||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+i}function to(t,e,n,o,i,a,r,l){var s=o?t.clientY:t.clientX,h=o?n.height:n.width,u=o?n.top:n.left,p=o?n.bottom:n.right,c=!1;if(!r){if(l&&Zt<h*i){if(!Bt&&(Rt===1?s>u+h*a/2:s<p-h*a/2)&&(Bt=!0),Bt)c=!0;else if(Rt===1?s<u+Zt:s>p-Zt)return-Rt}else if(s>u+h*(1-i)/2&&s<p-h*(1-i)/2)return eo(e)}return c=c||r,c&&(s<u+h*a/2||s>p-h*a/2)?s>u+h/2?1:-1:0}function eo(t){return V(d)<V(t)?1:-1}function no(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function oo(t){ie.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&ie.push(o)}}function Qt(t){return setTimeout(t,0)}function Se(t){return clearTimeout(t)}re&&w(document,"touchmove",function(t){(g.active||Et)&&t.cancelable&&t.preventDefault()}),g.utils={on:w,off:y,css:m,find:Ze,is:function(t,e){return!!G(t,e,t,!1)},extend:Fn,throttle:Qe,closest:G,toggleClass:B,clone:tn,index:V,nextTick:Qt,cancelNextTick:Se,detectDirection:nn,getChild:It},g.get=function(t){return t[z]},g.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(g.utils=K(K({},g.utils),o.utils)),zt.mount(o)})},g.create=function(t,e){return new g(t,e)},g.version=Ln;var k=[],At,_e,Ee=!1,me,ge,ae,Ot;function io(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(e){var n=e.originalEvent;this.sortable.nativeDraggable?w(document,"dragover",this._handleAutoScroll):this.options.supportPointer?w(document,"pointermove",this._handleFallbackAutoScroll):n.touches?w(document,"touchmove",this._handleFallbackAutoScroll):w(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var n=e.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):(y(document,"pointermove",this._handleFallbackAutoScroll),y(document,"touchmove",this._handleFallbackAutoScroll),y(document,"mousemove",this._handleFallbackAutoScroll)),Ue(),Jt(),Un()},nulling:function(){ae=_e=At=Ee=Ot=me=ge=null,k.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,n){var o=this,i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(i,a);if(ae=e,n||this.options.forceAutoScrollFallback||Ut||at||Pt){fe(e,this.options,r,n);var l=ct(r,!0);Ee&&(!Ot||i!==me||a!==ge)&&(Ot&&Ue(),Ot=setInterval(function(){var s=ct(document.elementFromPoint(i,a),!0);s!==l&&(l=s,Jt()),fe(e,o.options,s,n)},10),me=i,ge=a)}else{if(!this.options.bubbleScroll||ct(r,!0)===q()){Jt();return}fe(e,this.options,ct(r,!1),!1)}}},it(t,{pluginName:"scroll",initializeByDefault:!0})}function Jt(){k.forEach(function(t){clearInterval(t.pid)}),k=[]}function Ue(){clearInterval(Ot)}var fe=Qe(function(t,e,n,o){if(e.scroll){var i=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,r=e.scrollSensitivity,l=e.scrollSpeed,s=q(),h=!1,u;_e!==n&&(_e=n,Jt(),At=e.scroll,u=e.scrollFn,At===!0&&(At=ct(n,!0)));var p=0,c=At;do{var f=c,I=T(f),S=I.top,Z=I.bottom,O=I.left,Q=I.right,W=I.width,ut=I.height,H=void 0,ht=void 0,Tt=f.scrollWidth,bt=f.scrollHeight,R=m(f),rt=f.scrollLeft,Vt=f.scrollTop;f===s?(H=W<Tt&&(R.overflowX==="auto"||R.overflowX==="scroll"||R.overflowX==="visible"),ht=ut<bt&&(R.overflowY==="auto"||R.overflowY==="scroll"||R.overflowY==="visible")):(H=W<Tt&&(R.overflowX==="auto"||R.overflowX==="scroll"),ht=ut<bt&&(R.overflowY==="auto"||R.overflowY==="scroll"));var J=H&&(Math.abs(Q-i)<=r&&rt+W<Tt)-(Math.abs(O-i)<=r&&!!rt),yt=ht&&(Math.abs(Z-a)<=r&&Vt+ut<bt)-(Math.abs(S-a)<=r&&!!Vt);if(!k[p])for(var pt=0;pt<=p;pt++)k[pt]||(k[pt]={});(k[p].vx!=J||k[p].vy!=yt||k[p].el!==f)&&(k[p].el=f,k[p].vx=J,k[p].vy=yt,clearInterval(k[p].pid),(J!=0||yt!=0)&&(h=!0,k[p].pid=setInterval(function(){o&&this.layer===0&&g.active._onTouchMove(ae);var st=k[this.layer].vy?k[this.layer].vy*l:0,mt=k[this.layer].vx?k[this.layer].vx*l:0;typeof u=="function"&&u.call(g.dragged.parentNode[z],mt,st,t,ae,k[this.layer].el)!=="continue"||Je(k[this.layer].el,mt,st)}.bind({layer:p}),24))),p++}while(e.bubbleScroll&&c!==s&&(c=ct(c,!1)));Ee=h}},30),sn=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,a=t.dispatchSortableEvent,r=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||i;r();var h=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(h.clientX,h.clientY);l(),s&&!s.el.contains(u)&&(a("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function De(){}De.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=It(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:sn},it(De,{pluginName:"revertOnSpill"});function ve(){}ve.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,o=n||this.sortable;o.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),o.animateAll()},drop:sn},it(ve,{pluginName:"removeOnSpill"}),g.mount(new io),g.mount(ve,De);function be(t){t.parentElement!==null&&t.parentElement.removeChild(t)}function ze(t,e,n){const o=n===0?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,o)}function ao(){return typeof window<"u"?window.console:bn.console}const ro=ao();function so(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}const lo=/-(\w)/g,co=so(t=>t.replace(lo,(e,n)=>n.toUpperCase())),ln=["Start","Add","Remove","Update","End"],dn=["Choose","Unchoose","Sort","Filter","Clone"],cn=["Move"],uo=[cn,ln,dn].flatMap(t=>t).map(t=>`on${t}`),Ce={manage:cn,manageAndEmit:ln,emit:dn};function ho(t){return uo.indexOf(t)!==-1}const po=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function mo(t){return po.includes(t)}function go(t){return["transition-group","TransitionGroup"].includes(t)}function un(t){return["id","class","role","style"].includes(t)||t.startsWith("data-")||t.startsWith("aria-")||t.startsWith("on")}function hn(t){return t.reduce((e,[n,o])=>(e[n]=o,e),{})}function fo({$attrs:t,componentData:e={}}){return{...hn(Object.entries(t).filter(([n,o])=>un(n))),...e}}function vo({$attrs:t,callBackBuilder:e}){const n=hn(pn(t));Object.entries(e).forEach(([i,a])=>{Ce[i].forEach(r=>{n[`on${r}`]=a(r)})});const o=`[data-draggable]${n.draggable||""}`;return{...n,draggable:o}}function pn(t){return Object.entries(t).filter(([e,n])=>!un(e)).map(([e,n])=>[co(e),n]).filter(([e,n])=>!ho(e))}const Ve=({el:t})=>t,bo=(t,e)=>t.__draggable_context=e,Ye=t=>t.__draggable_context;class yo{constructor({nodes:{header:e,default:n,footer:o},root:i,realList:a}){this.defaultNodes=n,this.children=[...e,...n,...o],this.externalComponent=i.externalComponent,this.rootTransition=i.transition,this.tag=i.tag,this.realList=a}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(e,n){const{tag:o,children:i,_isRootComponent:a}=this;return e(o,n,a?{default:()=>i}:i)}updated(){const{defaultNodes:e,realList:n}=this;e.forEach((o,i)=>{bo(Ve(o),{element:n[i],index:i})})}getUnderlyingVm(e){return Ye(e)}getVmIndexFromDomIndex(e,n){const{defaultNodes:o}=this,{length:i}=o,a=n.children,r=a.item(e);if(r===null)return i;const l=Ye(r);if(l)return l.index;if(i===0)return 0;const s=Ve(o[0]),h=[...a].findIndex(u=>u===s);return e<h?0:i}}function wo(t,e){const n=t[e];return n?n():[]}function So({$slots:t,realList:e,getKey:n}){const o=e||[],[i,a]=["header","footer"].map(s=>wo(t,s)),{item:r}=t;if(!r)throw new Error("draggable element must have an item slot");const l=o.flatMap((s,h)=>r({element:s,index:h}).map(u=>(u.key=n(s),u.props={...u.props||{},"data-draggable":!0},u)));if(l.length!==o.length)throw new Error("Item slot must have only one child");return{header:i,footer:a,default:l}}function _o(t){const e=go(t),n=!mo(t)&&!e;return{transition:e,externalComponent:n,tag:n?Y(t):e?yn:t}}function Eo({$slots:t,tag:e,realList:n,getKey:o}){const i=So({$slots:t,realList:n,getKey:o}),a=_o(e);return new yo({nodes:i,root:a,realList:n})}function mn(t,e){He(()=>this.$emit(t.toLowerCase(),e))}function gn(t){return(e,n)=>{if(this.realList!==null)return this[`onDrag${t}`](e,n)}}function Do(t){const e=gn.call(this,t);return(n,o)=>{e.call(this,n,o),mn.call(this,t,n)}}let ye=null;const Co={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:t=>t},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},xo=["update:modelValue","change",...[...Ce.manageAndEmit,...Ce.emit].map(t=>t.toLowerCase())],ko=$e({name:"draggable",inheritAttrs:!1,props:Co,emits:xo,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:t,$attrs:e,tag:n,componentData:o,realList:i,getKey:a}=this,r=Eo({$slots:t,tag:n,realList:i,getKey:a});this.componentStructure=r;const l=fo({$attrs:e,componentData:o});return r.render(Ie,l)}catch(t){return this.error=!0,Ie("pre",{style:{color:"red"}},t.stack)}},created(){this.list!==null&&this.modelValue!==null&&ro.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:t,$el:e,componentStructure:n}=this;n.updated();const o=vo({$attrs:t,callBackBuilder:{manageAndEmit:a=>Do.call(this,a),emit:a=>mn.bind(this,a),manage:a=>gn.call(this,a)}}),i=e.nodeType===1?e:e.parentElement;this._sortable=new g(i,o),this.targetDomElement=i,i.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:t}=this;return t||this.modelValue},getKey(){const{itemKey:t}=this;return typeof t=="function"?t:e=>e[t]}},watch:{$attrs:{handler(t){const{_sortable:e}=this;e&&pn(t).forEach(([n,o])=>{e.option(n,o)})},deep:!0}},methods:{getUnderlyingVm(t){return this.componentStructure.getUnderlyingVm(t)||null},getUnderlyingPotencialDraggableComponent(t){return t.__draggable_component__},emitChanges(t){He(()=>this.$emit("change",t))},alterList(t){if(this.list){t(this.list);return}const e=[...this.modelValue];t(e),this.$emit("update:modelValue",e)},spliceList(){const t=e=>e.splice(...arguments);this.alterList(t)},updatePosition(t,e){const n=o=>o.splice(e,0,o.splice(t,1)[0]);this.alterList(n)},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this.getUnderlyingPotencialDraggableComponent(t);if(!n)return{component:n};const o=n.realList,i={list:o,component:n};return t!==e&&o?{...n.getUnderlyingVm(e)||{},...i}:i},getVmIndexFromDomIndex(t){return this.componentStructure.getVmIndexFromDomIndex(t,this.targetDomElement)},onDragStart(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),ye=t.item},onDragAdd(t){const e=t.item._underlying_vm_;if(e===void 0)return;be(t.item);const n=this.getVmIndexFromDomIndex(t.newIndex);this.spliceList(n,0,e);const o={element:e,newIndex:n};this.emitChanges({added:o})},onDragRemove(t){if(ze(this.$el,t.item,t.oldIndex),t.pullMode==="clone"){be(t.clone);return}const{index:e,element:n}=this.context;this.spliceList(e,1);const o={element:n,oldIndex:e};this.emitChanges({removed:o})},onDragUpdate(t){be(t.item),ze(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndexFromDomIndex(t.newIndex);this.updatePosition(e,n);const o={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:o})},computeFutureIndex(t,e){if(!t.element)return 0;const n=[...e.to.children].filter(a=>a.style.display!=="none"),o=n.indexOf(e.related),i=t.component.getVmIndexFromDomIndex(o);return n.indexOf(ye)!==-1||!e.willInsertAfter?i:i+1},onDragMove(t,e){const{move:n,realList:o}=this;if(!n||!o)return!0;const i=this.getRelatedContextFromMoveEvent(t),a=this.computeFutureIndex(i,t),r={...this.context,futureIndex:a},l={...t,relatedContext:i,draggedContext:r};return n(l,e)},onDragEnd(){ye=null}}}),Io={name:"PencilIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},To=["aria-hidden","aria-label"],Mo=["fill","width","height"],No={d:"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"},Ao={key:0};function Oo(t,e,n,o,i,a){return b(),E("span",te(t.$attrs,{"aria-hidden":n.title?null:"true","aria-label":n.title,class:"material-design-icon pencil-icon",role:"img",onClick:e[0]||(e[0]=r=>t.$emit("click",r))}),[(b(),E("svg",{fill:n.fillColor,class:"material-design-icon__svg",width:n.size,height:n.size,viewBox:"0 0 24 24"},[_("path",No,[n.title?(b(),E("title",Ao,A(n.title),1)):$("",!0)])],8,Mo))],16,To)}const Po=Ft(Io,[["render",Oo]]),Lo={name:"FileIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Wo=["aria-hidden","aria-label"],Ro=["fill","width","height"],Bo={d:"M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z"},Fo={key:0};function Uo(t,e,n,o,i,a){return b(),E("span",te(t.$attrs,{"aria-hidden":n.title?null:"true","aria-label":n.title,class:"material-design-icon file-icon",role:"img",onClick:e[0]||(e[0]=r=>t.$emit("click",r))}),[(b(),E("svg",{fill:n.fillColor,class:"material-design-icon__svg",width:n.size,height:n.size,viewBox:"0 0 24 24"},[_("path",Bo,[n.title?(b(),E("title",Fo,A(n.title),1)):$("",!0)])],8,Ro))],16,Wo)}const zo=Ft(Lo,[["render",Uo]]),Vo=["src"],Yo=$e({__name:"ApiDashboardWidgetItem",props:{item:{type:Object,required:!0},iconSize:{type:Number,required:!0},roundedIcons:{type:Boolean,default:!0}},setup(t){const e=Me(!1),n=Me(!1);return(o,i)=>(b(),nt(Te(kn),{targetUrl:t.item.link,overlayIconUrl:t.item.overlayIconUrl?t.item.overlayIconUrl:"",mainText:t.item.title,subText:t.item.subtitle},{avatar:X(()=>[t.item.iconUrl?(b(),E(Dt,{key:0},[t.roundedIcons?(b(),nt(Te(Nn),{key:0,size:t.iconSize,url:t.item.iconUrl},null,8,["size","url"])):(b(),E(Dt,{key:1},[wn(_("img",{alt:"",class:tt(["api-dashboard-widget-item__icon",{"hidden-visually":!e.value}]),src:t.item.iconUrl,onError:i[0]||(i[0]=a=>n.value=!0),onLoad:i[1]||(i[1]=a=>e.value=!0)},null,42,Vo),[[Sn,!n.value]]),e.value?$("",!0):(b(),nt(zo,{key:0,size:t.iconSize},null,8,["size"]))],64))],64)):$("",!0)]),_:1},8,["targetUrl","overlayIconUrl","mainText","subText"]))}}),jo=Ft(Yo,[["__scopeId","data-v-071812ee"]]),Xo={name:"ApiDashboardWidget",components:{ApiDashboardWidgetItem:jo,CheckIcon:Mn,NcDashboardWidget:In,NcEmptyContent:Tn,NcButton:Ge},props:{widget:{type:[Object,void 0],default:void 0},data:{type:[Object,void 0],default:void 0},loading:{type:Boolean,required:!0}},data(){return{iconSize:44}},computed:{items(){return this.data?.items??[]},emptyContentMessage(){return this.data?.emptyContentMessage??""},halfEmptyContentMessage(){return this.data?.halfEmptyContentMessage??""},newButton(){return this.widget?.buttons?.find(t=>t.type==="new")},moreButton(){return this.widget?.buttons?.find(t=>t.type==="more")},setupButton(){return this.widget?.buttons?.find(t=>t.type==="setup")},showMoreLabel(){return this.moreButton?.text},showMoreUrl(){return this.moreButton?.link}},mounted(){const t=window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area"),e=Number.parseFloat(t);this.iconSize=Number.isNaN(e)?44:e}};function $o(t,e,n,o,i,a){const r=Y("ApiDashboardWidgetItem"),l=Y("CheckIcon"),s=Y("NcButton"),h=Y("NcEmptyContent"),u=Y("NcDashboardWidget");return b(),nt(u,{items:a.items,showMoreLabel:a.showMoreLabel,showMoreUrl:a.showMoreUrl,loading:n.loading,showItemsAndEmptyContent:!!a.halfEmptyContentMessage,halfEmptyContentMessage:a.halfEmptyContentMessage},{default:X(({item:p})=>[_t(r,{item:p,iconSize:i.iconSize,roundedIcons:n.widget.item_icons_round},null,8,["item","iconSize","roundedIcons"])]),"empty-content":X(()=>[a.items.length===0?(b(),nt(h,{key:0,description:a.emptyContentMessage},{icon:X(()=>[a.emptyContentMessage?(b(),nt(l,{key:0,size:65})):$("",!0)]),action:X(()=>[a.setupButton?(b(),nt(s,{key:0,href:a.setupButton.link},{default:X(()=>[et(A(a.setupButton.text),1)]),_:1},8,["href"])):$("",!0)]),_:1},8,["description"])):$("",!0)]),_:1},8,["items","showMoreLabel","showMoreUrl","loading","showItemsAndEmptyContent","halfEmptyContentMessage"])}const Ho=Ft(Xo,[["render",$o]]),Go=En().detectLogLevel().setApp("dashboard").build(),qo={data(){return{isMobile:this._isMobile()}},beforeMount(){window.addEventListener("resize",this._onResize)},beforeUnmount(){window.removeEventListener("resize",this._onResize)},methods:{_onResize(){this.isMobile=this._isMobile()},_isMobile(){return document.documentElement.clientWidth<768}}},je=xt("dashboard","panels"),Ko=xt("dashboard","firstRun"),Zo=new Date(xt("dashboard","birthdate")),Qo={weather:{text:F("dashboard","Weather"),icon:"icon-weather-status"},status:{text:F("dashboard","Status")}},Jo={name:"DashboardApp",components:{ApiDashboardWidget:Ho,NcButton:Ge,Draggable:ko,NcModal:Cn,Pencil:Po,NcUserStatusIcon:xn},mixins:[qo],setup(){return{t:F,productName:window.OC.theme.productName}},data(){return{isAdmin:se().isAdmin,timer:new Date,registeredStatus:[],callbacks:{},allCallbacksStatus:{},statusElements:{},statusInfo:Qo,enabledStatuses:xt("dashboard","statuses"),panels:je,firstRun:Ko,displayName:se()?.displayName,uid:se()?.uid,layout:xt("dashboard","layout").filter(t=>je[t]),modalPanelList:[],isModalDragging:!1,modal:!1,appStoreUrl:Dn("/settings/apps/dashboard"),appStoreEnabled:xt("dashboard","appStoreEnabled",!0),statuses:{},apiWidgets:[],apiWidgetItems:{},loadingItems:!0,birthdate:Zo}},computed:{greeting(){const t=this.timer.getHours(),e=this.birthdate instanceof Date&&this.birthdate.getMonth()===this.timer.getMonth()&&this.birthdate.getDate()===this.timer.getDate();let n;e?n="birthday":t>=22||t<5?n="night":t>=18?n="evening":t>=12?n="afternoon":n="morning";const o={morning:{generic:F("dashboard","Good morning"),withName:F("dashboard","Good morning, {name}",{name:this.displayName},{escape:!1})},afternoon:{generic:F("dashboard","Good afternoon"),withName:F("dashboard","Good afternoon, {name}",{name:this.displayName},{escape:!1})},evening:{generic:F("dashboard","Good evening"),withName:F("dashboard","Good evening, {name}",{name:this.displayName},{escape:!1})},night:{generic:F("dashboard","Hello"),withName:F("dashboard","Hello, {name}",{name:this.displayName},{escape:!1})},birthday:{generic:F("dashboard","Happy birthday 🥳🤩🎂🎉"),withName:F("dashboard","Happy birthday, {name} 🥳🤩🎂🎉",{name:this.displayName},{escape:!1})}};return{text:this.displayName&&this.uid!==this.displayName?o[n].withName:o[n].generic}},isActive(){return t=>this.layout.indexOf(t.id)>-1},isStatusActive(){return t=>this.enabledStatuses.findIndex(e=>e===t)!==-1},sortedAllStatuses(){return Object.keys(this.allCallbacksStatus).slice().sort(this.sortStatuses)},sortedRegisteredStatus(){return this.registeredStatus.slice().sort(this.sortStatuses)}},watch:{callbacks(){this.$nextTick(()=>this.rerenderPanels())},layout(){this.modal&&!this.isModalDragging&&(this.modalPanelList=this.getSortedPanelObjects())}},async created(){await this.fetchApiWidgets();const t=Object.values(this.apiWidgets).filter(e=>this.isApiWidgetV2(e.id)&&this.layout.includes(e.id)).map(e=>e.id);await Promise.all(t.map(e=>this.fetchApiWidgetItems([e],!0)));for(const e of Object.values(this.apiWidgets))e.reload_interval>0&&setInterval(async()=>{this.layout.includes(e.id)&&await this.fetchApiWidgetItems([e.id],!0)},e.reload_interval*1e3);this.$nextTick(()=>this.rerenderPanels())},mounted(){this.updateSkipLink(),window.addEventListener("scroll",this.handleScroll),setInterval(()=>{this.timer=new Date},3e4),this.firstRun&&window.addEventListener("scroll",this.disableFirstrunHint)},unmounted(){window.removeEventListener("scroll",this.handleScroll)},methods:{register(t,e){this.callbacks[t]=e},registerStatus(t,e){this.allCallbacksStatus[t]=e,this.isStatusActive(t)&&(this.registeredStatus.includes(t)||this.registeredStatus.push(t),this.$nextTick(()=>this.mountStatus(t)))},setStatusElement(t,e){e?(this.statusElements[t]=e,this.mountStatus(t)):delete this.statusElements[t]},mountStatus(t){if(this.statuses[t]?.mounted)return;const e=this.statusElements[t],n=this.allCallbacksStatus[t];e&&n&&(n(e),this.statuses[t]={mounted:!0})},rerenderPanels(){for(const t in this.callbacks){if(this.isApiWidgetV2(this.panels[t].id))continue;const e=this.$refs[t];if(this.layout.indexOf(t)!==-1&&!(this.panels[t]&&this.panels[t].mounted))if(e){const n=Array.isArray(e)?e[0]:e;this.callbacks[t](n,{widget:this.panels[t]}),this.panels[t].mounted=!0}else Go.error("Failed to register panel in the frontend as no backend data was provided for "+t)}},saveLayout(){jt.post(Yt("/apps/dashboard/api/v3/layout"),{layout:this.layout})},saveStatuses(){jt.post(Yt("/apps/dashboard/api/v3/statuses"),{statuses:this.enabledStatuses})},showModal(){this.modal=!0,this.firstRun=!1,this.modalPanelList=this.getSortedPanelObjects()},closeModal(){this.modal=!1},getSortedPanelObjects(){return Object.values(this.panels).sort((t,e)=>{const n=this.layout.indexOf(t.id),o=this.layout.indexOf(e.id);return n===-1||o===-1?o-n||t.id-e.id:n-o||t.id-e.id})},onModalPanelListUpdate(t){this.modalPanelList=t},onModalDragStart(){this.isModalDragging=!0},onModalDragEnd(){this.isModalDragging=!1,this.layout=this.modalPanelList.filter(t=>this.layout.includes(t.id)).map(t=>t.id),this.saveLayout()},updateCheckbox(t,e){const n=this.layout.indexOf(t.id);!e&&n>-1?this.layout.splice(n,1):(this.layout.push(t.id),this.isApiWidgetV2(t.id)&&this.fetchApiWidgetItems([t.id],!0)),this.panels[t.id].mounted=!1,this.saveLayout(),this.$nextTick(()=>this.rerenderPanels())},disableFirstrunHint(){window.removeEventListener("scroll",this.disableFirstrunHint),setTimeout(()=>{this.firstRun=!1},1e3)},updateSkipLink(){document.getElementsByClassName("skip-navigation")[0].setAttribute("href","#app-dashboard")},updateStatusCheckbox(t,e){e?this.enableStatus(t):this.disableStatus(t)},enableStatus(t){this.enabledStatuses.push(t),this.registerStatus(t,this.allCallbacksStatus[t]),this.saveStatuses()},disableStatus(t){const e=this.enabledStatuses.findIndex(o=>o===t);e!==-1&&this.enabledStatuses.splice(e,1);const n=this.registeredStatus.findIndex(o=>o===t);n!==-1&&(this.registeredStatus.splice(n,1),this.statuses[t]={mounted:!1}),this.saveStatuses()},sortStatuses(t,e){const n=t.toLowerCase(),o=e.toLowerCase();return n>o?1:n<o?-1:0},handleScroll(){window.scrollY>70?document.body.classList.add("dashboard--scrolled"):document.body.classList.remove("dashboard--scrolled")},async fetchApiWidgets(){const{data:t}=await jt.get(Yt("/apps/dashboard/api/v1/widgets"));this.apiWidgets=t.ocs.data},async fetchApiWidgetItems(t,e=!1){try{const n=Yt("/apps/dashboard/api/v2/widget-items"),o=new URLSearchParams(t.map(a=>["widgets[]",a])),i=(await jt.get(`${n}?${o.toString()}`)).data.ocs.data;e?this.apiWidgetItems={...this.apiWidgetItems,...i}:this.apiWidgetItems=i}finally{this.loadingItems=!1}},isApiWidgetV2(t){for(const e of Object.values(this.apiWidgets))if(e.id===t&&e.item_api_versions.includes(2))return!0;return!1}}},ti={id:"app-dashboard"},ei={key:0,class:"statuses"},ni=["id"],oi={class:"panel--header"},ii=["src"],ai={class:"panel--content"},ri={class:"panel--header"},si=["data-id"],li={class:"footer"},di={class:"modal__content"},ci={class:"panels"},ui=["id","checked","onInput"],hi=["for"],pi=["id","checked","onInput"],mi=["for"],gi=["src"],fi=["href"],vi={key:1},bi={class:"credits--end"},yi={href:"https://api.met.no/doc/TermsOfService",target:"_blank",rel:"noopener"},wi={href:"https://wiki.osmfoundation.org/wiki/Privacy_Policy",target:"_blank",rel:"noopener"},Si={href:"https://www.opentopodata.org/#public-api",target:"_blank",rel:"noopener"};function _i(t,e,n,o,i,a){const r=Y("ApiDashboardWidget"),l=Y("Draggable"),s=Y("Pencil"),h=Y("NcButton"),u=Y("NcUserStatusIcon"),p=Y("NcModal");return b(),E("main",ti,[_("h2",null,A(a.greeting.text),1),a.sortedRegisteredStatus.length>0?(b(),E("ul",ei,[(b(!0),E(Dt,null,Ne(a.sortedRegisteredStatus,c=>(b(),E("li",{id:"status-"+c,key:c},[_("div",{ref_for:!0,ref:f=>a.setStatusElement(c,f)},null,512)],8,ni))),128))])):$("",!0),_t(l,te({modelValue:i.layout,"onUpdate:modelValue":e[0]||(e[0]=c=>i.layout=c)},{swapThreshold:.3,delay:500,delayOnTouchOnly:!0,touchStartThreshold:3},{class:"panels",itemKey:c=>c,handle:".panel--header",onEnd:a.saveLayout}),{item:X(({element:c})=>[(b(),E("div",{key:c,class:"panel"},[a.isApiWidgetV2(i.panels[c].id)?(b(),E(Dt,{key:0},[_("div",oi,[_("h2",null,[i.apiWidgets[i.panels[c].id].icon_url?(b(),E("img",{key:0,src:i.apiWidgets[i.panels[c].id].icon_url,alt:""},null,8,ii)):(b(),E("span",{key:1,class:tt(i.apiWidgets[i.panels[c].id].icon_class),"aria-hidden":"true"},null,2)),et(" "+A(i.apiWidgets[i.panels[c].id].title),1)])]),_("div",ai,[_t(r,{widget:i.apiWidgets[i.panels[c].id],data:i.apiWidgetItems[i.panels[c].id],loading:i.loadingItems},null,8,["widget","data","loading"])])],64)):(b(),E(Dt,{key:1},[_("div",ri,[_("h2",null,[_("span",{class:tt(i.panels[c].iconClass),"aria-hidden":"true"},null,2),et(" "+A(i.panels[c].title),1)])]),_("div",{class:tt(["panel--content",{loading:!i.panels[c].mounted}])},[_("div",{ref:i.panels[c].id,"data-id":i.panels[c].id},null,8,si)],2)],64))]))]),_:1},16,["modelValue","itemKey","onEnd"]),_("div",li,[_t(h,{onClick:a.showModal},{icon:X(()=>[_t(s,{size:20})]),default:X(()=>[et(" "+A(o.t("dashboard","Customize")),1)]),_:1},8,["onClick"])]),i.modal?(b(),nt(p,{key:1,size:"large",closeOnClickOutside:!0,onClose:a.closeModal},{default:X(()=>[_("div",di,[_("h2",null,A(o.t("dashboard","Edit widgets")),1),_("ol",ci,[(b(!0),E(Dt,null,Ne(a.sortedAllStatuses,c=>(b(),E("li",{key:c,class:tt("panel-"+c)},[_("input",{id:"status-checkbox-"+c,type:"checkbox",class:"checkbox",checked:a.isStatusActive(c),onInput:f=>a.updateStatusCheckbox(c,f.target.checked)},null,40,ui),_("label",{for:"status-checkbox-"+c},[c==="status"?(b(),nt(u,{key:0,status:"online","aria-hidden":"true"})):(b(),E("span",{key:1,class:tt(i.statusInfo[c].icon),"aria-hidden":"true"},null,2)),et(" "+A(i.statusInfo[c].text),1)],8,hi)],2))),128))]),_t(l,te({swapThreshold:.3,delay:500,delayOnTouchOnly:!0,touchStartThreshold:3},{class:"panels",tag:"ol",itemKey:c=>c.id,handle:".draggable",modelValue:i.modalPanelList,"onUpdate:modelValue":a.onModalPanelListUpdate,onStart:a.onModalDragStart,onEnd:a.onModalDragEnd}),{item:X(({element:c})=>[(b(),E("li",{key:c.id,class:tt("panel-"+c.id)},[_("input",{id:"panel-checkbox-"+c.id,type:"checkbox",class:"checkbox",checked:a.isActive(c),onInput:f=>a.updateCheckbox(c,f.target.checked)},null,40,pi),_("label",{for:"panel-checkbox-"+c.id,class:tt({draggable:a.isActive(c)})},[c.iconUrl?(b(),E("img",{key:0,alt:"",src:c.iconUrl},null,8,gi)):(b(),E("span",{key:1,class:tt(c.iconClass),"aria-hidden":"true"},null,2)),et(" "+A(c.title),1)],10,mi)],2))]),_:1},16,["itemKey","modelValue","onUpdate:modelValue","onStart","onEnd"]),i.isAdmin&&i.appStoreEnabled?(b(),E("a",{key:0,href:i.appStoreUrl,class:"button"},A(o.t("dashboard","Get more widgets from the App Store")),9,fi)):$("",!0),i.statuses.weather&&a.isStatusActive("weather")?(b(),E("div",vi,[_("h2",null,A(o.t("dashboard","Weather service")),1),_("p",null,A(o.t("dashboard","For your privacy, the weather data is requested by your {productName} server on your behalf so the weather service receives no personal information.",{productName:o.productName})),1),_("p",bi,[_("a",yi,A(o.t("dashboard","Weather data from Met.no")),1),e[1]||(e[1]=et(", ",-1)),_("a",wi,A(o.t("dashboard","geocoding with Nominatim")),1),e[2]||(e[2]=et(", ",-1)),_("a",Si,A(o.t("dashboard","elevation data from OpenTopoData")),1),e[3]||(e[3]=et(". ",-1))])])):$("",!0)])]),_:1},8,["onClose"])):$("",!0)])}const Ei=Ft(Jo,[["render",_i],["__scopeId","data-v-f173509a"]]),Di=_n(Ei),Xe=Di.mount("#app-content-vue");window.OCA.Dashboard={register:(t,e)=>Xe.register(t,e),registerStatus:(t,e)=>Xe.registerStatus(t,e)};
|
|
//# sourceMappingURL=dashboard-main.mjs.map
|
|
|