jplan-pack 0.6.632 → 0.6.634
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AuthFailRoute-BwJZ4NoO.js → AuthFailRoute-BtE9uYh5.js} +1 -1
- package/dist/{AuthFailRoute-MNlDzkTb.mjs → AuthFailRoute-DCLtqpu-.mjs} +1 -1
- package/dist/{AuthRoute-oWS_RAsC.js → AuthRoute-BR38-_vK.js} +1 -1
- package/dist/{AuthRoute-Eq-RSAEF.mjs → AuthRoute-BruuGznh.mjs} +1 -1
- package/dist/{index-CSo3vK_R.mjs → index-BbpxF7U2.mjs} +7 -5
- package/dist/{index-C30WKG0I.js → index-CDcvdU0K.js} +2 -2
- package/dist/jplan-pack.cjs.js +1 -1
- package/dist/jplan-pack.es.js +1 -1
- package/dist/types/components/form/JSelect.d.ts +5 -1
- package/package.json +2 -1
- package/dist/types/types/components.d.ts +0 -65
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),l=require("./index-
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),l=require("./index-CDcvdU0K.js"),d=require("vuetify/lib/components/VBtn/index.mjs");/*!
|
2
2
|
* vue-router v4.5.0
|
3
3
|
* (c) 2024 Eduardo San Martin Morote
|
4
4
|
* @license MIT
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { inject as u, openBlock as d, createElementBlock as a, createElementVNode as r, createVNode as p, withCtx as i, createTextVNode as f } from "vue";
|
2
|
-
import { _ as m } from "./index-
|
2
|
+
import { _ as m } from "./index-BbpxF7U2.mjs";
|
3
3
|
import { VBtn as _ } from "vuetify/lib/components/VBtn/index.mjs";
|
4
4
|
/*!
|
5
5
|
* vue-router v4.5.0
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("@vueuse/core");require("vuetify/lib/components/VBtn/index.mjs");require("vuetify/components");require("vuetify/lib/components/VIcon/index.mjs");const t=require("./index-
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("@vueuse/core");require("vuetify/lib/components/VBtn/index.mjs");require("vuetify/components");require("vuetify/lib/components/VIcon/index.mjs");const t=require("./index-CDcvdU0K.js");require("vuetify/lib/components/VCard/index.mjs");require("vuetify/lib/components/VDialog/index.mjs");require("vuetify/lib/components/VDivider/index.mjs");require("vuetify/lib/components/VGrid/index.mjs");require("vuetify/lib/components/VAvatar/index.mjs");require("vuetify/lib/components/VImg/index.mjs");require("vuetify/lib/components/VList/index.mjs");require("vuetify/lib/components/VMenu/index.mjs");require("vuetify/lib/components/VDataTable/index.mjs");require("vuetify/lib/components/VTextField/index.mjs");require("vuetify/lib/components/VSelect/index.mjs");require("vuetify/lib/components/VCheckbox/index.mjs");require("vuetify/lib/components/VChip/index.mjs");require("vuetify/lib/components/VLabel/index.mjs");require("vuetify/lib/components/VTextarea/index.mjs");require("vuetify/lib/components/VBtnToggle/index.mjs");const c={class:"overlay"},l={class:"text-white"},d={class:"text-white"},q=e.defineComponent({__name:"AuthRoute",setup(p){const s=r=>({scopes:["https://graph.microsoft.com/.default","openid","profile"],redirectStartPage:window.location.href,extraQueryParameters:r}),i=e.ref(!1);async function u(){t.msal.getAllAccounts().length===0&&(i.value=!0);const r=await t.msal.handleRedirectPromise();if(!r){await t.msal.initialize();const n=s();await t.msal.loginRedirect(n);return}t.msal.setActiveAccount(r.account)}e.onMounted(async()=>{await t.msal.initialize(),await u()});const o=[{title:"Authenticating...",subtitle:"Please wait."},{title:"Authorized",subtitle:"If this window don't closed automatically, you can close it now."}],a=e.computed(()=>i.value?o[0]:o[1]);return(r,n)=>(e.openBlock(),e.createElementBlock("div",c,[e.createElementVNode("h3",l,e.toDisplayString(a.value.title),1),e.createVNode(e.unref(t.SpinnerLoader)),e.createElementVNode("p",d,e.toDisplayString(a.value.subtitle),1)]))}}),m=t._export_sfc(q,[["__scopeId","data-v-b7679fd7"]]);exports.default=m;
|
@@ -3,7 +3,7 @@ import "@vueuse/core";
|
|
3
3
|
import "vuetify/lib/components/VBtn/index.mjs";
|
4
4
|
import "vuetify/components";
|
5
5
|
import "vuetify/lib/components/VIcon/index.mjs";
|
6
|
-
import { m as t, S as g, _ as v } from "./index-
|
6
|
+
import { m as t, S as g, _ as v } from "./index-BbpxF7U2.mjs";
|
7
7
|
import "vuetify/lib/components/VCard/index.mjs";
|
8
8
|
import "vuetify/lib/components/VDialog/index.mjs";
|
9
9
|
import "vuetify/lib/components/VDivider/index.mjs";
|
@@ -7597,7 +7597,8 @@ const aN = {
|
|
7597
7597
|
itemTitle: {},
|
7598
7598
|
itemValue: {},
|
7599
7599
|
density: {},
|
7600
|
-
loading: { type: Boolean }
|
7600
|
+
loading: { type: Boolean },
|
7601
|
+
clearable: { type: Boolean, default: !0 }
|
7601
7602
|
},
|
7602
7603
|
emits: ["update:modelValue"],
|
7603
7604
|
setup(r, { emit: e }) {
|
@@ -7645,8 +7646,9 @@ const aN = {
|
|
7645
7646
|
"bg-color": "containerBg",
|
7646
7647
|
rounded: "false",
|
7647
7648
|
"hide-details": "",
|
7648
|
-
class: "j-field"
|
7649
|
-
|
7649
|
+
class: "j-field",
|
7650
|
+
clearable: u.clearable
|
7651
|
+
}, null, 8, ["modelValue", "variant", "items", "item-title", "item-value", "loading", "placeholder", "density", "clearable"]))
|
7650
7652
|
], 64));
|
7651
7653
|
}
|
7652
7654
|
}), RN = {
|
@@ -23662,11 +23664,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
23662
23664
|
var Bi = eH();
|
23663
23665
|
const Rc = /* @__PURE__ */ X2(Bi), tH = {
|
23664
23666
|
path: "/_/dashboard",
|
23665
|
-
component: () => import("./AuthRoute-
|
23667
|
+
component: () => import("./AuthRoute-BruuGznh.mjs"),
|
23666
23668
|
meta: { requiresAuth: !1 }
|
23667
23669
|
}, nH = {
|
23668
23670
|
path: "/jplan-auth-fail",
|
23669
|
-
component: () => import("./AuthFailRoute-
|
23671
|
+
component: () => import("./AuthFailRoute-DCLtqpu-.mjs"),
|
23670
23672
|
meta: { requiresAuth: !1 }
|
23671
23673
|
}, { isAuthenticated: Mv, handleRedirect: rH } = L_(), oH = wf();
|
23672
23674
|
function XH(r, e) {
|
@@ -17,7 +17,7 @@ This will fail in production.`);l=Yi,l._s.has(n)||(Sm(n,i,l),process.env.NODE_EN
|
|
17
17
|
* @author RubaXa <trash@rubaxa.org>
|
18
18
|
* @author owenm <owen23355@gmail.com>
|
19
19
|
* @license MIT
|
20
|
-
*/function Vm(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function nr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Vm(Object(t),!0).forEach(function(n){TP(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Vm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Ks(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ks=function(e){return typeof e}:Ks=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ks(r)}function TP(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Tr(){return Tr=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Tr.apply(this,arguments)}function EP(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function SP(r,e){if(r==null)return{};var t=EP(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var AP="1.14.0";function wr(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var Sr=wr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_a=wr(/Edge/i),Fm=wr(/firefox/i),na=wr(/safari/i)&&!wr(/chrome/i)&&!wr(/android/i),Qv=wr(/iP(ad|od|hone)/i),bP=wr(/chrome/i)&&wr(/android/i),Xv={capture:!1,passive:!1};function Se(r,e,t){r.addEventListener(e,t,!Sr&&Xv)}function Ce(r,e,t){r.removeEventListener(e,t,!Sr&&Xv)}function nc(r,e){if(e){if(e[0]===">"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function IP(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function jn(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&nc(r,e):nc(r,e))||n&&r===t)return r;if(r===t)break}while(r=IP(r))}return null}var Hm=/\s+/g;function Yt(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(Hm," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(Hm," ")}}function re(r,e,t){var n=r&&r.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(t=r.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function ci(r,e){var t="";if(typeof r=="string")t=r;else do{var n=re(r,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(r=r.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function Zv(r,e,t){if(r){var n=r.getElementsByTagName(e),i=0,s=n.length;if(t)for(;i<s;i++)t(n[i],i);return n}return[]}function er(){var r=document.scrollingElement;return r||document.documentElement}function it(r,e,t,n,i){if(!(!r.getBoundingClientRect&&r!==window)){var s,l,d,f,g,m,w;if(r!==window&&r.parentNode&&r!==er()?(s=r.getBoundingClientRect(),l=s.top,d=s.left,f=s.bottom,g=s.right,m=s.height,w=s.width):(l=0,d=0,f=window.innerHeight,g=window.innerWidth,m=window.innerHeight,w=window.innerWidth),(e||t)&&r!==window&&(i=i||r.parentNode,!Sr))do if(i&&i.getBoundingClientRect&&(re(i,"transform")!=="none"||t&&re(i,"position")!=="static")){var v=i.getBoundingClientRect();l-=v.top+parseInt(re(i,"border-top-width")),d-=v.left+parseInt(re(i,"border-left-width")),f=l+s.height,g=d+s.width;break}while(i=i.parentNode);if(n&&r!==window){var E=ci(i||r),_=E&&E.a,A=E&&E.d;E&&(l/=A,d/=_,w/=_,m/=A,f=l+m,g=d+w)}return{top:l,left:d,bottom:f,right:g,width:w,height:m}}}function $m(r,e,t){for(var n=$r(r,!0),i=it(r)[e];n;){var s=it(n)[t],l=void 0;if(l=i>=s,!l)return n;if(n===er())break;n=$r(n,!1)}return!1}function hi(r,e,t,n){for(var i=0,s=0,l=r.children;s<l.length;){if(l[s].style.display!=="none"&&l[s]!==oe.ghost&&(n||l[s]!==oe.dragged)&&jn(l[s],t.draggable,r,!1)){if(i===e)return l[s];i++}s++}return null}function Kd(r,e){for(var t=r.lastElementChild;t&&(t===oe.ghost||re(t,"display")==="none"||e&&!nc(t,e));)t=t.previousElementSibling;return t||null}function En(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==oe.clone&&(!e||nc(r,e))&&t++;return t}function Km(r){var e=0,t=0,n=er();if(r)do{var i=ci(r),s=i.a,l=i.d;e+=r.scrollLeft*s,t+=r.scrollTop*l}while(r!==n&&(r=r.parentNode));return[e,t]}function kP(r,e){for(var t in r)if(r.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===r[t][n])return Number(t)}return-1}function $r(r,e){if(!r||!r.getBoundingClientRect)return er();var t=r,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=re(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return er();if(n||e)return t;n=!0}}while(t=t.parentNode);return er()}function RP(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function Su(r,e){return Math.round(r.top)===Math.round(e.top)&&Math.round(r.left)===Math.round(e.left)&&Math.round(r.height)===Math.round(e.height)&&Math.round(r.width)===Math.round(e.width)}var ra;function ey(r,e){return function(){if(!ra){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),ra=setTimeout(function(){ra=void 0},e)}}}function NP(){clearTimeout(ra),ra=void 0}function ty(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function ny(r){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(r).cloneNode(!0):t?t(r).clone(!0)[0]:r.cloneNode(!0)}var nn="Sortable"+new Date().getTime();function OP(){var r=[],e;return{captureAnimationState:function(){if(r=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(re(i,"display")==="none"||i===oe.ghost)){r.push({target:i,rect:it(i)});var s=nr({},r[r.length-1].rect);if(i.thisAnimationDuration){var l=ci(i,!0);l&&(s.top-=l.f,s.left-=l.e)}i.fromRect=s}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(kP(r,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,l=0;r.forEach(function(d){var f=0,g=d.target,m=g.fromRect,w=it(g),v=g.prevFromRect,E=g.prevToRect,_=d.rect,A=ci(g,!0);A&&(w.top-=A.f,w.left-=A.e),g.toRect=w,g.thisAnimationDuration&&Su(v,w)&&!Su(m,w)&&(_.top-w.top)/(_.left-w.left)===(m.top-w.top)/(m.left-w.left)&&(f=MP(_,v,E,i.options)),Su(w,m)||(g.prevFromRect=m,g.prevToRect=w,f||(f=i.options.animation),i.animate(g,_,w,f)),f&&(s=!0,l=Math.max(l,f),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},f),g.thisAnimationDuration=f)}),clearTimeout(e),s?e=setTimeout(function(){typeof n=="function"&&n()},l):typeof n=="function"&&n(),r=[]},animate:function(n,i,s,l){if(l){re(n,"transition",""),re(n,"transform","");var d=ci(this.el),f=d&&d.a,g=d&&d.d,m=(i.left-s.left)/(f||1),w=(i.top-s.top)/(g||1);n.animatingX=!!m,n.animatingY=!!w,re(n,"transform","translate3d("+m+"px,"+w+"px,0)"),this.forRepaintDummy=PP(n),re(n,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),re(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){re(n,"transition",""),re(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},l)}}}}function PP(r){return r.offsetWidth}function MP(r,e,t,n){return Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var $o=[],Au={initializeByDefault:!0},Ta={mount:function(e){for(var t in Au)Au.hasOwnProperty(t)&&!(t in e)&&(e[t]=Au[t]);$o.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),$o.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var s=e+"Global";$o.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][s]&&t[l.pluginName][s](nr({sortable:t},n)),t.options[l.pluginName]&&t[l.pluginName][e]&&t[l.pluginName][e](nr({sortable:t},n)))})},initializePlugins:function(e,t,n,i){$o.forEach(function(d){var f=d.pluginName;if(!(!e.options[f]&&!d.initializeByDefault)){var g=new d(e,t,e.options);g.sortable=e,g.options=e.options,e[f]=g,Tr(n,g.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var l=this.modifyOption(e,s,e.options[s]);typeof l<"u"&&(e.options[s]=l)}},getEventProperties:function(e,t){var n={};return $o.forEach(function(i){typeof i.eventProperties=="function"&&Tr(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return $o.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(i=s.optionListeners[t].call(e[s.pluginName],n))}),i}};function xP(r){var e=r.sortable,t=r.rootEl,n=r.name,i=r.targetEl,s=r.cloneEl,l=r.toEl,d=r.fromEl,f=r.oldIndex,g=r.newIndex,m=r.oldDraggableIndex,w=r.newDraggableIndex,v=r.originalEvent,E=r.putSortable,_=r.extraEventProperties;if(e=e||t&&t[nn],!!e){var A,R=e.options,$="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Sr&&!_a?A=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(A=document.createEvent("Event"),A.initEvent(n,!0,!0)),A.to=l||t,A.from=d||t,A.item=i||t,A.clone=s,A.oldIndex=f,A.newIndex=g,A.oldDraggableIndex=m,A.newDraggableIndex=w,A.originalEvent=v,A.pullMode=E?E.lastPutMode:void 0;var V=nr(nr({},_),Ta.getEventProperties(n,e));for(var U in V)A[U]=V[U];t&&t.dispatchEvent(A),R[$]&&R[$].call(e,A)}}var DP=["evt"],Vt=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,s=SP(n,DP);Ta.pluginEvent.bind(oe)(e,t,nr({dragEl:H,parentEl:qe,ghostEl:le,rootEl:Fe,nextEl:so,lastDownEl:zs,cloneEl:Ge,cloneHidden:Br,dragStarted:Ji,putSortable:vt,activeSortable:oe.active,originalEvent:i,oldIndex:oi,oldDraggableIndex:oa,newIndex:Jt,newDraggableIndex:Ur,hideGhostForTarget:ay,unhideGhostForTarget:sy,cloneNowHidden:function(){Br=!0},cloneNowShown:function(){Br=!1},dispatchSortableEvent:function(d){Pt({sortable:t,name:d,originalEvent:i})}},s))};function Pt(r){xP(nr({putSortable:vt,cloneEl:Ge,targetEl:H,rootEl:Fe,oldIndex:oi,oldDraggableIndex:oa,newIndex:Jt,newDraggableIndex:Ur},r))}var H,qe,le,Fe,so,zs,Ge,Br,oi,Jt,oa,Ur,Ts,vt,Qo=!1,rc=!1,oc=[],ro,Pn,bu,Iu,zm,Wm,Ji,Ko,ia,aa=!1,Es=!1,Ws,Et,ku=[],id=!1,ic=[],Rc=typeof document<"u",Ss=Qv,qm=_a||Sr?"cssFloat":"float",LP=Rc&&!bP&&!Qv&&"draggable"in document.createElement("div"),ry=function(){if(Rc){if(Sr)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),oy=function(e,t){var n=re(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),s=hi(e,0,t),l=hi(e,1,t),d=s&&re(s),f=l&&re(l),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+it(s).width,m=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+it(l).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(s&&d.float&&d.float!=="none"){var w=d.float==="left"?"left":"right";return l&&(f.clear==="both"||f.clear===w)?"vertical":"horizontal"}return s&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&n[qm]==="none"||l&&n[qm]==="none"&&g+m>i)?"vertical":"horizontal"},UP=function(e,t,n){var i=n?e.left:e.top,s=n?e.right:e.bottom,l=n?e.width:e.height,d=n?t.left:t.top,f=n?t.right:t.bottom,g=n?t.width:t.height;return i===d||s===f||i+l/2===d+g/2},BP=function(e,t){var n;return oc.some(function(i){var s=i[nn].options.emptyInsertThreshold;if(!(!s||Kd(i))){var l=it(i),d=e>=l.left-s&&e<=l.right+s,f=t>=l.top-s&&t<=l.bottom+s;if(d&&f)return n=i}}),n},iy=function(e){function t(s,l){return function(d,f,g,m){var w=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(s==null&&(l||w))return!0;if(s==null||s===!1)return!1;if(l&&s==="clone")return s;if(typeof s=="function")return t(s(d,f,g,m),l)(d,f,g,m);var v=(l?d:f).options.group.name;return s===!0||typeof s=="string"&&s===v||s.join&&s.indexOf(v)>-1}}var n={},i=e.group;(!i||Ks(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},ay=function(){!ry&&le&&re(le,"display","none")},sy=function(){!ry&&le&&re(le,"display","")};Rc&&document.addEventListener("click",function(r){if(rc)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),rc=!1,!1},!0);var oo=function(e){if(H){e=e.touches?e.touches[0]:e;var t=BP(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[nn]._onDragOver(n)}}},VP=function(e){H&&H.parentNode[nn]._isOutsideThisEl(e.target)};function oe(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=Tr({},e),r[nn]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return oy(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,d){l.setData("Text",d.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:oe.supportPointer!==!1&&"PointerEvent"in window&&!na,emptyInsertThreshold:5};Ta.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);iy(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:LP,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Se(r,"pointerdown",this._onTapStart):(Se(r,"mousedown",this._onTapStart),Se(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Se(r,"dragover",this),Se(r,"dragenter",this)),oc.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Tr(this,OP())}oe.prototype={constructor:oe,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ko=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,H):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,s=i.preventOnFilter,l=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,f=(d||e).target,g=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||f,m=i.filter;if(GP(n),!H&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&na&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=jn(f,i.draggable,n,!1),!(f&&f.animated)&&zs!==f)){if(oi=En(f),oa=En(f,i.draggable),typeof m=="function"){if(m.call(this,e,f,this)){Pt({sortable:t,rootEl:g,name:"filter",targetEl:f,toEl:n,fromEl:n}),Vt("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(m&&(m=m.split(",").some(function(w){if(w=jn(g,w.trim(),n,!1),w)return Pt({sortable:t,rootEl:w,name:"filter",targetEl:f,fromEl:n,toEl:n}),Vt("filter",t,{evt:e}),!0}),m)){s&&e.cancelable&&e.preventDefault();return}i.handle&&!jn(g,i.handle,n,!1)||this._prepareDragStart(e,d,f)}}},_prepareDragStart:function(e,t,n){var i=this,s=i.el,l=i.options,d=s.ownerDocument,f;if(n&&!H&&n.parentNode===s){var g=it(n);if(Fe=s,H=n,qe=H.parentNode,so=H.nextSibling,zs=n,Ts=l.group,oe.dragged=H,ro={target:H,clientX:(t||e).clientX,clientY:(t||e).clientY},zm=ro.clientX-g.left,Wm=ro.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,H.style["will-change"]="all",f=function(){if(Vt("delayEnded",i,{evt:e}),oe.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Fm&&i.nativeDraggable&&(H.draggable=!0),i._triggerDragStart(e,t),Pt({sortable:i,name:"choose",originalEvent:e}),Yt(H,l.chosenClass,!0)},l.ignore.split(",").forEach(function(m){Zv(H,m.trim(),Ru)}),Se(d,"dragover",oo),Se(d,"mousemove",oo),Se(d,"touchmove",oo),Se(d,"mouseup",i._onDrop),Se(d,"touchend",i._onDrop),Se(d,"touchcancel",i._onDrop),Fm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,H.draggable=!0),Vt("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(_a||Sr))){if(oe.eventCanceled){this._onDrop();return}Se(d,"mouseup",i._disableDelayedDrag),Se(d,"touchend",i._disableDelayedDrag),Se(d,"touchcancel",i._disableDelayedDrag),Se(d,"mousemove",i._delayedDragTouchMoveHandler),Se(d,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&Se(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,l.delay)}else f()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){H&&Ru(H),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._disableDelayedDrag),Ce(e,"touchend",this._disableDelayedDrag),Ce(e,"touchcancel",this._disableDelayedDrag),Ce(e,"mousemove",this._delayedDragTouchMoveHandler),Ce(e,"touchmove",this._delayedDragTouchMoveHandler),Ce(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Se(document,"pointermove",this._onTouchMove):t?Se(document,"touchmove",this._onTouchMove):Se(document,"mousemove",this._onTouchMove):(Se(H,"dragend",this),Se(Fe,"dragstart",this._onDragStart));try{document.selection?qs(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Qo=!1,Fe&&H){Vt("dragStarted",this,{evt:t}),this.nativeDraggable&&Se(document,"dragover",VP);var n=this.options;!e&&Yt(H,n.dragClass,!1),Yt(H,n.ghostClass,!0),oe.active=this,e&&this._appendGhost(),Pt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Pn){this._lastX=Pn.clientX,this._lastY=Pn.clientY,ay();for(var e=document.elementFromPoint(Pn.clientX,Pn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Pn.clientX,Pn.clientY),e!==t);)t=e;if(H.parentNode[nn]._isOutsideThisEl(e),t)do{if(t[nn]){var n=void 0;if(n=t[nn]._onDragOver({clientX:Pn.clientX,clientY:Pn.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);sy()}},_onTouchMove:function(e){if(ro){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,s=e.touches?e.touches[0]:e,l=le&&ci(le,!0),d=le&&l&&l.a,f=le&&l&&l.d,g=Ss&&Et&&Km(Et),m=(s.clientX-ro.clientX+i.x)/(d||1)+(g?g[0]-ku[0]:0)/(d||1),w=(s.clientY-ro.clientY+i.y)/(f||1)+(g?g[1]-ku[1]:0)/(f||1);if(!oe.active&&!Qo){if(n&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(le){l?(l.e+=m-(bu||0),l.f+=w-(Iu||0)):l={a:1,b:0,c:0,d:1,e:m,f:w};var v="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");re(le,"webkitTransform",v),re(le,"mozTransform",v),re(le,"msTransform",v),re(le,"transform",v),bu=m,Iu=w,Pn=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!le){var e=this.options.fallbackOnBody?document.body:Fe,t=it(H,!0,Ss,!0,e),n=this.options;if(Ss){for(Et=e;re(Et,"position")==="static"&&re(Et,"transform")==="none"&&Et!==document;)Et=Et.parentNode;Et!==document.body&&Et!==document.documentElement?(Et===document&&(Et=er()),t.top+=Et.scrollTop,t.left+=Et.scrollLeft):Et=er(),ku=Km(Et)}le=H.cloneNode(!0),Yt(le,n.ghostClass,!1),Yt(le,n.fallbackClass,!0),Yt(le,n.dragClass,!0),re(le,"transition",""),re(le,"transform",""),re(le,"box-sizing","border-box"),re(le,"margin",0),re(le,"top",t.top),re(le,"left",t.left),re(le,"width",t.width),re(le,"height",t.height),re(le,"opacity","0.8"),re(le,"position",Ss?"absolute":"fixed"),re(le,"zIndex","100000"),re(le,"pointerEvents","none"),oe.ghost=le,e.appendChild(le),re(le,"transform-origin",zm/parseInt(le.style.width)*100+"% "+Wm/parseInt(le.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,s=n.options;if(Vt("dragStart",this,{evt:e}),oe.eventCanceled){this._onDrop();return}Vt("setupClone",this),oe.eventCanceled||(Ge=ny(H),Ge.draggable=!1,Ge.style["will-change"]="",this._hideClone(),Yt(Ge,this.options.chosenClass,!1),oe.clone=Ge),n.cloneId=qs(function(){Vt("clone",n),!oe.eventCanceled&&(n.options.removeCloneOnHide||Fe.insertBefore(Ge,H),n._hideClone(),Pt({sortable:n,name:"clone"}))}),!t&&Yt(H,s.dragClass,!0),t?(rc=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ce(document,"mouseup",n._onDrop),Ce(document,"touchend",n._onDrop),Ce(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",s.setData&&s.setData.call(n,i,H)),Se(document,"drop",n),re(H,"transform","translateZ(0)")),Qo=!0,n._dragStartId=qs(n._dragStarted.bind(n,t,e)),Se(document,"selectstart",n),Ji=!0,na&&re(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,s,l,d=this.options,f=d.group,g=oe.active,m=Ts===f,w=d.sort,v=vt||g,E,_=this,A=!1;if(id)return;function R(Qe,wt){Vt(Qe,_,nr({evt:e,isOwner:m,axis:E?"vertical":"horizontal",revert:l,dragRect:i,targetRect:s,canSort:w,fromSortable:v,target:n,completed:V,onMove:function($t,Qc){return As(Fe,t,H,i,$t,it($t),e,Qc)},changed:U},wt))}function $(){R("dragOverAnimationCapture"),_.captureAnimationState(),_!==v&&v.captureAnimationState()}function V(Qe){return R("dragOverCompleted",{insertion:Qe}),Qe&&(m?g._hideClone():g._showClone(_),_!==v&&(Yt(H,vt?vt.options.ghostClass:g.options.ghostClass,!1),Yt(H,d.ghostClass,!0)),vt!==_&&_!==oe.active?vt=_:_===oe.active&&vt&&(vt=null),v===_&&(_._ignoreWhileAnimating=n),_.animateAll(function(){R("dragOverAnimationComplete"),_._ignoreWhileAnimating=null}),_!==v&&(v.animateAll(),v._ignoreWhileAnimating=null)),(n===H&&!H.animated||n===t&&!n.animated)&&(Ko=null),!d.dragoverBubble&&!e.rootEl&&n!==document&&(H.parentNode[nn]._isOutsideThisEl(e.target),!Qe&&oo(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),A=!0}function U(){Jt=En(H),Ur=En(H,d.draggable),Pt({sortable:_,name:"change",toEl:t,newIndex:Jt,newDraggableIndex:Ur,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=jn(n,d.draggable,t,!0),R("dragOver"),oe.eventCanceled)return A;if(H.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||_._ignoreWhileAnimating===n)return V(!1);if(rc=!1,g&&!d.disabled&&(m?w||(l=qe!==Fe):vt===this||(this.lastPutMode=Ts.checkPull(this,g,H,e))&&f.checkPut(this,g,H,e))){if(E=this._getDirection(e,n)==="vertical",i=it(H),R("dragOverValid"),oe.eventCanceled)return A;if(l)return qe=Fe,$(),this._hideClone(),R("revert"),oe.eventCanceled||(so?Fe.insertBefore(H,so):Fe.appendChild(H)),V(!0);var Q=Kd(t,d.draggable);if(!Q||KP(e,E,this)&&!Q.animated){if(Q===H)return V(!1);if(Q&&t===e.target&&(n=Q),n&&(s=it(n)),As(Fe,t,H,i,n,s,e,!!n)!==!1)return $(),t.appendChild(H),qe=t,U(),V(!0)}else if(Q&&$P(e,E,this)){var se=hi(t,0,d,!0);if(se===H)return V(!1);if(n=se,s=it(n),As(Fe,t,H,i,n,s,e,!1)!==!1)return $(),t.insertBefore(H,se),qe=t,U(),V(!0)}else if(n.parentNode===t){s=it(n);var we=0,z,tt=H.parentNode!==t,_e=!UP(H.animated&&H.toRect||i,n.animated&&n.toRect||s,E),j=E?"top":"left",q=$m(n,"top","top")||$m(H,"top","top"),Te=q?q.scrollTop:void 0;Ko!==n&&(z=s[j],aa=!1,Es=!_e&&d.invertSwap||tt),we=zP(e,n,s,E,_e?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,Es,Ko===n);var Be;if(we!==0){var Ct=En(H);do Ct-=we,Be=qe.children[Ct];while(Be&&(re(Be,"display")==="none"||Be===le))}if(we===0||Be===n)return V(!1);Ko=n,ia=we;var An=n.nextElementSibling,an=!1;an=we===1;var xt=As(Fe,t,H,i,n,s,e,an);if(xt!==!1)return(xt===1||xt===-1)&&(an=xt===1),id=!0,setTimeout(HP,30),$(),an&&!An?t.appendChild(H):n.parentNode.insertBefore(H,an?An:n),q&&ty(q,0,Te-q.scrollTop),qe=H.parentNode,z!==void 0&&!Es&&(Ws=Math.abs(z-it(n)[j])),U(),V(!0)}if(t.contains(H))return V(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ce(document,"mousemove",this._onTouchMove),Ce(document,"touchmove",this._onTouchMove),Ce(document,"pointermove",this._onTouchMove),Ce(document,"dragover",oo),Ce(document,"mousemove",oo),Ce(document,"touchmove",oo)},_offUpEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._onDrop),Ce(e,"touchend",this._onDrop),Ce(e,"pointerup",this._onDrop),Ce(e,"touchcancel",this._onDrop),Ce(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Jt=En(H),Ur=En(H,n.draggable),Vt("drop",this,{evt:e}),qe=H&&H.parentNode,Jt=En(H),Ur=En(H,n.draggable),oe.eventCanceled){this._nulling();return}Qo=!1,Es=!1,aa=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ad(this.cloneId),ad(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),na&&re(document.body,"user-select",""),re(H,"transform",""),e&&(Ji&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Fe===qe||vt&&vt.lastPutMode!=="clone")&&Ge&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),H&&(this.nativeDraggable&&Ce(H,"dragend",this),Ru(H),H.style["will-change"]="",Ji&&!Qo&&Yt(H,vt?vt.options.ghostClass:this.options.ghostClass,!1),Yt(H,this.options.chosenClass,!1),Pt({sortable:this,name:"unchoose",toEl:qe,newIndex:null,newDraggableIndex:null,originalEvent:e}),Fe!==qe?(Jt>=0&&(Pt({rootEl:qe,name:"add",toEl:qe,fromEl:Fe,originalEvent:e}),Pt({sortable:this,name:"remove",toEl:qe,originalEvent:e}),Pt({rootEl:qe,name:"sort",toEl:qe,fromEl:Fe,originalEvent:e}),Pt({sortable:this,name:"sort",toEl:qe,originalEvent:e})),vt&&vt.save()):Jt!==oi&&Jt>=0&&(Pt({sortable:this,name:"update",toEl:qe,originalEvent:e}),Pt({sortable:this,name:"sort",toEl:qe,originalEvent:e})),oe.active&&((Jt==null||Jt===-1)&&(Jt=oi,Ur=oa),Pt({sortable:this,name:"end",toEl:qe,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Vt("nulling",this),Fe=H=qe=le=so=Ge=zs=Br=ro=Pn=Ji=Jt=Ur=oi=oa=Ko=ia=vt=Ts=oe.dragged=oe.ghost=oe.clone=oe.active=null,ic.forEach(function(e){e.checked=!0}),ic.length=bu=Iu=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":H&&(this._onDragOver(e),FP(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,s=n.length,l=this.options;i<s;i++)t=n[i],jn(t,l.draggable,this.el,!1)&&e.push(t.getAttribute(l.dataIdAttr)||qP(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(s,l){var d=i.children[l];jn(d,this.options.draggable,i,!1)&&(n[s]=d)},this),t&&this.captureAnimationState(),e.forEach(function(s){n[s]&&(i.removeChild(n[s]),i.appendChild(n[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return jn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=Ta.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&iy(n)},destroy:function(){Vt("destroy",this);var e=this.el;e[nn]=null,Ce(e,"mousedown",this._onTapStart),Ce(e,"touchstart",this._onTapStart),Ce(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ce(e,"dragover",this),Ce(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),oc.splice(oc.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Br){if(Vt("hideClone",this),oe.eventCanceled)return;re(Ge,"display","none"),this.options.removeCloneOnHide&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),Br=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Br){if(Vt("showClone",this),oe.eventCanceled)return;H.parentNode==Fe&&!this.options.group.revertClone?Fe.insertBefore(Ge,H):so?Fe.insertBefore(Ge,so):Fe.appendChild(Ge),this.options.group.revertClone&&this.animate(H,Ge),re(Ge,"display",""),Br=!1}}};function FP(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function As(r,e,t,n,i,s,l,d){var f,g=r[nn],m=g.options.onMove,w;return window.CustomEvent&&!Sr&&!_a?f=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent("move",!0,!0)),f.to=e,f.from=r,f.dragged=t,f.draggedRect=n,f.related=i||e,f.relatedRect=s||it(e),f.willInsertAfter=d,f.originalEvent=l,r.dispatchEvent(f),m&&(w=m.call(g,f,l)),w}function Ru(r){r.draggable=!1}function HP(){id=!1}function $P(r,e,t){var n=it(hi(t.el,0,t.options,!0)),i=10;return e?r.clientX<n.left-i||r.clientY<n.top&&r.clientX<n.right:r.clientY<n.top-i||r.clientY<n.bottom&&r.clientX<n.left}function KP(r,e,t){var n=it(Kd(t.el,t.options.draggable)),i=10;return e?r.clientX>n.right+i||r.clientX<=n.right&&r.clientY>n.bottom&&r.clientX>=n.left:r.clientX>n.right&&r.clientY>n.top||r.clientX<=n.right&&r.clientY>n.bottom+i}function zP(r,e,t,n,i,s,l,d){var f=n?r.clientY:r.clientX,g=n?t.height:t.width,m=n?t.top:t.left,w=n?t.bottom:t.right,v=!1;if(!l){if(d&&Ws<g*i){if(!aa&&(ia===1?f>m+g*s/2:f<w-g*s/2)&&(aa=!0),aa)v=!0;else if(ia===1?f<m+Ws:f>w-Ws)return-ia}else if(f>m+g*(1-i)/2&&f<w-g*(1-i)/2)return WP(e)}return v=v||l,v&&(f<m+g*s/2||f>w-g*s/2)?f>m+g/2?1:-1:0}function WP(r){return En(H)<En(r)?1:-1}function qP(r){for(var e=r.tagName+r.className+r.src+r.href+r.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function GP(r){ic.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&ic.push(n)}}function qs(r){return setTimeout(r,0)}function ad(r){return clearTimeout(r)}Rc&&Se(document,"touchmove",function(r){(oe.active||Qo)&&r.cancelable&&r.preventDefault()});oe.utils={on:Se,off:Ce,css:re,find:Zv,is:function(e,t){return!!jn(e,t,e,!1)},extend:RP,throttle:ey,closest:jn,toggleClass:Yt,clone:ny,index:En,nextTick:qs,cancelNextTick:ad,detectDirection:oy,getChild:hi};oe.get=function(r){return r[nn]};oe.mount=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(oe.utils=nr(nr({},oe.utils),n.utils)),Ta.mount(n)})};oe.create=function(r,e){return new oe(r,e)};oe.version=AP;var Xe=[],Qi,sd,cd=!1,Nu,Ou,ac,Xi;function jP(){function r(){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 r.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Se(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Se(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Se(document,"touchmove",this._handleFallbackAutoScroll):Se(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?Ce(document,"dragover",this._handleAutoScroll):(Ce(document,"pointermove",this._handleFallbackAutoScroll),Ce(document,"touchmove",this._handleFallbackAutoScroll),Ce(document,"mousemove",this._handleFallbackAutoScroll)),Gm(),Gs(),NP()},nulling:function(){ac=sd=Qi=cd=Xi=Nu=Ou=null,Xe.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,s=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(s,l);if(ac=t,n||this.options.forceAutoScrollFallback||_a||Sr||na){Pu(t,this.options,d,n);var f=$r(d,!0);cd&&(!Xi||s!==Nu||l!==Ou)&&(Xi&&Gm(),Xi=setInterval(function(){var g=$r(document.elementFromPoint(s,l),!0);g!==f&&(f=g,Gs()),Pu(t,i.options,g,n)},10),Nu=s,Ou=l)}else{if(!this.options.bubbleScroll||$r(d,!0)===er()){Gs();return}Pu(t,this.options,$r(d,!1),!1)}}},Tr(r,{pluginName:"scroll",initializeByDefault:!0})}function Gs(){Xe.forEach(function(r){clearInterval(r.pid)}),Xe=[]}function Gm(){clearInterval(Xi)}var Pu=ey(function(r,e,t,n){if(e.scroll){var i=(r.touches?r.touches[0]:r).clientX,s=(r.touches?r.touches[0]:r).clientY,l=e.scrollSensitivity,d=e.scrollSpeed,f=er(),g=!1,m;sd!==t&&(sd=t,Gs(),Qi=e.scroll,m=e.scrollFn,Qi===!0&&(Qi=$r(t,!0)));var w=0,v=Qi;do{var E=v,_=it(E),A=_.top,R=_.bottom,$=_.left,V=_.right,U=_.width,Q=_.height,se=void 0,we=void 0,z=E.scrollWidth,tt=E.scrollHeight,_e=re(E),j=E.scrollLeft,q=E.scrollTop;E===f?(se=U<z&&(_e.overflowX==="auto"||_e.overflowX==="scroll"||_e.overflowX==="visible"),we=Q<tt&&(_e.overflowY==="auto"||_e.overflowY==="scroll"||_e.overflowY==="visible")):(se=U<z&&(_e.overflowX==="auto"||_e.overflowX==="scroll"),we=Q<tt&&(_e.overflowY==="auto"||_e.overflowY==="scroll"));var Te=se&&(Math.abs(V-i)<=l&&j+U<z)-(Math.abs($-i)<=l&&!!j),Be=we&&(Math.abs(R-s)<=l&&q+Q<tt)-(Math.abs(A-s)<=l&&!!q);if(!Xe[w])for(var Ct=0;Ct<=w;Ct++)Xe[Ct]||(Xe[Ct]={});(Xe[w].vx!=Te||Xe[w].vy!=Be||Xe[w].el!==E)&&(Xe[w].el=E,Xe[w].vx=Te,Xe[w].vy=Be,clearInterval(Xe[w].pid),(Te!=0||Be!=0)&&(g=!0,Xe[w].pid=setInterval((function(){n&&this.layer===0&&oe.active._onTouchMove(ac);var An=Xe[this.layer].vy?Xe[this.layer].vy*d:0,an=Xe[this.layer].vx?Xe[this.layer].vx*d:0;typeof m=="function"&&m.call(oe.dragged.parentNode[nn],an,An,r,ac,Xe[this.layer].el)!=="continue"||ty(Xe[this.layer].el,an,An)}).bind({layer:w}),24))),w++}while(e.bubbleScroll&&v!==f&&(v=$r(v,!1)));cd=g}},30),cy=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,s=e.activeSortable,l=e.dispatchSortableEvent,d=e.hideGhostForTarget,f=e.unhideGhostForTarget;if(t){var g=n||s;d();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,w=document.elementFromPoint(m.clientX,m.clientY);f(),g&&!g.el.contains(w)&&(l("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function zd(){}zd.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=hi(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:cy};Tr(zd,{pluginName:"revertOnSpill"});function Wd(){}Wd.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:cy};Tr(Wd,{pluginName:"removeOnSpill"});oe.mount(new jP);oe.mount(Wd,zd);function YP(){return typeof window<"u"?window.console:global.console}const JP=YP();function QP(r){const e=Object.create(null);return function(n){return e[n]||(e[n]=r(n))}}const XP=/-(\w)/g,jm=QP(r=>r.replace(XP,(e,t)=>t?t.toUpperCase():""));function Mu(r){r.parentElement!==null&&r.parentElement.removeChild(r)}function Ym(r,e,t){const n=t===0?r.children[0]:r.children[t-1].nextSibling;r.insertBefore(e,n)}function ZP(r,e){return Object.values(r).indexOf(e)}function e1(r,e,t,n){if(!r)return[];const i=Object.values(r),s=e.length-n;return[...e].map((d,f)=>f>=s?i.length:i.indexOf(d))}function ly(r,e){this.$nextTick(()=>this.$emit(r.toLowerCase(),e))}function t1(r){return e=>{this.realList!==null&&this["onDrag"+r](e),ly.call(this,r,e)}}function n1(r){return["transition-group","TransitionGroup"].includes(r)}function r1(r){if(!r||r.length!==1)return!1;const[{type:e}]=r;return e?n1(e.name):!1}function o1(r,e){return e?{...e.props,...e.attrs}:r}const ld=["Start","Add","Remove","Update","End"],ud=["Choose","Unchoose","Sort","Filter","Clone"],i1=["Move",...ld,...ud].map(r=>"on"+r);let xu=null;const a1={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:r=>r},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},s1=c.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...ld.map(r=>r.toLowerCase()),...ud.map(r=>r.toLowerCase())],props:a1,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const r=this.$slots.default?this.$slots.default():null,e=o1(this.$attrs,this.componentData);return r?(this.transitionMode=r1(r),c.h(this.getTag(),e,r)):c.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&JP.error("list props are mutually exclusive! Please set one.")},mounted(){const r={};ld.forEach(i=>{r["on"+i]=t1.call(this,i)}),ud.forEach(i=>{r["on"+i]=ly.bind(this,i)});const e=Object.keys(this.$attrs).reduce((i,s)=>(i[jm(s)]=this.$attrs[s],i),{}),t=Object.assign({},e,r,{onMove:(i,s)=>this.onDragMove(i,s)});!("draggable"in t)&&(t.draggable=">*");const n=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new oe(n,t),n.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(r){this.updateOptions(r)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?c.resolveComponent(this.component):this.tag},updateOptions(r){for(var e in r){const t=jm(e);i1.indexOf(t)===-1&&this._sortable.option(t,r[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=e1(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(r){const e=ZP(this.getChildrenNodes()||[],r);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(r){this.$nextTick(()=>{this.$emit("change",r)})},alterList(r){if(this.list){r(this.list);return}const e=[...this.modelValue];r(e),this.$emit("update:modelValue",e)},spliceList(){const r=e=>e.splice(...arguments);this.alterList(r)},updatePosition(r,e){const t=n=>n.splice(e,0,n.splice(r,1)[0]);this.alterList(t)},getVmIndex(r){const e=this.visibleIndexes,t=e.length;return r>t-1?t:e[r]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(r){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[r].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(r){this.computeIndexes(),this.context=this.getUnderlyingVm(r.item),this.context&&(r.item._underlying_vm_=this.clone(this.context.element),xu=r.item)},onDragAdd(r){const e=r.item._underlying_vm_;if(e===void 0)return;Mu(r.item);const t=this.getVmIndex(r.newIndex);this.spliceList(t,0,e),this.computeIndexes();const n={element:e,newIndex:t};this.emitChanges({added:n})},onDragRemove(r){if(Ym(this.$el,r.item,r.oldIndex),r.pullMode==="clone"){Mu(r.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const t={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:t})},onDragUpdate(r){Mu(r.item),Ym(r.from,r.item,r.oldIndex);const e=this.context.index,t=this.getVmIndex(r.newIndex);this.updatePosition(e,t);const n={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:n})},updateProperty(r,e){r.hasOwnProperty(e)&&(r[e]+=this.headerOffset)},onDragMove(r,e){const t=this.move;if(!t||!this.realList)return!0;const n=this.getRelatedContextFromMoveEvent(r),i=this.context,s=this.computeFutureIndex(n,r);Object.assign(i,{futureIndex:s});const l=Object.assign({},r,{relatedContext:n,draggedContext:i});return t(l,e)},onDragEnd(){this.computeIndexes(),xu=null},getTrargetedComponent(r){return r.__draggable_component__},getRelatedContextFromMoveEvent({to:r,related:e}){const t=this.getTrargetedComponent(r);if(!t)return{component:t};const n=t.realList,i={list:n,component:t};if(r!==e&&n&&t.getUnderlyingVm){const s=t.getUnderlyingVm(e);if(s)return Object.assign(s,i)}return i},computeFutureIndex(r,e){const t=[...e.to.children].filter(l=>l.style.display!=="none");if(t.length===0)return 0;const n=t.indexOf(e.related),i=r.component.getVmIndex(n);return t.indexOf(xu)!==-1||!e.willInsertAfter?i:i+1}}}),c1={class:"d-flex flex-row align-center"},qd=c.defineComponent({__name:"ColumnSettingsDialog",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(r){const e=c.useModel(r,"modelValue"),t=c.ref(""),n=c.computed(()=>{var i;return(i=e.value)==null?void 0:i.filter(s=>s.title.toLowerCase().includes(t.value.toLowerCase()))});return(i,s)=>{const l=c.resolveComponent("v-list-item-content");return c.openBlock(),c.createBlock(wa,{"dd-id":"col-settings",buttons:!1,title:"Column settings"},{default:c.withCtx(()=>[c.createVNode(kc,{modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=d=>t.value=d)},null,8,["modelValue"]),c.createVNode(St.VList,null,{default:c.withCtx(()=>[c.createVNode(c.unref(s1),{list:n.value,animation:200,"ghost-class":"ghost-card"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,d=>(c.openBlock(),c.createBlock(St.VListItem,{key:d.key,class:"pa-0"},{default:c.withCtx(()=>[c.createElementVNode("div",c1,[c.createVNode(c.unref(v0),{class:"cursor-grab mb-2"}),c.createVNode(St.VListItemAction,null,{default:c.withCtx(()=>[c.createVNode(Ik.VCheckbox,{modelValue:d.checked,"onUpdate:modelValue":f=>d.checked=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),c.createVNode(l,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,{class:"mb-1"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.title)+" ",1)]),_:2},1024)]),_:2},1024),d.icon?(c.openBlock(),c.createBlock(Zs.VIcon,{key:0},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.icon),1)]),_:2},1024)):c.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1})}}}),l1=["src","height","width"],u1={key:0,class:"text-center text-h6"},d1={key:1,class:"text-center text-h5"},h1={key:0,class:"text-center"},f1={class:"d-flex justify-center align-center mt-4 ga-3"},Gd=c.defineComponent({__name:"TableCard",props:{item:{},columns:{},size:{},image:{},tags:{},route:{},callback:{type:Function}},setup(r){const e=r,t=()=>{var i;return((i=e.columns.find(s=>s.isHeader))==null?void 0:i.key)||""},n=()=>{var i;return((i=e.columns.find(s=>s.isSubtitle))==null?void 0:i.key)||""};return(i,s)=>(c.openBlock(),c.createBlock(lt.VCard,{onClick:i.callback,ripple:"",class:"d-flex flex-column pa-4pa-4 bg-containerBg"},{default:c.withCtx(()=>[c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.createVNode(Ae.VRow,{"no-gutters":"",align:"center",justify:"end"},{default:c.withCtx(()=>[c.renderSlot(i.$slots,"actions",{item:i.item})]),_:3})]),_:3}),c.createVNode(lt.VCardTitle,null,{default:c.withCtx(()=>[c.createVNode(Ae.VRow,{"no-gutters":"",align:"center",justify:"center"},{default:c.withCtx(()=>[i.image?(c.openBlock(),c.createElementBlock("img",{key:0,src:i.image,height:i.size,width:i.size,alt:""},null,8,l1)):c.createCommentVNode("",!0)]),_:1})]),_:1}),t()?(c.openBlock(),c.createElementBlock("div",u1,c.toDisplayString(i.item[t()]),1)):c.createCommentVNode("",!0),n()?(c.openBlock(),c.createElementBlock("div",d1,c.toDisplayString(i.item[n()]),1)):c.createCommentVNode("",!0),c.createVNode(fo.VDivider,{class:"ma-3"}),c.createVNode(lt.VCardText,{class:"d-flex flex-column align-center pa-4 pt-1"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.columns,l=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:l.key},[i.item[l.key]&&!l.isHeader&&!l.isSubtitle?(c.openBlock(),c.createElementBlock("div",h1,c.toDisplayString(l.title)+": "+c.toDisplayString(i.item[l.key]),1)):c.createCommentVNode("",!0)],64))),128)),c.createElementVNode("div",f1,[i.tags?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(i.tags,l=>(c.openBlock(),c.createBlock(kk.VChip,{class:"pa-3",key:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l),1)]),_:2},1024))),128)):c.createCommentVNode("",!0)])]),_:1})]),_:3},8,["onClick"]))}}),g1=c.defineComponent({__name:"TableCardsView",props:{data:{},columns:{},size:{},itemKey:{}},setup(r){return(e,t)=>(c.openBlock(),c.createBlock(Ae.VRow,{class:"mt-5 border tb-cards-h",wrap:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.data,n=>(c.openBlock(),c.createBlock(Ae.VCol,{cols:"12",sm:"6",md:"4",lg:"3",class:"pa-2",key:n[e.itemKey]},{default:c.withCtx(()=>[c.createVNode(Gd,{item:n,columns:e.columns,size:e.size},{actions:c.withCtx(({item:i})=>[c.renderSlot(e.$slots,"actions",{item:i},void 0,!0)]),_:2},1032,["item","columns","size"])]),_:2},1024))),128))]),_:3}))}}),uy=vi(g1,[["__scopeId","data-v-e1a4ccbc"]]),m1={class:"j-field px-4 py-3 rounded-sm bg-containerBg"},dy=c.defineComponent({__name:"ReadOnlyField",props:{value:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",m1,c.toDisplayString(e.value),1))}}),p1={key:0,class:"mb-2 ms-1"},hy=c.defineComponent({__name:"JTextField",props:{modelValue:{},name:{},label:{},type:{default:"text"},readonly:{type:Boolean},density:{},rules:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock("div",null,[s.name?(c.openBlock(),c.createElementBlock("p",p1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(c.unref(Kr.VTextField),{key:2,variant:i.value,color:"secondary","bg-color":"containerBg",rounded:"sm","hide-details":"auto",type:s.type,density:s.density,rules:s.rules,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),class:"j-field"},null,8,["variant","type","density","rules","value"])),s.readonly?(c.openBlock(),c.createBlock(dy,{key:3,value:s.modelValue},null,8,["value"])):c.createCommentVNode("",!0)]))}}),v1={class:"text-faded mt-7"},y1={class:"d-flex align-baseline mb-1"},C1={class:"me-1"},w1={class:"max-w-_form-metadataJ"},_1={key:0,class:"mb-1"},T1={key:1,class:"mb-1"},E1={class:"mb-1"},Nc=c.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",v1,[c.createVNode(Ae.VRow,{"no-gutters":"",class:"align-end",align:"center",justify:"space-between"},{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default"),e.id?(c.openBlock(),c.createBlock(Ae.VCol,{key:0,cols:"auto",class:"pa-2"},{default:c.withCtx(()=>[c.createElementVNode("p",y1,[c.createElementVNode("b",C1,c.toDisplayString(e.id.title)+": ",1),c.createElementVNode("span",w1,c.toDisplayString(e.id.key||"-"),1),c.createElementVNode("span",null,[c.createVNode(wc,{"content-to-copy":e.id.key,size:15},null,8,["content-to-copy"])])]),c.createElementVNode("p",null,[t[0]||(t[0]=c.createElementVNode("b",null,"Created: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.created_at)+" - "+c.toDisplayString(e.meta.created_by),1)])]),_:1})):c.createCommentVNode("",!0),c.createVNode(Ae.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:c.withCtx(()=>[e.meta.updated_at&&e.meta.updated_by?(c.openBlock(),c.createElementBlock("p",_1,[t[1]||(t[1]=c.createElementVNode("b",null,"Updated: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.updated_at)+" - "+c.toDisplayString(e.meta.updated_by),1)])):(c.openBlock(),c.createElementBlock("p",T1,[t[2]||(t[2]=c.createElementVNode("b",null,"Modified: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.modified_at)+" - "+c.toDisplayString(e.meta.modified_by),1)])),c.createElementVNode("p",E1,[t[3]||(t[3]=c.createElementVNode("b",null,"Delegated: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.delegated_at)+" - "+c.toDisplayString(e.meta.delegated_by),1)])]),_:1})]),_:3})]))}}),S1={key:0,class:"mb-2 ms-1"},fy=c.defineComponent({__name:"JSelect",props:{modelValue:{},name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled"),s=c.computed(()=>{if(Array.isArray(t.items)&&t.items.length>0)if(typeof t.items[0]=="object"&&t.itemValue&&t.itemTitle){const d=t.items.find(f=>f[t.itemValue]===t.modelValue);return d?d[t.itemTitle]:""}else{const d=t.items.indexOf(t.modelValue);return d!==-1?t.items[d]:""}return""}),l=d=>{n("update:modelValue",d)};return(d,f)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[d.name?(c.openBlock(),c.createElementBlock("p",S1,c.toDisplayString(d.name),1)):c.createCommentVNode("",!0),d.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.label),1)]),_:1})):c.createCommentVNode("",!0),d.readonly?(c.openBlock(),c.createBlock(dy,{key:3,value:s.value},null,8,["value"])):(c.openBlock(),c.createBlock(c.unref(Kr.VSelect),{key:2,modelValue:t.modelValue,"onUpdate:modelValue":[f[0]||(f[0]=g=>t.modelValue=g),l],variant:i.value,items:d.items,"item-title":d.itemTitle,"item-value":d.itemValue,loading:d.loading,placeholder:d.placeholder,density:d.density,"bg-color":"containerBg",rounded:"false","hide-details":"",class:"j-field"},null,8,["modelValue","variant","items","item-title","item-value","loading","placeholder","density"]))],64))}}),A1={key:0,class:"mb-2 ms-1"},b1={key:3,class:"j-textarea px-4 py-3 rounded-sm bg-containerBg"},gy=c.defineComponent({__name:"JTextArea",props:{modelValue:{},name:{},label:{},readonly:{type:Boolean},rows:{},hideDetails:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[s.name?(c.openBlock(),c.createElementBlock("p",A1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Rk.VTextarea,{key:2,variant:i.value,"bg-color":"containerBg",rounded:"false",rows:s.rows,hideDetails:s.hideDetails,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),"no-resize":""},null,8,["variant","rows","hideDetails","value"])),s.readonly?(c.openBlock(),c.createElementBlock("div",b1,c.toDisplayString(s.modelValue),1)):c.createCommentVNode("",!0)],64))}}),my=c.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Ue.VBtn,{color:"secondary",variant:"outlined",onClick:i[0]||(i[0]=s=>t("cancel")),class:"me-2 j-btn-form"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.title?"Cancel":"Back"),1)]),_:1}))}}),py=c.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(r,{emit:e}){const t=e,n=c.ref(!1);async function i(){n.value=!0,await t("onSave"),n.value=!1}return(s,l)=>(c.openBlock(),c.createBlock(Ue.VBtn,{disabled:s.disabled,loading:n.value,color:"secondary",onClick:i,onKeydown:c.withKeys(i,["enter"]),class:"j-btn-form"},{default:c.withCtx(()=>l[0]||(l[0]=[c.createTextVNode(" Save ")])),_:1},8,["disabled","loading"]))}}),I1={class:"mt-4"},vy=c.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Ac,{title:n.title,class:"d-flex flex-column ma-0"},{default:c.withCtx(()=>[n.title?(c.openBlock(),c.createBlock(fo.VDivider,{key:0})):c.createCommentVNode("",!0),c.createElementVNode("div",I1,[c.renderSlot(n.$slots,"default")]),c.createVNode(lt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:c.withCtx(()=>[c.createVNode(Ae.VRow,{justify:"space-between",class:"mt-4"},{default:c.withCtx(()=>[c.createVNode(Ae.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(Nc,{id:n.id,meta:n.metadata},null,8,["id","meta"])]),_:1}),c.createVNode(Ae.VSpacer),c.createVNode(Ae.VCol,{cols:"auto",class:"align-content-end"},{default:c.withCtx(()=>[c.createVNode(my,{"cancel-return":n.cancelReturn,onCancel:i[0]||(i[0]=s=>t("onCancel"))},null,8,["cancel-return"]),c.createVNode(py,{onOnSave:i[1]||(i[1]=s=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),k1={class:"d-flex align-items-center"},R1={key:0,class:"d-flex align-center"},N1={class:"ms-1"},O1={class:"d-flex"},P1={class:"d-flex mb-1 align-center"},M1={class:"min-w-100 relative"},yy=c.defineComponent({__name:"TabFormHeader",props:{id:{},readonly:{type:Boolean,default:!1}},emits:["update:isEdition","save","cancel","delete","disable"],setup(r,{emit:e}){var g;const t=r,n=e,i=c.getCurrentInstance(),s=((g=i==null?void 0:i.vnode.props)==null?void 0:g.onDisable)!==void 0,l=c.ref(t.readonly);function d(){l.value=!l.value,n("update:isEdition",l.value)}async function f(){n("delete"),n("disable")}return(m,w)=>(c.openBlock(),c.createElementBlock("div",k1,[m.id?(c.openBlock(),c.createElementBlock("div",R1,[w[0]||(w[0]=c.createElementVNode("b",null,"ID:",-1)),c.createElementVNode("span",N1,c.toDisplayString(m.id),1),c.createVNode(wc,{"content-to-copy":m.id,size:20},null,8,["content-to-copy"])])):c.createCommentVNode("",!0),c.createVNode(Ae.VSpacer),c.createElementVNode("div",O1,[c.createVNode(Ue.VBtn,{onClick:f,variant:"text"},{default:c.withCtx(()=>[s?(c.openBlock(),c.createBlock(c.unref(d0),{key:0,size:"11",class:"me-2"})):c.createCommentVNode("",!0),c.createVNode(Zs.VIcon,{class:"me-2"},{default:c.withCtx(()=>w[1]||(w[1]=[c.createTextVNode("mdi-delete-outline")])),_:1}),c.createTextVNode(" "+c.toDisplayString(s?"Disable":"Delete"),1)]),_:1}),c.createElementVNode("div",P1,[c.createVNode(fo.VDivider,{class:"mx-2 my-1",vertical:""}),c.createElementVNode("div",M1,[c.withDirectives(c.createVNode(Ue.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:c.withCtx(()=>w[2]||(w[2]=[c.createTextVNode(" Edit ")])),_:1},512),[[c.vShow,!l.value]]),c.withDirectives(c.createVNode(Ue.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:c.withCtx(()=>[c.createVNode(Zs.VIcon,{class:"pt-1 pe-2"},{default:c.withCtx(()=>w[3]||(w[3]=[c.createTextVNode("mdi-close")])),_:1}),w[4]||(w[4]=c.createTextVNode(" Cancel "))]),_:1},512),[[c.vShow,l.value]])])])])]))}}),x1={class:"d-flex flex-column"},D1={class:"height d-flex flex-column"},L1={class:"d-flex justify-between align-end"},U1=c.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e,n=c.useAttrs();return(i,s)=>(c.openBlock(),c.createBlock(Ac,null,{default:c.withCtx(()=>[c.createElementVNode("div",x1,[c.createElementVNode("div",D1,[c.renderSlot(i.$slots,"default",{},void 0,!0)])]),c.createElementVNode("div",L1,[c.createVNode(Ae.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:c.withCtx(()=>[c.createVNode(Ae.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(Nc,{id:i.id,meta:i.metadata},null,8,["id","meta"])]),_:1}),i.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Ae.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:c.withCtx(()=>["onCancel"in c.unref(n)?(c.openBlock(),c.createBlock(my,{key:0,title:"Back",onCancel:s[0]||(s[0]=l=>t("onCancel"))})):c.createCommentVNode("",!0),"onSave"in c.unref(n)?(c.openBlock(),c.createBlock(py,{key:1,onOnSave:s[1]||(s[1]=l=>t("onSave"))})):c.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),Cy=vi(U1,[["__scopeId","data-v-489d31c3"]]);/**
|
20
|
+
*/function Vm(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function nr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Vm(Object(t),!0).forEach(function(n){TP(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Vm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Ks(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ks=function(e){return typeof e}:Ks=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ks(r)}function TP(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Tr(){return Tr=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Tr.apply(this,arguments)}function EP(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function SP(r,e){if(r==null)return{};var t=EP(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var AP="1.14.0";function wr(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var Sr=wr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_a=wr(/Edge/i),Fm=wr(/firefox/i),na=wr(/safari/i)&&!wr(/chrome/i)&&!wr(/android/i),Qv=wr(/iP(ad|od|hone)/i),bP=wr(/chrome/i)&&wr(/android/i),Xv={capture:!1,passive:!1};function Se(r,e,t){r.addEventListener(e,t,!Sr&&Xv)}function Ce(r,e,t){r.removeEventListener(e,t,!Sr&&Xv)}function nc(r,e){if(e){if(e[0]===">"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function IP(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function jn(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&nc(r,e):nc(r,e))||n&&r===t)return r;if(r===t)break}while(r=IP(r))}return null}var Hm=/\s+/g;function Yt(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(Hm," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(Hm," ")}}function re(r,e,t){var n=r&&r.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(t=r.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function ci(r,e){var t="";if(typeof r=="string")t=r;else do{var n=re(r,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(r=r.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function Zv(r,e,t){if(r){var n=r.getElementsByTagName(e),i=0,s=n.length;if(t)for(;i<s;i++)t(n[i],i);return n}return[]}function er(){var r=document.scrollingElement;return r||document.documentElement}function it(r,e,t,n,i){if(!(!r.getBoundingClientRect&&r!==window)){var s,l,d,f,g,m,w;if(r!==window&&r.parentNode&&r!==er()?(s=r.getBoundingClientRect(),l=s.top,d=s.left,f=s.bottom,g=s.right,m=s.height,w=s.width):(l=0,d=0,f=window.innerHeight,g=window.innerWidth,m=window.innerHeight,w=window.innerWidth),(e||t)&&r!==window&&(i=i||r.parentNode,!Sr))do if(i&&i.getBoundingClientRect&&(re(i,"transform")!=="none"||t&&re(i,"position")!=="static")){var v=i.getBoundingClientRect();l-=v.top+parseInt(re(i,"border-top-width")),d-=v.left+parseInt(re(i,"border-left-width")),f=l+s.height,g=d+s.width;break}while(i=i.parentNode);if(n&&r!==window){var E=ci(i||r),_=E&&E.a,A=E&&E.d;E&&(l/=A,d/=_,w/=_,m/=A,f=l+m,g=d+w)}return{top:l,left:d,bottom:f,right:g,width:w,height:m}}}function $m(r,e,t){for(var n=$r(r,!0),i=it(r)[e];n;){var s=it(n)[t],l=void 0;if(l=i>=s,!l)return n;if(n===er())break;n=$r(n,!1)}return!1}function hi(r,e,t,n){for(var i=0,s=0,l=r.children;s<l.length;){if(l[s].style.display!=="none"&&l[s]!==oe.ghost&&(n||l[s]!==oe.dragged)&&jn(l[s],t.draggable,r,!1)){if(i===e)return l[s];i++}s++}return null}function Kd(r,e){for(var t=r.lastElementChild;t&&(t===oe.ghost||re(t,"display")==="none"||e&&!nc(t,e));)t=t.previousElementSibling;return t||null}function En(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==oe.clone&&(!e||nc(r,e))&&t++;return t}function Km(r){var e=0,t=0,n=er();if(r)do{var i=ci(r),s=i.a,l=i.d;e+=r.scrollLeft*s,t+=r.scrollTop*l}while(r!==n&&(r=r.parentNode));return[e,t]}function kP(r,e){for(var t in r)if(r.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===r[t][n])return Number(t)}return-1}function $r(r,e){if(!r||!r.getBoundingClientRect)return er();var t=r,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=re(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return er();if(n||e)return t;n=!0}}while(t=t.parentNode);return er()}function RP(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function Su(r,e){return Math.round(r.top)===Math.round(e.top)&&Math.round(r.left)===Math.round(e.left)&&Math.round(r.height)===Math.round(e.height)&&Math.round(r.width)===Math.round(e.width)}var ra;function ey(r,e){return function(){if(!ra){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),ra=setTimeout(function(){ra=void 0},e)}}}function NP(){clearTimeout(ra),ra=void 0}function ty(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function ny(r){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(r).cloneNode(!0):t?t(r).clone(!0)[0]:r.cloneNode(!0)}var nn="Sortable"+new Date().getTime();function OP(){var r=[],e;return{captureAnimationState:function(){if(r=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(re(i,"display")==="none"||i===oe.ghost)){r.push({target:i,rect:it(i)});var s=nr({},r[r.length-1].rect);if(i.thisAnimationDuration){var l=ci(i,!0);l&&(s.top-=l.f,s.left-=l.e)}i.fromRect=s}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(kP(r,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,l=0;r.forEach(function(d){var f=0,g=d.target,m=g.fromRect,w=it(g),v=g.prevFromRect,E=g.prevToRect,_=d.rect,A=ci(g,!0);A&&(w.top-=A.f,w.left-=A.e),g.toRect=w,g.thisAnimationDuration&&Su(v,w)&&!Su(m,w)&&(_.top-w.top)/(_.left-w.left)===(m.top-w.top)/(m.left-w.left)&&(f=MP(_,v,E,i.options)),Su(w,m)||(g.prevFromRect=m,g.prevToRect=w,f||(f=i.options.animation),i.animate(g,_,w,f)),f&&(s=!0,l=Math.max(l,f),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},f),g.thisAnimationDuration=f)}),clearTimeout(e),s?e=setTimeout(function(){typeof n=="function"&&n()},l):typeof n=="function"&&n(),r=[]},animate:function(n,i,s,l){if(l){re(n,"transition",""),re(n,"transform","");var d=ci(this.el),f=d&&d.a,g=d&&d.d,m=(i.left-s.left)/(f||1),w=(i.top-s.top)/(g||1);n.animatingX=!!m,n.animatingY=!!w,re(n,"transform","translate3d("+m+"px,"+w+"px,0)"),this.forRepaintDummy=PP(n),re(n,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),re(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){re(n,"transition",""),re(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},l)}}}}function PP(r){return r.offsetWidth}function MP(r,e,t,n){return Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var $o=[],Au={initializeByDefault:!0},Ta={mount:function(e){for(var t in Au)Au.hasOwnProperty(t)&&!(t in e)&&(e[t]=Au[t]);$o.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),$o.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var s=e+"Global";$o.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][s]&&t[l.pluginName][s](nr({sortable:t},n)),t.options[l.pluginName]&&t[l.pluginName][e]&&t[l.pluginName][e](nr({sortable:t},n)))})},initializePlugins:function(e,t,n,i){$o.forEach(function(d){var f=d.pluginName;if(!(!e.options[f]&&!d.initializeByDefault)){var g=new d(e,t,e.options);g.sortable=e,g.options=e.options,e[f]=g,Tr(n,g.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var l=this.modifyOption(e,s,e.options[s]);typeof l<"u"&&(e.options[s]=l)}},getEventProperties:function(e,t){var n={};return $o.forEach(function(i){typeof i.eventProperties=="function"&&Tr(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return $o.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(i=s.optionListeners[t].call(e[s.pluginName],n))}),i}};function xP(r){var e=r.sortable,t=r.rootEl,n=r.name,i=r.targetEl,s=r.cloneEl,l=r.toEl,d=r.fromEl,f=r.oldIndex,g=r.newIndex,m=r.oldDraggableIndex,w=r.newDraggableIndex,v=r.originalEvent,E=r.putSortable,_=r.extraEventProperties;if(e=e||t&&t[nn],!!e){var A,R=e.options,$="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Sr&&!_a?A=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(A=document.createEvent("Event"),A.initEvent(n,!0,!0)),A.to=l||t,A.from=d||t,A.item=i||t,A.clone=s,A.oldIndex=f,A.newIndex=g,A.oldDraggableIndex=m,A.newDraggableIndex=w,A.originalEvent=v,A.pullMode=E?E.lastPutMode:void 0;var V=nr(nr({},_),Ta.getEventProperties(n,e));for(var U in V)A[U]=V[U];t&&t.dispatchEvent(A),R[$]&&R[$].call(e,A)}}var DP=["evt"],Vt=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,s=SP(n,DP);Ta.pluginEvent.bind(oe)(e,t,nr({dragEl:H,parentEl:qe,ghostEl:le,rootEl:Fe,nextEl:so,lastDownEl:zs,cloneEl:Ge,cloneHidden:Br,dragStarted:Ji,putSortable:vt,activeSortable:oe.active,originalEvent:i,oldIndex:oi,oldDraggableIndex:oa,newIndex:Jt,newDraggableIndex:Ur,hideGhostForTarget:ay,unhideGhostForTarget:sy,cloneNowHidden:function(){Br=!0},cloneNowShown:function(){Br=!1},dispatchSortableEvent:function(d){Pt({sortable:t,name:d,originalEvent:i})}},s))};function Pt(r){xP(nr({putSortable:vt,cloneEl:Ge,targetEl:H,rootEl:Fe,oldIndex:oi,oldDraggableIndex:oa,newIndex:Jt,newDraggableIndex:Ur},r))}var H,qe,le,Fe,so,zs,Ge,Br,oi,Jt,oa,Ur,Ts,vt,Qo=!1,rc=!1,oc=[],ro,Pn,bu,Iu,zm,Wm,Ji,Ko,ia,aa=!1,Es=!1,Ws,Et,ku=[],id=!1,ic=[],Rc=typeof document<"u",Ss=Qv,qm=_a||Sr?"cssFloat":"float",LP=Rc&&!bP&&!Qv&&"draggable"in document.createElement("div"),ry=function(){if(Rc){if(Sr)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),oy=function(e,t){var n=re(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),s=hi(e,0,t),l=hi(e,1,t),d=s&&re(s),f=l&&re(l),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+it(s).width,m=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+it(l).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(s&&d.float&&d.float!=="none"){var w=d.float==="left"?"left":"right";return l&&(f.clear==="both"||f.clear===w)?"vertical":"horizontal"}return s&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&n[qm]==="none"||l&&n[qm]==="none"&&g+m>i)?"vertical":"horizontal"},UP=function(e,t,n){var i=n?e.left:e.top,s=n?e.right:e.bottom,l=n?e.width:e.height,d=n?t.left:t.top,f=n?t.right:t.bottom,g=n?t.width:t.height;return i===d||s===f||i+l/2===d+g/2},BP=function(e,t){var n;return oc.some(function(i){var s=i[nn].options.emptyInsertThreshold;if(!(!s||Kd(i))){var l=it(i),d=e>=l.left-s&&e<=l.right+s,f=t>=l.top-s&&t<=l.bottom+s;if(d&&f)return n=i}}),n},iy=function(e){function t(s,l){return function(d,f,g,m){var w=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(s==null&&(l||w))return!0;if(s==null||s===!1)return!1;if(l&&s==="clone")return s;if(typeof s=="function")return t(s(d,f,g,m),l)(d,f,g,m);var v=(l?d:f).options.group.name;return s===!0||typeof s=="string"&&s===v||s.join&&s.indexOf(v)>-1}}var n={},i=e.group;(!i||Ks(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},ay=function(){!ry&&le&&re(le,"display","none")},sy=function(){!ry&&le&&re(le,"display","")};Rc&&document.addEventListener("click",function(r){if(rc)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),rc=!1,!1},!0);var oo=function(e){if(H){e=e.touches?e.touches[0]:e;var t=BP(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[nn]._onDragOver(n)}}},VP=function(e){H&&H.parentNode[nn]._isOutsideThisEl(e.target)};function oe(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=Tr({},e),r[nn]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return oy(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,d){l.setData("Text",d.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:oe.supportPointer!==!1&&"PointerEvent"in window&&!na,emptyInsertThreshold:5};Ta.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);iy(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:LP,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Se(r,"pointerdown",this._onTapStart):(Se(r,"mousedown",this._onTapStart),Se(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Se(r,"dragover",this),Se(r,"dragenter",this)),oc.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Tr(this,OP())}oe.prototype={constructor:oe,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ko=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,H):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,s=i.preventOnFilter,l=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,f=(d||e).target,g=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||f,m=i.filter;if(GP(n),!H&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&na&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=jn(f,i.draggable,n,!1),!(f&&f.animated)&&zs!==f)){if(oi=En(f),oa=En(f,i.draggable),typeof m=="function"){if(m.call(this,e,f,this)){Pt({sortable:t,rootEl:g,name:"filter",targetEl:f,toEl:n,fromEl:n}),Vt("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(m&&(m=m.split(",").some(function(w){if(w=jn(g,w.trim(),n,!1),w)return Pt({sortable:t,rootEl:w,name:"filter",targetEl:f,fromEl:n,toEl:n}),Vt("filter",t,{evt:e}),!0}),m)){s&&e.cancelable&&e.preventDefault();return}i.handle&&!jn(g,i.handle,n,!1)||this._prepareDragStart(e,d,f)}}},_prepareDragStart:function(e,t,n){var i=this,s=i.el,l=i.options,d=s.ownerDocument,f;if(n&&!H&&n.parentNode===s){var g=it(n);if(Fe=s,H=n,qe=H.parentNode,so=H.nextSibling,zs=n,Ts=l.group,oe.dragged=H,ro={target:H,clientX:(t||e).clientX,clientY:(t||e).clientY},zm=ro.clientX-g.left,Wm=ro.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,H.style["will-change"]="all",f=function(){if(Vt("delayEnded",i,{evt:e}),oe.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Fm&&i.nativeDraggable&&(H.draggable=!0),i._triggerDragStart(e,t),Pt({sortable:i,name:"choose",originalEvent:e}),Yt(H,l.chosenClass,!0)},l.ignore.split(",").forEach(function(m){Zv(H,m.trim(),Ru)}),Se(d,"dragover",oo),Se(d,"mousemove",oo),Se(d,"touchmove",oo),Se(d,"mouseup",i._onDrop),Se(d,"touchend",i._onDrop),Se(d,"touchcancel",i._onDrop),Fm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,H.draggable=!0),Vt("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(_a||Sr))){if(oe.eventCanceled){this._onDrop();return}Se(d,"mouseup",i._disableDelayedDrag),Se(d,"touchend",i._disableDelayedDrag),Se(d,"touchcancel",i._disableDelayedDrag),Se(d,"mousemove",i._delayedDragTouchMoveHandler),Se(d,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&Se(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,l.delay)}else f()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){H&&Ru(H),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._disableDelayedDrag),Ce(e,"touchend",this._disableDelayedDrag),Ce(e,"touchcancel",this._disableDelayedDrag),Ce(e,"mousemove",this._delayedDragTouchMoveHandler),Ce(e,"touchmove",this._delayedDragTouchMoveHandler),Ce(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Se(document,"pointermove",this._onTouchMove):t?Se(document,"touchmove",this._onTouchMove):Se(document,"mousemove",this._onTouchMove):(Se(H,"dragend",this),Se(Fe,"dragstart",this._onDragStart));try{document.selection?qs(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Qo=!1,Fe&&H){Vt("dragStarted",this,{evt:t}),this.nativeDraggable&&Se(document,"dragover",VP);var n=this.options;!e&&Yt(H,n.dragClass,!1),Yt(H,n.ghostClass,!0),oe.active=this,e&&this._appendGhost(),Pt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Pn){this._lastX=Pn.clientX,this._lastY=Pn.clientY,ay();for(var e=document.elementFromPoint(Pn.clientX,Pn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Pn.clientX,Pn.clientY),e!==t);)t=e;if(H.parentNode[nn]._isOutsideThisEl(e),t)do{if(t[nn]){var n=void 0;if(n=t[nn]._onDragOver({clientX:Pn.clientX,clientY:Pn.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);sy()}},_onTouchMove:function(e){if(ro){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,s=e.touches?e.touches[0]:e,l=le&&ci(le,!0),d=le&&l&&l.a,f=le&&l&&l.d,g=Ss&&Et&&Km(Et),m=(s.clientX-ro.clientX+i.x)/(d||1)+(g?g[0]-ku[0]:0)/(d||1),w=(s.clientY-ro.clientY+i.y)/(f||1)+(g?g[1]-ku[1]:0)/(f||1);if(!oe.active&&!Qo){if(n&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(le){l?(l.e+=m-(bu||0),l.f+=w-(Iu||0)):l={a:1,b:0,c:0,d:1,e:m,f:w};var v="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");re(le,"webkitTransform",v),re(le,"mozTransform",v),re(le,"msTransform",v),re(le,"transform",v),bu=m,Iu=w,Pn=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!le){var e=this.options.fallbackOnBody?document.body:Fe,t=it(H,!0,Ss,!0,e),n=this.options;if(Ss){for(Et=e;re(Et,"position")==="static"&&re(Et,"transform")==="none"&&Et!==document;)Et=Et.parentNode;Et!==document.body&&Et!==document.documentElement?(Et===document&&(Et=er()),t.top+=Et.scrollTop,t.left+=Et.scrollLeft):Et=er(),ku=Km(Et)}le=H.cloneNode(!0),Yt(le,n.ghostClass,!1),Yt(le,n.fallbackClass,!0),Yt(le,n.dragClass,!0),re(le,"transition",""),re(le,"transform",""),re(le,"box-sizing","border-box"),re(le,"margin",0),re(le,"top",t.top),re(le,"left",t.left),re(le,"width",t.width),re(le,"height",t.height),re(le,"opacity","0.8"),re(le,"position",Ss?"absolute":"fixed"),re(le,"zIndex","100000"),re(le,"pointerEvents","none"),oe.ghost=le,e.appendChild(le),re(le,"transform-origin",zm/parseInt(le.style.width)*100+"% "+Wm/parseInt(le.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,s=n.options;if(Vt("dragStart",this,{evt:e}),oe.eventCanceled){this._onDrop();return}Vt("setupClone",this),oe.eventCanceled||(Ge=ny(H),Ge.draggable=!1,Ge.style["will-change"]="",this._hideClone(),Yt(Ge,this.options.chosenClass,!1),oe.clone=Ge),n.cloneId=qs(function(){Vt("clone",n),!oe.eventCanceled&&(n.options.removeCloneOnHide||Fe.insertBefore(Ge,H),n._hideClone(),Pt({sortable:n,name:"clone"}))}),!t&&Yt(H,s.dragClass,!0),t?(rc=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ce(document,"mouseup",n._onDrop),Ce(document,"touchend",n._onDrop),Ce(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",s.setData&&s.setData.call(n,i,H)),Se(document,"drop",n),re(H,"transform","translateZ(0)")),Qo=!0,n._dragStartId=qs(n._dragStarted.bind(n,t,e)),Se(document,"selectstart",n),Ji=!0,na&&re(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,s,l,d=this.options,f=d.group,g=oe.active,m=Ts===f,w=d.sort,v=vt||g,E,_=this,A=!1;if(id)return;function R(Qe,wt){Vt(Qe,_,nr({evt:e,isOwner:m,axis:E?"vertical":"horizontal",revert:l,dragRect:i,targetRect:s,canSort:w,fromSortable:v,target:n,completed:V,onMove:function($t,Qc){return As(Fe,t,H,i,$t,it($t),e,Qc)},changed:U},wt))}function $(){R("dragOverAnimationCapture"),_.captureAnimationState(),_!==v&&v.captureAnimationState()}function V(Qe){return R("dragOverCompleted",{insertion:Qe}),Qe&&(m?g._hideClone():g._showClone(_),_!==v&&(Yt(H,vt?vt.options.ghostClass:g.options.ghostClass,!1),Yt(H,d.ghostClass,!0)),vt!==_&&_!==oe.active?vt=_:_===oe.active&&vt&&(vt=null),v===_&&(_._ignoreWhileAnimating=n),_.animateAll(function(){R("dragOverAnimationComplete"),_._ignoreWhileAnimating=null}),_!==v&&(v.animateAll(),v._ignoreWhileAnimating=null)),(n===H&&!H.animated||n===t&&!n.animated)&&(Ko=null),!d.dragoverBubble&&!e.rootEl&&n!==document&&(H.parentNode[nn]._isOutsideThisEl(e.target),!Qe&&oo(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),A=!0}function U(){Jt=En(H),Ur=En(H,d.draggable),Pt({sortable:_,name:"change",toEl:t,newIndex:Jt,newDraggableIndex:Ur,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=jn(n,d.draggable,t,!0),R("dragOver"),oe.eventCanceled)return A;if(H.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||_._ignoreWhileAnimating===n)return V(!1);if(rc=!1,g&&!d.disabled&&(m?w||(l=qe!==Fe):vt===this||(this.lastPutMode=Ts.checkPull(this,g,H,e))&&f.checkPut(this,g,H,e))){if(E=this._getDirection(e,n)==="vertical",i=it(H),R("dragOverValid"),oe.eventCanceled)return A;if(l)return qe=Fe,$(),this._hideClone(),R("revert"),oe.eventCanceled||(so?Fe.insertBefore(H,so):Fe.appendChild(H)),V(!0);var Q=Kd(t,d.draggable);if(!Q||KP(e,E,this)&&!Q.animated){if(Q===H)return V(!1);if(Q&&t===e.target&&(n=Q),n&&(s=it(n)),As(Fe,t,H,i,n,s,e,!!n)!==!1)return $(),t.appendChild(H),qe=t,U(),V(!0)}else if(Q&&$P(e,E,this)){var se=hi(t,0,d,!0);if(se===H)return V(!1);if(n=se,s=it(n),As(Fe,t,H,i,n,s,e,!1)!==!1)return $(),t.insertBefore(H,se),qe=t,U(),V(!0)}else if(n.parentNode===t){s=it(n);var we=0,z,tt=H.parentNode!==t,_e=!UP(H.animated&&H.toRect||i,n.animated&&n.toRect||s,E),j=E?"top":"left",q=$m(n,"top","top")||$m(H,"top","top"),Te=q?q.scrollTop:void 0;Ko!==n&&(z=s[j],aa=!1,Es=!_e&&d.invertSwap||tt),we=zP(e,n,s,E,_e?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,Es,Ko===n);var Be;if(we!==0){var Ct=En(H);do Ct-=we,Be=qe.children[Ct];while(Be&&(re(Be,"display")==="none"||Be===le))}if(we===0||Be===n)return V(!1);Ko=n,ia=we;var An=n.nextElementSibling,an=!1;an=we===1;var xt=As(Fe,t,H,i,n,s,e,an);if(xt!==!1)return(xt===1||xt===-1)&&(an=xt===1),id=!0,setTimeout(HP,30),$(),an&&!An?t.appendChild(H):n.parentNode.insertBefore(H,an?An:n),q&&ty(q,0,Te-q.scrollTop),qe=H.parentNode,z!==void 0&&!Es&&(Ws=Math.abs(z-it(n)[j])),U(),V(!0)}if(t.contains(H))return V(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ce(document,"mousemove",this._onTouchMove),Ce(document,"touchmove",this._onTouchMove),Ce(document,"pointermove",this._onTouchMove),Ce(document,"dragover",oo),Ce(document,"mousemove",oo),Ce(document,"touchmove",oo)},_offUpEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._onDrop),Ce(e,"touchend",this._onDrop),Ce(e,"pointerup",this._onDrop),Ce(e,"touchcancel",this._onDrop),Ce(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Jt=En(H),Ur=En(H,n.draggable),Vt("drop",this,{evt:e}),qe=H&&H.parentNode,Jt=En(H),Ur=En(H,n.draggable),oe.eventCanceled){this._nulling();return}Qo=!1,Es=!1,aa=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ad(this.cloneId),ad(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),na&&re(document.body,"user-select",""),re(H,"transform",""),e&&(Ji&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Fe===qe||vt&&vt.lastPutMode!=="clone")&&Ge&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),H&&(this.nativeDraggable&&Ce(H,"dragend",this),Ru(H),H.style["will-change"]="",Ji&&!Qo&&Yt(H,vt?vt.options.ghostClass:this.options.ghostClass,!1),Yt(H,this.options.chosenClass,!1),Pt({sortable:this,name:"unchoose",toEl:qe,newIndex:null,newDraggableIndex:null,originalEvent:e}),Fe!==qe?(Jt>=0&&(Pt({rootEl:qe,name:"add",toEl:qe,fromEl:Fe,originalEvent:e}),Pt({sortable:this,name:"remove",toEl:qe,originalEvent:e}),Pt({rootEl:qe,name:"sort",toEl:qe,fromEl:Fe,originalEvent:e}),Pt({sortable:this,name:"sort",toEl:qe,originalEvent:e})),vt&&vt.save()):Jt!==oi&&Jt>=0&&(Pt({sortable:this,name:"update",toEl:qe,originalEvent:e}),Pt({sortable:this,name:"sort",toEl:qe,originalEvent:e})),oe.active&&((Jt==null||Jt===-1)&&(Jt=oi,Ur=oa),Pt({sortable:this,name:"end",toEl:qe,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Vt("nulling",this),Fe=H=qe=le=so=Ge=zs=Br=ro=Pn=Ji=Jt=Ur=oi=oa=Ko=ia=vt=Ts=oe.dragged=oe.ghost=oe.clone=oe.active=null,ic.forEach(function(e){e.checked=!0}),ic.length=bu=Iu=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":H&&(this._onDragOver(e),FP(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,s=n.length,l=this.options;i<s;i++)t=n[i],jn(t,l.draggable,this.el,!1)&&e.push(t.getAttribute(l.dataIdAttr)||qP(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(s,l){var d=i.children[l];jn(d,this.options.draggable,i,!1)&&(n[s]=d)},this),t&&this.captureAnimationState(),e.forEach(function(s){n[s]&&(i.removeChild(n[s]),i.appendChild(n[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return jn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=Ta.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&iy(n)},destroy:function(){Vt("destroy",this);var e=this.el;e[nn]=null,Ce(e,"mousedown",this._onTapStart),Ce(e,"touchstart",this._onTapStart),Ce(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ce(e,"dragover",this),Ce(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),oc.splice(oc.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Br){if(Vt("hideClone",this),oe.eventCanceled)return;re(Ge,"display","none"),this.options.removeCloneOnHide&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),Br=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Br){if(Vt("showClone",this),oe.eventCanceled)return;H.parentNode==Fe&&!this.options.group.revertClone?Fe.insertBefore(Ge,H):so?Fe.insertBefore(Ge,so):Fe.appendChild(Ge),this.options.group.revertClone&&this.animate(H,Ge),re(Ge,"display",""),Br=!1}}};function FP(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function As(r,e,t,n,i,s,l,d){var f,g=r[nn],m=g.options.onMove,w;return window.CustomEvent&&!Sr&&!_a?f=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent("move",!0,!0)),f.to=e,f.from=r,f.dragged=t,f.draggedRect=n,f.related=i||e,f.relatedRect=s||it(e),f.willInsertAfter=d,f.originalEvent=l,r.dispatchEvent(f),m&&(w=m.call(g,f,l)),w}function Ru(r){r.draggable=!1}function HP(){id=!1}function $P(r,e,t){var n=it(hi(t.el,0,t.options,!0)),i=10;return e?r.clientX<n.left-i||r.clientY<n.top&&r.clientX<n.right:r.clientY<n.top-i||r.clientY<n.bottom&&r.clientX<n.left}function KP(r,e,t){var n=it(Kd(t.el,t.options.draggable)),i=10;return e?r.clientX>n.right+i||r.clientX<=n.right&&r.clientY>n.bottom&&r.clientX>=n.left:r.clientX>n.right&&r.clientY>n.top||r.clientX<=n.right&&r.clientY>n.bottom+i}function zP(r,e,t,n,i,s,l,d){var f=n?r.clientY:r.clientX,g=n?t.height:t.width,m=n?t.top:t.left,w=n?t.bottom:t.right,v=!1;if(!l){if(d&&Ws<g*i){if(!aa&&(ia===1?f>m+g*s/2:f<w-g*s/2)&&(aa=!0),aa)v=!0;else if(ia===1?f<m+Ws:f>w-Ws)return-ia}else if(f>m+g*(1-i)/2&&f<w-g*(1-i)/2)return WP(e)}return v=v||l,v&&(f<m+g*s/2||f>w-g*s/2)?f>m+g/2?1:-1:0}function WP(r){return En(H)<En(r)?1:-1}function qP(r){for(var e=r.tagName+r.className+r.src+r.href+r.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function GP(r){ic.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&ic.push(n)}}function qs(r){return setTimeout(r,0)}function ad(r){return clearTimeout(r)}Rc&&Se(document,"touchmove",function(r){(oe.active||Qo)&&r.cancelable&&r.preventDefault()});oe.utils={on:Se,off:Ce,css:re,find:Zv,is:function(e,t){return!!jn(e,t,e,!1)},extend:RP,throttle:ey,closest:jn,toggleClass:Yt,clone:ny,index:En,nextTick:qs,cancelNextTick:ad,detectDirection:oy,getChild:hi};oe.get=function(r){return r[nn]};oe.mount=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(oe.utils=nr(nr({},oe.utils),n.utils)),Ta.mount(n)})};oe.create=function(r,e){return new oe(r,e)};oe.version=AP;var Xe=[],Qi,sd,cd=!1,Nu,Ou,ac,Xi;function jP(){function r(){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 r.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Se(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Se(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Se(document,"touchmove",this._handleFallbackAutoScroll):Se(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?Ce(document,"dragover",this._handleAutoScroll):(Ce(document,"pointermove",this._handleFallbackAutoScroll),Ce(document,"touchmove",this._handleFallbackAutoScroll),Ce(document,"mousemove",this._handleFallbackAutoScroll)),Gm(),Gs(),NP()},nulling:function(){ac=sd=Qi=cd=Xi=Nu=Ou=null,Xe.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,s=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(s,l);if(ac=t,n||this.options.forceAutoScrollFallback||_a||Sr||na){Pu(t,this.options,d,n);var f=$r(d,!0);cd&&(!Xi||s!==Nu||l!==Ou)&&(Xi&&Gm(),Xi=setInterval(function(){var g=$r(document.elementFromPoint(s,l),!0);g!==f&&(f=g,Gs()),Pu(t,i.options,g,n)},10),Nu=s,Ou=l)}else{if(!this.options.bubbleScroll||$r(d,!0)===er()){Gs();return}Pu(t,this.options,$r(d,!1),!1)}}},Tr(r,{pluginName:"scroll",initializeByDefault:!0})}function Gs(){Xe.forEach(function(r){clearInterval(r.pid)}),Xe=[]}function Gm(){clearInterval(Xi)}var Pu=ey(function(r,e,t,n){if(e.scroll){var i=(r.touches?r.touches[0]:r).clientX,s=(r.touches?r.touches[0]:r).clientY,l=e.scrollSensitivity,d=e.scrollSpeed,f=er(),g=!1,m;sd!==t&&(sd=t,Gs(),Qi=e.scroll,m=e.scrollFn,Qi===!0&&(Qi=$r(t,!0)));var w=0,v=Qi;do{var E=v,_=it(E),A=_.top,R=_.bottom,$=_.left,V=_.right,U=_.width,Q=_.height,se=void 0,we=void 0,z=E.scrollWidth,tt=E.scrollHeight,_e=re(E),j=E.scrollLeft,q=E.scrollTop;E===f?(se=U<z&&(_e.overflowX==="auto"||_e.overflowX==="scroll"||_e.overflowX==="visible"),we=Q<tt&&(_e.overflowY==="auto"||_e.overflowY==="scroll"||_e.overflowY==="visible")):(se=U<z&&(_e.overflowX==="auto"||_e.overflowX==="scroll"),we=Q<tt&&(_e.overflowY==="auto"||_e.overflowY==="scroll"));var Te=se&&(Math.abs(V-i)<=l&&j+U<z)-(Math.abs($-i)<=l&&!!j),Be=we&&(Math.abs(R-s)<=l&&q+Q<tt)-(Math.abs(A-s)<=l&&!!q);if(!Xe[w])for(var Ct=0;Ct<=w;Ct++)Xe[Ct]||(Xe[Ct]={});(Xe[w].vx!=Te||Xe[w].vy!=Be||Xe[w].el!==E)&&(Xe[w].el=E,Xe[w].vx=Te,Xe[w].vy=Be,clearInterval(Xe[w].pid),(Te!=0||Be!=0)&&(g=!0,Xe[w].pid=setInterval((function(){n&&this.layer===0&&oe.active._onTouchMove(ac);var An=Xe[this.layer].vy?Xe[this.layer].vy*d:0,an=Xe[this.layer].vx?Xe[this.layer].vx*d:0;typeof m=="function"&&m.call(oe.dragged.parentNode[nn],an,An,r,ac,Xe[this.layer].el)!=="continue"||ty(Xe[this.layer].el,an,An)}).bind({layer:w}),24))),w++}while(e.bubbleScroll&&v!==f&&(v=$r(v,!1)));cd=g}},30),cy=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,s=e.activeSortable,l=e.dispatchSortableEvent,d=e.hideGhostForTarget,f=e.unhideGhostForTarget;if(t){var g=n||s;d();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,w=document.elementFromPoint(m.clientX,m.clientY);f(),g&&!g.el.contains(w)&&(l("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function zd(){}zd.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=hi(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:cy};Tr(zd,{pluginName:"revertOnSpill"});function Wd(){}Wd.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:cy};Tr(Wd,{pluginName:"removeOnSpill"});oe.mount(new jP);oe.mount(Wd,zd);function YP(){return typeof window<"u"?window.console:global.console}const JP=YP();function QP(r){const e=Object.create(null);return function(n){return e[n]||(e[n]=r(n))}}const XP=/-(\w)/g,jm=QP(r=>r.replace(XP,(e,t)=>t?t.toUpperCase():""));function Mu(r){r.parentElement!==null&&r.parentElement.removeChild(r)}function Ym(r,e,t){const n=t===0?r.children[0]:r.children[t-1].nextSibling;r.insertBefore(e,n)}function ZP(r,e){return Object.values(r).indexOf(e)}function e1(r,e,t,n){if(!r)return[];const i=Object.values(r),s=e.length-n;return[...e].map((d,f)=>f>=s?i.length:i.indexOf(d))}function ly(r,e){this.$nextTick(()=>this.$emit(r.toLowerCase(),e))}function t1(r){return e=>{this.realList!==null&&this["onDrag"+r](e),ly.call(this,r,e)}}function n1(r){return["transition-group","TransitionGroup"].includes(r)}function r1(r){if(!r||r.length!==1)return!1;const[{type:e}]=r;return e?n1(e.name):!1}function o1(r,e){return e?{...e.props,...e.attrs}:r}const ld=["Start","Add","Remove","Update","End"],ud=["Choose","Unchoose","Sort","Filter","Clone"],i1=["Move",...ld,...ud].map(r=>"on"+r);let xu=null;const a1={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:r=>r},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},s1=c.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...ld.map(r=>r.toLowerCase()),...ud.map(r=>r.toLowerCase())],props:a1,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const r=this.$slots.default?this.$slots.default():null,e=o1(this.$attrs,this.componentData);return r?(this.transitionMode=r1(r),c.h(this.getTag(),e,r)):c.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&JP.error("list props are mutually exclusive! Please set one.")},mounted(){const r={};ld.forEach(i=>{r["on"+i]=t1.call(this,i)}),ud.forEach(i=>{r["on"+i]=ly.bind(this,i)});const e=Object.keys(this.$attrs).reduce((i,s)=>(i[jm(s)]=this.$attrs[s],i),{}),t=Object.assign({},e,r,{onMove:(i,s)=>this.onDragMove(i,s)});!("draggable"in t)&&(t.draggable=">*");const n=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new oe(n,t),n.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(r){this.updateOptions(r)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?c.resolveComponent(this.component):this.tag},updateOptions(r){for(var e in r){const t=jm(e);i1.indexOf(t)===-1&&this._sortable.option(t,r[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=e1(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(r){const e=ZP(this.getChildrenNodes()||[],r);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(r){this.$nextTick(()=>{this.$emit("change",r)})},alterList(r){if(this.list){r(this.list);return}const e=[...this.modelValue];r(e),this.$emit("update:modelValue",e)},spliceList(){const r=e=>e.splice(...arguments);this.alterList(r)},updatePosition(r,e){const t=n=>n.splice(e,0,n.splice(r,1)[0]);this.alterList(t)},getVmIndex(r){const e=this.visibleIndexes,t=e.length;return r>t-1?t:e[r]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(r){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[r].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(r){this.computeIndexes(),this.context=this.getUnderlyingVm(r.item),this.context&&(r.item._underlying_vm_=this.clone(this.context.element),xu=r.item)},onDragAdd(r){const e=r.item._underlying_vm_;if(e===void 0)return;Mu(r.item);const t=this.getVmIndex(r.newIndex);this.spliceList(t,0,e),this.computeIndexes();const n={element:e,newIndex:t};this.emitChanges({added:n})},onDragRemove(r){if(Ym(this.$el,r.item,r.oldIndex),r.pullMode==="clone"){Mu(r.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const t={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:t})},onDragUpdate(r){Mu(r.item),Ym(r.from,r.item,r.oldIndex);const e=this.context.index,t=this.getVmIndex(r.newIndex);this.updatePosition(e,t);const n={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:n})},updateProperty(r,e){r.hasOwnProperty(e)&&(r[e]+=this.headerOffset)},onDragMove(r,e){const t=this.move;if(!t||!this.realList)return!0;const n=this.getRelatedContextFromMoveEvent(r),i=this.context,s=this.computeFutureIndex(n,r);Object.assign(i,{futureIndex:s});const l=Object.assign({},r,{relatedContext:n,draggedContext:i});return t(l,e)},onDragEnd(){this.computeIndexes(),xu=null},getTrargetedComponent(r){return r.__draggable_component__},getRelatedContextFromMoveEvent({to:r,related:e}){const t=this.getTrargetedComponent(r);if(!t)return{component:t};const n=t.realList,i={list:n,component:t};if(r!==e&&n&&t.getUnderlyingVm){const s=t.getUnderlyingVm(e);if(s)return Object.assign(s,i)}return i},computeFutureIndex(r,e){const t=[...e.to.children].filter(l=>l.style.display!=="none");if(t.length===0)return 0;const n=t.indexOf(e.related),i=r.component.getVmIndex(n);return t.indexOf(xu)!==-1||!e.willInsertAfter?i:i+1}}}),c1={class:"d-flex flex-row align-center"},qd=c.defineComponent({__name:"ColumnSettingsDialog",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(r){const e=c.useModel(r,"modelValue"),t=c.ref(""),n=c.computed(()=>{var i;return(i=e.value)==null?void 0:i.filter(s=>s.title.toLowerCase().includes(t.value.toLowerCase()))});return(i,s)=>{const l=c.resolveComponent("v-list-item-content");return c.openBlock(),c.createBlock(wa,{"dd-id":"col-settings",buttons:!1,title:"Column settings"},{default:c.withCtx(()=>[c.createVNode(kc,{modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=d=>t.value=d)},null,8,["modelValue"]),c.createVNode(St.VList,null,{default:c.withCtx(()=>[c.createVNode(c.unref(s1),{list:n.value,animation:200,"ghost-class":"ghost-card"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,d=>(c.openBlock(),c.createBlock(St.VListItem,{key:d.key,class:"pa-0"},{default:c.withCtx(()=>[c.createElementVNode("div",c1,[c.createVNode(c.unref(v0),{class:"cursor-grab mb-2"}),c.createVNode(St.VListItemAction,null,{default:c.withCtx(()=>[c.createVNode(Ik.VCheckbox,{modelValue:d.checked,"onUpdate:modelValue":f=>d.checked=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),c.createVNode(l,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,{class:"mb-1"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.title)+" ",1)]),_:2},1024)]),_:2},1024),d.icon?(c.openBlock(),c.createBlock(Zs.VIcon,{key:0},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.icon),1)]),_:2},1024)):c.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1})}}}),l1=["src","height","width"],u1={key:0,class:"text-center text-h6"},d1={key:1,class:"text-center text-h5"},h1={key:0,class:"text-center"},f1={class:"d-flex justify-center align-center mt-4 ga-3"},Gd=c.defineComponent({__name:"TableCard",props:{item:{},columns:{},size:{},image:{},tags:{},route:{},callback:{type:Function}},setup(r){const e=r,t=()=>{var i;return((i=e.columns.find(s=>s.isHeader))==null?void 0:i.key)||""},n=()=>{var i;return((i=e.columns.find(s=>s.isSubtitle))==null?void 0:i.key)||""};return(i,s)=>(c.openBlock(),c.createBlock(lt.VCard,{onClick:i.callback,ripple:"",class:"d-flex flex-column pa-4pa-4 bg-containerBg"},{default:c.withCtx(()=>[c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.createVNode(Ae.VRow,{"no-gutters":"",align:"center",justify:"end"},{default:c.withCtx(()=>[c.renderSlot(i.$slots,"actions",{item:i.item})]),_:3})]),_:3}),c.createVNode(lt.VCardTitle,null,{default:c.withCtx(()=>[c.createVNode(Ae.VRow,{"no-gutters":"",align:"center",justify:"center"},{default:c.withCtx(()=>[i.image?(c.openBlock(),c.createElementBlock("img",{key:0,src:i.image,height:i.size,width:i.size,alt:""},null,8,l1)):c.createCommentVNode("",!0)]),_:1})]),_:1}),t()?(c.openBlock(),c.createElementBlock("div",u1,c.toDisplayString(i.item[t()]),1)):c.createCommentVNode("",!0),n()?(c.openBlock(),c.createElementBlock("div",d1,c.toDisplayString(i.item[n()]),1)):c.createCommentVNode("",!0),c.createVNode(fo.VDivider,{class:"ma-3"}),c.createVNode(lt.VCardText,{class:"d-flex flex-column align-center pa-4 pt-1"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.columns,l=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:l.key},[i.item[l.key]&&!l.isHeader&&!l.isSubtitle?(c.openBlock(),c.createElementBlock("div",h1,c.toDisplayString(l.title)+": "+c.toDisplayString(i.item[l.key]),1)):c.createCommentVNode("",!0)],64))),128)),c.createElementVNode("div",f1,[i.tags?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(i.tags,l=>(c.openBlock(),c.createBlock(kk.VChip,{class:"pa-3",key:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l),1)]),_:2},1024))),128)):c.createCommentVNode("",!0)])]),_:1})]),_:3},8,["onClick"]))}}),g1=c.defineComponent({__name:"TableCardsView",props:{data:{},columns:{},size:{},itemKey:{}},setup(r){return(e,t)=>(c.openBlock(),c.createBlock(Ae.VRow,{class:"mt-5 border tb-cards-h",wrap:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.data,n=>(c.openBlock(),c.createBlock(Ae.VCol,{cols:"12",sm:"6",md:"4",lg:"3",class:"pa-2",key:n[e.itemKey]},{default:c.withCtx(()=>[c.createVNode(Gd,{item:n,columns:e.columns,size:e.size},{actions:c.withCtx(({item:i})=>[c.renderSlot(e.$slots,"actions",{item:i},void 0,!0)]),_:2},1032,["item","columns","size"])]),_:2},1024))),128))]),_:3}))}}),uy=vi(g1,[["__scopeId","data-v-e1a4ccbc"]]),m1={class:"j-field px-4 py-3 rounded-sm bg-containerBg"},dy=c.defineComponent({__name:"ReadOnlyField",props:{value:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",m1,c.toDisplayString(e.value),1))}}),p1={key:0,class:"mb-2 ms-1"},hy=c.defineComponent({__name:"JTextField",props:{modelValue:{},name:{},label:{},type:{default:"text"},readonly:{type:Boolean},density:{},rules:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock("div",null,[s.name?(c.openBlock(),c.createElementBlock("p",p1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(c.unref(Kr.VTextField),{key:2,variant:i.value,color:"secondary","bg-color":"containerBg",rounded:"sm","hide-details":"auto",type:s.type,density:s.density,rules:s.rules,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),class:"j-field"},null,8,["variant","type","density","rules","value"])),s.readonly?(c.openBlock(),c.createBlock(dy,{key:3,value:s.modelValue},null,8,["value"])):c.createCommentVNode("",!0)]))}}),v1={class:"text-faded mt-7"},y1={class:"d-flex align-baseline mb-1"},C1={class:"me-1"},w1={class:"max-w-_form-metadataJ"},_1={key:0,class:"mb-1"},T1={key:1,class:"mb-1"},E1={class:"mb-1"},Nc=c.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",v1,[c.createVNode(Ae.VRow,{"no-gutters":"",class:"align-end",align:"center",justify:"space-between"},{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default"),e.id?(c.openBlock(),c.createBlock(Ae.VCol,{key:0,cols:"auto",class:"pa-2"},{default:c.withCtx(()=>[c.createElementVNode("p",y1,[c.createElementVNode("b",C1,c.toDisplayString(e.id.title)+": ",1),c.createElementVNode("span",w1,c.toDisplayString(e.id.key||"-"),1),c.createElementVNode("span",null,[c.createVNode(wc,{"content-to-copy":e.id.key,size:15},null,8,["content-to-copy"])])]),c.createElementVNode("p",null,[t[0]||(t[0]=c.createElementVNode("b",null,"Created: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.created_at)+" - "+c.toDisplayString(e.meta.created_by),1)])]),_:1})):c.createCommentVNode("",!0),c.createVNode(Ae.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:c.withCtx(()=>[e.meta.updated_at&&e.meta.updated_by?(c.openBlock(),c.createElementBlock("p",_1,[t[1]||(t[1]=c.createElementVNode("b",null,"Updated: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.updated_at)+" - "+c.toDisplayString(e.meta.updated_by),1)])):(c.openBlock(),c.createElementBlock("p",T1,[t[2]||(t[2]=c.createElementVNode("b",null,"Modified: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.modified_at)+" - "+c.toDisplayString(e.meta.modified_by),1)])),c.createElementVNode("p",E1,[t[3]||(t[3]=c.createElementVNode("b",null,"Delegated: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.delegated_at)+" - "+c.toDisplayString(e.meta.delegated_by),1)])]),_:1})]),_:3})]))}}),S1={key:0,class:"mb-2 ms-1"},fy=c.defineComponent({__name:"JSelect",props:{modelValue:{},name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean},clearable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled"),s=c.computed(()=>{if(Array.isArray(t.items)&&t.items.length>0)if(typeof t.items[0]=="object"&&t.itemValue&&t.itemTitle){const d=t.items.find(f=>f[t.itemValue]===t.modelValue);return d?d[t.itemTitle]:""}else{const d=t.items.indexOf(t.modelValue);return d!==-1?t.items[d]:""}return""}),l=d=>{n("update:modelValue",d)};return(d,f)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[d.name?(c.openBlock(),c.createElementBlock("p",S1,c.toDisplayString(d.name),1)):c.createCommentVNode("",!0),d.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.label),1)]),_:1})):c.createCommentVNode("",!0),d.readonly?(c.openBlock(),c.createBlock(dy,{key:3,value:s.value},null,8,["value"])):(c.openBlock(),c.createBlock(c.unref(Kr.VSelect),{key:2,modelValue:t.modelValue,"onUpdate:modelValue":[f[0]||(f[0]=g=>t.modelValue=g),l],variant:i.value,items:d.items,"item-title":d.itemTitle,"item-value":d.itemValue,loading:d.loading,placeholder:d.placeholder,density:d.density,"bg-color":"containerBg",rounded:"false","hide-details":"",class:"j-field",clearable:d.clearable},null,8,["modelValue","variant","items","item-title","item-value","loading","placeholder","density","clearable"]))],64))}}),A1={key:0,class:"mb-2 ms-1"},b1={key:3,class:"j-textarea px-4 py-3 rounded-sm bg-containerBg"},gy=c.defineComponent({__name:"JTextArea",props:{modelValue:{},name:{},label:{},readonly:{type:Boolean},rows:{},hideDetails:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[s.name?(c.openBlock(),c.createElementBlock("p",A1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Rk.VTextarea,{key:2,variant:i.value,"bg-color":"containerBg",rounded:"false",rows:s.rows,hideDetails:s.hideDetails,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),"no-resize":""},null,8,["variant","rows","hideDetails","value"])),s.readonly?(c.openBlock(),c.createElementBlock("div",b1,c.toDisplayString(s.modelValue),1)):c.createCommentVNode("",!0)],64))}}),my=c.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Ue.VBtn,{color:"secondary",variant:"outlined",onClick:i[0]||(i[0]=s=>t("cancel")),class:"me-2 j-btn-form"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.title?"Cancel":"Back"),1)]),_:1}))}}),py=c.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(r,{emit:e}){const t=e,n=c.ref(!1);async function i(){n.value=!0,await t("onSave"),n.value=!1}return(s,l)=>(c.openBlock(),c.createBlock(Ue.VBtn,{disabled:s.disabled,loading:n.value,color:"secondary",onClick:i,onKeydown:c.withKeys(i,["enter"]),class:"j-btn-form"},{default:c.withCtx(()=>l[0]||(l[0]=[c.createTextVNode(" Save ")])),_:1},8,["disabled","loading"]))}}),I1={class:"mt-4"},vy=c.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Ac,{title:n.title,class:"d-flex flex-column ma-0"},{default:c.withCtx(()=>[n.title?(c.openBlock(),c.createBlock(fo.VDivider,{key:0})):c.createCommentVNode("",!0),c.createElementVNode("div",I1,[c.renderSlot(n.$slots,"default")]),c.createVNode(lt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:c.withCtx(()=>[c.createVNode(Ae.VRow,{justify:"space-between",class:"mt-4"},{default:c.withCtx(()=>[c.createVNode(Ae.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(Nc,{id:n.id,meta:n.metadata},null,8,["id","meta"])]),_:1}),c.createVNode(Ae.VSpacer),c.createVNode(Ae.VCol,{cols:"auto",class:"align-content-end"},{default:c.withCtx(()=>[c.createVNode(my,{"cancel-return":n.cancelReturn,onCancel:i[0]||(i[0]=s=>t("onCancel"))},null,8,["cancel-return"]),c.createVNode(py,{onOnSave:i[1]||(i[1]=s=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),k1={class:"d-flex align-items-center"},R1={key:0,class:"d-flex align-center"},N1={class:"ms-1"},O1={class:"d-flex"},P1={class:"d-flex mb-1 align-center"},M1={class:"min-w-100 relative"},yy=c.defineComponent({__name:"TabFormHeader",props:{id:{},readonly:{type:Boolean,default:!1}},emits:["update:isEdition","save","cancel","delete","disable"],setup(r,{emit:e}){var g;const t=r,n=e,i=c.getCurrentInstance(),s=((g=i==null?void 0:i.vnode.props)==null?void 0:g.onDisable)!==void 0,l=c.ref(t.readonly);function d(){l.value=!l.value,n("update:isEdition",l.value)}async function f(){n("delete"),n("disable")}return(m,w)=>(c.openBlock(),c.createElementBlock("div",k1,[m.id?(c.openBlock(),c.createElementBlock("div",R1,[w[0]||(w[0]=c.createElementVNode("b",null,"ID:",-1)),c.createElementVNode("span",N1,c.toDisplayString(m.id),1),c.createVNode(wc,{"content-to-copy":m.id,size:20},null,8,["content-to-copy"])])):c.createCommentVNode("",!0),c.createVNode(Ae.VSpacer),c.createElementVNode("div",O1,[c.createVNode(Ue.VBtn,{onClick:f,variant:"text"},{default:c.withCtx(()=>[s?(c.openBlock(),c.createBlock(c.unref(d0),{key:0,size:"11",class:"me-2"})):c.createCommentVNode("",!0),c.createVNode(Zs.VIcon,{class:"me-2"},{default:c.withCtx(()=>w[1]||(w[1]=[c.createTextVNode("mdi-delete-outline")])),_:1}),c.createTextVNode(" "+c.toDisplayString(s?"Disable":"Delete"),1)]),_:1}),c.createElementVNode("div",P1,[c.createVNode(fo.VDivider,{class:"mx-2 my-1",vertical:""}),c.createElementVNode("div",M1,[c.withDirectives(c.createVNode(Ue.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:c.withCtx(()=>w[2]||(w[2]=[c.createTextVNode(" Edit ")])),_:1},512),[[c.vShow,!l.value]]),c.withDirectives(c.createVNode(Ue.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:c.withCtx(()=>[c.createVNode(Zs.VIcon,{class:"pt-1 pe-2"},{default:c.withCtx(()=>w[3]||(w[3]=[c.createTextVNode("mdi-close")])),_:1}),w[4]||(w[4]=c.createTextVNode(" Cancel "))]),_:1},512),[[c.vShow,l.value]])])])])]))}}),x1={class:"d-flex flex-column"},D1={class:"height d-flex flex-column"},L1={class:"d-flex justify-between align-end"},U1=c.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e,n=c.useAttrs();return(i,s)=>(c.openBlock(),c.createBlock(Ac,null,{default:c.withCtx(()=>[c.createElementVNode("div",x1,[c.createElementVNode("div",D1,[c.renderSlot(i.$slots,"default",{},void 0,!0)])]),c.createElementVNode("div",L1,[c.createVNode(Ae.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:c.withCtx(()=>[c.createVNode(Ae.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(Nc,{id:i.id,meta:i.metadata},null,8,["id","meta"])]),_:1}),i.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Ae.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:c.withCtx(()=>["onCancel"in c.unref(n)?(c.openBlock(),c.createBlock(my,{key:0,title:"Back",onCancel:s[0]||(s[0]=l=>t("onCancel"))})):c.createCommentVNode("",!0),"onSave"in c.unref(n)?(c.openBlock(),c.createBlock(py,{key:1,onOnSave:s[1]||(s[1]=l=>t("onSave"))})):c.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),Cy=vi(U1,[["__scopeId","data-v-489d31c3"]]);/**
|
21
21
|
* @license @tabler/icons-vue v3.22.0 - MIT
|
22
22
|
*
|
23
23
|
* This source code is licensed under the MIT license.
|
@@ -89,4 +89,4 @@ __p += '`),ve&&(L+=`' +
|
|
89
89
|
function print() { __p += __j.call(arguments, '') }
|
90
90
|
`:`;
|
91
91
|
`)+L+`return __p
|
92
|
-
}`;var he=mm(function(){return Ee(C,Y+"return "+L).apply(t,T)});if(he.source=L,cu(he))throw he;return he}function MI(o){return be(o).toLowerCase()}function xI(o){return be(o).toUpperCase()}function DI(o,a,u){if(o=be(o),o&&(u||a===t))return Sf(o);if(!o||!(a=Wt(a)))return o;var h=kn(o),p=kn(a),C=Af(h,p),T=bf(h,p)+1;return Pr(h,C,T).join("")}function LI(o,a,u){if(o=be(o),o&&(u||a===t))return o.slice(0,kf(o)+1);if(!o||!(a=Wt(a)))return o;var h=kn(o),p=bf(h,kn(a))+1;return Pr(h,0,p).join("")}function UI(o,a,u){if(o=be(o),o&&(u||a===t))return o.replace(cl,"");if(!o||!(a=Wt(a)))return o;var h=kn(o),p=Af(h,kn(a));return Pr(h,p).join("")}function BI(o,a){var u=j,h=q;if($e(a)){var p="separator"in a?a.separator:p;u="length"in a?de(a.length):u,h="omission"in a?Wt(a.omission):h}o=be(o);var C=o.length;if(bo(o)){var T=kn(o);C=T.length}if(u>=C)return o;var S=u-Io(h);if(S<1)return h;var I=T?Pr(T,0,S).join(""):o.slice(0,S);if(p===t)return I+h;if(T&&(S+=I.length-S),lu(p)){if(o.slice(S).search(p)){var x,D=I;for(p.global||(p=Al(p.source,be(Wh.exec(p))+"g")),p.lastIndex=0;x=p.exec(D);)var L=x.index;I=I.slice(0,L===t?S:L)}}else if(o.indexOf(Wt(p),S)!=S){var K=I.lastIndexOf(p);K>-1&&(I=I.slice(0,K))}return I+h}function VI(o){return o=be(o),o&&Jw.test(o)?o.replace($h,gT):o}var FI=xo(function(o,a,u){return o+(u?" ":"")+a.toUpperCase()}),hu=pg("toUpperCase");function gm(o,a,u){return o=be(o),a=u?t:a,a===t?lT(o)?vT(o):eT(o):o.match(a)||[]}var mm=fe(function(o,a){try{return Kt(o,t,a)}catch(u){return cu(u)?u:new ae(u)}}),HI=lr(function(o,a){return cn(a,function(u){u=Wn(u),sr(o,u,au(o[u],o))}),o});function $I(o){var a=o==null?0:o.length,u=X();return o=a?Ve(o,function(h){if(typeof h[1]!="function")throw new ln(l);return[u(h[0]),h[1]]}):[],fe(function(h){for(var p=-1;++p<a;){var C=o[p];if(Kt(C[0],this,h))return Kt(C[1],this,h)}})}function KI(o){return gE(dn(o,w))}function fu(o){return function(){return o}}function zI(o,a){return o==null||o!==o?a:o}var WI=yg(),qI=yg(!0);function Bt(o){return o}function gu(o){return jf(typeof o=="function"?o:dn(o,w))}function GI(o){return Jf(dn(o,w))}function jI(o,a){return Qf(o,dn(a,w))}var YI=fe(function(o,a){return function(u){return Hi(u,o,a)}}),JI=fe(function(o,a){return function(u){return Hi(o,u,a)}});function mu(o,a,u){var h=st(a),p=ts(a,h);u==null&&!($e(a)&&(p.length||!h.length))&&(u=a,a=o,o=this,p=ts(a,st(a)));var C=!($e(u)&&"chain"in u)||!!u.chain,T=dr(o);return cn(p,function(S){var I=a[S];o[S]=I,T&&(o.prototype[S]=function(){var x=this.__chain__;if(C||x){var D=o(this.__wrapped__),L=D.__actions__=Dt(this.__actions__);return L.push({func:I,args:arguments,thisArg:o}),D.__chain__=x,D}return I.apply(o,br([this.value()],arguments))})}),o}function QI(){return ht._===this&&(ht._=ET),this}function pu(){}function XI(o){return o=de(o),fe(function(a){return Xf(a,o)})}var ZI=Gl(Ve),ek=Gl(Cf),tk=Gl(yl);function pm(o){return eu(o)?Cl(Wn(o)):OE(o)}function nk(o){return function(a){return o==null?t:Zr(o,a)}}var rk=wg(),ok=wg(!0);function vu(){return[]}function yu(){return!1}function ik(){return{}}function ak(){return""}function sk(){return!0}function ck(o,a){if(o=de(o),o<1||o>Qe)return[];var u=$t,h=_t(o,$t);a=X(a),o-=$t;for(var p=Tl(h,a);++u<o;)a(u);return p}function lk(o){return ce(o)?Ve(o,Wn):qt(o)?[o]:Dt(Lg(be(o)))}function uk(o){var a=++_T;return be(o)+a}var dk=ss(function(o,a){return o+a},0),hk=jl("ceil"),fk=ss(function(o,a){return o/a},1),gk=jl("floor");function mk(o){return o&&o.length?es(o,Bt,Ml):t}function pk(o,a){return o&&o.length?es(o,X(a,2),Ml):t}function vk(o){return Tf(o,Bt)}function yk(o,a){return Tf(o,X(a,2))}function Ck(o){return o&&o.length?es(o,Bt,Ul):t}function wk(o,a){return o&&o.length?es(o,X(a,2),Ul):t}var _k=ss(function(o,a){return o*a},1),Tk=jl("round"),Ek=ss(function(o,a){return o-a},0);function Sk(o){return o&&o.length?_l(o,Bt):0}function Ak(o,a){return o&&o.length?_l(o,X(a,2)):0}return y.after=GA,y.ary=Gg,y.assign=xb,y.assignIn=sm,y.assignInWith=ws,y.assignWith=Db,y.at=Lb,y.before=jg,y.bind=au,y.bindAll=HI,y.bindKey=Yg,y.castArray=ib,y.chain=zg,y.chunk=gS,y.compact=mS,y.concat=pS,y.cond=$I,y.conforms=KI,y.constant=fu,y.countBy=SA,y.create=Ub,y.curry=Jg,y.curryRight=Qg,y.debounce=Xg,y.defaults=Bb,y.defaultsDeep=Vb,y.defer=jA,y.delay=YA,y.difference=vS,y.differenceBy=yS,y.differenceWith=CS,y.drop=wS,y.dropRight=_S,y.dropRightWhile=TS,y.dropWhile=ES,y.fill=SS,y.filter=bA,y.flatMap=RA,y.flatMapDeep=NA,y.flatMapDepth=OA,y.flatten=Fg,y.flattenDeep=AS,y.flattenDepth=bS,y.flip=JA,y.flow=WI,y.flowRight=qI,y.fromPairs=IS,y.functions=qb,y.functionsIn=Gb,y.groupBy=PA,y.initial=RS,y.intersection=NS,y.intersectionBy=OS,y.intersectionWith=PS,y.invert=Yb,y.invertBy=Jb,y.invokeMap=xA,y.iteratee=gu,y.keyBy=DA,y.keys=st,y.keysIn=Ut,y.map=gs,y.mapKeys=Xb,y.mapValues=Zb,y.matches=GI,y.matchesProperty=jI,y.memoize=ps,y.merge=eI,y.mergeWith=cm,y.method=YI,y.methodOf=JI,y.mixin=mu,y.negate=vs,y.nthArg=XI,y.omit=tI,y.omitBy=nI,y.once=QA,y.orderBy=LA,y.over=ZI,y.overArgs=XA,y.overEvery=ek,y.overSome=tk,y.partial=su,y.partialRight=Zg,y.partition=UA,y.pick=rI,y.pickBy=lm,y.property=pm,y.propertyOf=nk,y.pull=LS,y.pullAll=$g,y.pullAllBy=US,y.pullAllWith=BS,y.pullAt=VS,y.range=rk,y.rangeRight=ok,y.rearg=ZA,y.reject=FA,y.remove=FS,y.rest=eb,y.reverse=ou,y.sampleSize=$A,y.set=iI,y.setWith=aI,y.shuffle=KA,y.slice=HS,y.sortBy=qA,y.sortedUniq=jS,y.sortedUniqBy=YS,y.split=RI,y.spread=tb,y.tail=JS,y.take=QS,y.takeRight=XS,y.takeRightWhile=ZS,y.takeWhile=eA,y.tap=mA,y.throttle=nb,y.thru=fs,y.toArray=om,y.toPairs=um,y.toPairsIn=dm,y.toPath=lk,y.toPlainObject=am,y.transform=sI,y.unary=rb,y.union=tA,y.unionBy=nA,y.unionWith=rA,y.uniq=oA,y.uniqBy=iA,y.uniqWith=aA,y.unset=cI,y.unzip=iu,y.unzipWith=Kg,y.update=lI,y.updateWith=uI,y.values=Uo,y.valuesIn=dI,y.without=sA,y.words=gm,y.wrap=ob,y.xor=cA,y.xorBy=lA,y.xorWith=uA,y.zip=dA,y.zipObject=hA,y.zipObjectDeep=fA,y.zipWith=gA,y.entries=um,y.entriesIn=dm,y.extend=sm,y.extendWith=ws,mu(y,y),y.add=dk,y.attempt=mm,y.camelCase=mI,y.capitalize=hm,y.ceil=hk,y.clamp=hI,y.clone=ab,y.cloneDeep=cb,y.cloneDeepWith=lb,y.cloneWith=sb,y.conformsTo=ub,y.deburr=fm,y.defaultTo=zI,y.divide=fk,y.endsWith=pI,y.eq=Nn,y.escape=vI,y.escapeRegExp=yI,y.every=AA,y.find=IA,y.findIndex=Bg,y.findKey=Fb,y.findLast=kA,y.findLastIndex=Vg,y.findLastKey=Hb,y.floor=gk,y.forEach=Wg,y.forEachRight=qg,y.forIn=$b,y.forInRight=Kb,y.forOwn=zb,y.forOwnRight=Wb,y.get=uu,y.gt=db,y.gte=hb,y.has=jb,y.hasIn=du,y.head=Hg,y.identity=Bt,y.includes=MA,y.indexOf=kS,y.inRange=fI,y.invoke=Qb,y.isArguments=no,y.isArray=ce,y.isArrayBuffer=fb,y.isArrayLike=Lt,y.isArrayLikeObject=je,y.isBoolean=gb,y.isBuffer=Mr,y.isDate=mb,y.isElement=pb,y.isEmpty=vb,y.isEqual=yb,y.isEqualWith=Cb,y.isError=cu,y.isFinite=wb,y.isFunction=dr,y.isInteger=em,y.isLength=ys,y.isMap=tm,y.isMatch=_b,y.isMatchWith=Tb,y.isNaN=Eb,y.isNative=Sb,y.isNil=bb,y.isNull=Ab,y.isNumber=nm,y.isObject=$e,y.isObjectLike=ze,y.isPlainObject=Gi,y.isRegExp=lu,y.isSafeInteger=Ib,y.isSet=rm,y.isString=Cs,y.isSymbol=qt,y.isTypedArray=Lo,y.isUndefined=kb,y.isWeakMap=Rb,y.isWeakSet=Nb,y.join=MS,y.kebabCase=CI,y.last=fn,y.lastIndexOf=xS,y.lowerCase=wI,y.lowerFirst=_I,y.lt=Ob,y.lte=Pb,y.max=mk,y.maxBy=pk,y.mean=vk,y.meanBy=yk,y.min=Ck,y.minBy=wk,y.stubArray=vu,y.stubFalse=yu,y.stubObject=ik,y.stubString=ak,y.stubTrue=sk,y.multiply=_k,y.nth=DS,y.noConflict=QI,y.noop=pu,y.now=ms,y.pad=TI,y.padEnd=EI,y.padStart=SI,y.parseInt=AI,y.random=gI,y.reduce=BA,y.reduceRight=VA,y.repeat=bI,y.replace=II,y.result=oI,y.round=Tk,y.runInContext=b,y.sample=HA,y.size=zA,y.snakeCase=kI,y.some=WA,y.sortedIndex=$S,y.sortedIndexBy=KS,y.sortedIndexOf=zS,y.sortedLastIndex=WS,y.sortedLastIndexBy=qS,y.sortedLastIndexOf=GS,y.startCase=NI,y.startsWith=OI,y.subtract=Ek,y.sum=Sk,y.sumBy=Ak,y.template=PI,y.times=ck,y.toFinite=hr,y.toInteger=de,y.toLength=im,y.toLower=MI,y.toNumber=gn,y.toSafeInteger=Mb,y.toString=be,y.toUpper=xI,y.trim=DI,y.trimEnd=LI,y.trimStart=UI,y.truncate=BI,y.unescape=VI,y.uniqueId=uk,y.upperCase=FI,y.upperFirst=hu,y.each=Wg,y.eachRight=qg,y.first=Hg,mu(y,function(){var o={};return Kn(y,function(a,u){Ie.call(y.prototype,u)||(o[u]=a)}),o}(),{chain:!1}),y.VERSION=n,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){y[o].placeholder=y}),cn(["drop","take"],function(o,a){pe.prototype[o]=function(u){u=u===t?1:rt(de(u),0);var h=this.__filtered__&&!a?new pe(this):this.clone();return h.__filtered__?h.__takeCount__=_t(u,h.__takeCount__):h.__views__.push({size:_t(u,$t),type:o+(h.__dir__<0?"Right":"")}),h},pe.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),cn(["filter","map","takeWhile"],function(o,a){var u=a+1,h=u==Ct||u==an;pe.prototype[o]=function(p){var C=this.clone();return C.__iteratees__.push({iteratee:X(p,3),type:u}),C.__filtered__=C.__filtered__||h,C}}),cn(["head","last"],function(o,a){var u="take"+(a?"Right":"");pe.prototype[o]=function(){return this[u](1).value()[0]}}),cn(["initial","tail"],function(o,a){var u="drop"+(a?"":"Right");pe.prototype[o]=function(){return this.__filtered__?new pe(this):this[u](1)}}),pe.prototype.compact=function(){return this.filter(Bt)},pe.prototype.find=function(o){return this.filter(o).head()},pe.prototype.findLast=function(o){return this.reverse().find(o)},pe.prototype.invokeMap=fe(function(o,a){return typeof o=="function"?new pe(this):this.map(function(u){return Hi(u,o,a)})}),pe.prototype.reject=function(o){return this.filter(vs(X(o)))},pe.prototype.slice=function(o,a){o=de(o);var u=this;return u.__filtered__&&(o>0||a<0)?new pe(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),a!==t&&(a=de(a),u=a<0?u.dropRight(-a):u.take(a-o)),u)},pe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},pe.prototype.toArray=function(){return this.take($t)},Kn(pe.prototype,function(o,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),p=y[h?"take"+(a=="last"?"Right":""):a],C=h||/^find/.test(a);p&&(y.prototype[a]=function(){var T=this.__wrapped__,S=h?[1]:arguments,I=T instanceof pe,x=S[0],D=I||ce(T),L=function(me){var ve=p.apply(y,br([me],S));return h&&K?ve[0]:ve};D&&u&&typeof x=="function"&&x.length!=1&&(I=D=!1);var K=this.__chain__,Y=!!this.__actions__.length,Z=C&&!K,he=I&&!Y;if(!C&&D){T=he?T:new pe(this);var ee=o.apply(T,S);return ee.__actions__.push({func:fs,args:[L],thisArg:t}),new un(ee,K)}return Z&&he?o.apply(this,S):(ee=this.thru(L),Z?h?ee.value()[0]:ee.value():ee)})}),cn(["pop","push","shift","sort","splice","unshift"],function(o){var a=Va[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",h=/^(?:pop|shift)$/.test(o);y.prototype[o]=function(){var p=arguments;if(h&&!this.__chain__){var C=this.value();return a.apply(ce(C)?C:[],p)}return this[u](function(T){return a.apply(ce(T)?T:[],p)})}}),Kn(pe.prototype,function(o,a){var u=y[a];if(u){var h=u.name+"";Ie.call(Oo,h)||(Oo[h]=[]),Oo[h].push({name:a,func:u})}}),Oo[as(t,$).name]=[{name:"wrapper",func:t}],pe.prototype.clone=VT,pe.prototype.reverse=FT,pe.prototype.value=HT,y.prototype.at=pA,y.prototype.chain=vA,y.prototype.commit=yA,y.prototype.next=CA,y.prototype.plant=_A,y.prototype.reverse=TA,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=EA,y.prototype.first=y.prototype.head,xi&&(y.prototype[xi]=wA),y},ko=yT();jr?((jr.exports=ko)._=ko,gl._=ko):ht._=ko}).call(qU)}(ea,ea.exports)),ea.exports}var Ti=GU();const Xs=WU(Ti),jU={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-oWS_RAsC.js")),meta:{requiresAuth:!1}},YU={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-BwJZ4NoO.js")),meta:{requiresAuth:!1}},{isAuthenticated:Yp,handleRedirect:JU}=xh(),QU=Jc();function XU(r,e){r.addRoute(jU),r.addRoute(YU),r.beforeEach(async(t,n,i)=>{function s(d){return d.matched.some(f=>f.meta.requiresAuth)}if(!s(t))return i();if(!Yp.value){ie.value=!0;try{await JU(e,t.fullPath),await QU.__init__()}catch(d){console.error("Fail to authenticate",d),await r.push("/jplan-auth-fail")}ie.value=!1}if(Yp.value){if(localStorage.getItem("returnRoute")&&localStorage.getItem("returnRoute")!==null){const d=localStorage.getItem("returnRoute")??"/";console.log("trying to go to saved route:",d),i(d),localStorage.removeItem("returnRoute");return}i()}})}const{scope:Jp}=Jc();function ZU(){const r=Vh(),e=c.ref({scope_type:"org"});async function t(n){e.value=n}return c.watch(Jp,()=>{r.interceptors.request.use(n=>{const i=n.headers,s=i.Authorization;s&&(i.Authorization=s);const l=Jp.value;return l&&(l.scope_type&&(i["j-scope-type"]=l.scope_type,l.organization&&(i["j-scope-organization"]=l.organization),l.team&&(i["j-scope-team"]=l.team)),l.environment&&(i["j-scope-environment"]=l.environment)),n})},{immediate:!0}),Object.assign(r,{setScope:t,scope:e})}function Ei(r){const e=ZU();e.defaults.baseURL=r;const t=c.ref({scope_type:"org"});async function n(i){t.value=i}return c.watch(t,()=>{e.interceptors.request.use(i=>{const s=t.value;return delete i.headers["j-scope-type"],delete i.headers["j-scope-organization"],delete i.headers["j-scope-team"],s!=null&&s.scope_type&&(i.headers["j-scope-type"]=s.scope_type),s!=null&&s.organization&&(i.headers["j-scope-organization"]=s.organization),s!=null&&s.team&&(i.headers["j-scope-team"]=s.team),i})},{immediate:!0}),Object.assign(e,{setScope:n,scope:t})}function eB(){const r=Ei("https://api.jplan.com.br/management/organization"),{error:e}=Fn();return{async getOrgList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Organization list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getOrgList:",n),e("Failed to fetch Organization list");return}},async createOrg(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Organization"),s}},async updateOrg(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Organization"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Organization"),s}},async getOrg(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Organization"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Organization"),s}},async activateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in activateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Organization"),s}},async deactivateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Organization"),s}}}}const Vr=eB();function tB(){const r=Ei("https://api.jplan.com.br/management/branch/"),{error:e}=Fn();return{async getBranchList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error){e("Failed to fetch Branch list");return}return i.data.data}catch(n){console.error("Error in getBranchList:",n),e("Failed to fetch Branch list")}},async createBranch(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){console.error("Error in createBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Branch")}},async updateBranch(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error){e(s.data.error||"Failed to update Branch");return}return s}catch(s){console.error("Error in updateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Branch")}},async getBranch(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error){e(s.data.error||"Failed to fetch Branch");return}return s.data}catch(s){console.error("Error in getBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Branch")}},async activateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error){e(s.data.error||"Failed to activate Branch");return}}catch(s){console.error("Error in activateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Branch")}},async deactivateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error){e(s.data.error||"Failed to deactivate Branch");return}}catch(s){console.error("Error in deactivateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Branch")}}}}const Fr=tB();function nB(){const r=Ei("https://api.jplan.com.br/management/team"),{error:e}=Fn();return{async getTeamList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Team list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getTeamList:",n),e("Failed to fetch Team list");return}},async createTeam(t){var n,i;try{const s=await r.post("/item",t);if(s.data.error)throw e("Failed to create Team"),new Error(s.data.error);return s}catch(s){throw console.error("Error in createTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Team"),s}},async updateTeam(t){var n,i;try{const s=await r.patch("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in updateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Team"),s}},async getTeam(t){var n,i;try{const s=await r.get(`/item/${t}`);return s.data.error&&e("Failed to fetch Team"),s.data}catch(s){console.error("Error in getTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Team");return}},async activateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in activateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Team"),s}},async deactivateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Team"),s}},async getTeamUserList(t,n){try{const i=n?`?filter_query=${n}`:"",s=await r.get(`/item/${t}/user/list/${i}`);if(s.data.error)throw e("Failed to fetch Team User list"),new Error(s.data.error);return s.data.data}catch(i){console.error("Error in getTeamUserList:",i),e("Failed to fetch Team User list");return}},async linkManageUser(t,n){try{const i=await r.post(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to link User"),new Error(i.data.error);return i.data}catch(i){console.error("Error in link User:",i),e("Failed to link User");return}},async updateManageUser(t,n){try{const i=await r.patch(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to update User"),new Error(i.data.error);return i.data.data}catch(i){throw console.error("Error in update User:",i),e("Failed to update User"),i}},async getManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"",l=await r.get(`/item/${t}/user/item/${n}/${s}`);if(l.data.error)throw e("Failed to fetch User"),new Error(l.data.error);return l.data.data}catch(s){console.error("Error in getUser:",s),e("Failed to fetch User");return}},async unlinkManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"";await r.delete(`/item/${t}/user/item/${n}/${s}`)}catch(s){throw console.error("Error in unlink User:",s),e("Failed to unlink User"),s}}}}const Zt=nB();async function rB({url:r,method:e,header:t={},body:n,bearerToken:i}){const s=i?{Authorization:`Bearer ${i}`}:{};try{return(await Ke({url:r,method:e,headers:{...t,...s},data:n??{}})).data}catch(l){throw console.error(`Request failed for ${e} ${r}:`,l),l}}function Si(r,e,t=[]){const n=iB(e);if(!n)return r;const i=n.split(" ");return r.filter(s=>oB(s,i,t))}function oB(r,e,t){return t.some(n=>{const i=Xs.get(r,n);if(Xs.isNil(i))return!1;const s=Xs.toString(i).toLowerCase();return e.every(l=>s.includes(l))})}function iB(r){return Xs.trim(r).toLowerCase().replace(/\s+/g," ")}let Ds=!1;const Gu=c.ref(!1),mn=c.ref([]),Qp=c.ref([]),We=c.ref(null),qo=c.ref([]),Go=c.ref([]),Mw=()=>{const r=Fn(),e=async _=>{Gu.value=!0;const A=_?`_active eq true and ${_}`:"_active eq true",R=await Vr.getOrgList(A);R&&(mn.value=R,Ds=!0),Gu.value=!1},t=async _=>{var A;return(A=mn.value)!=null&&A.length||await e(_),mn.value};function n(_){if(!mn.value)throw new Error("Data not stored yet");const A=Si(mn.value,_,["name","description"]);return _!==""?A:mn.value}const i=_=>{Qp.value=_},s=_=>{We.value=Ti.cloneDeep(_)},l=async _=>await Vr.getOrg(_),d=async()=>{if(We.value!=null){const _=await Vr.createOrg(We.value);return _!=null&&_.data.created_at&&(r.success("Organization created."),Ds&&mn.value.push(_.data)),_==null?void 0:_.data}},f=async()=>{if(ie.value=!0,We.value&&We.value.__id){const _=await Vr.updateOrg(We.value);if(Ds&&(_!=null&&_.data.__id)){const A=mn.value.findIndex(R=>R.__id===_.data.__id);return A!==-1?(mn.value[A]=_.data,r.success("Organization updated.")):r.error("Unable to update item"),ie.value=!1,_.data}}else ie.value=!1,r.error("Unable to update item")},g=async()=>{if(ie.value=!0,We.value&&We.value.created_at){if(await Vr.deactivateOrg(We.value.__id),Ds){const _=mn.value.findIndex(A=>{var R;return A.__id===((R=We.value)==null?void 0:R.__id)});if(_!==-1)return mn.value.splice(_,1),We.value;r.error("Unable to deactivate organization")}ie.value=!1}};async function m(_){ie.value=!0;try{if(We.value&&We.value.__id){const A={..._,organization:We.value.__id};if(!await Fr.updateBranch(A)){ie.value=!1;return}if(qo.value.findIndex(V=>V.__id===_.__id)===-1)return r.success("Branch added successfully."),qo.value.push(A),A;r.info("Branch already added.")}}catch(A){console.error(A)}finally{ie.value=!1}}async function w(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await Fr.updateBranch(A)){ie.value=!1;return}const $=qo.value.findIndex(V=>V.__id===_.__id);if($!==-1)return qo.value.splice($,1),ie.value=!1,qo.value;throw new Error("Item not found to remove")}ie.value=!1}async function v(_){ie.value=!0;try{if(We.value&&We.value.__id){const A={..._,organization:We.value.__id};if(!await Zt.updateTeam(A)){ie.value=!1;return}if(Go.value.findIndex(V=>V.__id===_.__id)===-1)return r.success("Team added successfully."),Go.value.push(A),A;r.info("Team already added.")}}catch(A){console.error(A)}finally{ie.value=!1}}async function E(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await Zt.updateTeam(A)){ie.value=!1;return}const $=Go.value.findIndex(V=>V.__id===_.__id);if($!==-1)return Go.value.splice($,1),ie.value=!1,Go.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:mn,loading:Gu,columns:Qp,item:We,filterData:n,__init__:e,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgBranches:qo,orgTeams:Go,linkBranch:m,unlinkBranch:w,linkTeam:v,unlinkTeam:E}};let Ls=!1;const pn=c.ref([]),Xp=c.ref([]),ot=c.ref(null),ju=c.ref(!1),jo=c.ref([]),xw=()=>{const r=Fn(),e=async v=>{ju.value=!0;const E=v?`_active eq true and ${v}`:"_active eq true",_=await Zt.getTeamList(E);_&&(pn.value=_,Ls=!0),ju.value=!1},t=async v=>(pn.value.length||await e(v),pn.value);function n(v){if(!pn.value)throw new Error("Data not stored yet");const E=Si(pn.value,v,["name","description"]);return v!==""?E:pn.value}const i=v=>{Xp.value=v},s=v=>{ot.value=Ti.cloneDeep(v)},l=async v=>await Zt.getTeam(v),d=async()=>{if(ot.value!=null){const v=await Zt.createTeam(ot.value);return v!=null&&v.data.created_at&&(r.success("Team created."),Ls&&pn.value.push(v.data)),v==null?void 0:v.data}},f=async()=>{if(ie.value=!0,ot.value&&ot.value.__id){const v=await Zt.updateTeam(ot.value);if(Ls&&(v!=null&&v.data.__id)){const E=pn.value.findIndex(_=>_.__id===v.data.__id);return E!==-1?(pn.value[E]=v.data,r.success("Team updated.")):r.error("Unable to update item"),v.data}}else r.error("Unable to update item")},g=async()=>{if(ot.value&&ot.value.created_at&&(await Zt.deactivateTeam(ot.value.__id),Ls)){const v=pn.value.findIndex(E=>{var _;return E.__id===((_=ot.value)==null?void 0:_.__id)});if(v!==-1)return pn.value.splice(v,1),ot.value;r.error("Unable to deactivate organization")}};async function m(v){var E;if(ie.value=!0,(E=ot.value)!=null&&E.__id)if(jo.value.findIndex(A=>A.__id===v.__id)===-1)try{const A=await Zt.linkManageUser(ot.value.__id,{team:ot.value.__id,user:v.__id,role:"string",joined_at:"string",comments:"string"}),R=await Zt.getTeamUserList(ot.value.__id);return R&&(jo.value=R),r.success("User added successfully."),A}catch(A){console.error(A),r.error("Unable to add User.")}finally{ie.value=!1}else r.info("User already added.");else console.warn("No item selected or item ID is missing."),r.info("Please select a valid item.");ie.value=!1}async function w(v){if(ie.value=!0,ot.value&&ot.value.__id){const E=jo.value.findIndex(_=>_.__id===v);if(E!==-1)return await Zt.unlinkManageUser(ot.value.__id,v),jo.value.splice(E,1),ie.value=!1,jo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:pn,loading:ju,columns:Xp,item:ot,usersTeam:jo,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,linkUser:m,unlinkUser:w}},Dw=c.defineComponent({__name:"GlobalScopeFilter",setup(r){var A,R,$;const{openDialog:e}=ya("global-scope__J-"),{user:t,scope:n,session:i,setScope:s}=Jc(),{getData:l,data:d}=Mw(),{getData:f,data:g}=xw(),m=c.ref(!1);c.onBeforeMount(async()=>{m.value=!0,await l(),await f(),m.value=!1});const w=c.ref({scope_type:(A=n.value)==null?void 0:A.scope_type,organization:((R=n.value)==null?void 0:R.organization)??"org",team:($=n.value)==null?void 0:$.team});function v(){var V,U,Q;w.value={...n.value,scope_type:(V=n.value)==null?void 0:V.scope_type,organization:((U=n.value)==null?void 0:U.organization)??"",team:(Q=n.value)==null?void 0:Q.team},e()}const E=c.computed(()=>{var V;switch((V=n.value)==null?void 0:V.scope_type){case"user":return F1;case"org":return B1;case"team":return H1;default:return V1}});async function _(){var V;((V=n.value)==null?void 0:V.scope_type)!==""&&s(w.value)}return(V,U)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Ue.VBtn,{onClick:v,icon:"",class:"text-secondary",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(E.value),{size:"20"}))]),_:1}),c.createVNode(c.unref(wa),{loading:m.value,title:"Scope","dd-id":"global-scope__J-","on-save":_},{default:c.withCtx(()=>[c.createElementVNode("div",null,[c.createVNode(Ae.VRow,null,{default:c.withCtx(()=>[c.createVNode(Ae.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:c.withCtx(()=>[c.createVNode(St.VListItem,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>U[3]||(U[3]=[c.createTextVNode(" User")])),_:1}),c.createVNode(St.VListItemSubtitle,null,{default:c.withCtx(()=>{var Q;return[c.createTextVNode(c.toDisplayString(((Q=c.unref(t))==null?void 0:Q.name)||"Unknown"),1)]}),_:1})]),_:1})]),_:1}),c.createVNode(Ae.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(St.VListItem,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>U[4]||(U[4]=[c.createTextVNode(" Domain")])),_:1}),c.createVNode(St.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).domain),1)]),_:1})]),_:1})]),_:1}),c.createVNode(Ae.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(St.VListItem,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>U[5]||(U[5]=[c.createTextVNode(" Environment")])),_:1}),c.createVNode(St.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),c.createVNode(Nk.VBtnToggle,{density:"compact",variant:"outlined",modelValue:w.value.scope_type,"onUpdate:modelValue":U[0]||(U[0]=Q=>w.value.scope_type=Q),class:"d-flex justify-center my-4"},{default:c.withCtx(()=>[c.createVNode(Ue.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:c.withCtx(()=>U[6]||(U[6]=[c.createTextVNode("Organizational")])),_:1}),c.createVNode(Ue.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:c.withCtx(()=>U[7]||(U[7]=[c.createTextVNode("Team")])),_:1}),c.createVNode(Ue.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:c.withCtx(()=>U[8]||(U[8]=[c.createTextVNode("User")])),_:1}),c.createVNode(Ue.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:c.withCtx(()=>U[9]||(U[9]=[c.createTextVNode("None")])),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",null,[c.createVNode(ua.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>U[10]||(U[10]=[c.createTextVNode("Organization")])),_:1}),c.createVNode(ta.VSelect,{items:c.unref(d),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Organization",class:"min-w-50",modelValue:w.value.organization,"onUpdate:modelValue":U[1]||(U[1]=Q=>w.value.organization=Q)},null,8,["items","modelValue"]),c.createVNode(ua.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>U[11]||(U[11]=[c.createTextVNode("Team")])),_:1}),c.createVNode(ta.VSelect,{items:c.unref(g),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Team",class:"min-w-50",modelValue:w.value.team,"onUpdate:modelValue":U[2]||(U[2]=Q=>w.value.team=Q)},null,8,["items","modelValue"])])])]),_:1},8,["loading"])],64))}}),aB={},sB={class:"double-ring-spinner-container"};function cB(r,e){return c.openBlock(),c.createElementBlock("div",sB,e[0]||(e[0]=[c.createElementVNode("div",{class:"spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])],-1)]))}const Lw=vi(aB,[["render",cB],["__scopeId","data-v-00d7a69f"]]),lB={key:0,class:"_jspinner-overlay_jj"},Uw=c.defineComponent({__name:"GlobalSpinner",setup(r){return(e,t)=>c.unref(ie)?(c.openBlock(),c.createElementBlock("div",lB,t[0]||(t[0]=[c.createElementVNode("div",{class:"j-double-ring-spinner-container"},[c.createElementVNode("div",{class:"j-global-spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])])],-1)]))):c.createCommentVNode("",!0)}}),Bw=c.defineComponent({__name:"SubMenu",props:{title:{}},setup(r,{expose:e}){return e({props:r}),(n,i)=>(c.openBlock(),c.createBlock(St.VListItem,{onClick:i[0]||(i[0]=()=>{}),density:"compact"},{append:c.withCtx(()=>[c.createVNode(c.unref($1))]),default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.title),1)]),_:1}),c.createVNode(Ud.VMenu,{activator:"parent","open-on-hover":"",submenu:"",density:"compact"},{default:c.withCtx(()=>[c.renderSlot(n.$slots,"default")]),_:3})]),_:3}))}}),uB=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:Hv,ColumnSettingsDialog:qd,ConfirmDialog:Vv,ContextMenu:$v,CopyButton:wc,DeleteAllBtn:Hd,DotsMenu:Bv,EditButton:Uv,FormHeadless:Cy,FormMetadata:Nc,GlobalScopeFilter:Dw,GlobalSpinner:Uw,JAvatar:Fv,JBtn:iv,JDialog:wa,JForm:vy,JIconBtn:ov,JSelect:fy,JTextArea:gy,JTextField:hy,ParentCard:Ac,SearchFilter:kc,SpinnerLoader:Lw,SubMenu:Bw,TabFormHeader:yy,TableAdvanced:Yv,TableCard:Gd,TableCardsView:uy,TableHeader:Jv,UiTable:Kv},Symbol.toStringTag,{value:"Module"})),dB=iR(),hB={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0};let Yu=!1;const Ju=c.ref(!1),vn=c.ref([]),Zp=c.ref([]),gt=c.ref(null),Yo=c.ref([]),fB=()=>{const r=Fn(),e=async v=>{Ju.value=!0;const E=v?`_active eq true and ${v}`:"_active eq true",_=await Fr.getBranchList(E);_&&(vn.value=_,Yu=!0),Ju.value=!1},t=async v=>(vn.value.length||await e(v),vn.value);function n(v){if(!vn.value)throw new Error("Data not stored yet");const E=Si(vn.value,v,["name","description"]);return v!==""?E:vn.value}const i=v=>{Zp.value=v},s=v=>{gt.value=Ti.cloneDeep(v)},l=async v=>await Fr.getBranch(v),d=async()=>{if(gt.value!=null){const v=await Fr.createBranch(gt.value);return v!=null&&v.data.created_at&&(r.success("Branch created."),Yu&&vn.value.push(v.data)),v==null?void 0:v.data}},f=async()=>{if(gt.value&>.value.__id){const v=await Fr.updateBranch(gt.value);if(Yu&&v){const E=vn.value.findIndex(_=>_.__id===v.data.__id);return E!==-1?(vn.value[E]=v.data,r.success("Branch updated.")):r.error("Unable to update item"),v}}else r.error("Unable to update item")},g=async()=>{if(gt.value&>.value.created_at){await Fr.deactivateBranch(gt.value.__id);const v=vn.value.findIndex(E=>{var _;return E.__id===((_=gt.value)==null?void 0:_.__id)});if(v!==-1)return vn.value.splice(v,1),gt.value;r.error("Unable to deactivate Domain")}};async function m(v){ie.value=!0;try{if(gt.value&>.value.__id){const E={...v,branch:gt.value.__id};if(!await Zt.updateTeam(E)){r.error("Unable to link team");return}if(Yo.value.findIndex(R=>R.__id===v.__id)===-1)return r.success("Team added successfully."),Yo.value.push(E),E;r.info("Team already added.")}else throw new Error("Item is not defined")}catch(E){console.error(E)}finally{ie.value=!1}}async function w(v){if(ie.value=!0,gt.value&>.value.__id){const E={...v,branch:null};if(!await Zt.updateTeam(E))return;const A=Yo.value.findIndex(R=>R.__id===v.__id);if(A!==-1)return Yo.value.splice(A,1),ie.value=!1,Yo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:vn,columns:Zp,item:gt,loading:Ju,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,branchTeams:Yo,linkTeam:m,unlinkTeam:w}};function gB(){const r=Ei("https://api.jplan.com.br/management/division"),{error:e}=Fn();return{async getDivisionList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Division list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getDivisionList:",n),e("Failed to fetch Division list");return}},async createDivision(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Division"),s}},async updateDivision(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Division"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Division"),s}},async getDivision(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Division"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Division"),s}},async activateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in activateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Division"),s}},async deactivateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Division"),s}}}}const ti=gB();let Qu=!1;const Xu=c.ref(!1),yn=c.ref([]),ev=c.ref([]),mt=c.ref(null),Jo=c.ref([]),mB=()=>{const r=Fn(),e=async v=>{Xu.value=!0;const E=v?`_active eq true and ${v}`:"_active eq true",_=await ti.getDivisionList(E);_&&(yn.value=_,Qu=!0),Xu.value=!1},t=async v=>(yn.value.length||await e(v),yn.value);function n(v){if(!yn.value)throw new Error("Data not stored yet");const E=Si(yn.value,v,["name","description"]);return v!==""?E:yn.value}const i=v=>{ev.value=v},s=v=>{mt.value=Ti.cloneDeep(v)},l=async v=>await ti.getDivision(v),d=async()=>{if(mt.value!=null){const v=await ti.createDivision(mt.value);return v!=null&&v.data.created_at&&(r.success("Division created."),Qu&&yn.value.push(v.data)),v==null?void 0:v.data}},f=async()=>{if(ie.value=!0,mt.value&&mt.value.__id){const v=await ti.updateDivision(mt.value);if(Qu&&(v!=null&&v.data.__id)){const E=yn.value.findIndex(_=>_.__id===v.data.__id);return E!==-1?(yn.value[E]=v.data,r.success("Updated Division.")):r.error("Unable to update item"),ie.value=!1,v}}else ie.value=!1,r.error("Unable to update item")},g=async()=>{if(ie.value=!0,mt.value&&mt.value.created_at){await ti.deactivateDivision(mt.value.__id);const v=yn.value.findIndex(E=>{var _;return E.__id===((_=mt.value)==null?void 0:_.__id)});if(v!==-1)return yn.value.splice(v,1),mt.value;r.error("Unable to deactivate Division")}ie.value=!1};async function m(v){ie.value=!0;try{if(mt.value&&mt.value.__id){const E={...v,division:mt.value.__id};return await Vr.updateOrg(E)?(Jo.value.findIndex(R=>R.__id===v.__id)===-1?(r.success("Organization added successfully."),Jo.value.push(E)):r.info("Organization already added."),E):void 0}else throw new Error("Item is not defined")}catch(E){console.error(E)}finally{ie.value=!1}}async function w(v){if(ie.value=!0,mt.value&&mt.value.__id){const E={...v,division:null};if(!await Vr.updateOrg(E))return;const A=Jo.value.findIndex(R=>R.__id===v.__id);if(A!==-1)Jo.value.splice(A,1);else throw new Error("Item não encontrado para remoção")}else throw new Error("Item não está definido");return ie.value=!1,Jo.value}return{data:yn,columns:ev,item:mt,loading:Xu,__init__:e,filterData:n,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgs:Jo,linkDivision:m,unlinkDivision:w}};function pB(){const r=Ei("https://api.jplan.com.br/management/user"),{error:e}=Fn();return{async getManageUserList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch User list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getManageUserList:",n),e("Failed to fetch User list");return}},async createManageUser(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create User"),s}},async updateManageUser(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update User"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update User"),s}},async getManageUser(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch User"),new Error(s.data.error);return s.data}catch(s){console.error("Error in getManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch User");return}},async activateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate User"),new Error(s.data.error)}catch(s){throw console.error("Error in activateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate User"),s}},async deactivateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate User"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate User"),s}}}}const ni=pB();let Zu=!1,ed=c.ref(!1);const Cn=c.ref([]),tv=c.ref([]),wn=c.ref(null),vB=c.ref(null),yB=c.ref([]),CB=()=>{const r=Fn(),e=async m=>{ed.value=!0;const w=m?`_active eq true and ${m}`:"_active eq true",v=await ni.getManageUserList(w);v&&(Cn.value=v,Zu=!0),ed.value=!1},t=async m=>(Cn.value.length||await e(m),Cn.value);function n(m){if(!Cn.value)throw new Error("Data not stored yet");const w=Si(Cn.value,m,["name","description"]);return m!==""?w:Cn.value}return{data:Cn,loading:ed,columns:tv,item:wn,filterData:n,__init__:e,getData:t,setColumns:m=>{tv.value=m},setItem:m=>{wn.value=Ti.cloneDeep(m)},getItem:async m=>await ni.getManageUser(m),createItem:async()=>{if(wn.value!=null){const m=crypto.randomUUID(),w=await ni.createManageUser({...wn.value,__id:m});return w!=null&&w.data.created_at&&(r.success("User created."),Zu&&Cn.value.push(w.data)),w==null?void 0:w.data}},updateItem:async()=>{if(ie.value=!0,wn.value&&wn.value.created_at){const m=await ni.updateManageUser(wn.value);if(Zu&&(m!=null&&m.data)){const w=Cn.value.findIndex(v=>v.__id===(m==null?void 0:m.data.__id));if(w!==-1)Cn.value[w]=m==null?void 0:m.data,r.success("User created.");else throw new Error("Unable to find item after update")}return ie.value=!1,m==null?void 0:m.data}},removeItem:async()=>{if(wn.value&&wn.value.created_at){try{await ni.deactivateManageUser(wn.value.__id)}catch{r.error("Unable to deactivate user");return}const m=Cn.value.findIndex(w=>{var v;return w.__id===((v=wn.value)==null?void 0:v.__id)});if(m!==-1)return Cn.value.splice(m,1),wn.value}},userOrg:vB,userTeams:yB}},wB=r=>{r.use(dB),r.use(s0,hB),Object.entries(uB).forEach(([e,t])=>{r.component(e,t)}),Object.entries(Pk).forEach(([e,t])=>{r.provide(e,t)})},_B={install:wB};exports.ContextMenu=$v;exports.EmptyListImg=od;exports.EventBus=Ec;exports.FormHeadless=Cy;exports.HttpCore=rB;exports.SpinnerLoader=Lw;exports.TableCardsView=uy;exports.TableHeader=Jv;exports.__spinner=ie;exports._export_sfc=vi;exports._sfc_main=Kv;exports._sfc_main$1=Yv;exports._sfc_main$10=Hd;exports._sfc_main$11=Uv;exports._sfc_main$12=ov;exports._sfc_main$13=fy;exports._sfc_main$14=gy;exports._sfc_main$15=hy;exports._sfc_main$16=vy;exports._sfc_main$17=yy;exports._sfc_main$18=Ac;exports._sfc_main$19=Fv;exports._sfc_main$2=qd;exports._sfc_main$20=Hv;exports._sfc_main$21=wa;exports._sfc_main$22=Bw;exports._sfc_main$23=Dw;exports._sfc_main$24=Uw;exports._sfc_main$3=Gd;exports._sfc_main$4=kc;exports._sfc_main$5=Vv;exports._sfc_main$6=wc;exports._sfc_main$7=Bv;exports._sfc_main$8=Nc;exports._sfc_main$9=iv;exports.branchInstance=Fr;exports.coreClient=Vh;exports.createToastInterface=fa;exports.dateFormat=jv;exports.divisionInstance=ti;exports.filterQuery=Si;exports.globalEventBus=Fd;exports.index=_B;exports.manageUserInstance=ni;exports.msal=yt;exports.orgInstance=Vr;exports.provideToast=a0;exports.scopedClient=Ei;exports.setupAuthGuard=XU;exports.teamInstance=Zt;exports.toastInjectionKey=Sc;exports.useAuth=xh;exports.useBranchStore=fB;exports.useCustomizer=uR;exports.useDialog=ya;exports.useDivisionStore=mB;exports.useManageUserStore=CB;exports.useOrganizationStore=Mw;exports.useSession=Jc;exports.useTeamStore=xw;exports.useToast=Fn;
|
92
|
+
}`;var he=mm(function(){return Ee(C,Y+"return "+L).apply(t,T)});if(he.source=L,cu(he))throw he;return he}function MI(o){return be(o).toLowerCase()}function xI(o){return be(o).toUpperCase()}function DI(o,a,u){if(o=be(o),o&&(u||a===t))return Sf(o);if(!o||!(a=Wt(a)))return o;var h=kn(o),p=kn(a),C=Af(h,p),T=bf(h,p)+1;return Pr(h,C,T).join("")}function LI(o,a,u){if(o=be(o),o&&(u||a===t))return o.slice(0,kf(o)+1);if(!o||!(a=Wt(a)))return o;var h=kn(o),p=bf(h,kn(a))+1;return Pr(h,0,p).join("")}function UI(o,a,u){if(o=be(o),o&&(u||a===t))return o.replace(cl,"");if(!o||!(a=Wt(a)))return o;var h=kn(o),p=Af(h,kn(a));return Pr(h,p).join("")}function BI(o,a){var u=j,h=q;if($e(a)){var p="separator"in a?a.separator:p;u="length"in a?de(a.length):u,h="omission"in a?Wt(a.omission):h}o=be(o);var C=o.length;if(bo(o)){var T=kn(o);C=T.length}if(u>=C)return o;var S=u-Io(h);if(S<1)return h;var I=T?Pr(T,0,S).join(""):o.slice(0,S);if(p===t)return I+h;if(T&&(S+=I.length-S),lu(p)){if(o.slice(S).search(p)){var x,D=I;for(p.global||(p=Al(p.source,be(Wh.exec(p))+"g")),p.lastIndex=0;x=p.exec(D);)var L=x.index;I=I.slice(0,L===t?S:L)}}else if(o.indexOf(Wt(p),S)!=S){var K=I.lastIndexOf(p);K>-1&&(I=I.slice(0,K))}return I+h}function VI(o){return o=be(o),o&&Jw.test(o)?o.replace($h,gT):o}var FI=xo(function(o,a,u){return o+(u?" ":"")+a.toUpperCase()}),hu=pg("toUpperCase");function gm(o,a,u){return o=be(o),a=u?t:a,a===t?lT(o)?vT(o):eT(o):o.match(a)||[]}var mm=fe(function(o,a){try{return Kt(o,t,a)}catch(u){return cu(u)?u:new ae(u)}}),HI=lr(function(o,a){return cn(a,function(u){u=Wn(u),sr(o,u,au(o[u],o))}),o});function $I(o){var a=o==null?0:o.length,u=X();return o=a?Ve(o,function(h){if(typeof h[1]!="function")throw new ln(l);return[u(h[0]),h[1]]}):[],fe(function(h){for(var p=-1;++p<a;){var C=o[p];if(Kt(C[0],this,h))return Kt(C[1],this,h)}})}function KI(o){return gE(dn(o,w))}function fu(o){return function(){return o}}function zI(o,a){return o==null||o!==o?a:o}var WI=yg(),qI=yg(!0);function Bt(o){return o}function gu(o){return jf(typeof o=="function"?o:dn(o,w))}function GI(o){return Jf(dn(o,w))}function jI(o,a){return Qf(o,dn(a,w))}var YI=fe(function(o,a){return function(u){return Hi(u,o,a)}}),JI=fe(function(o,a){return function(u){return Hi(o,u,a)}});function mu(o,a,u){var h=st(a),p=ts(a,h);u==null&&!($e(a)&&(p.length||!h.length))&&(u=a,a=o,o=this,p=ts(a,st(a)));var C=!($e(u)&&"chain"in u)||!!u.chain,T=dr(o);return cn(p,function(S){var I=a[S];o[S]=I,T&&(o.prototype[S]=function(){var x=this.__chain__;if(C||x){var D=o(this.__wrapped__),L=D.__actions__=Dt(this.__actions__);return L.push({func:I,args:arguments,thisArg:o}),D.__chain__=x,D}return I.apply(o,br([this.value()],arguments))})}),o}function QI(){return ht._===this&&(ht._=ET),this}function pu(){}function XI(o){return o=de(o),fe(function(a){return Xf(a,o)})}var ZI=Gl(Ve),ek=Gl(Cf),tk=Gl(yl);function pm(o){return eu(o)?Cl(Wn(o)):OE(o)}function nk(o){return function(a){return o==null?t:Zr(o,a)}}var rk=wg(),ok=wg(!0);function vu(){return[]}function yu(){return!1}function ik(){return{}}function ak(){return""}function sk(){return!0}function ck(o,a){if(o=de(o),o<1||o>Qe)return[];var u=$t,h=_t(o,$t);a=X(a),o-=$t;for(var p=Tl(h,a);++u<o;)a(u);return p}function lk(o){return ce(o)?Ve(o,Wn):qt(o)?[o]:Dt(Lg(be(o)))}function uk(o){var a=++_T;return be(o)+a}var dk=ss(function(o,a){return o+a},0),hk=jl("ceil"),fk=ss(function(o,a){return o/a},1),gk=jl("floor");function mk(o){return o&&o.length?es(o,Bt,Ml):t}function pk(o,a){return o&&o.length?es(o,X(a,2),Ml):t}function vk(o){return Tf(o,Bt)}function yk(o,a){return Tf(o,X(a,2))}function Ck(o){return o&&o.length?es(o,Bt,Ul):t}function wk(o,a){return o&&o.length?es(o,X(a,2),Ul):t}var _k=ss(function(o,a){return o*a},1),Tk=jl("round"),Ek=ss(function(o,a){return o-a},0);function Sk(o){return o&&o.length?_l(o,Bt):0}function Ak(o,a){return o&&o.length?_l(o,X(a,2)):0}return y.after=GA,y.ary=Gg,y.assign=xb,y.assignIn=sm,y.assignInWith=ws,y.assignWith=Db,y.at=Lb,y.before=jg,y.bind=au,y.bindAll=HI,y.bindKey=Yg,y.castArray=ib,y.chain=zg,y.chunk=gS,y.compact=mS,y.concat=pS,y.cond=$I,y.conforms=KI,y.constant=fu,y.countBy=SA,y.create=Ub,y.curry=Jg,y.curryRight=Qg,y.debounce=Xg,y.defaults=Bb,y.defaultsDeep=Vb,y.defer=jA,y.delay=YA,y.difference=vS,y.differenceBy=yS,y.differenceWith=CS,y.drop=wS,y.dropRight=_S,y.dropRightWhile=TS,y.dropWhile=ES,y.fill=SS,y.filter=bA,y.flatMap=RA,y.flatMapDeep=NA,y.flatMapDepth=OA,y.flatten=Fg,y.flattenDeep=AS,y.flattenDepth=bS,y.flip=JA,y.flow=WI,y.flowRight=qI,y.fromPairs=IS,y.functions=qb,y.functionsIn=Gb,y.groupBy=PA,y.initial=RS,y.intersection=NS,y.intersectionBy=OS,y.intersectionWith=PS,y.invert=Yb,y.invertBy=Jb,y.invokeMap=xA,y.iteratee=gu,y.keyBy=DA,y.keys=st,y.keysIn=Ut,y.map=gs,y.mapKeys=Xb,y.mapValues=Zb,y.matches=GI,y.matchesProperty=jI,y.memoize=ps,y.merge=eI,y.mergeWith=cm,y.method=YI,y.methodOf=JI,y.mixin=mu,y.negate=vs,y.nthArg=XI,y.omit=tI,y.omitBy=nI,y.once=QA,y.orderBy=LA,y.over=ZI,y.overArgs=XA,y.overEvery=ek,y.overSome=tk,y.partial=su,y.partialRight=Zg,y.partition=UA,y.pick=rI,y.pickBy=lm,y.property=pm,y.propertyOf=nk,y.pull=LS,y.pullAll=$g,y.pullAllBy=US,y.pullAllWith=BS,y.pullAt=VS,y.range=rk,y.rangeRight=ok,y.rearg=ZA,y.reject=FA,y.remove=FS,y.rest=eb,y.reverse=ou,y.sampleSize=$A,y.set=iI,y.setWith=aI,y.shuffle=KA,y.slice=HS,y.sortBy=qA,y.sortedUniq=jS,y.sortedUniqBy=YS,y.split=RI,y.spread=tb,y.tail=JS,y.take=QS,y.takeRight=XS,y.takeRightWhile=ZS,y.takeWhile=eA,y.tap=mA,y.throttle=nb,y.thru=fs,y.toArray=om,y.toPairs=um,y.toPairsIn=dm,y.toPath=lk,y.toPlainObject=am,y.transform=sI,y.unary=rb,y.union=tA,y.unionBy=nA,y.unionWith=rA,y.uniq=oA,y.uniqBy=iA,y.uniqWith=aA,y.unset=cI,y.unzip=iu,y.unzipWith=Kg,y.update=lI,y.updateWith=uI,y.values=Uo,y.valuesIn=dI,y.without=sA,y.words=gm,y.wrap=ob,y.xor=cA,y.xorBy=lA,y.xorWith=uA,y.zip=dA,y.zipObject=hA,y.zipObjectDeep=fA,y.zipWith=gA,y.entries=um,y.entriesIn=dm,y.extend=sm,y.extendWith=ws,mu(y,y),y.add=dk,y.attempt=mm,y.camelCase=mI,y.capitalize=hm,y.ceil=hk,y.clamp=hI,y.clone=ab,y.cloneDeep=cb,y.cloneDeepWith=lb,y.cloneWith=sb,y.conformsTo=ub,y.deburr=fm,y.defaultTo=zI,y.divide=fk,y.endsWith=pI,y.eq=Nn,y.escape=vI,y.escapeRegExp=yI,y.every=AA,y.find=IA,y.findIndex=Bg,y.findKey=Fb,y.findLast=kA,y.findLastIndex=Vg,y.findLastKey=Hb,y.floor=gk,y.forEach=Wg,y.forEachRight=qg,y.forIn=$b,y.forInRight=Kb,y.forOwn=zb,y.forOwnRight=Wb,y.get=uu,y.gt=db,y.gte=hb,y.has=jb,y.hasIn=du,y.head=Hg,y.identity=Bt,y.includes=MA,y.indexOf=kS,y.inRange=fI,y.invoke=Qb,y.isArguments=no,y.isArray=ce,y.isArrayBuffer=fb,y.isArrayLike=Lt,y.isArrayLikeObject=je,y.isBoolean=gb,y.isBuffer=Mr,y.isDate=mb,y.isElement=pb,y.isEmpty=vb,y.isEqual=yb,y.isEqualWith=Cb,y.isError=cu,y.isFinite=wb,y.isFunction=dr,y.isInteger=em,y.isLength=ys,y.isMap=tm,y.isMatch=_b,y.isMatchWith=Tb,y.isNaN=Eb,y.isNative=Sb,y.isNil=bb,y.isNull=Ab,y.isNumber=nm,y.isObject=$e,y.isObjectLike=ze,y.isPlainObject=Gi,y.isRegExp=lu,y.isSafeInteger=Ib,y.isSet=rm,y.isString=Cs,y.isSymbol=qt,y.isTypedArray=Lo,y.isUndefined=kb,y.isWeakMap=Rb,y.isWeakSet=Nb,y.join=MS,y.kebabCase=CI,y.last=fn,y.lastIndexOf=xS,y.lowerCase=wI,y.lowerFirst=_I,y.lt=Ob,y.lte=Pb,y.max=mk,y.maxBy=pk,y.mean=vk,y.meanBy=yk,y.min=Ck,y.minBy=wk,y.stubArray=vu,y.stubFalse=yu,y.stubObject=ik,y.stubString=ak,y.stubTrue=sk,y.multiply=_k,y.nth=DS,y.noConflict=QI,y.noop=pu,y.now=ms,y.pad=TI,y.padEnd=EI,y.padStart=SI,y.parseInt=AI,y.random=gI,y.reduce=BA,y.reduceRight=VA,y.repeat=bI,y.replace=II,y.result=oI,y.round=Tk,y.runInContext=b,y.sample=HA,y.size=zA,y.snakeCase=kI,y.some=WA,y.sortedIndex=$S,y.sortedIndexBy=KS,y.sortedIndexOf=zS,y.sortedLastIndex=WS,y.sortedLastIndexBy=qS,y.sortedLastIndexOf=GS,y.startCase=NI,y.startsWith=OI,y.subtract=Ek,y.sum=Sk,y.sumBy=Ak,y.template=PI,y.times=ck,y.toFinite=hr,y.toInteger=de,y.toLength=im,y.toLower=MI,y.toNumber=gn,y.toSafeInteger=Mb,y.toString=be,y.toUpper=xI,y.trim=DI,y.trimEnd=LI,y.trimStart=UI,y.truncate=BI,y.unescape=VI,y.uniqueId=uk,y.upperCase=FI,y.upperFirst=hu,y.each=Wg,y.eachRight=qg,y.first=Hg,mu(y,function(){var o={};return Kn(y,function(a,u){Ie.call(y.prototype,u)||(o[u]=a)}),o}(),{chain:!1}),y.VERSION=n,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){y[o].placeholder=y}),cn(["drop","take"],function(o,a){pe.prototype[o]=function(u){u=u===t?1:rt(de(u),0);var h=this.__filtered__&&!a?new pe(this):this.clone();return h.__filtered__?h.__takeCount__=_t(u,h.__takeCount__):h.__views__.push({size:_t(u,$t),type:o+(h.__dir__<0?"Right":"")}),h},pe.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),cn(["filter","map","takeWhile"],function(o,a){var u=a+1,h=u==Ct||u==an;pe.prototype[o]=function(p){var C=this.clone();return C.__iteratees__.push({iteratee:X(p,3),type:u}),C.__filtered__=C.__filtered__||h,C}}),cn(["head","last"],function(o,a){var u="take"+(a?"Right":"");pe.prototype[o]=function(){return this[u](1).value()[0]}}),cn(["initial","tail"],function(o,a){var u="drop"+(a?"":"Right");pe.prototype[o]=function(){return this.__filtered__?new pe(this):this[u](1)}}),pe.prototype.compact=function(){return this.filter(Bt)},pe.prototype.find=function(o){return this.filter(o).head()},pe.prototype.findLast=function(o){return this.reverse().find(o)},pe.prototype.invokeMap=fe(function(o,a){return typeof o=="function"?new pe(this):this.map(function(u){return Hi(u,o,a)})}),pe.prototype.reject=function(o){return this.filter(vs(X(o)))},pe.prototype.slice=function(o,a){o=de(o);var u=this;return u.__filtered__&&(o>0||a<0)?new pe(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),a!==t&&(a=de(a),u=a<0?u.dropRight(-a):u.take(a-o)),u)},pe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},pe.prototype.toArray=function(){return this.take($t)},Kn(pe.prototype,function(o,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),p=y[h?"take"+(a=="last"?"Right":""):a],C=h||/^find/.test(a);p&&(y.prototype[a]=function(){var T=this.__wrapped__,S=h?[1]:arguments,I=T instanceof pe,x=S[0],D=I||ce(T),L=function(me){var ve=p.apply(y,br([me],S));return h&&K?ve[0]:ve};D&&u&&typeof x=="function"&&x.length!=1&&(I=D=!1);var K=this.__chain__,Y=!!this.__actions__.length,Z=C&&!K,he=I&&!Y;if(!C&&D){T=he?T:new pe(this);var ee=o.apply(T,S);return ee.__actions__.push({func:fs,args:[L],thisArg:t}),new un(ee,K)}return Z&&he?o.apply(this,S):(ee=this.thru(L),Z?h?ee.value()[0]:ee.value():ee)})}),cn(["pop","push","shift","sort","splice","unshift"],function(o){var a=Va[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",h=/^(?:pop|shift)$/.test(o);y.prototype[o]=function(){var p=arguments;if(h&&!this.__chain__){var C=this.value();return a.apply(ce(C)?C:[],p)}return this[u](function(T){return a.apply(ce(T)?T:[],p)})}}),Kn(pe.prototype,function(o,a){var u=y[a];if(u){var h=u.name+"";Ie.call(Oo,h)||(Oo[h]=[]),Oo[h].push({name:a,func:u})}}),Oo[as(t,$).name]=[{name:"wrapper",func:t}],pe.prototype.clone=VT,pe.prototype.reverse=FT,pe.prototype.value=HT,y.prototype.at=pA,y.prototype.chain=vA,y.prototype.commit=yA,y.prototype.next=CA,y.prototype.plant=_A,y.prototype.reverse=TA,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=EA,y.prototype.first=y.prototype.head,xi&&(y.prototype[xi]=wA),y},ko=yT();jr?((jr.exports=ko)._=ko,gl._=ko):ht._=ko}).call(qU)}(ea,ea.exports)),ea.exports}var Ti=GU();const Xs=WU(Ti),jU={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-BR38-_vK.js")),meta:{requiresAuth:!1}},YU={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-BtE9uYh5.js")),meta:{requiresAuth:!1}},{isAuthenticated:Yp,handleRedirect:JU}=xh(),QU=Jc();function XU(r,e){r.addRoute(jU),r.addRoute(YU),r.beforeEach(async(t,n,i)=>{function s(d){return d.matched.some(f=>f.meta.requiresAuth)}if(!s(t))return i();if(!Yp.value){ie.value=!0;try{await JU(e,t.fullPath),await QU.__init__()}catch(d){console.error("Fail to authenticate",d),await r.push("/jplan-auth-fail")}ie.value=!1}if(Yp.value){if(localStorage.getItem("returnRoute")&&localStorage.getItem("returnRoute")!==null){const d=localStorage.getItem("returnRoute")??"/";console.log("trying to go to saved route:",d),i(d),localStorage.removeItem("returnRoute");return}i()}})}const{scope:Jp}=Jc();function ZU(){const r=Vh(),e=c.ref({scope_type:"org"});async function t(n){e.value=n}return c.watch(Jp,()=>{r.interceptors.request.use(n=>{const i=n.headers,s=i.Authorization;s&&(i.Authorization=s);const l=Jp.value;return l&&(l.scope_type&&(i["j-scope-type"]=l.scope_type,l.organization&&(i["j-scope-organization"]=l.organization),l.team&&(i["j-scope-team"]=l.team)),l.environment&&(i["j-scope-environment"]=l.environment)),n})},{immediate:!0}),Object.assign(r,{setScope:t,scope:e})}function Ei(r){const e=ZU();e.defaults.baseURL=r;const t=c.ref({scope_type:"org"});async function n(i){t.value=i}return c.watch(t,()=>{e.interceptors.request.use(i=>{const s=t.value;return delete i.headers["j-scope-type"],delete i.headers["j-scope-organization"],delete i.headers["j-scope-team"],s!=null&&s.scope_type&&(i.headers["j-scope-type"]=s.scope_type),s!=null&&s.organization&&(i.headers["j-scope-organization"]=s.organization),s!=null&&s.team&&(i.headers["j-scope-team"]=s.team),i})},{immediate:!0}),Object.assign(e,{setScope:n,scope:t})}function eB(){const r=Ei("https://api.jplan.com.br/management/organization"),{error:e}=Fn();return{async getOrgList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Organization list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getOrgList:",n),e("Failed to fetch Organization list");return}},async createOrg(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Organization"),s}},async updateOrg(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Organization"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Organization"),s}},async getOrg(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Organization"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Organization"),s}},async activateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in activateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Organization"),s}},async deactivateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Organization"),s}}}}const Vr=eB();function tB(){const r=Ei("https://api.jplan.com.br/management/branch/"),{error:e}=Fn();return{async getBranchList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error){e("Failed to fetch Branch list");return}return i.data.data}catch(n){console.error("Error in getBranchList:",n),e("Failed to fetch Branch list")}},async createBranch(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){console.error("Error in createBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Branch")}},async updateBranch(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error){e(s.data.error||"Failed to update Branch");return}return s}catch(s){console.error("Error in updateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Branch")}},async getBranch(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error){e(s.data.error||"Failed to fetch Branch");return}return s.data}catch(s){console.error("Error in getBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Branch")}},async activateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error){e(s.data.error||"Failed to activate Branch");return}}catch(s){console.error("Error in activateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Branch")}},async deactivateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error){e(s.data.error||"Failed to deactivate Branch");return}}catch(s){console.error("Error in deactivateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Branch")}}}}const Fr=tB();function nB(){const r=Ei("https://api.jplan.com.br/management/team"),{error:e}=Fn();return{async getTeamList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Team list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getTeamList:",n),e("Failed to fetch Team list");return}},async createTeam(t){var n,i;try{const s=await r.post("/item",t);if(s.data.error)throw e("Failed to create Team"),new Error(s.data.error);return s}catch(s){throw console.error("Error in createTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Team"),s}},async updateTeam(t){var n,i;try{const s=await r.patch("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in updateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Team"),s}},async getTeam(t){var n,i;try{const s=await r.get(`/item/${t}`);return s.data.error&&e("Failed to fetch Team"),s.data}catch(s){console.error("Error in getTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Team");return}},async activateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in activateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Team"),s}},async deactivateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Team"),s}},async getTeamUserList(t,n){try{const i=n?`?filter_query=${n}`:"",s=await r.get(`/item/${t}/user/list/${i}`);if(s.data.error)throw e("Failed to fetch Team User list"),new Error(s.data.error);return s.data.data}catch(i){console.error("Error in getTeamUserList:",i),e("Failed to fetch Team User list");return}},async linkManageUser(t,n){try{const i=await r.post(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to link User"),new Error(i.data.error);return i.data}catch(i){console.error("Error in link User:",i),e("Failed to link User");return}},async updateManageUser(t,n){try{const i=await r.patch(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to update User"),new Error(i.data.error);return i.data.data}catch(i){throw console.error("Error in update User:",i),e("Failed to update User"),i}},async getManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"",l=await r.get(`/item/${t}/user/item/${n}/${s}`);if(l.data.error)throw e("Failed to fetch User"),new Error(l.data.error);return l.data.data}catch(s){console.error("Error in getUser:",s),e("Failed to fetch User");return}},async unlinkManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"";await r.delete(`/item/${t}/user/item/${n}/${s}`)}catch(s){throw console.error("Error in unlink User:",s),e("Failed to unlink User"),s}}}}const Zt=nB();async function rB({url:r,method:e,header:t={},body:n,bearerToken:i}){const s=i?{Authorization:`Bearer ${i}`}:{};try{return(await Ke({url:r,method:e,headers:{...t,...s},data:n??{}})).data}catch(l){throw console.error(`Request failed for ${e} ${r}:`,l),l}}function Si(r,e,t=[]){const n=iB(e);if(!n)return r;const i=n.split(" ");return r.filter(s=>oB(s,i,t))}function oB(r,e,t){return t.some(n=>{const i=Xs.get(r,n);if(Xs.isNil(i))return!1;const s=Xs.toString(i).toLowerCase();return e.every(l=>s.includes(l))})}function iB(r){return Xs.trim(r).toLowerCase().replace(/\s+/g," ")}let Ds=!1;const Gu=c.ref(!1),mn=c.ref([]),Qp=c.ref([]),We=c.ref(null),qo=c.ref([]),Go=c.ref([]),Mw=()=>{const r=Fn(),e=async _=>{Gu.value=!0;const A=_?`_active eq true and ${_}`:"_active eq true",R=await Vr.getOrgList(A);R&&(mn.value=R,Ds=!0),Gu.value=!1},t=async _=>{var A;return(A=mn.value)!=null&&A.length||await e(_),mn.value};function n(_){if(!mn.value)throw new Error("Data not stored yet");const A=Si(mn.value,_,["name","description"]);return _!==""?A:mn.value}const i=_=>{Qp.value=_},s=_=>{We.value=Ti.cloneDeep(_)},l=async _=>await Vr.getOrg(_),d=async()=>{if(We.value!=null){const _=await Vr.createOrg(We.value);return _!=null&&_.data.created_at&&(r.success("Organization created."),Ds&&mn.value.push(_.data)),_==null?void 0:_.data}},f=async()=>{if(ie.value=!0,We.value&&We.value.__id){const _=await Vr.updateOrg(We.value);if(Ds&&(_!=null&&_.data.__id)){const A=mn.value.findIndex(R=>R.__id===_.data.__id);return A!==-1?(mn.value[A]=_.data,r.success("Organization updated.")):r.error("Unable to update item"),ie.value=!1,_.data}}else ie.value=!1,r.error("Unable to update item")},g=async()=>{if(ie.value=!0,We.value&&We.value.created_at){if(await Vr.deactivateOrg(We.value.__id),Ds){const _=mn.value.findIndex(A=>{var R;return A.__id===((R=We.value)==null?void 0:R.__id)});if(_!==-1)return mn.value.splice(_,1),We.value;r.error("Unable to deactivate organization")}ie.value=!1}};async function m(_){ie.value=!0;try{if(We.value&&We.value.__id){const A={..._,organization:We.value.__id};if(!await Fr.updateBranch(A)){ie.value=!1;return}if(qo.value.findIndex(V=>V.__id===_.__id)===-1)return r.success("Branch added successfully."),qo.value.push(A),A;r.info("Branch already added.")}}catch(A){console.error(A)}finally{ie.value=!1}}async function w(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await Fr.updateBranch(A)){ie.value=!1;return}const $=qo.value.findIndex(V=>V.__id===_.__id);if($!==-1)return qo.value.splice($,1),ie.value=!1,qo.value;throw new Error("Item not found to remove")}ie.value=!1}async function v(_){ie.value=!0;try{if(We.value&&We.value.__id){const A={..._,organization:We.value.__id};if(!await Zt.updateTeam(A)){ie.value=!1;return}if(Go.value.findIndex(V=>V.__id===_.__id)===-1)return r.success("Team added successfully."),Go.value.push(A),A;r.info("Team already added.")}}catch(A){console.error(A)}finally{ie.value=!1}}async function E(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await Zt.updateTeam(A)){ie.value=!1;return}const $=Go.value.findIndex(V=>V.__id===_.__id);if($!==-1)return Go.value.splice($,1),ie.value=!1,Go.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:mn,loading:Gu,columns:Qp,item:We,filterData:n,__init__:e,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgBranches:qo,orgTeams:Go,linkBranch:m,unlinkBranch:w,linkTeam:v,unlinkTeam:E}};let Ls=!1;const pn=c.ref([]),Xp=c.ref([]),ot=c.ref(null),ju=c.ref(!1),jo=c.ref([]),xw=()=>{const r=Fn(),e=async v=>{ju.value=!0;const E=v?`_active eq true and ${v}`:"_active eq true",_=await Zt.getTeamList(E);_&&(pn.value=_,Ls=!0),ju.value=!1},t=async v=>(pn.value.length||await e(v),pn.value);function n(v){if(!pn.value)throw new Error("Data not stored yet");const E=Si(pn.value,v,["name","description"]);return v!==""?E:pn.value}const i=v=>{Xp.value=v},s=v=>{ot.value=Ti.cloneDeep(v)},l=async v=>await Zt.getTeam(v),d=async()=>{if(ot.value!=null){const v=await Zt.createTeam(ot.value);return v!=null&&v.data.created_at&&(r.success("Team created."),Ls&&pn.value.push(v.data)),v==null?void 0:v.data}},f=async()=>{if(ie.value=!0,ot.value&&ot.value.__id){const v=await Zt.updateTeam(ot.value);if(Ls&&(v!=null&&v.data.__id)){const E=pn.value.findIndex(_=>_.__id===v.data.__id);return E!==-1?(pn.value[E]=v.data,r.success("Team updated.")):r.error("Unable to update item"),v.data}}else r.error("Unable to update item")},g=async()=>{if(ot.value&&ot.value.created_at&&(await Zt.deactivateTeam(ot.value.__id),Ls)){const v=pn.value.findIndex(E=>{var _;return E.__id===((_=ot.value)==null?void 0:_.__id)});if(v!==-1)return pn.value.splice(v,1),ot.value;r.error("Unable to deactivate organization")}};async function m(v){var E;if(ie.value=!0,(E=ot.value)!=null&&E.__id)if(jo.value.findIndex(A=>A.__id===v.__id)===-1)try{const A=await Zt.linkManageUser(ot.value.__id,{team:ot.value.__id,user:v.__id,role:"string",joined_at:"string",comments:"string"}),R=await Zt.getTeamUserList(ot.value.__id);return R&&(jo.value=R),r.success("User added successfully."),A}catch(A){console.error(A),r.error("Unable to add User.")}finally{ie.value=!1}else r.info("User already added.");else console.warn("No item selected or item ID is missing."),r.info("Please select a valid item.");ie.value=!1}async function w(v){if(ie.value=!0,ot.value&&ot.value.__id){const E=jo.value.findIndex(_=>_.__id===v);if(E!==-1)return await Zt.unlinkManageUser(ot.value.__id,v),jo.value.splice(E,1),ie.value=!1,jo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:pn,loading:ju,columns:Xp,item:ot,usersTeam:jo,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,linkUser:m,unlinkUser:w}},Dw=c.defineComponent({__name:"GlobalScopeFilter",setup(r){var A,R,$;const{openDialog:e}=ya("global-scope__J-"),{user:t,scope:n,session:i,setScope:s}=Jc(),{getData:l,data:d}=Mw(),{getData:f,data:g}=xw(),m=c.ref(!1);c.onBeforeMount(async()=>{m.value=!0,await l(),await f(),m.value=!1});const w=c.ref({scope_type:(A=n.value)==null?void 0:A.scope_type,organization:((R=n.value)==null?void 0:R.organization)??"org",team:($=n.value)==null?void 0:$.team});function v(){var V,U,Q;w.value={...n.value,scope_type:(V=n.value)==null?void 0:V.scope_type,organization:((U=n.value)==null?void 0:U.organization)??"",team:(Q=n.value)==null?void 0:Q.team},e()}const E=c.computed(()=>{var V;switch((V=n.value)==null?void 0:V.scope_type){case"user":return F1;case"org":return B1;case"team":return H1;default:return V1}});async function _(){var V;((V=n.value)==null?void 0:V.scope_type)!==""&&s(w.value)}return(V,U)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Ue.VBtn,{onClick:v,icon:"",class:"text-secondary",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(E.value),{size:"20"}))]),_:1}),c.createVNode(c.unref(wa),{loading:m.value,title:"Scope","dd-id":"global-scope__J-","on-save":_},{default:c.withCtx(()=>[c.createElementVNode("div",null,[c.createVNode(Ae.VRow,null,{default:c.withCtx(()=>[c.createVNode(Ae.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:c.withCtx(()=>[c.createVNode(St.VListItem,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>U[3]||(U[3]=[c.createTextVNode(" User")])),_:1}),c.createVNode(St.VListItemSubtitle,null,{default:c.withCtx(()=>{var Q;return[c.createTextVNode(c.toDisplayString(((Q=c.unref(t))==null?void 0:Q.name)||"Unknown"),1)]}),_:1})]),_:1})]),_:1}),c.createVNode(Ae.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(St.VListItem,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>U[4]||(U[4]=[c.createTextVNode(" Domain")])),_:1}),c.createVNode(St.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).domain),1)]),_:1})]),_:1})]),_:1}),c.createVNode(Ae.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(St.VListItem,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>U[5]||(U[5]=[c.createTextVNode(" Environment")])),_:1}),c.createVNode(St.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),c.createVNode(Nk.VBtnToggle,{density:"compact",variant:"outlined",modelValue:w.value.scope_type,"onUpdate:modelValue":U[0]||(U[0]=Q=>w.value.scope_type=Q),class:"d-flex justify-center my-4"},{default:c.withCtx(()=>[c.createVNode(Ue.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:c.withCtx(()=>U[6]||(U[6]=[c.createTextVNode("Organizational")])),_:1}),c.createVNode(Ue.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:c.withCtx(()=>U[7]||(U[7]=[c.createTextVNode("Team")])),_:1}),c.createVNode(Ue.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:c.withCtx(()=>U[8]||(U[8]=[c.createTextVNode("User")])),_:1}),c.createVNode(Ue.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:c.withCtx(()=>U[9]||(U[9]=[c.createTextVNode("None")])),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",null,[c.createVNode(ua.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>U[10]||(U[10]=[c.createTextVNode("Organization")])),_:1}),c.createVNode(ta.VSelect,{items:c.unref(d),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Organization",class:"min-w-50",modelValue:w.value.organization,"onUpdate:modelValue":U[1]||(U[1]=Q=>w.value.organization=Q)},null,8,["items","modelValue"]),c.createVNode(ua.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>U[11]||(U[11]=[c.createTextVNode("Team")])),_:1}),c.createVNode(ta.VSelect,{items:c.unref(g),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Team",class:"min-w-50",modelValue:w.value.team,"onUpdate:modelValue":U[2]||(U[2]=Q=>w.value.team=Q)},null,8,["items","modelValue"])])])]),_:1},8,["loading"])],64))}}),aB={},sB={class:"double-ring-spinner-container"};function cB(r,e){return c.openBlock(),c.createElementBlock("div",sB,e[0]||(e[0]=[c.createElementVNode("div",{class:"spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])],-1)]))}const Lw=vi(aB,[["render",cB],["__scopeId","data-v-00d7a69f"]]),lB={key:0,class:"_jspinner-overlay_jj"},Uw=c.defineComponent({__name:"GlobalSpinner",setup(r){return(e,t)=>c.unref(ie)?(c.openBlock(),c.createElementBlock("div",lB,t[0]||(t[0]=[c.createElementVNode("div",{class:"j-double-ring-spinner-container"},[c.createElementVNode("div",{class:"j-global-spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])])],-1)]))):c.createCommentVNode("",!0)}}),Bw=c.defineComponent({__name:"SubMenu",props:{title:{}},setup(r,{expose:e}){return e({props:r}),(n,i)=>(c.openBlock(),c.createBlock(St.VListItem,{onClick:i[0]||(i[0]=()=>{}),density:"compact"},{append:c.withCtx(()=>[c.createVNode(c.unref($1))]),default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.title),1)]),_:1}),c.createVNode(Ud.VMenu,{activator:"parent","open-on-hover":"",submenu:"",density:"compact"},{default:c.withCtx(()=>[c.renderSlot(n.$slots,"default")]),_:3})]),_:3}))}}),uB=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:Hv,ColumnSettingsDialog:qd,ConfirmDialog:Vv,ContextMenu:$v,CopyButton:wc,DeleteAllBtn:Hd,DotsMenu:Bv,EditButton:Uv,FormHeadless:Cy,FormMetadata:Nc,GlobalScopeFilter:Dw,GlobalSpinner:Uw,JAvatar:Fv,JBtn:iv,JDialog:wa,JForm:vy,JIconBtn:ov,JSelect:fy,JTextArea:gy,JTextField:hy,ParentCard:Ac,SearchFilter:kc,SpinnerLoader:Lw,SubMenu:Bw,TabFormHeader:yy,TableAdvanced:Yv,TableCard:Gd,TableCardsView:uy,TableHeader:Jv,UiTable:Kv},Symbol.toStringTag,{value:"Module"})),dB=iR(),hB={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0};let Yu=!1;const Ju=c.ref(!1),vn=c.ref([]),Zp=c.ref([]),gt=c.ref(null),Yo=c.ref([]),fB=()=>{const r=Fn(),e=async v=>{Ju.value=!0;const E=v?`_active eq true and ${v}`:"_active eq true",_=await Fr.getBranchList(E);_&&(vn.value=_,Yu=!0),Ju.value=!1},t=async v=>(vn.value.length||await e(v),vn.value);function n(v){if(!vn.value)throw new Error("Data not stored yet");const E=Si(vn.value,v,["name","description"]);return v!==""?E:vn.value}const i=v=>{Zp.value=v},s=v=>{gt.value=Ti.cloneDeep(v)},l=async v=>await Fr.getBranch(v),d=async()=>{if(gt.value!=null){const v=await Fr.createBranch(gt.value);return v!=null&&v.data.created_at&&(r.success("Branch created."),Yu&&vn.value.push(v.data)),v==null?void 0:v.data}},f=async()=>{if(gt.value&>.value.__id){const v=await Fr.updateBranch(gt.value);if(Yu&&v){const E=vn.value.findIndex(_=>_.__id===v.data.__id);return E!==-1?(vn.value[E]=v.data,r.success("Branch updated.")):r.error("Unable to update item"),v}}else r.error("Unable to update item")},g=async()=>{if(gt.value&>.value.created_at){await Fr.deactivateBranch(gt.value.__id);const v=vn.value.findIndex(E=>{var _;return E.__id===((_=gt.value)==null?void 0:_.__id)});if(v!==-1)return vn.value.splice(v,1),gt.value;r.error("Unable to deactivate Domain")}};async function m(v){ie.value=!0;try{if(gt.value&>.value.__id){const E={...v,branch:gt.value.__id};if(!await Zt.updateTeam(E)){r.error("Unable to link team");return}if(Yo.value.findIndex(R=>R.__id===v.__id)===-1)return r.success("Team added successfully."),Yo.value.push(E),E;r.info("Team already added.")}else throw new Error("Item is not defined")}catch(E){console.error(E)}finally{ie.value=!1}}async function w(v){if(ie.value=!0,gt.value&>.value.__id){const E={...v,branch:null};if(!await Zt.updateTeam(E))return;const A=Yo.value.findIndex(R=>R.__id===v.__id);if(A!==-1)return Yo.value.splice(A,1),ie.value=!1,Yo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:vn,columns:Zp,item:gt,loading:Ju,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,branchTeams:Yo,linkTeam:m,unlinkTeam:w}};function gB(){const r=Ei("https://api.jplan.com.br/management/division"),{error:e}=Fn();return{async getDivisionList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Division list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getDivisionList:",n),e("Failed to fetch Division list");return}},async createDivision(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Division"),s}},async updateDivision(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Division"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Division"),s}},async getDivision(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Division"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Division"),s}},async activateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in activateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Division"),s}},async deactivateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Division"),s}}}}const ti=gB();let Qu=!1;const Xu=c.ref(!1),yn=c.ref([]),ev=c.ref([]),mt=c.ref(null),Jo=c.ref([]),mB=()=>{const r=Fn(),e=async v=>{Xu.value=!0;const E=v?`_active eq true and ${v}`:"_active eq true",_=await ti.getDivisionList(E);_&&(yn.value=_,Qu=!0),Xu.value=!1},t=async v=>(yn.value.length||await e(v),yn.value);function n(v){if(!yn.value)throw new Error("Data not stored yet");const E=Si(yn.value,v,["name","description"]);return v!==""?E:yn.value}const i=v=>{ev.value=v},s=v=>{mt.value=Ti.cloneDeep(v)},l=async v=>await ti.getDivision(v),d=async()=>{if(mt.value!=null){const v=await ti.createDivision(mt.value);return v!=null&&v.data.created_at&&(r.success("Division created."),Qu&&yn.value.push(v.data)),v==null?void 0:v.data}},f=async()=>{if(ie.value=!0,mt.value&&mt.value.__id){const v=await ti.updateDivision(mt.value);if(Qu&&(v!=null&&v.data.__id)){const E=yn.value.findIndex(_=>_.__id===v.data.__id);return E!==-1?(yn.value[E]=v.data,r.success("Updated Division.")):r.error("Unable to update item"),ie.value=!1,v}}else ie.value=!1,r.error("Unable to update item")},g=async()=>{if(ie.value=!0,mt.value&&mt.value.created_at){await ti.deactivateDivision(mt.value.__id);const v=yn.value.findIndex(E=>{var _;return E.__id===((_=mt.value)==null?void 0:_.__id)});if(v!==-1)return yn.value.splice(v,1),mt.value;r.error("Unable to deactivate Division")}ie.value=!1};async function m(v){ie.value=!0;try{if(mt.value&&mt.value.__id){const E={...v,division:mt.value.__id};return await Vr.updateOrg(E)?(Jo.value.findIndex(R=>R.__id===v.__id)===-1?(r.success("Organization added successfully."),Jo.value.push(E)):r.info("Organization already added."),E):void 0}else throw new Error("Item is not defined")}catch(E){console.error(E)}finally{ie.value=!1}}async function w(v){if(ie.value=!0,mt.value&&mt.value.__id){const E={...v,division:null};if(!await Vr.updateOrg(E))return;const A=Jo.value.findIndex(R=>R.__id===v.__id);if(A!==-1)Jo.value.splice(A,1);else throw new Error("Item não encontrado para remoção")}else throw new Error("Item não está definido");return ie.value=!1,Jo.value}return{data:yn,columns:ev,item:mt,loading:Xu,__init__:e,filterData:n,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgs:Jo,linkDivision:m,unlinkDivision:w}};function pB(){const r=Ei("https://api.jplan.com.br/management/user"),{error:e}=Fn();return{async getManageUserList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch User list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getManageUserList:",n),e("Failed to fetch User list");return}},async createManageUser(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create User"),s}},async updateManageUser(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update User"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update User"),s}},async getManageUser(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch User"),new Error(s.data.error);return s.data}catch(s){console.error("Error in getManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch User");return}},async activateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate User"),new Error(s.data.error)}catch(s){throw console.error("Error in activateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate User"),s}},async deactivateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate User"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate User"),s}}}}const ni=pB();let Zu=!1,ed=c.ref(!1);const Cn=c.ref([]),tv=c.ref([]),wn=c.ref(null),vB=c.ref(null),yB=c.ref([]),CB=()=>{const r=Fn(),e=async m=>{ed.value=!0;const w=m?`_active eq true and ${m}`:"_active eq true",v=await ni.getManageUserList(w);v&&(Cn.value=v,Zu=!0),ed.value=!1},t=async m=>(Cn.value.length||await e(m),Cn.value);function n(m){if(!Cn.value)throw new Error("Data not stored yet");const w=Si(Cn.value,m,["name","description"]);return m!==""?w:Cn.value}return{data:Cn,loading:ed,columns:tv,item:wn,filterData:n,__init__:e,getData:t,setColumns:m=>{tv.value=m},setItem:m=>{wn.value=Ti.cloneDeep(m)},getItem:async m=>await ni.getManageUser(m),createItem:async()=>{if(wn.value!=null){const m=crypto.randomUUID(),w=await ni.createManageUser({...wn.value,__id:m});return w!=null&&w.data.created_at&&(r.success("User created."),Zu&&Cn.value.push(w.data)),w==null?void 0:w.data}},updateItem:async()=>{if(ie.value=!0,wn.value&&wn.value.created_at){const m=await ni.updateManageUser(wn.value);if(Zu&&(m!=null&&m.data)){const w=Cn.value.findIndex(v=>v.__id===(m==null?void 0:m.data.__id));if(w!==-1)Cn.value[w]=m==null?void 0:m.data,r.success("User created.");else throw new Error("Unable to find item after update")}return ie.value=!1,m==null?void 0:m.data}},removeItem:async()=>{if(wn.value&&wn.value.created_at){try{await ni.deactivateManageUser(wn.value.__id)}catch{r.error("Unable to deactivate user");return}const m=Cn.value.findIndex(w=>{var v;return w.__id===((v=wn.value)==null?void 0:v.__id)});if(m!==-1)return Cn.value.splice(m,1),wn.value}},userOrg:vB,userTeams:yB}},wB=r=>{r.use(dB),r.use(s0,hB),Object.entries(uB).forEach(([e,t])=>{r.component(e,t)}),Object.entries(Pk).forEach(([e,t])=>{r.provide(e,t)})},_B={install:wB};exports.ContextMenu=$v;exports.EmptyListImg=od;exports.EventBus=Ec;exports.FormHeadless=Cy;exports.HttpCore=rB;exports.SpinnerLoader=Lw;exports.TableCardsView=uy;exports.TableHeader=Jv;exports.__spinner=ie;exports._export_sfc=vi;exports._sfc_main=Kv;exports._sfc_main$1=Yv;exports._sfc_main$10=Hd;exports._sfc_main$11=Uv;exports._sfc_main$12=ov;exports._sfc_main$13=fy;exports._sfc_main$14=gy;exports._sfc_main$15=hy;exports._sfc_main$16=vy;exports._sfc_main$17=yy;exports._sfc_main$18=Ac;exports._sfc_main$19=Fv;exports._sfc_main$2=qd;exports._sfc_main$20=Hv;exports._sfc_main$21=wa;exports._sfc_main$22=Bw;exports._sfc_main$23=Dw;exports._sfc_main$24=Uw;exports._sfc_main$3=Gd;exports._sfc_main$4=kc;exports._sfc_main$5=Vv;exports._sfc_main$6=wc;exports._sfc_main$7=Bv;exports._sfc_main$8=Nc;exports._sfc_main$9=iv;exports.branchInstance=Fr;exports.coreClient=Vh;exports.createToastInterface=fa;exports.dateFormat=jv;exports.divisionInstance=ti;exports.filterQuery=Si;exports.globalEventBus=Fd;exports.index=_B;exports.manageUserInstance=ni;exports.msal=yt;exports.orgInstance=Vr;exports.provideToast=a0;exports.scopedClient=Ei;exports.setupAuthGuard=XU;exports.teamInstance=Zt;exports.toastInjectionKey=Sc;exports.useAuth=xh;exports.useBranchStore=fB;exports.useCustomizer=uR;exports.useDialog=ya;exports.useDivisionStore=mB;exports.useManageUserStore=CB;exports.useOrganizationStore=Mw;exports.useSession=Jc;exports.useTeamStore=xw;exports.useToast=Fn;
|
package/dist/jplan-pack.cjs.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-CDcvdU0K.js");require("@vueuse/core");exports.AvatarPicture=e._sfc_main$20;exports.ColumnSettingsDialog=e._sfc_main$2;exports.ConfirmDialog=e._sfc_main$5;exports.ContextMenu=e.ContextMenu;exports.CopyButton=e._sfc_main$6;exports.DeleteAllBtn=e._sfc_main$10;exports.DotsMenu=e._sfc_main$7;exports.EditButton=e._sfc_main$11;exports.EmptyListImg=e.EmptyListImg;exports.EventBus=e.EventBus;exports.FormHeadless=e.FormHeadless;exports.FormMetadata=e._sfc_main$8;exports.GlobalScopeFilter=e._sfc_main$23;exports.GlobalSpinner=e._sfc_main$24;exports.HttpCore=e.HttpCore;exports.JAvatar=e._sfc_main$19;exports.JBtn=e._sfc_main$9;exports.JDialog=e._sfc_main$21;exports.JForm=e._sfc_main$16;exports.JIconBtn=e._sfc_main$12;exports.JSelect=e._sfc_main$13;exports.JTextArea=e._sfc_main$14;exports.JTextField=e._sfc_main$15;Object.defineProperty(exports,"POSITION",{enumerable:!0,get:()=>e.POSITION});exports.ParentCard=e._sfc_main$18;exports.SearchFilter=e._sfc_main$4;exports.SpinnerLoader=e.SpinnerLoader;exports.SubMenu=e._sfc_main$22;Object.defineProperty(exports,"TYPE",{enumerable:!0,get:()=>e.TYPE});exports.TabFormHeader=e._sfc_main$17;exports.TableAdvanced=e._sfc_main$1;exports.TableCard=e._sfc_main$3;exports.TableCardsView=e.TableCardsView;exports.TableHeader=e.TableHeader;exports.UiTable=e._sfc_main;exports.__spinner=e.__spinner;exports.branchInstance=e.branchInstance;exports.coreClient=e.coreClient;exports.createToastInterface=e.createToastInterface;exports.dateFormat=e.dateFormat;exports.default=e.index;exports.divisionInstance=e.divisionInstance;exports.filterQuery=e.filterQuery;exports.globalEventBus=e.globalEventBus;exports.manageUserInstance=e.manageUserInstance;exports.orgInstance=e.orgInstance;exports.provideToast=e.provideToast;exports.scopedClient=e.scopedClient;exports.setupAuthGuard=e.setupAuthGuard;exports.teamInstance=e.teamInstance;exports.toastInjectionKey=e.toastInjectionKey;exports.useAuth=e.useAuth;exports.useBranchStore=e.useBranchStore;exports.useCustomizer=e.useCustomizer;exports.useDialog=e.useDialog;exports.useDivisionStore=e.useDivisionStore;exports.useManageUserStore=e.useManageUserStore;exports.useOrganizationStore=e.useOrganizationStore;exports.useSession=e.useSession;exports.useTeamStore=e.useTeamStore;exports.useToast=e.useToast;
|
package/dist/jplan-pack.es.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { D as t, f as n, k as r, C as o, l as i, q as l, n as u, r as c, P as d, Q as m, F as S, o as T, H as p, I as b, M as g, B as C, p as I, E as v, y as B, t as F, v as J, w as A, x as D, R as f, A as h, j as E, S as M, G as x, U as y, z as H, e as P, g as G, h as O, T as U, d as z, a as L, a0 as j, c as w, V as K, O as N, i as Q, Z as V, N as Y, W as _, a2 as k, $ as q, X as R, a8 as W, s as X, a1 as Z, Y as $, b as aa, a5 as sa, J as ea, K as ta, a3 as na, a7 as ra, a4 as oa, u as ia, a6 as la, L as ua } from "./index-
|
1
|
+
import { D as t, f as n, k as r, C as o, l as i, q as l, n as u, r as c, P as d, Q as m, F as S, o as T, H as p, I as b, M as g, B as C, p as I, E as v, y as B, t as F, v as J, w as A, x as D, R as f, A as h, j as E, S as M, G as x, U as y, z as H, e as P, g as G, h as O, T as U, d as z, a as L, a0 as j, c as w, V as K, O as N, i as Q, Z as V, N as Y, W as _, a2 as k, $ as q, X as R, a8 as W, s as X, a1 as Z, Y as $, b as aa, a5 as sa, J as ea, K as ta, a3 as na, a7 as ra, a4 as oa, u as ia, a6 as la, L as ua } from "./index-BbpxF7U2.mjs";
|
2
2
|
import "@vueuse/core";
|
3
3
|
export {
|
4
4
|
t as AvatarPicture,
|
@@ -10,6 +10,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
10
10
|
itemValue?: string;
|
11
11
|
density?: VSelect["density"];
|
12
12
|
loading?: boolean;
|
13
|
+
clearable?: boolean;
|
13
14
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
14
15
|
"update:modelValue": (...args: any[]) => void;
|
15
16
|
}, string, import('vue').PublicProps, Readonly<{
|
@@ -23,7 +24,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
23
24
|
itemValue?: string;
|
24
25
|
density?: VSelect["density"];
|
25
26
|
loading?: boolean;
|
27
|
+
clearable?: boolean;
|
26
28
|
}> & Readonly<{
|
27
29
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
28
|
-
}>, {
|
30
|
+
}>, {
|
31
|
+
clearable: boolean;
|
32
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
29
33
|
export default _default;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "jplan-pack",
|
3
|
-
"version": "0.6.
|
3
|
+
"version": "0.6.634",
|
4
4
|
"main": "./dist/jplan-pack.cjs.js",
|
5
5
|
"module": "./dist/jplan-pack.es.js",
|
6
6
|
"types": "dist/types/index.d.ts",
|
@@ -12,6 +12,7 @@
|
|
12
12
|
"require": "./dist/jplan-pack.cjs.js"
|
13
13
|
}
|
14
14
|
},
|
15
|
+
"typings": "./dist/types/index.d.ts",
|
15
16
|
"files": [
|
16
17
|
"dist/**/*",
|
17
18
|
"dist/index.css"
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import { DefineComponent } from 'vue';
|
2
|
-
import { default as UiTable } from '../components/table/UiTable';
|
3
|
-
import { default as TableAdvanced } from '../components/table/advanced/TableAdvanced';
|
4
|
-
import { default as TableHeader } from '../components/table/advanced/TableHeader';
|
5
|
-
import { default as ColumnSettingsDialog } from '../components/table/advanced/ColumnSettingsDialog';
|
6
|
-
import { default as TableCard } from '../components/table/card/TableCard';
|
7
|
-
import { default as TableCardsView } from '../components/table/card/TableCardsView';
|
8
|
-
import { default as SearchFilter } from '../components/SearchFilter';
|
9
|
-
import { default as ConfirmDialog } from '../components/ConfirmDialog';
|
10
|
-
import { default as CopyButton } from '../components/CopyButton';
|
11
|
-
import { default as DotsMenu } from '../components/DotsMenu';
|
12
|
-
import { default as FormMetadata } from '../components/form/footer/FormMetadata';
|
13
|
-
import { default as JBtn } from '../components/JBtn';
|
14
|
-
import { default as DeleteAllBtn } from '../components/DeleteAllBtn';
|
15
|
-
import { default as EditButton } from '../components/EditButton';
|
16
|
-
import { default as JIconBtn } from '../components/JIconBtn';
|
17
|
-
import { default as JSelect } from '../components/form/JSelect';
|
18
|
-
import { default as JTextArea } from '../components/form/JTextArea';
|
19
|
-
import { default as JTextField } from '../components/form/JTextField';
|
20
|
-
import { default as JForm } from '../components/form/JForm';
|
21
|
-
import { default as TabFormHeader } from '../components/form/headless/TabFormHeader';
|
22
|
-
import { default as FormHeadless } from '../components/form/headless/FormHeadless';
|
23
|
-
import { default as ParentCard } from '../components/ParentCard';
|
24
|
-
import { default as SpinnerLoader } from '../components/spinner/SpinnerLoader';
|
25
|
-
import { default as ContextMenu } from '../components/ContextMenu';
|
26
|
-
import { default as JAvatar } from '../components/JAvatar';
|
27
|
-
import { default as AvatarPicture } from '../components/AvatarPicture';
|
28
|
-
import { default as JDialog } from '../components/JDialog';
|
29
|
-
import { default as SubMenu } from '../components/menu/SubMenu';
|
30
|
-
import { default as GlobalScopeFilter } from '../modules/scope/GlobalScopeFilter';
|
31
|
-
import { default as GlobalSpinner } from '../components/spinner/GlobalSpinner';
|
32
|
-
declare module 'vue' {
|
33
|
-
interface Components {
|
34
|
-
UiTable: DefineComponent<(typeof UiTable)['$props']>;
|
35
|
-
TableAdvanced: DefineComponent<(typeof TableAdvanced)['$props']>;
|
36
|
-
TableHeader: DefineComponent<(typeof TableHeader)['$props']>;
|
37
|
-
ColumnSettingsDialog: DefineComponent<(typeof ColumnSettingsDialog)['$props']>;
|
38
|
-
TableCard: DefineComponent<typeof TableCard>;
|
39
|
-
TableCardsView: DefineComponent<(typeof TableCardsView)['$props']>;
|
40
|
-
SearchFilter: DefineComponent<(typeof SearchFilter)['$props']>;
|
41
|
-
ConfirmDialog: DefineComponent<(typeof ConfirmDialog)['$props']>;
|
42
|
-
CopyButton: DefineComponent<(typeof CopyButton)['$props']>;
|
43
|
-
DotsMenu: DefineComponent<(typeof DotsMenu)['$props']>;
|
44
|
-
FormMetadata: DefineComponent<(typeof FormMetadata)['$props']>;
|
45
|
-
JBtn: DefineComponent<(typeof JBtn)['$props']>;
|
46
|
-
DeleteAllBtn: DefineComponent<(typeof DeleteAllBtn)['$props']>;
|
47
|
-
EditButton: DefineComponent<(typeof EditButton)['$props']>;
|
48
|
-
JIconBtn: DefineComponent<typeof JIconBtn>;
|
49
|
-
JSelect: DefineComponent<(typeof JSelect)['$props']>;
|
50
|
-
JTextArea: DefineComponent<(typeof JTextArea)['$props']>;
|
51
|
-
JTextField: DefineComponent<(typeof JTextField)['$props']>;
|
52
|
-
JForm: DefineComponent<(typeof JForm)['$props']>;
|
53
|
-
TabFormHeader: DefineComponent<(typeof TabFormHeader)['$props']>;
|
54
|
-
FormHeadless: DefineComponent<(typeof FormHeadless)['$props']>;
|
55
|
-
ParentCard: DefineComponent<(typeof ParentCard)['$props']>;
|
56
|
-
SpinnerLoader: DefineComponent<(typeof SpinnerLoader)['$props']>;
|
57
|
-
ContextMenu: DefineComponent<(typeof ContextMenu)['$props']>;
|
58
|
-
JAvatar: DefineComponent<(typeof JAvatar)['$props']>;
|
59
|
-
AvatarPicture: DefineComponent<(typeof AvatarPicture)['$props']>;
|
60
|
-
JDialog: DefineComponent<(typeof JDialog)['$props']>;
|
61
|
-
SubMenu: DefineComponent<(typeof SubMenu)['$props']>;
|
62
|
-
GlobalScopeFilter: DefineComponent<(typeof GlobalScopeFilter)['$props']>;
|
63
|
-
GlobalSpinner: DefineComponent<typeof GlobalSpinner>;
|
64
|
-
}
|
65
|
-
}
|