@arbocollab/arbo-plugin-item-table 0.0.47 → 0.0.48

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.
@@ -6,7 +6,7 @@
6
6
  * @vue/reactivity v3.5.25
7
7
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
8
  * @license MIT
9
- **/function Wi(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let ai;class R0{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ai,!t&&ai&&(this.index=(ai.scopes||(ai.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=ai;try{return ai=this,t()}finally{ai=n}}else M.env.NODE_ENV!=="production"&&Wi("cannot run an inactive effect scope.")}on(){++this._on===1&&(this.prevScope=ai,ai=this)}off(){this._on>0&&--this._on===0&&(ai=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function D0(e){return new R0(e)}function _0(){return ai}function HL(e,t=!1){ai?ai.cleanups.push(e):M.env.NODE_ENV!=="production"&&!t&&Wi("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Yt;const jm=new WeakSet;class x0{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ai&&ai.active&&ai.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,jm.has(this)&&(jm.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||T0(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,O0(this),P0(this);const t=Yt,n=Ao;Yt=this,Ao=!0;try{return this.fn()}finally{M.env.NODE_ENV!=="production"&&Yt!==this&&Wi("Active effect was not restored correctly - this is likely a Vue internal bug."),I0(this),Yt=t,Ao=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Zm(t);this.deps=this.depsTail=void 0,O0(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?jm.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ym(this)&&this.run()}get dirty(){return Ym(this)}}let F0=0,gu,mu;function T0(e,t=!1){if(e.flags|=8,t){e.next=mu,mu=e;return}e.next=gu,gu=e}function Km(){F0++}function qm(){if(--F0>0)return;if(mu){let t=mu;for(mu=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;gu;){let t=gu;for(gu=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function P0(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function I0(e){let t,n=e.depsTail,i=n;for(;i;){const o=i.prevDep;i.version===-1?(i===n&&(n=o),Zm(i),GL(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=o}e.deps=t,e.depsTail=n}function Ym(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(A0(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function A0(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===vu)||(e.globalVersion=vu,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ym(e))))return;e.flags|=2;const t=e.dep,n=Yt,i=Ao;Yt=e,Ao=!0;try{P0(e);const o=e.fn(e._value);(t.version===0||wi(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Yt=n,Ao=i,I0(e),e.flags&=-3}}function Zm(e,t=!1){const{dep:n,prevSub:i,nextSub:o}=e;if(i&&(i.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=i,e.nextSub=void 0),M.env.NODE_ENV!=="production"&&n.subsHead===e&&(n.subsHead=o),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)Zm(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function GL(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ao=!0;const k0=[];function ko(){k0.push(Ao),Ao=!1}function Oo(){const e=k0.pop();Ao=e===void 0?!0:e}function O0(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Yt;Yt=void 0;try{t()}finally{Yt=n}}}let vu=0;class $L{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class $h{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,M.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!Yt||!Ao||Yt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Yt)n=this.activeLink=new $L(Yt,this),Yt.deps?(n.prevDep=Yt.depsTail,Yt.depsTail.nextDep=n,Yt.depsTail=n):Yt.deps=Yt.depsTail=n,M0(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Yt.depsTail,n.nextDep=void 0,Yt.depsTail.nextDep=n,Yt.depsTail=n,Yt.deps===n&&(Yt.deps=i)}return M.env.NODE_ENV!=="production"&&Yt.onTrack&&Yt.onTrack(un({effect:Yt},t)),n}trigger(t){this.version++,vu++,this.notify(t)}notify(t){Km();try{if(M.env.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(un({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{qm()}}}function M0(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)M0(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),M.env.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const Wh=new WeakMap,wa=Symbol(M.env.NODE_ENV!=="production"?"Object iterate":""),Xm=Symbol(M.env.NODE_ENV!=="production"?"Map keys iterate":""),yu=Symbol(M.env.NODE_ENV!=="production"?"Array iterate":"");function Wn(e,t,n){if(Ao&&Yt){let i=Wh.get(e);i||Wh.set(e,i=new Map);let o=i.get(n);o||(i.set(n,o=new $h),o.map=i,o.key=n),M.env.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function os(e,t,n,i,o,s){const r=Wh.get(e);if(!r){vu++;return}const a=l=>{l&&(M.env.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:i,oldValue:o,oldTarget:s}):l.trigger())};if(Km(),t==="clear")r.forEach(a);else{const l=ft(e),c=l&&Bh(n);if(l&&n==="length"){const u=Number(i);r.forEach((d,h)=>{(h==="length"||h===yu||!Bs(h)&&h>=u)&&a(d)})}else switch((n!==void 0||r.has(void 0))&&a(r.get(n)),c&&a(r.get(yu)),t){case"add":l?c&&a(r.get("length")):(a(r.get(wa)),va(e)&&a(r.get(Xm)));break;case"delete":l||(a(r.get(wa)),va(e)&&a(r.get(Xm)));break;case"set":va(e)&&a(r.get(wa));break}}qm()}function WL(e,t){const n=Wh.get(e);return n&&n.get(t)}function Il(e){const t=St(e);return t===e?t:(Wn(t,"iterate",yu),li(e)?t:t.map(No))}function Uh(e){return Wn(e=St(e),"iterate",yu),e}function _r(e,t){return Lo(e)?ro(e)?kl(No(t)):kl(t):No(t)}const UL={__proto__:null,[Symbol.iterator](){return Jm(this,Symbol.iterator,e=>_r(this,e))},concat(...e){return Il(this).concat(...e.map(t=>ft(t)?Il(t):t))},entries(){return Jm(this,"entries",e=>(e[1]=_r(this,e[1]),e))},every(e,t){return Hs(this,"every",e,t,void 0,arguments)},filter(e,t){return Hs(this,"filter",e,t,n=>n.map(i=>_r(this,i)),arguments)},find(e,t){return Hs(this,"find",e,t,n=>_r(this,n),arguments)},findIndex(e,t){return Hs(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Hs(this,"findLast",e,t,n=>_r(this,n),arguments)},findLastIndex(e,t){return Hs(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Hs(this,"forEach",e,t,void 0,arguments)},includes(...e){return Qm(this,"includes",e)},indexOf(...e){return Qm(this,"indexOf",e)},join(e){return Il(this).join(e)},lastIndexOf(...e){return Qm(this,"lastIndexOf",e)},map(e,t){return Hs(this,"map",e,t,void 0,arguments)},pop(){return Cu(this,"pop")},push(...e){return Cu(this,"push",e)},reduce(e,...t){return L0(this,"reduce",e,t)},reduceRight(e,...t){return L0(this,"reduceRight",e,t)},shift(){return Cu(this,"shift")},some(e,t){return Hs(this,"some",e,t,void 0,arguments)},splice(...e){return Cu(this,"splice",e)},toReversed(){return Il(this).toReversed()},toSorted(e){return Il(this).toSorted(e)},toSpliced(...e){return Il(this).toSpliced(...e)},unshift(...e){return Cu(this,"unshift",e)},values(){return Jm(this,"values",e=>_r(this,e))}};function Jm(e,t,n){const i=Uh(e),o=i[t]();return i!==e&&!li(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.done||(s.value=n(s.value)),s}),o}const zL=Array.prototype;function Hs(e,t,n,i,o,s){const r=Uh(e),a=r!==e&&!li(e),l=r[t];if(l!==zL[t]){const d=l.apply(e,s);return a?No(d):d}let c=n;r!==e&&(a?c=function(d,h){return n.call(this,_r(e,d),h,e)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,e)}));const u=l.call(r,c,i);return a&&o?o(u):u}function L0(e,t,n,i){const o=Uh(e);let s=n;return o!==e&&(li(e)?n.length>3&&(s=function(r,a,l){return n.call(this,r,a,l,e)}):s=function(r,a,l){return n.call(this,r,_r(e,a),l,e)}),o[t](s,...i)}function Qm(e,t,n){const i=St(e);Wn(i,"iterate",yu);const o=i[t](...n);return(o===-1||o===!1)&&Al(n[0])?(n[0]=St(n[0]),i[t](...n)):o}function Cu(e,t,n=[]){ko(),Km();const i=St(e)[t].apply(e,n);return qm(),Oo(),i}const jL=Ai("__proto__,__v_isRef,__isVue"),N0=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Bs));function KL(e){Bs(e)||(e=String(e));const t=St(this);return Wn(t,"has",e),t.hasOwnProperty(e)}class V0{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return i===(o?s?z0:U0:s?W0:$0).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const r=ft(t);if(!o){let l;if(r&&(l=UL[n]))return l;if(n==="hasOwnProperty")return KL}const a=Reflect.get(t,n,Zt(t)?t:i);if((Bs(n)?N0.has(n):jL(n))||(o||Wn(t,"get",n),s))return a;if(Zt(a)){const l=r&&Bh(n)?a:a.value;return o&&Ut(l)?qh(l):l}return Ut(a)?o?qh(a):Mo(a):a}}class B0 extends V0{constructor(t=!1){super(!1,t)}set(t,n,i,o){let s=t[n];const r=ft(t)&&Bh(n);if(!this._isShallow){const c=Lo(s);if(!li(i)&&!Lo(i)&&(s=St(s),i=St(i)),!r&&Zt(s)&&!Zt(i))return c?(M.env.NODE_ENV!=="production"&&Wi(`Set operation on key "${String(n)}" failed: target is readonly.`,t[n]),!0):(s.value=i,!0)}const a=r?Number(n)<t.length:Gt(t,n),l=Reflect.set(t,n,i,Zt(t)?t:o);return t===St(o)&&(a?wi(i,s)&&os(t,"set",n,i,s):os(t,"add",n,i)),l}deleteProperty(t,n){const i=Gt(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&i&&os(t,"delete",n,void 0,o),s}has(t,n){const i=Reflect.has(t,n);return(!Bs(n)||!N0.has(n))&&Wn(t,"has",n),i}ownKeys(t){return Wn(t,"iterate",ft(t)?"length":wa),Reflect.ownKeys(t)}}class H0 extends V0{constructor(t=!1){super(!0,t)}set(t,n){return M.env.NODE_ENV!=="production"&&Wi(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return M.env.NODE_ENV!=="production"&&Wi(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const qL=new B0,YL=new H0,ZL=new B0(!0),XL=new H0(!0),ev=e=>e,zh=e=>Reflect.getPrototypeOf(e);function JL(e,t,n){return function(...i){const o=this.__v_raw,s=St(o),r=va(s),a=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,c=o[e](...i),u=n?ev:t?kl:No;return!t&&Wn(s,"iterate",l?Xm:wa),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function jh(e){return function(...t){if(M.env.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";Wi(`${ya(e)} operation ${n}failed: target is readonly.`,St(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function QL(e,t){const n={get(o){const s=this.__v_raw,r=St(s),a=St(o);e||(wi(o,a)&&Wn(r,"get",o),Wn(r,"get",a));const{has:l}=zh(r),c=t?ev:e?kl:No;if(l.call(r,o))return c(s.get(o));if(l.call(r,a))return c(s.get(a));s!==r&&s.get(o)},get size(){const o=this.__v_raw;return!e&&Wn(St(o),"iterate",wa),o.size},has(o){const s=this.__v_raw,r=St(s),a=St(o);return e||(wi(o,a)&&Wn(r,"has",o),Wn(r,"has",a)),o===a?s.has(o):s.has(o)||s.has(a)},forEach(o,s){const r=this,a=r.__v_raw,l=St(a),c=t?ev:e?kl:No;return!e&&Wn(l,"iterate",wa),a.forEach((u,d)=>o.call(s,c(u),c(d),r))}};return un(n,e?{add:jh("add"),set:jh("set"),delete:jh("delete"),clear:jh("clear")}:{add(o){!t&&!li(o)&&!Lo(o)&&(o=St(o));const s=St(this);return zh(s).has.call(s,o)||(s.add(o),os(s,"add",o,o)),this},set(o,s){!t&&!li(s)&&!Lo(s)&&(s=St(s));const r=St(this),{has:a,get:l}=zh(r);let c=a.call(r,o);c?M.env.NODE_ENV!=="production"&&G0(r,a,o):(o=St(o),c=a.call(r,o));const u=l.call(r,o);return r.set(o,s),c?wi(s,u)&&os(r,"set",o,s,u):os(r,"add",o,s),this},delete(o){const s=St(this),{has:r,get:a}=zh(s);let l=r.call(s,o);l?M.env.NODE_ENV!=="production"&&G0(s,r,o):(o=St(o),l=r.call(s,o));const c=a?a.call(s,o):void 0,u=s.delete(o);return l&&os(s,"delete",o,void 0,c),u},clear(){const o=St(this),s=o.size!==0,r=M.env.NODE_ENV!=="production"?va(o)?new Map(o):new Set(o):void 0,a=o.clear();return s&&os(o,"clear",void 0,void 0,r),a}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=JL(o,e,t)}),n}function Kh(e,t){const n=QL(e,t);return(i,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?i:Reflect.get(Gt(n,o)&&o in i?n:i,o,s)}const eN={get:Kh(!1,!1)},tN={get:Kh(!1,!0)},nN={get:Kh(!0,!1)},iN={get:Kh(!0,!0)};function G0(e,t,n){const i=St(n);if(i!==n&&t.call(e,i)){const o=$m(e);Wi(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const $0=new WeakMap,W0=new WeakMap,U0=new WeakMap,z0=new WeakMap;function oN(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function sN(e){return e.__v_skip||!Object.isExtensible(e)?0:oN($m(e))}function Mo(e){return Lo(e)?e:Yh(e,!1,qL,eN,$0)}function rN(e){return Yh(e,!1,ZL,tN,W0)}function qh(e){return Yh(e,!0,YL,nN,U0)}function ss(e){return Yh(e,!0,XL,iN,z0)}function Yh(e,t,n,i,o){if(!Ut(e))return M.env.NODE_ENV!=="production"&&Wi(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=sN(e);if(s===0)return e;const r=o.get(e);if(r)return r;const a=new Proxy(e,s===2?i:n);return o.set(e,a),a}function ro(e){return Lo(e)?ro(e.__v_raw):!!(e&&e.__v_isReactive)}function Lo(e){return!!(e&&e.__v_isReadonly)}function li(e){return!!(e&&e.__v_isShallow)}function Al(e){return e?!!e.__v_raw:!1}function St(e){const t=e&&e.__v_raw;return t?St(t):e}function xr(e){return!Gt(e,"__v_skip")&&Object.isExtensible(e)&&Gh(e,"__v_skip",!0),e}const No=e=>Ut(e)?Mo(e):e,kl=e=>Ut(e)?qh(e):e;function Zt(e){return e?e.__v_isRef===!0:!1}function Y(e){return K0(e,!1)}function j0(e){return K0(e,!0)}function K0(e,t){return Zt(e)?e:new aN(e,t)}class aN{constructor(t,n){this.dep=new $h,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:St(t),this._value=n?t:No(t),this.__v_isShallow=n}get value(){return M.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||li(t)||Lo(t);t=i?t:St(t),wi(t,n)&&(this._rawValue=t,this._value=i?t:No(t),M.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function W(e){return Zt(e)?e.value:e}function ba(e){return yt(e)?e():W(e)}const lN={get:(e,t,n)=>t==="__v_raw"?e:W(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const o=e[t];return Zt(o)&&!Zt(n)?(o.value=n,!0):Reflect.set(e,t,n,i)}};function q0(e){return ro(e)?e:new Proxy(e,lN)}class cN{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new $h,{get:i,set:o}=t(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=o}get value(){return this._value=this._get()}set value(t){this._set(t)}}function uN(e){return new cN(e)}function tv(e){M.env.NODE_ENV!=="production"&&!Al(e)&&Wi("toRefs() expects a reactive object but received a plain one.");const t=ft(e)?new Array(e.length):{};for(const n in e)t[n]=Y0(e,n);return t}class dN{constructor(t,n,i){this._object=t,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._raw=St(t);let o=!0,s=t;if(!ft(t)||!Bh(String(n)))do o=!Al(s)||li(s);while(o&&(s=s.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=W(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Zt(this._raw[this._key])){const n=this._object[this._key];if(Zt(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return WL(this._raw,this._key)}}class hN{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Fr(e,t,n){return Zt(e)?e:yt(e)?new hN(e):Ut(e)&&arguments.length>1?Y0(e,t,n):Y(e)}function Y0(e,t,n){return new dN(e,t,n)}class fN{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new $h(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=vu-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Yt!==this)return T0(this,!0),!0;M.env.NODE_ENV}get value(){const t=M.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return A0(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):M.env.NODE_ENV!=="production"&&Wi("Write operation failed: computed value is readonly")}}function pN(e,t,n=!1){let i,o;yt(e)?i=e:(i=e.get,o=e.set);const s=new fN(i,o,n);return M.env.NODE_ENV,s}const Zh={},Xh=new WeakMap;let Sa;function gN(e,t=!1,n=Sa){if(n){let i=Xh.get(n);i||Xh.set(n,i=[]),i.push(e)}else M.env.NODE_ENV!=="production"&&!t&&Wi("onWatcherCleanup() was called when there was no active watcher to associate with.")}function mN(e,t,n=Lt){const{immediate:i,deep:o,once:s,scheduler:r,augmentJob:a,call:l}=n,c=R=>{(n.onWarn||Wi)("Invalid watch source: ",R,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},u=R=>o?R:li(R)||o===!1||o===0?Gs(R,1):Gs(R);let d,h,f,g,m=!1,y=!1;if(Zt(e)?(h=()=>e.value,m=li(e)):ro(e)?(h=()=>u(e),m=!0):ft(e)?(y=!0,m=e.some(R=>ro(R)||li(R)),h=()=>e.map(R=>{if(Zt(R))return R.value;if(ro(R))return u(R);if(yt(R))return l?l(R,2):R();M.env.NODE_ENV!=="production"&&c(R)})):yt(e)?t?h=l?()=>l(e,2):e:h=()=>{if(f){ko();try{f()}finally{Oo()}}const R=Sa;Sa=d;try{return l?l(e,3,[g]):e(g)}finally{Sa=R}}:(h=Vn,M.env.NODE_ENV!=="production"&&c(e)),t&&o){const R=h,E=o===!0?1/0:o;h=()=>Gs(R(),E)}const b=_0(),S=()=>{d.stop(),b&&b.active&&Hm(b.effects,d)};if(s&&t){const R=t;t=(...E)=>{R(...E),S()}}let F=y?new Array(e.length).fill(Zh):Zh;const C=R=>{if(!(!(d.flags&1)||!d.dirty&&!R))if(t){const E=d.run();if(o||m||(y?E.some((x,k)=>wi(x,F[k])):wi(E,F))){f&&f();const x=Sa;Sa=d;try{const k=[E,F===Zh?void 0:y&&F[0]===Zh?[]:F,g];F=E,l?l(t,3,k):t(...k)}finally{Sa=x}}}else d.run()};return a&&a(C),d=new x0(h),d.scheduler=r?()=>r(C,!1):C,g=R=>gN(R,!1,d),f=d.onStop=()=>{const R=Xh.get(d);if(R){if(l)l(R,4);else for(const E of R)E();Xh.delete(d)}},M.env.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?i?C(!0):F=d.run():r?r(C.bind(null,!0),!0):d.run(),S.pause=d.pause.bind(d),S.resume=d.resume.bind(d),S.stop=S,S}function Gs(e,t=1/0,n){if(t<=0||!Ut(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Zt(e))Gs(e.value,t,n);else if(ft(e))for(let i=0;i<e.length;i++)Gs(e[i],t,n);else if(v0(e)||va(e))e.forEach(i=>{Gs(i,t,n)});else if(C0(e)){for(const i in e)Gs(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&Gs(e[i],t,n)}return e}/**
9
+ **/function Wi(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let ai;class R0{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ai,!t&&ai&&(this.index=(ai.scopes||(ai.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=ai;try{return ai=this,t()}finally{ai=n}}else M.env.NODE_ENV!=="production"&&Wi("cannot run an inactive effect scope.")}on(){++this._on===1&&(this.prevScope=ai,ai=this)}off(){this._on>0&&--this._on===0&&(ai=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function D0(e){return new R0(e)}function _0(){return ai}function HL(e,t=!1){ai?ai.cleanups.push(e):M.env.NODE_ENV!=="production"&&!t&&Wi("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Yt;const jm=new WeakSet;class x0{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ai&&ai.active&&ai.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,jm.has(this)&&(jm.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||T0(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,O0(this),P0(this);const t=Yt,n=Ao;Yt=this,Ao=!0;try{return this.fn()}finally{M.env.NODE_ENV!=="production"&&Yt!==this&&Wi("Active effect was not restored correctly - this is likely a Vue internal bug."),I0(this),Yt=t,Ao=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Zm(t);this.deps=this.depsTail=void 0,O0(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?jm.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ym(this)&&this.run()}get dirty(){return Ym(this)}}let F0=0,gu,mu;function T0(e,t=!1){if(e.flags|=8,t){e.next=mu,mu=e;return}e.next=gu,gu=e}function Km(){F0++}function qm(){if(--F0>0)return;if(mu){let t=mu;for(mu=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;gu;){let t=gu;for(gu=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function P0(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function I0(e){let t,n=e.depsTail,i=n;for(;i;){const o=i.prevDep;i.version===-1?(i===n&&(n=o),Zm(i),GL(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=o}e.deps=t,e.depsTail=n}function Ym(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(A0(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function A0(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===vu)||(e.globalVersion=vu,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ym(e))))return;e.flags|=2;const t=e.dep,n=Yt,i=Ao;Yt=e,Ao=!0;try{P0(e);const o=e.fn(e._value);(t.version===0||wi(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Yt=n,Ao=i,I0(e),e.flags&=-3}}function Zm(e,t=!1){const{dep:n,prevSub:i,nextSub:o}=e;if(i&&(i.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=i,e.nextSub=void 0),M.env.NODE_ENV!=="production"&&n.subsHead===e&&(n.subsHead=o),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)Zm(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function GL(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ao=!0;const k0=[];function ko(){k0.push(Ao),Ao=!1}function Oo(){const e=k0.pop();Ao=e===void 0?!0:e}function O0(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Yt;Yt=void 0;try{t()}finally{Yt=n}}}let vu=0;class $L{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class $h{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,M.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!Yt||!Ao||Yt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Yt)n=this.activeLink=new $L(Yt,this),Yt.deps?(n.prevDep=Yt.depsTail,Yt.depsTail.nextDep=n,Yt.depsTail=n):Yt.deps=Yt.depsTail=n,M0(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Yt.depsTail,n.nextDep=void 0,Yt.depsTail.nextDep=n,Yt.depsTail=n,Yt.deps===n&&(Yt.deps=i)}return M.env.NODE_ENV!=="production"&&Yt.onTrack&&Yt.onTrack(un({effect:Yt},t)),n}trigger(t){this.version++,vu++,this.notify(t)}notify(t){Km();try{if(M.env.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(un({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{qm()}}}function M0(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)M0(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),M.env.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const Wh=new WeakMap,wa=Symbol(M.env.NODE_ENV!=="production"?"Object iterate":""),Xm=Symbol(M.env.NODE_ENV!=="production"?"Map keys iterate":""),yu=Symbol(M.env.NODE_ENV!=="production"?"Array iterate":"");function Wn(e,t,n){if(Ao&&Yt){let i=Wh.get(e);i||Wh.set(e,i=new Map);let o=i.get(n);o||(i.set(n,o=new $h),o.map=i,o.key=n),M.env.NODE_ENV!=="production"?o.track({target:e,type:t,key:n}):o.track()}}function os(e,t,n,i,o,s){const r=Wh.get(e);if(!r){vu++;return}const a=l=>{l&&(M.env.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:i,oldValue:o,oldTarget:s}):l.trigger())};if(Km(),t==="clear")r.forEach(a);else{const l=ft(e),c=l&&Bh(n);if(l&&n==="length"){const u=Number(i);r.forEach((d,h)=>{(h==="length"||h===yu||!Bs(h)&&h>=u)&&a(d)})}else switch((n!==void 0||r.has(void 0))&&a(r.get(n)),c&&a(r.get(yu)),t){case"add":l?c&&a(r.get("length")):(a(r.get(wa)),va(e)&&a(r.get(Xm)));break;case"delete":l||(a(r.get(wa)),va(e)&&a(r.get(Xm)));break;case"set":va(e)&&a(r.get(wa));break}}qm()}function WL(e,t){const n=Wh.get(e);return n&&n.get(t)}function Il(e){const t=St(e);return t===e?t:(Wn(t,"iterate",yu),li(e)?t:t.map(No))}function Uh(e){return Wn(e=St(e),"iterate",yu),e}function _r(e,t){return Lo(e)?ro(e)?kl(No(t)):kl(t):No(t)}const UL={__proto__:null,[Symbol.iterator](){return Jm(this,Symbol.iterator,e=>_r(this,e))},concat(...e){return Il(this).concat(...e.map(t=>ft(t)?Il(t):t))},entries(){return Jm(this,"entries",e=>(e[1]=_r(this,e[1]),e))},every(e,t){return Hs(this,"every",e,t,void 0,arguments)},filter(e,t){return Hs(this,"filter",e,t,n=>n.map(i=>_r(this,i)),arguments)},find(e,t){return Hs(this,"find",e,t,n=>_r(this,n),arguments)},findIndex(e,t){return Hs(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Hs(this,"findLast",e,t,n=>_r(this,n),arguments)},findLastIndex(e,t){return Hs(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Hs(this,"forEach",e,t,void 0,arguments)},includes(...e){return Qm(this,"includes",e)},indexOf(...e){return Qm(this,"indexOf",e)},join(e){return Il(this).join(e)},lastIndexOf(...e){return Qm(this,"lastIndexOf",e)},map(e,t){return Hs(this,"map",e,t,void 0,arguments)},pop(){return Cu(this,"pop")},push(...e){return Cu(this,"push",e)},reduce(e,...t){return L0(this,"reduce",e,t)},reduceRight(e,...t){return L0(this,"reduceRight",e,t)},shift(){return Cu(this,"shift")},some(e,t){return Hs(this,"some",e,t,void 0,arguments)},splice(...e){return Cu(this,"splice",e)},toReversed(){return Il(this).toReversed()},toSorted(e){return Il(this).toSorted(e)},toSpliced(...e){return Il(this).toSpliced(...e)},unshift(...e){return Cu(this,"unshift",e)},values(){return Jm(this,"values",e=>_r(this,e))}};function Jm(e,t,n){const i=Uh(e),o=i[t]();return i!==e&&!li(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.done||(s.value=n(s.value)),s}),o}const zL=Array.prototype;function Hs(e,t,n,i,o,s){const r=Uh(e),a=r!==e&&!li(e),l=r[t];if(l!==zL[t]){const d=l.apply(e,s);return a?No(d):d}let c=n;r!==e&&(a?c=function(d,h){return n.call(this,_r(e,d),h,e)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,e)}));const u=l.call(r,c,i);return a&&o?o(u):u}function L0(e,t,n,i){const o=Uh(e);let s=n;return o!==e&&(li(e)?n.length>3&&(s=function(r,a,l){return n.call(this,r,a,l,e)}):s=function(r,a,l){return n.call(this,r,_r(e,a),l,e)}),o[t](s,...i)}function Qm(e,t,n){const i=St(e);Wn(i,"iterate",yu);const o=i[t](...n);return(o===-1||o===!1)&&Al(n[0])?(n[0]=St(n[0]),i[t](...n)):o}function Cu(e,t,n=[]){ko(),Km();const i=St(e)[t].apply(e,n);return qm(),Oo(),i}const jL=Ai("__proto__,__v_isRef,__isVue"),N0=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Bs));function KL(e){Bs(e)||(e=String(e));const t=St(this);return Wn(t,"has",e),t.hasOwnProperty(e)}class V0{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return i===(o?s?z0:U0:s?W0:$0).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const r=ft(t);if(!o){let l;if(r&&(l=UL[n]))return l;if(n==="hasOwnProperty")return KL}const a=Reflect.get(t,n,Zt(t)?t:i);if((Bs(n)?N0.has(n):jL(n))||(o||Wn(t,"get",n),s))return a;if(Zt(a)){const l=r&&Bh(n)?a:a.value;return o&&Ut(l)?qh(l):l}return Ut(a)?o?qh(a):Mo(a):a}}class B0 extends V0{constructor(t=!1){super(!1,t)}set(t,n,i,o){let s=t[n];const r=ft(t)&&Bh(n);if(!this._isShallow){const c=Lo(s);if(!li(i)&&!Lo(i)&&(s=St(s),i=St(i)),!r&&Zt(s)&&!Zt(i))return c?(M.env.NODE_ENV!=="production"&&Wi(`Set operation on key "${String(n)}" failed: target is readonly.`,t[n]),!0):(s.value=i,!0)}const a=r?Number(n)<t.length:Gt(t,n),l=Reflect.set(t,n,i,Zt(t)?t:o);return t===St(o)&&(a?wi(i,s)&&os(t,"set",n,i,s):os(t,"add",n,i)),l}deleteProperty(t,n){const i=Gt(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&i&&os(t,"delete",n,void 0,o),s}has(t,n){const i=Reflect.has(t,n);return(!Bs(n)||!N0.has(n))&&Wn(t,"has",n),i}ownKeys(t){return Wn(t,"iterate",ft(t)?"length":wa),Reflect.ownKeys(t)}}class H0 extends V0{constructor(t=!1){super(!0,t)}set(t,n){return M.env.NODE_ENV!=="production"&&Wi(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return M.env.NODE_ENV!=="production"&&Wi(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const qL=new B0,YL=new H0,ZL=new B0(!0),XL=new H0(!0),ev=e=>e,zh=e=>Reflect.getPrototypeOf(e);function JL(e,t,n){return function(...i){const o=this.__v_raw,s=St(o),r=va(s),a=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,c=o[e](...i),u=n?ev:t?kl:No;return!t&&Wn(s,"iterate",l?Xm:wa),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function jh(e){return function(...t){if(M.env.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";Wi(`${ya(e)} operation ${n}failed: target is readonly.`,St(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function QL(e,t){const n={get(o){const s=this.__v_raw,r=St(s),a=St(o);e||(wi(o,a)&&Wn(r,"get",o),Wn(r,"get",a));const{has:l}=zh(r),c=t?ev:e?kl:No;if(l.call(r,o))return c(s.get(o));if(l.call(r,a))return c(s.get(a));s!==r&&s.get(o)},get size(){const o=this.__v_raw;return!e&&Wn(St(o),"iterate",wa),o.size},has(o){const s=this.__v_raw,r=St(s),a=St(o);return e||(wi(o,a)&&Wn(r,"has",o),Wn(r,"has",a)),o===a?s.has(o):s.has(o)||s.has(a)},forEach(o,s){const r=this,a=r.__v_raw,l=St(a),c=t?ev:e?kl:No;return!e&&Wn(l,"iterate",wa),a.forEach((u,d)=>o.call(s,c(u),c(d),r))}};return un(n,e?{add:jh("add"),set:jh("set"),delete:jh("delete"),clear:jh("clear")}:{add(o){!t&&!li(o)&&!Lo(o)&&(o=St(o));const s=St(this);return zh(s).has.call(s,o)||(s.add(o),os(s,"add",o,o)),this},set(o,s){!t&&!li(s)&&!Lo(s)&&(s=St(s));const r=St(this),{has:a,get:l}=zh(r);let c=a.call(r,o);c?M.env.NODE_ENV!=="production"&&G0(r,a,o):(o=St(o),c=a.call(r,o));const u=l.call(r,o);return r.set(o,s),c?wi(s,u)&&os(r,"set",o,s,u):os(r,"add",o,s),this},delete(o){const s=St(this),{has:r,get:a}=zh(s);let l=r.call(s,o);l?M.env.NODE_ENV!=="production"&&G0(s,r,o):(o=St(o),l=r.call(s,o));const c=a?a.call(s,o):void 0,u=s.delete(o);return l&&os(s,"delete",o,void 0,c),u},clear(){const o=St(this),s=o.size!==0,r=M.env.NODE_ENV!=="production"?va(o)?new Map(o):new Set(o):void 0,a=o.clear();return s&&os(o,"clear",void 0,void 0,r),a}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=JL(o,e,t)}),n}function Kh(e,t){const n=QL(e,t);return(i,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?i:Reflect.get(Gt(n,o)&&o in i?n:i,o,s)}const eN={get:Kh(!1,!1)},tN={get:Kh(!1,!0)},nN={get:Kh(!0,!1)},iN={get:Kh(!0,!0)};function G0(e,t,n){const i=St(n);if(i!==n&&t.call(e,i)){const o=$m(e);Wi(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const $0=new WeakMap,W0=new WeakMap,U0=new WeakMap,z0=new WeakMap;function oN(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function sN(e){return e.__v_skip||!Object.isExtensible(e)?0:oN($m(e))}function Mo(e){return Lo(e)?e:Yh(e,!1,qL,eN,$0)}function rN(e){return Yh(e,!1,ZL,tN,W0)}function qh(e){return Yh(e,!0,YL,nN,U0)}function ss(e){return Yh(e,!0,XL,iN,z0)}function Yh(e,t,n,i,o){if(!Ut(e))return M.env.NODE_ENV!=="production"&&Wi(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=sN(e);if(s===0)return e;const r=o.get(e);if(r)return r;const a=new Proxy(e,s===2?i:n);return o.set(e,a),a}function ro(e){return Lo(e)?ro(e.__v_raw):!!(e&&e.__v_isReactive)}function Lo(e){return!!(e&&e.__v_isReadonly)}function li(e){return!!(e&&e.__v_isShallow)}function Al(e){return e?!!e.__v_raw:!1}function St(e){const t=e&&e.__v_raw;return t?St(t):e}function xr(e){return!Gt(e,"__v_skip")&&Object.isExtensible(e)&&Gh(e,"__v_skip",!0),e}const No=e=>Ut(e)?Mo(e):e,kl=e=>Ut(e)?qh(e):e;function Zt(e){return e?e.__v_isRef===!0:!1}function Y(e){return K0(e,!1)}function j0(e){return K0(e,!0)}function K0(e,t){return Zt(e)?e:new aN(e,t)}class aN{constructor(t,n){this.dep=new $h,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:St(t),this._value=n?t:No(t),this.__v_isShallow=n}get value(){return M.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||li(t)||Lo(t);t=i?t:St(t),wi(t,n)&&(this._rawValue=t,this._value=i?t:No(t),M.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function U(e){return Zt(e)?e.value:e}function ba(e){return yt(e)?e():U(e)}const lN={get:(e,t,n)=>t==="__v_raw"?e:U(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const o=e[t];return Zt(o)&&!Zt(n)?(o.value=n,!0):Reflect.set(e,t,n,i)}};function q0(e){return ro(e)?e:new Proxy(e,lN)}class cN{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new $h,{get:i,set:o}=t(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=o}get value(){return this._value=this._get()}set value(t){this._set(t)}}function uN(e){return new cN(e)}function tv(e){M.env.NODE_ENV!=="production"&&!Al(e)&&Wi("toRefs() expects a reactive object but received a plain one.");const t=ft(e)?new Array(e.length):{};for(const n in e)t[n]=Y0(e,n);return t}class dN{constructor(t,n,i){this._object=t,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._raw=St(t);let o=!0,s=t;if(!ft(t)||!Bh(String(n)))do o=!Al(s)||li(s);while(o&&(s=s.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=U(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Zt(this._raw[this._key])){const n=this._object[this._key];if(Zt(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return WL(this._raw,this._key)}}class hN{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Fr(e,t,n){return Zt(e)?e:yt(e)?new hN(e):Ut(e)&&arguments.length>1?Y0(e,t,n):Y(e)}function Y0(e,t,n){return new dN(e,t,n)}class fN{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new $h(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=vu-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Yt!==this)return T0(this,!0),!0;M.env.NODE_ENV}get value(){const t=M.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return A0(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):M.env.NODE_ENV!=="production"&&Wi("Write operation failed: computed value is readonly")}}function pN(e,t,n=!1){let i,o;yt(e)?i=e:(i=e.get,o=e.set);const s=new fN(i,o,n);return M.env.NODE_ENV,s}const Zh={},Xh=new WeakMap;let Sa;function gN(e,t=!1,n=Sa){if(n){let i=Xh.get(n);i||Xh.set(n,i=[]),i.push(e)}else M.env.NODE_ENV!=="production"&&!t&&Wi("onWatcherCleanup() was called when there was no active watcher to associate with.")}function mN(e,t,n=Lt){const{immediate:i,deep:o,once:s,scheduler:r,augmentJob:a,call:l}=n,c=R=>{(n.onWarn||Wi)("Invalid watch source: ",R,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},u=R=>o?R:li(R)||o===!1||o===0?Gs(R,1):Gs(R);let d,h,f,g,m=!1,y=!1;if(Zt(e)?(h=()=>e.value,m=li(e)):ro(e)?(h=()=>u(e),m=!0):ft(e)?(y=!0,m=e.some(R=>ro(R)||li(R)),h=()=>e.map(R=>{if(Zt(R))return R.value;if(ro(R))return u(R);if(yt(R))return l?l(R,2):R();M.env.NODE_ENV!=="production"&&c(R)})):yt(e)?t?h=l?()=>l(e,2):e:h=()=>{if(f){ko();try{f()}finally{Oo()}}const R=Sa;Sa=d;try{return l?l(e,3,[g]):e(g)}finally{Sa=R}}:(h=Vn,M.env.NODE_ENV!=="production"&&c(e)),t&&o){const R=h,E=o===!0?1/0:o;h=()=>Gs(R(),E)}const b=_0(),S=()=>{d.stop(),b&&b.active&&Hm(b.effects,d)};if(s&&t){const R=t;t=(...E)=>{R(...E),S()}}let F=y?new Array(e.length).fill(Zh):Zh;const C=R=>{if(!(!(d.flags&1)||!d.dirty&&!R))if(t){const E=d.run();if(o||m||(y?E.some((x,k)=>wi(x,F[k])):wi(E,F))){f&&f();const x=Sa;Sa=d;try{const k=[E,F===Zh?void 0:y&&F[0]===Zh?[]:F,g];F=E,l?l(t,3,k):t(...k)}finally{Sa=x}}}else d.run()};return a&&a(C),d=new x0(h),d.scheduler=r?()=>r(C,!1):C,g=R=>gN(R,!1,d),f=d.onStop=()=>{const R=Xh.get(d);if(R){if(l)l(R,4);else for(const E of R)E();Xh.delete(d)}},M.env.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?i?C(!0):F=d.run():r?r(C.bind(null,!0),!0):d.run(),S.pause=d.pause.bind(d),S.resume=d.resume.bind(d),S.stop=S,S}function Gs(e,t=1/0,n){if(t<=0||!Ut(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Zt(e))Gs(e.value,t,n);else if(ft(e))for(let i=0;i<e.length;i++)Gs(e[i],t,n);else if(v0(e)||va(e))e.forEach(i=>{Gs(i,t,n)});else if(C0(e)){for(const i in e)Gs(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&Gs(e[i],t,n)}return e}/**
10
10
  * @vue/runtime-core v3.5.25
11
11
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
12
  * @license MIT
@@ -46,7 +46,7 @@ Expected function or array of functions, received type ${typeof e}.`),Vn)}functi
46
46
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
47
47
 
48
48
  `,`1) content: element.innerHTML
49
- `,"2) content: () => element.cloneNode(true)"].join(" "))}var a=o.reduce(function(l,c){var u=c&&CH(c,i);return u&&l.push(u),l},[]);return Uu(e)?a[0]:a}Or.defaultProps=ji,Or.setDefaultProps=gH,Or.currentInput=fs,Object.assign({},UR,{effect:function(t){var n=t.state,i={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,i.popper),n.styles=i,n.elements.arrow&&Object.assign(n.elements.arrow.style,i.arrow)}}),Or.setDefaultProps({render:_D});const xD={arrow:!0,allowHTML:!0,interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,theme:"light",hideOnClick:!1},FD={...xD,maxWidth:"none"};function TD(e,t){const n=Or(e,{...xD,...t});return Array.isArray(n)?n[0]:n}function Of(e){if(e)try{e.destroy()}catch(t){console.warn("Error destroying tippy instance:",t)}}function wH(e,t){if(!t)return;(Array.isArray(t)?t:[t]).forEach(i=>{i!=null&&i.trim()&&e.classList.add(i.trim())})}function ay(e){if(e.childNodes.length===1&&e.childNodes[0].nodeType===Node.TEXT_NODE){const n=e.scrollWidth>e.offsetWidth;return e.classList.toggle("arbo-tooltip-text-truncated",n),n}return!0}const Mf={placement:"top",trigger:"mouseenter focus",hideOnClick:!1,delay:[1e3,0],theme:"arbo",contentClass:"extra-padding",bypassOverflowCheck:!0,content:""},PD=(e,t)=>{if(!t||!e.popper)return;const n=e.popper.querySelector(".tippy-content");n&&wH(n,t)},ID=(e,t,n)=>typeof n=="string"?!0:t===!0||ay(e),AD=(e,t)=>{let n={...Mf};typeof t=="string"?n.content=String(t):n={...Mf,...t};const i=ay(e),o=typeof n=="object"?n.bypassOverflowCheck:!1;i&&!o&&(n.delay=[1e3,100]);const s={...FD,appendTo:e.ownerDocument.body,content:n.content,placement:n.placement,trigger:n.trigger,hideOnClick:n.hideOnClick,delay:n.delay,theme:n.theme||"arbo",interactive:!0,onShow(r){PD(r,n.contentClass)},onHide(r){}};return TD(e,s)},bH=(e,t)=>{let n={...Mf};typeof t=="string"?n.content=String(t):n={...Mf,...t};const i=ay(e),o=typeof n=="object"?n.bypassOverflowCheck:!1;i&&!o&&(n.delay=[1e3,100]),e._tooltipInstance?e._tooltipInstance.setProps({appendTo:e.ownerDocument.body,content:n.content,placement:n.placement,trigger:n.trigger,hideOnClick:n.hideOnClick,delay:n.delay,theme:n.theme||"arbo",onShow(s){PD(s,n.contentClass)}}):e._tooltipInstance=AD(e,n)},mn={mounted(e,t){e.classList.add("arbo-tooltip-wrapper");const n=t.value;(typeof n=="string"?n:n!=null&&n.content)&&Xt(()=>{ID(e,typeof n=="object"?n.bypassOverflowCheck:void 0,n)&&(e._tooltipInstance=AD(e,n)),(typeof n=="object"&&n.trigger?n.trigger:"mouseenter focus").split(" ").map(a=>a.trim()).filter(Boolean).forEach(a=>{let l=a;if(a==="mouseenter"&&(l="mouseenter"),a==="focus"&&(l="focus"),a==="click"&&(l="click"),a==="manual")return;const c=u=>{};e.addEventListener(l,c)})})},updated(e,t){Xt(()=>{const n=t.value;if(!ID(e,typeof n=="object"?n.bypassOverflowCheck:void 0,n)){Of(e._tooltipInstance),delete e._tooltipInstance;return}t.value!==t.oldValue&&(typeof n=="string"?n:n!=null&&n.content)&&bH(e,n)})},beforeUnmount(e){Of(e._tooltipInstance),delete e._tooltipInstance},unmounted(e){Of(e._tooltipInstance),delete e._tooltipInstance}};function SH(e,t,n){const i=document.createElement("div");i.className=n;const o=LR(e,t);return o.mount(i),{container:i,app:o}}function Lf(e){if(!e)return;const t=e._vueApp;if(t)try{t.unmount(),delete e._vueApp}catch(n){console.warn("Error unmounting Vue app:",n)}}function EH(e,t){e._vueApp=t}const RH=e=>{const{container:t,app:n}=SH(V8,{user:e.user,status:e.status,timezone:e.timezone,userConfig:e.userConfig,showInsightButton:e.showInsightButton,showCopyLinkButton:e.showCopyLinkButton,apiUpdateFunction:e.apiUpdateFunction,refreshInterval:e.refreshInterval,enableAutoRefresh:e.enableAutoRefresh,onInsightClick:e.onInsightClick,onCopyLink:e.onCopyLink},"user-profile-tooltip-content");return EH(t,n),t},kD=e=>{e._userProfileContainer&&(Lf(e._userProfileContainer),delete e._userProfileContainer),e._userProfileInstance&&(Of(e._userProfileInstance),delete e._userProfileInstance),e.style.cursor="",e.classList.remove("user-profile-trigger")},OD={mounted(e,t){var i;if(!((i=t.value)!=null&&i.user)){console.warn("[UserProfile] User data is required");return}const n=t.value;e._userProfileInstance=TD(e,{...FD,delay:[1e3,0],content:n.user.name||"User",placement:n.placement||"bottom-start",trigger:"mouseenter focus",onShow(o){e._userProfileContainer&&Lf(e._userProfileContainer);const s=RH(n);e._userProfileContainer=s,o.setContent(s)},onHidden(){setTimeout(()=>{e._userProfileContainer&&(Lf(e._userProfileContainer),e._userProfileContainer=void 0)},200)},onDestroy(){e._userProfileContainer&&(Lf(e._userProfileContainer),e._userProfileContainer=void 0)}}),e._userProfileInstance.enable(),e.classList.add("user-profile-trigger")},updated(e,t){var n;if(!(!((n=t.value)!=null&&n.user)||!e._userProfileInstance)&&t.value!==t.oldValue)try{e._userProfileInstance.setProps({placement:t.value.placement||"bottom-start"}),e._userProfileInstance.hide()}catch(i){console.warn("Error updating tooltip props:",i)}},beforeUnmount(e){kD(e)},unmounted(e){kD(e)}},DH=["type","disabled","aria-readonly"],_H={key:0},xH=ct({__name:"Button",props:{label:{default:""},variant:{default:"primary"},size:{default:"default"},disabled:{type:Boolean,default:!1},type:{default:"button"},rounded:{type:Boolean},highlightOnHover:{type:Boolean},border:{type:Boolean},action:{},readOnly:{type:Boolean,default:!1},actived:{type:Boolean,default:!1},loading:{type:Boolean}},emits:["handleClick"],setup(e,{emit:t}){const n=mn,i=e,o=t,s=["primary","secondary","tertiary","text","menu-item"],r=q(()=>Array.isArray(i.variant)?i.variant:[i.variant]),a=_f(),l=q(()=>{const m=[a.customButton],y=r.value.find(b=>s.includes(b))||"primary";return m.push(a[`is-${y}`]),r.value.includes("danger")&&m.push(a["is-danger"]),r.value.includes("icon")&&m.push(a["is-icon"]),i.readOnly&&m.push(a["is-readonly"]),i.rounded&&m.push(a["is-rounded"]),i.border&&m.push(a["has-border"]),i.highlightOnHover&&m.push(a["highlight-on-hover"]),f.value&&m.push(a["has-prefix"]),g.value&&m.push(a["has-suffix"]),i.actived&&m.push(a["is-active"]),i.disabled&&m.push(a.disabled),i.loading&&m.push(a["is-loading"]),typeof i.size=="string"&&m.push(a[`size-${i.size}`]),m}),c=q(()=>i.readOnly===!0),u=q(()=>typeof i.size=="number"?{"--button-size":`${i.size}px`}:{}),d=m=>{var y;i.disabled||i.readOnly||(o("handleClick",m),(y=i.action)==null||y.call(i))},h=yv(),f=q(()=>!!h.prefix),g=q(()=>!!h.suffix);return(m,y)=>(K(),Ce("button",{class:z(l.value),type:i.type,disabled:i.disabled,"aria-readonly":c.value,style:gn(u.value),onClick:d},[_t(m.$slots,"prefix"),_t(m.$slots,"default",{},()=>[e.label?ot((K(),Ce("span",_H,[dt(bt(e.label),1)])),[[W(n),{content:e.label}]]):it("",!0)]),_t(m.$slots,"suffix")],14,DH))}}),FH={customButton:"_customButton_1urqu_1","size-extra-small":"_size-extra-small_1urqu_22","size-small":"_size-small_1urqu_27","size-medium":"_size-medium_1urqu_32","size-large":"_size-large_1urqu_37","size-default":"_size-default_1urqu_42","is-primary":"_is-primary_1urqu_45","is-active":"_is-active_1urqu_53","is-danger":"_is-danger_1urqu_56","is-secondary":"_is-secondary_1urqu_65","is-tertiary":"_is-tertiary_1urqu_89","is-text":"_is-text_1urqu_109","is-menu-item":"_is-menu-item_1urqu_126","is-icon":"_is-icon_1urqu_158","is-readonly":"_is-readonly_1urqu_179","is-rounded":"_is-rounded_1urqu_183","has-border":"_has-border_1urqu_186","highlight-on-hover":"_highlight-on-hover_1urqu_189","icon-wrapper":"_icon-wrapper_1urqu_189","is-loading":"_is-loading_1urqu_192",spin:"_spin_1urqu_1"},Ct=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},pt=Ct(xH,[["__cssModules",{$style:FH}]]);/*!
49
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var a=o.reduce(function(l,c){var u=c&&CH(c,i);return u&&l.push(u),l},[]);return Uu(e)?a[0]:a}Or.defaultProps=ji,Or.setDefaultProps=gH,Or.currentInput=fs,Object.assign({},UR,{effect:function(t){var n=t.state,i={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,i.popper),n.styles=i,n.elements.arrow&&Object.assign(n.elements.arrow.style,i.arrow)}}),Or.setDefaultProps({render:_D});const xD={arrow:!0,allowHTML:!0,interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,theme:"light",hideOnClick:!1},FD={...xD,maxWidth:"none"};function TD(e,t){const n=Or(e,{...xD,...t});return Array.isArray(n)?n[0]:n}function Of(e){if(e)try{e.destroy()}catch(t){console.warn("Error destroying tippy instance:",t)}}function wH(e,t){if(!t)return;(Array.isArray(t)?t:[t]).forEach(i=>{i!=null&&i.trim()&&e.classList.add(i.trim())})}function ay(e){if(e.childNodes.length===1&&e.childNodes[0].nodeType===Node.TEXT_NODE){const n=e.scrollWidth>e.offsetWidth;return e.classList.toggle("arbo-tooltip-text-truncated",n),n}return!0}const Mf={placement:"top",trigger:"mouseenter focus",hideOnClick:!1,delay:[1e3,0],theme:"arbo",contentClass:"extra-padding",bypassOverflowCheck:!0,content:""},PD=(e,t)=>{if(!t||!e.popper)return;const n=e.popper.querySelector(".tippy-content");n&&wH(n,t)},ID=(e,t,n)=>typeof n=="string"?!0:t===!0||ay(e),AD=(e,t)=>{let n={...Mf};typeof t=="string"?n.content=String(t):n={...Mf,...t};const i=ay(e),o=typeof n=="object"?n.bypassOverflowCheck:!1;i&&!o&&(n.delay=[1e3,100]);const s={...FD,appendTo:e.ownerDocument.body,content:n.content,placement:n.placement,trigger:n.trigger,hideOnClick:n.hideOnClick,delay:n.delay,theme:n.theme||"arbo",interactive:!0,onShow(r){PD(r,n.contentClass)},onHide(r){}};return TD(e,s)},bH=(e,t)=>{let n={...Mf};typeof t=="string"?n.content=String(t):n={...Mf,...t};const i=ay(e),o=typeof n=="object"?n.bypassOverflowCheck:!1;i&&!o&&(n.delay=[1e3,100]),e._tooltipInstance?e._tooltipInstance.setProps({appendTo:e.ownerDocument.body,content:n.content,placement:n.placement,trigger:n.trigger,hideOnClick:n.hideOnClick,delay:n.delay,theme:n.theme||"arbo",onShow(s){PD(s,n.contentClass)}}):e._tooltipInstance=AD(e,n)},mn={mounted(e,t){e.classList.add("arbo-tooltip-wrapper");const n=t.value;(typeof n=="string"?n:n!=null&&n.content)&&Xt(()=>{ID(e,typeof n=="object"?n.bypassOverflowCheck:void 0,n)&&(e._tooltipInstance=AD(e,n)),(typeof n=="object"&&n.trigger?n.trigger:"mouseenter focus").split(" ").map(a=>a.trim()).filter(Boolean).forEach(a=>{let l=a;if(a==="mouseenter"&&(l="mouseenter"),a==="focus"&&(l="focus"),a==="click"&&(l="click"),a==="manual")return;const c=u=>{};e.addEventListener(l,c)})})},updated(e,t){Xt(()=>{const n=t.value;if(!ID(e,typeof n=="object"?n.bypassOverflowCheck:void 0,n)){Of(e._tooltipInstance),delete e._tooltipInstance;return}t.value!==t.oldValue&&(typeof n=="string"?n:n!=null&&n.content)&&bH(e,n)})},beforeUnmount(e){Of(e._tooltipInstance),delete e._tooltipInstance},unmounted(e){Of(e._tooltipInstance),delete e._tooltipInstance}};function SH(e,t,n){const i=document.createElement("div");i.className=n;const o=LR(e,t);return o.mount(i),{container:i,app:o}}function Lf(e){if(!e)return;const t=e._vueApp;if(t)try{t.unmount(),delete e._vueApp}catch(n){console.warn("Error unmounting Vue app:",n)}}function EH(e,t){e._vueApp=t}const RH=e=>{const{container:t,app:n}=SH(V8,{user:e.user,status:e.status,timezone:e.timezone,userConfig:e.userConfig,showInsightButton:e.showInsightButton,showCopyLinkButton:e.showCopyLinkButton,apiUpdateFunction:e.apiUpdateFunction,refreshInterval:e.refreshInterval,enableAutoRefresh:e.enableAutoRefresh,onInsightClick:e.onInsightClick,onCopyLink:e.onCopyLink},"user-profile-tooltip-content");return EH(t,n),t},kD=e=>{e._userProfileContainer&&(Lf(e._userProfileContainer),delete e._userProfileContainer),e._userProfileInstance&&(Of(e._userProfileInstance),delete e._userProfileInstance),e.style.cursor="",e.classList.remove("user-profile-trigger")},OD={mounted(e,t){var i;if(!((i=t.value)!=null&&i.user)){console.warn("[UserProfile] User data is required");return}const n=t.value;e._userProfileInstance=TD(e,{...FD,delay:[1e3,0],content:n.user.name||"User",placement:n.placement||"bottom-start",trigger:"mouseenter focus",onShow(o){e._userProfileContainer&&Lf(e._userProfileContainer);const s=RH(n);e._userProfileContainer=s,o.setContent(s)},onHidden(){setTimeout(()=>{e._userProfileContainer&&(Lf(e._userProfileContainer),e._userProfileContainer=void 0)},200)},onDestroy(){e._userProfileContainer&&(Lf(e._userProfileContainer),e._userProfileContainer=void 0)}}),e._userProfileInstance.enable(),e.classList.add("user-profile-trigger")},updated(e,t){var n;if(!(!((n=t.value)!=null&&n.user)||!e._userProfileInstance)&&t.value!==t.oldValue)try{e._userProfileInstance.setProps({placement:t.value.placement||"bottom-start"}),e._userProfileInstance.hide()}catch(i){console.warn("Error updating tooltip props:",i)}},beforeUnmount(e){kD(e)},unmounted(e){kD(e)}},DH=["type","disabled","aria-readonly"],_H={key:0},xH=ct({__name:"Button",props:{label:{default:""},variant:{default:"primary"},size:{default:"default"},disabled:{type:Boolean,default:!1},type:{default:"button"},rounded:{type:Boolean},highlightOnHover:{type:Boolean},border:{type:Boolean},action:{},readOnly:{type:Boolean,default:!1},actived:{type:Boolean,default:!1},loading:{type:Boolean}},emits:["handleClick"],setup(e,{emit:t}){const n=mn,i=e,o=t,s=["primary","secondary","tertiary","text","menu-item"],r=q(()=>Array.isArray(i.variant)?i.variant:[i.variant]),a=_f(),l=q(()=>{const m=[a.customButton],y=r.value.find(b=>s.includes(b))||"primary";return m.push(a[`is-${y}`]),r.value.includes("danger")&&m.push(a["is-danger"]),r.value.includes("icon")&&m.push(a["is-icon"]),i.readOnly&&m.push(a["is-readonly"]),i.rounded&&m.push(a["is-rounded"]),i.border&&m.push(a["has-border"]),i.highlightOnHover&&m.push(a["highlight-on-hover"]),f.value&&m.push(a["has-prefix"]),g.value&&m.push(a["has-suffix"]),i.actived&&m.push(a["is-active"]),i.disabled&&m.push(a.disabled),i.loading&&m.push(a["is-loading"]),typeof i.size=="string"&&m.push(a[`size-${i.size}`]),m}),c=q(()=>i.readOnly===!0),u=q(()=>typeof i.size=="number"?{"--button-size":`${i.size}px`}:{}),d=m=>{var y;i.disabled||i.readOnly||(o("handleClick",m),(y=i.action)==null||y.call(i))},h=yv(),f=q(()=>!!h.prefix),g=q(()=>!!h.suffix);return(m,y)=>(K(),Ce("button",{class:z(l.value),type:i.type,disabled:i.disabled,"aria-readonly":c.value,style:gn(u.value),onClick:d},[_t(m.$slots,"prefix"),_t(m.$slots,"default",{},()=>[e.label?ot((K(),Ce("span",_H,[dt(bt(e.label),1)])),[[U(n),{content:e.label}]]):it("",!0)]),_t(m.$slots,"suffix")],14,DH))}}),FH={customButton:"_customButton_1urqu_1","size-extra-small":"_size-extra-small_1urqu_22","size-small":"_size-small_1urqu_27","size-medium":"_size-medium_1urqu_32","size-large":"_size-large_1urqu_37","size-default":"_size-default_1urqu_42","is-primary":"_is-primary_1urqu_45","is-active":"_is-active_1urqu_53","is-danger":"_is-danger_1urqu_56","is-secondary":"_is-secondary_1urqu_65","is-tertiary":"_is-tertiary_1urqu_89","is-text":"_is-text_1urqu_109","is-menu-item":"_is-menu-item_1urqu_126","is-icon":"_is-icon_1urqu_158","is-readonly":"_is-readonly_1urqu_179","is-rounded":"_is-rounded_1urqu_183","has-border":"_has-border_1urqu_186","highlight-on-hover":"_highlight-on-hover_1urqu_189","icon-wrapper":"_icon-wrapper_1urqu_189","is-loading":"_is-loading_1urqu_192",spin:"_spin_1urqu_1"},Ct=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},pt=Ct(xH,[["__cssModules",{$style:FH}]]);/*!
50
50
  * Compressor.js v1.2.1
51
51
  * https://fengyuanchen.github.io/compressorjs
52
52
  *
@@ -54,9 +54,9 @@ Expected function or array of functions, received type ${typeof e}.`),Vn)}functi
54
54
  * Released under the MIT license
55
55
  *
56
56
  * Date: 2023-02-28T14:09:41.732Z
57
- */function MD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function Nf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MD(Object(n),!0).forEach(function(i){IH(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MD(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function TH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LD(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ND(i.key),i)}}function PH(e,t,n){return t&&LD(e.prototype,t),n&&LD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function IH(e,t,n){return t=ND(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vf(){return Vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Vf.apply(this,arguments)}function AH(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ND(e){var t=AH(e,"string");return typeof t=="symbol"?t:String(t)}var VD={exports:{}};(function(e){typeof window>"u"||function(t){var n=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,i=t.Blob&&function(){try{return!!new Blob}catch{return!1}}(),o=i&&t.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),s=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,r=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,a=(i||s)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(l){var c,u,d,h,f,g,m,y,b;if(c=l.match(r),!c)throw new Error("invalid data URI");for(u=c[2]?c[1]:"text/plain"+(c[3]||";charset=US-ASCII"),d=!!c[4],h=l.slice(c[0].length),d?f=atob(h):f=decodeURIComponent(h),g=new ArrayBuffer(f.length),m=new Uint8Array(g),y=0;y<f.length;y+=1)m[y]=f.charCodeAt(y);return i?new Blob([o?m:g],{type:u}):(b=new s,b.append(g),b.getBlob(u))};t.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(l,c,u){var d=this;setTimeout(function(){u&&n.toDataURL&&a?l(a(d.toDataURL(c,u))):l(d.mozGetAsFile("blob",c))})}:n.toDataURL&&a&&(n.msToBlob?n.toBlob=function(l,c,u){var d=this;setTimeout(function(){(c&&c!=="image/png"||u)&&n.toDataURL&&a?l(a(d.toDataURL(c,u))):l(d.msToBlob(c))})}:n.toBlob=function(l,c,u){var d=this;setTimeout(function(){l(a(d.toDataURL(c,u)))})})),e.exports?e.exports=a:t.dataURLtoBlob=a}(window)})(VD);var BD=VD.exports,kH=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},HD={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},OH=typeof window<"u"&&typeof window.document<"u",Mr=OH?window:{},Bf=function(t){return t>0&&t<1/0},MH=Array.prototype.slice;function ly(e){return Array.from?Array.from(e):MH.call(e)}var LH=/^image\/.+$/;function cy(e){return LH.test(e)}function NH(e){var t=cy(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var GD=String.fromCharCode;function VH(e,t,n){var i="",o;for(n+=t,o=t;o<n;o+=1)i+=GD(e.getUint8(o));return i}var BH=Mr.btoa;function $D(e,t){for(var n=[],i=8192,o=new Uint8Array(e);o.length>0;)n.push(GD.apply(null,ly(o.subarray(0,i)))),o=o.subarray(i);return"data:".concat(t,";base64,").concat(BH(n.join("")))}function HH(e){var t=new DataView(e),n;try{var i,o,s;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var r=t.byteLength,a=2;a+1<r;){if(t.getUint8(a)===255&&t.getUint8(a+1)===225){o=a;break}a+=1}if(o){var l=o+4,c=o+10;if(VH(t,l,4)==="Exif"){var u=t.getUint16(c);if(i=u===18761,(i||u===19789)&&t.getUint16(c+2,i)===42){var d=t.getUint32(c+4,i);d>=8&&(s=c+d)}}}if(s){var h=t.getUint16(s,i),f,g;for(g=0;g<h;g+=1)if(f=s+g*12+2,t.getUint16(f,i)===274){f+=8,n=t.getUint16(f,i),t.setUint16(f,1,i);break}}}catch{n=1}return n}function GH(e){var t=0,n=1,i=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:n,scaleY:i}}var $H=/\.\d*(?:0|9){12}\d*$/;function WD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return $H.test(e)?Math.round(e*t)/t:e}function ju(e){var t=e.aspectRatio,n=e.height,i=e.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",s=Bf(i),r=Bf(n);if(s&&r){var a=n*t;(o==="contain"||o==="none")&&a>i||o==="cover"&&a<i?n=i/t:i=n*t}else s?n=i/t:r&&(i=n*t);return{width:i,height:n}}function WH(e){for(var t=ly(new Uint8Array(e)),n=t.length,i=[],o=0;o+3<n;){var s=t[o],r=t[o+1];if(s===255&&r===218)break;if(s===255&&r===216)o+=2;else{var a=t[o+2]*256+t[o+3],l=o+a+2,c=t.slice(o,l);i.push(c),o=l}}return i.reduce(function(u,d){return d[0]===255&&d[1]===225?u.concat(d):u},[])}function UH(e,t){var n=ly(new Uint8Array(e));if(n[2]!==255||n[3]!==224)return e;var i=n[4]*256+n[5],o=[255,216].concat(t,n.slice(4+i));return new Uint8Array(o)}var zH=Mr.ArrayBuffer,uy=Mr.FileReader,La=Mr.URL||Mr.webkitURL,jH=/\.\w+$/,KH=Mr.Compressor,qH=function(){function e(t,n){TH(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=Nf(Nf({},HD),n),this.aborted=!1,this.result=null,this.init()}return PH(e,[{key:"init",value:function(){var n=this,i=this.file,o=this.options;if(!kH(i)){this.fail(new Error("The first argument must be a File or Blob object."));return}var s=i.type;if(!cy(s)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!La||!uy){this.fail(new Error("The current browser does not support image compression."));return}zH||(o.checkOrientation=!1,o.retainExif=!1);var r=s==="image/jpeg",a=r&&o.checkOrientation,l=r&&o.retainExif;if(La&&!a&&!l)this.load({url:La.createObjectURL(i)});else{var c=new uy;this.reader=c,c.onload=function(u){var d=u.target,h=d.result,f={},g=1;a&&(g=HH(h),g>1&&Vf(f,GH(g))),l&&(n.exif=WH(h)),a||l?!La||g>1?f.url=$D(h,s):f.url=La.createObjectURL(i):f.url=h,n.load(f)},c.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},c.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},c.onloadend=function(){n.reader=null},a||l?c.readAsArrayBuffer(i):c.readAsDataURL(i)}}},{key:"load",value:function(n){var i=this,o=this.file,s=this.image;s.onload=function(){i.draw(Nf(Nf({},n),{},{naturalWidth:s.naturalWidth,naturalHeight:s.naturalHeight}))},s.onabort=function(){i.fail(new Error("Aborted to load the image."))},s.onerror=function(){i.fail(new Error("Failed to load the image."))},Mr.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Mr.navigator.userAgent)&&(s.crossOrigin="anonymous"),s.alt=o.name,s.src=n.url}},{key:"draw",value:function(n){var i=this,o=n.naturalWidth,s=n.naturalHeight,r=n.rotate,a=r===void 0?0:r,l=n.scaleX,c=l===void 0?1:l,u=n.scaleY,d=u===void 0?1:u,h=this.file,f=this.image,g=this.options,m=document.createElement("canvas"),y=m.getContext("2d"),b=Math.abs(a)%180===90,S=(g.resize==="contain"||g.resize==="cover")&&Bf(g.width)&&Bf(g.height),F=Math.max(g.maxWidth,0)||1/0,C=Math.max(g.maxHeight,0)||1/0,R=Math.max(g.minWidth,0)||0,E=Math.max(g.minHeight,0)||0,x=o/s,k=g.width,O=g.height;if(b){var A=[C,F];F=A[0],C=A[1];var D=[E,R];R=D[0],E=D[1];var P=[O,k];k=P[0],O=P[1]}S&&(x=k/O);var V=ju({aspectRatio:x,width:F,height:C},"contain");F=V.width,C=V.height;var H=ju({aspectRatio:x,width:R,height:E},"cover");if(R=H.width,E=H.height,S){var te=ju({aspectRatio:x,width:k,height:O},g.resize);k=te.width,O=te.height}else{var B=ju({aspectRatio:x,width:k,height:O}),G=B.width;k=G===void 0?o:G;var Z=B.height;O=Z===void 0?s:Z}k=Math.floor(WD(Math.min(Math.max(k,R),F))),O=Math.floor(WD(Math.min(Math.max(O,E),C)));var $=-k/2,ce=-O/2,ue=k,xe=O,re=[];if(S){var Ie=0,Me=0,Je=o,gt=s,Ft=ju({aspectRatio:x,width:o,height:s},{contain:"cover",cover:"contain"}[g.resize]);Je=Ft.width,gt=Ft.height,Ie=(o-Je)/2,Me=(s-gt)/2,re.push(Ie,Me,Je,gt)}if(re.push($,ce,ue,xe),b){var He=[O,k];k=He[0],O=He[1]}m.width=k,m.height=O,cy(g.mimeType)||(g.mimeType=h.type);var en="transparent";h.size>g.convertSize&&g.convertTypes.indexOf(g.mimeType)>=0&&(g.mimeType="image/jpeg");var tn=g.mimeType==="image/jpeg";if(tn&&(en="#fff"),y.fillStyle=en,y.fillRect(0,0,k,O),g.beforeDraw&&g.beforeDraw.call(this,y,m),!this.aborted&&(y.save(),y.translate(k/2,O/2),y.rotate(a*Math.PI/180),y.scale(c,d),y.drawImage.apply(y,[f].concat(re)),y.restore(),g.drew&&g.drew.call(this,y,m),!this.aborted)){var At=function(X){if(!i.aborted){var fe=function(Ve){return i.done({naturalWidth:o,naturalHeight:s,result:Ve})};if(X&&tn&&g.retainExif&&i.exif&&i.exif.length>0){var ke=function(Ve){return fe(BD($D(UH(Ve,i.exif),g.mimeType)))};if(X.arrayBuffer)X.arrayBuffer().then(ke).catch(function(){i.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var De=new uy;i.reader=De,De.onload=function(Fe){var Ve=Fe.target;ke(Ve.result)},De.onabort=function(){i.fail(new Error("Aborted to read the compressed image with FileReader."))},De.onerror=function(){i.fail(new Error("Failed to read the compressed image with FileReader."))},De.onloadend=function(){i.reader=null},De.readAsArrayBuffer(X)}}else fe(X)}};m.toBlob?m.toBlob(At,g.mimeType,g.quality):At(BD(m.toDataURL(g.mimeType,g.quality)))}}},{key:"done",value:function(n){var i=n.naturalWidth,o=n.naturalHeight,s=n.result,r=this.file,a=this.image,l=this.options;if(La&&a.src.indexOf("blob:")===0&&La.revokeObjectURL(a.src),s)if(l.strict&&!l.retainExif&&s.size>r.size&&l.mimeType===r.type&&!(l.width>i||l.height>o||l.minWidth>i||l.minHeight>o||l.maxWidth<i||l.maxHeight<o))s=r;else{var c=new Date;s.lastModified=c.getTime(),s.lastModifiedDate=c,s.name=r.name,s.name&&s.type!==r.type&&(s.name=s.name.replace(jH,NH(s.type)))}else s=r;this.result=s,l.success&&l.success.call(this,s)}},{key:"fail",value:function(n){var i=this.options;if(i.error)i.error.call(this,n);else throw n}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=KH,e}},{key:"setDefaults",value:function(n){Vf(HD,n)}}]),e}(),UD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function YH(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zD={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(UD,function(){var n=function(p,v){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,_){w.__proto__=_}||function(w,_){for(var T in _)Object.prototype.hasOwnProperty.call(_,T)&&(w[T]=_[T])})(p,v)},i=function(){return(i=Object.assign||function(p){for(var v,w=1,_=arguments.length;w<_;w++)for(var T in v=arguments[w])Object.prototype.hasOwnProperty.call(v,T)&&(p[T]=v[T]);return p}).apply(this,arguments)};function o(p,v,w){for(var _,T=0,I=v.length;T<I;T++)!_&&T in v||((_=_||Array.prototype.slice.call(v,0,T))[T]=v[T]);return p.concat(_||Array.prototype.slice.call(v))}var s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:UD,r=Object.keys,a=Array.isArray;function l(p,v){return typeof v!="object"||r(v).forEach(function(w){p[w]=v[w]}),p}typeof Promise>"u"||s.Promise||(s.Promise=Promise);var c=Object.getPrototypeOf,u={}.hasOwnProperty;function d(p,v){return u.call(p,v)}function h(p,v){typeof v=="function"&&(v=v(c(p))),(typeof Reflect>"u"?r:Reflect.ownKeys)(v).forEach(function(w){g(p,w,v[w])})}var f=Object.defineProperty;function g(p,v,w,_){f(p,v,l(w&&d(w,"get")&&typeof w.get=="function"?{get:w.get,set:w.set,configurable:!0}:{value:w,configurable:!0,writable:!0},_))}function m(p){return{from:function(v){return p.prototype=Object.create(v.prototype),g(p.prototype,"constructor",p),{extend:h.bind(null,p.prototype)}}}}var y=Object.getOwnPropertyDescriptor,b=[].slice;function S(p,v,w){return b.call(p,v,w)}function F(p,v){return v(p)}function C(p){if(!p)throw new Error("Assertion Failed")}function R(p){s.setImmediate?setImmediate(p):setTimeout(p,0)}function E(p,v){if(typeof v=="string"&&d(p,v))return p[v];if(!v)return p;if(typeof v!="string"){for(var w=[],_=0,T=v.length;_<T;++_){var I=E(p,v[_]);w.push(I)}return w}var L=v.indexOf(".");if(L!==-1){var U=p[v.substr(0,L)];return U==null?void 0:E(U,v.substr(L+1))}}function x(p,v,w){if(p&&v!==void 0&&!("isFrozen"in Object&&Object.isFrozen(p)))if(typeof v!="string"&&"length"in v){C(typeof w!="string"&&"length"in w);for(var _=0,T=v.length;_<T;++_)x(p,v[_],w[_])}else{var I,L,U=v.indexOf(".");U!==-1?(I=v.substr(0,U),(L=v.substr(U+1))===""?w===void 0?a(p)&&!isNaN(parseInt(I))?p.splice(I,1):delete p[I]:p[I]=w:x(U=!(U=p[I])||!d(p,I)?p[I]={}:U,L,w)):w===void 0?a(p)&&!isNaN(parseInt(v))?p.splice(v,1):delete p[v]:p[v]=w}}function k(p){var v,w={};for(v in p)d(p,v)&&(w[v]=p[v]);return w}var O=[].concat;function A(p){return O.apply([],p)}var Er="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(A([8,16,32,64].map(function(p){return["Int","Uint","Float"].map(function(v){return v+p+"Array"})}))).filter(function(p){return s[p]}),D=new Set(Er.map(function(p){return s[p]})),P=null;function V(p){return P=new WeakMap,p=function v(w){if(!w||typeof w!="object")return w;var _=P.get(w);if(_)return _;if(a(w)){_=[],P.set(w,_);for(var T=0,I=w.length;T<I;++T)_.push(v(w[T]))}else if(D.has(w.constructor))_=w;else{var L,U=c(w);for(L in _=U===Object.prototype?{}:Object.create(U),P.set(w,_),w)d(w,L)&&(_[L]=v(w[L]))}return _}(p),P=null,p}var H={}.toString;function te(p){return H.call(p).slice(8,-1)}var B=typeof Symbol<"u"?Symbol.iterator:"@@iterator",G=typeof B=="symbol"?function(p){var v;return p!=null&&(v=p[B])&&v.apply(p)}:function(){return null};function Z(p,v){return v=p.indexOf(v),0<=v&&p.splice(v,1),0<=v}var $={};function ce(p){var v,w,_,T;if(arguments.length===1){if(a(p))return p.slice();if(this===$&&typeof p=="string")return[p];if(T=G(p)){for(w=[];!(_=T.next()).done;)w.push(_.value);return w}if(p==null)return[p];if(typeof(v=p.length)!="number")return[p];for(w=new Array(v);v--;)w[v]=p[v];return w}for(v=arguments.length,w=new Array(v);v--;)w[v]=arguments[v];return w}var ue=typeof Symbol<"u"?function(p){return p[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},lt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Io=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(lt),xe={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function re(p,v){this.name=p,this.message=v}function Ie(p,v){return p+". Errors: "+Object.keys(v).map(function(w){return v[w].toString()}).filter(function(w,_,T){return T.indexOf(w)===_}).join(`
57
+ */function MD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function Nf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MD(Object(n),!0).forEach(function(i){IH(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MD(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function TH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LD(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ND(i.key),i)}}function PH(e,t,n){return t&&LD(e.prototype,t),n&&LD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function IH(e,t,n){return t=ND(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vf(){return Vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Vf.apply(this,arguments)}function AH(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ND(e){var t=AH(e,"string");return typeof t=="symbol"?t:String(t)}var VD={exports:{}};(function(e){typeof window>"u"||function(t){var n=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,i=t.Blob&&function(){try{return!!new Blob}catch{return!1}}(),o=i&&t.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),s=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,r=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,a=(i||s)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(l){var c,u,d,h,f,g,m,y,b;if(c=l.match(r),!c)throw new Error("invalid data URI");for(u=c[2]?c[1]:"text/plain"+(c[3]||";charset=US-ASCII"),d=!!c[4],h=l.slice(c[0].length),d?f=atob(h):f=decodeURIComponent(h),g=new ArrayBuffer(f.length),m=new Uint8Array(g),y=0;y<f.length;y+=1)m[y]=f.charCodeAt(y);return i?new Blob([o?m:g],{type:u}):(b=new s,b.append(g),b.getBlob(u))};t.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(l,c,u){var d=this;setTimeout(function(){u&&n.toDataURL&&a?l(a(d.toDataURL(c,u))):l(d.mozGetAsFile("blob",c))})}:n.toDataURL&&a&&(n.msToBlob?n.toBlob=function(l,c,u){var d=this;setTimeout(function(){(c&&c!=="image/png"||u)&&n.toDataURL&&a?l(a(d.toDataURL(c,u))):l(d.msToBlob(c))})}:n.toBlob=function(l,c,u){var d=this;setTimeout(function(){l(a(d.toDataURL(c,u)))})})),e.exports?e.exports=a:t.dataURLtoBlob=a}(window)})(VD);var BD=VD.exports,kH=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},HD={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},OH=typeof window<"u"&&typeof window.document<"u",Mr=OH?window:{},Bf=function(t){return t>0&&t<1/0},MH=Array.prototype.slice;function ly(e){return Array.from?Array.from(e):MH.call(e)}var LH=/^image\/.+$/;function cy(e){return LH.test(e)}function NH(e){var t=cy(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var GD=String.fromCharCode;function VH(e,t,n){var i="",o;for(n+=t,o=t;o<n;o+=1)i+=GD(e.getUint8(o));return i}var BH=Mr.btoa;function $D(e,t){for(var n=[],i=8192,o=new Uint8Array(e);o.length>0;)n.push(GD.apply(null,ly(o.subarray(0,i)))),o=o.subarray(i);return"data:".concat(t,";base64,").concat(BH(n.join("")))}function HH(e){var t=new DataView(e),n;try{var i,o,s;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var r=t.byteLength,a=2;a+1<r;){if(t.getUint8(a)===255&&t.getUint8(a+1)===225){o=a;break}a+=1}if(o){var l=o+4,c=o+10;if(VH(t,l,4)==="Exif"){var u=t.getUint16(c);if(i=u===18761,(i||u===19789)&&t.getUint16(c+2,i)===42){var d=t.getUint32(c+4,i);d>=8&&(s=c+d)}}}if(s){var h=t.getUint16(s,i),f,g;for(g=0;g<h;g+=1)if(f=s+g*12+2,t.getUint16(f,i)===274){f+=8,n=t.getUint16(f,i),t.setUint16(f,1,i);break}}}catch{n=1}return n}function GH(e){var t=0,n=1,i=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:n,scaleY:i}}var $H=/\.\d*(?:0|9){12}\d*$/;function WD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return $H.test(e)?Math.round(e*t)/t:e}function ju(e){var t=e.aspectRatio,n=e.height,i=e.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",s=Bf(i),r=Bf(n);if(s&&r){var a=n*t;(o==="contain"||o==="none")&&a>i||o==="cover"&&a<i?n=i/t:i=n*t}else s?n=i/t:r&&(i=n*t);return{width:i,height:n}}function WH(e){for(var t=ly(new Uint8Array(e)),n=t.length,i=[],o=0;o+3<n;){var s=t[o],r=t[o+1];if(s===255&&r===218)break;if(s===255&&r===216)o+=2;else{var a=t[o+2]*256+t[o+3],l=o+a+2,c=t.slice(o,l);i.push(c),o=l}}return i.reduce(function(u,d){return d[0]===255&&d[1]===225?u.concat(d):u},[])}function UH(e,t){var n=ly(new Uint8Array(e));if(n[2]!==255||n[3]!==224)return e;var i=n[4]*256+n[5],o=[255,216].concat(t,n.slice(4+i));return new Uint8Array(o)}var zH=Mr.ArrayBuffer,uy=Mr.FileReader,La=Mr.URL||Mr.webkitURL,jH=/\.\w+$/,KH=Mr.Compressor,qH=function(){function e(t,n){TH(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=Nf(Nf({},HD),n),this.aborted=!1,this.result=null,this.init()}return PH(e,[{key:"init",value:function(){var n=this,i=this.file,o=this.options;if(!kH(i)){this.fail(new Error("The first argument must be a File or Blob object."));return}var s=i.type;if(!cy(s)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!La||!uy){this.fail(new Error("The current browser does not support image compression."));return}zH||(o.checkOrientation=!1,o.retainExif=!1);var r=s==="image/jpeg",a=r&&o.checkOrientation,l=r&&o.retainExif;if(La&&!a&&!l)this.load({url:La.createObjectURL(i)});else{var c=new uy;this.reader=c,c.onload=function(u){var d=u.target,h=d.result,f={},g=1;a&&(g=HH(h),g>1&&Vf(f,GH(g))),l&&(n.exif=WH(h)),a||l?!La||g>1?f.url=$D(h,s):f.url=La.createObjectURL(i):f.url=h,n.load(f)},c.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},c.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},c.onloadend=function(){n.reader=null},a||l?c.readAsArrayBuffer(i):c.readAsDataURL(i)}}},{key:"load",value:function(n){var i=this,o=this.file,s=this.image;s.onload=function(){i.draw(Nf(Nf({},n),{},{naturalWidth:s.naturalWidth,naturalHeight:s.naturalHeight}))},s.onabort=function(){i.fail(new Error("Aborted to load the image."))},s.onerror=function(){i.fail(new Error("Failed to load the image."))},Mr.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Mr.navigator.userAgent)&&(s.crossOrigin="anonymous"),s.alt=o.name,s.src=n.url}},{key:"draw",value:function(n){var i=this,o=n.naturalWidth,s=n.naturalHeight,r=n.rotate,a=r===void 0?0:r,l=n.scaleX,c=l===void 0?1:l,u=n.scaleY,d=u===void 0?1:u,h=this.file,f=this.image,g=this.options,m=document.createElement("canvas"),y=m.getContext("2d"),b=Math.abs(a)%180===90,S=(g.resize==="contain"||g.resize==="cover")&&Bf(g.width)&&Bf(g.height),F=Math.max(g.maxWidth,0)||1/0,C=Math.max(g.maxHeight,0)||1/0,R=Math.max(g.minWidth,0)||0,E=Math.max(g.minHeight,0)||0,x=o/s,k=g.width,O=g.height;if(b){var A=[C,F];F=A[0],C=A[1];var D=[E,R];R=D[0],E=D[1];var P=[O,k];k=P[0],O=P[1]}S&&(x=k/O);var V=ju({aspectRatio:x,width:F,height:C},"contain");F=V.width,C=V.height;var H=ju({aspectRatio:x,width:R,height:E},"cover");if(R=H.width,E=H.height,S){var te=ju({aspectRatio:x,width:k,height:O},g.resize);k=te.width,O=te.height}else{var B=ju({aspectRatio:x,width:k,height:O}),G=B.width;k=G===void 0?o:G;var Z=B.height;O=Z===void 0?s:Z}k=Math.floor(WD(Math.min(Math.max(k,R),F))),O=Math.floor(WD(Math.min(Math.max(O,E),C)));var $=-k/2,ce=-O/2,ue=k,xe=O,re=[];if(S){var Ie=0,Me=0,Je=o,gt=s,Ft=ju({aspectRatio:x,width:o,height:s},{contain:"cover",cover:"contain"}[g.resize]);Je=Ft.width,gt=Ft.height,Ie=(o-Je)/2,Me=(s-gt)/2,re.push(Ie,Me,Je,gt)}if(re.push($,ce,ue,xe),b){var He=[O,k];k=He[0],O=He[1]}m.width=k,m.height=O,cy(g.mimeType)||(g.mimeType=h.type);var en="transparent";h.size>g.convertSize&&g.convertTypes.indexOf(g.mimeType)>=0&&(g.mimeType="image/jpeg");var tn=g.mimeType==="image/jpeg";if(tn&&(en="#fff"),y.fillStyle=en,y.fillRect(0,0,k,O),g.beforeDraw&&g.beforeDraw.call(this,y,m),!this.aborted&&(y.save(),y.translate(k/2,O/2),y.rotate(a*Math.PI/180),y.scale(c,d),y.drawImage.apply(y,[f].concat(re)),y.restore(),g.drew&&g.drew.call(this,y,m),!this.aborted)){var At=function(X){if(!i.aborted){var fe=function(Ve){return i.done({naturalWidth:o,naturalHeight:s,result:Ve})};if(X&&tn&&g.retainExif&&i.exif&&i.exif.length>0){var ke=function(Ve){return fe(BD($D(UH(Ve,i.exif),g.mimeType)))};if(X.arrayBuffer)X.arrayBuffer().then(ke).catch(function(){i.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var De=new uy;i.reader=De,De.onload=function(Fe){var Ve=Fe.target;ke(Ve.result)},De.onabort=function(){i.fail(new Error("Aborted to read the compressed image with FileReader."))},De.onerror=function(){i.fail(new Error("Failed to read the compressed image with FileReader."))},De.onloadend=function(){i.reader=null},De.readAsArrayBuffer(X)}}else fe(X)}};m.toBlob?m.toBlob(At,g.mimeType,g.quality):At(BD(m.toDataURL(g.mimeType,g.quality)))}}},{key:"done",value:function(n){var i=n.naturalWidth,o=n.naturalHeight,s=n.result,r=this.file,a=this.image,l=this.options;if(La&&a.src.indexOf("blob:")===0&&La.revokeObjectURL(a.src),s)if(l.strict&&!l.retainExif&&s.size>r.size&&l.mimeType===r.type&&!(l.width>i||l.height>o||l.minWidth>i||l.minHeight>o||l.maxWidth<i||l.maxHeight<o))s=r;else{var c=new Date;s.lastModified=c.getTime(),s.lastModifiedDate=c,s.name=r.name,s.name&&s.type!==r.type&&(s.name=s.name.replace(jH,NH(s.type)))}else s=r;this.result=s,l.success&&l.success.call(this,s)}},{key:"fail",value:function(n){var i=this.options;if(i.error)i.error.call(this,n);else throw n}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=KH,e}},{key:"setDefaults",value:function(n){Vf(HD,n)}}]),e}(),UD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function YH(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zD={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(UD,function(){var n=function(p,v){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,_){w.__proto__=_}||function(w,_){for(var T in _)Object.prototype.hasOwnProperty.call(_,T)&&(w[T]=_[T])})(p,v)},i=function(){return(i=Object.assign||function(p){for(var v,w=1,_=arguments.length;w<_;w++)for(var T in v=arguments[w])Object.prototype.hasOwnProperty.call(v,T)&&(p[T]=v[T]);return p}).apply(this,arguments)};function o(p,v,w){for(var _,T=0,I=v.length;T<I;T++)!_&&T in v||((_=_||Array.prototype.slice.call(v,0,T))[T]=v[T]);return p.concat(_||Array.prototype.slice.call(v))}var s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:UD,r=Object.keys,a=Array.isArray;function l(p,v){return typeof v!="object"||r(v).forEach(function(w){p[w]=v[w]}),p}typeof Promise>"u"||s.Promise||(s.Promise=Promise);var c=Object.getPrototypeOf,u={}.hasOwnProperty;function d(p,v){return u.call(p,v)}function h(p,v){typeof v=="function"&&(v=v(c(p))),(typeof Reflect>"u"?r:Reflect.ownKeys)(v).forEach(function(w){g(p,w,v[w])})}var f=Object.defineProperty;function g(p,v,w,_){f(p,v,l(w&&d(w,"get")&&typeof w.get=="function"?{get:w.get,set:w.set,configurable:!0}:{value:w,configurable:!0,writable:!0},_))}function m(p){return{from:function(v){return p.prototype=Object.create(v.prototype),g(p.prototype,"constructor",p),{extend:h.bind(null,p.prototype)}}}}var y=Object.getOwnPropertyDescriptor,b=[].slice;function S(p,v,w){return b.call(p,v,w)}function F(p,v){return v(p)}function C(p){if(!p)throw new Error("Assertion Failed")}function R(p){s.setImmediate?setImmediate(p):setTimeout(p,0)}function E(p,v){if(typeof v=="string"&&d(p,v))return p[v];if(!v)return p;if(typeof v!="string"){for(var w=[],_=0,T=v.length;_<T;++_){var I=E(p,v[_]);w.push(I)}return w}var L=v.indexOf(".");if(L!==-1){var W=p[v.substr(0,L)];return W==null?void 0:E(W,v.substr(L+1))}}function x(p,v,w){if(p&&v!==void 0&&!("isFrozen"in Object&&Object.isFrozen(p)))if(typeof v!="string"&&"length"in v){C(typeof w!="string"&&"length"in w);for(var _=0,T=v.length;_<T;++_)x(p,v[_],w[_])}else{var I,L,W=v.indexOf(".");W!==-1?(I=v.substr(0,W),(L=v.substr(W+1))===""?w===void 0?a(p)&&!isNaN(parseInt(I))?p.splice(I,1):delete p[I]:p[I]=w:x(W=!(W=p[I])||!d(p,I)?p[I]={}:W,L,w)):w===void 0?a(p)&&!isNaN(parseInt(v))?p.splice(v,1):delete p[v]:p[v]=w}}function k(p){var v,w={};for(v in p)d(p,v)&&(w[v]=p[v]);return w}var O=[].concat;function A(p){return O.apply([],p)}var Er="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(A([8,16,32,64].map(function(p){return["Int","Uint","Float"].map(function(v){return v+p+"Array"})}))).filter(function(p){return s[p]}),D=new Set(Er.map(function(p){return s[p]})),P=null;function V(p){return P=new WeakMap,p=function v(w){if(!w||typeof w!="object")return w;var _=P.get(w);if(_)return _;if(a(w)){_=[],P.set(w,_);for(var T=0,I=w.length;T<I;++T)_.push(v(w[T]))}else if(D.has(w.constructor))_=w;else{var L,W=c(w);for(L in _=W===Object.prototype?{}:Object.create(W),P.set(w,_),w)d(w,L)&&(_[L]=v(w[L]))}return _}(p),P=null,p}var H={}.toString;function te(p){return H.call(p).slice(8,-1)}var B=typeof Symbol<"u"?Symbol.iterator:"@@iterator",G=typeof B=="symbol"?function(p){var v;return p!=null&&(v=p[B])&&v.apply(p)}:function(){return null};function Z(p,v){return v=p.indexOf(v),0<=v&&p.splice(v,1),0<=v}var $={};function ce(p){var v,w,_,T;if(arguments.length===1){if(a(p))return p.slice();if(this===$&&typeof p=="string")return[p];if(T=G(p)){for(w=[];!(_=T.next()).done;)w.push(_.value);return w}if(p==null)return[p];if(typeof(v=p.length)!="number")return[p];for(w=new Array(v);v--;)w[v]=p[v];return w}for(v=arguments.length,w=new Array(v);v--;)w[v]=arguments[v];return w}var ue=typeof Symbol<"u"?function(p){return p[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},lt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Io=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(lt),xe={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function re(p,v){this.name=p,this.message=v}function Ie(p,v){return p+". Errors: "+Object.keys(v).map(function(w){return v[w].toString()}).filter(function(w,_,T){return T.indexOf(w)===_}).join(`
58
58
  `)}function Me(p,v,w,_){this.failures=v,this.failedKeys=_,this.successCount=w,this.message=Ie(p,v)}function Je(p,v){this.name="BulkError",this.failures=Object.keys(v).map(function(w){return v[w]}),this.failuresByPos=v,this.message=Ie(p,this.failures)}m(re).from(Error).extend({toString:function(){return this.name+": "+this.message}}),m(Me).from(re),m(Je).from(re);var gt=Io.reduce(function(p,v){return p[v]=v+"Error",p},{}),Ft=re,He=Io.reduce(function(p,v){var w=v+"Error";function _(T,I){this.name=w,T?typeof T=="string"?(this.message="".concat(T).concat(I?`
59
- `+I:""),this.inner=I||null):typeof T=="object"&&(this.message="".concat(T.name," ").concat(T.message),this.inner=T):(this.message=xe[v]||w,this.inner=null)}return m(_).from(Ft),p[v]=_,p},{});He.Syntax=SyntaxError,He.Type=TypeError,He.Range=RangeError;var en=lt.reduce(function(p,v){return p[v+"Error"]=He[v],p},{}),tn=Io.reduce(function(p,v){return["Syntax","Type","Range"].indexOf(v)===-1&&(p[v+"Error"]=He[v]),p},{});function At(){}function N(p){return p}function X(p,v){return p==null||p===N?v:function(w){return v(p(w))}}function fe(p,v){return function(){p.apply(this,arguments),v.apply(this,arguments)}}function ke(p,v){return p===At?v:function(){var w=p.apply(this,arguments);w!==void 0&&(arguments[0]=w);var _=this.onsuccess,T=this.onerror;this.onsuccess=null,this.onerror=null;var I=v.apply(this,arguments);return _&&(this.onsuccess=this.onsuccess?fe(_,this.onsuccess):_),T&&(this.onerror=this.onerror?fe(T,this.onerror):T),I!==void 0?I:w}}function De(p,v){return p===At?v:function(){p.apply(this,arguments);var w=this.onsuccess,_=this.onerror;this.onsuccess=this.onerror=null,v.apply(this,arguments),w&&(this.onsuccess=this.onsuccess?fe(w,this.onsuccess):w),_&&(this.onerror=this.onerror?fe(_,this.onerror):_)}}function Fe(p,v){return p===At?v:function(w){var _=p.apply(this,arguments);l(w,_);var T=this.onsuccess,I=this.onerror;return this.onsuccess=null,this.onerror=null,w=v.apply(this,arguments),T&&(this.onsuccess=this.onsuccess?fe(T,this.onsuccess):T),I&&(this.onerror=this.onerror?fe(I,this.onerror):I),_===void 0?w===void 0?void 0:w:l(_,w)}}function Ve(p,v){return p===At?v:function(){return v.apply(this,arguments)!==!1&&p.apply(this,arguments)}}function Ne(p,v){return p===At?v:function(){var w=p.apply(this,arguments);if(w&&typeof w.then=="function"){for(var _=this,T=arguments.length,I=new Array(T);T--;)I[T]=arguments[T];return w.then(function(){return v.apply(_,I)})}return v.apply(this,arguments)}}tn.ModifyError=Me,tn.DexieError=re,tn.BulkError=Je;var Ae=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Te(p){Ae=p}var at={},We=100,Er=typeof Promise>"u"?[]:function(){var p=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[p,c(p),p];var v=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[v,c(v),p]}(),lt=Er[0],Io=Er[1],Er=Er[2],Io=Io&&Io.then,ht=lt&&lt.constructor,xt=!!Er,Mt=function(p,v){le.push([p,v]),Dn&&(queueMicrotask(Ls),Dn=!1)},Bt=!0,Dn=!0,sn=[],Kn=[],Jn=N,ye={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:At,pgp:!1,env:{},finalize:At},Re=ye,le=[],Se=0,nt=[];function Pe(p){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var v=this._PSD=Re;if(typeof p!="function"){if(p!==at)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&br(this,this._value))}this._state=null,this._value=null,++v.ref,function w(_,T){try{T(function(I){if(_._state===null){if(I===_)throw new TypeError("A promise cannot be resolved with itself.");var L=_._lib&&ns();I&&typeof I.then=="function"?w(_,function(U,J){I instanceof Pe?I._then(U,J):I.then(U,J)}):(_._state=!0,_._value=I,mi(_)),L&&Pi()}},br.bind(null,_))}catch(I){br(_,I)}}(this,p)}var Mn={get:function(){var p=Re,v=wm;function w(_,T){var I=this,L=!p.global&&(p!==Re||v!==wm),U=L&&!ha(),J=new Pe(function(ee,oe){la(I,new Po(KM(_,p,L,U),KM(T,p,L,U),ee,oe,p))});return this._consoleTask&&(J._consoleTask=this._consoleTask),J}return w.prototype=at,w},set:function(p){g(this,"then",p&&p.prototype===at?Mn:{get:function(){return p},set:Mn.set})}};function Po(p,v,w,_,T){this.onFulfilled=typeof p=="function"?p:null,this.onRejected=typeof v=="function"?v:null,this.resolve=w,this.reject=_,this.psd=T}function br(p,v){var w,_;Kn.push(v),p._state===null&&(w=p._lib&&ns(),v=Jn(v),p._state=!1,p._value=v,_=p,sn.some(function(T){return T._value===_._value})||sn.push(_),mi(p),w&&Pi())}function mi(p){var v=p._listeners;p._listeners=[];for(var w=0,_=v.length;w<_;++w)la(p,v[w]);var T=p._PSD;--T.ref||T.finalize(),Se===0&&(++Se,Mt(function(){--Se==0&&ua()},[]))}function la(p,v){if(p._state!==null){var w=p._state?v.onFulfilled:v.onRejected;if(w===null)return(p._state?v.resolve:v.reject)(p._value);++v.psd.ref,++Se,Mt(ca,[w,p,v])}else p._listeners.push(v)}function ca(p,v,w){try{var _,T=v._value;!v._state&&Kn.length&&(Kn=[]),_=Ae&&v._consoleTask?v._consoleTask.run(function(){return p(T)}):p(T),v._state||Kn.indexOf(T)!==-1||function(I){for(var L=sn.length;L;)if(sn[--L]._value===I._value)return sn.splice(L,1)}(v),w.resolve(_)}catch(I){w.reject(I)}finally{--Se==0&&ua(),--w.psd.ref||w.psd.finalize()}}function Ls(){El(ye,function(){ns()&&Pi()})}function ns(){var p=Bt;return Dn=Bt=!1,p}function Pi(){var p,v,w;do for(;0<le.length;)for(p=le,le=[],w=p.length,v=0;v<w;++v){var _=p[v];_[0].apply(null,_[1])}while(0<le.length);Dn=Bt=!0}function ua(){var p=sn;sn=[],p.forEach(function(_){_._PSD.onunhandled.call(null,_._value,_)});for(var v=nt.slice(0),w=v.length;w;)v[--w]()}function vm(p){return new Pe(at,!1,p)}function wn(p,v){var w=Re;return function(){var _=ns(),T=Re;try{return fa(w,!0),p.apply(this,arguments)}catch(I){v&&v(I)}finally{fa(T,!1),_&&Pi()}}}h(Pe.prototype,{then:Mn,_then:function(p,v){la(this,new Po(null,null,p,v,Re))},catch:function(p){if(arguments.length===1)return this.then(null,p);var v=p,w=arguments[1];return typeof v=="function"?this.then(null,function(_){return(_ instanceof v?w:vm)(_)}):this.then(null,function(_){return(_&&_.name===v?w:vm)(_)})},finally:function(p){return this.then(function(v){return Pe.resolve(p()).then(function(){return v})},function(v){return Pe.resolve(p()).then(function(){return vm(v)})})},timeout:function(p,v){var w=this;return p<1/0?new Pe(function(_,T){var I=setTimeout(function(){return T(new He.Timeout(v))},p);w.then(_,T).finally(clearTimeout.bind(null,I))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&g(Pe.prototype,Symbol.toStringTag,"Dexie.Promise"),ye.env=jM(),h(Pe,{all:function(){var p=ce.apply(null,arguments).map(bm);return new Pe(function(v,w){p.length===0&&v([]);var _=p.length;p.forEach(function(T,I){return Pe.resolve(T).then(function(L){p[I]=L,--_||v(p)},w)})})},resolve:function(p){return p instanceof Pe?p:p&&typeof p.then=="function"?new Pe(function(v,w){p.then(v,w)}):new Pe(at,!0,p)},reject:vm,race:function(){var p=ce.apply(null,arguments).map(bm);return new Pe(function(v,w){p.map(function(_){return Pe.resolve(_).then(v,w)})})},PSD:{get:function(){return Re},set:function(p){return Re=p}},totalEchoes:{get:function(){return wm}},newPSD:da,usePSD:El,scheduler:{get:function(){return Mt},set:function(p){Mt=p}},rejectionMapper:{get:function(){return Jn},set:function(p){Jn=p}},follow:function(p,v){return new Pe(function(w,_){return da(function(T,I){var L=Re;L.unhandleds=[],L.onunhandled=I,L.finalize=fe(function(){var U,J=this;U=function(){J.unhandleds.length===0?T():I(J.unhandleds[0])},nt.push(function ee(){U(),nt.splice(nt.indexOf(ee),1)}),++Se,Mt(function(){--Se==0&&ua()},[])},L.finalize),p()},v,w,_)})}}),ht&&(ht.allSettled&&g(Pe,"allSettled",function(){var p=ce.apply(null,arguments).map(bm);return new Pe(function(v){p.length===0&&v([]);var w=p.length,_=new Array(w);p.forEach(function(T,I){return Pe.resolve(T).then(function(L){return _[I]={status:"fulfilled",value:L}},function(L){return _[I]={status:"rejected",reason:L}}).then(function(){return--w||v(_)})})})}),ht.any&&typeof AggregateError<"u"&&g(Pe,"any",function(){var p=ce.apply(null,arguments).map(bm);return new Pe(function(v,w){p.length===0&&w(new AggregateError([]));var _=p.length,T=new Array(_);p.forEach(function(I,L){return Pe.resolve(I).then(function(U){return v(U)},function(U){T[L]=U,--_||w(new AggregateError(T))})})})}),ht.withResolvers&&(Pe.withResolvers=ht.withResolvers));var Qn={awaits:0,echoes:0,id:0},Kde=0,ym=[],Cm=0,wm=0,qde=0;function da(p,v,w,_){var T=Re,I=Object.create(T);return I.parent=T,I.ref=0,I.global=!1,I.id=++qde,ye.env,I.env=xt?{Promise:Pe,PromiseProp:{value:Pe,configurable:!0,writable:!0},all:Pe.all,race:Pe.race,allSettled:Pe.allSettled,any:Pe.any,resolve:Pe.resolve,reject:Pe.reject}:{},v&&l(I,v),++T.ref,I.finalize=function(){--this.parent.ref||this.parent.finalize()},_=El(I,p,w,_),I.ref===0&&I.finalize(),_}function au(){return Qn.id||(Qn.id=++Kde),++Qn.awaits,Qn.echoes+=We,Qn.id}function ha(){return!!Qn.awaits&&(--Qn.awaits==0&&(Qn.id=0),Qn.echoes=Qn.awaits*We,!0)}function bm(p){return Qn.echoes&&p&&p.constructor===ht?(au(),p.then(function(v){return ha(),v},function(v){return ha(),Ln(v)})):p}function Yde(){var p=ym[ym.length-1];ym.pop(),fa(p,!1)}function fa(p,v){var w,_=Re;(v?!Qn.echoes||Cm++&&p===Re:!Cm||--Cm&&p===Re)||queueMicrotask(v?(function(T){++wm,Qn.echoes&&--Qn.echoes!=0||(Qn.echoes=Qn.awaits=Qn.id=0),ym.push(Re),fa(T,!0)}).bind(null,p):Yde),p!==Re&&(Re=p,_===ye&&(ye.env=jM()),xt&&(w=ye.env.Promise,v=p.env,(_.global||p.global)&&(Object.defineProperty(s,"Promise",v.PromiseProp),w.all=v.all,w.race=v.race,w.resolve=v.resolve,w.reject=v.reject,v.allSettled&&(w.allSettled=v.allSettled),v.any&&(w.any=v.any))))}function jM(){var p=s.Promise;return xt?{Promise:p,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:p.all,race:p.race,allSettled:p.allSettled,any:p.any,resolve:p.resolve,reject:p.reject}:{}}function El(p,v,w,_,T){var I=Re;try{return fa(p,!0),v(w,_,T)}finally{fa(I,!1)}}function KM(p,v,w,_){return typeof p!="function"?p:function(){var T=Re;w&&au(),fa(v,!0);try{return p.apply(this,arguments)}finally{fa(T,!1),_&&queueMicrotask(ha)}}}function $S(p){Promise===ht&&Qn.echoes===0?Cm===0?p():enqueueNativeMicroTask(p):setTimeout(p,0)}(""+Io).indexOf("[native code]")===-1&&(au=ha=At);var Ln=Pe.reject,Rl="￿",Sr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",qM="String expected.",lu=[],Sm="__dbnames",WS="readonly",US="readwrite";function Dl(p,v){return p?v?function(){return p.apply(this,arguments)&&v.apply(this,arguments)}:p:v}var YM={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Em(p){return typeof p!="string"||/\./.test(p)?function(v){return v}:function(v){return v[p]===void 0&&p in v&&delete(v=V(v))[p],v}}function ZM(){throw He.Type()}function Ht(p,v){try{var w=XM(p),_=XM(v);if(w!==_)return w==="Array"?1:_==="Array"?-1:w==="binary"?1:_==="binary"?-1:w==="string"?1:_==="string"?-1:w==="Date"?1:_!=="Date"?NaN:-1;switch(w){case"number":case"Date":case"string":return v<p?1:p<v?-1:0;case"binary":return function(T,I){for(var L=T.length,U=I.length,J=L<U?L:U,ee=0;ee<J;++ee)if(T[ee]!==I[ee])return T[ee]<I[ee]?-1:1;return L===U?0:L<U?-1:1}(JM(p),JM(v));case"Array":return function(T,I){for(var L=T.length,U=I.length,J=L<U?L:U,ee=0;ee<J;++ee){var oe=Ht(T[ee],I[ee]);if(oe!==0)return oe}return L===U?0:L<U?-1:1}(p,v)}}catch{}return NaN}function XM(p){var v=typeof p;return v!="object"?v:ArrayBuffer.isView(p)?"binary":(p=te(p),p==="ArrayBuffer"?"binary":p)}function JM(p){return p instanceof Uint8Array?p:ArrayBuffer.isView(p)?new Uint8Array(p.buffer,p.byteOffset,p.byteLength):new Uint8Array(p)}var QM=(pn.prototype._trans=function(p,v,w){var _=this._tx||Re.trans,T=this.name,I=Ae&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(p==="readonly"?"read":"write"," ").concat(this.name));function L(ee,oe,j){if(!j.schema[T])throw new He.NotFound("Table "+T+" not part of transaction");return v(j.idbtrans,j)}var U=ns();try{var J=_&&_.db._novip===this.db._novip?_===Re.trans?_._promise(p,L,w):da(function(){return _._promise(p,L,w)},{trans:_,transless:Re.transless||Re}):function ee(oe,j,ae,Q){if(oe.idbdb&&(oe._state.openComplete||Re.letThrough||oe._vip)){var ie=oe._createTransaction(j,ae,oe._dbSchema);try{ie.create(),oe._state.PR1398_maxLoop=3}catch(se){return se.name===gt.InvalidState&&oe.isOpen()&&0<--oe._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),oe.close({disableAutoOpen:!1}),oe.open().then(function(){return ee(oe,j,ae,Q)})):Ln(se)}return ie._promise(j,function(se,ne){return da(function(){return Re.trans=ie,Q(se,ne,ie)})}).then(function(se){if(j==="readwrite")try{ie.idbtrans.commit()}catch{}return j==="readonly"?se:ie._completion.then(function(){return se})})}if(oe._state.openComplete)return Ln(new He.DatabaseClosed(oe._state.dbOpenError));if(!oe._state.isBeingOpened){if(!oe._state.autoOpen)return Ln(new He.DatabaseClosed);oe.open().catch(At)}return oe._state.dbReadyPromise.then(function(){return ee(oe,j,ae,Q)})}(this.db,p,[this.name],L);return I&&(J._consoleTask=I,J=J.catch(function(ee){return console.trace(ee),Ln(ee)})),J}finally{U&&Pi()}},pn.prototype.get=function(p,v){var w=this;return p&&p.constructor===Object?this.where(p).first(v):p==null?Ln(new He.Type("Invalid argument to Table.get()")):this._trans("readonly",function(_){return w.core.get({trans:_,key:p}).then(function(T){return w.hook.reading.fire(T)})}).then(v)},pn.prototype.where=function(p){if(typeof p=="string")return new this.db.WhereClause(this,p);if(a(p))return new this.db.WhereClause(this,"[".concat(p.join("+"),"]"));var v=r(p);if(v.length===1)return this.where(v[0]).equals(p[v[0]]);var w=this.schema.indexes.concat(this.schema.primKey).filter(function(U){if(U.compound&&v.every(function(ee){return 0<=U.keyPath.indexOf(ee)})){for(var J=0;J<v.length;++J)if(v.indexOf(U.keyPath[J])===-1)return!1;return!0}return!1}).sort(function(U,J){return U.keyPath.length-J.keyPath.length})[0];if(w&&this.db._maxKey!==Rl){var I=w.keyPath.slice(0,v.length);return this.where(I).equals(I.map(function(J){return p[J]}))}!w&&Ae&&console.warn("The query ".concat(JSON.stringify(p)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(v.join("+"),"]"));var _=this.schema.idxByName;function T(U,J){return Ht(U,J)===0}var L=v.reduce(function(j,J){var ee=j[0],oe=j[1],j=_[J],ae=p[J];return[ee||j,ee||!j?Dl(oe,j&&j.multi?function(Q){return Q=E(Q,J),a(Q)&&Q.some(function(ie){return T(ae,ie)})}:function(Q){return T(ae,E(Q,J))}):oe]},[null,null]),I=L[0],L=L[1];return I?this.where(I.name).equals(p[I.keyPath]).filter(L):w?this.filter(L):this.where(v).equals("")},pn.prototype.filter=function(p){return this.toCollection().and(p)},pn.prototype.count=function(p){return this.toCollection().count(p)},pn.prototype.offset=function(p){return this.toCollection().offset(p)},pn.prototype.limit=function(p){return this.toCollection().limit(p)},pn.prototype.each=function(p){return this.toCollection().each(p)},pn.prototype.toArray=function(p){return this.toCollection().toArray(p)},pn.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},pn.prototype.orderBy=function(p){return new this.db.Collection(new this.db.WhereClause(this,a(p)?"[".concat(p.join("+"),"]"):p))},pn.prototype.reverse=function(){return this.toCollection().reverse()},pn.prototype.mapToClass=function(p){var v,w=this.db,_=this.name;function T(){return v!==null&&v.apply(this,arguments)||this}(this.schema.mappedClass=p).prototype instanceof ZM&&(function(J,ee){if(typeof ee!="function"&&ee!==null)throw new TypeError("Class extends value "+String(ee)+" is not a constructor or null");function oe(){this.constructor=J}n(J,ee),J.prototype=ee===null?Object.create(ee):(oe.prototype=ee.prototype,new oe)}(T,v=p),Object.defineProperty(T.prototype,"db",{get:function(){return w},enumerable:!1,configurable:!0}),T.prototype.table=function(){return _},p=T);for(var I=new Set,L=p.prototype;L;L=c(L))Object.getOwnPropertyNames(L).forEach(function(J){return I.add(J)});function U(J){if(!J)return J;var ee,oe=Object.create(p.prototype);for(ee in J)if(!I.has(ee))try{oe[ee]=J[ee]}catch{}return oe}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=U,this.hook("reading",U),p},pn.prototype.defineClass=function(){return this.mapToClass(function(p){l(this,p)})},pn.prototype.add=function(p,v){var w=this,_=this.schema.primKey,T=_.auto,I=_.keyPath,L=p;return I&&T&&(L=Em(I)(p)),this._trans("readwrite",function(U){return w.core.mutate({trans:U,type:"add",keys:v!=null?[v]:null,values:[L]})}).then(function(U){return U.numFailures?Pe.reject(U.failures[0]):U.lastResult}).then(function(U){if(I)try{x(p,I,U)}catch{}return U})},pn.prototype.update=function(p,v){return typeof p!="object"||a(p)?this.where(":id").equals(p).modify(v):(p=E(p,this.schema.primKey.keyPath),p===void 0?Ln(new He.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(p).modify(v))},pn.prototype.put=function(p,v){var w=this,_=this.schema.primKey,T=_.auto,I=_.keyPath,L=p;return I&&T&&(L=Em(I)(p)),this._trans("readwrite",function(U){return w.core.mutate({trans:U,type:"put",values:[L],keys:v!=null?[v]:null})}).then(function(U){return U.numFailures?Pe.reject(U.failures[0]):U.lastResult}).then(function(U){if(I)try{x(p,I,U)}catch{}return U})},pn.prototype.delete=function(p){var v=this;return this._trans("readwrite",function(w){return v.core.mutate({trans:w,type:"delete",keys:[p]})}).then(function(w){return w.numFailures?Pe.reject(w.failures[0]):void 0})},pn.prototype.clear=function(){var p=this;return this._trans("readwrite",function(v){return p.core.mutate({trans:v,type:"deleteRange",range:YM})}).then(function(v){return v.numFailures?Pe.reject(v.failures[0]):void 0})},pn.prototype.bulkGet=function(p){var v=this;return this._trans("readonly",function(w){return v.core.getMany({keys:p,trans:w}).then(function(_){return _.map(function(T){return v.hook.reading.fire(T)})})})},pn.prototype.bulkAdd=function(p,v,w){var _=this,T=Array.isArray(v)?v:void 0,I=(w=w||(T?void 0:v))?w.allKeys:void 0;return this._trans("readwrite",function(L){var ee=_.schema.primKey,U=ee.auto,ee=ee.keyPath;if(ee&&T)throw new He.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(T&&T.length!==p.length)throw new He.InvalidArgument("Arguments objects and keys must have the same length");var J=p.length,ee=ee&&U?p.map(Em(ee)):p;return _.core.mutate({trans:L,type:"add",keys:T,values:ee,wantResults:I}).then(function(ie){var j=ie.numFailures,ae=ie.results,Q=ie.lastResult,ie=ie.failures;if(j===0)return I?ae:Q;throw new Je("".concat(_.name,".bulkAdd(): ").concat(j," of ").concat(J," operations failed"),ie)})})},pn.prototype.bulkPut=function(p,v,w){var _=this,T=Array.isArray(v)?v:void 0,I=(w=w||(T?void 0:v))?w.allKeys:void 0;return this._trans("readwrite",function(L){var ee=_.schema.primKey,U=ee.auto,ee=ee.keyPath;if(ee&&T)throw new He.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(T&&T.length!==p.length)throw new He.InvalidArgument("Arguments objects and keys must have the same length");var J=p.length,ee=ee&&U?p.map(Em(ee)):p;return _.core.mutate({trans:L,type:"put",keys:T,values:ee,wantResults:I}).then(function(ie){var j=ie.numFailures,ae=ie.results,Q=ie.lastResult,ie=ie.failures;if(j===0)return I?ae:Q;throw new Je("".concat(_.name,".bulkPut(): ").concat(j," of ").concat(J," operations failed"),ie)})})},pn.prototype.bulkUpdate=function(p){var v=this,w=this.core,_=p.map(function(L){return L.key}),T=p.map(function(L){return L.changes}),I=[];return this._trans("readwrite",function(L){return w.getMany({trans:L,keys:_,cache:"clone"}).then(function(U){var J=[],ee=[];p.forEach(function(j,ae){var Q=j.key,ie=j.changes,se=U[ae];if(se){for(var ne=0,he=Object.keys(ie);ne<he.length;ne++){var ge=he[ne],me=ie[ge];if(ge===v.schema.primKey.keyPath){if(Ht(me,Q)!==0)throw new He.Constraint("Cannot update primary key in bulkUpdate()")}else x(se,ge,me)}I.push(ae),J.push(Q),ee.push(se)}});var oe=J.length;return w.mutate({trans:L,type:"put",keys:J,values:ee,updates:{keys:_,changeSpecs:T}}).then(function(j){var ae=j.numFailures,Q=j.failures;if(ae===0)return oe;for(var ie=0,se=Object.keys(Q);ie<se.length;ie++){var ne,he=se[ie],ge=I[Number(he)];ge!=null&&(ne=Q[he],delete Q[he],Q[ge]=ne)}throw new Je("".concat(v.name,".bulkUpdate(): ").concat(ae," of ").concat(oe," operations failed"),Q)})})})},pn.prototype.bulkDelete=function(p){var v=this,w=p.length;return this._trans("readwrite",function(_){return v.core.mutate({trans:_,type:"delete",keys:p})}).then(function(L){var T=L.numFailures,I=L.lastResult,L=L.failures;if(T===0)return I;throw new Je("".concat(v.name,".bulkDelete(): ").concat(T," of ").concat(w," operations failed"),L)})},pn);function pn(){}function xh(p){function v(L,U){if(U){for(var J=arguments.length,ee=new Array(J-1);--J;)ee[J-1]=arguments[J];return w[L].subscribe.apply(null,ee),p}if(typeof L=="string")return w[L]}var w={};v.addEventType=I;for(var _=1,T=arguments.length;_<T;++_)I(arguments[_]);return v;function I(L,U,J){if(typeof L!="object"){var ee;U=U||Ve;var oe={subscribers:[],fire:J=J||At,subscribe:function(j){oe.subscribers.indexOf(j)===-1&&(oe.subscribers.push(j),oe.fire=U(oe.fire,j))},unsubscribe:function(j){oe.subscribers=oe.subscribers.filter(function(ae){return ae!==j}),oe.fire=oe.subscribers.reduce(U,J)}};return w[L]=v[L]=oe}r(ee=L).forEach(function(j){var ae=ee[j];if(a(ae))I(j,ee[j][0],ee[j][1]);else{if(ae!=="asap")throw new He.InvalidArgument("Invalid event config");var Q=I(j,N,function(){for(var ie=arguments.length,se=new Array(ie);ie--;)se[ie]=arguments[ie];Q.subscribers.forEach(function(ne){R(function(){ne.apply(null,se)})})})}})}}function Fh(p,v){return m(v).from({prototype:p}),v}function cu(p,v){return!(p.filter||p.algorithm||p.or)&&(v?p.justLimit:!p.replayFilter)}function zS(p,v){p.filter=Dl(p.filter,v)}function jS(p,v,w){var _=p.replayFilter;p.replayFilter=_?function(){return Dl(_(),v())}:v,p.justLimit=w&&!_}function Rm(p,v){if(p.isPrimKey)return v.primaryKey;var w=v.getIndexByKeyPath(p.index);if(!w)throw new He.Schema("KeyPath "+p.index+" on object store "+v.name+" is not indexed");return w}function eL(p,v,w){var _=Rm(p,v.schema);return v.openCursor({trans:w,values:!p.keysOnly,reverse:p.dir==="prev",unique:!!p.unique,query:{index:_,range:p.range}})}function Dm(p,v,w,_){var T=p.replayFilter?Dl(p.filter,p.replayFilter()):p.filter;if(p.or){var I={},L=function(U,J,ee){var oe,j;T&&!T(J,ee,function(ae){return J.stop(ae)},function(ae){return J.fail(ae)})||((j=""+(oe=J.primaryKey))=="[object ArrayBuffer]"&&(j=""+new Uint8Array(oe)),d(I,j)||(I[j]=!0,v(U,J,ee)))};return Promise.all([p.or._iterate(L,w),tL(eL(p,_,w),p.algorithm,L,!p.keysOnly&&p.valueMapper)])}return tL(eL(p,_,w),Dl(p.algorithm,T),v,!p.keysOnly&&p.valueMapper)}function tL(p,v,w,_){var T=wn(_?function(I,L,U){return w(_(I),L,U)}:w);return p.then(function(I){if(I)return I.start(function(){var L=function(){return I.continue()};v&&!v(I,function(U){return L=U},function(U){I.stop(U),L=At},function(U){I.fail(U),L=At})||T(I.value,I,function(U){return L=U}),L()})})}var Er=Symbol(),Th=(nL.prototype.execute=function(p){if(this.add!==void 0){var v=this.add;if(a(v))return o(o([],a(p)?p:[],!0),v).sort();if(typeof v=="number")return(Number(p)||0)+v;if(typeof v=="bigint")try{return BigInt(p)+v}catch{return BigInt(0)+v}throw new TypeError("Invalid term ".concat(v))}if(this.remove!==void 0){var w=this.remove;if(a(w))return a(p)?p.filter(function(_){return!w.includes(_)}).sort():[];if(typeof w=="number")return Number(p)-w;if(typeof w=="bigint")try{return BigInt(p)-w}catch{return BigInt(0)-w}throw new TypeError("Invalid subtrahend ".concat(w))}return v=(v=this.replacePrefix)===null||v===void 0?void 0:v[0],v&&typeof p=="string"&&p.startsWith(v)?this.replacePrefix[1]+p.substring(v.length):p},nL);function nL(p){Object.assign(this,p)}var Zde=(zt.prototype._read=function(p,v){var w=this._ctx;return w.error?w.table._trans(null,Ln.bind(null,w.error)):w.table._trans("readonly",p).then(v)},zt.prototype._write=function(p){var v=this._ctx;return v.error?v.table._trans(null,Ln.bind(null,v.error)):v.table._trans("readwrite",p,"locked")},zt.prototype._addAlgorithm=function(p){var v=this._ctx;v.algorithm=Dl(v.algorithm,p)},zt.prototype._iterate=function(p,v){return Dm(this._ctx,p,v,this._ctx.table.core)},zt.prototype.clone=function(p){var v=Object.create(this.constructor.prototype),w=Object.create(this._ctx);return p&&l(w,p),v._ctx=w,v},zt.prototype.raw=function(){return this._ctx.valueMapper=null,this},zt.prototype.each=function(p){var v=this._ctx;return this._read(function(w){return Dm(v,p,w,v.table.core)})},zt.prototype.count=function(p){var v=this;return this._read(function(w){var _=v._ctx,T=_.table.core;if(cu(_,!0))return T.count({trans:w,query:{index:Rm(_,T.schema),range:_.range}}).then(function(L){return Math.min(L,_.limit)});var I=0;return Dm(_,function(){return++I,!1},w,T).then(function(){return I})}).then(p)},zt.prototype.sortBy=function(p,v){var w=p.split(".").reverse(),_=w[0],T=w.length-1;function I(J,ee){return ee?I(J[w[ee]],ee-1):J[_]}var L=this._ctx.dir==="next"?1:-1;function U(J,ee){return Ht(I(J,T),I(ee,T))*L}return this.toArray(function(J){return J.sort(U)}).then(v)},zt.prototype.toArray=function(p){var v=this;return this._read(function(w){var _=v._ctx;if(_.dir==="next"&&cu(_,!0)&&0<_.limit){var T=_.valueMapper,I=Rm(_,_.table.core.schema);return _.table.core.query({trans:w,limit:_.limit,values:!0,query:{index:I,range:_.range}}).then(function(U){return U=U.result,T?U.map(T):U})}var L=[];return Dm(_,function(U){return L.push(U)},w,_.table.core).then(function(){return L})},p)},zt.prototype.offset=function(p){var v=this._ctx;return p<=0||(v.offset+=p,cu(v)?jS(v,function(){var w=p;return function(_,T){return w===0||(w===1?--w:T(function(){_.advance(w),w=0}),!1)}}):jS(v,function(){var w=p;return function(){return--w<0}})),this},zt.prototype.limit=function(p){return this._ctx.limit=Math.min(this._ctx.limit,p),jS(this._ctx,function(){var v=p;return function(w,_,T){return--v<=0&&_(T),0<=v}},!0),this},zt.prototype.until=function(p,v){return zS(this._ctx,function(w,_,T){return!p(w.value)||(_(T),v)}),this},zt.prototype.first=function(p){return this.limit(1).toArray(function(v){return v[0]}).then(p)},zt.prototype.last=function(p){return this.reverse().first(p)},zt.prototype.filter=function(p){var v;return zS(this._ctx,function(w){return p(w.value)}),(v=this._ctx).isMatch=Dl(v.isMatch,p),this},zt.prototype.and=function(p){return this.filter(p)},zt.prototype.or=function(p){return new this.db.WhereClause(this._ctx.table,p,this)},zt.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},zt.prototype.desc=function(){return this.reverse()},zt.prototype.eachKey=function(p){var v=this._ctx;return v.keysOnly=!v.isMatch,this.each(function(w,_){p(_.key,_)})},zt.prototype.eachUniqueKey=function(p){return this._ctx.unique="unique",this.eachKey(p)},zt.prototype.eachPrimaryKey=function(p){var v=this._ctx;return v.keysOnly=!v.isMatch,this.each(function(w,_){p(_.primaryKey,_)})},zt.prototype.keys=function(p){var v=this._ctx;v.keysOnly=!v.isMatch;var w=[];return this.each(function(_,T){w.push(T.key)}).then(function(){return w}).then(p)},zt.prototype.primaryKeys=function(p){var v=this._ctx;if(v.dir==="next"&&cu(v,!0)&&0<v.limit)return this._read(function(_){var T=Rm(v,v.table.core.schema);return v.table.core.query({trans:_,values:!1,limit:v.limit,query:{index:T,range:v.range}})}).then(function(_){return _.result}).then(p);v.keysOnly=!v.isMatch;var w=[];return this.each(function(_,T){w.push(T.primaryKey)}).then(function(){return w}).then(p)},zt.prototype.uniqueKeys=function(p){return this._ctx.unique="unique",this.keys(p)},zt.prototype.firstKey=function(p){return this.limit(1).keys(function(v){return v[0]}).then(p)},zt.prototype.lastKey=function(p){return this.reverse().firstKey(p)},zt.prototype.distinct=function(){var p=this._ctx,p=p.index&&p.table.schema.idxByName[p.index];if(!p||!p.multi)return this;var v={};return zS(this._ctx,function(T){var _=T.primaryKey.toString(),T=d(v,_);return v[_]=!0,!T}),this},zt.prototype.modify=function(p){var v=this,w=this._ctx;return this._write(function(_){var T,I,L;L=typeof p=="function"?p:(T=r(p),I=T.length,function(ne){for(var he=!1,ge=0;ge<I;++ge){var me=T[ge],_e=p[me],Ge=E(ne,me);_e instanceof Th?(x(ne,me,_e.execute(Ge)),he=!0):Ge!==_e&&(x(ne,me,_e),he=!0)}return he});var U=w.table.core,j=U.schema.primaryKey,J=j.outbound,ee=j.extractKey,oe=200,j=v.db._options.modifyChunkSize;j&&(oe=typeof j=="object"?j[U.name]||j["*"]||200:j);function ae(ne,me){var ge=me.failures,me=me.numFailures;ie+=ne-me;for(var _e=0,Ge=r(ge);_e<Ge.length;_e++){var Ze=Ge[_e];Q.push(ge[Ze])}}var Q=[],ie=0,se=[];return v.clone().primaryKeys().then(function(ne){function he(me){var _e=Math.min(oe,ne.length-me);return U.getMany({trans:_,keys:ne.slice(me,me+_e),cache:"immutable"}).then(function(Ge){for(var Ze=[],$e=[],Ue=J?[]:null,Qe=[],qe=0;qe<_e;++qe){var st=Ge[qe],kt={value:V(st),primKey:ne[me+qe]};L.call(kt,kt.value,kt)!==!1&&(kt.value==null?Qe.push(ne[me+qe]):J||Ht(ee(st),ee(kt.value))===0?($e.push(kt.value),J&&Ue.push(ne[me+qe])):(Qe.push(ne[me+qe]),Ze.push(kt.value)))}return Promise.resolve(0<Ze.length&&U.mutate({trans:_,type:"add",values:Ze}).then(function(Nt){for(var Vt in Nt.failures)Qe.splice(parseInt(Vt),1);ae(Ze.length,Nt)})).then(function(){return(0<$e.length||ge&&typeof p=="object")&&U.mutate({trans:_,type:"put",keys:Ue,values:$e,criteria:ge,changeSpec:typeof p!="function"&&p,isAdditionalChunk:0<me}).then(function(Nt){return ae($e.length,Nt)})}).then(function(){return(0<Qe.length||ge&&p===KS)&&U.mutate({trans:_,type:"delete",keys:Qe,criteria:ge,isAdditionalChunk:0<me}).then(function(Nt){return ae(Qe.length,Nt)})}).then(function(){return ne.length>me+_e&&he(me+oe)})})}var ge=cu(w)&&w.limit===1/0&&(typeof p!="function"||p===KS)&&{index:w.index,range:w.range};return he(0).then(function(){if(0<Q.length)throw new Me("Error modifying one or more objects",Q,ie,se);return ne.length})})})},zt.prototype.delete=function(){var p=this._ctx,v=p.range;return cu(p)&&(p.isPrimKey||v.type===3)?this._write(function(w){var _=p.table.core.schema.primaryKey,T=v;return p.table.core.count({trans:w,query:{index:_,range:T}}).then(function(I){return p.table.core.mutate({trans:w,type:"deleteRange",range:T}).then(function(L){var U=L.failures;if(L.lastResult,L.results,L=L.numFailures,L)throw new Me("Could not delete some values",Object.keys(U).map(function(J){return U[J]}),I-L);return I-L})})}):this.modify(KS)},zt);function zt(){}var KS=function(p,v){return v.value=null};function Xde(p,v){return p<v?-1:p===v?0:1}function Jde(p,v){return v<p?-1:p===v?0:1}function oo(p,v,w){return p=p instanceof oL?new p.Collection(p):p,p._ctx.error=new(w||TypeError)(v),p}function uu(p){return new p.Collection(p,function(){return iL("")}).limit(0)}function _m(p,v,w,_){var T,I,L,U,J,ee,oe,j=w.length;if(!w.every(function(ie){return typeof ie=="string"}))return oo(p,qM);function ae(ie){T=ie==="next"?function(ne){return ne.toUpperCase()}:function(ne){return ne.toLowerCase()},I=ie==="next"?function(ne){return ne.toLowerCase()}:function(ne){return ne.toUpperCase()},L=ie==="next"?Xde:Jde;var se=w.map(function(ne){return{lower:I(ne),upper:T(ne)}}).sort(function(ne,he){return L(ne.lower,he.lower)});U=se.map(function(ne){return ne.upper}),J=se.map(function(ne){return ne.lower}),oe=(ee=ie)==="next"?"":_}ae("next"),p=new p.Collection(p,function(){return pa(U[0],J[j-1]+_)}),p._ondirectionchange=function(ie){ae(ie)};var Q=0;return p._addAlgorithm(function(ie,se,ne){var he=ie.key;if(typeof he!="string")return!1;var ge=I(he);if(v(ge,J,Q))return!0;for(var me=null,_e=Q;_e<j;++_e){var Ge=function(Ze,$e,Ue,Qe,qe,st){for(var kt=Math.min(Ze.length,Qe.length),Nt=-1,Vt=0;Vt<kt;++Vt){var so=$e[Vt];if(so!==Qe[Vt])return qe(Ze[Vt],Ue[Vt])<0?Ze.substr(0,Vt)+Ue[Vt]+Ue.substr(Vt+1):qe(Ze[Vt],Qe[Vt])<0?Ze.substr(0,Vt)+Qe[Vt]+Ue.substr(Vt+1):0<=Nt?Ze.substr(0,Nt)+$e[Nt]+Ue.substr(Nt+1):null;qe(Ze[Vt],so)<0&&(Nt=Vt)}return kt<Qe.length&&st==="next"?Ze+Ue.substr(Ze.length):kt<Ze.length&&st==="prev"?Ze.substr(0,Ue.length):Nt<0?null:Ze.substr(0,Nt)+Qe[Nt]+Ue.substr(Nt+1)}(he,ge,U[_e],J[_e],L,ee);Ge===null&&me===null?Q=_e+1:(me===null||0<L(me,Ge))&&(me=Ge)}return se(me!==null?function(){ie.continue(me+oe)}:ne),!1}),p}function pa(p,v,w,_){return{type:2,lower:p,upper:v,lowerOpen:w,upperOpen:_}}function iL(p){return{type:1,lower:p,upper:p}}var oL=(Object.defineProperty(ei.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),ei.prototype.between=function(p,v,w,_){w=w!==!1,_=_===!0;try{return 0<this._cmp(p,v)||this._cmp(p,v)===0&&(w||_)&&(!w||!_)?uu(this):new this.Collection(this,function(){return pa(p,v,!w,!_)})}catch{return oo(this,Sr)}},ei.prototype.equals=function(p){return p==null?oo(this,Sr):new this.Collection(this,function(){return iL(p)})},ei.prototype.above=function(p){return p==null?oo(this,Sr):new this.Collection(this,function(){return pa(p,void 0,!0)})},ei.prototype.aboveOrEqual=function(p){return p==null?oo(this,Sr):new this.Collection(this,function(){return pa(p,void 0,!1)})},ei.prototype.below=function(p){return p==null?oo(this,Sr):new this.Collection(this,function(){return pa(void 0,p,!1,!0)})},ei.prototype.belowOrEqual=function(p){return p==null?oo(this,Sr):new this.Collection(this,function(){return pa(void 0,p)})},ei.prototype.startsWith=function(p){return typeof p!="string"?oo(this,qM):this.between(p,p+Rl,!0,!0)},ei.prototype.startsWithIgnoreCase=function(p){return p===""?this.startsWith(p):_m(this,function(v,w){return v.indexOf(w[0])===0},[p],Rl)},ei.prototype.equalsIgnoreCase=function(p){return _m(this,function(v,w){return v===w[0]},[p],"")},ei.prototype.anyOfIgnoreCase=function(){var p=ce.apply($,arguments);return p.length===0?uu(this):_m(this,function(v,w){return w.indexOf(v)!==-1},p,"")},ei.prototype.startsWithAnyOfIgnoreCase=function(){var p=ce.apply($,arguments);return p.length===0?uu(this):_m(this,function(v,w){return w.some(function(_){return v.indexOf(_)===0})},p,Rl)},ei.prototype.anyOf=function(){var p=this,v=ce.apply($,arguments),w=this._cmp;try{v.sort(w)}catch{return oo(this,Sr)}if(v.length===0)return uu(this);var _=new this.Collection(this,function(){return pa(v[0],v[v.length-1])});_._ondirectionchange=function(I){w=I==="next"?p._ascending:p._descending,v.sort(w)};var T=0;return _._addAlgorithm(function(I,L,U){for(var J=I.key;0<w(J,v[T]);)if(++T===v.length)return L(U),!1;return w(J,v[T])===0||(L(function(){I.continue(v[T])}),!1)}),_},ei.prototype.notEqual=function(p){return this.inAnyRange([[-1/0,p],[p,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},ei.prototype.noneOf=function(){var p=ce.apply($,arguments);if(p.length===0)return new this.Collection(this);try{p.sort(this._ascending)}catch{return oo(this,Sr)}var v=p.reduce(function(w,_){return w?w.concat([[w[w.length-1][1],_]]):[[-1/0,_]]},null);return v.push([p[p.length-1],this.db._maxKey]),this.inAnyRange(v,{includeLowers:!1,includeUppers:!1})},ei.prototype.inAnyRange=function(he,v){var w=this,_=this._cmp,T=this._ascending,I=this._descending,L=this._min,U=this._max;if(he.length===0)return uu(this);if(!he.every(function(ge){return ge[0]!==void 0&&ge[1]!==void 0&&T(ge[0],ge[1])<=0}))return oo(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",He.InvalidArgument);var J=!v||v.includeLowers!==!1,ee=v&&v.includeUppers===!0,oe,j=T;function ae(ge,me){return j(ge[0],me[0])}try{(oe=he.reduce(function(ge,me){for(var _e=0,Ge=ge.length;_e<Ge;++_e){var Ze=ge[_e];if(_(me[0],Ze[1])<0&&0<_(me[1],Ze[0])){Ze[0]=L(Ze[0],me[0]),Ze[1]=U(Ze[1],me[1]);break}}return _e===Ge&&ge.push(me),ge},[])).sort(ae)}catch{return oo(this,Sr)}var Q=0,ie=ee?function(ge){return 0<T(ge,oe[Q][1])}:function(ge){return 0<=T(ge,oe[Q][1])},se=J?function(ge){return 0<I(ge,oe[Q][0])}:function(ge){return 0<=I(ge,oe[Q][0])},ne=ie,he=new this.Collection(this,function(){return pa(oe[0][0],oe[oe.length-1][1],!J,!ee)});return he._ondirectionchange=function(ge){j=ge==="next"?(ne=ie,T):(ne=se,I),oe.sort(ae)},he._addAlgorithm(function(ge,me,_e){for(var Ge,Ze=ge.key;ne(Ze);)if(++Q===oe.length)return me(_e),!1;return!ie(Ge=Ze)&&!se(Ge)||(w._cmp(Ze,oe[Q][1])===0||w._cmp(Ze,oe[Q][0])===0||me(function(){j===T?ge.continue(oe[Q][0]):ge.continue(oe[Q][1])}),!1)}),he},ei.prototype.startsWithAnyOf=function(){var p=ce.apply($,arguments);return p.every(function(v){return typeof v=="string"})?p.length===0?uu(this):this.inAnyRange(p.map(function(v){return[v,v+Rl]})):oo(this,"startsWithAnyOf() only works with strings")},ei);function ei(){}function Ns(p){return wn(function(v){return Ph(v),p(v.target.error),!1})}function Ph(p){p.stopPropagation&&p.stopPropagation(),p.preventDefault&&p.preventDefault()}var Ih="storagemutated",qS="x-storagemutated-1",ga=xh(null,Ih),Qde=(Vs.prototype._lock=function(){return C(!Re.global),++this._reculock,this._reculock!==1||Re.global||(Re.lockOwnerFor=this),this},Vs.prototype._unlock=function(){if(C(!Re.global),--this._reculock==0)for(Re.global||(Re.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var p=this._blockedFuncs.shift();try{El(p[1],p[0])}catch{}}return this},Vs.prototype._locked=function(){return this._reculock&&Re.lockOwnerFor!==this},Vs.prototype.create=function(p){var v=this;if(!this.mode)return this;var w=this.db.idbdb,_=this.db._state.dbOpenError;if(C(!this.idbtrans),!p&&!w)switch(_&&_.name){case"DatabaseClosedError":throw new He.DatabaseClosed(_);case"MissingAPIError":throw new He.MissingAPI(_.message,_);default:throw new He.OpenFailed(_)}if(!this.active)throw new He.TransactionInactive;return C(this._completion._state===null),(p=this.idbtrans=p||(this.db.core||w).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=wn(function(T){Ph(T),v._reject(p.error)}),p.onabort=wn(function(T){Ph(T),v.active&&v._reject(new He.Abort(p.error)),v.active=!1,v.on("abort").fire(T)}),p.oncomplete=wn(function(){v.active=!1,v._resolve(),"mutatedParts"in p&&ga.storagemutated.fire(p.mutatedParts)}),this},Vs.prototype._promise=function(p,v,w){var _=this;if(p==="readwrite"&&this.mode!=="readwrite")return Ln(new He.ReadOnly("Transaction is readonly"));if(!this.active)return Ln(new He.TransactionInactive);if(this._locked())return new Pe(function(I,L){_._blockedFuncs.push([function(){_._promise(p,v,w).then(I,L)},Re])});if(w)return da(function(){var I=new Pe(function(L,U){_._lock();var J=v(L,U,_);J&&J.then&&J.then(L,U)});return I.finally(function(){return _._unlock()}),I._lib=!0,I});var T=new Pe(function(I,L){var U=v(I,L,_);U&&U.then&&U.then(I,L)});return T._lib=!0,T},Vs.prototype._root=function(){return this.parent?this.parent._root():this},Vs.prototype.waitFor=function(p){var v,w=this._root(),_=Pe.resolve(p);w._waitingFor?w._waitingFor=w._waitingFor.then(function(){return _}):(w._waitingFor=_,w._waitingQueue=[],v=w.idbtrans.objectStore(w.storeNames[0]),function I(){for(++w._spinCount;w._waitingQueue.length;)w._waitingQueue.shift()();w._waitingFor&&(v.get(-1/0).onsuccess=I)}());var T=w._waitingFor;return new Pe(function(I,L){_.then(function(U){return w._waitingQueue.push(wn(I.bind(null,U)))},function(U){return w._waitingQueue.push(wn(L.bind(null,U)))}).finally(function(){w._waitingFor===T&&(w._waitingFor=null)})})},Vs.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new He.Abort))},Vs.prototype.table=function(p){var v=this._memoizedTables||(this._memoizedTables={});if(d(v,p))return v[p];var w=this.schema[p];if(!w)throw new He.NotFound("Table "+p+" not part of transaction");return w=new this.db.Table(p,w,this),w.core=this.db.core.table(p),v[p]=w},Vs);function Vs(){}function YS(p,v,w,_,T,I,L){return{name:p,keyPath:v,unique:w,multi:_,auto:T,compound:I,src:(w&&!L?"&":"")+(_?"*":"")+(T?"++":"")+sL(v)}}function sL(p){return typeof p=="string"?p:p?"["+[].join.call(p,"+")+"]":""}function ZS(p,v,w){return{name:p,primKey:v,indexes:w,mappedClass:null,idxByName:(_=function(T){return[T.name,T]},w.reduce(function(T,I,L){return L=_(I,L),L&&(T[L[0]]=L[1]),T},{}))};var _}var Ah=function(p){try{return p.only([[]]),Ah=function(){return[[]]},[[]]}catch{return Ah=function(){return Rl},Rl}};function XS(p){return p==null?function(){}:typeof p=="string"?(v=p).split(".").length===1?function(w){return w[v]}:function(w){return E(w,v)}:function(w){return E(w,p)};var v}function rL(p){return[].slice.call(p)}var ehe=0;function kh(p){return p==null?":id":typeof p=="string"?p:"[".concat(p.join("+"),"]")}function the(p,v,J){function _(ne){if(ne.type===3)return null;if(ne.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var Q=ne.lower,ie=ne.upper,se=ne.lowerOpen,ne=ne.upperOpen;return Q===void 0?ie===void 0?null:v.upperBound(ie,!!ne):ie===void 0?v.lowerBound(Q,!!se):v.bound(Q,ie,!!se,!!ne)}function T(ae){var Q,ie=ae.name;return{name:ie,schema:ae,mutate:function(se){var ne=se.trans,he=se.type,ge=se.keys,me=se.values,_e=se.range;return new Promise(function(Ge,Ze){Ge=wn(Ge);var $e=ne.objectStore(ie),Ue=$e.keyPath==null,Qe=he==="put"||he==="add";if(!Qe&&he!=="delete"&&he!=="deleteRange")throw new Error("Invalid operation type: "+he);var qe,st=(ge||me||{length:1}).length;if(ge&&me&&ge.length!==me.length)throw new Error("Given keys array must have same length as given values array.");if(st===0)return Ge({numFailures:0,failures:{},results:[],lastResult:void 0});function kt(Ii){++so,Ph(Ii)}var Nt=[],Vt=[],so=0;if(he==="deleteRange"){if(_e.type===4)return Ge({numFailures:so,failures:Vt,results:[],lastResult:void 0});_e.type===3?Nt.push(qe=$e.clear()):Nt.push(qe=$e.delete(_(_e)))}else{var Ue=Qe?Ue?[me,ge]:[me,null]:[ge,null],Tt=Ue[0],yi=Ue[1];if(Qe)for(var Ci=0;Ci<st;++Ci)Nt.push(qe=yi&&yi[Ci]!==void 0?$e[he](Tt[Ci],yi[Ci]):$e[he](Tt[Ci])),qe.onerror=kt;else for(Ci=0;Ci<st;++Ci)Nt.push(qe=$e[he](Tt[Ci])),qe.onerror=kt}function Bm(Ii){Ii=Ii.target.result,Nt.forEach(function(Fl,g0){return Fl.error!=null&&(Vt[g0]=Fl.error)}),Ge({numFailures:so,failures:Vt,results:he==="delete"?ge:Nt.map(function(Fl){return Fl.result}),lastResult:Ii})}qe.onerror=function(Ii){kt(Ii),Bm(Ii)},qe.onsuccess=Bm})},getMany:function(se){var ne=se.trans,he=se.keys;return new Promise(function(ge,me){ge=wn(ge);for(var _e,Ge=ne.objectStore(ie),Ze=he.length,$e=new Array(Ze),Ue=0,Qe=0,qe=function(Nt){Nt=Nt.target,$e[Nt._pos]=Nt.result,++Qe===Ue&&ge($e)},st=Ns(me),kt=0;kt<Ze;++kt)he[kt]!=null&&((_e=Ge.get(he[kt]))._pos=kt,_e.onsuccess=qe,_e.onerror=st,++Ue);Ue===0&&ge($e)})},get:function(se){var ne=se.trans,he=se.key;return new Promise(function(ge,me){ge=wn(ge);var _e=ne.objectStore(ie).get(he);_e.onsuccess=function(Ge){return ge(Ge.target.result)},_e.onerror=Ns(me)})},query:(Q=ee,function(se){return new Promise(function(ne,he){ne=wn(ne);var ge,me,_e,Ue=se.trans,Ge=se.values,Ze=se.limit,qe=se.query,$e=Ze===1/0?void 0:Ze,Qe=qe.index,qe=qe.range,Ue=Ue.objectStore(ie),Qe=Qe.isPrimaryKey?Ue:Ue.index(Qe.name),qe=_(qe);if(Ze===0)return ne({result:[]});Q?(($e=Ge?Qe.getAll(qe,$e):Qe.getAllKeys(qe,$e)).onsuccess=function(st){return ne({result:st.target.result})},$e.onerror=Ns(he)):(ge=0,me=!Ge&&"openKeyCursor"in Qe?Qe.openKeyCursor(qe):Qe.openCursor(qe),_e=[],me.onsuccess=function(st){var kt=me.result;return kt?(_e.push(Ge?kt.value:kt.primaryKey),++ge===Ze?ne({result:_e}):void kt.continue()):ne({result:_e})},me.onerror=Ns(he))})}),openCursor:function(se){var ne=se.trans,he=se.values,ge=se.query,me=se.reverse,_e=se.unique;return new Promise(function(Ge,Ze){Ge=wn(Ge);var Qe=ge.index,$e=ge.range,Ue=ne.objectStore(ie),Ue=Qe.isPrimaryKey?Ue:Ue.index(Qe.name),Qe=me?_e?"prevunique":"prev":_e?"nextunique":"next",qe=!he&&"openKeyCursor"in Ue?Ue.openKeyCursor(_($e),Qe):Ue.openCursor(_($e),Qe);qe.onerror=Ns(Ze),qe.onsuccess=wn(function(st){var kt,Nt,Vt,so,Tt=qe.result;Tt?(Tt.___id=++ehe,Tt.done=!1,kt=Tt.continue.bind(Tt),Nt=(Nt=Tt.continuePrimaryKey)&&Nt.bind(Tt),Vt=Tt.advance.bind(Tt),so=function(){throw new Error("Cursor not stopped")},Tt.trans=ne,Tt.stop=Tt.continue=Tt.continuePrimaryKey=Tt.advance=function(){throw new Error("Cursor not started")},Tt.fail=wn(Ze),Tt.next=function(){var yi=this,Ci=1;return this.start(function(){return Ci--?yi.continue():yi.stop()}).then(function(){return yi})},Tt.start=function(yi){function Ci(){if(qe.result)try{yi()}catch(Ii){Tt.fail(Ii)}else Tt.done=!0,Tt.start=function(){throw new Error("Cursor behind last entry")},Tt.stop()}var Bm=new Promise(function(Ii,Fl){Ii=wn(Ii),qe.onerror=Ns(Fl),Tt.fail=Fl,Tt.stop=function(g0){Tt.stop=Tt.continue=Tt.continuePrimaryKey=Tt.advance=so,Ii(g0)}});return qe.onsuccess=wn(function(Ii){qe.onsuccess=Ci,Ci()}),Tt.continue=kt,Tt.continuePrimaryKey=Nt,Tt.advance=Vt,Ci(),Bm},Ge(Tt)):Ge(null)},Ze)})},count:function(se){var ne=se.query,he=se.trans,ge=ne.index,me=ne.range;return new Promise(function(_e,Ge){var Ze=he.objectStore(ie),$e=ge.isPrimaryKey?Ze:Ze.index(ge.name),Ze=_(me),$e=Ze?$e.count(Ze):$e.count();$e.onsuccess=wn(function(Ue){return _e(Ue.target.result)}),$e.onerror=Ns(Ge)})}}}var I,L,U,oe=(L=J,U=rL((I=p).objectStoreNames),{schema:{name:I.name,tables:U.map(function(ae){return L.objectStore(ae)}).map(function(ae){var Q=ae.keyPath,ne=ae.autoIncrement,ie=a(Q),se={},ne={name:ae.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:Q==null,compound:ie,keyPath:Q,autoIncrement:ne,unique:!0,extractKey:XS(Q)},indexes:rL(ae.indexNames).map(function(he){return ae.index(he)}).map(function(_e){var ge=_e.name,me=_e.unique,Ge=_e.multiEntry,_e=_e.keyPath,Ge={name:ge,compound:a(_e),keyPath:_e,unique:me,multiEntry:Ge,extractKey:XS(_e)};return se[kh(_e)]=Ge}),getIndexByKeyPath:function(he){return se[kh(he)]}};return se[":id"]=ne.primaryKey,Q!=null&&(se[kh(Q)]=ne.primaryKey),ne})},hasGetAll:0<U.length&&"getAll"in L.objectStore(U[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),J=oe.schema,ee=oe.hasGetAll,oe=J.tables.map(T),j={};return oe.forEach(function(ae){return j[ae.name]=ae}),{stack:"dbcore",transaction:p.transaction.bind(p),table:function(ae){if(!j[ae])throw new Error("Table '".concat(ae,"' not found"));return j[ae]},MIN_KEY:-1/0,MAX_KEY:Ah(v),schema:J}}function nhe(p,v,w,_){var T=w.IDBKeyRange;return w.indexedDB,{dbcore:(_=the(v,T,_),p.dbcore.reduce(function(I,L){return L=L.create,i(i({},I),L(I))},_))}}function xm(p,_){var w=_.db,_=nhe(p._middlewares,w,p._deps,_);p.core=_.dbcore,p.tables.forEach(function(T){var I=T.name;p.core.schema.tables.some(function(L){return L.name===I})&&(T.core=p.core.table(I),p[I]instanceof p.Table&&(p[I].core=T.core))})}function Fm(p,v,w,_){w.forEach(function(T){var I=_[T];v.forEach(function(L){var U=function J(ee,oe){return y(ee,oe)||(ee=c(ee))&&J(ee,oe)}(L,T);(!U||"value"in U&&U.value===void 0)&&(L===p.Transaction.prototype||L instanceof p.Transaction?g(L,T,{get:function(){return this.table(T)},set:function(J){f(this,T,{value:J,writable:!0,configurable:!0,enumerable:!0})}}):L[T]=new p.Table(T,I))})})}function JS(p,v){v.forEach(function(w){for(var _ in w)w[_]instanceof p.Table&&delete w[_]})}function ihe(p,v){return p._cfg.version-v._cfg.version}function ohe(p,v,w,_){var T=p._dbSchema;w.objectStoreNames.contains("$meta")&&!T.$meta&&(T.$meta=ZS("$meta",lL("")[0],[]),p._storeNames.push("$meta"));var I=p._createTransaction("readwrite",p._storeNames,T);I.create(w),I._completion.catch(_);var L=I._reject.bind(I),U=Re.transless||Re;da(function(){return Re.trans=I,Re.transless=U,v!==0?(xm(p,w),ee=v,((J=I).storeNames.includes("$meta")?J.table("$meta").get("version").then(function(oe){return oe??ee}):Pe.resolve(ee)).then(function(oe){return ae=oe,Q=I,ie=w,se=[],oe=(j=p)._versions,ne=j._dbSchema=Pm(0,j.idbdb,ie),(oe=oe.filter(function(he){return he._cfg.version>=ae})).length!==0?(oe.forEach(function(he){se.push(function(){var ge=ne,me=he._cfg.dbschema;Im(j,ge,ie),Im(j,me,ie),ne=j._dbSchema=me;var _e=QS(ge,me);_e.add.forEach(function(Qe){e0(ie,Qe[0],Qe[1].primKey,Qe[1].indexes)}),_e.change.forEach(function(Qe){if(Qe.recreate)throw new He.Upgrade("Not yet support for changing primary key");var qe=ie.objectStore(Qe.name);Qe.add.forEach(function(st){return Tm(qe,st)}),Qe.change.forEach(function(st){qe.deleteIndex(st.name),Tm(qe,st)}),Qe.del.forEach(function(st){return qe.deleteIndex(st)})});var Ge=he._cfg.contentUpgrade;if(Ge&&he._cfg.version>ae){xm(j,ie),Q._memoizedTables={};var Ze=k(me);_e.del.forEach(function(Qe){Ze[Qe]=ge[Qe]}),JS(j,[j.Transaction.prototype]),Fm(j,[j.Transaction.prototype],r(Ze),Ze),Q.schema=Ze;var $e,Ue=ue(Ge);return Ue&&au(),_e=Pe.follow(function(){var Qe;($e=Ge(Q))&&Ue&&(Qe=ha.bind(null,null),$e.then(Qe,Qe))}),$e&&typeof $e.then=="function"?Pe.resolve($e):_e.then(function(){return $e})}}),se.push(function(ge){var me,_e,Ge=he._cfg.dbschema;me=Ge,_e=ge,[].slice.call(_e.db.objectStoreNames).forEach(function(Ze){return me[Ze]==null&&_e.db.deleteObjectStore(Ze)}),JS(j,[j.Transaction.prototype]),Fm(j,[j.Transaction.prototype],j._storeNames,j._dbSchema),Q.schema=j._dbSchema}),se.push(function(ge){j.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(j.idbdb.version/10)===he._cfg.version?(j.idbdb.deleteObjectStore("$meta"),delete j._dbSchema.$meta,j._storeNames=j._storeNames.filter(function(me){return me!=="$meta"})):ge.objectStore("$meta").put(he._cfg.version,"version"))})}),function he(){return se.length?Pe.resolve(se.shift()(Q.idbtrans)).then(he):Pe.resolve()}().then(function(){aL(ne,ie)})):Pe.resolve();var j,ae,Q,ie,se,ne}).catch(L)):(r(T).forEach(function(oe){e0(w,oe,T[oe].primKey,T[oe].indexes)}),xm(p,w),void Pe.follow(function(){return p.on.populate.fire(I)}).catch(L));var J,ee})}function she(p,v){aL(p._dbSchema,v),v.db.version%10!=0||v.objectStoreNames.contains("$meta")||v.db.createObjectStore("$meta").add(Math.ceil(v.db.version/10-1),"version");var w=Pm(0,p.idbdb,v);Im(p,p._dbSchema,v);for(var _=0,T=QS(w,p._dbSchema).change;_<T.length;_++){var I=function(L){if(L.change.length||L.recreate)return console.warn("Unable to patch indexes of table ".concat(L.name," because it has changes on the type of index or primary key.")),{value:void 0};var U=v.objectStore(L.name);L.add.forEach(function(J){Ae&&console.debug("Dexie upgrade patch: Creating missing index ".concat(L.name,".").concat(J.src)),Tm(U,J)})}(T[_]);if(typeof I=="object")return I.value}}function QS(p,v){var w,_={del:[],add:[],change:[]};for(w in p)v[w]||_.del.push(w);for(w in v){var T=p[w],I=v[w];if(T){var L={name:w,def:I,recreate:!1,del:[],add:[],change:[]};if(""+(T.primKey.keyPath||"")!=""+(I.primKey.keyPath||"")||T.primKey.auto!==I.primKey.auto)L.recreate=!0,_.change.push(L);else{var U=T.idxByName,J=I.idxByName,ee=void 0;for(ee in U)J[ee]||L.del.push(ee);for(ee in J){var oe=U[ee],j=J[ee];oe?oe.src!==j.src&&L.change.push(j):L.add.push(j)}(0<L.del.length||0<L.add.length||0<L.change.length)&&_.change.push(L)}}else _.add.push([w,I])}return _}function e0(p,v,w,_){var T=p.db.createObjectStore(v,w.keyPath?{keyPath:w.keyPath,autoIncrement:w.auto}:{autoIncrement:w.auto});return _.forEach(function(I){return Tm(T,I)}),T}function aL(p,v){r(p).forEach(function(w){v.db.objectStoreNames.contains(w)||(Ae&&console.debug("Dexie: Creating missing table",w),e0(v,w,p[w].primKey,p[w].indexes))})}function Tm(p,v){p.createIndex(v.name,v.keyPath,{unique:v.unique,multiEntry:v.multi})}function Pm(p,v,w){var _={};return S(v.objectStoreNames,0).forEach(function(T){for(var I=w.objectStore(T),L=YS(sL(ee=I.keyPath),ee||"",!0,!1,!!I.autoIncrement,ee&&typeof ee!="string",!0),U=[],J=0;J<I.indexNames.length;++J){var oe=I.index(I.indexNames[J]),ee=oe.keyPath,oe=YS(oe.name,ee,!!oe.unique,!!oe.multiEntry,!1,ee&&typeof ee!="string",!1);U.push(oe)}_[T]=ZS(T,L,U)}),_}function Im(p,v,w){for(var _=w.db.objectStoreNames,T=0;T<_.length;++T){var I=_[T],L=w.objectStore(I);p._hasGetAll="getAll"in L;for(var U=0;U<L.indexNames.length;++U){var J=L.indexNames[U],ee=L.index(J).keyPath,oe=typeof ee=="string"?ee:"["+S(ee).join("+")+"]";!v[I]||(ee=v[I].idxByName[oe])&&(ee.name=J,delete v[I].idxByName[oe],v[I].idxByName[J]=ee)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(p._hasGetAll=!1)}function lL(p){return p.split(",").map(function(v,w){var _=(v=v.trim()).replace(/([&*]|\+\+)/g,""),T=/^\[/.test(_)?_.match(/^\[(.*)\]$/)[1].split("+"):_;return YS(_,T||null,/\&/.test(v),/\*/.test(v),/\+\+/.test(v),a(T),w===0)})}var rhe=(Am.prototype._parseStoresSpec=function(p,v){r(p).forEach(function(w){if(p[w]!==null){var _=lL(p[w]),T=_.shift();if(T.unique=!0,T.multi)throw new He.Schema("Primary key cannot be multi-valued");_.forEach(function(I){if(I.auto)throw new He.Schema("Only primary key can be marked as autoIncrement (++)");if(!I.keyPath)throw new He.Schema("Index must have a name and cannot be an empty string")}),v[w]=ZS(w,T,_)}})},Am.prototype.stores=function(w){var v=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,w):w;var w=v._versions,_={},T={};return w.forEach(function(I){l(_,I._cfg.storesSource),T=I._cfg.dbschema={},I._parseStoresSpec(_,T)}),v._dbSchema=T,JS(v,[v._allTables,v,v.Transaction.prototype]),Fm(v,[v._allTables,v,v.Transaction.prototype,this._cfg.tables],r(T),T),v._storeNames=r(T),this},Am.prototype.upgrade=function(p){return this._cfg.contentUpgrade=Ne(this._cfg.contentUpgrade||At,p),this},Am);function Am(){}function t0(p,v){var w=p._dbNamesDB;return w||(w=p._dbNamesDB=new Rr(Sm,{addons:[],indexedDB:p,IDBKeyRange:v})).version(1).stores({dbnames:"name"}),w.table("dbnames")}function n0(p){return p&&typeof p.databases=="function"}function i0(p){return da(function(){return Re.letThrough=!0,p()})}function o0(p){return!("from"in p)}var vi=function(p,v){if(!this){var w=new vi;return p&&"d"in p&&l(w,p),w}l(this,arguments.length?{d:1,from:p,to:1<arguments.length?v:p}:{d:0})};function Oh(p,v,w){var _=Ht(v,w);if(!isNaN(_)){if(0<_)throw RangeError();if(o0(p))return l(p,{from:v,to:w,d:1});var T=p.l,_=p.r;if(Ht(w,p.from)<0)return T?Oh(T,v,w):p.l={from:v,to:w,d:1,l:null,r:null},uL(p);if(0<Ht(v,p.to))return _?Oh(_,v,w):p.r={from:v,to:w,d:1,l:null,r:null},uL(p);Ht(v,p.from)<0&&(p.from=v,p.l=null,p.d=_?_.d+1:1),0<Ht(w,p.to)&&(p.to=w,p.r=null,p.d=p.l?p.l.d+1:1),w=!p.r,T&&!p.l&&Mh(p,T),_&&w&&Mh(p,_)}}function Mh(p,v){o0(v)||function w(_,J){var I=J.from,L=J.to,U=J.l,J=J.r;Oh(_,I,L),U&&w(_,U),J&&w(_,J)}(p,v)}function cL(p,v){var w=km(v),_=w.next();if(_.done)return!1;for(var T=_.value,I=km(p),L=I.next(T.from),U=L.value;!_.done&&!L.done;){if(Ht(U.from,T.to)<=0&&0<=Ht(U.to,T.from))return!0;Ht(T.from,U.from)<0?T=(_=w.next(U.from)).value:U=(L=I.next(T.from)).value}return!1}function km(p){var v=o0(p)?null:{s:0,n:p};return{next:function(w){for(var _=0<arguments.length;v;)switch(v.s){case 0:if(v.s=1,_)for(;v.n.l&&Ht(w,v.n.from)<0;)v={up:v,n:v.n.l,s:1};else for(;v.n.l;)v={up:v,n:v.n.l,s:1};case 1:if(v.s=2,!_||Ht(w,v.n.to)<=0)return{value:v.n,done:!1};case 2:if(v.n.r){v.s=3,v={up:v,n:v.n.r,s:0};continue}case 3:v=v.up}return{done:!0}}}}function uL(p){var v,w,_=(((v=p.r)===null||v===void 0?void 0:v.d)||0)-(((w=p.l)===null||w===void 0?void 0:w.d)||0),T=1<_?"r":_<-1?"l":"";T&&(v=T=="r"?"l":"r",w=i({},p),_=p[T],p.from=_.from,p.to=_.to,p[T]=_[T],w[T]=_[v],(p[v]=w).d=dL(w)),p.d=dL(p)}function dL(w){var v=w.r,w=w.l;return(v?w?Math.max(v.d,w.d):v.d:w?w.d:0)+1}function Om(p,v){return r(v).forEach(function(w){p[w]?Mh(p[w],v[w]):p[w]=function _(T){var I,L,U={};for(I in T)d(T,I)&&(L=T[I],U[I]=!L||typeof L!="object"||D.has(L.constructor)?L:_(L));return U}(v[w])}),p}function s0(p,v){return p.all||v.all||Object.keys(p).some(function(w){return v[w]&&cL(v[w],p[w])})}h(vi.prototype,((Io={add:function(p){return Mh(this,p),this},addKey:function(p){return Oh(this,p,p),this},addKeys:function(p){var v=this;return p.forEach(function(w){return Oh(v,w,w)}),this},hasKey:function(p){var v=km(this).next(p).value;return v&&Ht(v.from,p)<=0&&0<=Ht(v.to,p)}})[B]=function(){return km(this)},Io));var _l={},r0={},a0=!1;function Mm(p){Om(r0,p),a0||(a0=!0,setTimeout(function(){a0=!1,l0(r0,!(r0={}))},0))}function l0(p,v){v===void 0&&(v=!1);var w=new Set;if(p.all)for(var _=0,T=Object.values(_l);_<T.length;_++)hL(L=T[_],p,w,v);else for(var I in p){var L,U=/^idb\:\/\/(.*)\/(.*)\//.exec(I);U&&(I=U[1],U=U[2],(L=_l["idb://".concat(I,"/").concat(U)])&&hL(L,p,w,v))}w.forEach(function(J){return J()})}function hL(p,v,w,_){for(var T=[],I=0,L=Object.entries(p.queries.query);I<L.length;I++){for(var U=L[I],J=U[0],ee=[],oe=0,j=U[1];oe<j.length;oe++){var ae=j[oe];s0(v,ae.obsSet)?ae.subscribers.forEach(function(ne){return w.add(ne)}):_&&ee.push(ae)}_&&T.push([J,ee])}if(_)for(var Q=0,ie=T;Q<ie.length;Q++){var se=ie[Q],J=se[0],ee=se[1];p.queries.query[J]=ee}}function ahe(p){var v=p._state,w=p._deps.indexedDB;if(v.isBeingOpened||p.idbdb)return v.dbReadyPromise.then(function(){return v.dbOpenError?Ln(v.dbOpenError):p});v.isBeingOpened=!0,v.dbOpenError=null,v.openComplete=!1;var _=v.openCanceller,T=Math.round(10*p.verno),I=!1;function L(){if(v.openCanceller!==_)throw new He.DatabaseClosed("db.open() was cancelled")}function U(){return new Pe(function(ae,Q){if(L(),!w)throw new He.MissingAPI;var ie=p.name,se=v.autoSchema||!T?w.open(ie):w.open(ie,T);if(!se)throw new He.MissingAPI;se.onerror=Ns(Q),se.onblocked=wn(p._fireOnBlocked),se.onupgradeneeded=wn(function(ne){var he;oe=se.transaction,v.autoSchema&&!p._options.allowEmptyDB?(se.onerror=Ph,oe.abort(),se.result.close(),(he=w.deleteDatabase(ie)).onsuccess=he.onerror=wn(function(){Q(new He.NoSuchDatabase("Database ".concat(ie," doesnt exist")))})):(oe.onerror=Ns(Q),ne=ne.oldVersion>Math.pow(2,62)?0:ne.oldVersion,j=ne<1,p.idbdb=se.result,I&&she(p,oe),ohe(p,ne/10,oe,Q))},Q),se.onsuccess=wn(function(){oe=null;var ne,he,ge,me,_e,Ge=p.idbdb=se.result,Ze=S(Ge.objectStoreNames);if(0<Ze.length)try{var $e=Ge.transaction((me=Ze).length===1?me[0]:me,"readonly");if(v.autoSchema)he=Ge,ge=$e,(ne=p).verno=he.version/10,ge=ne._dbSchema=Pm(0,he,ge),ne._storeNames=S(he.objectStoreNames,0),Fm(ne,[ne._allTables],r(ge),ge);else if(Im(p,p._dbSchema,$e),((_e=QS(Pm(0,(_e=p).idbdb,$e),_e._dbSchema)).add.length||_e.change.some(function(Ue){return Ue.add.length||Ue.change.length}))&&!I)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),Ge.close(),T=Ge.version+1,I=!0,ae(U());xm(p,$e)}catch{}lu.push(p),Ge.onversionchange=wn(function(Ue){v.vcFired=!0,p.on("versionchange").fire(Ue)}),Ge.onclose=wn(function(Ue){p.on("close").fire(Ue)}),j&&(_e=p._deps,$e=ie,Ge=_e.indexedDB,_e=_e.IDBKeyRange,n0(Ge)||$e===Sm||t0(Ge,_e).put({name:$e}).catch(At)),ae()},Q)}).catch(function(ae){switch(ae==null?void 0:ae.name){case"UnknownError":if(0<v.PR1398_maxLoop)return v.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),U();break;case"VersionError":if(0<T)return T=0,U()}return Pe.reject(ae)})}var J,ee=v.dbReadyResolve,oe=null,j=!1;return Pe.race([_,(typeof navigator>"u"?Pe.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(ae){function Q(){return indexedDB.databases().finally(ae)}J=setInterval(Q,100),Q()}).finally(function(){return clearInterval(J)}):Promise.resolve()).then(U)]).then(function(){return L(),v.onReadyBeingFired=[],Pe.resolve(i0(function(){return p.on.ready.fire(p.vip)})).then(function ae(){if(0<v.onReadyBeingFired.length){var Q=v.onReadyBeingFired.reduce(Ne,At);return v.onReadyBeingFired=[],Pe.resolve(i0(function(){return Q(p.vip)})).then(ae)}})}).finally(function(){v.openCanceller===_&&(v.onReadyBeingFired=null,v.isBeingOpened=!1)}).catch(function(ae){v.dbOpenError=ae;try{oe&&oe.abort()}catch{}return _===v.openCanceller&&p._close(),Ln(ae)}).finally(function(){v.openComplete=!0,ee()}).then(function(){var ae;return j&&(ae={},p.tables.forEach(function(Q){Q.schema.indexes.forEach(function(ie){ie.name&&(ae["idb://".concat(p.name,"/").concat(Q.name,"/").concat(ie.name)]=new vi(-1/0,[[[]]]))}),ae["idb://".concat(p.name,"/").concat(Q.name,"/")]=ae["idb://".concat(p.name,"/").concat(Q.name,"/:dels")]=new vi(-1/0,[[[]]])}),ga(Ih).fire(ae),l0(ae,!0)),p})}function c0(p){function v(I){return p.next(I)}var w=T(v),_=T(function(I){return p.throw(I)});function T(I){return function(J){var U=I(J),J=U.value;return U.done?J:J&&typeof J.then=="function"?J.then(w,_):a(J)?Promise.all(J).then(w,_):w(J)}}return T(v)()}function Lm(p,v,w){for(var _=a(p)?p.slice():[p],T=0;T<w;++T)_.push(v);return _}var lhe={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(p){return i(i({},p),{table:function(v){var w=p.table(v),_=w.schema,T={},I=[];function L(j,ae,Q){var ie=kh(j),se=T[ie]=T[ie]||[],ne=j==null?0:typeof j=="string"?1:j.length,he=0<ae,he=i(i({},Q),{name:he?"".concat(ie,"(virtual-from:").concat(Q.name,")"):Q.name,lowLevelIndex:Q,isVirtual:he,keyTail:ae,keyLength:ne,extractKey:XS(j),unique:!he&&Q.unique});return se.push(he),he.isPrimaryKey||I.push(he),1<ne&&L(ne===2?j[0]:j.slice(0,ne-1),ae+1,Q),se.sort(function(ge,me){return ge.keyTail-me.keyTail}),he}v=L(_.primaryKey.keyPath,0,_.primaryKey),T[":id"]=[v];for(var U=0,J=_.indexes;U<J.length;U++){var ee=J[U];L(ee.keyPath,0,ee)}function oe(j){var ae,Q=j.query.index;return Q.isVirtual?i(i({},j),{query:{index:Q.lowLevelIndex,range:(ae=j.query.range,Q=Q.keyTail,{type:ae.type===1?2:ae.type,lower:Lm(ae.lower,ae.lowerOpen?p.MAX_KEY:p.MIN_KEY,Q),lowerOpen:!0,upper:Lm(ae.upper,ae.upperOpen?p.MIN_KEY:p.MAX_KEY,Q),upperOpen:!0})}}):j}return i(i({},w),{schema:i(i({},_),{primaryKey:v,indexes:I,getIndexByKeyPath:function(j){return(j=T[kh(j)])&&j[0]}}),count:function(j){return w.count(oe(j))},query:function(j){return w.query(oe(j))},openCursor:function(j){var ae=j.query.index,Q=ae.keyTail,ie=ae.isVirtual,se=ae.keyLength;return ie?w.openCursor(oe(j)).then(function(he){return he&&ne(he)}):w.openCursor(j);function ne(he){return Object.create(he,{continue:{value:function(ge){ge!=null?he.continue(Lm(ge,j.reverse?p.MAX_KEY:p.MIN_KEY,Q)):j.unique?he.continue(he.key.slice(0,se).concat(j.reverse?p.MIN_KEY:p.MAX_KEY,Q)):he.continue()}},continuePrimaryKey:{value:function(ge,me){he.continuePrimaryKey(Lm(ge,p.MAX_KEY,Q),me)}},primaryKey:{get:function(){return he.primaryKey}},key:{get:function(){var ge=he.key;return se===1?ge[0]:ge.slice(0,se)}},value:{get:function(){return he.value}}})}}})}})}};function u0(p,v,w,_){return w=w||{},_=_||"",r(p).forEach(function(T){var I,L,U;d(v,T)?(I=p[T],L=v[T],typeof I=="object"&&typeof L=="object"&&I&&L?(U=te(I))!==te(L)?w[_+T]=v[T]:U==="Object"?u0(I,L,w,_+T+"."):I!==L&&(w[_+T]=v[T]):I!==L&&(w[_+T]=v[T])):w[_+T]=void 0}),r(v).forEach(function(T){d(p,T)||(w[_+T]=v[T])}),w}function d0(p,v){return v.type==="delete"?v.keys:v.keys||v.values.map(p.extractKey)}var che={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(p){return i(i({},p),{table:function(v){var w=p.table(v),_=w.schema.primaryKey;return i(i({},w),{mutate:function(T){var I=Re.trans,L=I.table(v).hook,U=L.deleting,J=L.creating,ee=L.updating;switch(T.type){case"add":if(J.fire===At)break;return I._promise("readwrite",function(){return oe(T)},!0);case"put":if(J.fire===At&&ee.fire===At)break;return I._promise("readwrite",function(){return oe(T)},!0);case"delete":if(U.fire===At)break;return I._promise("readwrite",function(){return oe(T)},!0);case"deleteRange":if(U.fire===At)break;return I._promise("readwrite",function(){return function j(ae,Q,ie){return w.query({trans:ae,values:!1,query:{index:_,range:Q},limit:ie}).then(function(se){var ne=se.result;return oe({type:"delete",keys:ne,trans:ae}).then(function(he){return 0<he.numFailures?Promise.reject(he.failures[0]):ne.length<ie?{failures:[],numFailures:0,lastResult:void 0}:j(ae,i(i({},Q),{lower:ne[ne.length-1],lowerOpen:!0}),ie)})})}(T.trans,T.range,1e4)},!0)}return w.mutate(T);function oe(j){var ae,Q,ie,se=Re.trans,ne=j.keys||d0(_,j);if(!ne)throw new Error("Keys missing");return(j=j.type==="add"||j.type==="put"?i(i({},j),{keys:ne}):i({},j)).type!=="delete"&&(j.values=o([],j.values)),j.keys&&(j.keys=o([],j.keys)),ae=w,ie=ne,((Q=j).type==="add"?Promise.resolve([]):ae.getMany({trans:Q.trans,keys:ie,cache:"immutable"})).then(function(he){var ge=ne.map(function(me,_e){var Ge,Ze,$e,Ue=he[_e],Qe={onerror:null,onsuccess:null};return j.type==="delete"?U.fire.call(Qe,me,Ue,se):j.type==="add"||Ue===void 0?(Ge=J.fire.call(Qe,me,j.values[_e],se),me==null&&Ge!=null&&(j.keys[_e]=me=Ge,_.outbound||x(j.values[_e],_.keyPath,me))):(Ge=u0(Ue,j.values[_e]),(Ze=ee.fire.call(Qe,Ge,me,Ue,se))&&($e=j.values[_e],Object.keys(Ze).forEach(function(qe){d($e,qe)?$e[qe]=Ze[qe]:x($e,qe,Ze[qe])}))),Qe});return w.mutate(j).then(function(me){for(var _e=me.failures,Ge=me.results,Ze=me.numFailures,me=me.lastResult,$e=0;$e<ne.length;++$e){var Ue=(Ge||ne)[$e],Qe=ge[$e];Ue==null?Qe.onerror&&Qe.onerror(_e[$e]):Qe.onsuccess&&Qe.onsuccess(j.type==="put"&&he[$e]?j.values[$e]:Ue)}return{failures:_e,results:Ge,numFailures:Ze,lastResult:me}}).catch(function(me){return ge.forEach(function(_e){return _e.onerror&&_e.onerror(me)}),Promise.reject(me)})})}}})}})}};function fL(p,v,w){try{if(!v||v.keys.length<p.length)return null;for(var _=[],T=0,I=0;T<v.keys.length&&I<p.length;++T)Ht(v.keys[T],p[I])===0&&(_.push(w?V(v.values[T]):v.values[T]),++I);return _.length===p.length?_:null}catch{return null}}var uhe={stack:"dbcore",level:-1,create:function(p){return{table:function(v){var w=p.table(v);return i(i({},w),{getMany:function(_){if(!_.cache)return w.getMany(_);var T=fL(_.keys,_.trans._cache,_.cache==="clone");return T?Pe.resolve(T):w.getMany(_).then(function(I){return _.trans._cache={keys:_.keys,values:_.cache==="clone"?V(I):I},I})},mutate:function(_){return _.type!=="add"&&(_.trans._cache=null),w.mutate(_)}})}}}};function pL(p,v){return p.trans.mode==="readonly"&&!!p.subscr&&!p.trans.explicit&&p.trans.db._options.cache!=="disabled"&&!v.schema.primaryKey.outbound}function gL(p,v){switch(p){case"query":return v.values&&!v.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var dhe={stack:"dbcore",level:0,name:"Observability",create:function(p){var v=p.schema.name,w=new vi(p.MIN_KEY,p.MAX_KEY);return i(i({},p),{transaction:function(_,T,I){if(Re.subscr&&T!=="readonly")throw new He.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(Re.querier));return p.transaction(_,T,I)},table:function(_){var T=p.table(_),I=T.schema,L=I.primaryKey,j=I.indexes,U=L.extractKey,J=L.outbound,ee=L.autoIncrement&&j.filter(function(Q){return Q.compound&&Q.keyPath.includes(L.keyPath)}),oe=i(i({},T),{mutate:function(Q){function ie(qe){return qe="idb://".concat(v,"/").concat(_,"/").concat(qe),me[qe]||(me[qe]=new vi)}var se,ne,he,ge=Q.trans,me=Q.mutatedParts||(Q.mutatedParts={}),_e=ie(""),Ge=ie(":dels"),Ze=Q.type,Qe=Q.type==="deleteRange"?[Q.range]:Q.type==="delete"?[Q.keys]:Q.values.length<50?[d0(L,Q).filter(function(qe){return qe}),Q.values]:[],$e=Qe[0],Ue=Qe[1],Qe=Q.trans._cache;return a($e)?(_e.addKeys($e),(Qe=Ze==="delete"||$e.length===Ue.length?fL($e,Qe):null)||Ge.addKeys($e),(Qe||Ue)&&(se=ie,ne=Qe,he=Ue,I.indexes.forEach(function(qe){var st=se(qe.name||"");function kt(Vt){return Vt!=null?qe.extractKey(Vt):null}function Nt(Vt){return qe.multiEntry&&a(Vt)?Vt.forEach(function(so){return st.addKey(so)}):st.addKey(Vt)}(ne||he).forEach(function(Vt,yi){var Tt=ne&&kt(ne[yi]),yi=he&&kt(he[yi]);Ht(Tt,yi)!==0&&(Tt!=null&&Nt(Tt),yi!=null&&Nt(yi))})}))):$e?(Ue={from:(Ue=$e.lower)!==null&&Ue!==void 0?Ue:p.MIN_KEY,to:(Ue=$e.upper)!==null&&Ue!==void 0?Ue:p.MAX_KEY},Ge.add(Ue),_e.add(Ue)):(_e.add(w),Ge.add(w),I.indexes.forEach(function(qe){return ie(qe.name).add(w)})),T.mutate(Q).then(function(qe){return!$e||Q.type!=="add"&&Q.type!=="put"||(_e.addKeys(qe.results),ee&&ee.forEach(function(st){for(var kt=Q.values.map(function(Tt){return st.extractKey(Tt)}),Nt=st.keyPath.findIndex(function(Tt){return Tt===L.keyPath}),Vt=0,so=qe.results.length;Vt<so;++Vt)kt[Vt][Nt]=qe.results[Vt];ie(st.name).addKeys(kt)})),ge.mutatedParts=Om(ge.mutatedParts||{},me),qe})}}),j=function(ie){var se=ie.query,ie=se.index,se=se.range;return[ie,new vi((ie=se.lower)!==null&&ie!==void 0?ie:p.MIN_KEY,(se=se.upper)!==null&&se!==void 0?se:p.MAX_KEY)]},ae={get:function(Q){return[L,new vi(Q.key)]},getMany:function(Q){return[L,new vi().addKeys(Q.keys)]},count:j,query:j,openCursor:j};return r(ae).forEach(function(Q){oe[Q]=function(ie){var se=Re.subscr,ne=!!se,he=pL(Re,T)&&gL(Q,ie)?ie.obsSet={}:se;if(ne){var ge=function(Ue){return Ue="idb://".concat(v,"/").concat(_,"/").concat(Ue),he[Ue]||(he[Ue]=new vi)},me=ge(""),_e=ge(":dels"),se=ae[Q](ie),ne=se[0],se=se[1];if((Q==="query"&&ne.isPrimaryKey&&!ie.values?_e:ge(ne.name||"")).add(se),!ne.isPrimaryKey){if(Q!=="count"){var Ge=Q==="query"&&J&&ie.values&&T.query(i(i({},ie),{values:!1}));return T[Q].apply(this,arguments).then(function(Ue){if(Q==="query"){if(J&&ie.values)return Ge.then(function(kt){return kt=kt.result,me.addKeys(kt),Ue});var Qe=ie.values?Ue.result.map(U):Ue.result;(ie.values?me:_e).addKeys(Qe)}else if(Q==="openCursor"){var qe=Ue,st=ie.values;return qe&&Object.create(qe,{key:{get:function(){return _e.addKey(qe.primaryKey),qe.key}},primaryKey:{get:function(){var kt=qe.primaryKey;return _e.addKey(kt),kt}},value:{get:function(){return st&&me.addKey(qe.primaryKey),qe.value}}})}return Ue})}_e.add(w)}}return T[Q].apply(this,arguments)}}),oe}})}};function mL(p,v,w){if(w.numFailures===0)return v;if(v.type==="deleteRange")return null;var _=v.keys?v.keys.length:"values"in v&&v.values?v.values.length:1;return w.numFailures===_?null:(v=i({},v),a(v.keys)&&(v.keys=v.keys.filter(function(T,I){return!(I in w.failures)})),"values"in v&&a(v.values)&&(v.values=v.values.filter(function(T,I){return!(I in w.failures)})),v)}function h0(p,v){return w=p,((_=v).lower===void 0||(_.lowerOpen?0<Ht(w,_.lower):0<=Ht(w,_.lower)))&&(p=p,(v=v).upper===void 0||(v.upperOpen?Ht(p,v.upper)<0:Ht(p,v.upper)<=0));var w,_}function vL(p,v,ae,_,T,I){if(!ae||ae.length===0)return p;var L=v.query.index,U=L.multiEntry,J=v.query.range,ee=_.schema.primaryKey.extractKey,oe=L.extractKey,j=(L.lowLevelIndex||L).extractKey,ae=ae.reduce(function(Q,ie){var se=Q,ne=[];if(ie.type==="add"||ie.type==="put")for(var he=new vi,ge=ie.values.length-1;0<=ge;--ge){var me,_e=ie.values[ge],Ge=ee(_e);he.hasKey(Ge)||(me=oe(_e),(U&&a(me)?me.some(function(qe){return h0(qe,J)}):h0(me,J))&&(he.addKey(Ge),ne.push(_e)))}switch(ie.type){case"add":var Ze=new vi().addKeys(v.values?Q.map(function(st){return ee(st)}):Q),se=Q.concat(v.values?ne.filter(function(st){return st=ee(st),!Ze.hasKey(st)&&(Ze.addKey(st),!0)}):ne.map(function(st){return ee(st)}).filter(function(st){return!Ze.hasKey(st)&&(Ze.addKey(st),!0)}));break;case"put":var $e=new vi().addKeys(ie.values.map(function(st){return ee(st)}));se=Q.filter(function(st){return!$e.hasKey(v.values?ee(st):st)}).concat(v.values?ne:ne.map(function(st){return ee(st)}));break;case"delete":var Ue=new vi().addKeys(ie.keys);se=Q.filter(function(st){return!Ue.hasKey(v.values?ee(st):st)});break;case"deleteRange":var Qe=ie.range;se=Q.filter(function(st){return!h0(ee(st),Qe)})}return se},p);return ae===p?p:(ae.sort(function(Q,ie){return Ht(j(Q),j(ie))||Ht(ee(Q),ee(ie))}),v.limit&&v.limit<1/0&&(ae.length>v.limit?ae.length=v.limit:p.length===v.limit&&ae.length<v.limit&&(T.dirty=!0)),I?Object.freeze(ae):ae)}function yL(p,v){return Ht(p.lower,v.lower)===0&&Ht(p.upper,v.upper)===0&&!!p.lowerOpen==!!v.lowerOpen&&!!p.upperOpen==!!v.upperOpen}function hhe(p,v){return function(w,_,T,I){if(w===void 0)return _!==void 0?-1:0;if(_===void 0)return 1;if((_=Ht(w,_))===0){if(T&&I)return 0;if(T)return 1;if(I)return-1}return _}(p.lower,v.lower,p.lowerOpen,v.lowerOpen)<=0&&0<=function(w,_,T,I){if(w===void 0)return _!==void 0?1:0;if(_===void 0)return-1;if((_=Ht(w,_))===0){if(T&&I)return 0;if(T)return-1;if(I)return 1}return _}(p.upper,v.upper,p.upperOpen,v.upperOpen)}function fhe(p,v,w,_){p.subscribers.add(w),_.addEventListener("abort",function(){var T,I;p.subscribers.delete(w),p.subscribers.size===0&&(T=p,I=v,setTimeout(function(){T.subscribers.size===0&&Z(I,T)},3e3))})}var phe={stack:"dbcore",level:0,name:"Cache",create:function(p){var v=p.schema.name;return i(i({},p),{transaction:function(w,_,T){var I,L,U=p.transaction(w,_,T);return _==="readwrite"&&(L=(I=new AbortController).signal,T=function(J){return function(){if(I.abort(),_==="readwrite"){for(var ee=new Set,oe=0,j=w;oe<j.length;oe++){var ae=j[oe],Q=_l["idb://".concat(v,"/").concat(ae)];if(Q){var ie=p.table(ae),se=Q.optimisticOps.filter(function(st){return st.trans===U});if(U._explicit&&J&&U.mutatedParts)for(var ne=0,he=Object.values(Q.queries.query);ne<he.length;ne++)for(var ge=0,me=(Ze=he[ne]).slice();ge<me.length;ge++)s0(($e=me[ge]).obsSet,U.mutatedParts)&&(Z(Ze,$e),$e.subscribers.forEach(function(st){return ee.add(st)}));else if(0<se.length){Q.optimisticOps=Q.optimisticOps.filter(function(st){return st.trans!==U});for(var _e=0,Ge=Object.values(Q.queries.query);_e<Ge.length;_e++)for(var Ze,$e,Ue,Qe=0,qe=(Ze=Ge[_e]).slice();Qe<qe.length;Qe++)($e=qe[Qe]).res!=null&&U.mutatedParts&&(J&&!$e.dirty?(Ue=Object.isFrozen($e.res),Ue=vL($e.res,$e.req,se,ie,$e,Ue),$e.dirty?(Z(Ze,$e),$e.subscribers.forEach(function(st){return ee.add(st)})):Ue!==$e.res&&($e.res=Ue,$e.promise=Pe.resolve({result:Ue}))):($e.dirty&&Z(Ze,$e),$e.subscribers.forEach(function(st){return ee.add(st)})))}}}ee.forEach(function(st){return st()})}}},U.addEventListener("abort",T(!1),{signal:L}),U.addEventListener("error",T(!1),{signal:L}),U.addEventListener("complete",T(!0),{signal:L})),U},table:function(w){var _=p.table(w),T=_.schema.primaryKey;return i(i({},_),{mutate:function(I){var L=Re.trans;if(T.outbound||L.db._options.cache==="disabled"||L.explicit||L.idbtrans.mode!=="readwrite")return _.mutate(I);var U=_l["idb://".concat(v,"/").concat(w)];return U?(L=_.mutate(I),I.type!=="add"&&I.type!=="put"||!(50<=I.values.length||d0(T,I).some(function(J){return J==null}))?(U.optimisticOps.push(I),I.mutatedParts&&Mm(I.mutatedParts),L.then(function(J){0<J.numFailures&&(Z(U.optimisticOps,I),(J=mL(0,I,J))&&U.optimisticOps.push(J),I.mutatedParts&&Mm(I.mutatedParts))}),L.catch(function(){Z(U.optimisticOps,I),I.mutatedParts&&Mm(I.mutatedParts)})):L.then(function(J){var ee=mL(0,i(i({},I),{values:I.values.map(function(oe,j){var ae;return J.failures[j]?oe:(oe=(ae=T.keyPath)!==null&&ae!==void 0&&ae.includes(".")?V(oe):i({},oe),x(oe,T.keyPath,J.results[j]),oe)})}),J);U.optimisticOps.push(ee),queueMicrotask(function(){return I.mutatedParts&&Mm(I.mutatedParts)})}),L):_.mutate(I)},query:function(I){if(!pL(Re,_)||!gL("query",I))return _.query(I);var L=((ee=Re.trans)===null||ee===void 0?void 0:ee.db._options.cache)==="immutable",j=Re,U=j.requery,J=j.signal,ee=function(ie,se,ne,he){var ge=_l["idb://".concat(ie,"/").concat(se)];if(!ge)return[];if(!(se=ge.queries[ne]))return[null,!1,ge,null];var me=se[(he.query?he.query.index.name:null)||""];if(!me)return[null,!1,ge,null];switch(ne){case"query":var _e=me.find(function(Ge){return Ge.req.limit===he.limit&&Ge.req.values===he.values&&yL(Ge.req.query.range,he.query.range)});return _e?[_e,!0,ge,me]:[me.find(function(Ge){return("limit"in Ge.req?Ge.req.limit:1/0)>=he.limit&&(!he.values||Ge.req.values)&&hhe(Ge.req.query.range,he.query.range)}),!1,ge,me];case"count":return _e=me.find(function(Ge){return yL(Ge.req.query.range,he.query.range)}),[_e,!!_e,ge,me]}}(v,w,"query",I),oe=ee[0],j=ee[1],ae=ee[2],Q=ee[3];return oe&&j?oe.obsSet=I.obsSet:(j=_.query(I).then(function(ie){var se=ie.result;if(oe&&(oe.res=se),L){for(var ne=0,he=se.length;ne<he;++ne)Object.freeze(se[ne]);Object.freeze(se)}else ie.result=V(se);return ie}).catch(function(ie){return Q&&oe&&Z(Q,oe),Promise.reject(ie)}),oe={obsSet:I.obsSet,promise:j,subscribers:new Set,type:"query",req:I,dirty:!1},Q?Q.push(oe):(Q=[oe],(ae=ae||(_l["idb://".concat(v,"/").concat(w)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[I.query.index.name||""]=Q)),fhe(oe,Q,U,J),oe.promise.then(function(ie){return{result:vL(ie.result,I,ae==null?void 0:ae.optimisticOps,_,oe,L)}})}})}})}};function Nm(p,v){return new Proxy(p,{get:function(w,_,T){return _==="db"?v:Reflect.get(w,_,T)}})}var Rr=(Nn.prototype.version=function(p){if(isNaN(p)||p<.1)throw new He.Type("Given version is not a positive number");if(p=Math.round(10*p)/10,this.idbdb||this._state.isBeingOpened)throw new He.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,p);var v=this._versions,w=v.filter(function(_){return _._cfg.version===p})[0];return w||(w=new this.Version(p),v.push(w),v.sort(ihe),w.stores({}),this._state.autoSchema=!1,w)},Nn.prototype._whenReady=function(p){var v=this;return this.idbdb&&(this._state.openComplete||Re.letThrough||this._vip)?p():new Pe(function(w,_){if(v._state.openComplete)return _(new He.DatabaseClosed(v._state.dbOpenError));if(!v._state.isBeingOpened){if(!v._state.autoOpen)return void _(new He.DatabaseClosed);v.open().catch(At)}v._state.dbReadyPromise.then(w,_)}).then(p)},Nn.prototype.use=function(p){var v=p.stack,w=p.create,_=p.level,T=p.name;return T&&this.unuse({stack:v,name:T}),p=this._middlewares[v]||(this._middlewares[v]=[]),p.push({stack:v,create:w,level:_??10,name:T}),p.sort(function(I,L){return I.level-L.level}),this},Nn.prototype.unuse=function(p){var v=p.stack,w=p.name,_=p.create;return v&&this._middlewares[v]&&(this._middlewares[v]=this._middlewares[v].filter(function(T){return _?T.create!==_:!!w&&T.name!==w})),this},Nn.prototype.open=function(){var p=this;return El(ye,function(){return ahe(p)})},Nn.prototype._close=function(){var p=this._state,v=lu.indexOf(this);if(0<=v&&lu.splice(v,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}p.isBeingOpened||(p.dbReadyPromise=new Pe(function(w){p.dbReadyResolve=w}),p.openCanceller=new Pe(function(w,_){p.cancelOpen=_}))},Nn.prototype.close=function(w){var v=(w===void 0?{disableAutoOpen:!0}:w).disableAutoOpen,w=this._state;v?(w.isBeingOpened&&w.cancelOpen(new He.DatabaseClosed),this._close(),w.autoOpen=!1,w.dbOpenError=new He.DatabaseClosed):(this._close(),w.autoOpen=this._options.autoOpen||w.isBeingOpened,w.openComplete=!1,w.dbOpenError=null)},Nn.prototype.delete=function(p){var v=this;p===void 0&&(p={disableAutoOpen:!0});var w=0<arguments.length&&typeof arguments[0]!="object",_=this._state;return new Pe(function(T,I){function L(){v.close(p);var U=v._deps.indexedDB.deleteDatabase(v.name);U.onsuccess=wn(function(){var J,ee,oe;J=v._deps,ee=v.name,oe=J.indexedDB,J=J.IDBKeyRange,n0(oe)||ee===Sm||t0(oe,J).delete(ee).catch(At),T()}),U.onerror=Ns(I),U.onblocked=v._fireOnBlocked}if(w)throw new He.InvalidArgument("Invalid closeOptions argument to db.delete()");_.isBeingOpened?_.dbReadyPromise.then(L):L()})},Nn.prototype.backendDB=function(){return this.idbdb},Nn.prototype.isOpen=function(){return this.idbdb!==null},Nn.prototype.hasBeenClosed=function(){var p=this._state.dbOpenError;return p&&p.name==="DatabaseClosed"},Nn.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Nn.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Nn.prototype,"tables",{get:function(){var p=this;return r(this._allTables).map(function(v){return p._allTables[v]})},enumerable:!1,configurable:!0}),Nn.prototype.transaction=function(){var p=(function(v,w,_){var T=arguments.length;if(T<2)throw new He.InvalidArgument("Too few arguments");for(var I=new Array(T-1);--T;)I[T-1]=arguments[T];return _=I.pop(),[v,A(I),_]}).apply(this,arguments);return this._transaction.apply(this,p)},Nn.prototype._transaction=function(p,v,w){var _=this,T=Re.trans;T&&T.db===this&&p.indexOf("!")===-1||(T=null);var I,L,U=p.indexOf("?")!==-1;p=p.replace("!","").replace("?","");try{if(L=v.map(function(ee){if(ee=ee instanceof _.Table?ee.name:ee,typeof ee!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return ee}),p=="r"||p===WS)I=WS;else{if(p!="rw"&&p!=US)throw new He.InvalidArgument("Invalid transaction mode: "+p);I=US}if(T){if(T.mode===WS&&I===US){if(!U)throw new He.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");T=null}T&&L.forEach(function(ee){if(T&&T.storeNames.indexOf(ee)===-1){if(!U)throw new He.SubTransaction("Table "+ee+" not included in parent transaction.");T=null}}),U&&T&&!T.active&&(T=null)}}catch(ee){return T?T._promise(null,function(oe,j){j(ee)}):Ln(ee)}var J=(function ee(oe,j,ae,Q,ie){return Pe.resolve().then(function(){var se=Re.transless||Re,ne=oe._createTransaction(j,ae,oe._dbSchema,Q);if(ne.explicit=!0,se={trans:ne,transless:se},Q)ne.idbtrans=Q.idbtrans;else try{ne.create(),ne.idbtrans._explicit=!0,oe._state.PR1398_maxLoop=3}catch(me){return me.name===gt.InvalidState&&oe.isOpen()&&0<--oe._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),oe.close({disableAutoOpen:!1}),oe.open().then(function(){return ee(oe,j,ae,null,ie)})):Ln(me)}var he,ge=ue(ie);return ge&&au(),se=Pe.follow(function(){var me;(he=ie.call(ne,ne))&&(ge?(me=ha.bind(null,null),he.then(me,me)):typeof he.next=="function"&&typeof he.throw=="function"&&(he=c0(he)))},se),(he&&typeof he.then=="function"?Pe.resolve(he).then(function(me){return ne.active?me:Ln(new He.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):se.then(function(){return he})).then(function(me){return Q&&ne._resolve(),ne._completion.then(function(){return me})}).catch(function(me){return ne._reject(me),Ln(me)})})}).bind(null,this,I,L,T,w);return T?T._promise(I,J,"lock"):Re.trans?El(Re.transless,function(){return _._whenReady(J)}):this._whenReady(J)},Nn.prototype.table=function(p){if(!d(this._allTables,p))throw new He.InvalidTable("Table ".concat(p," does not exist"));return this._allTables[p]},Nn);function Nn(p,v){var w=this;this._middlewares={},this.verno=0;var _=Nn.dependencies;this._options=v=i({addons:Nn.addons,autoOpen:!0,indexedDB:_.indexedDB,IDBKeyRange:_.IDBKeyRange,cache:"cloned"},v),this._deps={indexedDB:v.indexedDB,IDBKeyRange:v.IDBKeyRange},_=v.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var T,I,L,U,J,ee={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:At,dbReadyPromise:null,cancelOpen:At,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:v.autoOpen};ee.dbReadyPromise=new Pe(function(j){ee.dbReadyResolve=j}),ee.openCanceller=new Pe(function(j,ae){ee.cancelOpen=ae}),this._state=ee,this.name=p,this.on=xh(this,"populate","blocked","versionchange","close",{ready:[Ne,At]}),this.on.ready.subscribe=F(this.on.ready.subscribe,function(j){return function(ae,Q){Nn.vip(function(){var ie,se=w._state;se.openComplete?(se.dbOpenError||Pe.resolve().then(ae),Q&&j(ae)):se.onReadyBeingFired?(se.onReadyBeingFired.push(ae),Q&&j(ae)):(j(ae),ie=w,Q||j(function ne(){ie.on.ready.unsubscribe(ae),ie.on.ready.unsubscribe(ne)}))})}}),this.Collection=(T=this,Fh(Zde.prototype,function(he,ne){this.db=T;var Q=YM,ie=null;if(ne)try{Q=ne()}catch(ge){ie=ge}var se=he._ctx,ne=se.table,he=ne.hook.reading.fire;this._ctx={table:ne,index:se.index,isPrimKey:!se.index||ne.schema.primKey.keyPath&&se.index===ne.schema.primKey.name,range:Q,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:ie,or:se.or,valueMapper:he!==N?he:null}})),this.Table=(I=this,Fh(QM.prototype,function(j,ae,Q){this.db=I,this._tx=Q,this.name=j,this.schema=ae,this.hook=I._allTables[j]?I._allTables[j].hook:xh(null,{creating:[ke,At],reading:[X,N],updating:[Fe,At],deleting:[De,At]})})),this.Transaction=(L=this,Fh(Qde.prototype,function(j,ae,Q,ie,se){var ne=this;this.db=L,this.mode=j,this.storeNames=ae,this.schema=Q,this.chromeTransactionDurability=ie,this.idbtrans=null,this.on=xh(this,"complete","error","abort"),this.parent=se||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Pe(function(he,ge){ne._resolve=he,ne._reject=ge}),this._completion.then(function(){ne.active=!1,ne.on.complete.fire()},function(he){var ge=ne.active;return ne.active=!1,ne.on.error.fire(he),ne.parent?ne.parent._reject(he):ge&&ne.idbtrans&&ne.idbtrans.abort(),Ln(he)})})),this.Version=(U=this,Fh(rhe.prototype,function(j){this.db=U,this._cfg={version:j,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(J=this,Fh(oL.prototype,function(j,ae,Q){if(this.db=J,this._ctx={table:j,index:ae===":id"?null:ae,or:Q},this._cmp=this._ascending=Ht,this._descending=function(ie,se){return Ht(se,ie)},this._max=function(ie,se){return 0<Ht(ie,se)?ie:se},this._min=function(ie,se){return Ht(ie,se)<0?ie:se},this._IDBKeyRange=J._deps.IDBKeyRange,!this._IDBKeyRange)throw new He.MissingAPI})),this.on("versionchange",function(j){0<j.newVersion?console.warn("Another connection wants to upgrade database '".concat(w.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(w.name,"'. Closing db now to resume the delete request.")),w.close({disableAutoOpen:!1})}),this.on("blocked",function(j){!j.newVersion||j.newVersion<j.oldVersion?console.warn("Dexie.delete('".concat(w.name,"') was blocked")):console.warn("Upgrade '".concat(w.name,"' blocked by other connection holding version ").concat(j.oldVersion/10))}),this._maxKey=Ah(v.IDBKeyRange),this._createTransaction=function(j,ae,Q,ie){return new w.Transaction(j,ae,Q,w._options.chromeTransactionDurability,ie)},this._fireOnBlocked=function(j){w.on("blocked").fire(j),lu.filter(function(ae){return ae.name===w.name&&ae!==w&&!ae._state.vcFired}).map(function(ae){return ae.on("versionchange").fire(j)})},this.use(uhe),this.use(phe),this.use(dhe),this.use(lhe),this.use(che);var oe=new Proxy(this,{get:function(j,ae,Q){if(ae==="_vip")return!0;if(ae==="table")return function(se){return Nm(w.table(se),oe)};var ie=Reflect.get(j,ae,Q);return ie instanceof QM?Nm(ie,oe):ae==="tables"?ie.map(function(se){return Nm(se,oe)}):ae==="_createTransaction"?function(){return Nm(ie.apply(this,arguments),oe)}:ie}});this.vip=oe,_.forEach(function(j){return j(w)})}var Vm,Io=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",ghe=(f0.prototype.subscribe=function(p,v,w){return this._subscribe(p&&typeof p!="function"?p:{next:p,error:v,complete:w})},f0.prototype[Io]=function(){return this},f0);function f0(p){this._subscribe=p}try{Vm={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch{Vm={indexedDB:null,IDBKeyRange:null}}function CL(p){var v,w=!1,_=new ghe(function(T){var I=ue(p),L,U=!1,J={},ee={},oe={get closed(){return U},unsubscribe:function(){U||(U=!0,L&&L.abort(),j&&ga.storagemutated.unsubscribe(Q))}};T.start&&T.start(oe);var j=!1,ae=function(){return $S(ie)},Q=function(se){Om(J,se),s0(ee,J)&&ae()},ie=function(){var se,ne,he;!U&&Vm.indexedDB&&(J={},se={},L&&L.abort(),L=new AbortController,he=function(ge){var me=ns();try{I&&au();var _e=da(p,ge);return _e=I?_e.finally(ha):_e}finally{me&&Pi()}}(ne={subscr:se,signal:L.signal,requery:ae,querier:p,trans:null}),Promise.resolve(he).then(function(ge){w=!0,v=ge,U||ne.signal.aborted||(J={},function(me){for(var _e in me)if(d(me,_e))return;return 1}(ee=se)||j||(ga(Ih,Q),j=!0),$S(function(){return!U&&T.next&&T.next(ge)}))},function(ge){w=!1,["DatabaseClosedError","AbortError"].includes(ge==null?void 0:ge.name)||U||$S(function(){U||T.error&&T.error(ge)})}))};return setTimeout(ae,0),oe});return _.hasValue=function(){return w},_.getValue=function(){return v},_}var xl=Rr;function p0(p){var v=ma;try{ma=!0,ga.storagemutated.fire(p),l0(p,!0)}finally{ma=v}}h(xl,i(i({},tn),{delete:function(p){return new xl(p,{addons:[]}).delete()},exists:function(p){return new xl(p,{addons:[]}).open().then(function(v){return v.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(p){try{return v=xl.dependencies,w=v.indexedDB,v=v.IDBKeyRange,(n0(w)?Promise.resolve(w.databases()).then(function(_){return _.map(function(T){return T.name}).filter(function(T){return T!==Sm})}):t0(w,v).toCollection().primaryKeys()).then(p)}catch{return Ln(new He.MissingAPI)}var v,w},defineClass:function(){return function(p){l(this,p)}},ignoreTransaction:function(p){return Re.trans?El(Re.transless,p):p()},vip:i0,async:function(p){return function(){try{var v=c0(p.apply(this,arguments));return v&&typeof v.then=="function"?v:Pe.resolve(v)}catch(w){return Ln(w)}}},spawn:function(p,v,w){try{var _=c0(p.apply(w,v||[]));return _&&typeof _.then=="function"?_:Pe.resolve(_)}catch(T){return Ln(T)}},currentTransaction:{get:function(){return Re.trans||null}},waitFor:function(p,v){return v=Pe.resolve(typeof p=="function"?xl.ignoreTransaction(p):p).timeout(v||6e4),Re.trans?Re.trans.waitFor(v):v},Promise:Pe,debug:{get:function(){return Ae},set:function(p){Te(p)}},derive:m,extend:l,props:h,override:F,Events:xh,on:ga,liveQuery:CL,extendObservabilitySet:Om,getByKeyPath:E,setByKeyPath:x,delByKeyPath:function(p,v){typeof v=="string"?x(p,v,void 0):"length"in v&&[].map.call(v,function(w){x(p,w,void 0)})},shallowClone:k,deepClone:V,getObjectDiff:u0,cmp:Ht,asap:R,minKey:-1/0,addons:[],connections:lu,errnames:gt,dependencies:Vm,cache:_l,semVer:"4.0.10",version:"4.0.10".split(".").map(function(p){return parseInt(p)}).reduce(function(p,v,w){return p+v/Math.pow(10,2*w)})})),xl.maxKey=Ah(xl.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(ga(Ih,function(p){ma||(p=new CustomEvent(qS,{detail:p}),ma=!0,dispatchEvent(p),ma=!1)}),addEventListener(qS,function(p){p=p.detail,ma||p0(p)}));var du,ma=!1,wL=function(){};return typeof BroadcastChannel<"u"&&((wL=function(){(du=new BroadcastChannel(qS)).onmessage=function(p){return p.data&&p0(p.data)}})(),typeof du.unref=="function"&&du.unref(),ga(Ih,function(p){ma||du.postMessage(p)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(p){if(!Rr.disableBfCache&&p.persisted){Ae&&console.debug("Dexie: handling persisted pagehide"),du!=null&&du.close();for(var v=0,w=lu;v<w.length;v++)w[v].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(p){!Rr.disableBfCache&&p.persisted&&(Ae&&console.debug("Dexie: handling persisted pageshow"),wL(),p0({all:new vi(-1/0,[[]])}))})),Pe.rejectionMapper=function(p,v){return!p||p instanceof re||p instanceof TypeError||p instanceof SyntaxError||!p.name||!en[p.name]?p:(v=new en[p.name](v||p.message,p),"stack"in p&&g(v,"stack",{get:function(){return this.inner.stack}}),v)},Te(Ae),i(Rr,Object.freeze({__proto__:null,Dexie:Rr,liveQuery:CL,Entity:ZM,cmp:Ht,PropModSymbol:Er,PropModification:Th,replacePrefix:function(p,v){return new Th({replacePrefix:[p,v]})},add:function(p){return new Th({add:p})},remove:function(p){return new Th({remove:p})},default:Rr,RangeSet:vi,mergeRanges:Mh,rangesOverlap:cL}),{default:Rr}),Rr})})(zD);var ZH=zD.exports;const dy=YH(ZH),jD=Symbol.for("Dexie"),Ku=globalThis[jD]||(globalThis[jD]=dy);if(dy.semVer!==Ku.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${dy.semVer} and ${Ku.semVer}`);const{liveQuery:Rhe,mergeRanges:Dhe,rangesOverlap:_he,RangeSet:xhe,cmp:Fhe,Entity:The,PropModSymbol:Phe,PropModification:Ihe,replacePrefix:Ahe,add:khe,remove:Ohe}=Ku;class KD extends Ku{constructor(n){super(n);bn(this,"icons");bn(this,"visuals");bn(this,"users");bn(this,"columns");bn(this,"general");this.version(1).stores({icons:"key",visuals:"key",users:"key",columns:"key",general:"key"})}getTable(n){return this[n]?this[n]:this.general}}const Hf=new Map,XH=async e=>{if(!Hf.has(e)){const t=new KD(e);try{await t.open(),Hf.set(e,t)}catch(n){console.error("Failed to open database, attempting to delete and recreate:",n);try{await Ku.delete(e);const i=new KD(e);await i.open(),Hf.set(e,i)}catch(i){throw console.error("Failed to delete and recreate database:",i),i}}}return Hf.get(e)},qu=({dbName:e,storeName:t})=>{const n=async()=>(await XH(e)).getTable(t);return{getCachedValue:async c=>{try{const u=await n();if(!u){console.error(`Store is undefined for key: ${c}`);return}const d=await u.get(c);return d==null?void 0:d.value}catch(u){console.error("Failed to get cached value:",u);return}},setCachedValue:async(c,u)=>{try{const d=await n();if(!d){console.error(`Store is undefined, cannot cache key: ${c}`);return}await d.put({key:c,value:u,timestamp:Date.now()})}catch(d){console.error("Failed to cache value:",d)}},deleteCachedValue:async c=>{try{const u=await n();if(!u){console.error(`Store is undefined, cannot delete key: ${c}`);return}await u.delete(c)}catch(u){console.error("Failed to delete cached value:",u)}},clearCache:async()=>{try{const c=await n();if(!c){console.error("Store is undefined, cannot clear cache");return}await c.clear()}catch(c){console.error("Failed to clear cache:",c)}},getAllKeys:async()=>{try{const c=await n();return c?(await c.toArray()).map(d=>d.key):(console.error("Store is undefined, cannot get all keys"),[])}catch(c){return console.error("Failed to get all keys:",c),[]}},getCachedValueWithTimestamp:async c=>{try{const u=await n();if(!u){console.error(`Store is undefined for key: ${c}`);return}return await u.get(c)}catch(u){console.error("Failed to get cached value with timestamp:",u);return}}}},JH="AvatarCache",QH="images",Na={},Gf={},eG=()=>{const{getCachedValue:e,setCachedValue:t}=qu({dbName:JH,storeName:QH}),n=a=>new Promise((l,c)=>{const u=new FileReader;u.onloadend=()=>l(u.result),u.onerror=c,u.readAsDataURL(a)}),i=async a=>{try{if(Na[a])return Na[a];if(Gf[a])return await Gf[a];const l=(async()=>{try{const c=await e(a);if(!c||!(c instanceof Blob))return null;const u=await n(c);return Na[a]=u,u}catch(c){return console.warn(`Failed to get cached image for key: ${a}`,c),null}})();return Gf[a]=l,l.finally(()=>{delete Gf[a]}),await l}catch(l){return console.error(`Error in getCachedImage for key: ${a}`,l),null}},o=a=>new Promise((l,c)=>{new qH(a,{width:96,height:96,quality:1,success(u){l(u)},error(u){console.error("Image compression failed:",u.message),c(u)}})});return{getCachedImage:i,setCachedImage:async(a,l)=>{try{const c=await o(l);await t(a,c);const u=await n(c);Na[a]=u}catch(c){throw console.error(`Failed to cache image for key: ${a}`,c),c}},clearMemoryCache:a=>{try{a?delete Na[a]:Object.keys(Na).forEach(l=>delete Na[l])}catch(l){console.error("Error clearing memory cache:",l)}}}},Yu=new Map,ps=new Map,Jl=new Map,tG=5*60*1e3,qD=100;function nG(){const e=Date.now(),t=[];Jl.forEach((n,i)=>{e-n>tG&&t.push(i)}),t.forEach(n=>{Yu.delete(n),Jl.delete(n),ps.delete(n)})}function iG(){if(Jl.size<=qD)return;const e=Array.from(Jl.entries()).sort((n,i)=>n[1]-i[1]);e.slice(0,e.length-qD).forEach(([n])=>{Yu.delete(n),Jl.delete(n),ps.delete(n)})}const oG=(e,t)=>{const n=ps.get(e);return n==null||n.forEach(i=>i(t)),ps.delete(e),t};async function sG({userId:e,avatarUrl:t,cacheInterface:n,onLoadingChange:i}){const o=await n.getCachedImage(e),s=Yu.has(e),r=ps.has(e);if(o)return oG(e,o);if(nG(),s)return new Promise(c=>{r||ps.set(e,[]),ps.get(e).push(c)});const a=(async()=>{let c=null,u=null;try{const d=Math.random()*300;await new Promise(f=>setTimeout(f,d)),i==null||i(!0);const h=await fetch(t,{cache:"no-cache"});if(!h.ok)throw new Error("Failed to fetch image");return c=await h.blob(),await n.setCachedImage(e,c),u=URL.createObjectURL(c),u}catch(d){throw console.error("Error loading avatar image:",d),d}finally{c=null,i==null||i(!1),Jl.set(e,Date.now()),setTimeout(()=>{Yu.delete(e),iG()},100)}})();Yu.set(e,a);const l=await a;return ps.has(e)&&(ps.get(e).forEach(u=>u(l)),ps.delete(e)),l}const rG=(e,t=3,n=1e3)=>{const i=Y(0),o=Y(!1),s=Y(!1),r=async()=>{try{await e()}catch(a){if(i.value<t)return i.value++,s.value=!0,await new Promise(l=>setTimeout(l,n)),r();throw o.value=!0,a}};return{retry:r,currentAttempt:i,errorRetry:o,isRetrying:s}};function ti(e,t){aG(e)&&(e="100%");const n=lG(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function $f(e){return Math.min(1,Math.max(0,e))}function aG(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function lG(e){return typeof e=="string"&&e.indexOf("%")!==-1}function YD(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Wf(e){return Number(e)<=1?`${Number(e)*100}%`:e}function Va(e){return e.length===1?"0"+e:String(e)}function cG(e,t,n){return{r:ti(e,255)*255,g:ti(t,255)*255,b:ti(n,255)*255}}function ZD(e,t,n){e=ti(e,255),t=ti(t,255),n=ti(n,255);const i=Math.max(e,t,n),o=Math.min(e,t,n);let s=0,r=0;const a=(i+o)/2;if(i===o)r=0,s=0;else{const l=i-o;switch(r=a>.5?l/(2-i-o):l/(i+o),i){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:r,l:a}}function hy(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function uG(e,t,n){let i,o,s;if(e=ti(e,360),t=ti(t,100),n=ti(n,100),t===0)o=n,s=n,i=n;else{const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=hy(a,r,e+1/3),o=hy(a,r,e),s=hy(a,r,e-1/3)}return{r:i*255,g:o*255,b:s*255}}function XD(e,t,n){e=ti(e,255),t=ti(t,255),n=ti(n,255);const i=Math.max(e,t,n),o=Math.min(e,t,n);let s=0;const r=i,a=i-o,l=i===0?0:a/i;if(i===o)s=0;else{switch(i){case e:s=(t-n)/a+(t<n?6:0);break;case t:s=(n-e)/a+2;break;case n:s=(e-t)/a+4;break}s/=6}return{h:s,s:l,v:r}}function dG(e,t,n){e=ti(e,360)*6,t=ti(t,100),n=ti(n,100);const i=Math.floor(e),o=e-i,s=n*(1-t),r=n*(1-o*t),a=n*(1-(1-o)*t),l=i%6,c=[n,r,s,s,a,n][l],u=[a,n,n,r,s,s][l],d=[s,s,a,n,n,r][l];return{r:c*255,g:u*255,b:d*255}}function JD(e,t,n,i){const o=[Va(Math.round(e).toString(16)),Va(Math.round(t).toString(16)),Va(Math.round(n).toString(16))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function hG(e,t,n,i,o){const s=[Va(Math.round(e).toString(16)),Va(Math.round(t).toString(16)),Va(Math.round(n).toString(16)),Va(pG(i))];return o&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function fG(e,t,n,i){const o=e/100,s=t/100,r=n/100,a=i/100,l=255*(1-o)*(1-a),c=255*(1-s)*(1-a),u=255*(1-r)*(1-a);return{r:l,g:c,b:u}}function QD(e,t,n){let i=1-e/255,o=1-t/255,s=1-n/255,r=Math.min(i,o,s);return r===1?(i=0,o=0,s=0):(i=(i-r)/(1-r)*100,o=(o-r)/(1-r)*100,s=(s-r)/(1-r)*100),r*=100,{c:Math.round(i),m:Math.round(o),y:Math.round(s),k:Math.round(r)}}function pG(e){return Math.round(parseFloat(e)*255).toString(16)}function e_(e){return Ki(e)/255}function Ki(e){return parseInt(e,16)}function gG(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}const fy={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function mG(e){let t={r:0,g:0,b:0},n=1,i=null,o=null,s=null,r=!1,a=!1;return typeof e=="string"&&(e=vG(e)),typeof e=="object"&&(qi(e.r)&&qi(e.g)&&qi(e.b)?(t=cG(e.r,e.g,e.b),r=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):qi(e.h)&&qi(e.s)&&qi(e.v)?(i=Wf(e.s),o=Wf(e.v),t=dG(e.h,i,o),r=!0,a="hsv"):qi(e.h)&&qi(e.s)&&qi(e.l)?(i=Wf(e.s),s=Wf(e.l),t=uG(e.h,i,s),r=!0,a="hsl"):qi(e.c)&&qi(e.m)&&qi(e.y)&&qi(e.k)&&(t=fG(e.c,e.m,e.y,e.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=YD(n),{ok:r,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}const Lr="(?:"+"[-\\+]?\\d*\\.\\d+%?"+")|(?:"+"[-\\+]?\\d+%?"+")",py="[\\s|\\(]+("+Lr+")[,|\\s]+("+Lr+")[,|\\s]+("+Lr+")\\s*\\)?",Uf="[\\s|\\(]+("+Lr+")[,|\\s]+("+Lr+")[,|\\s]+("+Lr+")[,|\\s]+("+Lr+")\\s*\\)?",ho={CSS_UNIT:new RegExp(Lr),rgb:new RegExp("rgb"+py),rgba:new RegExp("rgba"+Uf),hsl:new RegExp("hsl"+py),hsla:new RegExp("hsla"+Uf),hsv:new RegExp("hsv"+py),hsva:new RegExp("hsva"+Uf),cmyk:new RegExp("cmyk"+Uf),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function vG(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(fy[e])e=fy[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=ho.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ho.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ho.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ho.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ho.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ho.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ho.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=ho.hex8.exec(e),n?{r:Ki(n[1]),g:Ki(n[2]),b:Ki(n[3]),a:e_(n[4]),format:t?"name":"hex8"}:(n=ho.hex6.exec(e),n?{r:Ki(n[1]),g:Ki(n[2]),b:Ki(n[3]),format:t?"name":"hex"}:(n=ho.hex4.exec(e),n?{r:Ki(n[1]+n[1]),g:Ki(n[2]+n[2]),b:Ki(n[3]+n[3]),a:e_(n[4]+n[4]),format:t?"name":"hex8"}:(n=ho.hex3.exec(e),n?{r:Ki(n[1]+n[1]),g:Ki(n[2]+n[2]),b:Ki(n[3]+n[3]),format:t?"name":"hex"}:!1))))))))))}function qi(e){return typeof e=="number"?!Number.isNaN(e):ho.CSS_UNIT.test(e)}class En{constructor(t="",n={}){if(t instanceof En)return t;typeof t=="number"&&(t=gG(t)),this.originalInput=t;const i=mG(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3}getLuminance(){const t=this.toRgb();let n,i,o;const s=t.r/255,r=t.g/255,a=t.b/255;return s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*i+.0722*o}getAlpha(){return this.a}setAlpha(t){return this.a=YD(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=XD(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=XD(this.r,this.g,this.b),n=Math.round(t.h*360),i=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?`hsv(${n}, ${i}%, ${o}%)`:`hsva(${n}, ${i}%, ${o}%, ${this.roundA})`}toHsl(){const t=ZD(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=ZD(this.r,this.g,this.b),n=Math.round(t.h*360),i=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?`hsl(${n}, ${i}%, ${o}%)`:`hsla(${n}, ${i}%, ${o}%, ${this.roundA})`}toHex(t=!1){return JD(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return hG(this.r,this.g,this.b,this.a,t)}toHex8String(t=!1){return"#"+this.toHex8(t)}toHexShortString(t=!1){return this.a===1?this.toHexString(t):this.toHex8String(t)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const t=Math.round(this.r),n=Math.round(this.g),i=Math.round(this.b);return this.a===1?`rgb(${t}, ${n}, ${i})`:`rgba(${t}, ${n}, ${i}, ${this.roundA})`}toPercentageRgb(){const t=n=>`${Math.round(ti(n,255)*100)}%`;return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}}toPercentageRgbString(){const t=n=>Math.round(ti(n,255)*100);return this.a===1?`rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)`:`rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`}toCmyk(){return{...QD(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:n,y:i,k:o}=QD(this.r,this.g,this.b);return`cmyk(${t}, ${n}, ${i}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const t="#"+JD(this.r,this.g,this.b,!1);for(const[n,i]of Object.entries(fy))if(t===i)return n;return!1}toString(t){const n=!!t;t=t??this.format;let i=!1;const o=this.a<1&&this.a>=0;return!n&&o&&(t.startsWith("hex")||t==="name")?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(i=this.toRgbString()),t==="prgb"&&(i=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(i=this.toHexString()),t==="hex3"&&(i=this.toHexString(!0)),t==="hex4"&&(i=this.toHex8String(!0)),t==="hex8"&&(i=this.toHex8String()),t==="name"&&(i=this.toName()),t==="hsl"&&(i=this.toHslString()),t==="hsv"&&(i=this.toHsvString()),t==="cmyk"&&(i=this.toCmykString()),i||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new En(this.toString())}lighten(t=10){const n=this.toHsl();return n.l+=t/100,n.l=$f(n.l),new En(n)}brighten(t=10){const n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new En(n)}darken(t=10){const n=this.toHsl();return n.l-=t/100,n.l=$f(n.l),new En(n)}tint(t=10){return this.mix("white",t)}shade(t=10){return this.mix("black",t)}desaturate(t=10){const n=this.toHsl();return n.s-=t/100,n.s=$f(n.s),new En(n)}saturate(t=10){const n=this.toHsl();return n.s+=t/100,n.s=$f(n.s),new En(n)}greyscale(){return this.desaturate(100)}spin(t){const n=this.toHsl(),i=(n.h+t)%360;return n.h=i<0?360+i:i,new En(n)}mix(t,n=50){const i=this.toRgb(),o=new En(t).toRgb(),s=n/100,r={r:(o.r-i.r)*s+i.r,g:(o.g-i.g)*s+i.g,b:(o.b-i.b)*s+i.b,a:(o.a-i.a)*s+i.a};return new En(r)}analogous(t=6,n=30){const i=this.toHsl(),o=360/n,s=[this];for(i.h=(i.h-(o*t>>1)+720)%360;--t;)i.h=(i.h+o)%360,s.push(new En(i));return s}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new En(t)}monochromatic(t=6){const n=this.toHsv(),{h:i}=n,{s:o}=n;let{v:s}=n;const r=[],a=1/t;for(;t--;)r.push(new En({h:i,s:o,v:s})),s=(s+a)%1;return r}splitcomplement(){const t=this.toHsl(),{h:n}=t;return[this,new En({h:(n+72)%360,s:t.s,l:t.l}),new En({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){const n=this.toRgb(),i=new En(t).toRgb(),o=n.a+i.a*(1-n.a);return new En({r:(n.r*n.a+i.r*i.a*(1-n.a))/o,g:(n.g*n.a+i.g*i.a*(1-n.a))/o,b:(n.b*n.a+i.b*i.a*(1-n.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const n=this.toHsl(),{h:i}=n,o=[this],s=360/t;for(let r=1;r<t;r++)o.push(new En({h:(i+r*s)%360,s:n.s,l:n.l}));return o}equals(t){const n=new En(t);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function gy(e){return new En(e||"").isValid}function my(e,t){const{c1:n,c2:i}={c1:new En(e),c2:new En(t)};return n.equals(i)}const yG=["src","alt"],Zu=Ct(ct({__name:"Avatar",props:{name:{},id:{},profile_image:{},color:{},initial:{},isMe:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{default:24},isUseShortLabel:{type:Boolean,default:!0}},setup(e){const t=e,n=Y(""),i=Y(!1),o=Y(null),s=Y(!1),r=q(()=>({name:t.name||"",id:t.id||"",profile_image:t.profile_image||null,color:t.color||{bgColor:"#CCCCCC",textColor:"var(--background-color)"},initial:t.initial})),a=q(()=>{var R;const C=((R=r.value.color)==null?void 0:R.bgColor)||"#CCCCCC";return gy(C)?C:"#CCCCCC"}),l=q(()=>{var R;const C=((R=r.value.color)==null?void 0:R.textColor)||"var(--background-color)";return gy(C)?C:"var(--background-color)"}),c=q(()=>{if(!t.isUseShortLabel)return"";const{initial:C,name:R}=r.value;if(typeof C=="string"&&C.trim())return C.trim();if(!(R!=null&&R.trim()))return"";const E=R.trim().split(/\s+/).filter(Boolean);return E.length===1?E[0].slice(0,2).toUpperCase():(E[0][0]+E[1][0]).toUpperCase()}),u=q(()=>r.value.profile_image?"image":"text"),d=q(()=>({"--avatar-size":`${t.size}px`,"--avatar-bg":a.value,"--avatar-border":t.isMe?"var(--primary-color)":"#dcdcdc","--text-color":l.value})),h=()=>{n.value="",s.value=!0},{getCachedImage:f,setCachedImage:g}=eG(),m=async()=>{if(o.value&&o.value.abort(),n.value.startsWith("blob:")&&URL.revokeObjectURL(n.value),!r.value.id||!r.value.profile_image){n.value="";return}o.value=new AbortController;const C=o.value;try{const R=await sG({userId:r.value.id,avatarUrl:r.value.profile_image,cacheInterface:{getCachedImage:f,setCachedImage:g},onLoadingChange:E=>{C.signal.aborted||(i.value=E)}});if(!C.signal.aborted&&(n.value=R,R.length===0))throw console.warn("Loaded avatar image is empty, displaying initials instead."),h(),new Error("Empty image source")}catch(R){C.signal.aborted||(console.error("Failed to load avatar:",R),n.value="")}},{retry:y,errorRetry:b,isRetrying:S}=rG(m,3,2e3),F=ut(()=>r.value.id,y,{immediate:!0});return qn(()=>{F(),o.value&&(o.value.abort(),o.value=null),n.value.startsWith("blob:")&&URL.revokeObjectURL(n.value),n.value="",i.value=!1}),(C,R)=>(K(),Ce("div",{class:z([C.$style["avatar-wrapper"],{[C.$style.me]:e.isMe,[C.$style.loading]:i.value,[C.$style.disabled]:e.disabled,[C.$style.readOnly]:t.readOnly}]),style:gn(d.value)},[i.value||W(S)?(K(),Ce("div",{key:0,class:z(C.$style["skeleton-loader"])},null,2)):(K(),Ce(Ot,{key:1},[u.value==="text"||W(b)||s.value?(K(),Ce("div",{key:0,class:z(C.$style["short-label"])},bt(c.value),3)):n.value.length>0||r.value.profile_image?(K(),Ce("img",{key:1,src:n.value||r.value.profile_image||"",alt:r.value.name||"Avatar",loading:"lazy"},null,8,yG)):it("",!0)],64))],6))}}),[["__cssModules",{$style:{"avatar-wrapper":"_avatar-wrapper_1gfzg_1",me:"_me_1gfzg_16","short-label":"_short-label_1gfzg_19",action:"_action_1gfzg_37",loading:"_loading_1gfzg_55",disabled:"_disabled_1gfzg_58",readOnly:"_readOnly_1gfzg_61"}}]]),CG=["404","ClickChart","ClickToCreate","NoAccess1","NoActivity","NoAssignedComment","NoAssignedScene","NoComment","NoData","NoData2","NoRendition1","NoRendition2","PrivateComment","PrivateScene","ReportAchievement","ReportCompletedScenes","ReportInvolvement","ReportMetric","ReportOverdueScenes","ReportProfessionalName","ReportSceneAssignment","ReportSceneStatus","ReportSceneStatusType","Successful1","Unsuccessful1","ConfirmDeletion","Waiting1","DefaultThumbnail","UploadReviewFile","ClickToSearch","NoDataSearchFilter"],wG=["UploadInProgress"],zf={},qs={},t_=(e,t,n,i)=>{const o=Y(""),s=Y(""),r=Y(!0),a=q(()=>`${t}:${e.value.name}`),l=y=>URL.createObjectURL(y),c=y=>{URL.revokeObjectURL(y)},u=y=>new Blob([y],{type:"image/svg+xml"}),d=async y=>await y.text(),h=async(y,b)=>{if(qs[b])return qs[b];if(b in zf){const C=await zf[b];if(C&&C.size>0){const R=await d(C);qs[b]=R}return C}const S=await i(a.value);if(S&&S instanceof Blob&&S.size>0){const C=await d(S);return qs[b]=C,S}if(S&&typeof S=="string")return qs[b]=S,S;const F=(async()=>{try{const C=await fetch(y,{cache:"no-cache"});if(!C.ok)throw new Error("Failed to fetch visual");const R=C.headers.get("Content-Type")||"";let E;if(R.includes("svg")||R.includes("xml")){const x=await C.text();if(x.trim()){if(E=u(x),!E.size)throw new Error("Empty image blob");qs[b]=x}else throw new Error("Empty SVG content")}else if(R.match(/image\/(jpeg|jpg|png|gif|webp)/)){if(E=await C.blob(),!E.size)throw new Error("Empty image blob")}else throw new Error(`Unsupported content type: ${R}`);return await n(a.value,E),E}catch(C){return console.error("Error fetching visual:",C),new Blob}})();return zf[b]=F,F.finally(()=>{delete zf[b]}),await F},f=async y=>{r.value=!0;try{if(qs[a.value]){s.value=qs[a.value],r.value=!1;return}const b=sessionStorage.getItem("ASSET_URL")||"https://arbodev.s3.ap-south-1.amazonaws.com",S={icon:`${b}/icon/tess/TESSRAPP_Icon_${y}`,visual:`${b}/icon/visual/TESSRAPP_Visual_${y}`,ratting:`${b}/icon/tess/rating/TESSRAPP_Icon_${y}_Outline`,flag:`${b}/icon/flags/4x3/${y}`},F=CG.includes(y)?"png":wG.includes(y)?"gif":"svg",C=`${S[t]}.${F}`,R=await h(C,a.value);typeof R=="string"?(s.value=R,o.value=R):R.size>0&&((R.type.includes("svg")||R.type.includes("xml"))&&(s.value=await d(R),qs[a.value]=s.value),o.value=l(R))}catch(b){console.error("Error fetching remote visual:",b)}finally{r.value=!1}},g=async()=>{o.value="",s.value="",e.value.name&&(r.value=!0,await f(e.value.name),r.value=!1)},m=q(()=>s.value?s.value:"");return Vl(()=>{o.value&&o.value.startsWith("blob:")&&c(o.value)}),ut(()=>e,y=>{g()},{deep:!0,immediate:!0}),{svgContent:m,url:o,loading:r}},bG=["innerHTML"],SG="IconCache",EG="icons",mt=Ct(ct({__name:"Icon",props:{src:{},source:{default:"remote"},size:{default:14},color:{default:"currentColor"}},setup(e){cB(l=>({d999b740:l.size+"px"}));const t=e,{getCachedValue:n,setCachedValue:i}=qu({dbName:SG,storeName:EG}),o=l=>{if(typeof l=="number")return l;switch(l){case"small":return 8;case"medium":return 16;case"large":return 20;default:return typeof l=="string"?parseInt(l,10):14}},s=q(()=>t.source==="rating"?"ratting":"icon"),r=q(()=>({name:t.src,size:o(t.size),color:t.color})),{svgContent:a}=t_(r,s.value,i,n);return(l,c)=>(K(),Ce("div",{class:z(l.$style.iconWrapper),innerHTML:W(a),style:gn({color:e.color,"--size":e.size})},null,14,bG))}}),[["__cssModules",{$style:{iconWrapper:"_iconWrapper_1n0y9_1"}}]]),RG={review:"{reviewDomain}/{ws_code}",review_take:"{reviewDomain}/{ws_code}?id={take_id}",review_scene:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&tab=iteration",review_rendition:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}",review_frame:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}&tab=comment&refresh_marker=true#type=frame&data={frame}",review_rendition_comment:"{reviewDomain}/{ws_code}?scene_id={scene_id}&rendition_id={rendition_id}&comment_id={comment_id}",review_comment:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&comment_id={comment_id}",scene_hub:"{baseDomain}/{ws_code}/{scene_id}?o=st",hub_rendition:"{baseDomain}/{ws_code}/{scene_id}?o=st&renditionId={rendition_id}",hub_comment:"{baseDomain}/{ws_code}/{scene_id}?o=st&comment_id={comment_id}",people_insight:"{baseDomain}/{ws_code}/{user_id}?o=pt",people_detail:"{baseDomain}/{ws_code}/ws/ppl/{display_name}-${user_id}",project:"{baseDomain}/{ws_code}/pl/dir/{entity_id}",woohoo:"{baseDomain}/{ws_code}/pl/woo/rpt/{woohoo_id}",update:"{baseDomain}/{ws_code}/pl/au?id={entity_id}",core:"{baseDomain}/{ws_code}",project_focusMode:"{baseDomain}/{ws_code}/pl/dir/{parent_id}?f={entity_id}",access_setting:"{baseDomain}/{ws_code}/pl/dir?f={entity_id}&o=as"},fo=({type:e,config:t})=>{const n=[];try{const i=RG[e];if(!i)throw new Error(`Link template for link type "${e}" not found`);const o=i.replace(/{(.*?)}/g,(s,r)=>{const a=t[String(r)];if(a!==void 0)return a;n.push(r)});return n.length>0?{url:o,hasError:!0,error:`Missing required keys: ${n.join(", ")}`,missingKeys:n}:{url:o,hasError:!1,error:void 0}}catch(i){return console.error("Link Creator ERROR at:",i),{url:"",hasError:!0,error:i instanceof Error?i.message:`Missing required keys: ${n.join(", ")}`}}};var n_=typeof global=="object"&&global&&global.Object===Object&&global,DG=typeof self=="object"&&self&&self.Object===Object&&self,$o=n_||DG||Function("return this")(),po=$o.Symbol,i_=Object.prototype,_G=i_.hasOwnProperty,xG=i_.toString,Xu=po?po.toStringTag:void 0;function FG(e){var t=_G.call(e,Xu),n=e[Xu];try{e[Xu]=void 0;var i=!0}catch{}var o=xG.call(e);return i&&(t?e[Xu]=n:delete e[Xu]),o}var TG=Object.prototype,PG=TG.toString;function IG(e){return PG.call(e)}var AG="[object Null]",kG="[object Undefined]",o_=po?po.toStringTag:void 0;function Ql(e){return e==null?e===void 0?kG:AG:o_&&o_ in Object(e)?FG(e):IG(e)}function Ys(e){return e!=null&&typeof e=="object"}var OG="[object Symbol]";function jf(e){return typeof e=="symbol"||Ys(e)&&Ql(e)==OG}function MG(e,t){for(var n=-1,i=e==null?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o}var go=Array.isArray,s_=po?po.prototype:void 0,r_=s_?s_.toString:void 0;function a_(e){if(typeof e=="string")return e;if(go(e))return MG(e,a_)+"";if(jf(e))return r_?r_.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var LG=/\s/;function NG(e){for(var t=e.length;t--&&LG.test(e.charAt(t)););return t}var VG=/^\s+/;function BG(e){return e&&e.slice(0,NG(e)+1).replace(VG,"")}function Zs(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var l_=NaN,HG=/^[-+]0x[0-9a-f]+$/i,GG=/^0b[01]+$/i,$G=/^0o[0-7]+$/i,WG=parseInt;function vy(e){if(typeof e=="number")return e;if(jf(e))return l_;if(Zs(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Zs(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=BG(e);var n=GG.test(e);return n||$G.test(e)?WG(e.slice(2),n?2:8):HG.test(e)?l_:+e}var c_=1/0,UG=17976931348623157e292;function yy(e){if(!e)return e===0?e:0;if(e=vy(e),e===c_||e===-c_){var t=e<0?-1:1;return t*UG}return e===e?e:0}function zG(e){var t=yy(e),n=t%1;return t===t?n?t-n:t:0}function Cy(e){return e}var jG="[object AsyncFunction]",KG="[object Function]",qG="[object GeneratorFunction]",YG="[object Proxy]";function u_(e){if(!Zs(e))return!1;var t=Ql(e);return t==KG||t==qG||t==jG||t==YG}var wy=$o["__core-js_shared__"],d_=function(){var e=/[^.]+$/.exec(wy&&wy.keys&&wy.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ZG(e){return!!d_&&d_ in e}var XG=Function.prototype,JG=XG.toString;function Ba(e){if(e!=null){try{return JG.call(e)}catch{}try{return e+""}catch{}}return""}var QG=/[\\^$.*+?()[\]{}|]/g,e$=/^\[object .+?Constructor\]$/,t$=Function.prototype,n$=Object.prototype,i$=t$.toString,o$=n$.hasOwnProperty,s$=RegExp("^"+i$.call(o$).replace(QG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function r$(e){if(!Zs(e)||ZG(e))return!1;var t=u_(e)?s$:e$;return t.test(Ba(e))}function a$(e,t){return e==null?void 0:e[t]}function Ha(e,t){var n=a$(e,t);return r$(n)?n:void 0}var by=Ha($o,"WeakMap"),h_=Object.create,l$=function(){function e(){}return function(t){if(!Zs(t))return{};if(h_)return h_(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function c$(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function u$(){}var d$=800,h$=16,f$=Date.now;function p$(e){var t=0,n=0;return function(){var i=f$(),o=h$-(i-n);if(n=i,o>0){if(++t>=d$)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function g$(e){return function(){return e}}var Kf=function(){try{var e=Ha(Object,"defineProperty");return e({},"",{}),e}catch{}}(),m$=Kf?function(e,t){return Kf(e,"toString",{configurable:!0,enumerable:!1,value:g$(t),writable:!0})}:Cy,v$=p$(m$);function y$(e,t){for(var n=-1,i=e==null?0:e.length;++n<i&&t(e[n],n,e)!==!1;);return e}function C$(e,t,n,i){for(var o=e.length,s=n+-1;++s<o;)if(t(e[s],s,e))return s;return-1}function w$(e){return e!==e}function b$(e,t,n){for(var i=n-1,o=e.length;++i<o;)if(e[i]===t)return i;return-1}function S$(e,t,n){return t===t?b$(e,t,n):C$(e,w$,n)}function E$(e,t){var n=e==null?0:e.length;return!!n&&S$(e,t,0)>-1}var R$=9007199254740991,D$=/^(?:0|[1-9]\d*)$/;function Sy(e,t){var n=typeof e;return t=t??R$,!!t&&(n=="number"||n!="symbol"&&D$.test(e))&&e>-1&&e%1==0&&e<t}function _$(e,t,n){t=="__proto__"&&Kf?Kf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function qf(e,t){return e===t||e!==e&&t!==t}var x$=Object.prototype,F$=x$.hasOwnProperty;function T$(e,t,n){var i=e[t];(!(F$.call(e,t)&&qf(i,n))||n===void 0&&!(t in e))&&_$(e,t,n)}var f_=Math.max;function P$(e,t,n){return t=f_(t===void 0?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=f_(i.length-t,0),r=Array(s);++o<s;)r[o]=i[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=i[o];return a[t]=n(r),c$(e,this,a)}}function I$(e,t){return v$(P$(e,t,Cy),e+"")}var A$=9007199254740991;function Ey(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=A$}function Yf(e){return e!=null&&Ey(e.length)&&!u_(e)}function k$(e,t,n){if(!Zs(n))return!1;var i=typeof t;return(i=="number"?Yf(n)&&Sy(t,n.length):i=="string"&&t in n)?qf(n[t],e):!1}var O$=Object.prototype;function Ry(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||O$;return e===n}function M$(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}var L$="[object Arguments]";function p_(e){return Ys(e)&&Ql(e)==L$}var g_=Object.prototype,N$=g_.hasOwnProperty,V$=g_.propertyIsEnumerable,Zf=p_(function(){return arguments}())?p_:function(e){return Ys(e)&&N$.call(e,"callee")&&!V$.call(e,"callee")};function B$(){return!1}var m_=typeof cn=="object"&&cn&&!cn.nodeType&&cn,v_=m_&&typeof module=="object"&&module&&!module.nodeType&&module,H$=v_&&v_.exports===m_,y_=H$?$o.Buffer:void 0,G$=y_?y_.isBuffer:void 0,Ju=G$||B$,$$="[object Arguments]",W$="[object Array]",U$="[object Boolean]",z$="[object Date]",j$="[object Error]",K$="[object Function]",q$="[object Map]",Y$="[object Number]",Z$="[object Object]",X$="[object RegExp]",J$="[object Set]",Q$="[object String]",eW="[object WeakMap]",tW="[object ArrayBuffer]",nW="[object DataView]",iW="[object Float32Array]",oW="[object Float64Array]",sW="[object Int8Array]",rW="[object Int16Array]",aW="[object Int32Array]",lW="[object Uint8Array]",cW="[object Uint8ClampedArray]",uW="[object Uint16Array]",dW="[object Uint32Array]",dn={};dn[iW]=dn[oW]=dn[sW]=dn[rW]=dn[aW]=dn[lW]=dn[cW]=dn[uW]=dn[dW]=!0,dn[$$]=dn[W$]=dn[tW]=dn[U$]=dn[nW]=dn[z$]=dn[j$]=dn[K$]=dn[q$]=dn[Y$]=dn[Z$]=dn[X$]=dn[J$]=dn[Q$]=dn[eW]=!1;function hW(e){return Ys(e)&&Ey(e.length)&&!!dn[Ql(e)]}function Dy(e){return function(t){return e(t)}}var C_=typeof cn=="object"&&cn&&!cn.nodeType&&cn,Qu=C_&&typeof module=="object"&&module&&!module.nodeType&&module,fW=Qu&&Qu.exports===C_,_y=fW&&n_.process,ec=function(){try{var e=Qu&&Qu.require&&Qu.require("util").types;return e||_y&&_y.binding&&_y.binding("util")}catch{}}(),w_=ec&&ec.isTypedArray,xy=w_?Dy(w_):hW,pW=Object.prototype,gW=pW.hasOwnProperty;function mW(e,t){var n=go(e),i=!n&&Zf(e),o=!n&&!i&&Ju(e),s=!n&&!i&&!o&&xy(e),r=n||i||o||s,a=r?M$(e.length,String):[],l=a.length;for(var c in e)gW.call(e,c)&&!(r&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Sy(c,l)))&&a.push(c);return a}function b_(e,t){return function(n){return e(t(n))}}var vW=b_(Object.keys,Object),yW=Object.prototype,CW=yW.hasOwnProperty;function S_(e){if(!Ry(e))return vW(e);var t=[];for(var n in Object(e))CW.call(e,n)&&n!="constructor"&&t.push(n);return t}function E_(e){return Yf(e)?mW(e):S_(e)}var wW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bW=/^\w*$/;function Fy(e,t){if(go(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||jf(e)?!0:bW.test(e)||!wW.test(e)||t!=null&&e in Object(t)}var ed=Ha(Object,"create");function SW(){this.__data__=ed?ed(null):{},this.size=0}function EW(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var RW="__lodash_hash_undefined__",DW=Object.prototype,_W=DW.hasOwnProperty;function xW(e){var t=this.__data__;if(ed){var n=t[e];return n===RW?void 0:n}return _W.call(t,e)?t[e]:void 0}var FW=Object.prototype,TW=FW.hasOwnProperty;function PW(e){var t=this.__data__;return ed?t[e]!==void 0:TW.call(t,e)}var IW="__lodash_hash_undefined__";function AW(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ed&&t===void 0?IW:t,this}function Ga(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Ga.prototype.clear=SW,Ga.prototype.delete=EW,Ga.prototype.get=xW,Ga.prototype.has=PW,Ga.prototype.set=AW;function kW(){this.__data__=[],this.size=0}function Xf(e,t){for(var n=e.length;n--;)if(qf(e[n][0],t))return n;return-1}var OW=Array.prototype,MW=OW.splice;function LW(e){var t=this.__data__,n=Xf(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():MW.call(t,n,1),--this.size,!0}function NW(e){var t=this.__data__,n=Xf(t,e);return n<0?void 0:t[n][1]}function VW(e){return Xf(this.__data__,e)>-1}function BW(e,t){var n=this.__data__,i=Xf(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}function Xs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Xs.prototype.clear=kW,Xs.prototype.delete=LW,Xs.prototype.get=NW,Xs.prototype.has=VW,Xs.prototype.set=BW;var td=Ha($o,"Map");function HW(){this.size=0,this.__data__={hash:new Ga,map:new(td||Xs),string:new Ga}}function GW(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Jf(e,t){var n=e.__data__;return GW(t)?n[typeof t=="string"?"string":"hash"]:n.map}function $W(e){var t=Jf(this,e).delete(e);return this.size-=t?1:0,t}function WW(e){return Jf(this,e).get(e)}function UW(e){return Jf(this,e).has(e)}function zW(e,t){var n=Jf(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}function Js(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Js.prototype.clear=HW,Js.prototype.delete=$W,Js.prototype.get=WW,Js.prototype.has=UW,Js.prototype.set=zW;var jW="Expected a function";function Ty(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(jW);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],s=n.cache;if(s.has(o))return s.get(o);var r=e.apply(this,i);return n.cache=s.set(o,r)||s,r};return n.cache=new(Ty.Cache||Js),n}Ty.Cache=Js;var KW=500;function qW(e){var t=Ty(e,function(i){return n.size===KW&&n.clear(),i}),n=t.cache;return t}var YW=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ZW=/\\(\\)?/g,XW=qW(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(YW,function(n,i,o,s){t.push(o?s.replace(ZW,"$1"):i||n)}),t});function JW(e){return e==null?"":a_(e)}function R_(e,t){return go(e)?e:Fy(e,t)?[e]:XW(JW(e))}function Qf(e){if(typeof e=="string"||jf(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function D_(e,t){t=R_(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[Qf(t[n++])];return n&&n==i?e:void 0}function QW(e,t,n){var i=e==null?void 0:D_(e,t);return i===void 0?n:i}function __(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}var x_=po?po.isConcatSpreadable:void 0;function eU(e){return go(e)||Zf(e)||!!(x_&&e&&e[x_])}function tU(e,t,n,i,o){var s=-1,r=e.length;for(n||(n=eU),o||(o=[]);++s<r;){var a=e[s];n(a)&&__(o,a)}return o}var nU=b_(Object.getPrototypeOf,Object);function iU(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++i<o;)s[i]=e[i+t];return s}var oU=Math.ceil,sU=Math.max;function rU(e,t,n){t===void 0?t=1:t=sU(zG(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,r=Array(oU(i/t));o<i;)r[s++]=iU(e,o,o+=t);return r}function aU(){this.__data__=new Xs,this.size=0}function lU(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function cU(e){return this.__data__.get(e)}function uU(e){return this.__data__.has(e)}var dU=200;function hU(e,t){var n=this.__data__;if(n instanceof Xs){var i=n.__data__;if(!td||i.length<dU-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Js(i)}return n.set(e,t),this.size=n.size,this}function gs(e){var t=this.__data__=new Xs(e);this.size=t.size}gs.prototype.clear=aU,gs.prototype.delete=lU,gs.prototype.get=cU,gs.prototype.has=uU,gs.prototype.set=hU;var F_=typeof cn=="object"&&cn&&!cn.nodeType&&cn,T_=F_&&typeof module=="object"&&module&&!module.nodeType&&module,fU=T_&&T_.exports===F_,P_=fU?$o.Buffer:void 0;P_&&P_.allocUnsafe;function pU(e,t){return e.slice()}function gU(e,t){for(var n=-1,i=e==null?0:e.length,o=0,s=[];++n<i;){var r=e[n];t(r,n,e)&&(s[o++]=r)}return s}function mU(){return[]}var vU=Object.prototype,yU=vU.propertyIsEnumerable,I_=Object.getOwnPropertySymbols,CU=I_?function(e){return e==null?[]:(e=Object(e),gU(I_(e),function(t){return yU.call(e,t)}))}:mU;function wU(e,t,n){var i=t(e);return go(e)?i:__(i,n(e))}function Py(e){return wU(e,E_,CU)}var Iy=Ha($o,"DataView"),Ay=Ha($o,"Promise"),tc=Ha($o,"Set"),A_="[object Map]",bU="[object Object]",k_="[object Promise]",O_="[object Set]",M_="[object WeakMap]",L_="[object DataView]",SU=Ba(Iy),EU=Ba(td),RU=Ba(Ay),DU=Ba(tc),_U=Ba(by),mo=Ql;(Iy&&mo(new Iy(new ArrayBuffer(1)))!=L_||td&&mo(new td)!=A_||Ay&&mo(Ay.resolve())!=k_||tc&&mo(new tc)!=O_||by&&mo(new by)!=M_)&&(mo=function(e){var t=Ql(e),n=t==bU?e.constructor:void 0,i=n?Ba(n):"";if(i)switch(i){case SU:return L_;case EU:return A_;case RU:return k_;case DU:return O_;case _U:return M_}return t});var xU=Object.prototype,FU=xU.hasOwnProperty;function TU(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&FU.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var ep=$o.Uint8Array;function ky(e){var t=new e.constructor(e.byteLength);return new ep(t).set(new ep(e)),t}function PU(e,t){var n=ky(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var IU=/\w*$/;function AU(e){var t=new e.constructor(e.source,IU.exec(e));return t.lastIndex=e.lastIndex,t}var N_=po?po.prototype:void 0,V_=N_?N_.valueOf:void 0;function kU(e){return V_?Object(V_.call(e)):{}}function OU(e,t){var n=ky(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}var MU="[object Boolean]",LU="[object Date]",NU="[object Map]",VU="[object Number]",BU="[object RegExp]",HU="[object Set]",GU="[object String]",$U="[object Symbol]",WU="[object ArrayBuffer]",UU="[object DataView]",zU="[object Float32Array]",jU="[object Float64Array]",KU="[object Int8Array]",qU="[object Int16Array]",YU="[object Int32Array]",ZU="[object Uint8Array]",XU="[object Uint8ClampedArray]",JU="[object Uint16Array]",QU="[object Uint32Array]";function ez(e,t,n){var i=e.constructor;switch(t){case WU:return ky(e);case MU:case LU:return new i(+e);case UU:return PU(e);case zU:case jU:case KU:case qU:case YU:case ZU:case XU:case JU:case QU:return OU(e);case NU:return new i;case VU:case GU:return new i(e);case BU:return AU(e);case HU:return new i;case $U:return kU(e)}}function tz(e){return typeof e.constructor=="function"&&!Ry(e)?l$(nU(e)):{}}var nz="[object Map]";function iz(e){return Ys(e)&&mo(e)==nz}var B_=ec&&ec.isMap,oz=B_?Dy(B_):iz,sz="[object Set]";function rz(e){return Ys(e)&&mo(e)==sz}var H_=ec&&ec.isSet,az=H_?Dy(H_):rz,G_="[object Arguments]",lz="[object Array]",cz="[object Boolean]",uz="[object Date]",dz="[object Error]",$_="[object Function]",hz="[object GeneratorFunction]",fz="[object Map]",pz="[object Number]",W_="[object Object]",gz="[object RegExp]",mz="[object Set]",vz="[object String]",yz="[object Symbol]",Cz="[object WeakMap]",wz="[object ArrayBuffer]",bz="[object DataView]",Sz="[object Float32Array]",Ez="[object Float64Array]",Rz="[object Int8Array]",Dz="[object Int16Array]",_z="[object Int32Array]",xz="[object Uint8Array]",Fz="[object Uint8ClampedArray]",Tz="[object Uint16Array]",Pz="[object Uint32Array]",an={};an[G_]=an[lz]=an[wz]=an[bz]=an[cz]=an[uz]=an[Sz]=an[Ez]=an[Rz]=an[Dz]=an[_z]=an[fz]=an[pz]=an[W_]=an[gz]=an[mz]=an[vz]=an[yz]=an[xz]=an[Fz]=an[Tz]=an[Pz]=!0,an[dz]=an[$_]=an[Cz]=!1;function tp(e,t,n,i,o,s){var r;if(r!==void 0)return r;if(!Zs(e))return e;var a=go(e);if(a)r=TU(e);else{var l=mo(e),c=l==$_||l==hz;if(Ju(e))return pU(e);if(l==W_||l==G_||c&&!o)r=c?{}:tz(e);else{if(!an[l])return o?e:{};r=ez(e,l)}}s||(s=new gs);var u=s.get(e);if(u)return u;s.set(e,r),az(e)?e.forEach(function(f){r.add(tp(f,t,n,f,e,s))}):oz(e)&&e.forEach(function(f,g){r.set(g,tp(f,t,n,g,e,s))});var d=Py,h=a?void 0:d(e);return y$(h||e,function(f,g){h&&(g=f,f=e[g]),T$(r,g,tp(f,t,n,g,e,s))}),r}var Iz=1,Az=4;function kz(e){return tp(e,Iz|Az)}var Oz="__lodash_hash_undefined__";function Mz(e){return this.__data__.set(e,Oz),this}function Lz(e){return this.__data__.has(e)}function nd(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Js;++t<n;)this.add(e[t])}nd.prototype.add=nd.prototype.push=Mz,nd.prototype.has=Lz;function Nz(e,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function U_(e,t){return e.has(t)}var Vz=1,Bz=2;function z_(e,t,n,i,o,s){var r=n&Vz,a=e.length,l=t.length;if(a!=l&&!(r&&l>a))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&Bz?new nd:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var g=e[d],m=t[d];if(i)var y=r?i(m,g,d,t,e,s):i(g,m,d,e,t,s);if(y!==void 0){if(y)continue;h=!1;break}if(f){if(!Nz(t,function(b,S){if(!U_(f,S)&&(g===b||o(g,b,n,i,s)))return f.push(S)})){h=!1;break}}else if(!(g===m||o(g,m,n,i,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function Hz(e){var t=-1,n=Array(e.size);return e.forEach(function(i,o){n[++t]=[o,i]}),n}function Oy(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n}var Gz=1,$z=2,Wz="[object Boolean]",Uz="[object Date]",zz="[object Error]",jz="[object Map]",Kz="[object Number]",qz="[object RegExp]",Yz="[object Set]",Zz="[object String]",Xz="[object Symbol]",Jz="[object ArrayBuffer]",Qz="[object DataView]",j_=po?po.prototype:void 0,My=j_?j_.valueOf:void 0;function e3(e,t,n,i,o,s,r){switch(n){case Qz:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Jz:return!(e.byteLength!=t.byteLength||!s(new ep(e),new ep(t)));case Wz:case Uz:case Kz:return qf(+e,+t);case zz:return e.name==t.name&&e.message==t.message;case qz:case Zz:return e==t+"";case jz:var a=Hz;case Yz:var l=i&Gz;if(a||(a=Oy),e.size!=t.size&&!l)return!1;var c=r.get(e);if(c)return c==t;i|=$z,r.set(e,t);var u=z_(a(e),a(t),i,o,s,r);return r.delete(e),u;case Xz:if(My)return My.call(e)==My.call(t)}return!1}var t3=1,n3=Object.prototype,i3=n3.hasOwnProperty;function o3(e,t,n,i,o,s){var r=n&t3,a=Py(e),l=a.length,c=Py(t),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in t:i3.call(t,h)))return!1}var f=s.get(e),g=s.get(t);if(f&&g)return f==t&&g==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=r;++d<l;){h=a[d];var b=e[h],S=t[h];if(i)var F=r?i(S,b,h,t,e,s):i(b,S,h,e,t,s);if(!(F===void 0?b===S||o(b,S,n,i,s):F)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var C=e.constructor,R=t.constructor;C!=R&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof R=="function"&&R instanceof R)&&(m=!1)}return s.delete(e),s.delete(t),m}var s3=1,K_="[object Arguments]",q_="[object Array]",np="[object Object]",r3=Object.prototype,Y_=r3.hasOwnProperty;function a3(e,t,n,i,o,s){var r=go(e),a=go(t),l=r?q_:mo(e),c=a?q_:mo(t);l=l==K_?np:l,c=c==K_?np:c;var u=l==np,d=c==np,h=l==c;if(h&&Ju(e)){if(!Ju(t))return!1;r=!0,u=!1}if(h&&!u)return s||(s=new gs),r||xy(e)?z_(e,t,n,i,o,s):e3(e,t,l,n,i,o,s);if(!(n&s3)){var f=u&&Y_.call(e,"__wrapped__"),g=d&&Y_.call(t,"__wrapped__");if(f||g){var m=f?e.value():e,y=g?t.value():t;return s||(s=new gs),o(m,y,n,i,s)}}return h?(s||(s=new gs),o3(e,t,n,i,o,s)):!1}function Ly(e,t,n,i,o){return e===t?!0:e==null||t==null||!Ys(e)&&!Ys(t)?e!==e&&t!==t:a3(e,t,n,i,Ly,o)}var l3=1,c3=2;function u3(e,t,n,i){var o=n.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var r=n[o];if(r[2]?r[1]!==e[r[0]]:!(r[0]in e))return!1}for(;++o<s;){r=n[o];var a=r[0],l=e[a],c=r[1];if(r[2]){if(l===void 0&&!(a in e))return!1}else{var u=new gs,d;if(!(d===void 0?Ly(c,l,l3|c3,i,u):d))return!1}}return!0}function Z_(e){return e===e&&!Zs(e)}function d3(e){for(var t=E_(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,Z_(o)]}return t}function X_(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function h3(e){var t=d3(e);return t.length==1&&t[0][2]?X_(t[0][0],t[0][1]):function(n){return n===e||u3(n,e,t)}}function f3(e,t){return e!=null&&t in Object(e)}function p3(e,t,n){t=R_(t,e);for(var i=-1,o=t.length,s=!1;++i<o;){var r=Qf(t[i]);if(!(s=e!=null&&n(e,r)))break;e=e[r]}return s||++i!=o?s:(o=e==null?0:e.length,!!o&&Ey(o)&&Sy(r,o)&&(go(e)||Zf(e)))}function g3(e,t){return e!=null&&p3(e,t,f3)}var m3=1,v3=2;function y3(e,t){return Fy(e)&&Z_(t)?X_(Qf(e),t):function(n){var i=QW(n,e);return i===void 0&&i===t?g3(n,e):Ly(t,i,m3|v3)}}function C3(e){return function(t){return t==null?void 0:t[e]}}function w3(e){return function(t){return D_(t,e)}}function b3(e){return Fy(e)?C3(Qf(e)):w3(e)}function S3(e){return typeof e=="function"?e:e==null?Cy:typeof e=="object"?go(e)?y3(e[0],e[1]):h3(e):b3(e)}var Ny=function(){return $o.Date.now()},E3="Expected a function",R3=Math.max,D3=Math.min;function Wo(e,t,n){var i,o,s,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(E3);t=vy(t)||0,Zs(n)&&(u=!!n.leading,d="maxWait"in n,s=d?R3(vy(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(E){var x=i,k=o;return i=o=void 0,c=E,r=e.apply(k,x),r}function g(E){return c=E,a=setTimeout(b,t),u?f(E):r}function m(E){var x=E-l,k=E-c,O=t-x;return d?D3(O,s-k):O}function y(E){var x=E-l,k=E-c;return l===void 0||x>=t||x<0||d&&k>=s}function b(){var E=Ny();if(y(E))return S(E);a=setTimeout(b,m(E))}function S(E){return a=void 0,h&&i?f(E):(i=o=void 0,r)}function F(){a!==void 0&&clearTimeout(a),c=0,i=l=o=a=void 0}function C(){return a===void 0?r:S(Ny())}function R(){var E=Ny(),x=y(E);if(i=arguments,o=this,l=E,x){if(a===void 0)return g(l);if(d)return clearTimeout(a),a=setTimeout(b,t),f(l)}return a===void 0&&(a=setTimeout(b,t)),r}return R.cancel=F,R.flush=C,R}function J_(e){return Ys(e)&&Yf(e)}function _3(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var x3="[object Map]",F3="[object Set]",T3=Object.prototype,P3=T3.hasOwnProperty;function I3(e){if(e==null)return!0;if(Yf(e)&&(go(e)||typeof e=="string"||typeof e.splice=="function"||Ju(e)||xy(e)||Zf(e)))return!e.length;var t=mo(e);if(t==x3||t==F3)return!e.size;if(Ry(e))return!S_(e).length;for(var n in e)if(P3.call(e,n))return!1;return!0}var A3=Math.floor,k3=Math.random;function O3(e,t){return e+A3(k3()*(t-e+1))}var M3=parseFloat,L3=Math.min,N3=Math.random;function V3(e,t,n){if(n&&typeof n!="boolean"&&k$(e,t,n)&&(t=n=void 0),n===void 0&&(typeof t=="boolean"?(n=t,t=void 0):typeof e=="boolean"&&(n=e,e=void 0)),e===void 0&&t===void 0?(e=0,t=1):(e=yy(e),t===void 0?(t=e,e=0):t=yy(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=N3();return L3(e+o*(t-e+M3("1e-"+((o+"").length-1))),t)}return O3(e,t)}var B3=1/0,H3=tc&&1/Oy(new tc([,-0]))[1]==B3?function(e){return new tc(e)}:u$,G3=200;function $3(e,t,n){var i=-1,o=E$,s=e.length,r=!0,a=[],l=a;if(s>=G3){var c=t?null:H3(e);if(c)return Oy(c);r=!1,o=U_,l=new nd}else l=t?[]:a;e:for(;++i<s;){var u=e[i],d=t?t(u):u;if(u=u!==0?u:0,r&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(u)}else o(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}var ip=I$(function(e){var t=_3(e);return J_(t)&&(t=void 0),$3(tU(e,1,J_),S3(t))});const vo=(e,t)=>{const n=Di();return{apiServices:q(()=>{var r;const o=n==null?void 0:n.appContext.config.globalProperties,s=(r=t.params)==null?void 0:r.context;if(o!=null&&o.apiServices)return o.apiServices;if(e&&(s!=null&&s.apiServices))return s.apiServices})}},W3=e=>{const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t?decodeURIComponent(t[2]):null};class $a extends Error{}class U3 extends $a{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class z3 extends $a{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class j3 extends $a{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class nc extends $a{}class Q_ extends $a{constructor(t){super(`Invalid unit ${t}`)}}class ci extends $a{}class Nr extends $a{constructor(){super("Zone is an abstract class")}}const et="numeric",Uo="short",Yi="long",op={year:et,month:et,day:et},ex={year:et,month:Uo,day:et},K3={year:et,month:Uo,day:et,weekday:Uo},tx={year:et,month:Yi,day:et},nx={year:et,month:Yi,day:et,weekday:Yi},ix={hour:et,minute:et},ox={hour:et,minute:et,second:et},sx={hour:et,minute:et,second:et,timeZoneName:Uo},rx={hour:et,minute:et,second:et,timeZoneName:Yi},ax={hour:et,minute:et,hourCycle:"h23"},lx={hour:et,minute:et,second:et,hourCycle:"h23"},cx={hour:et,minute:et,second:et,hourCycle:"h23",timeZoneName:Uo},ux={hour:et,minute:et,second:et,hourCycle:"h23",timeZoneName:Yi},dx={year:et,month:et,day:et,hour:et,minute:et},hx={year:et,month:et,day:et,hour:et,minute:et,second:et},fx={year:et,month:Uo,day:et,hour:et,minute:et},px={year:et,month:Uo,day:et,hour:et,minute:et,second:et},q3={year:et,month:Uo,day:et,weekday:Uo,hour:et,minute:et},gx={year:et,month:Yi,day:et,hour:et,minute:et,timeZoneName:Uo},mx={year:et,month:Yi,day:et,hour:et,minute:et,second:et,timeZoneName:Uo},vx={year:et,month:Yi,day:et,weekday:Yi,hour:et,minute:et,timeZoneName:Yi},yx={year:et,month:Yi,day:et,weekday:Yi,hour:et,minute:et,second:et,timeZoneName:Yi};class id{get type(){throw new Nr}get name(){throw new Nr}get ianaName(){return this.name}get isUniversal(){throw new Nr}offsetName(t,n){throw new Nr}formatOffset(t,n){throw new Nr}offset(t){throw new Nr}equals(t){throw new Nr}get isValid(){throw new Nr}}let Vy=null;class sp extends id{static get instance(){return Vy===null&&(Vy=new sp),Vy}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return Ux(t,n,i)}formatOffset(t,n){return ad(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const By=new Map;function Y3(e){let t=By.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),By.set(e,t)),t}const Z3={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function X3(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,s,r,a,l,c,u]=i;return[r,o,s,a,l,c,u]}function J3(e,t){const n=e.formatToParts(t),i=[];for(let o=0;o<n.length;o++){const{type:s,value:r}=n[o],a=Z3[s];s==="era"?i[a]=r:Dt(a)||(i[a]=parseInt(r,10))}return i}const Hy=new Map;class Qs extends id{static create(t){let n=Hy.get(t);return n===void 0&&Hy.set(t,n=new Qs(t)),n}static resetCache(){Hy.clear(),By.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Qs.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return Ux(t,n,i,this.name)}formatOffset(t,n){return ad(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const i=Y3(this.name);let[o,s,r,a,l,c,u]=i.formatToParts?J3(i,n):X3(i,n);a==="BC"&&(o=-Math.abs(o)+1);const h=up({year:o,month:s,day:r,hour:l===24?0:l,minute:c,second:u,millisecond:0});let f=+n;const g=f%1e3;return f-=g>=0?g:1e3+g,(h-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let Cx={};function Q3(e,t={}){const n=JSON.stringify([e,t]);let i=Cx[n];return i||(i=new Intl.ListFormat(e,t),Cx[n]=i),i}const Gy=new Map;function $y(e,t={}){const n=JSON.stringify([e,t]);let i=Gy.get(n);return i===void 0&&(i=new Intl.DateTimeFormat(e,t),Gy.set(n,i)),i}const Wy=new Map;function e4(e,t={}){const n=JSON.stringify([e,t]);let i=Wy.get(n);return i===void 0&&(i=new Intl.NumberFormat(e,t),Wy.set(n,i)),i}const Uy=new Map;function t4(e,t={}){const{base:n,...i}=t,o=JSON.stringify([e,i]);let s=Uy.get(o);return s===void 0&&(s=new Intl.RelativeTimeFormat(e,t),Uy.set(o,s)),s}let od=null;function n4(){return od||(od=new Intl.DateTimeFormat().resolvedOptions().locale,od)}const zy=new Map;function wx(e){let t=zy.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),zy.set(e,t)),t}const jy=new Map;function i4(e){let t=jy.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...bx,...t}),jy.set(e,t)}return t}function o4(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let i,o;try{i=$y(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);i=$y(l).resolvedOptions(),o=l}const{numberingSystem:s,calendar:r}=i;return[o,s,r]}}function s4(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function r4(e){const t=[];for(let n=1;n<=12;n++){const i=tt.utc(2009,n,1);t.push(e(i))}return t}function a4(e){const t=[];for(let n=1;n<=7;n++){const i=tt.utc(2016,11,13+n);t.push(e(i))}return t}function rp(e,t,n,i){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):i(t)}function l4(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||wx(e.locale).numberingSystem==="latn"}class c4{constructor(t,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:o,floor:s,...r}=i;if(!n||Object.keys(r).length>0){const a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=e4(t,a)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):tC(t,3);return Gn(n,this.padTo)}}}class u4{constructor(t,n,i){this.opts=i,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const r=-1*(t.offset/60),a=r>=0?`Etc/GMT+${r}`:`Etc/GMT${r}`;t.offset!==0&&Qs.create(a).valid?(o=a,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const s={...this.opts};s.timeZone=s.timeZone||o,this.dtf=$y(n,s)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:i}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class d4{constructor(t,n,i){this.opts={style:"long",...i},!n&&Hx()&&(this.rtf=t4(t,i))}format(t,n){return this.rtf?this.rtf.format(t,n):k4(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const bx={firstDay:1,minimalDays:4,weekend:[6,7]};class Jt{static fromOpts(t){return Jt.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,i,o,s=!1){const r=t||xn.defaultLocale,a=r||(s?"en-US":n4()),l=n||xn.defaultNumberingSystem,c=i||xn.defaultOutputCalendar,u=Qy(o)||xn.defaultWeekSettings;return new Jt(a,l,c,u,r)}static resetCache(){od=null,Gy.clear(),Wy.clear(),Uy.clear(),zy.clear(),jy.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:i,weekSettings:o}={}){return Jt.create(t,n,i,o)}constructor(t,n,i,o,s){const[r,a,l]=o4(t);this.locale=r,this.numberingSystem=n||a||null,this.outputCalendar=i||l||null,this.weekSettings=o,this.intl=s4(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=l4(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:Jt.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Qy(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return rp(this,t,Kx,()=>{const i=this.intl==="ja"||this.intl.startsWith("ja-");n&=!i;const o=n?{month:t,day:"numeric"}:{month:t},s=n?"format":"standalone";if(!this.monthsCache[s][t]){const r=i?a=>this.dtFormatter(a,o).format():a=>this.extract(a,o,"month");this.monthsCache[s][t]=r4(r)}return this.monthsCache[s][t]})}weekdays(t,n=!1){return rp(this,t,Zx,()=>{const i=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=a4(s=>this.extract(s,i,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return rp(this,void 0,()=>Xx,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[tt.utc(2016,11,13,9),tt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return rp(this,t,Jx,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[tt.utc(-40,1,1),tt.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[t]})}extract(t,n,i){const o=this.dtFormatter(t,n),s=o.formatToParts(),r=s.find(a=>a.type.toLowerCase()===i);return r?r.value:null}numberFormatter(t={}){return new c4(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new u4(t,this.intl,n)}relFormatter(t={}){return new d4(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Q3(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||wx(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Gx()?i4(this.locale):bx}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Ky=null;class _i extends id{static get utcInstance(){return Ky===null&&(Ky=new _i(0)),Ky}static instance(t){return t===0?_i.utcInstance:new _i(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new _i(dp(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ad(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ad(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return ad(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class h4 extends id{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Vr(e,t){if(Dt(e)||e===null)return t;if(e instanceof id)return e;if(y4(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?sp.instance:n==="utc"||n==="gmt"?_i.utcInstance:_i.parseSpecifier(n)||Qs.create(e)}else return Br(e)?_i.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new h4(e)}const qy={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Sx={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},f4=qy.hanidec.replace(/[\[|\]]/g,"").split("");function p4(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(e[n].search(qy.hanidec)!==-1)t+=f4.indexOf(e[n]);else for(const o in Sx){const[s,r]=Sx[o];i>=s&&i<=r&&(t+=i-s)}}return parseInt(t,10)}else return t}const Yy=new Map;function g4(){Yy.clear()}function zo({numberingSystem:e},t=""){const n=e||"latn";let i=Yy.get(n);i===void 0&&(i=new Map,Yy.set(n,i));let o=i.get(t);return o===void 0&&(o=new RegExp(`${qy[n]}${t}`),i.set(t,o)),o}let Ex=()=>Date.now(),Rx="system",Dx=null,_x=null,xx=null,Fx=60,Tx,Px=null;class xn{static get now(){return Ex}static set now(t){Ex=t}static set defaultZone(t){Rx=t}static get defaultZone(){return Vr(Rx,sp.instance)}static get defaultLocale(){return Dx}static set defaultLocale(t){Dx=t}static get defaultNumberingSystem(){return _x}static set defaultNumberingSystem(t){_x=t}static get defaultOutputCalendar(){return xx}static set defaultOutputCalendar(t){xx=t}static get defaultWeekSettings(){return Px}static set defaultWeekSettings(t){Px=Qy(t)}static get twoDigitCutoffYear(){return Fx}static set twoDigitCutoffYear(t){Fx=t%100}static get throwOnInvalid(){return Tx}static set throwOnInvalid(t){Tx=t}static resetCaches(){Jt.resetCache(),Qs.resetCache(),tt.resetCache(),g4()}}class jo{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ix=[0,31,59,90,120,151,181,212,243,273,304,334],Ax=[0,31,60,91,121,152,182,213,244,274,305,335];function yo(e,t){return new jo("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Zy(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const o=i.getUTCDay();return o===0?7:o}function kx(e,t,n){return n+(sd(e)?Ax:Ix)[t-1]}function Ox(e,t){const n=sd(e)?Ax:Ix,i=n.findIndex(s=>s<t),o=t-n[i];return{month:i+1,day:o}}function Xy(e,t){return(e-t+7)%7+1}function ap(e,t=4,n=1){const{year:i,month:o,day:s}=e,r=kx(i,o,s),a=Xy(Zy(i,o,s),n);let l=Math.floor((r-a+14-t)/7),c;return l<1?(c=i-1,l=rd(c,t,n)):l>rd(i,t,n)?(c=i+1,l=1):c=i,{weekYear:c,weekNumber:l,weekday:a,...fp(e)}}function Mx(e,t=4,n=1){const{weekYear:i,weekNumber:o,weekday:s}=e,r=Xy(Zy(i,1,t),n),a=oc(i);let l=o*7+s-r-7+t,c;l<1?(c=i-1,l+=oc(c)):l>a?(c=i+1,l-=oc(i)):c=i;const{month:u,day:d}=Ox(c,l);return{year:c,month:u,day:d,...fp(e)}}function Jy(e){const{year:t,month:n,day:i}=e,o=kx(t,n,i);return{year:t,ordinal:o,...fp(e)}}function Lx(e){const{year:t,ordinal:n}=e,{month:i,day:o}=Ox(t,n);return{year:t,month:i,day:o,...fp(e)}}function Nx(e,t){if(!Dt(e.localWeekday)||!Dt(e.localWeekNumber)||!Dt(e.localWeekYear)){if(!Dt(e.weekday)||!Dt(e.weekNumber)||!Dt(e.weekYear))throw new nc("Cannot mix locale-based week fields with ISO-based week fields");return Dt(e.localWeekday)||(e.weekday=e.localWeekday),Dt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Dt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function m4(e,t=4,n=1){const i=lp(e.weekYear),o=Co(e.weekNumber,1,rd(e.weekYear,t,n)),s=Co(e.weekday,1,7);return i?o?s?!1:yo("weekday",e.weekday):yo("week",e.weekNumber):yo("weekYear",e.weekYear)}function v4(e){const t=lp(e.year),n=Co(e.ordinal,1,oc(e.year));return t?n?!1:yo("ordinal",e.ordinal):yo("year",e.year)}function Vx(e){const t=lp(e.year),n=Co(e.month,1,12),i=Co(e.day,1,cp(e.year,e.month));return t?n?i?!1:yo("day",e.day):yo("month",e.month):yo("year",e.year)}function Bx(e){const{hour:t,minute:n,second:i,millisecond:o}=e,s=Co(t,0,23)||t===24&&n===0&&i===0&&o===0,r=Co(n,0,59),a=Co(i,0,59),l=Co(o,0,999);return s?r?a?l?!1:yo("millisecond",o):yo("second",i):yo("minute",n):yo("hour",t)}function Dt(e){return typeof e>"u"}function Br(e){return typeof e=="number"}function lp(e){return typeof e=="number"&&e%1===0}function y4(e){return typeof e=="string"}function C4(e){return Object.prototype.toString.call(e)==="[object Date]"}function Hx(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Gx(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function w4(e){return Array.isArray(e)?e:[e]}function $x(e,t,n){if(e.length!==0)return e.reduce((i,o)=>{const s=[t(o),o];return i&&n(i[0],s[0])===i[0]?i:s},null)[1]}function b4(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function ic(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qy(e){if(e==null)return null;if(typeof e!="object")throw new ci("Week settings must be an object");if(!Co(e.firstDay,1,7)||!Co(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Co(t,1,7)))throw new ci("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Co(e,t,n){return lp(e)&&e>=t&&e<=n}function S4(e,t){return e-t*Math.floor(e/t)}function Gn(e,t=2){const n=e<0;let i;return n?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function Hr(e){if(!(Dt(e)||e===null||e===""))return parseInt(e,10)}function Wa(e){if(!(Dt(e)||e===null||e===""))return parseFloat(e)}function eC(e){if(!(Dt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function tC(e,t,n="round"){const i=10**t;switch(n){case"expand":return e>0?Math.ceil(e*i)/i:Math.floor(e*i)/i;case"trunc":return Math.trunc(e*i)/i;case"round":return Math.round(e*i)/i;case"floor":return Math.floor(e*i)/i;case"ceil":return Math.ceil(e*i)/i;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function sd(e){return e%4===0&&(e%100!==0||e%400===0)}function oc(e){return sd(e)?366:365}function cp(e,t){const n=S4(t-1,12)+1,i=e+(t-n)/12;return n===2?sd(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function up(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Wx(e,t,n){return-Xy(Zy(e,1,t),n)+t-1}function rd(e,t=4,n=1){const i=Wx(e,t,n),o=Wx(e+1,t,n);return(oc(e)-i+o)/7}function nC(e){return e>99?e:e>xn.twoDigitCutoffYear?1900+e:2e3+e}function Ux(e,t,n,i=null){const o=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(s.timeZone=i);const r={timeZoneName:t,...s},a=new Intl.DateTimeFormat(n,r).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function dp(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-i:i;return n*60+o}function zx(e){const t=Number(e);if(typeof e=="boolean"||e===""||!Number.isFinite(t))throw new ci(`Invalid unit value ${e}`);return t}function hp(e,t){const n={};for(const i in e)if(ic(e,i)){const o=e[i];if(o==null)continue;n[t(i)]=zx(o)}return n}function ad(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Gn(n,2)}:${Gn(i,2)}`;case"narrow":return`${o}${n}${i>0?`:${i}`:""}`;case"techie":return`${o}${Gn(n,2)}${Gn(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function fp(e){return b4(e,["hour","minute","second","millisecond"])}const E4=["January","February","March","April","May","June","July","August","September","October","November","December"],jx=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],R4=["J","F","M","A","M","J","J","A","S","O","N","D"];function Kx(e){switch(e){case"narrow":return[...R4];case"short":return[...jx];case"long":return[...E4];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const qx=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Yx=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],D4=["M","T","W","T","F","S","S"];function Zx(e){switch(e){case"narrow":return[...D4];case"short":return[...Yx];case"long":return[...qx];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Xx=["AM","PM"],_4=["Before Christ","Anno Domini"],x4=["BC","AD"],F4=["B","A"];function Jx(e){switch(e){case"narrow":return[...F4];case"short":return[...x4];case"long":return[..._4];default:return null}}function T4(e){return Xx[e.hour<12?0:1]}function P4(e,t){return Zx(t)[e.weekday-1]}function I4(e,t){return Kx(t)[e.month-1]}function A4(e,t){return Jx(t)[e.year<0?0:1]}function k4(e,t,n="always",i=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&s){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const r=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,c=o[e],u=i?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return r?`${a} ${u} ago`:`in ${a} ${u}`}function Qx(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const O4={D:op,DD:ex,DDD:tx,DDDD:nx,t:ix,tt:ox,ttt:sx,tttt:rx,T:ax,TT:lx,TTT:cx,TTTT:ux,f:dx,ff:fx,fff:gx,ffff:vx,F:hx,FF:px,FFF:mx,FFFF:yx};class ui{static create(t,n={}){return new ui(t,n)}static parseFormat(t){let n=null,i="",o=!1;const s=[];for(let r=0;r<t.length;r++){const a=t.charAt(r);a==="'"?((i.length>0||o)&&s.push({literal:o||/^\s+$/.test(i),val:i===""?"'":i}),n=null,i="",o=!o):o||a===n?i+=a:(i.length>0&&s.push({literal:/^\s+$/.test(i),val:i}),i=a,n=a)}return i.length>0&&s.push({literal:o||/^\s+$/.test(i),val:i}),s}static macroTokenToFormatOpts(t){return O4[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0,i=void 0){if(this.opts.forceSimple)return Gn(t,n);const o={...this.opts};return n>0&&(o.padTo=n),i&&(o.signDisplay=i),this.loc.numberFormatter(o).format(t)}formatDateTimeFromString(t,n){const i=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(f,g)=>this.loc.extract(t,f,g),r=f=>t.isOffsetFixed&&t.offset===0&&f.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,f.format):"",a=()=>i?T4(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(f,g)=>i?I4(t,f):s(g?{month:f}:{month:f,day:"numeric"},"month"),c=(f,g)=>i?P4(t,f):s(g?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),u=f=>{const g=ui.macroTokenToFormatOpts(f);return g?this.formatWithSystemDefault(t,g):f},d=f=>i?A4(t,f):s({era:f},"era"),h=f=>{switch(f){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return o?s({day:"numeric"},"day"):this.num(t.day);case"dd":return o?s({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?s({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?s({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?s({month:"numeric"},"month"):this.num(t.month);case"MM":return o?s({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?s({year:"numeric"},"year"):this.num(t.year);case"yy":return o?s({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?s({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?s({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(f)}};return Qx(ui.parseFormat(n),h)}formatDurationFromString(t,n){const i=this.opts.signMode==="negativeLargestOnly"?-1:1,o=u=>{switch(u[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},s=(u,d)=>h=>{const f=o(h);if(f){const g=d.isNegativeDuration&&f!==d.largestUnit?i:1;let m;return this.opts.signMode==="negativeLargestOnly"&&f!==d.largestUnit?m="never":this.opts.signMode==="all"?m="always":m="auto",this.num(u.get(f)*g,h.length,m)}else return h},r=ui.parseFormat(n),a=r.reduce((u,{literal:d,val:h})=>d?u:u.concat(h),[]),l=t.shiftTo(...a.map(o).filter(u=>u)),c={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return Qx(r,s(l,c))}}const eF=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function sc(...e){const t=e.reduce((n,i)=>n+i.source,"");return RegExp(`^${t}$`)}function rc(...e){return t=>e.reduce(([n,i,o],s)=>{const[r,a,l]=s(t,o);return[{...n,...r},a||i,l]},[{},null,1]).slice(0,2)}function ac(e,...t){if(e==null)return[null,null];for(const[n,i]of t){const o=n.exec(e);if(o)return i(o)}return[null,null]}function tF(...e){return(t,n)=>{const i={};let o;for(o=0;o<e.length;o++)i[e[o]]=Hr(t[n+o]);return[i,null,n+o]}}const nF=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,M4=`(?:${nF.source}?(?:\\[(${eF.source})\\])?)?`,iC=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,iF=RegExp(`${iC.source}${M4}`),oC=RegExp(`(?:[Tt]${iF.source})?`),L4=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,N4=/(\d{4})-?W(\d\d)(?:-?(\d))?/,V4=/(\d{4})-?(\d{3})/,B4=tF("weekYear","weekNumber","weekDay"),H4=tF("year","ordinal"),G4=/(\d{4})-(\d\d)-(\d\d)/,oF=RegExp(`${iC.source} ?(?:${nF.source}|(${eF.source}))?`),$4=RegExp(`(?: ${oF.source})?`);function lc(e,t,n){const i=e[t];return Dt(i)?n:Hr(i)}function W4(e,t){return[{year:lc(e,t),month:lc(e,t+1,1),day:lc(e,t+2,1)},null,t+3]}function cc(e,t){return[{hours:lc(e,t,0),minutes:lc(e,t+1,0),seconds:lc(e,t+2,0),milliseconds:eC(e[t+3])},null,t+4]}function ld(e,t){const n=!e[t]&&!e[t+1],i=dp(e[t+1],e[t+2]),o=n?null:_i.instance(i);return[{},o,t+3]}function cd(e,t){const n=e[t]?Qs.create(e[t]):null;return[{},n,t+1]}const U4=RegExp(`^T?${iC.source}$`),z4=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function j4(e){const[t,n,i,o,s,r,a,l,c]=e,u=t[0]==="-",d=l&&l[0]==="-",h=(f,g=!1)=>f!==void 0&&(g||f&&u)?-f:f;return[{years:h(Wa(n)),months:h(Wa(i)),weeks:h(Wa(o)),days:h(Wa(s)),hours:h(Wa(r)),minutes:h(Wa(a)),seconds:h(Wa(l),l==="-0"),milliseconds:h(eC(c),d)}]}const K4={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function sC(e,t,n,i,o,s,r){const a={year:t.length===2?nC(Hr(t)):Hr(t),month:jx.indexOf(n)+1,day:Hr(i),hour:Hr(o),minute:Hr(s)};return r&&(a.second=Hr(r)),e&&(a.weekday=e.length>3?qx.indexOf(e)+1:Yx.indexOf(e)+1),a}const q4=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Y4(e){const[,t,n,i,o,s,r,a,l,c,u,d]=e,h=sC(t,o,i,n,s,r,a);let f;return l?f=K4[l]:c?f=0:f=dp(u,d),[h,new _i(f)]}function Z4(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const X4=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,J4=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Q4=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function sF(e){const[,t,n,i,o,s,r,a]=e;return[sC(t,o,i,n,s,r,a),_i.utcInstance]}function e6(e){const[,t,n,i,o,s,r,a]=e;return[sC(t,a,n,i,o,s,r),_i.utcInstance]}const t6=sc(L4,oC),n6=sc(N4,oC),i6=sc(V4,oC),o6=sc(iF),rF=rc(W4,cc,ld,cd),s6=rc(B4,cc,ld,cd),r6=rc(H4,cc,ld,cd),a6=rc(cc,ld,cd);function l6(e){return ac(e,[t6,rF],[n6,s6],[i6,r6],[o6,a6])}function c6(e){return ac(Z4(e),[q4,Y4])}function u6(e){return ac(e,[X4,sF],[J4,sF],[Q4,e6])}function d6(e){return ac(e,[z4,j4])}const h6=rc(cc);function f6(e){return ac(e,[U4,h6])}const p6=sc(G4,$4),g6=sc(oF),m6=rc(cc,ld,cd);function v6(e){return ac(e,[p6,rF],[g6,m6])}const aF="Invalid Duration",lF={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},y6={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...lF},wo=146097/400,uc=146097/4800,C6={years:{quarters:4,months:12,weeks:wo/7,days:wo,hours:wo*24,minutes:wo*24*60,seconds:wo*24*60*60,milliseconds:wo*24*60*60*1e3},quarters:{months:3,weeks:wo/28,days:wo/4,hours:wo*24/4,minutes:wo*24*60/4,seconds:wo*24*60*60/4,milliseconds:wo*24*60*60*1e3/4},months:{weeks:uc/7,days:uc,hours:uc*24,minutes:uc*24*60,seconds:uc*24*60*60,milliseconds:uc*24*60*60*1e3},...lF},Ua=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],w6=Ua.slice(0).reverse();function er(e,t,n=!1){const i={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new $t(i)}function cF(e,t){let n=t.milliseconds??0;for(const i of w6.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function uF(e,t){const n=cF(e,t)<0?-1:1;Ua.reduceRight((i,o)=>{if(Dt(t[o]))return i;if(i){const s=t[i]*n,r=e[o][i],a=Math.floor(s/r);t[o]+=a*n,t[i]-=a*r*n}return o},null),Ua.reduce((i,o)=>{if(Dt(t[o]))return i;if(i){const s=t[i]%1;t[i]-=s,t[o]+=s*e[i][o]}return o},null)}function dF(e){const t={};for(const[n,i]of Object.entries(e))i!==0&&(t[n]=i);return t}class $t{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let i=n?C6:y6;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||Jt.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,n){return $t.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new ci(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new $t({values:hp(t,$t.normalizeUnit),loc:Jt.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Br(t))return $t.fromMillis(t);if($t.isDuration(t))return t;if(typeof t=="object")return $t.fromObject(t);throw new ci(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[i]=d6(t);return i?$t.fromObject(i,n):$t.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[i]=f6(t);return i?$t.fromObject(i,n):$t.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new ci("need to specify a reason the Duration is invalid");const i=t instanceof jo?t:new jo(t,n);if(xn.throwOnInvalid)throw new j3(i);return new $t({invalid:i})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new Q_(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?ui.create(this.loc,i).formatDurationFromString(this,t):aF}toHuman(t={}){if(!this.isValid)return aF;const n=t.showZeros!==!1,i=Ua.map(o=>{const s=this.values[o];return Dt(s)||s===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:o.slice(0,-1)}).format(s)}).filter(o=>o);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(i)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=tC(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},tt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?cF(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=$t.fromDurationLike(t),i={};for(const o of Ua)(ic(n.values,o)||ic(this.values,o))&&(i[o]=n.get(o)+this.get(o));return er(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const n=$t.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const i of Object.keys(this.values))n[i]=zx(t(this.values[i],i));return er(this,{values:n},!0)}get(t){return this[$t.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...hp(t,$t.normalizeUnit)};return er(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:i,matrix:o}={}){const r={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:i};return er(this,r)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return uF(this.matrix,t),er(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=dF(this.normalize().shiftToAll().toObject());return er(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(r=>$t.normalizeUnit(r));const n={},i={},o=this.toObject();let s;for(const r of Ua)if(t.indexOf(r)>=0){s=r;let a=0;for(const c in i)a+=this.matrix[c][r]*i[c],i[c]=0;Br(o[r])&&(a+=o[r]);const l=Math.trunc(a);n[r]=l,i[r]=(a*1e3-l*1e3)/1e3}else Br(o[r])&&(i[r]=o[r]);for(const r in i)i[r]!==0&&(n[s]+=r===s?i[r]:i[r]/this.matrix[s][r]);return uF(this.matrix,n),er(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return er(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;const t=dF(this.values);return er(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(i,o){return i===void 0||i===0?o===void 0||o===0:i===o}for(const i of Ua)if(!n(this.values[i],t.values[i]))return!1;return!0}}const dc="Invalid Interval";function b6(e,t){return!e||!e.isValid?Fn.invalid("missing or invalid start"):!t||!t.isValid?Fn.invalid("missing or invalid end"):t<e?Fn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Fn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new ci("need to specify a reason the Interval is invalid");const i=t instanceof jo?t:new jo(t,n);if(xn.throwOnInvalid)throw new z3(i);return new Fn({invalid:i})}static fromDateTimes(t,n){const i=hd(t),o=hd(n),s=b6(i,o);return s??new Fn({start:i,end:o})}static after(t,n){const i=$t.fromDurationLike(n),o=hd(t);return Fn.fromDateTimes(o,o.plus(i))}static before(t,n){const i=$t.fromDurationLike(n),o=hd(t);return Fn.fromDateTimes(o.minus(i),o)}static fromISO(t,n){const[i,o]=(t||"").split("/",2);if(i&&o){let s,r;try{s=tt.fromISO(i,n),r=s.isValid}catch{r=!1}let a,l;try{a=tt.fromISO(o,n),l=a.isValid}catch{l=!1}if(r&&l)return Fn.fromDateTimes(s,a);if(r){const c=$t.fromISO(o,n);if(c.isValid)return Fn.after(s,c)}else if(l){const c=$t.fromISO(i,n);if(c.isValid)return Fn.before(a,c)}}return Fn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const i=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:i.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(i,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Fn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(hd).filter(r=>this.contains(r)).sort((r,a)=>r.toMillis()-a.toMillis()),i=[];let{s:o}=this,s=0;for(;o<this.e;){const r=n[s]||this.e,a=+r>+this.e?this.e:r;i.push(Fn.fromDateTimes(o,a)),o=a,s+=1}return i}splitBy(t){const n=$t.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,o=1,s;const r=[];for(;i<this.e;){const a=this.start.plus(n.mapUnits(l=>l*o));s=+a>+this.e?this.e:a,r.push(Fn.fromDateTimes(i,s)),i=s,o+=1}return r}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return n>=i?null:Fn.fromDateTimes(n,i)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return Fn.fromDateTimes(n,i)}static merge(t){const[n,i]=t.sort((o,s)=>o.s-s.s).reduce(([o,s],r)=>s?s.overlaps(r)||s.abutsStart(r)?[o,s.union(r)]:[o.concat([s]),r]:[o,r],[[],null]);return i&&n.push(i),n}static xor(t){let n=null,i=0;const o=[],s=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),r=Array.prototype.concat(...s),a=r.sort((l,c)=>l.time-c.time);for(const l of a)i+=l.type==="s"?1:-1,i===1?n=l.time:(n&&+n!=+l.time&&o.push(Fn.fromDateTimes(n,l.time)),n=null);return Fn.merge(o)}difference(...t){return Fn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:dc}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=op,n={}){return this.isValid?ui.create(this.s.loc.clone(n),t).formatInterval(this):dc}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:dc}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:dc}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:dc}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:dc}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):$t.invalid(this.invalidReason)}mapEndpoints(t){return Fn.fromDateTimes(t(this.s),t(this.e))}}class hc{static hasDST(t=xn.defaultZone){const n=tt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Qs.isValidZone(t)}static normalizeZone(t){return Vr(t,xn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||Jt.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||Jt.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||Jt.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null,outputCalendar:s="gregory"}={}){return(o||Jt.create(n,i,s)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null,outputCalendar:s="gregory"}={}){return(o||Jt.create(n,i,s)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null}={}){return(o||Jt.create(n,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null}={}){return(o||Jt.create(n,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Jt.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Jt.create(n,null,"gregory").eras(t)}static features(){return{relative:Hx(),localeWeek:Gx()}}}function hF(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor($t.fromMillis(i).as("days"))}function S6(e,t,n){const i=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=hF(l,c);return(u-u%7)/7}],["days",hF]],o={},s=e;let r,a;for(const[l,c]of i)n.indexOf(l)>=0&&(r=l,o[l]=c(e,t),a=s.plus(o),a>t?(o[l]--,e=s.plus(o),e>t&&(a=e,o[l]--,e=s.plus(o))):e=a);return[e,o,a,r]}function E6(e,t,n,i){let[o,s,r,a]=S6(e,t,n);const l=t-o,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(r<t&&(r=o.plus({[a]:1})),r!==o&&(s[a]=(s[a]||0)+l/(r-o)));const u=$t.fromObject(s,i);return c.length>0?$t.fromMillis(l,i).shiftTo(...c).plus(u):u}const R6="missing Intl.DateTimeFormat.formatToParts support";function jt(e,t=n=>n){return{regex:e,deser:([n])=>t(p4(n))}}const fF="[  ]",pF=new RegExp(fF,"g");function D6(e){return e.replace(/\./g,"\\.?").replace(pF,fF)}function gF(e){return e.replace(/\./g,"").replace(pF," ").toLowerCase()}function Ko(e,t){return e===null?null:{regex:RegExp(e.map(D6).join("|")),deser:([n])=>e.findIndex(i=>gF(n)===gF(i))+t}}function mF(e,t){return{regex:e,deser:([,n,i])=>dp(n,i),groups:t}}function pp(e){return{regex:e,deser:([t])=>t}}function _6(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function x6(e,t){const n=zo(t),i=zo(t,"{2}"),o=zo(t,"{3}"),s=zo(t,"{4}"),r=zo(t,"{6}"),a=zo(t,"{1,2}"),l=zo(t,"{1,3}"),c=zo(t,"{1,6}"),u=zo(t,"{1,9}"),d=zo(t,"{2,4}"),h=zo(t,"{4,6}"),f=y=>({regex:RegExp(_6(y.val)),deser:([b])=>b,literal:!0}),m=(y=>{if(e.literal)return f(y);switch(y.val){case"G":return Ko(t.eras("short"),0);case"GG":return Ko(t.eras("long"),0);case"y":return jt(c);case"yy":return jt(d,nC);case"yyyy":return jt(s);case"yyyyy":return jt(h);case"yyyyyy":return jt(r);case"M":return jt(a);case"MM":return jt(i);case"MMM":return Ko(t.months("short",!0),1);case"MMMM":return Ko(t.months("long",!0),1);case"L":return jt(a);case"LL":return jt(i);case"LLL":return Ko(t.months("short",!1),1);case"LLLL":return Ko(t.months("long",!1),1);case"d":return jt(a);case"dd":return jt(i);case"o":return jt(l);case"ooo":return jt(o);case"HH":return jt(i);case"H":return jt(a);case"hh":return jt(i);case"h":return jt(a);case"mm":return jt(i);case"m":return jt(a);case"q":return jt(a);case"qq":return jt(i);case"s":return jt(a);case"ss":return jt(i);case"S":return jt(l);case"SSS":return jt(o);case"u":return pp(u);case"uu":return pp(a);case"uuu":return jt(n);case"a":return Ko(t.meridiems(),0);case"kkkk":return jt(s);case"kk":return jt(d,nC);case"W":return jt(a);case"WW":return jt(i);case"E":case"c":return jt(n);case"EEE":return Ko(t.weekdays("short",!1),1);case"EEEE":return Ko(t.weekdays("long",!1),1);case"ccc":return Ko(t.weekdays("short",!0),1);case"cccc":return Ko(t.weekdays("long",!0),1);case"Z":case"ZZ":return mF(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return mF(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return pp(/[a-z_+-/]{1,256}?/i);case" ":return pp(/[^\S\n\r]/);default:return f(y)}})(e)||{invalidReason:R6};return m.token=e,m}const F6={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function T6(e,t,n){const{type:i,value:o}=e;if(i==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const s=t[i];let r=i;i==="hour"&&(t.hour12!=null?r=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?r="hour12":r="hour24":r=n.hour12?"hour12":"hour24");let a=F6[r];if(typeof a=="object"&&(a=a[s]),a)return{literal:!1,val:a}}function P6(e){return[`^${e.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,e]}function I6(e,t,n){const i=e.match(t);if(i){const o={};let s=1;for(const r in n)if(ic(n,r)){const a=n[r],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(o[a.token.val[0]]=a.deser(i.slice(s,s+l))),s+=l}return[i,o]}else return[i,{}]}function A6(e){const t=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,i;return Dt(e.z)||(n=Qs.create(e.z)),Dt(e.Z)||(n||(n=new _i(e.Z)),i=e.Z),Dt(e.q)||(e.M=(e.q-1)*3+1),Dt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Dt(e.u)||(e.S=eC(e.u)),[Object.keys(e).reduce((s,r)=>{const a=t(r);return a&&(s[a]=e[r]),s},{}),n,i]}let rC=null;function k6(){return rC||(rC=tt.fromMillis(1555555555555)),rC}function O6(e,t){if(e.literal)return e;const n=ui.macroTokenToFormatOpts(e.val),i=wF(n,t);return i==null||i.includes(void 0)?e:i}function vF(e,t){return Array.prototype.concat(...e.map(n=>O6(n,t)))}class yF{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=vF(ui.parseFormat(n),t),this.units=this.tokens.map(i=>x6(i,t)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){const[i,o]=P6(this.units);this.regex=RegExp(i,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,i]=I6(t,this.regex,this.handlers),[o,s,r]=i?A6(i):[null,null,void 0];if(ic(i,"a")&&ic(i,"H"))throw new nc("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:i,result:o,zone:s,specificOffset:r}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function CF(e,t,n){return new yF(e,n).explainFromTokens(t)}function M6(e,t,n){const{result:i,zone:o,specificOffset:s,invalidReason:r}=CF(e,t,n);return[i,o,s,r]}function wF(e,t){if(!e)return null;const i=ui.create(t,e).dtFormatter(k6()),o=i.formatToParts(),s=i.resolvedOptions();return o.map(r=>T6(r,e,s))}const aC="Invalid DateTime",bF=864e13;function ud(e){return new jo("unsupported zone",`the zone "${e.name}" is not supported`)}function lC(e){return e.weekData===null&&(e.weekData=ap(e.c)),e.weekData}function cC(e){return e.localWeekData===null&&(e.localWeekData=ap(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function za(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new tt({...n,...t,old:n})}function SF(e,t,n){let i=e-t*60*1e3;const o=n.offset(i);if(t===o)return[i,t];i-=(o-t)*60*1e3;const s=n.offset(i);return o===s?[i,o]:[e-Math.min(o,s)*60*1e3,Math.max(o,s)]}function gp(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function mp(e,t,n){return SF(up(e),t,n)}function EF(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,s={...e.c,year:i,month:o,day:Math.min(e.c.day,cp(i,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},r=$t.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=up(s);let[l,c]=SF(a,n,e.zone);return r!==0&&(l+=r,c=e.zone.offset(l)),{ts:l,o:c}}function fc(e,t,n,i,o,s){const{setZone:r,zone:a}=n;if(e&&Object.keys(e).length!==0||t){const l=t||a,c=tt.fromObject(e,{...n,zone:l,specificOffset:s});return r?c:c.setZone(a)}else return tt.invalid(new jo("unparsable",`the input "${o}" can't be parsed as ${i}`))}function vp(e,t,n=!0){return e.isValid?ui.create(Jt.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function uC(e,t,n){const i=e.c.year>9999||e.c.year<0;let o="";if(i&&e.c.year>=0&&(o+="+"),o+=Gn(e.c.year,i?6:4),n==="year")return o;if(t){if(o+="-",o+=Gn(e.c.month),n==="month")return o;o+="-"}else if(o+=Gn(e.c.month),n==="month")return o;return o+=Gn(e.c.day),o}function RF(e,t,n,i,o,s,r){let a=!n||e.c.millisecond!==0||e.c.second!==0,l="";switch(r){case"day":case"month":case"year":break;default:if(l+=Gn(e.c.hour),r==="hour")break;if(t){if(l+=":",l+=Gn(e.c.minute),r==="minute")break;a&&(l+=":",l+=Gn(e.c.second))}else{if(l+=Gn(e.c.minute),r==="minute")break;a&&(l+=Gn(e.c.second))}if(r==="second")break;a&&(!i||e.c.millisecond!==0)&&(l+=".",l+=Gn(e.c.millisecond,3))}return o&&(e.isOffsetFixed&&e.offset===0&&!s?l+="Z":e.o<0?(l+="-",l+=Gn(Math.trunc(-e.o/60)),l+=":",l+=Gn(Math.trunc(-e.o%60))):(l+="+",l+=Gn(Math.trunc(e.o/60)),l+=":",l+=Gn(Math.trunc(e.o%60)))),s&&(l+="["+e.zone.ianaName+"]"),l}const DF={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},L6={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},N6={ordinal:1,hour:0,minute:0,second:0,millisecond:0},yp=["year","month","day","hour","minute","second","millisecond"],V6=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],B6=["year","ordinal","hour","minute","second","millisecond"];function Cp(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Q_(e);return t}function _F(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Cp(e)}}function H6(e){if(dd===void 0&&(dd=xn.now()),e.type!=="iana")return e.offset(dd);const t=e.name;let n=dC.get(t);return n===void 0&&(n=e.offset(dd),dC.set(t,n)),n}function xF(e,t){const n=Vr(t.zone,xn.defaultZone);if(!n.isValid)return tt.invalid(ud(n));const i=Jt.fromObject(t);let o,s;if(Dt(e.year))o=xn.now();else{for(const l of yp)Dt(e[l])&&(e[l]=DF[l]);const r=Vx(e)||Bx(e);if(r)return tt.invalid(r);const a=H6(n);[o,s]=mp(e,a,n)}return new tt({ts:o,zone:n,loc:i,o:s})}function FF(e,t,n){const i=Dt(n.round)?!0:n.round,o=Dt(n.rounding)?"trunc":n.rounding,s=(a,l)=>(a=tC(a,i||n.calendary?0:2,n.calendary?"round":o),t.loc.clone(n).relFormatter(n).format(a,l)),r=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return s(r(n.unit),n.unit);for(const a of n.units){const l=r(a);if(Math.abs(l)>=1)return s(l,a)}return s(e>t?-0:0,n.units[n.units.length-1])}function TF(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let dd;const dC=new Map;class tt{constructor(t){const n=t.zone||xn.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new jo("invalid input"):null)||(n.isValid?null:ud(n));this.ts=Dt(t.ts)?xn.now():t.ts;let o=null,s=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,s]=[t.old.c,t.old.o];else{const a=Br(t.o)&&!t.old?t.o:n.offset(this.ts);o=gp(this.ts,a),i=Number.isNaN(o.year)?new jo("invalid input"):null,o=i?null:o,s=i?null:a}this._zone=n,this.loc=t.loc||Jt.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=o,this.o=s,this.isLuxonDateTime=!0}static now(){return new tt({})}static local(){const[t,n]=TF(arguments),[i,o,s,r,a,l,c]=n;return xF({year:i,month:o,day:s,hour:r,minute:a,second:l,millisecond:c},t)}static utc(){const[t,n]=TF(arguments),[i,o,s,r,a,l,c]=n;return t.zone=_i.utcInstance,xF({year:i,month:o,day:s,hour:r,minute:a,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const i=C4(t)?t.valueOf():NaN;if(Number.isNaN(i))return tt.invalid("invalid input");const o=Vr(n.zone,xn.defaultZone);return o.isValid?new tt({ts:i,zone:o,loc:Jt.fromObject(n)}):tt.invalid(ud(o))}static fromMillis(t,n={}){if(Br(t))return t<-bF||t>bF?tt.invalid("Timestamp out of range"):new tt({ts:t,zone:Vr(n.zone,xn.defaultZone),loc:Jt.fromObject(n)});throw new ci(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Br(t))return new tt({ts:t*1e3,zone:Vr(n.zone,xn.defaultZone),loc:Jt.fromObject(n)});throw new ci("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const i=Vr(n.zone,xn.defaultZone);if(!i.isValid)return tt.invalid(ud(i));const o=Jt.fromObject(n),s=hp(t,_F),{minDaysInFirstWeek:r,startOfWeek:a}=Nx(s,o),l=xn.now(),c=Dt(n.specificOffset)?i.offset(l):n.specificOffset,u=!Dt(s.ordinal),d=!Dt(s.year),h=!Dt(s.month)||!Dt(s.day),f=d||h,g=s.weekYear||s.weekNumber;if((f||u)&&g)throw new nc("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new nc("Can't mix ordinal dates with month/day");const m=g||s.weekday&&!f;let y,b,S=gp(l,c);m?(y=V6,b=L6,S=ap(S,r,a)):u?(y=B6,b=N6,S=Jy(S)):(y=yp,b=DF);let F=!1;for(const A of y){const D=s[A];Dt(D)?F?s[A]=b[A]:s[A]=S[A]:F=!0}const C=m?m4(s,r,a):u?v4(s):Vx(s),R=C||Bx(s);if(R)return tt.invalid(R);const E=m?Mx(s,r,a):u?Lx(s):s,[x,k]=mp(E,c,i),O=new tt({ts:x,zone:i,o:k,loc:o});return s.weekday&&f&&t.weekday!==O.weekday?tt.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${O.toISO()}`):O.isValid?O:tt.invalid(O.invalid)}static fromISO(t,n={}){const[i,o]=l6(t);return fc(i,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[i,o]=c6(t);return fc(i,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[i,o]=u6(t);return fc(i,o,n,"HTTP",n)}static fromFormat(t,n,i={}){if(Dt(t)||Dt(n))throw new ci("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:s=null}=i,r=Jt.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0}),[a,l,c,u]=M6(r,t,n);return u?tt.invalid(u):fc(a,l,i,`format ${n}`,t,c)}static fromString(t,n,i={}){return tt.fromFormat(t,n,i)}static fromSQL(t,n={}){const[i,o]=v6(t);return fc(i,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new ci("need to specify a reason the DateTime is invalid");const i=t instanceof jo?t:new jo(t,n);if(xn.throwOnInvalid)throw new U3(i);return new tt({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const i=wF(t,Jt.fromObject(n));return i?i.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return vF(ui.parseFormat(t),Jt.fromObject(n)).map(o=>o.val).join("")}static resetCache(){dd=void 0,dC.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?lC(this).weekYear:NaN}get weekNumber(){return this.isValid?lC(this).weekNumber:NaN}get weekday(){return this.isValid?lC(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?cC(this).weekday:NaN}get localWeekNumber(){return this.isValid?cC(this).weekNumber:NaN}get localWeekYear(){return this.isValid?cC(this).weekYear:NaN}get ordinal(){return this.isValid?Jy(this.c).ordinal:NaN}get monthShort(){return this.isValid?hc.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?hc.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?hc.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?hc.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,i=up(this.c),o=this.zone.offset(i-t),s=this.zone.offset(i+t),r=this.zone.offset(i-o*n),a=this.zone.offset(i-s*n);if(r===a)return[this];const l=i-r*n,c=i-a*n,u=gp(l,r),d=gp(c,a);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[za(this,{ts:l}),za(this,{ts:c})]:[this]}get isInLeapYear(){return sd(this.year)}get daysInMonth(){return cp(this.year,this.month)}get daysInYear(){return this.isValid?oc(this.year):NaN}get weeksInWeekYear(){return this.isValid?rd(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?rd(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:i,calendar:o}=ui.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(_i.instance(t),n)}toLocal(){return this.setZone(xn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(t=Vr(t,xn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||i){const s=t.offset(this.ts),r=this.toObject();[o]=mp(r,s,t)}return za(this,{ts:o,zone:t})}else return tt.invalid(ud(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:i}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i});return za(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=hp(t,_F),{minDaysInFirstWeek:i,startOfWeek:o}=Nx(n,this.loc),s=!Dt(n.weekYear)||!Dt(n.weekNumber)||!Dt(n.weekday),r=!Dt(n.ordinal),a=!Dt(n.year),l=!Dt(n.month)||!Dt(n.day),c=a||l,u=n.weekYear||n.weekNumber;if((c||r)&&u)throw new nc("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new nc("Can't mix ordinal dates with month/day");let d;s?d=Mx({...ap(this.c,i,o),...n},i,o):Dt(n.ordinal)?(d={...this.toObject(),...n},Dt(n.day)&&(d.day=Math.min(cp(d.year,d.month),d.day))):d=Lx({...Jy(this.c),...n});const[h,f]=mp(d,this.o,this.zone);return za(this,{ts:h,o:f})}plus(t){if(!this.isValid)return this;const n=$t.fromDurationLike(t);return za(this,EF(this,n))}minus(t){if(!this.isValid)return this;const n=$t.fromDurationLike(t).negate();return za(this,EF(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const i={},o=$t.normalizeUnit(t);switch(o){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(o==="weeks")if(n){const s=this.loc.getStartOfWeek(),{weekday:r}=this;r<s&&(i.weekNumber=this.weekNumber-1),i.weekday=s}else i.weekday=1;if(o==="quarters"){const s=Math.ceil(this.month/3);i.month=(s-1)*3+1}return this.set(i)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?ui.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):aC}toLocaleString(t=op,n={}){return this.isValid?ui.create(this.loc.clone(n),t).formatDateTime(this):aC}toLocaleParts(t={}){return this.isValid?ui.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:o=!0,extendedZone:s=!1,precision:r="milliseconds"}={}){if(!this.isValid)return null;r=Cp(r);const a=t==="extended";let l=uC(this,a,r);return yp.indexOf(r)>=3&&(l+="T"),l+=RF(this,a,n,i,o,s,r),l}toISODate({format:t="extended",precision:n="day"}={}){return this.isValid?uC(this,t==="extended",Cp(n)):null}toISOWeekDate(){return vp(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:o=!1,extendedZone:s=!1,format:r="extended",precision:a="milliseconds"}={}){return this.isValid?(a=Cp(a),(o&&yp.indexOf(a)>=3?"T":"")+RF(this,r==="extended",n,t,i,s,a)):null}toRFC2822(){return vp(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return vp(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?uC(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(i&&(o+=" "),n?o+="z":t&&(o+="ZZ")),vp(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():aC}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",i={}){if(!this.isValid||!t.isValid)return $t.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...i},s=w4(n).map($t.normalizeUnit),r=t.valueOf()>this.valueOf(),a=r?this:t,l=r?t:this,c=E6(a,l,s,o);return r?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(tt.now(),t,n)}until(t){return this.isValid?Fn.fromDateTimes(this,t):this}hasSame(t,n,i){if(!this.isValid)return!1;const o=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(n,i)<=o&&o<=s.endOf(n,i)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||tt.fromObject({},{zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],s=t.unit;return Array.isArray(t.unit)&&(o=t.unit,s=void 0),FF(n,this.plus(i),{...t,numeric:"always",units:o,unit:s})}toRelativeCalendar(t={}){return this.isValid?FF(t.base||tt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(tt.isDateTime))throw new ci("min requires all arguments be DateTimes");return $x(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(tt.isDateTime))throw new ci("max requires all arguments be DateTimes");return $x(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,i={}){const{locale:o=null,numberingSystem:s=null}=i,r=Jt.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0});return CF(r,t,n)}static fromStringExplain(t,n,i={}){return tt.fromFormatExplain(t,n,i)}static buildFormatParser(t,n={}){const{locale:i=null,numberingSystem:o=null}=n,s=Jt.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return new yF(s,t)}static fromFormatParser(t,n,i={}){if(Dt(t)||Dt(n))throw new ci("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:s=null}=i,r=Jt.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0});if(!r.equals(n.locale))throw new ci(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${n.locale}`);const{result:a,zone:l,specificOffset:c,invalidReason:u}=n.explainFromTokens(t);return u?tt.invalid(u):fc(a,l,i,`format ${n.format}`,t,c)}static get DATE_SHORT(){return op}static get DATE_MED(){return ex}static get DATE_MED_WITH_WEEKDAY(){return K3}static get DATE_FULL(){return tx}static get DATE_HUGE(){return nx}static get TIME_SIMPLE(){return ix}static get TIME_WITH_SECONDS(){return ox}static get TIME_WITH_SHORT_OFFSET(){return sx}static get TIME_WITH_LONG_OFFSET(){return rx}static get TIME_24_SIMPLE(){return ax}static get TIME_24_WITH_SECONDS(){return lx}static get TIME_24_WITH_SHORT_OFFSET(){return cx}static get TIME_24_WITH_LONG_OFFSET(){return ux}static get DATETIME_SHORT(){return dx}static get DATETIME_SHORT_WITH_SECONDS(){return hx}static get DATETIME_MED(){return fx}static get DATETIME_MED_WITH_SECONDS(){return px}static get DATETIME_MED_WITH_WEEKDAY(){return q3}static get DATETIME_FULL(){return gx}static get DATETIME_FULL_WITH_SECONDS(){return mx}static get DATETIME_HUGE(){return vx}static get DATETIME_HUGE_WITH_SECONDS(){return yx}}function hd(e){if(tt.isDateTime(e))return e;if(e&&e.valueOf&&Br(e.valueOf()))return tt.fromJSDate(e);if(e&&typeof e=="object")return tt.fromObject(e);throw new ci(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const PF="account.last_prefered_timezone",wp=300;function fd(e){if(!e)return null;if(tt.isDateTime(e))return e;if(e instanceof Date){const t=tt.fromJSDate(e);return t.isValid?t:null}if(typeof e=="number"){const t=tt.fromMillis(e);return t.isValid?t:null}if(typeof e=="string"){let t=tt.fromISO(e);return t.isValid||(t=tt.fromRFC2822(e)),t.isValid?t:null}return null}function IF(e,t,n){const i=fd(e);if(!i)return"";const o=n?i.setZone(n):i;return o.isValid?o.toFormat(t):""}function G6(e,t){if(!e)return"";const n=tt.now().setZone(e);return n.isValid?n.toFormat(t):""}function $6(e,t){return G6(e,t)}const W6=e=>{const t=tt.now().setZone(e);if(!t.isValid)return"GMT+0";const n=t.offset,i=n>=0?"+":"-",o=Math.floor(Math.abs(n)/60),s=Math.abs(n)%60;return`GMT${i}${o}:${s.toString().padStart(2,"0")}`},hC=()=>W3(PF)||"UTC",AF=e=>({id:e.id,name:(e==null?void 0:e.name)??e.display_name,initial:e.initial,profile_image:e.profile_image,color:{bgColor:e.color.bgColor,textColor:e.color.textColor}}),bp=e=>e!=null&&e.length?e.map(AF):[],U6=e=>{if(!(e!=null&&e.length))return[];const t=new Set;return e.filter(n=>t.has(n.id)?!1:(t.add(n.id),!0))},kF=e=>{if(!e)return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:t},z6=e=>Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0)),OF=(e,t)=>{var i,o,s,r;const n={id:e.id,name:e.name,assignees:void 0,status:e.template_flow_status,dateRange:[kF(e.start_date),kF(e.due_date)],isStarted:!!Number(e.is_started),isCompleted:!!Number(e.is_completed),lastUpdated:{tooltip:((i=e==null?void 0:e.last_updated_by)==null?void 0:i.length)>0?"by "+((o=e.last_updated_by)==null?void 0:o.map(a=>a.display_name).join(", ")):"",value:IF(e.updated_at,"MMM dd, yyyy | HH:mm",t)||""},completedOn:{tooltip:e.actual_due_date?void 0:"Pending completion",value:IF(e.actual_due_date,"MMM dd, yyyy | HH:mm",t)},isDeleted:!1,isProcessing:(s=e.bulk_process)==null?void 0:s.message,isArchived:((r=e.property)==null?void 0:r.is_archived)===1||e.status==0};return z6(n)},MF={headphone:["headphones","headset"],sofa:["couch"],couch:["sofa"],run:["running","runner"]},fC=e=>e.toLowerCase().trim(),j6=e=>fC(e).split(/\s+/).filter(Boolean),LF=e=>e.replace(/(ing|ed|s)$/i,"");function K6(e){const t=new Set;for(const n of e){const i=LF(n);if(t.add(i),t.add(n),MF[i])for(const o of MF[i])t.add(LF(o))}return Array.from(t)}function q6(e,t){const n=fC(e),i=K6(j6(t));let o=0;for(const s of i)s&&(n.includes(s)&&(o+=s.length*2),n.startsWith(s)&&(o+=3));return o}function Y6(e,t){const n=s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=t.split(/\s+/).filter(Boolean).map(n);if(!i.length)return e;const o=new RegExp(`(${i.join("|")})`,"ig");return e.replace(o,"<mark>$1</mark>")}const Sp=({date:e,timezone:t,format:n})=>{if(!e)return"";const i=typeof e=="string"?tt.fromISO(e,{zone:t}):e,o=tt.now().setZone(t||"local"),s=i.setZone(t||"local"),r=o.startOf("day"),l=s.startOf("day").diff(r,"days").days;let c="";if(l===0?c="Today":l===-1?c="Yesterday":l===1&&(c="Tomorrow"),c&&(n!=null&&n.includes("HH:mm"))){const u=s.toFormat("HH:mm");return`${c} at ${u}`}else if(c)return c;return s.toFormat(n)},pC=()=>"Asia/Saigon",NF=e=>`${tt.fromJSDate(e,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,VF=e=>({id:e.id,label:e.name,value:e.id,data:e,color:e.color||{bgColor:"#CCCCCC",textColor:"#FFFFFF"},selected:!1,hover:!1,type:"text",disabled:!1,clickable:!0,danger:!1}),Z6=e=>{var R;const t=Y(((R=e.value)==null?void 0:R.map(E=>E.id))??[]),n=Y([]),i=Y(!1),o=Fr(e,"workspaceId"),s=Fr(e,"entityId"),r=Fr(e,"id"),a=Fr(e,"ids"),l=e.updateRowData,c=Y([]),{apiServices:u}=vo(!!e.params,e),d=q(()=>{var O,A;const E=new Set(((O=e.value)==null?void 0:O.map(D=>D.id))??[]),x=((A=e.value)==null?void 0:A.map(D=>({...VF(D),selected:!0})))??[],k=n.value.filter(D=>!E.has(D.id));return ip(x,k,"id")}),h=E=>{const x=d.value.find(k=>k.id===E);return x==null?void 0:x.data},f=()=>{var E;return(E=a.value)!=null&&E.length?a.value:[String(r.value)]},g=async(E,x,k)=>{if(i.value||!u.value)return!1;i.value=!0;try{const O=await E();if((O==null?void 0:O.message)!=="Done")throw new Error("API call failed");return x(),!0}catch(O){return console.error("API call error:",O),!1}finally{i.value=!1}},m=async()=>await g(()=>u.value.unAssignAll(String(o.value),String(s.value),f()),()=>{l({assignees:[],type:"removeAll"}),t.value=[]}),y=async E=>await g(()=>u.value.replaceAssignee(String(o.value),f(),[E]),()=>{t.value=[E];const k=h(E);k&&l({assignees:bp([k]),type:"overwrite"})}),b=async E=>await g(()=>u.value.addAssignee(String(o.value),f(),[E]),()=>{var O,A,D;t.value.push(E);const k=h(E);if(k){const P=(D=(A=(O=e.params)==null?void 0:O.api)==null?void 0:A.getRowNode(String(e.id)))==null?void 0:D.data,V=(P==null?void 0:P.assignees)||[],H=ip([...V,...bp([k])],"id");l({assignees:H,type:"add"})}}),S=async E=>await g(()=>u.value.removeAssignee(String(o.value),f(),[E]),()=>{var A,D,P;const k=(P=(D=(A=e.params)==null?void 0:A.api)==null?void 0:D.getRowNode(String(e.id)))==null?void 0:P.data;t.value=t.value.filter(V=>V!==E);const O=bp(((k==null?void 0:k.assignees)||[]).filter(V=>V.id!==E));l({assignees:O,type:"remove"})});return{isSubmitting:i,options:c,unAssignAll:m,replaceAssignees:y,addAssignee:b,removeAssignee:S,handleSelect:E=>{const x=String(E.id);t.value.includes(x)?S(x):b(x)},openPeopleInsight:E=>{if(!E||!o.value)return;const x=fo({type:"people_insight",config:{user_id:E,ws_code:o.value,baseDomain:sessionStorage.getItem("BASE_URL")||""}}).url;window.open(x,"_blank")},assigneeList:n,mergedOptions:d,selectedUserIds:t}},X6={placement:"bottom-start",theme:"light",trigger:"click",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0};function J6(e){return e.value?"$el"in e.value?e.value.$el:e.value:null}function tr(e={}){const t={...X6,...e},n=Y(null),i=Y(null),o=Y(null),s=Y(!1),r=m=>{(m.key==="Escape"||m.key==="Esc")&&d()},a=()=>{o.value&&(o.value.destroy(),o.value=null,s.value=!1),document.removeEventListener("keydown",r)},l=m=>{const{showOnInit:y,alwaysShow:b,showArrow:S,debug:F,...C}=t;return{...C,content:m,theme:t.theme,trigger:b?"manual":t.trigger,placement:t.placement||"bottom-start",arrow:!1,offset:t.offset,interactive:t.interactive,appendTo:t.appendTo,animation:"fade",maxWidth:t.maxWidth||350,onShow:R=>{if(s.value=!0,document.addEventListener("keydown",r),e.onShow)return e.onShow(R)},onHide:R=>{if(b)return!1;if(s.value=!1,document.removeEventListener("keydown",r),e.onHide)return e.onHide(R)},onClickOutside:(R,E)=>{if(e.onClickOutside)return e.onClickOutside(R,E);b||R.hide()},popperOptions:t.popperOptions||{modifiers:[{name:"computeStyles",options:{gpuAcceleration:!1}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{fallbackPlacements:["top","bottom","left","right"]}}]}}},c=()=>{var b;a();const m=J6(n),y=i.value;if(!(!m||!y)){y.style.display==="none"&&(y.style.display="");try{const S=l(y),F=Or(m,S);o.value=Array.isArray(F)?F[0]:F,(t.showOnInit||t.alwaysShow)&&((b=o.value)==null||b.show())}catch(S){console.error("[useTippyComposable] Failed to create Tippy instance:",S)}}},u=()=>{o.value&&o.value.show()},d=()=>{t.alwaysShow||o.value&&o.value.hide()},h=()=>{s.value?d():u()},f=m=>{o.value&&o.value.setContent(m)},g=m=>{o.value&&o.value.setProps(m)};return ut([n,i],c,{flush:"post"}),qn(()=>{a()}),{instance:o,isVisible:s,show:u,hide:d,toggle:h,triggerRef:n,popupRef:i,destroyTippy:a,setContent:f,setProps:g}}const gC=(e,t,n)=>{const i=Y(n?"Copy link":"Copy"),o=()=>{setTimeout(()=>{i.value=n?"Copy link":"Copy"},3e3)};return{copyToClipboard:async()=>{try{return await navigator.clipboard.writeText(e),i.value="Copied",t&&t(),o(),!0}catch(r){return console.error("Failed to copy text to clipboard:",r),i.value="Copy failed",o(),!1}},tooltip:i}},Q6=(e,t,n)=>{const i={truncate:"End date cleared because it was before start. Please pick an end date.",swap:"Dates auto-swapped because start was after end.",...e.messages},o=Mo({startDate:null,endDate:null,timezone:e.timezone||"UTC",format:e.format||"",isSelectingStart:!1,isSelectingEnd:!1,rangeFeedback:{status:"idle",action:null,message:""},cacheStartDate:null,cacheEndDate:null,isDirty:!1});fv(()=>{var E;((E=e.value)==null?void 0:E.length)===2&&(o.startDate=e.value[0],o.endDate=e.value[1]),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isSelectingStart=!1,o.isSelectingEnd=!1,e.timezone&&(o.timezone=e.timezone)});const s=()=>{var A,D,P,V,H,te,B,G;t("tracing",JSON.parse(JSON.stringify(n.value)));const E=((D=(A=o.startDate)==null?void 0:A.getTime)==null?void 0:D.call(A))!==((V=(P=o.cacheStartDate)==null?void 0:P.getTime)==null?void 0:V.call(P)),x=((te=(H=o.endDate)==null?void 0:H.getTime)==null?void 0:te.call(H))!==((G=(B=o.cacheEndDate)==null?void 0:B.getTime)==null?void 0:G.call(B)),k=o.startDate===null,O=o.endDate===null;E&&x&&k&&O?t("clearAll"):E&&!x?k?t("clearStart"):t("update:start",o.startDate):x&&!E?O?t("clearDue"):t("update:end",o.endDate):E&&x&&t("update",[o.startDate,o.endDate]),t("confirmed",{start:o.startDate,end:o.endDate}),o.isDirty=E||x},r=(E,x)=>{const k=tt.fromObject({year:E.year,month:E.month,day:E.day},{zone:o.timezone});return(x==="start"?k.startOf("day"):k.endOf("day")).toJSDate()},a=()=>{o.rangeFeedback.status="idle",o.rangeFeedback.action=null,o.rangeFeedback.message=""},l=E=>{e.enableRangeFeedback&&(o.rangeFeedback.status="corrected",o.rangeFeedback.action=E,o.rangeFeedback.message=E==="swap"?i.swap:i.truncate)},c=E=>{if(!(!o.startDate||!o.endDate)){if(o.startDate.getTime()<=o.endDate.getTime()){e.enableRangeFeedback&&a();return}if(E==="select-start"){const x={start:o.startDate,end:o.endDate};o.endDate=null,t("range:invalid",x),t("range:corrected",{start:o.startDate,end:o.endDate,action:"truncate"}),o.isSelectingEnd=!0,l("truncate")}else{const x={start:o.startDate,end:o.endDate},k=o.startDate;o.startDate=o.endDate,o.endDate=k,t("range:invalid",x),t("range:corrected",{start:o.startDate,end:o.endDate,action:"swap"}),l("swap")}}},u=(E,x=!0)=>{e.disabled||e.readOnly||(o.startDate=r(E,"start"),x?(o.isSelectingStart=!1,o.isSelectingEnd=!0):(o.isSelectingStart=!0,o.isSelectingEnd=!1),c("select-start"))},d=E=>{e.disabled||e.readOnly||(o.endDate=r(E,"end"),c("select-end"))},h=()=>{e.disabled||e.readOnly||(o.startDate=null,a())},f=()=>{e.disabled||e.readOnly||(o.endDate=null,a())},g=()=>{e.disabled||e.readOnly||(o.startDate=null,o.endDate=null,a(),y())},m=()=>{e.disabled||e.readOnly||o.isDirty||(o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate)},y=()=>{e.disabled||e.readOnly||(s(),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isDirty=!1)},b=()=>{e.disabled||e.readOnly||(o.startDate=o.cacheStartDate,o.endDate=o.cacheEndDate,a(),o.isDirty=!1)},S=q(()=>o.startDate?tt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat(o.format):e.startPlaceholder),F=q(()=>o.endDate?tt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat(o.format):e.duePlaceholder),C=q(()=>!o.startDate&&!e.disabled?e.startTooltip:!o.startDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.startDate?tt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.startTooltip),R=q(()=>!o.endDate&&!e.disabled?e.dueTooltip:!o.endDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.endDate?tt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.dueTooltip);return{states:o,displayStartDate:S,displayEndDate:F,tooltipStartDate:C,tooltipEndDate:R,selectEndDate:d,selectStartDate:u,clearDue:f,clearStart:h,clearAll:g,beginInteraction:m,confirmSelection:y,cancelSelection:b}},BF="MMM dd",e5=e=>{const t=e.timezone,n=q(()=>e.start?Sp({date:fd(e.start),timezone:t,format:BF}):"No start"),i=q(()=>e.end?Sp({date:fd(e.end),timezone:t,format:BF}):"No due"),o=d=>{if(!d)return null;const h=tt.now().setZone(t).startOf("day"),f=tt.fromISO(d).setZone(t).startOf("day");if(!f.isValid)return console.warn("Invalid date:",d,f.invalidReason),null;const g=f.diff(h,"days").days;return g===0?"today":g===1?"tomorrow":g===-1?"yesterday":g<-1?"past":"future"},s=q(()=>o(e.start)),r=q(()=>o(e.end)),a=q(()=>{if(n.value==="No start")return["empty"];const d=[];return s.value&&d.push(`start-${s.value}`),e.isStarted&&d.push("actual"),d}),l=q(()=>{if(i.value==="No due")return["empty"];const d=[];return r.value&&d.push(`end-${r.value}`),e.isEnded&&d.push("actual"),d}),c=q(()=>e.start?Sp({date:fd(e.start),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No start"),u=q(()=>e.end?Sp({date:fd(e.end),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No due");return{startDate:n,endDate:i,startClasses:a,endClasses:l,fullStartDate:c,fullEndDate:u}},t5="UserCache",n5="user",i5=()=>{const e=Y({}),{getCachedValue:t,setCachedValue:n}=qu({dbName:t5,storeName:n5}),i=async c=>c?await t(c):null;return{getCachedUser:i,setCachedUser:async c=>{if(!(c!=null&&c.id)){console.warn("Cannot cache user without id:",c);return}await n(c.id,c),e.value[c.id]=!0},getCachedUsers:async c=>{if(!c||c.length===0)return[];const u=c.map(h=>i(h));return(await Promise.all(u)).filter(h=>h!==null)},setCachedUsers:async c=>{if(!c||c.length===0)return;const d=ip(c,"id").filter(h=>h.id&&!e.value[h.id]).map(async h=>{await n(h.id,h),e.value[h.id]=!0});await Promise.all(d)},isUserCached:c=>!!e.value[c],clearCacheTracking:()=>{e.value={}}}},o5={placement:"bottom-start",theme:"light",trigger:"manual",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0,useTrigger:!0,showOverlay:!1,overlayOpacity:.5,closeOnOverlayClick:!0,centered:!1};let pd=0,Zi=null;function s5(e){return Zi||(Zi=document.createElement("div"),Zi.className="popup-overlay",Zi.style.cssText=`
59
+ `+I:""),this.inner=I||null):typeof T=="object"&&(this.message="".concat(T.name," ").concat(T.message),this.inner=T):(this.message=xe[v]||w,this.inner=null)}return m(_).from(Ft),p[v]=_,p},{});He.Syntax=SyntaxError,He.Type=TypeError,He.Range=RangeError;var en=lt.reduce(function(p,v){return p[v+"Error"]=He[v],p},{}),tn=Io.reduce(function(p,v){return["Syntax","Type","Range"].indexOf(v)===-1&&(p[v+"Error"]=He[v]),p},{});function At(){}function N(p){return p}function X(p,v){return p==null||p===N?v:function(w){return v(p(w))}}function fe(p,v){return function(){p.apply(this,arguments),v.apply(this,arguments)}}function ke(p,v){return p===At?v:function(){var w=p.apply(this,arguments);w!==void 0&&(arguments[0]=w);var _=this.onsuccess,T=this.onerror;this.onsuccess=null,this.onerror=null;var I=v.apply(this,arguments);return _&&(this.onsuccess=this.onsuccess?fe(_,this.onsuccess):_),T&&(this.onerror=this.onerror?fe(T,this.onerror):T),I!==void 0?I:w}}function De(p,v){return p===At?v:function(){p.apply(this,arguments);var w=this.onsuccess,_=this.onerror;this.onsuccess=this.onerror=null,v.apply(this,arguments),w&&(this.onsuccess=this.onsuccess?fe(w,this.onsuccess):w),_&&(this.onerror=this.onerror?fe(_,this.onerror):_)}}function Fe(p,v){return p===At?v:function(w){var _=p.apply(this,arguments);l(w,_);var T=this.onsuccess,I=this.onerror;return this.onsuccess=null,this.onerror=null,w=v.apply(this,arguments),T&&(this.onsuccess=this.onsuccess?fe(T,this.onsuccess):T),I&&(this.onerror=this.onerror?fe(I,this.onerror):I),_===void 0?w===void 0?void 0:w:l(_,w)}}function Ve(p,v){return p===At?v:function(){return v.apply(this,arguments)!==!1&&p.apply(this,arguments)}}function Ne(p,v){return p===At?v:function(){var w=p.apply(this,arguments);if(w&&typeof w.then=="function"){for(var _=this,T=arguments.length,I=new Array(T);T--;)I[T]=arguments[T];return w.then(function(){return v.apply(_,I)})}return v.apply(this,arguments)}}tn.ModifyError=Me,tn.DexieError=re,tn.BulkError=Je;var Ae=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Te(p){Ae=p}var at={},We=100,Er=typeof Promise>"u"?[]:function(){var p=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[p,c(p),p];var v=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[v,c(v),p]}(),lt=Er[0],Io=Er[1],Er=Er[2],Io=Io&&Io.then,ht=lt&&lt.constructor,xt=!!Er,Mt=function(p,v){le.push([p,v]),Dn&&(queueMicrotask(Ls),Dn=!1)},Bt=!0,Dn=!0,sn=[],Kn=[],Jn=N,ye={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:At,pgp:!1,env:{},finalize:At},Re=ye,le=[],Se=0,nt=[];function Pe(p){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var v=this._PSD=Re;if(typeof p!="function"){if(p!==at)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&br(this,this._value))}this._state=null,this._value=null,++v.ref,function w(_,T){try{T(function(I){if(_._state===null){if(I===_)throw new TypeError("A promise cannot be resolved with itself.");var L=_._lib&&ns();I&&typeof I.then=="function"?w(_,function(W,J){I instanceof Pe?I._then(W,J):I.then(W,J)}):(_._state=!0,_._value=I,mi(_)),L&&Pi()}},br.bind(null,_))}catch(I){br(_,I)}}(this,p)}var Mn={get:function(){var p=Re,v=wm;function w(_,T){var I=this,L=!p.global&&(p!==Re||v!==wm),W=L&&!ha(),J=new Pe(function(ee,oe){la(I,new Po(KM(_,p,L,W),KM(T,p,L,W),ee,oe,p))});return this._consoleTask&&(J._consoleTask=this._consoleTask),J}return w.prototype=at,w},set:function(p){g(this,"then",p&&p.prototype===at?Mn:{get:function(){return p},set:Mn.set})}};function Po(p,v,w,_,T){this.onFulfilled=typeof p=="function"?p:null,this.onRejected=typeof v=="function"?v:null,this.resolve=w,this.reject=_,this.psd=T}function br(p,v){var w,_;Kn.push(v),p._state===null&&(w=p._lib&&ns(),v=Jn(v),p._state=!1,p._value=v,_=p,sn.some(function(T){return T._value===_._value})||sn.push(_),mi(p),w&&Pi())}function mi(p){var v=p._listeners;p._listeners=[];for(var w=0,_=v.length;w<_;++w)la(p,v[w]);var T=p._PSD;--T.ref||T.finalize(),Se===0&&(++Se,Mt(function(){--Se==0&&ua()},[]))}function la(p,v){if(p._state!==null){var w=p._state?v.onFulfilled:v.onRejected;if(w===null)return(p._state?v.resolve:v.reject)(p._value);++v.psd.ref,++Se,Mt(ca,[w,p,v])}else p._listeners.push(v)}function ca(p,v,w){try{var _,T=v._value;!v._state&&Kn.length&&(Kn=[]),_=Ae&&v._consoleTask?v._consoleTask.run(function(){return p(T)}):p(T),v._state||Kn.indexOf(T)!==-1||function(I){for(var L=sn.length;L;)if(sn[--L]._value===I._value)return sn.splice(L,1)}(v),w.resolve(_)}catch(I){w.reject(I)}finally{--Se==0&&ua(),--w.psd.ref||w.psd.finalize()}}function Ls(){El(ye,function(){ns()&&Pi()})}function ns(){var p=Bt;return Dn=Bt=!1,p}function Pi(){var p,v,w;do for(;0<le.length;)for(p=le,le=[],w=p.length,v=0;v<w;++v){var _=p[v];_[0].apply(null,_[1])}while(0<le.length);Dn=Bt=!0}function ua(){var p=sn;sn=[],p.forEach(function(_){_._PSD.onunhandled.call(null,_._value,_)});for(var v=nt.slice(0),w=v.length;w;)v[--w]()}function vm(p){return new Pe(at,!1,p)}function wn(p,v){var w=Re;return function(){var _=ns(),T=Re;try{return fa(w,!0),p.apply(this,arguments)}catch(I){v&&v(I)}finally{fa(T,!1),_&&Pi()}}}h(Pe.prototype,{then:Mn,_then:function(p,v){la(this,new Po(null,null,p,v,Re))},catch:function(p){if(arguments.length===1)return this.then(null,p);var v=p,w=arguments[1];return typeof v=="function"?this.then(null,function(_){return(_ instanceof v?w:vm)(_)}):this.then(null,function(_){return(_&&_.name===v?w:vm)(_)})},finally:function(p){return this.then(function(v){return Pe.resolve(p()).then(function(){return v})},function(v){return Pe.resolve(p()).then(function(){return vm(v)})})},timeout:function(p,v){var w=this;return p<1/0?new Pe(function(_,T){var I=setTimeout(function(){return T(new He.Timeout(v))},p);w.then(_,T).finally(clearTimeout.bind(null,I))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&g(Pe.prototype,Symbol.toStringTag,"Dexie.Promise"),ye.env=jM(),h(Pe,{all:function(){var p=ce.apply(null,arguments).map(bm);return new Pe(function(v,w){p.length===0&&v([]);var _=p.length;p.forEach(function(T,I){return Pe.resolve(T).then(function(L){p[I]=L,--_||v(p)},w)})})},resolve:function(p){return p instanceof Pe?p:p&&typeof p.then=="function"?new Pe(function(v,w){p.then(v,w)}):new Pe(at,!0,p)},reject:vm,race:function(){var p=ce.apply(null,arguments).map(bm);return new Pe(function(v,w){p.map(function(_){return Pe.resolve(_).then(v,w)})})},PSD:{get:function(){return Re},set:function(p){return Re=p}},totalEchoes:{get:function(){return wm}},newPSD:da,usePSD:El,scheduler:{get:function(){return Mt},set:function(p){Mt=p}},rejectionMapper:{get:function(){return Jn},set:function(p){Jn=p}},follow:function(p,v){return new Pe(function(w,_){return da(function(T,I){var L=Re;L.unhandleds=[],L.onunhandled=I,L.finalize=fe(function(){var W,J=this;W=function(){J.unhandleds.length===0?T():I(J.unhandleds[0])},nt.push(function ee(){W(),nt.splice(nt.indexOf(ee),1)}),++Se,Mt(function(){--Se==0&&ua()},[])},L.finalize),p()},v,w,_)})}}),ht&&(ht.allSettled&&g(Pe,"allSettled",function(){var p=ce.apply(null,arguments).map(bm);return new Pe(function(v){p.length===0&&v([]);var w=p.length,_=new Array(w);p.forEach(function(T,I){return Pe.resolve(T).then(function(L){return _[I]={status:"fulfilled",value:L}},function(L){return _[I]={status:"rejected",reason:L}}).then(function(){return--w||v(_)})})})}),ht.any&&typeof AggregateError<"u"&&g(Pe,"any",function(){var p=ce.apply(null,arguments).map(bm);return new Pe(function(v,w){p.length===0&&w(new AggregateError([]));var _=p.length,T=new Array(_);p.forEach(function(I,L){return Pe.resolve(I).then(function(W){return v(W)},function(W){T[L]=W,--_||w(new AggregateError(T))})})})}),ht.withResolvers&&(Pe.withResolvers=ht.withResolvers));var Qn={awaits:0,echoes:0,id:0},Kde=0,ym=[],Cm=0,wm=0,qde=0;function da(p,v,w,_){var T=Re,I=Object.create(T);return I.parent=T,I.ref=0,I.global=!1,I.id=++qde,ye.env,I.env=xt?{Promise:Pe,PromiseProp:{value:Pe,configurable:!0,writable:!0},all:Pe.all,race:Pe.race,allSettled:Pe.allSettled,any:Pe.any,resolve:Pe.resolve,reject:Pe.reject}:{},v&&l(I,v),++T.ref,I.finalize=function(){--this.parent.ref||this.parent.finalize()},_=El(I,p,w,_),I.ref===0&&I.finalize(),_}function au(){return Qn.id||(Qn.id=++Kde),++Qn.awaits,Qn.echoes+=We,Qn.id}function ha(){return!!Qn.awaits&&(--Qn.awaits==0&&(Qn.id=0),Qn.echoes=Qn.awaits*We,!0)}function bm(p){return Qn.echoes&&p&&p.constructor===ht?(au(),p.then(function(v){return ha(),v},function(v){return ha(),Ln(v)})):p}function Yde(){var p=ym[ym.length-1];ym.pop(),fa(p,!1)}function fa(p,v){var w,_=Re;(v?!Qn.echoes||Cm++&&p===Re:!Cm||--Cm&&p===Re)||queueMicrotask(v?(function(T){++wm,Qn.echoes&&--Qn.echoes!=0||(Qn.echoes=Qn.awaits=Qn.id=0),ym.push(Re),fa(T,!0)}).bind(null,p):Yde),p!==Re&&(Re=p,_===ye&&(ye.env=jM()),xt&&(w=ye.env.Promise,v=p.env,(_.global||p.global)&&(Object.defineProperty(s,"Promise",v.PromiseProp),w.all=v.all,w.race=v.race,w.resolve=v.resolve,w.reject=v.reject,v.allSettled&&(w.allSettled=v.allSettled),v.any&&(w.any=v.any))))}function jM(){var p=s.Promise;return xt?{Promise:p,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:p.all,race:p.race,allSettled:p.allSettled,any:p.any,resolve:p.resolve,reject:p.reject}:{}}function El(p,v,w,_,T){var I=Re;try{return fa(p,!0),v(w,_,T)}finally{fa(I,!1)}}function KM(p,v,w,_){return typeof p!="function"?p:function(){var T=Re;w&&au(),fa(v,!0);try{return p.apply(this,arguments)}finally{fa(T,!1),_&&queueMicrotask(ha)}}}function $S(p){Promise===ht&&Qn.echoes===0?Cm===0?p():enqueueNativeMicroTask(p):setTimeout(p,0)}(""+Io).indexOf("[native code]")===-1&&(au=ha=At);var Ln=Pe.reject,Rl="￿",Sr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",qM="String expected.",lu=[],Sm="__dbnames",WS="readonly",US="readwrite";function Dl(p,v){return p?v?function(){return p.apply(this,arguments)&&v.apply(this,arguments)}:p:v}var YM={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Em(p){return typeof p!="string"||/\./.test(p)?function(v){return v}:function(v){return v[p]===void 0&&p in v&&delete(v=V(v))[p],v}}function ZM(){throw He.Type()}function Ht(p,v){try{var w=XM(p),_=XM(v);if(w!==_)return w==="Array"?1:_==="Array"?-1:w==="binary"?1:_==="binary"?-1:w==="string"?1:_==="string"?-1:w==="Date"?1:_!=="Date"?NaN:-1;switch(w){case"number":case"Date":case"string":return v<p?1:p<v?-1:0;case"binary":return function(T,I){for(var L=T.length,W=I.length,J=L<W?L:W,ee=0;ee<J;++ee)if(T[ee]!==I[ee])return T[ee]<I[ee]?-1:1;return L===W?0:L<W?-1:1}(JM(p),JM(v));case"Array":return function(T,I){for(var L=T.length,W=I.length,J=L<W?L:W,ee=0;ee<J;++ee){var oe=Ht(T[ee],I[ee]);if(oe!==0)return oe}return L===W?0:L<W?-1:1}(p,v)}}catch{}return NaN}function XM(p){var v=typeof p;return v!="object"?v:ArrayBuffer.isView(p)?"binary":(p=te(p),p==="ArrayBuffer"?"binary":p)}function JM(p){return p instanceof Uint8Array?p:ArrayBuffer.isView(p)?new Uint8Array(p.buffer,p.byteOffset,p.byteLength):new Uint8Array(p)}var QM=(pn.prototype._trans=function(p,v,w){var _=this._tx||Re.trans,T=this.name,I=Ae&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(p==="readonly"?"read":"write"," ").concat(this.name));function L(ee,oe,j){if(!j.schema[T])throw new He.NotFound("Table "+T+" not part of transaction");return v(j.idbtrans,j)}var W=ns();try{var J=_&&_.db._novip===this.db._novip?_===Re.trans?_._promise(p,L,w):da(function(){return _._promise(p,L,w)},{trans:_,transless:Re.transless||Re}):function ee(oe,j,ae,Q){if(oe.idbdb&&(oe._state.openComplete||Re.letThrough||oe._vip)){var ie=oe._createTransaction(j,ae,oe._dbSchema);try{ie.create(),oe._state.PR1398_maxLoop=3}catch(se){return se.name===gt.InvalidState&&oe.isOpen()&&0<--oe._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),oe.close({disableAutoOpen:!1}),oe.open().then(function(){return ee(oe,j,ae,Q)})):Ln(se)}return ie._promise(j,function(se,ne){return da(function(){return Re.trans=ie,Q(se,ne,ie)})}).then(function(se){if(j==="readwrite")try{ie.idbtrans.commit()}catch{}return j==="readonly"?se:ie._completion.then(function(){return se})})}if(oe._state.openComplete)return Ln(new He.DatabaseClosed(oe._state.dbOpenError));if(!oe._state.isBeingOpened){if(!oe._state.autoOpen)return Ln(new He.DatabaseClosed);oe.open().catch(At)}return oe._state.dbReadyPromise.then(function(){return ee(oe,j,ae,Q)})}(this.db,p,[this.name],L);return I&&(J._consoleTask=I,J=J.catch(function(ee){return console.trace(ee),Ln(ee)})),J}finally{W&&Pi()}},pn.prototype.get=function(p,v){var w=this;return p&&p.constructor===Object?this.where(p).first(v):p==null?Ln(new He.Type("Invalid argument to Table.get()")):this._trans("readonly",function(_){return w.core.get({trans:_,key:p}).then(function(T){return w.hook.reading.fire(T)})}).then(v)},pn.prototype.where=function(p){if(typeof p=="string")return new this.db.WhereClause(this,p);if(a(p))return new this.db.WhereClause(this,"[".concat(p.join("+"),"]"));var v=r(p);if(v.length===1)return this.where(v[0]).equals(p[v[0]]);var w=this.schema.indexes.concat(this.schema.primKey).filter(function(W){if(W.compound&&v.every(function(ee){return 0<=W.keyPath.indexOf(ee)})){for(var J=0;J<v.length;++J)if(v.indexOf(W.keyPath[J])===-1)return!1;return!0}return!1}).sort(function(W,J){return W.keyPath.length-J.keyPath.length})[0];if(w&&this.db._maxKey!==Rl){var I=w.keyPath.slice(0,v.length);return this.where(I).equals(I.map(function(J){return p[J]}))}!w&&Ae&&console.warn("The query ".concat(JSON.stringify(p)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(v.join("+"),"]"));var _=this.schema.idxByName;function T(W,J){return Ht(W,J)===0}var L=v.reduce(function(j,J){var ee=j[0],oe=j[1],j=_[J],ae=p[J];return[ee||j,ee||!j?Dl(oe,j&&j.multi?function(Q){return Q=E(Q,J),a(Q)&&Q.some(function(ie){return T(ae,ie)})}:function(Q){return T(ae,E(Q,J))}):oe]},[null,null]),I=L[0],L=L[1];return I?this.where(I.name).equals(p[I.keyPath]).filter(L):w?this.filter(L):this.where(v).equals("")},pn.prototype.filter=function(p){return this.toCollection().and(p)},pn.prototype.count=function(p){return this.toCollection().count(p)},pn.prototype.offset=function(p){return this.toCollection().offset(p)},pn.prototype.limit=function(p){return this.toCollection().limit(p)},pn.prototype.each=function(p){return this.toCollection().each(p)},pn.prototype.toArray=function(p){return this.toCollection().toArray(p)},pn.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},pn.prototype.orderBy=function(p){return new this.db.Collection(new this.db.WhereClause(this,a(p)?"[".concat(p.join("+"),"]"):p))},pn.prototype.reverse=function(){return this.toCollection().reverse()},pn.prototype.mapToClass=function(p){var v,w=this.db,_=this.name;function T(){return v!==null&&v.apply(this,arguments)||this}(this.schema.mappedClass=p).prototype instanceof ZM&&(function(J,ee){if(typeof ee!="function"&&ee!==null)throw new TypeError("Class extends value "+String(ee)+" is not a constructor or null");function oe(){this.constructor=J}n(J,ee),J.prototype=ee===null?Object.create(ee):(oe.prototype=ee.prototype,new oe)}(T,v=p),Object.defineProperty(T.prototype,"db",{get:function(){return w},enumerable:!1,configurable:!0}),T.prototype.table=function(){return _},p=T);for(var I=new Set,L=p.prototype;L;L=c(L))Object.getOwnPropertyNames(L).forEach(function(J){return I.add(J)});function W(J){if(!J)return J;var ee,oe=Object.create(p.prototype);for(ee in J)if(!I.has(ee))try{oe[ee]=J[ee]}catch{}return oe}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=W,this.hook("reading",W),p},pn.prototype.defineClass=function(){return this.mapToClass(function(p){l(this,p)})},pn.prototype.add=function(p,v){var w=this,_=this.schema.primKey,T=_.auto,I=_.keyPath,L=p;return I&&T&&(L=Em(I)(p)),this._trans("readwrite",function(W){return w.core.mutate({trans:W,type:"add",keys:v!=null?[v]:null,values:[L]})}).then(function(W){return W.numFailures?Pe.reject(W.failures[0]):W.lastResult}).then(function(W){if(I)try{x(p,I,W)}catch{}return W})},pn.prototype.update=function(p,v){return typeof p!="object"||a(p)?this.where(":id").equals(p).modify(v):(p=E(p,this.schema.primKey.keyPath),p===void 0?Ln(new He.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(p).modify(v))},pn.prototype.put=function(p,v){var w=this,_=this.schema.primKey,T=_.auto,I=_.keyPath,L=p;return I&&T&&(L=Em(I)(p)),this._trans("readwrite",function(W){return w.core.mutate({trans:W,type:"put",values:[L],keys:v!=null?[v]:null})}).then(function(W){return W.numFailures?Pe.reject(W.failures[0]):W.lastResult}).then(function(W){if(I)try{x(p,I,W)}catch{}return W})},pn.prototype.delete=function(p){var v=this;return this._trans("readwrite",function(w){return v.core.mutate({trans:w,type:"delete",keys:[p]})}).then(function(w){return w.numFailures?Pe.reject(w.failures[0]):void 0})},pn.prototype.clear=function(){var p=this;return this._trans("readwrite",function(v){return p.core.mutate({trans:v,type:"deleteRange",range:YM})}).then(function(v){return v.numFailures?Pe.reject(v.failures[0]):void 0})},pn.prototype.bulkGet=function(p){var v=this;return this._trans("readonly",function(w){return v.core.getMany({keys:p,trans:w}).then(function(_){return _.map(function(T){return v.hook.reading.fire(T)})})})},pn.prototype.bulkAdd=function(p,v,w){var _=this,T=Array.isArray(v)?v:void 0,I=(w=w||(T?void 0:v))?w.allKeys:void 0;return this._trans("readwrite",function(L){var ee=_.schema.primKey,W=ee.auto,ee=ee.keyPath;if(ee&&T)throw new He.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(T&&T.length!==p.length)throw new He.InvalidArgument("Arguments objects and keys must have the same length");var J=p.length,ee=ee&&W?p.map(Em(ee)):p;return _.core.mutate({trans:L,type:"add",keys:T,values:ee,wantResults:I}).then(function(ie){var j=ie.numFailures,ae=ie.results,Q=ie.lastResult,ie=ie.failures;if(j===0)return I?ae:Q;throw new Je("".concat(_.name,".bulkAdd(): ").concat(j," of ").concat(J," operations failed"),ie)})})},pn.prototype.bulkPut=function(p,v,w){var _=this,T=Array.isArray(v)?v:void 0,I=(w=w||(T?void 0:v))?w.allKeys:void 0;return this._trans("readwrite",function(L){var ee=_.schema.primKey,W=ee.auto,ee=ee.keyPath;if(ee&&T)throw new He.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(T&&T.length!==p.length)throw new He.InvalidArgument("Arguments objects and keys must have the same length");var J=p.length,ee=ee&&W?p.map(Em(ee)):p;return _.core.mutate({trans:L,type:"put",keys:T,values:ee,wantResults:I}).then(function(ie){var j=ie.numFailures,ae=ie.results,Q=ie.lastResult,ie=ie.failures;if(j===0)return I?ae:Q;throw new Je("".concat(_.name,".bulkPut(): ").concat(j," of ").concat(J," operations failed"),ie)})})},pn.prototype.bulkUpdate=function(p){var v=this,w=this.core,_=p.map(function(L){return L.key}),T=p.map(function(L){return L.changes}),I=[];return this._trans("readwrite",function(L){return w.getMany({trans:L,keys:_,cache:"clone"}).then(function(W){var J=[],ee=[];p.forEach(function(j,ae){var Q=j.key,ie=j.changes,se=W[ae];if(se){for(var ne=0,he=Object.keys(ie);ne<he.length;ne++){var ge=he[ne],me=ie[ge];if(ge===v.schema.primKey.keyPath){if(Ht(me,Q)!==0)throw new He.Constraint("Cannot update primary key in bulkUpdate()")}else x(se,ge,me)}I.push(ae),J.push(Q),ee.push(se)}});var oe=J.length;return w.mutate({trans:L,type:"put",keys:J,values:ee,updates:{keys:_,changeSpecs:T}}).then(function(j){var ae=j.numFailures,Q=j.failures;if(ae===0)return oe;for(var ie=0,se=Object.keys(Q);ie<se.length;ie++){var ne,he=se[ie],ge=I[Number(he)];ge!=null&&(ne=Q[he],delete Q[he],Q[ge]=ne)}throw new Je("".concat(v.name,".bulkUpdate(): ").concat(ae," of ").concat(oe," operations failed"),Q)})})})},pn.prototype.bulkDelete=function(p){var v=this,w=p.length;return this._trans("readwrite",function(_){return v.core.mutate({trans:_,type:"delete",keys:p})}).then(function(L){var T=L.numFailures,I=L.lastResult,L=L.failures;if(T===0)return I;throw new Je("".concat(v.name,".bulkDelete(): ").concat(T," of ").concat(w," operations failed"),L)})},pn);function pn(){}function xh(p){function v(L,W){if(W){for(var J=arguments.length,ee=new Array(J-1);--J;)ee[J-1]=arguments[J];return w[L].subscribe.apply(null,ee),p}if(typeof L=="string")return w[L]}var w={};v.addEventType=I;for(var _=1,T=arguments.length;_<T;++_)I(arguments[_]);return v;function I(L,W,J){if(typeof L!="object"){var ee;W=W||Ve;var oe={subscribers:[],fire:J=J||At,subscribe:function(j){oe.subscribers.indexOf(j)===-1&&(oe.subscribers.push(j),oe.fire=W(oe.fire,j))},unsubscribe:function(j){oe.subscribers=oe.subscribers.filter(function(ae){return ae!==j}),oe.fire=oe.subscribers.reduce(W,J)}};return w[L]=v[L]=oe}r(ee=L).forEach(function(j){var ae=ee[j];if(a(ae))I(j,ee[j][0],ee[j][1]);else{if(ae!=="asap")throw new He.InvalidArgument("Invalid event config");var Q=I(j,N,function(){for(var ie=arguments.length,se=new Array(ie);ie--;)se[ie]=arguments[ie];Q.subscribers.forEach(function(ne){R(function(){ne.apply(null,se)})})})}})}}function Fh(p,v){return m(v).from({prototype:p}),v}function cu(p,v){return!(p.filter||p.algorithm||p.or)&&(v?p.justLimit:!p.replayFilter)}function zS(p,v){p.filter=Dl(p.filter,v)}function jS(p,v,w){var _=p.replayFilter;p.replayFilter=_?function(){return Dl(_(),v())}:v,p.justLimit=w&&!_}function Rm(p,v){if(p.isPrimKey)return v.primaryKey;var w=v.getIndexByKeyPath(p.index);if(!w)throw new He.Schema("KeyPath "+p.index+" on object store "+v.name+" is not indexed");return w}function eL(p,v,w){var _=Rm(p,v.schema);return v.openCursor({trans:w,values:!p.keysOnly,reverse:p.dir==="prev",unique:!!p.unique,query:{index:_,range:p.range}})}function Dm(p,v,w,_){var T=p.replayFilter?Dl(p.filter,p.replayFilter()):p.filter;if(p.or){var I={},L=function(W,J,ee){var oe,j;T&&!T(J,ee,function(ae){return J.stop(ae)},function(ae){return J.fail(ae)})||((j=""+(oe=J.primaryKey))=="[object ArrayBuffer]"&&(j=""+new Uint8Array(oe)),d(I,j)||(I[j]=!0,v(W,J,ee)))};return Promise.all([p.or._iterate(L,w),tL(eL(p,_,w),p.algorithm,L,!p.keysOnly&&p.valueMapper)])}return tL(eL(p,_,w),Dl(p.algorithm,T),v,!p.keysOnly&&p.valueMapper)}function tL(p,v,w,_){var T=wn(_?function(I,L,W){return w(_(I),L,W)}:w);return p.then(function(I){if(I)return I.start(function(){var L=function(){return I.continue()};v&&!v(I,function(W){return L=W},function(W){I.stop(W),L=At},function(W){I.fail(W),L=At})||T(I.value,I,function(W){return L=W}),L()})})}var Er=Symbol(),Th=(nL.prototype.execute=function(p){if(this.add!==void 0){var v=this.add;if(a(v))return o(o([],a(p)?p:[],!0),v).sort();if(typeof v=="number")return(Number(p)||0)+v;if(typeof v=="bigint")try{return BigInt(p)+v}catch{return BigInt(0)+v}throw new TypeError("Invalid term ".concat(v))}if(this.remove!==void 0){var w=this.remove;if(a(w))return a(p)?p.filter(function(_){return!w.includes(_)}).sort():[];if(typeof w=="number")return Number(p)-w;if(typeof w=="bigint")try{return BigInt(p)-w}catch{return BigInt(0)-w}throw new TypeError("Invalid subtrahend ".concat(w))}return v=(v=this.replacePrefix)===null||v===void 0?void 0:v[0],v&&typeof p=="string"&&p.startsWith(v)?this.replacePrefix[1]+p.substring(v.length):p},nL);function nL(p){Object.assign(this,p)}var Zde=(zt.prototype._read=function(p,v){var w=this._ctx;return w.error?w.table._trans(null,Ln.bind(null,w.error)):w.table._trans("readonly",p).then(v)},zt.prototype._write=function(p){var v=this._ctx;return v.error?v.table._trans(null,Ln.bind(null,v.error)):v.table._trans("readwrite",p,"locked")},zt.prototype._addAlgorithm=function(p){var v=this._ctx;v.algorithm=Dl(v.algorithm,p)},zt.prototype._iterate=function(p,v){return Dm(this._ctx,p,v,this._ctx.table.core)},zt.prototype.clone=function(p){var v=Object.create(this.constructor.prototype),w=Object.create(this._ctx);return p&&l(w,p),v._ctx=w,v},zt.prototype.raw=function(){return this._ctx.valueMapper=null,this},zt.prototype.each=function(p){var v=this._ctx;return this._read(function(w){return Dm(v,p,w,v.table.core)})},zt.prototype.count=function(p){var v=this;return this._read(function(w){var _=v._ctx,T=_.table.core;if(cu(_,!0))return T.count({trans:w,query:{index:Rm(_,T.schema),range:_.range}}).then(function(L){return Math.min(L,_.limit)});var I=0;return Dm(_,function(){return++I,!1},w,T).then(function(){return I})}).then(p)},zt.prototype.sortBy=function(p,v){var w=p.split(".").reverse(),_=w[0],T=w.length-1;function I(J,ee){return ee?I(J[w[ee]],ee-1):J[_]}var L=this._ctx.dir==="next"?1:-1;function W(J,ee){return Ht(I(J,T),I(ee,T))*L}return this.toArray(function(J){return J.sort(W)}).then(v)},zt.prototype.toArray=function(p){var v=this;return this._read(function(w){var _=v._ctx;if(_.dir==="next"&&cu(_,!0)&&0<_.limit){var T=_.valueMapper,I=Rm(_,_.table.core.schema);return _.table.core.query({trans:w,limit:_.limit,values:!0,query:{index:I,range:_.range}}).then(function(W){return W=W.result,T?W.map(T):W})}var L=[];return Dm(_,function(W){return L.push(W)},w,_.table.core).then(function(){return L})},p)},zt.prototype.offset=function(p){var v=this._ctx;return p<=0||(v.offset+=p,cu(v)?jS(v,function(){var w=p;return function(_,T){return w===0||(w===1?--w:T(function(){_.advance(w),w=0}),!1)}}):jS(v,function(){var w=p;return function(){return--w<0}})),this},zt.prototype.limit=function(p){return this._ctx.limit=Math.min(this._ctx.limit,p),jS(this._ctx,function(){var v=p;return function(w,_,T){return--v<=0&&_(T),0<=v}},!0),this},zt.prototype.until=function(p,v){return zS(this._ctx,function(w,_,T){return!p(w.value)||(_(T),v)}),this},zt.prototype.first=function(p){return this.limit(1).toArray(function(v){return v[0]}).then(p)},zt.prototype.last=function(p){return this.reverse().first(p)},zt.prototype.filter=function(p){var v;return zS(this._ctx,function(w){return p(w.value)}),(v=this._ctx).isMatch=Dl(v.isMatch,p),this},zt.prototype.and=function(p){return this.filter(p)},zt.prototype.or=function(p){return new this.db.WhereClause(this._ctx.table,p,this)},zt.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},zt.prototype.desc=function(){return this.reverse()},zt.prototype.eachKey=function(p){var v=this._ctx;return v.keysOnly=!v.isMatch,this.each(function(w,_){p(_.key,_)})},zt.prototype.eachUniqueKey=function(p){return this._ctx.unique="unique",this.eachKey(p)},zt.prototype.eachPrimaryKey=function(p){var v=this._ctx;return v.keysOnly=!v.isMatch,this.each(function(w,_){p(_.primaryKey,_)})},zt.prototype.keys=function(p){var v=this._ctx;v.keysOnly=!v.isMatch;var w=[];return this.each(function(_,T){w.push(T.key)}).then(function(){return w}).then(p)},zt.prototype.primaryKeys=function(p){var v=this._ctx;if(v.dir==="next"&&cu(v,!0)&&0<v.limit)return this._read(function(_){var T=Rm(v,v.table.core.schema);return v.table.core.query({trans:_,values:!1,limit:v.limit,query:{index:T,range:v.range}})}).then(function(_){return _.result}).then(p);v.keysOnly=!v.isMatch;var w=[];return this.each(function(_,T){w.push(T.primaryKey)}).then(function(){return w}).then(p)},zt.prototype.uniqueKeys=function(p){return this._ctx.unique="unique",this.keys(p)},zt.prototype.firstKey=function(p){return this.limit(1).keys(function(v){return v[0]}).then(p)},zt.prototype.lastKey=function(p){return this.reverse().firstKey(p)},zt.prototype.distinct=function(){var p=this._ctx,p=p.index&&p.table.schema.idxByName[p.index];if(!p||!p.multi)return this;var v={};return zS(this._ctx,function(T){var _=T.primaryKey.toString(),T=d(v,_);return v[_]=!0,!T}),this},zt.prototype.modify=function(p){var v=this,w=this._ctx;return this._write(function(_){var T,I,L;L=typeof p=="function"?p:(T=r(p),I=T.length,function(ne){for(var he=!1,ge=0;ge<I;++ge){var me=T[ge],_e=p[me],Ge=E(ne,me);_e instanceof Th?(x(ne,me,_e.execute(Ge)),he=!0):Ge!==_e&&(x(ne,me,_e),he=!0)}return he});var W=w.table.core,j=W.schema.primaryKey,J=j.outbound,ee=j.extractKey,oe=200,j=v.db._options.modifyChunkSize;j&&(oe=typeof j=="object"?j[W.name]||j["*"]||200:j);function ae(ne,me){var ge=me.failures,me=me.numFailures;ie+=ne-me;for(var _e=0,Ge=r(ge);_e<Ge.length;_e++){var Ze=Ge[_e];Q.push(ge[Ze])}}var Q=[],ie=0,se=[];return v.clone().primaryKeys().then(function(ne){function he(me){var _e=Math.min(oe,ne.length-me);return W.getMany({trans:_,keys:ne.slice(me,me+_e),cache:"immutable"}).then(function(Ge){for(var Ze=[],$e=[],Ue=J?[]:null,Qe=[],qe=0;qe<_e;++qe){var st=Ge[qe],kt={value:V(st),primKey:ne[me+qe]};L.call(kt,kt.value,kt)!==!1&&(kt.value==null?Qe.push(ne[me+qe]):J||Ht(ee(st),ee(kt.value))===0?($e.push(kt.value),J&&Ue.push(ne[me+qe])):(Qe.push(ne[me+qe]),Ze.push(kt.value)))}return Promise.resolve(0<Ze.length&&W.mutate({trans:_,type:"add",values:Ze}).then(function(Nt){for(var Vt in Nt.failures)Qe.splice(parseInt(Vt),1);ae(Ze.length,Nt)})).then(function(){return(0<$e.length||ge&&typeof p=="object")&&W.mutate({trans:_,type:"put",keys:Ue,values:$e,criteria:ge,changeSpec:typeof p!="function"&&p,isAdditionalChunk:0<me}).then(function(Nt){return ae($e.length,Nt)})}).then(function(){return(0<Qe.length||ge&&p===KS)&&W.mutate({trans:_,type:"delete",keys:Qe,criteria:ge,isAdditionalChunk:0<me}).then(function(Nt){return ae(Qe.length,Nt)})}).then(function(){return ne.length>me+_e&&he(me+oe)})})}var ge=cu(w)&&w.limit===1/0&&(typeof p!="function"||p===KS)&&{index:w.index,range:w.range};return he(0).then(function(){if(0<Q.length)throw new Me("Error modifying one or more objects",Q,ie,se);return ne.length})})})},zt.prototype.delete=function(){var p=this._ctx,v=p.range;return cu(p)&&(p.isPrimKey||v.type===3)?this._write(function(w){var _=p.table.core.schema.primaryKey,T=v;return p.table.core.count({trans:w,query:{index:_,range:T}}).then(function(I){return p.table.core.mutate({trans:w,type:"deleteRange",range:T}).then(function(L){var W=L.failures;if(L.lastResult,L.results,L=L.numFailures,L)throw new Me("Could not delete some values",Object.keys(W).map(function(J){return W[J]}),I-L);return I-L})})}):this.modify(KS)},zt);function zt(){}var KS=function(p,v){return v.value=null};function Xde(p,v){return p<v?-1:p===v?0:1}function Jde(p,v){return v<p?-1:p===v?0:1}function oo(p,v,w){return p=p instanceof oL?new p.Collection(p):p,p._ctx.error=new(w||TypeError)(v),p}function uu(p){return new p.Collection(p,function(){return iL("")}).limit(0)}function _m(p,v,w,_){var T,I,L,W,J,ee,oe,j=w.length;if(!w.every(function(ie){return typeof ie=="string"}))return oo(p,qM);function ae(ie){T=ie==="next"?function(ne){return ne.toUpperCase()}:function(ne){return ne.toLowerCase()},I=ie==="next"?function(ne){return ne.toLowerCase()}:function(ne){return ne.toUpperCase()},L=ie==="next"?Xde:Jde;var se=w.map(function(ne){return{lower:I(ne),upper:T(ne)}}).sort(function(ne,he){return L(ne.lower,he.lower)});W=se.map(function(ne){return ne.upper}),J=se.map(function(ne){return ne.lower}),oe=(ee=ie)==="next"?"":_}ae("next"),p=new p.Collection(p,function(){return pa(W[0],J[j-1]+_)}),p._ondirectionchange=function(ie){ae(ie)};var Q=0;return p._addAlgorithm(function(ie,se,ne){var he=ie.key;if(typeof he!="string")return!1;var ge=I(he);if(v(ge,J,Q))return!0;for(var me=null,_e=Q;_e<j;++_e){var Ge=function(Ze,$e,Ue,Qe,qe,st){for(var kt=Math.min(Ze.length,Qe.length),Nt=-1,Vt=0;Vt<kt;++Vt){var so=$e[Vt];if(so!==Qe[Vt])return qe(Ze[Vt],Ue[Vt])<0?Ze.substr(0,Vt)+Ue[Vt]+Ue.substr(Vt+1):qe(Ze[Vt],Qe[Vt])<0?Ze.substr(0,Vt)+Qe[Vt]+Ue.substr(Vt+1):0<=Nt?Ze.substr(0,Nt)+$e[Nt]+Ue.substr(Nt+1):null;qe(Ze[Vt],so)<0&&(Nt=Vt)}return kt<Qe.length&&st==="next"?Ze+Ue.substr(Ze.length):kt<Ze.length&&st==="prev"?Ze.substr(0,Ue.length):Nt<0?null:Ze.substr(0,Nt)+Qe[Nt]+Ue.substr(Nt+1)}(he,ge,W[_e],J[_e],L,ee);Ge===null&&me===null?Q=_e+1:(me===null||0<L(me,Ge))&&(me=Ge)}return se(me!==null?function(){ie.continue(me+oe)}:ne),!1}),p}function pa(p,v,w,_){return{type:2,lower:p,upper:v,lowerOpen:w,upperOpen:_}}function iL(p){return{type:1,lower:p,upper:p}}var oL=(Object.defineProperty(ei.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),ei.prototype.between=function(p,v,w,_){w=w!==!1,_=_===!0;try{return 0<this._cmp(p,v)||this._cmp(p,v)===0&&(w||_)&&(!w||!_)?uu(this):new this.Collection(this,function(){return pa(p,v,!w,!_)})}catch{return oo(this,Sr)}},ei.prototype.equals=function(p){return p==null?oo(this,Sr):new this.Collection(this,function(){return iL(p)})},ei.prototype.above=function(p){return p==null?oo(this,Sr):new this.Collection(this,function(){return pa(p,void 0,!0)})},ei.prototype.aboveOrEqual=function(p){return p==null?oo(this,Sr):new this.Collection(this,function(){return pa(p,void 0,!1)})},ei.prototype.below=function(p){return p==null?oo(this,Sr):new this.Collection(this,function(){return pa(void 0,p,!1,!0)})},ei.prototype.belowOrEqual=function(p){return p==null?oo(this,Sr):new this.Collection(this,function(){return pa(void 0,p)})},ei.prototype.startsWith=function(p){return typeof p!="string"?oo(this,qM):this.between(p,p+Rl,!0,!0)},ei.prototype.startsWithIgnoreCase=function(p){return p===""?this.startsWith(p):_m(this,function(v,w){return v.indexOf(w[0])===0},[p],Rl)},ei.prototype.equalsIgnoreCase=function(p){return _m(this,function(v,w){return v===w[0]},[p],"")},ei.prototype.anyOfIgnoreCase=function(){var p=ce.apply($,arguments);return p.length===0?uu(this):_m(this,function(v,w){return w.indexOf(v)!==-1},p,"")},ei.prototype.startsWithAnyOfIgnoreCase=function(){var p=ce.apply($,arguments);return p.length===0?uu(this):_m(this,function(v,w){return w.some(function(_){return v.indexOf(_)===0})},p,Rl)},ei.prototype.anyOf=function(){var p=this,v=ce.apply($,arguments),w=this._cmp;try{v.sort(w)}catch{return oo(this,Sr)}if(v.length===0)return uu(this);var _=new this.Collection(this,function(){return pa(v[0],v[v.length-1])});_._ondirectionchange=function(I){w=I==="next"?p._ascending:p._descending,v.sort(w)};var T=0;return _._addAlgorithm(function(I,L,W){for(var J=I.key;0<w(J,v[T]);)if(++T===v.length)return L(W),!1;return w(J,v[T])===0||(L(function(){I.continue(v[T])}),!1)}),_},ei.prototype.notEqual=function(p){return this.inAnyRange([[-1/0,p],[p,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},ei.prototype.noneOf=function(){var p=ce.apply($,arguments);if(p.length===0)return new this.Collection(this);try{p.sort(this._ascending)}catch{return oo(this,Sr)}var v=p.reduce(function(w,_){return w?w.concat([[w[w.length-1][1],_]]):[[-1/0,_]]},null);return v.push([p[p.length-1],this.db._maxKey]),this.inAnyRange(v,{includeLowers:!1,includeUppers:!1})},ei.prototype.inAnyRange=function(he,v){var w=this,_=this._cmp,T=this._ascending,I=this._descending,L=this._min,W=this._max;if(he.length===0)return uu(this);if(!he.every(function(ge){return ge[0]!==void 0&&ge[1]!==void 0&&T(ge[0],ge[1])<=0}))return oo(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",He.InvalidArgument);var J=!v||v.includeLowers!==!1,ee=v&&v.includeUppers===!0,oe,j=T;function ae(ge,me){return j(ge[0],me[0])}try{(oe=he.reduce(function(ge,me){for(var _e=0,Ge=ge.length;_e<Ge;++_e){var Ze=ge[_e];if(_(me[0],Ze[1])<0&&0<_(me[1],Ze[0])){Ze[0]=L(Ze[0],me[0]),Ze[1]=W(Ze[1],me[1]);break}}return _e===Ge&&ge.push(me),ge},[])).sort(ae)}catch{return oo(this,Sr)}var Q=0,ie=ee?function(ge){return 0<T(ge,oe[Q][1])}:function(ge){return 0<=T(ge,oe[Q][1])},se=J?function(ge){return 0<I(ge,oe[Q][0])}:function(ge){return 0<=I(ge,oe[Q][0])},ne=ie,he=new this.Collection(this,function(){return pa(oe[0][0],oe[oe.length-1][1],!J,!ee)});return he._ondirectionchange=function(ge){j=ge==="next"?(ne=ie,T):(ne=se,I),oe.sort(ae)},he._addAlgorithm(function(ge,me,_e){for(var Ge,Ze=ge.key;ne(Ze);)if(++Q===oe.length)return me(_e),!1;return!ie(Ge=Ze)&&!se(Ge)||(w._cmp(Ze,oe[Q][1])===0||w._cmp(Ze,oe[Q][0])===0||me(function(){j===T?ge.continue(oe[Q][0]):ge.continue(oe[Q][1])}),!1)}),he},ei.prototype.startsWithAnyOf=function(){var p=ce.apply($,arguments);return p.every(function(v){return typeof v=="string"})?p.length===0?uu(this):this.inAnyRange(p.map(function(v){return[v,v+Rl]})):oo(this,"startsWithAnyOf() only works with strings")},ei);function ei(){}function Ns(p){return wn(function(v){return Ph(v),p(v.target.error),!1})}function Ph(p){p.stopPropagation&&p.stopPropagation(),p.preventDefault&&p.preventDefault()}var Ih="storagemutated",qS="x-storagemutated-1",ga=xh(null,Ih),Qde=(Vs.prototype._lock=function(){return C(!Re.global),++this._reculock,this._reculock!==1||Re.global||(Re.lockOwnerFor=this),this},Vs.prototype._unlock=function(){if(C(!Re.global),--this._reculock==0)for(Re.global||(Re.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var p=this._blockedFuncs.shift();try{El(p[1],p[0])}catch{}}return this},Vs.prototype._locked=function(){return this._reculock&&Re.lockOwnerFor!==this},Vs.prototype.create=function(p){var v=this;if(!this.mode)return this;var w=this.db.idbdb,_=this.db._state.dbOpenError;if(C(!this.idbtrans),!p&&!w)switch(_&&_.name){case"DatabaseClosedError":throw new He.DatabaseClosed(_);case"MissingAPIError":throw new He.MissingAPI(_.message,_);default:throw new He.OpenFailed(_)}if(!this.active)throw new He.TransactionInactive;return C(this._completion._state===null),(p=this.idbtrans=p||(this.db.core||w).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=wn(function(T){Ph(T),v._reject(p.error)}),p.onabort=wn(function(T){Ph(T),v.active&&v._reject(new He.Abort(p.error)),v.active=!1,v.on("abort").fire(T)}),p.oncomplete=wn(function(){v.active=!1,v._resolve(),"mutatedParts"in p&&ga.storagemutated.fire(p.mutatedParts)}),this},Vs.prototype._promise=function(p,v,w){var _=this;if(p==="readwrite"&&this.mode!=="readwrite")return Ln(new He.ReadOnly("Transaction is readonly"));if(!this.active)return Ln(new He.TransactionInactive);if(this._locked())return new Pe(function(I,L){_._blockedFuncs.push([function(){_._promise(p,v,w).then(I,L)},Re])});if(w)return da(function(){var I=new Pe(function(L,W){_._lock();var J=v(L,W,_);J&&J.then&&J.then(L,W)});return I.finally(function(){return _._unlock()}),I._lib=!0,I});var T=new Pe(function(I,L){var W=v(I,L,_);W&&W.then&&W.then(I,L)});return T._lib=!0,T},Vs.prototype._root=function(){return this.parent?this.parent._root():this},Vs.prototype.waitFor=function(p){var v,w=this._root(),_=Pe.resolve(p);w._waitingFor?w._waitingFor=w._waitingFor.then(function(){return _}):(w._waitingFor=_,w._waitingQueue=[],v=w.idbtrans.objectStore(w.storeNames[0]),function I(){for(++w._spinCount;w._waitingQueue.length;)w._waitingQueue.shift()();w._waitingFor&&(v.get(-1/0).onsuccess=I)}());var T=w._waitingFor;return new Pe(function(I,L){_.then(function(W){return w._waitingQueue.push(wn(I.bind(null,W)))},function(W){return w._waitingQueue.push(wn(L.bind(null,W)))}).finally(function(){w._waitingFor===T&&(w._waitingFor=null)})})},Vs.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new He.Abort))},Vs.prototype.table=function(p){var v=this._memoizedTables||(this._memoizedTables={});if(d(v,p))return v[p];var w=this.schema[p];if(!w)throw new He.NotFound("Table "+p+" not part of transaction");return w=new this.db.Table(p,w,this),w.core=this.db.core.table(p),v[p]=w},Vs);function Vs(){}function YS(p,v,w,_,T,I,L){return{name:p,keyPath:v,unique:w,multi:_,auto:T,compound:I,src:(w&&!L?"&":"")+(_?"*":"")+(T?"++":"")+sL(v)}}function sL(p){return typeof p=="string"?p:p?"["+[].join.call(p,"+")+"]":""}function ZS(p,v,w){return{name:p,primKey:v,indexes:w,mappedClass:null,idxByName:(_=function(T){return[T.name,T]},w.reduce(function(T,I,L){return L=_(I,L),L&&(T[L[0]]=L[1]),T},{}))};var _}var Ah=function(p){try{return p.only([[]]),Ah=function(){return[[]]},[[]]}catch{return Ah=function(){return Rl},Rl}};function XS(p){return p==null?function(){}:typeof p=="string"?(v=p).split(".").length===1?function(w){return w[v]}:function(w){return E(w,v)}:function(w){return E(w,p)};var v}function rL(p){return[].slice.call(p)}var ehe=0;function kh(p){return p==null?":id":typeof p=="string"?p:"[".concat(p.join("+"),"]")}function the(p,v,J){function _(ne){if(ne.type===3)return null;if(ne.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var Q=ne.lower,ie=ne.upper,se=ne.lowerOpen,ne=ne.upperOpen;return Q===void 0?ie===void 0?null:v.upperBound(ie,!!ne):ie===void 0?v.lowerBound(Q,!!se):v.bound(Q,ie,!!se,!!ne)}function T(ae){var Q,ie=ae.name;return{name:ie,schema:ae,mutate:function(se){var ne=se.trans,he=se.type,ge=se.keys,me=se.values,_e=se.range;return new Promise(function(Ge,Ze){Ge=wn(Ge);var $e=ne.objectStore(ie),Ue=$e.keyPath==null,Qe=he==="put"||he==="add";if(!Qe&&he!=="delete"&&he!=="deleteRange")throw new Error("Invalid operation type: "+he);var qe,st=(ge||me||{length:1}).length;if(ge&&me&&ge.length!==me.length)throw new Error("Given keys array must have same length as given values array.");if(st===0)return Ge({numFailures:0,failures:{},results:[],lastResult:void 0});function kt(Ii){++so,Ph(Ii)}var Nt=[],Vt=[],so=0;if(he==="deleteRange"){if(_e.type===4)return Ge({numFailures:so,failures:Vt,results:[],lastResult:void 0});_e.type===3?Nt.push(qe=$e.clear()):Nt.push(qe=$e.delete(_(_e)))}else{var Ue=Qe?Ue?[me,ge]:[me,null]:[ge,null],Tt=Ue[0],yi=Ue[1];if(Qe)for(var Ci=0;Ci<st;++Ci)Nt.push(qe=yi&&yi[Ci]!==void 0?$e[he](Tt[Ci],yi[Ci]):$e[he](Tt[Ci])),qe.onerror=kt;else for(Ci=0;Ci<st;++Ci)Nt.push(qe=$e[he](Tt[Ci])),qe.onerror=kt}function Bm(Ii){Ii=Ii.target.result,Nt.forEach(function(Fl,g0){return Fl.error!=null&&(Vt[g0]=Fl.error)}),Ge({numFailures:so,failures:Vt,results:he==="delete"?ge:Nt.map(function(Fl){return Fl.result}),lastResult:Ii})}qe.onerror=function(Ii){kt(Ii),Bm(Ii)},qe.onsuccess=Bm})},getMany:function(se){var ne=se.trans,he=se.keys;return new Promise(function(ge,me){ge=wn(ge);for(var _e,Ge=ne.objectStore(ie),Ze=he.length,$e=new Array(Ze),Ue=0,Qe=0,qe=function(Nt){Nt=Nt.target,$e[Nt._pos]=Nt.result,++Qe===Ue&&ge($e)},st=Ns(me),kt=0;kt<Ze;++kt)he[kt]!=null&&((_e=Ge.get(he[kt]))._pos=kt,_e.onsuccess=qe,_e.onerror=st,++Ue);Ue===0&&ge($e)})},get:function(se){var ne=se.trans,he=se.key;return new Promise(function(ge,me){ge=wn(ge);var _e=ne.objectStore(ie).get(he);_e.onsuccess=function(Ge){return ge(Ge.target.result)},_e.onerror=Ns(me)})},query:(Q=ee,function(se){return new Promise(function(ne,he){ne=wn(ne);var ge,me,_e,Ue=se.trans,Ge=se.values,Ze=se.limit,qe=se.query,$e=Ze===1/0?void 0:Ze,Qe=qe.index,qe=qe.range,Ue=Ue.objectStore(ie),Qe=Qe.isPrimaryKey?Ue:Ue.index(Qe.name),qe=_(qe);if(Ze===0)return ne({result:[]});Q?(($e=Ge?Qe.getAll(qe,$e):Qe.getAllKeys(qe,$e)).onsuccess=function(st){return ne({result:st.target.result})},$e.onerror=Ns(he)):(ge=0,me=!Ge&&"openKeyCursor"in Qe?Qe.openKeyCursor(qe):Qe.openCursor(qe),_e=[],me.onsuccess=function(st){var kt=me.result;return kt?(_e.push(Ge?kt.value:kt.primaryKey),++ge===Ze?ne({result:_e}):void kt.continue()):ne({result:_e})},me.onerror=Ns(he))})}),openCursor:function(se){var ne=se.trans,he=se.values,ge=se.query,me=se.reverse,_e=se.unique;return new Promise(function(Ge,Ze){Ge=wn(Ge);var Qe=ge.index,$e=ge.range,Ue=ne.objectStore(ie),Ue=Qe.isPrimaryKey?Ue:Ue.index(Qe.name),Qe=me?_e?"prevunique":"prev":_e?"nextunique":"next",qe=!he&&"openKeyCursor"in Ue?Ue.openKeyCursor(_($e),Qe):Ue.openCursor(_($e),Qe);qe.onerror=Ns(Ze),qe.onsuccess=wn(function(st){var kt,Nt,Vt,so,Tt=qe.result;Tt?(Tt.___id=++ehe,Tt.done=!1,kt=Tt.continue.bind(Tt),Nt=(Nt=Tt.continuePrimaryKey)&&Nt.bind(Tt),Vt=Tt.advance.bind(Tt),so=function(){throw new Error("Cursor not stopped")},Tt.trans=ne,Tt.stop=Tt.continue=Tt.continuePrimaryKey=Tt.advance=function(){throw new Error("Cursor not started")},Tt.fail=wn(Ze),Tt.next=function(){var yi=this,Ci=1;return this.start(function(){return Ci--?yi.continue():yi.stop()}).then(function(){return yi})},Tt.start=function(yi){function Ci(){if(qe.result)try{yi()}catch(Ii){Tt.fail(Ii)}else Tt.done=!0,Tt.start=function(){throw new Error("Cursor behind last entry")},Tt.stop()}var Bm=new Promise(function(Ii,Fl){Ii=wn(Ii),qe.onerror=Ns(Fl),Tt.fail=Fl,Tt.stop=function(g0){Tt.stop=Tt.continue=Tt.continuePrimaryKey=Tt.advance=so,Ii(g0)}});return qe.onsuccess=wn(function(Ii){qe.onsuccess=Ci,Ci()}),Tt.continue=kt,Tt.continuePrimaryKey=Nt,Tt.advance=Vt,Ci(),Bm},Ge(Tt)):Ge(null)},Ze)})},count:function(se){var ne=se.query,he=se.trans,ge=ne.index,me=ne.range;return new Promise(function(_e,Ge){var Ze=he.objectStore(ie),$e=ge.isPrimaryKey?Ze:Ze.index(ge.name),Ze=_(me),$e=Ze?$e.count(Ze):$e.count();$e.onsuccess=wn(function(Ue){return _e(Ue.target.result)}),$e.onerror=Ns(Ge)})}}}var I,L,W,oe=(L=J,W=rL((I=p).objectStoreNames),{schema:{name:I.name,tables:W.map(function(ae){return L.objectStore(ae)}).map(function(ae){var Q=ae.keyPath,ne=ae.autoIncrement,ie=a(Q),se={},ne={name:ae.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:Q==null,compound:ie,keyPath:Q,autoIncrement:ne,unique:!0,extractKey:XS(Q)},indexes:rL(ae.indexNames).map(function(he){return ae.index(he)}).map(function(_e){var ge=_e.name,me=_e.unique,Ge=_e.multiEntry,_e=_e.keyPath,Ge={name:ge,compound:a(_e),keyPath:_e,unique:me,multiEntry:Ge,extractKey:XS(_e)};return se[kh(_e)]=Ge}),getIndexByKeyPath:function(he){return se[kh(he)]}};return se[":id"]=ne.primaryKey,Q!=null&&(se[kh(Q)]=ne.primaryKey),ne})},hasGetAll:0<W.length&&"getAll"in L.objectStore(W[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),J=oe.schema,ee=oe.hasGetAll,oe=J.tables.map(T),j={};return oe.forEach(function(ae){return j[ae.name]=ae}),{stack:"dbcore",transaction:p.transaction.bind(p),table:function(ae){if(!j[ae])throw new Error("Table '".concat(ae,"' not found"));return j[ae]},MIN_KEY:-1/0,MAX_KEY:Ah(v),schema:J}}function nhe(p,v,w,_){var T=w.IDBKeyRange;return w.indexedDB,{dbcore:(_=the(v,T,_),p.dbcore.reduce(function(I,L){return L=L.create,i(i({},I),L(I))},_))}}function xm(p,_){var w=_.db,_=nhe(p._middlewares,w,p._deps,_);p.core=_.dbcore,p.tables.forEach(function(T){var I=T.name;p.core.schema.tables.some(function(L){return L.name===I})&&(T.core=p.core.table(I),p[I]instanceof p.Table&&(p[I].core=T.core))})}function Fm(p,v,w,_){w.forEach(function(T){var I=_[T];v.forEach(function(L){var W=function J(ee,oe){return y(ee,oe)||(ee=c(ee))&&J(ee,oe)}(L,T);(!W||"value"in W&&W.value===void 0)&&(L===p.Transaction.prototype||L instanceof p.Transaction?g(L,T,{get:function(){return this.table(T)},set:function(J){f(this,T,{value:J,writable:!0,configurable:!0,enumerable:!0})}}):L[T]=new p.Table(T,I))})})}function JS(p,v){v.forEach(function(w){for(var _ in w)w[_]instanceof p.Table&&delete w[_]})}function ihe(p,v){return p._cfg.version-v._cfg.version}function ohe(p,v,w,_){var T=p._dbSchema;w.objectStoreNames.contains("$meta")&&!T.$meta&&(T.$meta=ZS("$meta",lL("")[0],[]),p._storeNames.push("$meta"));var I=p._createTransaction("readwrite",p._storeNames,T);I.create(w),I._completion.catch(_);var L=I._reject.bind(I),W=Re.transless||Re;da(function(){return Re.trans=I,Re.transless=W,v!==0?(xm(p,w),ee=v,((J=I).storeNames.includes("$meta")?J.table("$meta").get("version").then(function(oe){return oe??ee}):Pe.resolve(ee)).then(function(oe){return ae=oe,Q=I,ie=w,se=[],oe=(j=p)._versions,ne=j._dbSchema=Pm(0,j.idbdb,ie),(oe=oe.filter(function(he){return he._cfg.version>=ae})).length!==0?(oe.forEach(function(he){se.push(function(){var ge=ne,me=he._cfg.dbschema;Im(j,ge,ie),Im(j,me,ie),ne=j._dbSchema=me;var _e=QS(ge,me);_e.add.forEach(function(Qe){e0(ie,Qe[0],Qe[1].primKey,Qe[1].indexes)}),_e.change.forEach(function(Qe){if(Qe.recreate)throw new He.Upgrade("Not yet support for changing primary key");var qe=ie.objectStore(Qe.name);Qe.add.forEach(function(st){return Tm(qe,st)}),Qe.change.forEach(function(st){qe.deleteIndex(st.name),Tm(qe,st)}),Qe.del.forEach(function(st){return qe.deleteIndex(st)})});var Ge=he._cfg.contentUpgrade;if(Ge&&he._cfg.version>ae){xm(j,ie),Q._memoizedTables={};var Ze=k(me);_e.del.forEach(function(Qe){Ze[Qe]=ge[Qe]}),JS(j,[j.Transaction.prototype]),Fm(j,[j.Transaction.prototype],r(Ze),Ze),Q.schema=Ze;var $e,Ue=ue(Ge);return Ue&&au(),_e=Pe.follow(function(){var Qe;($e=Ge(Q))&&Ue&&(Qe=ha.bind(null,null),$e.then(Qe,Qe))}),$e&&typeof $e.then=="function"?Pe.resolve($e):_e.then(function(){return $e})}}),se.push(function(ge){var me,_e,Ge=he._cfg.dbschema;me=Ge,_e=ge,[].slice.call(_e.db.objectStoreNames).forEach(function(Ze){return me[Ze]==null&&_e.db.deleteObjectStore(Ze)}),JS(j,[j.Transaction.prototype]),Fm(j,[j.Transaction.prototype],j._storeNames,j._dbSchema),Q.schema=j._dbSchema}),se.push(function(ge){j.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(j.idbdb.version/10)===he._cfg.version?(j.idbdb.deleteObjectStore("$meta"),delete j._dbSchema.$meta,j._storeNames=j._storeNames.filter(function(me){return me!=="$meta"})):ge.objectStore("$meta").put(he._cfg.version,"version"))})}),function he(){return se.length?Pe.resolve(se.shift()(Q.idbtrans)).then(he):Pe.resolve()}().then(function(){aL(ne,ie)})):Pe.resolve();var j,ae,Q,ie,se,ne}).catch(L)):(r(T).forEach(function(oe){e0(w,oe,T[oe].primKey,T[oe].indexes)}),xm(p,w),void Pe.follow(function(){return p.on.populate.fire(I)}).catch(L));var J,ee})}function she(p,v){aL(p._dbSchema,v),v.db.version%10!=0||v.objectStoreNames.contains("$meta")||v.db.createObjectStore("$meta").add(Math.ceil(v.db.version/10-1),"version");var w=Pm(0,p.idbdb,v);Im(p,p._dbSchema,v);for(var _=0,T=QS(w,p._dbSchema).change;_<T.length;_++){var I=function(L){if(L.change.length||L.recreate)return console.warn("Unable to patch indexes of table ".concat(L.name," because it has changes on the type of index or primary key.")),{value:void 0};var W=v.objectStore(L.name);L.add.forEach(function(J){Ae&&console.debug("Dexie upgrade patch: Creating missing index ".concat(L.name,".").concat(J.src)),Tm(W,J)})}(T[_]);if(typeof I=="object")return I.value}}function QS(p,v){var w,_={del:[],add:[],change:[]};for(w in p)v[w]||_.del.push(w);for(w in v){var T=p[w],I=v[w];if(T){var L={name:w,def:I,recreate:!1,del:[],add:[],change:[]};if(""+(T.primKey.keyPath||"")!=""+(I.primKey.keyPath||"")||T.primKey.auto!==I.primKey.auto)L.recreate=!0,_.change.push(L);else{var W=T.idxByName,J=I.idxByName,ee=void 0;for(ee in W)J[ee]||L.del.push(ee);for(ee in J){var oe=W[ee],j=J[ee];oe?oe.src!==j.src&&L.change.push(j):L.add.push(j)}(0<L.del.length||0<L.add.length||0<L.change.length)&&_.change.push(L)}}else _.add.push([w,I])}return _}function e0(p,v,w,_){var T=p.db.createObjectStore(v,w.keyPath?{keyPath:w.keyPath,autoIncrement:w.auto}:{autoIncrement:w.auto});return _.forEach(function(I){return Tm(T,I)}),T}function aL(p,v){r(p).forEach(function(w){v.db.objectStoreNames.contains(w)||(Ae&&console.debug("Dexie: Creating missing table",w),e0(v,w,p[w].primKey,p[w].indexes))})}function Tm(p,v){p.createIndex(v.name,v.keyPath,{unique:v.unique,multiEntry:v.multi})}function Pm(p,v,w){var _={};return S(v.objectStoreNames,0).forEach(function(T){for(var I=w.objectStore(T),L=YS(sL(ee=I.keyPath),ee||"",!0,!1,!!I.autoIncrement,ee&&typeof ee!="string",!0),W=[],J=0;J<I.indexNames.length;++J){var oe=I.index(I.indexNames[J]),ee=oe.keyPath,oe=YS(oe.name,ee,!!oe.unique,!!oe.multiEntry,!1,ee&&typeof ee!="string",!1);W.push(oe)}_[T]=ZS(T,L,W)}),_}function Im(p,v,w){for(var _=w.db.objectStoreNames,T=0;T<_.length;++T){var I=_[T],L=w.objectStore(I);p._hasGetAll="getAll"in L;for(var W=0;W<L.indexNames.length;++W){var J=L.indexNames[W],ee=L.index(J).keyPath,oe=typeof ee=="string"?ee:"["+S(ee).join("+")+"]";!v[I]||(ee=v[I].idxByName[oe])&&(ee.name=J,delete v[I].idxByName[oe],v[I].idxByName[J]=ee)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(p._hasGetAll=!1)}function lL(p){return p.split(",").map(function(v,w){var _=(v=v.trim()).replace(/([&*]|\+\+)/g,""),T=/^\[/.test(_)?_.match(/^\[(.*)\]$/)[1].split("+"):_;return YS(_,T||null,/\&/.test(v),/\*/.test(v),/\+\+/.test(v),a(T),w===0)})}var rhe=(Am.prototype._parseStoresSpec=function(p,v){r(p).forEach(function(w){if(p[w]!==null){var _=lL(p[w]),T=_.shift();if(T.unique=!0,T.multi)throw new He.Schema("Primary key cannot be multi-valued");_.forEach(function(I){if(I.auto)throw new He.Schema("Only primary key can be marked as autoIncrement (++)");if(!I.keyPath)throw new He.Schema("Index must have a name and cannot be an empty string")}),v[w]=ZS(w,T,_)}})},Am.prototype.stores=function(w){var v=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,w):w;var w=v._versions,_={},T={};return w.forEach(function(I){l(_,I._cfg.storesSource),T=I._cfg.dbschema={},I._parseStoresSpec(_,T)}),v._dbSchema=T,JS(v,[v._allTables,v,v.Transaction.prototype]),Fm(v,[v._allTables,v,v.Transaction.prototype,this._cfg.tables],r(T),T),v._storeNames=r(T),this},Am.prototype.upgrade=function(p){return this._cfg.contentUpgrade=Ne(this._cfg.contentUpgrade||At,p),this},Am);function Am(){}function t0(p,v){var w=p._dbNamesDB;return w||(w=p._dbNamesDB=new Rr(Sm,{addons:[],indexedDB:p,IDBKeyRange:v})).version(1).stores({dbnames:"name"}),w.table("dbnames")}function n0(p){return p&&typeof p.databases=="function"}function i0(p){return da(function(){return Re.letThrough=!0,p()})}function o0(p){return!("from"in p)}var vi=function(p,v){if(!this){var w=new vi;return p&&"d"in p&&l(w,p),w}l(this,arguments.length?{d:1,from:p,to:1<arguments.length?v:p}:{d:0})};function Oh(p,v,w){var _=Ht(v,w);if(!isNaN(_)){if(0<_)throw RangeError();if(o0(p))return l(p,{from:v,to:w,d:1});var T=p.l,_=p.r;if(Ht(w,p.from)<0)return T?Oh(T,v,w):p.l={from:v,to:w,d:1,l:null,r:null},uL(p);if(0<Ht(v,p.to))return _?Oh(_,v,w):p.r={from:v,to:w,d:1,l:null,r:null},uL(p);Ht(v,p.from)<0&&(p.from=v,p.l=null,p.d=_?_.d+1:1),0<Ht(w,p.to)&&(p.to=w,p.r=null,p.d=p.l?p.l.d+1:1),w=!p.r,T&&!p.l&&Mh(p,T),_&&w&&Mh(p,_)}}function Mh(p,v){o0(v)||function w(_,J){var I=J.from,L=J.to,W=J.l,J=J.r;Oh(_,I,L),W&&w(_,W),J&&w(_,J)}(p,v)}function cL(p,v){var w=km(v),_=w.next();if(_.done)return!1;for(var T=_.value,I=km(p),L=I.next(T.from),W=L.value;!_.done&&!L.done;){if(Ht(W.from,T.to)<=0&&0<=Ht(W.to,T.from))return!0;Ht(T.from,W.from)<0?T=(_=w.next(W.from)).value:W=(L=I.next(T.from)).value}return!1}function km(p){var v=o0(p)?null:{s:0,n:p};return{next:function(w){for(var _=0<arguments.length;v;)switch(v.s){case 0:if(v.s=1,_)for(;v.n.l&&Ht(w,v.n.from)<0;)v={up:v,n:v.n.l,s:1};else for(;v.n.l;)v={up:v,n:v.n.l,s:1};case 1:if(v.s=2,!_||Ht(w,v.n.to)<=0)return{value:v.n,done:!1};case 2:if(v.n.r){v.s=3,v={up:v,n:v.n.r,s:0};continue}case 3:v=v.up}return{done:!0}}}}function uL(p){var v,w,_=(((v=p.r)===null||v===void 0?void 0:v.d)||0)-(((w=p.l)===null||w===void 0?void 0:w.d)||0),T=1<_?"r":_<-1?"l":"";T&&(v=T=="r"?"l":"r",w=i({},p),_=p[T],p.from=_.from,p.to=_.to,p[T]=_[T],w[T]=_[v],(p[v]=w).d=dL(w)),p.d=dL(p)}function dL(w){var v=w.r,w=w.l;return(v?w?Math.max(v.d,w.d):v.d:w?w.d:0)+1}function Om(p,v){return r(v).forEach(function(w){p[w]?Mh(p[w],v[w]):p[w]=function _(T){var I,L,W={};for(I in T)d(T,I)&&(L=T[I],W[I]=!L||typeof L!="object"||D.has(L.constructor)?L:_(L));return W}(v[w])}),p}function s0(p,v){return p.all||v.all||Object.keys(p).some(function(w){return v[w]&&cL(v[w],p[w])})}h(vi.prototype,((Io={add:function(p){return Mh(this,p),this},addKey:function(p){return Oh(this,p,p),this},addKeys:function(p){var v=this;return p.forEach(function(w){return Oh(v,w,w)}),this},hasKey:function(p){var v=km(this).next(p).value;return v&&Ht(v.from,p)<=0&&0<=Ht(v.to,p)}})[B]=function(){return km(this)},Io));var _l={},r0={},a0=!1;function Mm(p){Om(r0,p),a0||(a0=!0,setTimeout(function(){a0=!1,l0(r0,!(r0={}))},0))}function l0(p,v){v===void 0&&(v=!1);var w=new Set;if(p.all)for(var _=0,T=Object.values(_l);_<T.length;_++)hL(L=T[_],p,w,v);else for(var I in p){var L,W=/^idb\:\/\/(.*)\/(.*)\//.exec(I);W&&(I=W[1],W=W[2],(L=_l["idb://".concat(I,"/").concat(W)])&&hL(L,p,w,v))}w.forEach(function(J){return J()})}function hL(p,v,w,_){for(var T=[],I=0,L=Object.entries(p.queries.query);I<L.length;I++){for(var W=L[I],J=W[0],ee=[],oe=0,j=W[1];oe<j.length;oe++){var ae=j[oe];s0(v,ae.obsSet)?ae.subscribers.forEach(function(ne){return w.add(ne)}):_&&ee.push(ae)}_&&T.push([J,ee])}if(_)for(var Q=0,ie=T;Q<ie.length;Q++){var se=ie[Q],J=se[0],ee=se[1];p.queries.query[J]=ee}}function ahe(p){var v=p._state,w=p._deps.indexedDB;if(v.isBeingOpened||p.idbdb)return v.dbReadyPromise.then(function(){return v.dbOpenError?Ln(v.dbOpenError):p});v.isBeingOpened=!0,v.dbOpenError=null,v.openComplete=!1;var _=v.openCanceller,T=Math.round(10*p.verno),I=!1;function L(){if(v.openCanceller!==_)throw new He.DatabaseClosed("db.open() was cancelled")}function W(){return new Pe(function(ae,Q){if(L(),!w)throw new He.MissingAPI;var ie=p.name,se=v.autoSchema||!T?w.open(ie):w.open(ie,T);if(!se)throw new He.MissingAPI;se.onerror=Ns(Q),se.onblocked=wn(p._fireOnBlocked),se.onupgradeneeded=wn(function(ne){var he;oe=se.transaction,v.autoSchema&&!p._options.allowEmptyDB?(se.onerror=Ph,oe.abort(),se.result.close(),(he=w.deleteDatabase(ie)).onsuccess=he.onerror=wn(function(){Q(new He.NoSuchDatabase("Database ".concat(ie," doesnt exist")))})):(oe.onerror=Ns(Q),ne=ne.oldVersion>Math.pow(2,62)?0:ne.oldVersion,j=ne<1,p.idbdb=se.result,I&&she(p,oe),ohe(p,ne/10,oe,Q))},Q),se.onsuccess=wn(function(){oe=null;var ne,he,ge,me,_e,Ge=p.idbdb=se.result,Ze=S(Ge.objectStoreNames);if(0<Ze.length)try{var $e=Ge.transaction((me=Ze).length===1?me[0]:me,"readonly");if(v.autoSchema)he=Ge,ge=$e,(ne=p).verno=he.version/10,ge=ne._dbSchema=Pm(0,he,ge),ne._storeNames=S(he.objectStoreNames,0),Fm(ne,[ne._allTables],r(ge),ge);else if(Im(p,p._dbSchema,$e),((_e=QS(Pm(0,(_e=p).idbdb,$e),_e._dbSchema)).add.length||_e.change.some(function(Ue){return Ue.add.length||Ue.change.length}))&&!I)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),Ge.close(),T=Ge.version+1,I=!0,ae(W());xm(p,$e)}catch{}lu.push(p),Ge.onversionchange=wn(function(Ue){v.vcFired=!0,p.on("versionchange").fire(Ue)}),Ge.onclose=wn(function(Ue){p.on("close").fire(Ue)}),j&&(_e=p._deps,$e=ie,Ge=_e.indexedDB,_e=_e.IDBKeyRange,n0(Ge)||$e===Sm||t0(Ge,_e).put({name:$e}).catch(At)),ae()},Q)}).catch(function(ae){switch(ae==null?void 0:ae.name){case"UnknownError":if(0<v.PR1398_maxLoop)return v.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),W();break;case"VersionError":if(0<T)return T=0,W()}return Pe.reject(ae)})}var J,ee=v.dbReadyResolve,oe=null,j=!1;return Pe.race([_,(typeof navigator>"u"?Pe.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(ae){function Q(){return indexedDB.databases().finally(ae)}J=setInterval(Q,100),Q()}).finally(function(){return clearInterval(J)}):Promise.resolve()).then(W)]).then(function(){return L(),v.onReadyBeingFired=[],Pe.resolve(i0(function(){return p.on.ready.fire(p.vip)})).then(function ae(){if(0<v.onReadyBeingFired.length){var Q=v.onReadyBeingFired.reduce(Ne,At);return v.onReadyBeingFired=[],Pe.resolve(i0(function(){return Q(p.vip)})).then(ae)}})}).finally(function(){v.openCanceller===_&&(v.onReadyBeingFired=null,v.isBeingOpened=!1)}).catch(function(ae){v.dbOpenError=ae;try{oe&&oe.abort()}catch{}return _===v.openCanceller&&p._close(),Ln(ae)}).finally(function(){v.openComplete=!0,ee()}).then(function(){var ae;return j&&(ae={},p.tables.forEach(function(Q){Q.schema.indexes.forEach(function(ie){ie.name&&(ae["idb://".concat(p.name,"/").concat(Q.name,"/").concat(ie.name)]=new vi(-1/0,[[[]]]))}),ae["idb://".concat(p.name,"/").concat(Q.name,"/")]=ae["idb://".concat(p.name,"/").concat(Q.name,"/:dels")]=new vi(-1/0,[[[]]])}),ga(Ih).fire(ae),l0(ae,!0)),p})}function c0(p){function v(I){return p.next(I)}var w=T(v),_=T(function(I){return p.throw(I)});function T(I){return function(J){var W=I(J),J=W.value;return W.done?J:J&&typeof J.then=="function"?J.then(w,_):a(J)?Promise.all(J).then(w,_):w(J)}}return T(v)()}function Lm(p,v,w){for(var _=a(p)?p.slice():[p],T=0;T<w;++T)_.push(v);return _}var lhe={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(p){return i(i({},p),{table:function(v){var w=p.table(v),_=w.schema,T={},I=[];function L(j,ae,Q){var ie=kh(j),se=T[ie]=T[ie]||[],ne=j==null?0:typeof j=="string"?1:j.length,he=0<ae,he=i(i({},Q),{name:he?"".concat(ie,"(virtual-from:").concat(Q.name,")"):Q.name,lowLevelIndex:Q,isVirtual:he,keyTail:ae,keyLength:ne,extractKey:XS(j),unique:!he&&Q.unique});return se.push(he),he.isPrimaryKey||I.push(he),1<ne&&L(ne===2?j[0]:j.slice(0,ne-1),ae+1,Q),se.sort(function(ge,me){return ge.keyTail-me.keyTail}),he}v=L(_.primaryKey.keyPath,0,_.primaryKey),T[":id"]=[v];for(var W=0,J=_.indexes;W<J.length;W++){var ee=J[W];L(ee.keyPath,0,ee)}function oe(j){var ae,Q=j.query.index;return Q.isVirtual?i(i({},j),{query:{index:Q.lowLevelIndex,range:(ae=j.query.range,Q=Q.keyTail,{type:ae.type===1?2:ae.type,lower:Lm(ae.lower,ae.lowerOpen?p.MAX_KEY:p.MIN_KEY,Q),lowerOpen:!0,upper:Lm(ae.upper,ae.upperOpen?p.MIN_KEY:p.MAX_KEY,Q),upperOpen:!0})}}):j}return i(i({},w),{schema:i(i({},_),{primaryKey:v,indexes:I,getIndexByKeyPath:function(j){return(j=T[kh(j)])&&j[0]}}),count:function(j){return w.count(oe(j))},query:function(j){return w.query(oe(j))},openCursor:function(j){var ae=j.query.index,Q=ae.keyTail,ie=ae.isVirtual,se=ae.keyLength;return ie?w.openCursor(oe(j)).then(function(he){return he&&ne(he)}):w.openCursor(j);function ne(he){return Object.create(he,{continue:{value:function(ge){ge!=null?he.continue(Lm(ge,j.reverse?p.MAX_KEY:p.MIN_KEY,Q)):j.unique?he.continue(he.key.slice(0,se).concat(j.reverse?p.MIN_KEY:p.MAX_KEY,Q)):he.continue()}},continuePrimaryKey:{value:function(ge,me){he.continuePrimaryKey(Lm(ge,p.MAX_KEY,Q),me)}},primaryKey:{get:function(){return he.primaryKey}},key:{get:function(){var ge=he.key;return se===1?ge[0]:ge.slice(0,se)}},value:{get:function(){return he.value}}})}}})}})}};function u0(p,v,w,_){return w=w||{},_=_||"",r(p).forEach(function(T){var I,L,W;d(v,T)?(I=p[T],L=v[T],typeof I=="object"&&typeof L=="object"&&I&&L?(W=te(I))!==te(L)?w[_+T]=v[T]:W==="Object"?u0(I,L,w,_+T+"."):I!==L&&(w[_+T]=v[T]):I!==L&&(w[_+T]=v[T])):w[_+T]=void 0}),r(v).forEach(function(T){d(p,T)||(w[_+T]=v[T])}),w}function d0(p,v){return v.type==="delete"?v.keys:v.keys||v.values.map(p.extractKey)}var che={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(p){return i(i({},p),{table:function(v){var w=p.table(v),_=w.schema.primaryKey;return i(i({},w),{mutate:function(T){var I=Re.trans,L=I.table(v).hook,W=L.deleting,J=L.creating,ee=L.updating;switch(T.type){case"add":if(J.fire===At)break;return I._promise("readwrite",function(){return oe(T)},!0);case"put":if(J.fire===At&&ee.fire===At)break;return I._promise("readwrite",function(){return oe(T)},!0);case"delete":if(W.fire===At)break;return I._promise("readwrite",function(){return oe(T)},!0);case"deleteRange":if(W.fire===At)break;return I._promise("readwrite",function(){return function j(ae,Q,ie){return w.query({trans:ae,values:!1,query:{index:_,range:Q},limit:ie}).then(function(se){var ne=se.result;return oe({type:"delete",keys:ne,trans:ae}).then(function(he){return 0<he.numFailures?Promise.reject(he.failures[0]):ne.length<ie?{failures:[],numFailures:0,lastResult:void 0}:j(ae,i(i({},Q),{lower:ne[ne.length-1],lowerOpen:!0}),ie)})})}(T.trans,T.range,1e4)},!0)}return w.mutate(T);function oe(j){var ae,Q,ie,se=Re.trans,ne=j.keys||d0(_,j);if(!ne)throw new Error("Keys missing");return(j=j.type==="add"||j.type==="put"?i(i({},j),{keys:ne}):i({},j)).type!=="delete"&&(j.values=o([],j.values)),j.keys&&(j.keys=o([],j.keys)),ae=w,ie=ne,((Q=j).type==="add"?Promise.resolve([]):ae.getMany({trans:Q.trans,keys:ie,cache:"immutable"})).then(function(he){var ge=ne.map(function(me,_e){var Ge,Ze,$e,Ue=he[_e],Qe={onerror:null,onsuccess:null};return j.type==="delete"?W.fire.call(Qe,me,Ue,se):j.type==="add"||Ue===void 0?(Ge=J.fire.call(Qe,me,j.values[_e],se),me==null&&Ge!=null&&(j.keys[_e]=me=Ge,_.outbound||x(j.values[_e],_.keyPath,me))):(Ge=u0(Ue,j.values[_e]),(Ze=ee.fire.call(Qe,Ge,me,Ue,se))&&($e=j.values[_e],Object.keys(Ze).forEach(function(qe){d($e,qe)?$e[qe]=Ze[qe]:x($e,qe,Ze[qe])}))),Qe});return w.mutate(j).then(function(me){for(var _e=me.failures,Ge=me.results,Ze=me.numFailures,me=me.lastResult,$e=0;$e<ne.length;++$e){var Ue=(Ge||ne)[$e],Qe=ge[$e];Ue==null?Qe.onerror&&Qe.onerror(_e[$e]):Qe.onsuccess&&Qe.onsuccess(j.type==="put"&&he[$e]?j.values[$e]:Ue)}return{failures:_e,results:Ge,numFailures:Ze,lastResult:me}}).catch(function(me){return ge.forEach(function(_e){return _e.onerror&&_e.onerror(me)}),Promise.reject(me)})})}}})}})}};function fL(p,v,w){try{if(!v||v.keys.length<p.length)return null;for(var _=[],T=0,I=0;T<v.keys.length&&I<p.length;++T)Ht(v.keys[T],p[I])===0&&(_.push(w?V(v.values[T]):v.values[T]),++I);return _.length===p.length?_:null}catch{return null}}var uhe={stack:"dbcore",level:-1,create:function(p){return{table:function(v){var w=p.table(v);return i(i({},w),{getMany:function(_){if(!_.cache)return w.getMany(_);var T=fL(_.keys,_.trans._cache,_.cache==="clone");return T?Pe.resolve(T):w.getMany(_).then(function(I){return _.trans._cache={keys:_.keys,values:_.cache==="clone"?V(I):I},I})},mutate:function(_){return _.type!=="add"&&(_.trans._cache=null),w.mutate(_)}})}}}};function pL(p,v){return p.trans.mode==="readonly"&&!!p.subscr&&!p.trans.explicit&&p.trans.db._options.cache!=="disabled"&&!v.schema.primaryKey.outbound}function gL(p,v){switch(p){case"query":return v.values&&!v.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var dhe={stack:"dbcore",level:0,name:"Observability",create:function(p){var v=p.schema.name,w=new vi(p.MIN_KEY,p.MAX_KEY);return i(i({},p),{transaction:function(_,T,I){if(Re.subscr&&T!=="readonly")throw new He.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(Re.querier));return p.transaction(_,T,I)},table:function(_){var T=p.table(_),I=T.schema,L=I.primaryKey,j=I.indexes,W=L.extractKey,J=L.outbound,ee=L.autoIncrement&&j.filter(function(Q){return Q.compound&&Q.keyPath.includes(L.keyPath)}),oe=i(i({},T),{mutate:function(Q){function ie(qe){return qe="idb://".concat(v,"/").concat(_,"/").concat(qe),me[qe]||(me[qe]=new vi)}var se,ne,he,ge=Q.trans,me=Q.mutatedParts||(Q.mutatedParts={}),_e=ie(""),Ge=ie(":dels"),Ze=Q.type,Qe=Q.type==="deleteRange"?[Q.range]:Q.type==="delete"?[Q.keys]:Q.values.length<50?[d0(L,Q).filter(function(qe){return qe}),Q.values]:[],$e=Qe[0],Ue=Qe[1],Qe=Q.trans._cache;return a($e)?(_e.addKeys($e),(Qe=Ze==="delete"||$e.length===Ue.length?fL($e,Qe):null)||Ge.addKeys($e),(Qe||Ue)&&(se=ie,ne=Qe,he=Ue,I.indexes.forEach(function(qe){var st=se(qe.name||"");function kt(Vt){return Vt!=null?qe.extractKey(Vt):null}function Nt(Vt){return qe.multiEntry&&a(Vt)?Vt.forEach(function(so){return st.addKey(so)}):st.addKey(Vt)}(ne||he).forEach(function(Vt,yi){var Tt=ne&&kt(ne[yi]),yi=he&&kt(he[yi]);Ht(Tt,yi)!==0&&(Tt!=null&&Nt(Tt),yi!=null&&Nt(yi))})}))):$e?(Ue={from:(Ue=$e.lower)!==null&&Ue!==void 0?Ue:p.MIN_KEY,to:(Ue=$e.upper)!==null&&Ue!==void 0?Ue:p.MAX_KEY},Ge.add(Ue),_e.add(Ue)):(_e.add(w),Ge.add(w),I.indexes.forEach(function(qe){return ie(qe.name).add(w)})),T.mutate(Q).then(function(qe){return!$e||Q.type!=="add"&&Q.type!=="put"||(_e.addKeys(qe.results),ee&&ee.forEach(function(st){for(var kt=Q.values.map(function(Tt){return st.extractKey(Tt)}),Nt=st.keyPath.findIndex(function(Tt){return Tt===L.keyPath}),Vt=0,so=qe.results.length;Vt<so;++Vt)kt[Vt][Nt]=qe.results[Vt];ie(st.name).addKeys(kt)})),ge.mutatedParts=Om(ge.mutatedParts||{},me),qe})}}),j=function(ie){var se=ie.query,ie=se.index,se=se.range;return[ie,new vi((ie=se.lower)!==null&&ie!==void 0?ie:p.MIN_KEY,(se=se.upper)!==null&&se!==void 0?se:p.MAX_KEY)]},ae={get:function(Q){return[L,new vi(Q.key)]},getMany:function(Q){return[L,new vi().addKeys(Q.keys)]},count:j,query:j,openCursor:j};return r(ae).forEach(function(Q){oe[Q]=function(ie){var se=Re.subscr,ne=!!se,he=pL(Re,T)&&gL(Q,ie)?ie.obsSet={}:se;if(ne){var ge=function(Ue){return Ue="idb://".concat(v,"/").concat(_,"/").concat(Ue),he[Ue]||(he[Ue]=new vi)},me=ge(""),_e=ge(":dels"),se=ae[Q](ie),ne=se[0],se=se[1];if((Q==="query"&&ne.isPrimaryKey&&!ie.values?_e:ge(ne.name||"")).add(se),!ne.isPrimaryKey){if(Q!=="count"){var Ge=Q==="query"&&J&&ie.values&&T.query(i(i({},ie),{values:!1}));return T[Q].apply(this,arguments).then(function(Ue){if(Q==="query"){if(J&&ie.values)return Ge.then(function(kt){return kt=kt.result,me.addKeys(kt),Ue});var Qe=ie.values?Ue.result.map(W):Ue.result;(ie.values?me:_e).addKeys(Qe)}else if(Q==="openCursor"){var qe=Ue,st=ie.values;return qe&&Object.create(qe,{key:{get:function(){return _e.addKey(qe.primaryKey),qe.key}},primaryKey:{get:function(){var kt=qe.primaryKey;return _e.addKey(kt),kt}},value:{get:function(){return st&&me.addKey(qe.primaryKey),qe.value}}})}return Ue})}_e.add(w)}}return T[Q].apply(this,arguments)}}),oe}})}};function mL(p,v,w){if(w.numFailures===0)return v;if(v.type==="deleteRange")return null;var _=v.keys?v.keys.length:"values"in v&&v.values?v.values.length:1;return w.numFailures===_?null:(v=i({},v),a(v.keys)&&(v.keys=v.keys.filter(function(T,I){return!(I in w.failures)})),"values"in v&&a(v.values)&&(v.values=v.values.filter(function(T,I){return!(I in w.failures)})),v)}function h0(p,v){return w=p,((_=v).lower===void 0||(_.lowerOpen?0<Ht(w,_.lower):0<=Ht(w,_.lower)))&&(p=p,(v=v).upper===void 0||(v.upperOpen?Ht(p,v.upper)<0:Ht(p,v.upper)<=0));var w,_}function vL(p,v,ae,_,T,I){if(!ae||ae.length===0)return p;var L=v.query.index,W=L.multiEntry,J=v.query.range,ee=_.schema.primaryKey.extractKey,oe=L.extractKey,j=(L.lowLevelIndex||L).extractKey,ae=ae.reduce(function(Q,ie){var se=Q,ne=[];if(ie.type==="add"||ie.type==="put")for(var he=new vi,ge=ie.values.length-1;0<=ge;--ge){var me,_e=ie.values[ge],Ge=ee(_e);he.hasKey(Ge)||(me=oe(_e),(W&&a(me)?me.some(function(qe){return h0(qe,J)}):h0(me,J))&&(he.addKey(Ge),ne.push(_e)))}switch(ie.type){case"add":var Ze=new vi().addKeys(v.values?Q.map(function(st){return ee(st)}):Q),se=Q.concat(v.values?ne.filter(function(st){return st=ee(st),!Ze.hasKey(st)&&(Ze.addKey(st),!0)}):ne.map(function(st){return ee(st)}).filter(function(st){return!Ze.hasKey(st)&&(Ze.addKey(st),!0)}));break;case"put":var $e=new vi().addKeys(ie.values.map(function(st){return ee(st)}));se=Q.filter(function(st){return!$e.hasKey(v.values?ee(st):st)}).concat(v.values?ne:ne.map(function(st){return ee(st)}));break;case"delete":var Ue=new vi().addKeys(ie.keys);se=Q.filter(function(st){return!Ue.hasKey(v.values?ee(st):st)});break;case"deleteRange":var Qe=ie.range;se=Q.filter(function(st){return!h0(ee(st),Qe)})}return se},p);return ae===p?p:(ae.sort(function(Q,ie){return Ht(j(Q),j(ie))||Ht(ee(Q),ee(ie))}),v.limit&&v.limit<1/0&&(ae.length>v.limit?ae.length=v.limit:p.length===v.limit&&ae.length<v.limit&&(T.dirty=!0)),I?Object.freeze(ae):ae)}function yL(p,v){return Ht(p.lower,v.lower)===0&&Ht(p.upper,v.upper)===0&&!!p.lowerOpen==!!v.lowerOpen&&!!p.upperOpen==!!v.upperOpen}function hhe(p,v){return function(w,_,T,I){if(w===void 0)return _!==void 0?-1:0;if(_===void 0)return 1;if((_=Ht(w,_))===0){if(T&&I)return 0;if(T)return 1;if(I)return-1}return _}(p.lower,v.lower,p.lowerOpen,v.lowerOpen)<=0&&0<=function(w,_,T,I){if(w===void 0)return _!==void 0?1:0;if(_===void 0)return-1;if((_=Ht(w,_))===0){if(T&&I)return 0;if(T)return-1;if(I)return 1}return _}(p.upper,v.upper,p.upperOpen,v.upperOpen)}function fhe(p,v,w,_){p.subscribers.add(w),_.addEventListener("abort",function(){var T,I;p.subscribers.delete(w),p.subscribers.size===0&&(T=p,I=v,setTimeout(function(){T.subscribers.size===0&&Z(I,T)},3e3))})}var phe={stack:"dbcore",level:0,name:"Cache",create:function(p){var v=p.schema.name;return i(i({},p),{transaction:function(w,_,T){var I,L,W=p.transaction(w,_,T);return _==="readwrite"&&(L=(I=new AbortController).signal,T=function(J){return function(){if(I.abort(),_==="readwrite"){for(var ee=new Set,oe=0,j=w;oe<j.length;oe++){var ae=j[oe],Q=_l["idb://".concat(v,"/").concat(ae)];if(Q){var ie=p.table(ae),se=Q.optimisticOps.filter(function(st){return st.trans===W});if(W._explicit&&J&&W.mutatedParts)for(var ne=0,he=Object.values(Q.queries.query);ne<he.length;ne++)for(var ge=0,me=(Ze=he[ne]).slice();ge<me.length;ge++)s0(($e=me[ge]).obsSet,W.mutatedParts)&&(Z(Ze,$e),$e.subscribers.forEach(function(st){return ee.add(st)}));else if(0<se.length){Q.optimisticOps=Q.optimisticOps.filter(function(st){return st.trans!==W});for(var _e=0,Ge=Object.values(Q.queries.query);_e<Ge.length;_e++)for(var Ze,$e,Ue,Qe=0,qe=(Ze=Ge[_e]).slice();Qe<qe.length;Qe++)($e=qe[Qe]).res!=null&&W.mutatedParts&&(J&&!$e.dirty?(Ue=Object.isFrozen($e.res),Ue=vL($e.res,$e.req,se,ie,$e,Ue),$e.dirty?(Z(Ze,$e),$e.subscribers.forEach(function(st){return ee.add(st)})):Ue!==$e.res&&($e.res=Ue,$e.promise=Pe.resolve({result:Ue}))):($e.dirty&&Z(Ze,$e),$e.subscribers.forEach(function(st){return ee.add(st)})))}}}ee.forEach(function(st){return st()})}}},W.addEventListener("abort",T(!1),{signal:L}),W.addEventListener("error",T(!1),{signal:L}),W.addEventListener("complete",T(!0),{signal:L})),W},table:function(w){var _=p.table(w),T=_.schema.primaryKey;return i(i({},_),{mutate:function(I){var L=Re.trans;if(T.outbound||L.db._options.cache==="disabled"||L.explicit||L.idbtrans.mode!=="readwrite")return _.mutate(I);var W=_l["idb://".concat(v,"/").concat(w)];return W?(L=_.mutate(I),I.type!=="add"&&I.type!=="put"||!(50<=I.values.length||d0(T,I).some(function(J){return J==null}))?(W.optimisticOps.push(I),I.mutatedParts&&Mm(I.mutatedParts),L.then(function(J){0<J.numFailures&&(Z(W.optimisticOps,I),(J=mL(0,I,J))&&W.optimisticOps.push(J),I.mutatedParts&&Mm(I.mutatedParts))}),L.catch(function(){Z(W.optimisticOps,I),I.mutatedParts&&Mm(I.mutatedParts)})):L.then(function(J){var ee=mL(0,i(i({},I),{values:I.values.map(function(oe,j){var ae;return J.failures[j]?oe:(oe=(ae=T.keyPath)!==null&&ae!==void 0&&ae.includes(".")?V(oe):i({},oe),x(oe,T.keyPath,J.results[j]),oe)})}),J);W.optimisticOps.push(ee),queueMicrotask(function(){return I.mutatedParts&&Mm(I.mutatedParts)})}),L):_.mutate(I)},query:function(I){if(!pL(Re,_)||!gL("query",I))return _.query(I);var L=((ee=Re.trans)===null||ee===void 0?void 0:ee.db._options.cache)==="immutable",j=Re,W=j.requery,J=j.signal,ee=function(ie,se,ne,he){var ge=_l["idb://".concat(ie,"/").concat(se)];if(!ge)return[];if(!(se=ge.queries[ne]))return[null,!1,ge,null];var me=se[(he.query?he.query.index.name:null)||""];if(!me)return[null,!1,ge,null];switch(ne){case"query":var _e=me.find(function(Ge){return Ge.req.limit===he.limit&&Ge.req.values===he.values&&yL(Ge.req.query.range,he.query.range)});return _e?[_e,!0,ge,me]:[me.find(function(Ge){return("limit"in Ge.req?Ge.req.limit:1/0)>=he.limit&&(!he.values||Ge.req.values)&&hhe(Ge.req.query.range,he.query.range)}),!1,ge,me];case"count":return _e=me.find(function(Ge){return yL(Ge.req.query.range,he.query.range)}),[_e,!!_e,ge,me]}}(v,w,"query",I),oe=ee[0],j=ee[1],ae=ee[2],Q=ee[3];return oe&&j?oe.obsSet=I.obsSet:(j=_.query(I).then(function(ie){var se=ie.result;if(oe&&(oe.res=se),L){for(var ne=0,he=se.length;ne<he;++ne)Object.freeze(se[ne]);Object.freeze(se)}else ie.result=V(se);return ie}).catch(function(ie){return Q&&oe&&Z(Q,oe),Promise.reject(ie)}),oe={obsSet:I.obsSet,promise:j,subscribers:new Set,type:"query",req:I,dirty:!1},Q?Q.push(oe):(Q=[oe],(ae=ae||(_l["idb://".concat(v,"/").concat(w)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[I.query.index.name||""]=Q)),fhe(oe,Q,W,J),oe.promise.then(function(ie){return{result:vL(ie.result,I,ae==null?void 0:ae.optimisticOps,_,oe,L)}})}})}})}};function Nm(p,v){return new Proxy(p,{get:function(w,_,T){return _==="db"?v:Reflect.get(w,_,T)}})}var Rr=(Nn.prototype.version=function(p){if(isNaN(p)||p<.1)throw new He.Type("Given version is not a positive number");if(p=Math.round(10*p)/10,this.idbdb||this._state.isBeingOpened)throw new He.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,p);var v=this._versions,w=v.filter(function(_){return _._cfg.version===p})[0];return w||(w=new this.Version(p),v.push(w),v.sort(ihe),w.stores({}),this._state.autoSchema=!1,w)},Nn.prototype._whenReady=function(p){var v=this;return this.idbdb&&(this._state.openComplete||Re.letThrough||this._vip)?p():new Pe(function(w,_){if(v._state.openComplete)return _(new He.DatabaseClosed(v._state.dbOpenError));if(!v._state.isBeingOpened){if(!v._state.autoOpen)return void _(new He.DatabaseClosed);v.open().catch(At)}v._state.dbReadyPromise.then(w,_)}).then(p)},Nn.prototype.use=function(p){var v=p.stack,w=p.create,_=p.level,T=p.name;return T&&this.unuse({stack:v,name:T}),p=this._middlewares[v]||(this._middlewares[v]=[]),p.push({stack:v,create:w,level:_??10,name:T}),p.sort(function(I,L){return I.level-L.level}),this},Nn.prototype.unuse=function(p){var v=p.stack,w=p.name,_=p.create;return v&&this._middlewares[v]&&(this._middlewares[v]=this._middlewares[v].filter(function(T){return _?T.create!==_:!!w&&T.name!==w})),this},Nn.prototype.open=function(){var p=this;return El(ye,function(){return ahe(p)})},Nn.prototype._close=function(){var p=this._state,v=lu.indexOf(this);if(0<=v&&lu.splice(v,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}p.isBeingOpened||(p.dbReadyPromise=new Pe(function(w){p.dbReadyResolve=w}),p.openCanceller=new Pe(function(w,_){p.cancelOpen=_}))},Nn.prototype.close=function(w){var v=(w===void 0?{disableAutoOpen:!0}:w).disableAutoOpen,w=this._state;v?(w.isBeingOpened&&w.cancelOpen(new He.DatabaseClosed),this._close(),w.autoOpen=!1,w.dbOpenError=new He.DatabaseClosed):(this._close(),w.autoOpen=this._options.autoOpen||w.isBeingOpened,w.openComplete=!1,w.dbOpenError=null)},Nn.prototype.delete=function(p){var v=this;p===void 0&&(p={disableAutoOpen:!0});var w=0<arguments.length&&typeof arguments[0]!="object",_=this._state;return new Pe(function(T,I){function L(){v.close(p);var W=v._deps.indexedDB.deleteDatabase(v.name);W.onsuccess=wn(function(){var J,ee,oe;J=v._deps,ee=v.name,oe=J.indexedDB,J=J.IDBKeyRange,n0(oe)||ee===Sm||t0(oe,J).delete(ee).catch(At),T()}),W.onerror=Ns(I),W.onblocked=v._fireOnBlocked}if(w)throw new He.InvalidArgument("Invalid closeOptions argument to db.delete()");_.isBeingOpened?_.dbReadyPromise.then(L):L()})},Nn.prototype.backendDB=function(){return this.idbdb},Nn.prototype.isOpen=function(){return this.idbdb!==null},Nn.prototype.hasBeenClosed=function(){var p=this._state.dbOpenError;return p&&p.name==="DatabaseClosed"},Nn.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Nn.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Nn.prototype,"tables",{get:function(){var p=this;return r(this._allTables).map(function(v){return p._allTables[v]})},enumerable:!1,configurable:!0}),Nn.prototype.transaction=function(){var p=(function(v,w,_){var T=arguments.length;if(T<2)throw new He.InvalidArgument("Too few arguments");for(var I=new Array(T-1);--T;)I[T-1]=arguments[T];return _=I.pop(),[v,A(I),_]}).apply(this,arguments);return this._transaction.apply(this,p)},Nn.prototype._transaction=function(p,v,w){var _=this,T=Re.trans;T&&T.db===this&&p.indexOf("!")===-1||(T=null);var I,L,W=p.indexOf("?")!==-1;p=p.replace("!","").replace("?","");try{if(L=v.map(function(ee){if(ee=ee instanceof _.Table?ee.name:ee,typeof ee!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return ee}),p=="r"||p===WS)I=WS;else{if(p!="rw"&&p!=US)throw new He.InvalidArgument("Invalid transaction mode: "+p);I=US}if(T){if(T.mode===WS&&I===US){if(!W)throw new He.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");T=null}T&&L.forEach(function(ee){if(T&&T.storeNames.indexOf(ee)===-1){if(!W)throw new He.SubTransaction("Table "+ee+" not included in parent transaction.");T=null}}),W&&T&&!T.active&&(T=null)}}catch(ee){return T?T._promise(null,function(oe,j){j(ee)}):Ln(ee)}var J=(function ee(oe,j,ae,Q,ie){return Pe.resolve().then(function(){var se=Re.transless||Re,ne=oe._createTransaction(j,ae,oe._dbSchema,Q);if(ne.explicit=!0,se={trans:ne,transless:se},Q)ne.idbtrans=Q.idbtrans;else try{ne.create(),ne.idbtrans._explicit=!0,oe._state.PR1398_maxLoop=3}catch(me){return me.name===gt.InvalidState&&oe.isOpen()&&0<--oe._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),oe.close({disableAutoOpen:!1}),oe.open().then(function(){return ee(oe,j,ae,null,ie)})):Ln(me)}var he,ge=ue(ie);return ge&&au(),se=Pe.follow(function(){var me;(he=ie.call(ne,ne))&&(ge?(me=ha.bind(null,null),he.then(me,me)):typeof he.next=="function"&&typeof he.throw=="function"&&(he=c0(he)))},se),(he&&typeof he.then=="function"?Pe.resolve(he).then(function(me){return ne.active?me:Ln(new He.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):se.then(function(){return he})).then(function(me){return Q&&ne._resolve(),ne._completion.then(function(){return me})}).catch(function(me){return ne._reject(me),Ln(me)})})}).bind(null,this,I,L,T,w);return T?T._promise(I,J,"lock"):Re.trans?El(Re.transless,function(){return _._whenReady(J)}):this._whenReady(J)},Nn.prototype.table=function(p){if(!d(this._allTables,p))throw new He.InvalidTable("Table ".concat(p," does not exist"));return this._allTables[p]},Nn);function Nn(p,v){var w=this;this._middlewares={},this.verno=0;var _=Nn.dependencies;this._options=v=i({addons:Nn.addons,autoOpen:!0,indexedDB:_.indexedDB,IDBKeyRange:_.IDBKeyRange,cache:"cloned"},v),this._deps={indexedDB:v.indexedDB,IDBKeyRange:v.IDBKeyRange},_=v.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var T,I,L,W,J,ee={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:At,dbReadyPromise:null,cancelOpen:At,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:v.autoOpen};ee.dbReadyPromise=new Pe(function(j){ee.dbReadyResolve=j}),ee.openCanceller=new Pe(function(j,ae){ee.cancelOpen=ae}),this._state=ee,this.name=p,this.on=xh(this,"populate","blocked","versionchange","close",{ready:[Ne,At]}),this.on.ready.subscribe=F(this.on.ready.subscribe,function(j){return function(ae,Q){Nn.vip(function(){var ie,se=w._state;se.openComplete?(se.dbOpenError||Pe.resolve().then(ae),Q&&j(ae)):se.onReadyBeingFired?(se.onReadyBeingFired.push(ae),Q&&j(ae)):(j(ae),ie=w,Q||j(function ne(){ie.on.ready.unsubscribe(ae),ie.on.ready.unsubscribe(ne)}))})}}),this.Collection=(T=this,Fh(Zde.prototype,function(he,ne){this.db=T;var Q=YM,ie=null;if(ne)try{Q=ne()}catch(ge){ie=ge}var se=he._ctx,ne=se.table,he=ne.hook.reading.fire;this._ctx={table:ne,index:se.index,isPrimKey:!se.index||ne.schema.primKey.keyPath&&se.index===ne.schema.primKey.name,range:Q,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:ie,or:se.or,valueMapper:he!==N?he:null}})),this.Table=(I=this,Fh(QM.prototype,function(j,ae,Q){this.db=I,this._tx=Q,this.name=j,this.schema=ae,this.hook=I._allTables[j]?I._allTables[j].hook:xh(null,{creating:[ke,At],reading:[X,N],updating:[Fe,At],deleting:[De,At]})})),this.Transaction=(L=this,Fh(Qde.prototype,function(j,ae,Q,ie,se){var ne=this;this.db=L,this.mode=j,this.storeNames=ae,this.schema=Q,this.chromeTransactionDurability=ie,this.idbtrans=null,this.on=xh(this,"complete","error","abort"),this.parent=se||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Pe(function(he,ge){ne._resolve=he,ne._reject=ge}),this._completion.then(function(){ne.active=!1,ne.on.complete.fire()},function(he){var ge=ne.active;return ne.active=!1,ne.on.error.fire(he),ne.parent?ne.parent._reject(he):ge&&ne.idbtrans&&ne.idbtrans.abort(),Ln(he)})})),this.Version=(W=this,Fh(rhe.prototype,function(j){this.db=W,this._cfg={version:j,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(J=this,Fh(oL.prototype,function(j,ae,Q){if(this.db=J,this._ctx={table:j,index:ae===":id"?null:ae,or:Q},this._cmp=this._ascending=Ht,this._descending=function(ie,se){return Ht(se,ie)},this._max=function(ie,se){return 0<Ht(ie,se)?ie:se},this._min=function(ie,se){return Ht(ie,se)<0?ie:se},this._IDBKeyRange=J._deps.IDBKeyRange,!this._IDBKeyRange)throw new He.MissingAPI})),this.on("versionchange",function(j){0<j.newVersion?console.warn("Another connection wants to upgrade database '".concat(w.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(w.name,"'. Closing db now to resume the delete request.")),w.close({disableAutoOpen:!1})}),this.on("blocked",function(j){!j.newVersion||j.newVersion<j.oldVersion?console.warn("Dexie.delete('".concat(w.name,"') was blocked")):console.warn("Upgrade '".concat(w.name,"' blocked by other connection holding version ").concat(j.oldVersion/10))}),this._maxKey=Ah(v.IDBKeyRange),this._createTransaction=function(j,ae,Q,ie){return new w.Transaction(j,ae,Q,w._options.chromeTransactionDurability,ie)},this._fireOnBlocked=function(j){w.on("blocked").fire(j),lu.filter(function(ae){return ae.name===w.name&&ae!==w&&!ae._state.vcFired}).map(function(ae){return ae.on("versionchange").fire(j)})},this.use(uhe),this.use(phe),this.use(dhe),this.use(lhe),this.use(che);var oe=new Proxy(this,{get:function(j,ae,Q){if(ae==="_vip")return!0;if(ae==="table")return function(se){return Nm(w.table(se),oe)};var ie=Reflect.get(j,ae,Q);return ie instanceof QM?Nm(ie,oe):ae==="tables"?ie.map(function(se){return Nm(se,oe)}):ae==="_createTransaction"?function(){return Nm(ie.apply(this,arguments),oe)}:ie}});this.vip=oe,_.forEach(function(j){return j(w)})}var Vm,Io=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",ghe=(f0.prototype.subscribe=function(p,v,w){return this._subscribe(p&&typeof p!="function"?p:{next:p,error:v,complete:w})},f0.prototype[Io]=function(){return this},f0);function f0(p){this._subscribe=p}try{Vm={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch{Vm={indexedDB:null,IDBKeyRange:null}}function CL(p){var v,w=!1,_=new ghe(function(T){var I=ue(p),L,W=!1,J={},ee={},oe={get closed(){return W},unsubscribe:function(){W||(W=!0,L&&L.abort(),j&&ga.storagemutated.unsubscribe(Q))}};T.start&&T.start(oe);var j=!1,ae=function(){return $S(ie)},Q=function(se){Om(J,se),s0(ee,J)&&ae()},ie=function(){var se,ne,he;!W&&Vm.indexedDB&&(J={},se={},L&&L.abort(),L=new AbortController,he=function(ge){var me=ns();try{I&&au();var _e=da(p,ge);return _e=I?_e.finally(ha):_e}finally{me&&Pi()}}(ne={subscr:se,signal:L.signal,requery:ae,querier:p,trans:null}),Promise.resolve(he).then(function(ge){w=!0,v=ge,W||ne.signal.aborted||(J={},function(me){for(var _e in me)if(d(me,_e))return;return 1}(ee=se)||j||(ga(Ih,Q),j=!0),$S(function(){return!W&&T.next&&T.next(ge)}))},function(ge){w=!1,["DatabaseClosedError","AbortError"].includes(ge==null?void 0:ge.name)||W||$S(function(){W||T.error&&T.error(ge)})}))};return setTimeout(ae,0),oe});return _.hasValue=function(){return w},_.getValue=function(){return v},_}var xl=Rr;function p0(p){var v=ma;try{ma=!0,ga.storagemutated.fire(p),l0(p,!0)}finally{ma=v}}h(xl,i(i({},tn),{delete:function(p){return new xl(p,{addons:[]}).delete()},exists:function(p){return new xl(p,{addons:[]}).open().then(function(v){return v.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(p){try{return v=xl.dependencies,w=v.indexedDB,v=v.IDBKeyRange,(n0(w)?Promise.resolve(w.databases()).then(function(_){return _.map(function(T){return T.name}).filter(function(T){return T!==Sm})}):t0(w,v).toCollection().primaryKeys()).then(p)}catch{return Ln(new He.MissingAPI)}var v,w},defineClass:function(){return function(p){l(this,p)}},ignoreTransaction:function(p){return Re.trans?El(Re.transless,p):p()},vip:i0,async:function(p){return function(){try{var v=c0(p.apply(this,arguments));return v&&typeof v.then=="function"?v:Pe.resolve(v)}catch(w){return Ln(w)}}},spawn:function(p,v,w){try{var _=c0(p.apply(w,v||[]));return _&&typeof _.then=="function"?_:Pe.resolve(_)}catch(T){return Ln(T)}},currentTransaction:{get:function(){return Re.trans||null}},waitFor:function(p,v){return v=Pe.resolve(typeof p=="function"?xl.ignoreTransaction(p):p).timeout(v||6e4),Re.trans?Re.trans.waitFor(v):v},Promise:Pe,debug:{get:function(){return Ae},set:function(p){Te(p)}},derive:m,extend:l,props:h,override:F,Events:xh,on:ga,liveQuery:CL,extendObservabilitySet:Om,getByKeyPath:E,setByKeyPath:x,delByKeyPath:function(p,v){typeof v=="string"?x(p,v,void 0):"length"in v&&[].map.call(v,function(w){x(p,w,void 0)})},shallowClone:k,deepClone:V,getObjectDiff:u0,cmp:Ht,asap:R,minKey:-1/0,addons:[],connections:lu,errnames:gt,dependencies:Vm,cache:_l,semVer:"4.0.10",version:"4.0.10".split(".").map(function(p){return parseInt(p)}).reduce(function(p,v,w){return p+v/Math.pow(10,2*w)})})),xl.maxKey=Ah(xl.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(ga(Ih,function(p){ma||(p=new CustomEvent(qS,{detail:p}),ma=!0,dispatchEvent(p),ma=!1)}),addEventListener(qS,function(p){p=p.detail,ma||p0(p)}));var du,ma=!1,wL=function(){};return typeof BroadcastChannel<"u"&&((wL=function(){(du=new BroadcastChannel(qS)).onmessage=function(p){return p.data&&p0(p.data)}})(),typeof du.unref=="function"&&du.unref(),ga(Ih,function(p){ma||du.postMessage(p)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(p){if(!Rr.disableBfCache&&p.persisted){Ae&&console.debug("Dexie: handling persisted pagehide"),du!=null&&du.close();for(var v=0,w=lu;v<w.length;v++)w[v].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(p){!Rr.disableBfCache&&p.persisted&&(Ae&&console.debug("Dexie: handling persisted pageshow"),wL(),p0({all:new vi(-1/0,[[]])}))})),Pe.rejectionMapper=function(p,v){return!p||p instanceof re||p instanceof TypeError||p instanceof SyntaxError||!p.name||!en[p.name]?p:(v=new en[p.name](v||p.message,p),"stack"in p&&g(v,"stack",{get:function(){return this.inner.stack}}),v)},Te(Ae),i(Rr,Object.freeze({__proto__:null,Dexie:Rr,liveQuery:CL,Entity:ZM,cmp:Ht,PropModSymbol:Er,PropModification:Th,replacePrefix:function(p,v){return new Th({replacePrefix:[p,v]})},add:function(p){return new Th({add:p})},remove:function(p){return new Th({remove:p})},default:Rr,RangeSet:vi,mergeRanges:Mh,rangesOverlap:cL}),{default:Rr}),Rr})})(zD);var ZH=zD.exports;const dy=YH(ZH),jD=Symbol.for("Dexie"),Ku=globalThis[jD]||(globalThis[jD]=dy);if(dy.semVer!==Ku.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${dy.semVer} and ${Ku.semVer}`);const{liveQuery:Rhe,mergeRanges:Dhe,rangesOverlap:_he,RangeSet:xhe,cmp:Fhe,Entity:The,PropModSymbol:Phe,PropModification:Ihe,replacePrefix:Ahe,add:khe,remove:Ohe}=Ku;class KD extends Ku{constructor(n){super(n);bn(this,"icons");bn(this,"visuals");bn(this,"users");bn(this,"columns");bn(this,"general");this.version(1).stores({icons:"key",visuals:"key",users:"key",columns:"key",general:"key"})}getTable(n){return this[n]?this[n]:this.general}}const Hf=new Map,XH=async e=>{if(!Hf.has(e)){const t=new KD(e);try{await t.open(),Hf.set(e,t)}catch(n){console.error("Failed to open database, attempting to delete and recreate:",n);try{await Ku.delete(e);const i=new KD(e);await i.open(),Hf.set(e,i)}catch(i){throw console.error("Failed to delete and recreate database:",i),i}}}return Hf.get(e)},qu=({dbName:e,storeName:t})=>{const n=async()=>(await XH(e)).getTable(t);return{getCachedValue:async c=>{try{const u=await n();if(!u){console.error(`Store is undefined for key: ${c}`);return}const d=await u.get(c);return d==null?void 0:d.value}catch(u){console.error("Failed to get cached value:",u);return}},setCachedValue:async(c,u)=>{try{const d=await n();if(!d){console.error(`Store is undefined, cannot cache key: ${c}`);return}await d.put({key:c,value:u,timestamp:Date.now()})}catch(d){console.error("Failed to cache value:",d)}},deleteCachedValue:async c=>{try{const u=await n();if(!u){console.error(`Store is undefined, cannot delete key: ${c}`);return}await u.delete(c)}catch(u){console.error("Failed to delete cached value:",u)}},clearCache:async()=>{try{const c=await n();if(!c){console.error("Store is undefined, cannot clear cache");return}await c.clear()}catch(c){console.error("Failed to clear cache:",c)}},getAllKeys:async()=>{try{const c=await n();return c?(await c.toArray()).map(d=>d.key):(console.error("Store is undefined, cannot get all keys"),[])}catch(c){return console.error("Failed to get all keys:",c),[]}},getCachedValueWithTimestamp:async c=>{try{const u=await n();if(!u){console.error(`Store is undefined for key: ${c}`);return}return await u.get(c)}catch(u){console.error("Failed to get cached value with timestamp:",u);return}}}},JH="AvatarCache",QH="images",Na={},Gf={},eG=()=>{const{getCachedValue:e,setCachedValue:t}=qu({dbName:JH,storeName:QH}),n=a=>new Promise((l,c)=>{const u=new FileReader;u.onloadend=()=>l(u.result),u.onerror=c,u.readAsDataURL(a)}),i=async a=>{try{if(Na[a])return Na[a];if(Gf[a])return await Gf[a];const l=(async()=>{try{const c=await e(a);if(!c||!(c instanceof Blob))return null;const u=await n(c);return Na[a]=u,u}catch(c){return console.warn(`Failed to get cached image for key: ${a}`,c),null}})();return Gf[a]=l,l.finally(()=>{delete Gf[a]}),await l}catch(l){return console.error(`Error in getCachedImage for key: ${a}`,l),null}},o=a=>new Promise((l,c)=>{new qH(a,{width:96,height:96,quality:1,success(u){l(u)},error(u){console.error("Image compression failed:",u.message),c(u)}})});return{getCachedImage:i,setCachedImage:async(a,l)=>{try{const c=await o(l);await t(a,c);const u=await n(c);Na[a]=u}catch(c){throw console.error(`Failed to cache image for key: ${a}`,c),c}},clearMemoryCache:a=>{try{a?delete Na[a]:Object.keys(Na).forEach(l=>delete Na[l])}catch(l){console.error("Error clearing memory cache:",l)}}}},Yu=new Map,ps=new Map,Jl=new Map,tG=5*60*1e3,qD=100;function nG(){const e=Date.now(),t=[];Jl.forEach((n,i)=>{e-n>tG&&t.push(i)}),t.forEach(n=>{Yu.delete(n),Jl.delete(n),ps.delete(n)})}function iG(){if(Jl.size<=qD)return;const e=Array.from(Jl.entries()).sort((n,i)=>n[1]-i[1]);e.slice(0,e.length-qD).forEach(([n])=>{Yu.delete(n),Jl.delete(n),ps.delete(n)})}const oG=(e,t)=>{const n=ps.get(e);return n==null||n.forEach(i=>i(t)),ps.delete(e),t};async function sG({userId:e,avatarUrl:t,cacheInterface:n,onLoadingChange:i}){const o=await n.getCachedImage(e),s=Yu.has(e),r=ps.has(e);if(o)return oG(e,o);if(nG(),s)return new Promise(c=>{r||ps.set(e,[]),ps.get(e).push(c)});const a=(async()=>{let c=null,u=null;try{const d=Math.random()*300;await new Promise(f=>setTimeout(f,d)),i==null||i(!0);const h=await fetch(t,{cache:"no-cache"});if(!h.ok)throw new Error("Failed to fetch image");return c=await h.blob(),await n.setCachedImage(e,c),u=URL.createObjectURL(c),u}catch(d){throw console.error("Error loading avatar image:",d),d}finally{c=null,i==null||i(!1),Jl.set(e,Date.now()),setTimeout(()=>{Yu.delete(e),iG()},100)}})();Yu.set(e,a);const l=await a;return ps.has(e)&&(ps.get(e).forEach(u=>u(l)),ps.delete(e)),l}const rG=(e,t=3,n=1e3)=>{const i=Y(0),o=Y(!1),s=Y(!1),r=async()=>{try{await e()}catch(a){if(i.value<t)return i.value++,s.value=!0,await new Promise(l=>setTimeout(l,n)),r();throw o.value=!0,a}};return{retry:r,currentAttempt:i,errorRetry:o,isRetrying:s}};function ti(e,t){aG(e)&&(e="100%");const n=lG(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function $f(e){return Math.min(1,Math.max(0,e))}function aG(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function lG(e){return typeof e=="string"&&e.indexOf("%")!==-1}function YD(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Wf(e){return Number(e)<=1?`${Number(e)*100}%`:e}function Va(e){return e.length===1?"0"+e:String(e)}function cG(e,t,n){return{r:ti(e,255)*255,g:ti(t,255)*255,b:ti(n,255)*255}}function ZD(e,t,n){e=ti(e,255),t=ti(t,255),n=ti(n,255);const i=Math.max(e,t,n),o=Math.min(e,t,n);let s=0,r=0;const a=(i+o)/2;if(i===o)r=0,s=0;else{const l=i-o;switch(r=a>.5?l/(2-i-o):l/(i+o),i){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:r,l:a}}function hy(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function uG(e,t,n){let i,o,s;if(e=ti(e,360),t=ti(t,100),n=ti(n,100),t===0)o=n,s=n,i=n;else{const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=hy(a,r,e+1/3),o=hy(a,r,e),s=hy(a,r,e-1/3)}return{r:i*255,g:o*255,b:s*255}}function XD(e,t,n){e=ti(e,255),t=ti(t,255),n=ti(n,255);const i=Math.max(e,t,n),o=Math.min(e,t,n);let s=0;const r=i,a=i-o,l=i===0?0:a/i;if(i===o)s=0;else{switch(i){case e:s=(t-n)/a+(t<n?6:0);break;case t:s=(n-e)/a+2;break;case n:s=(e-t)/a+4;break}s/=6}return{h:s,s:l,v:r}}function dG(e,t,n){e=ti(e,360)*6,t=ti(t,100),n=ti(n,100);const i=Math.floor(e),o=e-i,s=n*(1-t),r=n*(1-o*t),a=n*(1-(1-o)*t),l=i%6,c=[n,r,s,s,a,n][l],u=[a,n,n,r,s,s][l],d=[s,s,a,n,n,r][l];return{r:c*255,g:u*255,b:d*255}}function JD(e,t,n,i){const o=[Va(Math.round(e).toString(16)),Va(Math.round(t).toString(16)),Va(Math.round(n).toString(16))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function hG(e,t,n,i,o){const s=[Va(Math.round(e).toString(16)),Va(Math.round(t).toString(16)),Va(Math.round(n).toString(16)),Va(pG(i))];return o&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function fG(e,t,n,i){const o=e/100,s=t/100,r=n/100,a=i/100,l=255*(1-o)*(1-a),c=255*(1-s)*(1-a),u=255*(1-r)*(1-a);return{r:l,g:c,b:u}}function QD(e,t,n){let i=1-e/255,o=1-t/255,s=1-n/255,r=Math.min(i,o,s);return r===1?(i=0,o=0,s=0):(i=(i-r)/(1-r)*100,o=(o-r)/(1-r)*100,s=(s-r)/(1-r)*100),r*=100,{c:Math.round(i),m:Math.round(o),y:Math.round(s),k:Math.round(r)}}function pG(e){return Math.round(parseFloat(e)*255).toString(16)}function e_(e){return Ki(e)/255}function Ki(e){return parseInt(e,16)}function gG(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}const fy={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function mG(e){let t={r:0,g:0,b:0},n=1,i=null,o=null,s=null,r=!1,a=!1;return typeof e=="string"&&(e=vG(e)),typeof e=="object"&&(qi(e.r)&&qi(e.g)&&qi(e.b)?(t=cG(e.r,e.g,e.b),r=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):qi(e.h)&&qi(e.s)&&qi(e.v)?(i=Wf(e.s),o=Wf(e.v),t=dG(e.h,i,o),r=!0,a="hsv"):qi(e.h)&&qi(e.s)&&qi(e.l)?(i=Wf(e.s),s=Wf(e.l),t=uG(e.h,i,s),r=!0,a="hsl"):qi(e.c)&&qi(e.m)&&qi(e.y)&&qi(e.k)&&(t=fG(e.c,e.m,e.y,e.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=YD(n),{ok:r,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}const Lr="(?:"+"[-\\+]?\\d*\\.\\d+%?"+")|(?:"+"[-\\+]?\\d+%?"+")",py="[\\s|\\(]+("+Lr+")[,|\\s]+("+Lr+")[,|\\s]+("+Lr+")\\s*\\)?",Uf="[\\s|\\(]+("+Lr+")[,|\\s]+("+Lr+")[,|\\s]+("+Lr+")[,|\\s]+("+Lr+")\\s*\\)?",ho={CSS_UNIT:new RegExp(Lr),rgb:new RegExp("rgb"+py),rgba:new RegExp("rgba"+Uf),hsl:new RegExp("hsl"+py),hsla:new RegExp("hsla"+Uf),hsv:new RegExp("hsv"+py),hsva:new RegExp("hsva"+Uf),cmyk:new RegExp("cmyk"+Uf),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function vG(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(fy[e])e=fy[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=ho.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ho.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ho.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ho.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ho.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ho.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ho.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=ho.hex8.exec(e),n?{r:Ki(n[1]),g:Ki(n[2]),b:Ki(n[3]),a:e_(n[4]),format:t?"name":"hex8"}:(n=ho.hex6.exec(e),n?{r:Ki(n[1]),g:Ki(n[2]),b:Ki(n[3]),format:t?"name":"hex"}:(n=ho.hex4.exec(e),n?{r:Ki(n[1]+n[1]),g:Ki(n[2]+n[2]),b:Ki(n[3]+n[3]),a:e_(n[4]+n[4]),format:t?"name":"hex8"}:(n=ho.hex3.exec(e),n?{r:Ki(n[1]+n[1]),g:Ki(n[2]+n[2]),b:Ki(n[3]+n[3]),format:t?"name":"hex"}:!1))))))))))}function qi(e){return typeof e=="number"?!Number.isNaN(e):ho.CSS_UNIT.test(e)}class En{constructor(t="",n={}){if(t instanceof En)return t;typeof t=="number"&&(t=gG(t)),this.originalInput=t;const i=mG(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3}getLuminance(){const t=this.toRgb();let n,i,o;const s=t.r/255,r=t.g/255,a=t.b/255;return s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*i+.0722*o}getAlpha(){return this.a}setAlpha(t){return this.a=YD(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=XD(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=XD(this.r,this.g,this.b),n=Math.round(t.h*360),i=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?`hsv(${n}, ${i}%, ${o}%)`:`hsva(${n}, ${i}%, ${o}%, ${this.roundA})`}toHsl(){const t=ZD(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=ZD(this.r,this.g,this.b),n=Math.round(t.h*360),i=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?`hsl(${n}, ${i}%, ${o}%)`:`hsla(${n}, ${i}%, ${o}%, ${this.roundA})`}toHex(t=!1){return JD(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return hG(this.r,this.g,this.b,this.a,t)}toHex8String(t=!1){return"#"+this.toHex8(t)}toHexShortString(t=!1){return this.a===1?this.toHexString(t):this.toHex8String(t)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const t=Math.round(this.r),n=Math.round(this.g),i=Math.round(this.b);return this.a===1?`rgb(${t}, ${n}, ${i})`:`rgba(${t}, ${n}, ${i}, ${this.roundA})`}toPercentageRgb(){const t=n=>`${Math.round(ti(n,255)*100)}%`;return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}}toPercentageRgbString(){const t=n=>Math.round(ti(n,255)*100);return this.a===1?`rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)`:`rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`}toCmyk(){return{...QD(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:n,y:i,k:o}=QD(this.r,this.g,this.b);return`cmyk(${t}, ${n}, ${i}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const t="#"+JD(this.r,this.g,this.b,!1);for(const[n,i]of Object.entries(fy))if(t===i)return n;return!1}toString(t){const n=!!t;t=t??this.format;let i=!1;const o=this.a<1&&this.a>=0;return!n&&o&&(t.startsWith("hex")||t==="name")?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(i=this.toRgbString()),t==="prgb"&&(i=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(i=this.toHexString()),t==="hex3"&&(i=this.toHexString(!0)),t==="hex4"&&(i=this.toHex8String(!0)),t==="hex8"&&(i=this.toHex8String()),t==="name"&&(i=this.toName()),t==="hsl"&&(i=this.toHslString()),t==="hsv"&&(i=this.toHsvString()),t==="cmyk"&&(i=this.toCmykString()),i||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new En(this.toString())}lighten(t=10){const n=this.toHsl();return n.l+=t/100,n.l=$f(n.l),new En(n)}brighten(t=10){const n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new En(n)}darken(t=10){const n=this.toHsl();return n.l-=t/100,n.l=$f(n.l),new En(n)}tint(t=10){return this.mix("white",t)}shade(t=10){return this.mix("black",t)}desaturate(t=10){const n=this.toHsl();return n.s-=t/100,n.s=$f(n.s),new En(n)}saturate(t=10){const n=this.toHsl();return n.s+=t/100,n.s=$f(n.s),new En(n)}greyscale(){return this.desaturate(100)}spin(t){const n=this.toHsl(),i=(n.h+t)%360;return n.h=i<0?360+i:i,new En(n)}mix(t,n=50){const i=this.toRgb(),o=new En(t).toRgb(),s=n/100,r={r:(o.r-i.r)*s+i.r,g:(o.g-i.g)*s+i.g,b:(o.b-i.b)*s+i.b,a:(o.a-i.a)*s+i.a};return new En(r)}analogous(t=6,n=30){const i=this.toHsl(),o=360/n,s=[this];for(i.h=(i.h-(o*t>>1)+720)%360;--t;)i.h=(i.h+o)%360,s.push(new En(i));return s}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new En(t)}monochromatic(t=6){const n=this.toHsv(),{h:i}=n,{s:o}=n;let{v:s}=n;const r=[],a=1/t;for(;t--;)r.push(new En({h:i,s:o,v:s})),s=(s+a)%1;return r}splitcomplement(){const t=this.toHsl(),{h:n}=t;return[this,new En({h:(n+72)%360,s:t.s,l:t.l}),new En({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){const n=this.toRgb(),i=new En(t).toRgb(),o=n.a+i.a*(1-n.a);return new En({r:(n.r*n.a+i.r*i.a*(1-n.a))/o,g:(n.g*n.a+i.g*i.a*(1-n.a))/o,b:(n.b*n.a+i.b*i.a*(1-n.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const n=this.toHsl(),{h:i}=n,o=[this],s=360/t;for(let r=1;r<t;r++)o.push(new En({h:(i+r*s)%360,s:n.s,l:n.l}));return o}equals(t){const n=new En(t);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function gy(e){return new En(e||"").isValid}function my(e,t){const{c1:n,c2:i}={c1:new En(e),c2:new En(t)};return n.equals(i)}const yG=["src","alt"],Zu=Ct(ct({__name:"Avatar",props:{name:{},id:{},profile_image:{},color:{},initial:{},isMe:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{default:24},isUseShortLabel:{type:Boolean,default:!0}},setup(e){const t=e,n=Y(""),i=Y(!1),o=Y(null),s=Y(!1),r=q(()=>({name:t.name||"",id:t.id||"",profile_image:t.profile_image||null,color:t.color||{bgColor:"#CCCCCC",textColor:"var(--background-color)"},initial:t.initial})),a=q(()=>{var R;const C=((R=r.value.color)==null?void 0:R.bgColor)||"#CCCCCC";return gy(C)?C:"#CCCCCC"}),l=q(()=>{var R;const C=((R=r.value.color)==null?void 0:R.textColor)||"var(--background-color)";return gy(C)?C:"var(--background-color)"}),c=q(()=>{if(!t.isUseShortLabel)return"";const{initial:C,name:R}=r.value;if(typeof C=="string"&&C.trim())return C.trim();if(!(R!=null&&R.trim()))return"";const E=R.trim().split(/\s+/).filter(Boolean);return E.length===1?E[0].slice(0,2).toUpperCase():(E[0][0]+E[1][0]).toUpperCase()}),u=q(()=>r.value.profile_image?"image":"text"),d=q(()=>({"--avatar-size":`${t.size}px`,"--avatar-bg":a.value,"--avatar-border":t.isMe?"var(--primary-color)":"#dcdcdc","--text-color":l.value})),h=()=>{n.value="",s.value=!0},{getCachedImage:f,setCachedImage:g}=eG(),m=async()=>{if(o.value&&o.value.abort(),n.value.startsWith("blob:")&&URL.revokeObjectURL(n.value),!r.value.id||!r.value.profile_image){n.value="";return}o.value=new AbortController;const C=o.value;try{const R=await sG({userId:r.value.id,avatarUrl:r.value.profile_image,cacheInterface:{getCachedImage:f,setCachedImage:g},onLoadingChange:E=>{C.signal.aborted||(i.value=E)}});if(!C.signal.aborted&&(n.value=R,R.length===0))throw console.warn("Loaded avatar image is empty, displaying initials instead."),h(),new Error("Empty image source")}catch(R){C.signal.aborted||(console.error("Failed to load avatar:",R),n.value="")}},{retry:y,errorRetry:b,isRetrying:S}=rG(m,3,2e3),F=ut(()=>r.value.id,y,{immediate:!0});return qn(()=>{F(),o.value&&(o.value.abort(),o.value=null),n.value.startsWith("blob:")&&URL.revokeObjectURL(n.value),n.value="",i.value=!1}),(C,R)=>(K(),Ce("div",{class:z([C.$style["avatar-wrapper"],{[C.$style.me]:e.isMe,[C.$style.loading]:i.value,[C.$style.disabled]:e.disabled,[C.$style.readOnly]:t.readOnly}]),style:gn(d.value)},[i.value||U(S)?(K(),Ce("div",{key:0,class:z(C.$style["skeleton-loader"])},null,2)):(K(),Ce(Ot,{key:1},[u.value==="text"||U(b)||s.value?(K(),Ce("div",{key:0,class:z(C.$style["short-label"])},bt(c.value),3)):n.value.length>0||r.value.profile_image?(K(),Ce("img",{key:1,src:n.value||r.value.profile_image||"",alt:r.value.name||"Avatar",loading:"lazy"},null,8,yG)):it("",!0)],64))],6))}}),[["__cssModules",{$style:{"avatar-wrapper":"_avatar-wrapper_1gfzg_1",me:"_me_1gfzg_16","short-label":"_short-label_1gfzg_19",action:"_action_1gfzg_37",loading:"_loading_1gfzg_55",disabled:"_disabled_1gfzg_58",readOnly:"_readOnly_1gfzg_61"}}]]),CG=["404","ClickChart","ClickToCreate","NoAccess1","NoActivity","NoAssignedComment","NoAssignedScene","NoComment","NoData","NoData2","NoRendition1","NoRendition2","PrivateComment","PrivateScene","ReportAchievement","ReportCompletedScenes","ReportInvolvement","ReportMetric","ReportOverdueScenes","ReportProfessionalName","ReportSceneAssignment","ReportSceneStatus","ReportSceneStatusType","Successful1","Unsuccessful1","ConfirmDeletion","Waiting1","DefaultThumbnail","UploadReviewFile","ClickToSearch","NoDataSearchFilter"],wG=["UploadInProgress"],zf={},qs={},t_=(e,t,n,i)=>{const o=Y(""),s=Y(""),r=Y(!0),a=q(()=>`${t}:${e.value.name}`),l=y=>URL.createObjectURL(y),c=y=>{URL.revokeObjectURL(y)},u=y=>new Blob([y],{type:"image/svg+xml"}),d=async y=>await y.text(),h=async(y,b)=>{if(qs[b])return qs[b];if(b in zf){const C=await zf[b];if(C&&C.size>0){const R=await d(C);qs[b]=R}return C}const S=await i(a.value);if(S&&S instanceof Blob&&S.size>0){const C=await d(S);return qs[b]=C,S}if(S&&typeof S=="string")return qs[b]=S,S;const F=(async()=>{try{const C=await fetch(y,{cache:"no-cache"});if(!C.ok)throw new Error("Failed to fetch visual");const R=C.headers.get("Content-Type")||"";let E;if(R.includes("svg")||R.includes("xml")){const x=await C.text();if(x.trim()){if(E=u(x),!E.size)throw new Error("Empty image blob");qs[b]=x}else throw new Error("Empty SVG content")}else if(R.match(/image\/(jpeg|jpg|png|gif|webp)/)){if(E=await C.blob(),!E.size)throw new Error("Empty image blob")}else throw new Error(`Unsupported content type: ${R}`);return await n(a.value,E),E}catch(C){return console.error("Error fetching visual:",C),new Blob}})();return zf[b]=F,F.finally(()=>{delete zf[b]}),await F},f=async y=>{r.value=!0;try{if(qs[a.value]){s.value=qs[a.value],r.value=!1;return}const b=sessionStorage.getItem("ASSET_URL")||"https://arbodev.s3.ap-south-1.amazonaws.com",S={icon:`${b}/icon/tess/TESSRAPP_Icon_${y}`,visual:`${b}/icon/visual/TESSRAPP_Visual_${y}`,ratting:`${b}/icon/tess/rating/TESSRAPP_Icon_${y}_Outline`,flag:`${b}/icon/flags/4x3/${y}`},F=CG.includes(y)?"png":wG.includes(y)?"gif":"svg",C=`${S[t]}.${F}`,R=await h(C,a.value);typeof R=="string"?(s.value=R,o.value=R):R.size>0&&((R.type.includes("svg")||R.type.includes("xml"))&&(s.value=await d(R),qs[a.value]=s.value),o.value=l(R))}catch(b){console.error("Error fetching remote visual:",b)}finally{r.value=!1}},g=async()=>{o.value="",s.value="",e.value.name&&(r.value=!0,await f(e.value.name),r.value=!1)},m=q(()=>s.value?s.value:"");return Vl(()=>{o.value&&o.value.startsWith("blob:")&&c(o.value)}),ut(()=>e,y=>{g()},{deep:!0,immediate:!0}),{svgContent:m,url:o,loading:r}},bG=["innerHTML"],SG="IconCache",EG="icons",mt=Ct(ct({__name:"Icon",props:{src:{},source:{default:"remote"},size:{default:14},color:{default:"currentColor"}},setup(e){cB(l=>({d999b740:l.size+"px"}));const t=e,{getCachedValue:n,setCachedValue:i}=qu({dbName:SG,storeName:EG}),o=l=>{if(typeof l=="number")return l;switch(l){case"small":return 8;case"medium":return 16;case"large":return 20;default:return typeof l=="string"?parseInt(l,10):14}},s=q(()=>t.source==="rating"?"ratting":"icon"),r=q(()=>({name:t.src,size:o(t.size),color:t.color})),{svgContent:a}=t_(r,s.value,i,n);return(l,c)=>(K(),Ce("div",{class:z(l.$style.iconWrapper),innerHTML:U(a),style:gn({color:e.color,"--size":e.size})},null,14,bG))}}),[["__cssModules",{$style:{iconWrapper:"_iconWrapper_1n0y9_1"}}]]),RG={review:"{reviewDomain}/{ws_code}",review_take:"{reviewDomain}/{ws_code}?id={take_id}",review_scene:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&tab=iteration",review_rendition:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}",review_frame:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}&tab=comment&refresh_marker=true#type=frame&data={frame}",review_rendition_comment:"{reviewDomain}/{ws_code}?scene_id={scene_id}&rendition_id={rendition_id}&comment_id={comment_id}",review_comment:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&comment_id={comment_id}",scene_hub:"{baseDomain}/{ws_code}/{scene_id}?o=st",hub_rendition:"{baseDomain}/{ws_code}/{scene_id}?o=st&renditionId={rendition_id}",hub_comment:"{baseDomain}/{ws_code}/{scene_id}?o=st&comment_id={comment_id}",people_insight:"{baseDomain}/{ws_code}/{user_id}?o=pt",people_detail:"{baseDomain}/{ws_code}/ws/ppl/{display_name}-${user_id}",project:"{baseDomain}/{ws_code}/pl/dir/{entity_id}",woohoo:"{baseDomain}/{ws_code}/pl/woo/rpt/{woohoo_id}",update:"{baseDomain}/{ws_code}/pl/au?id={entity_id}",core:"{baseDomain}/{ws_code}",project_focusMode:"{baseDomain}/{ws_code}/pl/dir/{parent_id}?f={entity_id}",access_setting:"{baseDomain}/{ws_code}/pl/dir?f={entity_id}&o=as"},fo=({type:e,config:t})=>{const n=[];try{const i=RG[e];if(!i)throw new Error(`Link template for link type "${e}" not found`);const o=i.replace(/{(.*?)}/g,(s,r)=>{const a=t[String(r)];if(a!==void 0)return a;n.push(r)});return n.length>0?{url:o,hasError:!0,error:`Missing required keys: ${n.join(", ")}`,missingKeys:n}:{url:o,hasError:!1,error:void 0}}catch(i){return console.error("Link Creator ERROR at:",i),{url:"",hasError:!0,error:i instanceof Error?i.message:`Missing required keys: ${n.join(", ")}`}}};var n_=typeof global=="object"&&global&&global.Object===Object&&global,DG=typeof self=="object"&&self&&self.Object===Object&&self,$o=n_||DG||Function("return this")(),po=$o.Symbol,i_=Object.prototype,_G=i_.hasOwnProperty,xG=i_.toString,Xu=po?po.toStringTag:void 0;function FG(e){var t=_G.call(e,Xu),n=e[Xu];try{e[Xu]=void 0;var i=!0}catch{}var o=xG.call(e);return i&&(t?e[Xu]=n:delete e[Xu]),o}var TG=Object.prototype,PG=TG.toString;function IG(e){return PG.call(e)}var AG="[object Null]",kG="[object Undefined]",o_=po?po.toStringTag:void 0;function Ql(e){return e==null?e===void 0?kG:AG:o_&&o_ in Object(e)?FG(e):IG(e)}function Ys(e){return e!=null&&typeof e=="object"}var OG="[object Symbol]";function jf(e){return typeof e=="symbol"||Ys(e)&&Ql(e)==OG}function MG(e,t){for(var n=-1,i=e==null?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o}var go=Array.isArray,s_=po?po.prototype:void 0,r_=s_?s_.toString:void 0;function a_(e){if(typeof e=="string")return e;if(go(e))return MG(e,a_)+"";if(jf(e))return r_?r_.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var LG=/\s/;function NG(e){for(var t=e.length;t--&&LG.test(e.charAt(t)););return t}var VG=/^\s+/;function BG(e){return e&&e.slice(0,NG(e)+1).replace(VG,"")}function Zs(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var l_=NaN,HG=/^[-+]0x[0-9a-f]+$/i,GG=/^0b[01]+$/i,$G=/^0o[0-7]+$/i,WG=parseInt;function vy(e){if(typeof e=="number")return e;if(jf(e))return l_;if(Zs(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Zs(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=BG(e);var n=GG.test(e);return n||$G.test(e)?WG(e.slice(2),n?2:8):HG.test(e)?l_:+e}var c_=1/0,UG=17976931348623157e292;function yy(e){if(!e)return e===0?e:0;if(e=vy(e),e===c_||e===-c_){var t=e<0?-1:1;return t*UG}return e===e?e:0}function zG(e){var t=yy(e),n=t%1;return t===t?n?t-n:t:0}function Cy(e){return e}var jG="[object AsyncFunction]",KG="[object Function]",qG="[object GeneratorFunction]",YG="[object Proxy]";function u_(e){if(!Zs(e))return!1;var t=Ql(e);return t==KG||t==qG||t==jG||t==YG}var wy=$o["__core-js_shared__"],d_=function(){var e=/[^.]+$/.exec(wy&&wy.keys&&wy.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ZG(e){return!!d_&&d_ in e}var XG=Function.prototype,JG=XG.toString;function Ba(e){if(e!=null){try{return JG.call(e)}catch{}try{return e+""}catch{}}return""}var QG=/[\\^$.*+?()[\]{}|]/g,e$=/^\[object .+?Constructor\]$/,t$=Function.prototype,n$=Object.prototype,i$=t$.toString,o$=n$.hasOwnProperty,s$=RegExp("^"+i$.call(o$).replace(QG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function r$(e){if(!Zs(e)||ZG(e))return!1;var t=u_(e)?s$:e$;return t.test(Ba(e))}function a$(e,t){return e==null?void 0:e[t]}function Ha(e,t){var n=a$(e,t);return r$(n)?n:void 0}var by=Ha($o,"WeakMap"),h_=Object.create,l$=function(){function e(){}return function(t){if(!Zs(t))return{};if(h_)return h_(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function c$(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function u$(){}var d$=800,h$=16,f$=Date.now;function p$(e){var t=0,n=0;return function(){var i=f$(),o=h$-(i-n);if(n=i,o>0){if(++t>=d$)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function g$(e){return function(){return e}}var Kf=function(){try{var e=Ha(Object,"defineProperty");return e({},"",{}),e}catch{}}(),m$=Kf?function(e,t){return Kf(e,"toString",{configurable:!0,enumerable:!1,value:g$(t),writable:!0})}:Cy,v$=p$(m$);function y$(e,t){for(var n=-1,i=e==null?0:e.length;++n<i&&t(e[n],n,e)!==!1;);return e}function C$(e,t,n,i){for(var o=e.length,s=n+-1;++s<o;)if(t(e[s],s,e))return s;return-1}function w$(e){return e!==e}function b$(e,t,n){for(var i=n-1,o=e.length;++i<o;)if(e[i]===t)return i;return-1}function S$(e,t,n){return t===t?b$(e,t,n):C$(e,w$,n)}function E$(e,t){var n=e==null?0:e.length;return!!n&&S$(e,t,0)>-1}var R$=9007199254740991,D$=/^(?:0|[1-9]\d*)$/;function Sy(e,t){var n=typeof e;return t=t??R$,!!t&&(n=="number"||n!="symbol"&&D$.test(e))&&e>-1&&e%1==0&&e<t}function _$(e,t,n){t=="__proto__"&&Kf?Kf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function qf(e,t){return e===t||e!==e&&t!==t}var x$=Object.prototype,F$=x$.hasOwnProperty;function T$(e,t,n){var i=e[t];(!(F$.call(e,t)&&qf(i,n))||n===void 0&&!(t in e))&&_$(e,t,n)}var f_=Math.max;function P$(e,t,n){return t=f_(t===void 0?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=f_(i.length-t,0),r=Array(s);++o<s;)r[o]=i[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=i[o];return a[t]=n(r),c$(e,this,a)}}function I$(e,t){return v$(P$(e,t,Cy),e+"")}var A$=9007199254740991;function Ey(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=A$}function Yf(e){return e!=null&&Ey(e.length)&&!u_(e)}function k$(e,t,n){if(!Zs(n))return!1;var i=typeof t;return(i=="number"?Yf(n)&&Sy(t,n.length):i=="string"&&t in n)?qf(n[t],e):!1}var O$=Object.prototype;function Ry(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||O$;return e===n}function M$(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}var L$="[object Arguments]";function p_(e){return Ys(e)&&Ql(e)==L$}var g_=Object.prototype,N$=g_.hasOwnProperty,V$=g_.propertyIsEnumerable,Zf=p_(function(){return arguments}())?p_:function(e){return Ys(e)&&N$.call(e,"callee")&&!V$.call(e,"callee")};function B$(){return!1}var m_=typeof cn=="object"&&cn&&!cn.nodeType&&cn,v_=m_&&typeof module=="object"&&module&&!module.nodeType&&module,H$=v_&&v_.exports===m_,y_=H$?$o.Buffer:void 0,G$=y_?y_.isBuffer:void 0,Ju=G$||B$,$$="[object Arguments]",W$="[object Array]",U$="[object Boolean]",z$="[object Date]",j$="[object Error]",K$="[object Function]",q$="[object Map]",Y$="[object Number]",Z$="[object Object]",X$="[object RegExp]",J$="[object Set]",Q$="[object String]",eW="[object WeakMap]",tW="[object ArrayBuffer]",nW="[object DataView]",iW="[object Float32Array]",oW="[object Float64Array]",sW="[object Int8Array]",rW="[object Int16Array]",aW="[object Int32Array]",lW="[object Uint8Array]",cW="[object Uint8ClampedArray]",uW="[object Uint16Array]",dW="[object Uint32Array]",dn={};dn[iW]=dn[oW]=dn[sW]=dn[rW]=dn[aW]=dn[lW]=dn[cW]=dn[uW]=dn[dW]=!0,dn[$$]=dn[W$]=dn[tW]=dn[U$]=dn[nW]=dn[z$]=dn[j$]=dn[K$]=dn[q$]=dn[Y$]=dn[Z$]=dn[X$]=dn[J$]=dn[Q$]=dn[eW]=!1;function hW(e){return Ys(e)&&Ey(e.length)&&!!dn[Ql(e)]}function Dy(e){return function(t){return e(t)}}var C_=typeof cn=="object"&&cn&&!cn.nodeType&&cn,Qu=C_&&typeof module=="object"&&module&&!module.nodeType&&module,fW=Qu&&Qu.exports===C_,_y=fW&&n_.process,ec=function(){try{var e=Qu&&Qu.require&&Qu.require("util").types;return e||_y&&_y.binding&&_y.binding("util")}catch{}}(),w_=ec&&ec.isTypedArray,xy=w_?Dy(w_):hW,pW=Object.prototype,gW=pW.hasOwnProperty;function mW(e,t){var n=go(e),i=!n&&Zf(e),o=!n&&!i&&Ju(e),s=!n&&!i&&!o&&xy(e),r=n||i||o||s,a=r?M$(e.length,String):[],l=a.length;for(var c in e)gW.call(e,c)&&!(r&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Sy(c,l)))&&a.push(c);return a}function b_(e,t){return function(n){return e(t(n))}}var vW=b_(Object.keys,Object),yW=Object.prototype,CW=yW.hasOwnProperty;function S_(e){if(!Ry(e))return vW(e);var t=[];for(var n in Object(e))CW.call(e,n)&&n!="constructor"&&t.push(n);return t}function E_(e){return Yf(e)?mW(e):S_(e)}var wW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bW=/^\w*$/;function Fy(e,t){if(go(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||jf(e)?!0:bW.test(e)||!wW.test(e)||t!=null&&e in Object(t)}var ed=Ha(Object,"create");function SW(){this.__data__=ed?ed(null):{},this.size=0}function EW(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var RW="__lodash_hash_undefined__",DW=Object.prototype,_W=DW.hasOwnProperty;function xW(e){var t=this.__data__;if(ed){var n=t[e];return n===RW?void 0:n}return _W.call(t,e)?t[e]:void 0}var FW=Object.prototype,TW=FW.hasOwnProperty;function PW(e){var t=this.__data__;return ed?t[e]!==void 0:TW.call(t,e)}var IW="__lodash_hash_undefined__";function AW(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ed&&t===void 0?IW:t,this}function Ga(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Ga.prototype.clear=SW,Ga.prototype.delete=EW,Ga.prototype.get=xW,Ga.prototype.has=PW,Ga.prototype.set=AW;function kW(){this.__data__=[],this.size=0}function Xf(e,t){for(var n=e.length;n--;)if(qf(e[n][0],t))return n;return-1}var OW=Array.prototype,MW=OW.splice;function LW(e){var t=this.__data__,n=Xf(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():MW.call(t,n,1),--this.size,!0}function NW(e){var t=this.__data__,n=Xf(t,e);return n<0?void 0:t[n][1]}function VW(e){return Xf(this.__data__,e)>-1}function BW(e,t){var n=this.__data__,i=Xf(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}function Xs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Xs.prototype.clear=kW,Xs.prototype.delete=LW,Xs.prototype.get=NW,Xs.prototype.has=VW,Xs.prototype.set=BW;var td=Ha($o,"Map");function HW(){this.size=0,this.__data__={hash:new Ga,map:new(td||Xs),string:new Ga}}function GW(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Jf(e,t){var n=e.__data__;return GW(t)?n[typeof t=="string"?"string":"hash"]:n.map}function $W(e){var t=Jf(this,e).delete(e);return this.size-=t?1:0,t}function WW(e){return Jf(this,e).get(e)}function UW(e){return Jf(this,e).has(e)}function zW(e,t){var n=Jf(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}function Js(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Js.prototype.clear=HW,Js.prototype.delete=$W,Js.prototype.get=WW,Js.prototype.has=UW,Js.prototype.set=zW;var jW="Expected a function";function Ty(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(jW);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],s=n.cache;if(s.has(o))return s.get(o);var r=e.apply(this,i);return n.cache=s.set(o,r)||s,r};return n.cache=new(Ty.Cache||Js),n}Ty.Cache=Js;var KW=500;function qW(e){var t=Ty(e,function(i){return n.size===KW&&n.clear(),i}),n=t.cache;return t}var YW=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ZW=/\\(\\)?/g,XW=qW(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(YW,function(n,i,o,s){t.push(o?s.replace(ZW,"$1"):i||n)}),t});function JW(e){return e==null?"":a_(e)}function R_(e,t){return go(e)?e:Fy(e,t)?[e]:XW(JW(e))}function Qf(e){if(typeof e=="string"||jf(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function D_(e,t){t=R_(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[Qf(t[n++])];return n&&n==i?e:void 0}function QW(e,t,n){var i=e==null?void 0:D_(e,t);return i===void 0?n:i}function __(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}var x_=po?po.isConcatSpreadable:void 0;function eU(e){return go(e)||Zf(e)||!!(x_&&e&&e[x_])}function tU(e,t,n,i,o){var s=-1,r=e.length;for(n||(n=eU),o||(o=[]);++s<r;){var a=e[s];n(a)&&__(o,a)}return o}var nU=b_(Object.getPrototypeOf,Object);function iU(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++i<o;)s[i]=e[i+t];return s}var oU=Math.ceil,sU=Math.max;function rU(e,t,n){t===void 0?t=1:t=sU(zG(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,r=Array(oU(i/t));o<i;)r[s++]=iU(e,o,o+=t);return r}function aU(){this.__data__=new Xs,this.size=0}function lU(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function cU(e){return this.__data__.get(e)}function uU(e){return this.__data__.has(e)}var dU=200;function hU(e,t){var n=this.__data__;if(n instanceof Xs){var i=n.__data__;if(!td||i.length<dU-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Js(i)}return n.set(e,t),this.size=n.size,this}function gs(e){var t=this.__data__=new Xs(e);this.size=t.size}gs.prototype.clear=aU,gs.prototype.delete=lU,gs.prototype.get=cU,gs.prototype.has=uU,gs.prototype.set=hU;var F_=typeof cn=="object"&&cn&&!cn.nodeType&&cn,T_=F_&&typeof module=="object"&&module&&!module.nodeType&&module,fU=T_&&T_.exports===F_,P_=fU?$o.Buffer:void 0;P_&&P_.allocUnsafe;function pU(e,t){return e.slice()}function gU(e,t){for(var n=-1,i=e==null?0:e.length,o=0,s=[];++n<i;){var r=e[n];t(r,n,e)&&(s[o++]=r)}return s}function mU(){return[]}var vU=Object.prototype,yU=vU.propertyIsEnumerable,I_=Object.getOwnPropertySymbols,CU=I_?function(e){return e==null?[]:(e=Object(e),gU(I_(e),function(t){return yU.call(e,t)}))}:mU;function wU(e,t,n){var i=t(e);return go(e)?i:__(i,n(e))}function Py(e){return wU(e,E_,CU)}var Iy=Ha($o,"DataView"),Ay=Ha($o,"Promise"),tc=Ha($o,"Set"),A_="[object Map]",bU="[object Object]",k_="[object Promise]",O_="[object Set]",M_="[object WeakMap]",L_="[object DataView]",SU=Ba(Iy),EU=Ba(td),RU=Ba(Ay),DU=Ba(tc),_U=Ba(by),mo=Ql;(Iy&&mo(new Iy(new ArrayBuffer(1)))!=L_||td&&mo(new td)!=A_||Ay&&mo(Ay.resolve())!=k_||tc&&mo(new tc)!=O_||by&&mo(new by)!=M_)&&(mo=function(e){var t=Ql(e),n=t==bU?e.constructor:void 0,i=n?Ba(n):"";if(i)switch(i){case SU:return L_;case EU:return A_;case RU:return k_;case DU:return O_;case _U:return M_}return t});var xU=Object.prototype,FU=xU.hasOwnProperty;function TU(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&FU.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var ep=$o.Uint8Array;function ky(e){var t=new e.constructor(e.byteLength);return new ep(t).set(new ep(e)),t}function PU(e,t){var n=ky(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var IU=/\w*$/;function AU(e){var t=new e.constructor(e.source,IU.exec(e));return t.lastIndex=e.lastIndex,t}var N_=po?po.prototype:void 0,V_=N_?N_.valueOf:void 0;function kU(e){return V_?Object(V_.call(e)):{}}function OU(e,t){var n=ky(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}var MU="[object Boolean]",LU="[object Date]",NU="[object Map]",VU="[object Number]",BU="[object RegExp]",HU="[object Set]",GU="[object String]",$U="[object Symbol]",WU="[object ArrayBuffer]",UU="[object DataView]",zU="[object Float32Array]",jU="[object Float64Array]",KU="[object Int8Array]",qU="[object Int16Array]",YU="[object Int32Array]",ZU="[object Uint8Array]",XU="[object Uint8ClampedArray]",JU="[object Uint16Array]",QU="[object Uint32Array]";function ez(e,t,n){var i=e.constructor;switch(t){case WU:return ky(e);case MU:case LU:return new i(+e);case UU:return PU(e);case zU:case jU:case KU:case qU:case YU:case ZU:case XU:case JU:case QU:return OU(e);case NU:return new i;case VU:case GU:return new i(e);case BU:return AU(e);case HU:return new i;case $U:return kU(e)}}function tz(e){return typeof e.constructor=="function"&&!Ry(e)?l$(nU(e)):{}}var nz="[object Map]";function iz(e){return Ys(e)&&mo(e)==nz}var B_=ec&&ec.isMap,oz=B_?Dy(B_):iz,sz="[object Set]";function rz(e){return Ys(e)&&mo(e)==sz}var H_=ec&&ec.isSet,az=H_?Dy(H_):rz,G_="[object Arguments]",lz="[object Array]",cz="[object Boolean]",uz="[object Date]",dz="[object Error]",$_="[object Function]",hz="[object GeneratorFunction]",fz="[object Map]",pz="[object Number]",W_="[object Object]",gz="[object RegExp]",mz="[object Set]",vz="[object String]",yz="[object Symbol]",Cz="[object WeakMap]",wz="[object ArrayBuffer]",bz="[object DataView]",Sz="[object Float32Array]",Ez="[object Float64Array]",Rz="[object Int8Array]",Dz="[object Int16Array]",_z="[object Int32Array]",xz="[object Uint8Array]",Fz="[object Uint8ClampedArray]",Tz="[object Uint16Array]",Pz="[object Uint32Array]",an={};an[G_]=an[lz]=an[wz]=an[bz]=an[cz]=an[uz]=an[Sz]=an[Ez]=an[Rz]=an[Dz]=an[_z]=an[fz]=an[pz]=an[W_]=an[gz]=an[mz]=an[vz]=an[yz]=an[xz]=an[Fz]=an[Tz]=an[Pz]=!0,an[dz]=an[$_]=an[Cz]=!1;function tp(e,t,n,i,o,s){var r;if(r!==void 0)return r;if(!Zs(e))return e;var a=go(e);if(a)r=TU(e);else{var l=mo(e),c=l==$_||l==hz;if(Ju(e))return pU(e);if(l==W_||l==G_||c&&!o)r=c?{}:tz(e);else{if(!an[l])return o?e:{};r=ez(e,l)}}s||(s=new gs);var u=s.get(e);if(u)return u;s.set(e,r),az(e)?e.forEach(function(f){r.add(tp(f,t,n,f,e,s))}):oz(e)&&e.forEach(function(f,g){r.set(g,tp(f,t,n,g,e,s))});var d=Py,h=a?void 0:d(e);return y$(h||e,function(f,g){h&&(g=f,f=e[g]),T$(r,g,tp(f,t,n,g,e,s))}),r}var Iz=1,Az=4;function kz(e){return tp(e,Iz|Az)}var Oz="__lodash_hash_undefined__";function Mz(e){return this.__data__.set(e,Oz),this}function Lz(e){return this.__data__.has(e)}function nd(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Js;++t<n;)this.add(e[t])}nd.prototype.add=nd.prototype.push=Mz,nd.prototype.has=Lz;function Nz(e,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function U_(e,t){return e.has(t)}var Vz=1,Bz=2;function z_(e,t,n,i,o,s){var r=n&Vz,a=e.length,l=t.length;if(a!=l&&!(r&&l>a))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&Bz?new nd:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var g=e[d],m=t[d];if(i)var y=r?i(m,g,d,t,e,s):i(g,m,d,e,t,s);if(y!==void 0){if(y)continue;h=!1;break}if(f){if(!Nz(t,function(b,S){if(!U_(f,S)&&(g===b||o(g,b,n,i,s)))return f.push(S)})){h=!1;break}}else if(!(g===m||o(g,m,n,i,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function Hz(e){var t=-1,n=Array(e.size);return e.forEach(function(i,o){n[++t]=[o,i]}),n}function Oy(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n}var Gz=1,$z=2,Wz="[object Boolean]",Uz="[object Date]",zz="[object Error]",jz="[object Map]",Kz="[object Number]",qz="[object RegExp]",Yz="[object Set]",Zz="[object String]",Xz="[object Symbol]",Jz="[object ArrayBuffer]",Qz="[object DataView]",j_=po?po.prototype:void 0,My=j_?j_.valueOf:void 0;function e3(e,t,n,i,o,s,r){switch(n){case Qz:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Jz:return!(e.byteLength!=t.byteLength||!s(new ep(e),new ep(t)));case Wz:case Uz:case Kz:return qf(+e,+t);case zz:return e.name==t.name&&e.message==t.message;case qz:case Zz:return e==t+"";case jz:var a=Hz;case Yz:var l=i&Gz;if(a||(a=Oy),e.size!=t.size&&!l)return!1;var c=r.get(e);if(c)return c==t;i|=$z,r.set(e,t);var u=z_(a(e),a(t),i,o,s,r);return r.delete(e),u;case Xz:if(My)return My.call(e)==My.call(t)}return!1}var t3=1,n3=Object.prototype,i3=n3.hasOwnProperty;function o3(e,t,n,i,o,s){var r=n&t3,a=Py(e),l=a.length,c=Py(t),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in t:i3.call(t,h)))return!1}var f=s.get(e),g=s.get(t);if(f&&g)return f==t&&g==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=r;++d<l;){h=a[d];var b=e[h],S=t[h];if(i)var F=r?i(S,b,h,t,e,s):i(b,S,h,e,t,s);if(!(F===void 0?b===S||o(b,S,n,i,s):F)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var C=e.constructor,R=t.constructor;C!=R&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof R=="function"&&R instanceof R)&&(m=!1)}return s.delete(e),s.delete(t),m}var s3=1,K_="[object Arguments]",q_="[object Array]",np="[object Object]",r3=Object.prototype,Y_=r3.hasOwnProperty;function a3(e,t,n,i,o,s){var r=go(e),a=go(t),l=r?q_:mo(e),c=a?q_:mo(t);l=l==K_?np:l,c=c==K_?np:c;var u=l==np,d=c==np,h=l==c;if(h&&Ju(e)){if(!Ju(t))return!1;r=!0,u=!1}if(h&&!u)return s||(s=new gs),r||xy(e)?z_(e,t,n,i,o,s):e3(e,t,l,n,i,o,s);if(!(n&s3)){var f=u&&Y_.call(e,"__wrapped__"),g=d&&Y_.call(t,"__wrapped__");if(f||g){var m=f?e.value():e,y=g?t.value():t;return s||(s=new gs),o(m,y,n,i,s)}}return h?(s||(s=new gs),o3(e,t,n,i,o,s)):!1}function Ly(e,t,n,i,o){return e===t?!0:e==null||t==null||!Ys(e)&&!Ys(t)?e!==e&&t!==t:a3(e,t,n,i,Ly,o)}var l3=1,c3=2;function u3(e,t,n,i){var o=n.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var r=n[o];if(r[2]?r[1]!==e[r[0]]:!(r[0]in e))return!1}for(;++o<s;){r=n[o];var a=r[0],l=e[a],c=r[1];if(r[2]){if(l===void 0&&!(a in e))return!1}else{var u=new gs,d;if(!(d===void 0?Ly(c,l,l3|c3,i,u):d))return!1}}return!0}function Z_(e){return e===e&&!Zs(e)}function d3(e){for(var t=E_(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,Z_(o)]}return t}function X_(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function h3(e){var t=d3(e);return t.length==1&&t[0][2]?X_(t[0][0],t[0][1]):function(n){return n===e||u3(n,e,t)}}function f3(e,t){return e!=null&&t in Object(e)}function p3(e,t,n){t=R_(t,e);for(var i=-1,o=t.length,s=!1;++i<o;){var r=Qf(t[i]);if(!(s=e!=null&&n(e,r)))break;e=e[r]}return s||++i!=o?s:(o=e==null?0:e.length,!!o&&Ey(o)&&Sy(r,o)&&(go(e)||Zf(e)))}function g3(e,t){return e!=null&&p3(e,t,f3)}var m3=1,v3=2;function y3(e,t){return Fy(e)&&Z_(t)?X_(Qf(e),t):function(n){var i=QW(n,e);return i===void 0&&i===t?g3(n,e):Ly(t,i,m3|v3)}}function C3(e){return function(t){return t==null?void 0:t[e]}}function w3(e){return function(t){return D_(t,e)}}function b3(e){return Fy(e)?C3(Qf(e)):w3(e)}function S3(e){return typeof e=="function"?e:e==null?Cy:typeof e=="object"?go(e)?y3(e[0],e[1]):h3(e):b3(e)}var Ny=function(){return $o.Date.now()},E3="Expected a function",R3=Math.max,D3=Math.min;function Wo(e,t,n){var i,o,s,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(E3);t=vy(t)||0,Zs(n)&&(u=!!n.leading,d="maxWait"in n,s=d?R3(vy(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(E){var x=i,k=o;return i=o=void 0,c=E,r=e.apply(k,x),r}function g(E){return c=E,a=setTimeout(b,t),u?f(E):r}function m(E){var x=E-l,k=E-c,O=t-x;return d?D3(O,s-k):O}function y(E){var x=E-l,k=E-c;return l===void 0||x>=t||x<0||d&&k>=s}function b(){var E=Ny();if(y(E))return S(E);a=setTimeout(b,m(E))}function S(E){return a=void 0,h&&i?f(E):(i=o=void 0,r)}function F(){a!==void 0&&clearTimeout(a),c=0,i=l=o=a=void 0}function C(){return a===void 0?r:S(Ny())}function R(){var E=Ny(),x=y(E);if(i=arguments,o=this,l=E,x){if(a===void 0)return g(l);if(d)return clearTimeout(a),a=setTimeout(b,t),f(l)}return a===void 0&&(a=setTimeout(b,t)),r}return R.cancel=F,R.flush=C,R}function J_(e){return Ys(e)&&Yf(e)}function _3(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var x3="[object Map]",F3="[object Set]",T3=Object.prototype,P3=T3.hasOwnProperty;function I3(e){if(e==null)return!0;if(Yf(e)&&(go(e)||typeof e=="string"||typeof e.splice=="function"||Ju(e)||xy(e)||Zf(e)))return!e.length;var t=mo(e);if(t==x3||t==F3)return!e.size;if(Ry(e))return!S_(e).length;for(var n in e)if(P3.call(e,n))return!1;return!0}var A3=Math.floor,k3=Math.random;function O3(e,t){return e+A3(k3()*(t-e+1))}var M3=parseFloat,L3=Math.min,N3=Math.random;function V3(e,t,n){if(n&&typeof n!="boolean"&&k$(e,t,n)&&(t=n=void 0),n===void 0&&(typeof t=="boolean"?(n=t,t=void 0):typeof e=="boolean"&&(n=e,e=void 0)),e===void 0&&t===void 0?(e=0,t=1):(e=yy(e),t===void 0?(t=e,e=0):t=yy(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=N3();return L3(e+o*(t-e+M3("1e-"+((o+"").length-1))),t)}return O3(e,t)}var B3=1/0,H3=tc&&1/Oy(new tc([,-0]))[1]==B3?function(e){return new tc(e)}:u$,G3=200;function $3(e,t,n){var i=-1,o=E$,s=e.length,r=!0,a=[],l=a;if(s>=G3){var c=t?null:H3(e);if(c)return Oy(c);r=!1,o=U_,l=new nd}else l=t?[]:a;e:for(;++i<s;){var u=e[i],d=t?t(u):u;if(u=u!==0?u:0,r&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(u)}else o(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}var ip=I$(function(e){var t=_3(e);return J_(t)&&(t=void 0),$3(tU(e,1,J_),S3(t))});const vo=(e,t)=>{const n=Di();return{apiServices:q(()=>{var r;const o=n==null?void 0:n.appContext.config.globalProperties,s=(r=t.params)==null?void 0:r.context;if(o!=null&&o.apiServices)return o.apiServices;if(e&&(s!=null&&s.apiServices))return s.apiServices})}},W3=e=>{const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t?decodeURIComponent(t[2]):null};class $a extends Error{}class U3 extends $a{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class z3 extends $a{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class j3 extends $a{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class nc extends $a{}class Q_ extends $a{constructor(t){super(`Invalid unit ${t}`)}}class ci extends $a{}class Nr extends $a{constructor(){super("Zone is an abstract class")}}const et="numeric",Uo="short",Yi="long",op={year:et,month:et,day:et},ex={year:et,month:Uo,day:et},K3={year:et,month:Uo,day:et,weekday:Uo},tx={year:et,month:Yi,day:et},nx={year:et,month:Yi,day:et,weekday:Yi},ix={hour:et,minute:et},ox={hour:et,minute:et,second:et},sx={hour:et,minute:et,second:et,timeZoneName:Uo},rx={hour:et,minute:et,second:et,timeZoneName:Yi},ax={hour:et,minute:et,hourCycle:"h23"},lx={hour:et,minute:et,second:et,hourCycle:"h23"},cx={hour:et,minute:et,second:et,hourCycle:"h23",timeZoneName:Uo},ux={hour:et,minute:et,second:et,hourCycle:"h23",timeZoneName:Yi},dx={year:et,month:et,day:et,hour:et,minute:et},hx={year:et,month:et,day:et,hour:et,minute:et,second:et},fx={year:et,month:Uo,day:et,hour:et,minute:et},px={year:et,month:Uo,day:et,hour:et,minute:et,second:et},q3={year:et,month:Uo,day:et,weekday:Uo,hour:et,minute:et},gx={year:et,month:Yi,day:et,hour:et,minute:et,timeZoneName:Uo},mx={year:et,month:Yi,day:et,hour:et,minute:et,second:et,timeZoneName:Uo},vx={year:et,month:Yi,day:et,weekday:Yi,hour:et,minute:et,timeZoneName:Yi},yx={year:et,month:Yi,day:et,weekday:Yi,hour:et,minute:et,second:et,timeZoneName:Yi};class id{get type(){throw new Nr}get name(){throw new Nr}get ianaName(){return this.name}get isUniversal(){throw new Nr}offsetName(t,n){throw new Nr}formatOffset(t,n){throw new Nr}offset(t){throw new Nr}equals(t){throw new Nr}get isValid(){throw new Nr}}let Vy=null;class sp extends id{static get instance(){return Vy===null&&(Vy=new sp),Vy}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return Ux(t,n,i)}formatOffset(t,n){return ad(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const By=new Map;function Y3(e){let t=By.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),By.set(e,t)),t}const Z3={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function X3(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,s,r,a,l,c,u]=i;return[r,o,s,a,l,c,u]}function J3(e,t){const n=e.formatToParts(t),i=[];for(let o=0;o<n.length;o++){const{type:s,value:r}=n[o],a=Z3[s];s==="era"?i[a]=r:Dt(a)||(i[a]=parseInt(r,10))}return i}const Hy=new Map;class Qs extends id{static create(t){let n=Hy.get(t);return n===void 0&&Hy.set(t,n=new Qs(t)),n}static resetCache(){Hy.clear(),By.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Qs.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return Ux(t,n,i,this.name)}formatOffset(t,n){return ad(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const i=Y3(this.name);let[o,s,r,a,l,c,u]=i.formatToParts?J3(i,n):X3(i,n);a==="BC"&&(o=-Math.abs(o)+1);const h=up({year:o,month:s,day:r,hour:l===24?0:l,minute:c,second:u,millisecond:0});let f=+n;const g=f%1e3;return f-=g>=0?g:1e3+g,(h-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let Cx={};function Q3(e,t={}){const n=JSON.stringify([e,t]);let i=Cx[n];return i||(i=new Intl.ListFormat(e,t),Cx[n]=i),i}const Gy=new Map;function $y(e,t={}){const n=JSON.stringify([e,t]);let i=Gy.get(n);return i===void 0&&(i=new Intl.DateTimeFormat(e,t),Gy.set(n,i)),i}const Wy=new Map;function e4(e,t={}){const n=JSON.stringify([e,t]);let i=Wy.get(n);return i===void 0&&(i=new Intl.NumberFormat(e,t),Wy.set(n,i)),i}const Uy=new Map;function t4(e,t={}){const{base:n,...i}=t,o=JSON.stringify([e,i]);let s=Uy.get(o);return s===void 0&&(s=new Intl.RelativeTimeFormat(e,t),Uy.set(o,s)),s}let od=null;function n4(){return od||(od=new Intl.DateTimeFormat().resolvedOptions().locale,od)}const zy=new Map;function wx(e){let t=zy.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),zy.set(e,t)),t}const jy=new Map;function i4(e){let t=jy.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...bx,...t}),jy.set(e,t)}return t}function o4(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let i,o;try{i=$y(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);i=$y(l).resolvedOptions(),o=l}const{numberingSystem:s,calendar:r}=i;return[o,s,r]}}function s4(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function r4(e){const t=[];for(let n=1;n<=12;n++){const i=tt.utc(2009,n,1);t.push(e(i))}return t}function a4(e){const t=[];for(let n=1;n<=7;n++){const i=tt.utc(2016,11,13+n);t.push(e(i))}return t}function rp(e,t,n,i){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):i(t)}function l4(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||wx(e.locale).numberingSystem==="latn"}class c4{constructor(t,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:o,floor:s,...r}=i;if(!n||Object.keys(r).length>0){const a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=e4(t,a)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):tC(t,3);return Gn(n,this.padTo)}}}class u4{constructor(t,n,i){this.opts=i,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const r=-1*(t.offset/60),a=r>=0?`Etc/GMT+${r}`:`Etc/GMT${r}`;t.offset!==0&&Qs.create(a).valid?(o=a,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const s={...this.opts};s.timeZone=s.timeZone||o,this.dtf=$y(n,s)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:i}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class d4{constructor(t,n,i){this.opts={style:"long",...i},!n&&Hx()&&(this.rtf=t4(t,i))}format(t,n){return this.rtf?this.rtf.format(t,n):k4(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const bx={firstDay:1,minimalDays:4,weekend:[6,7]};class Jt{static fromOpts(t){return Jt.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,i,o,s=!1){const r=t||xn.defaultLocale,a=r||(s?"en-US":n4()),l=n||xn.defaultNumberingSystem,c=i||xn.defaultOutputCalendar,u=Qy(o)||xn.defaultWeekSettings;return new Jt(a,l,c,u,r)}static resetCache(){od=null,Gy.clear(),Wy.clear(),Uy.clear(),zy.clear(),jy.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:i,weekSettings:o}={}){return Jt.create(t,n,i,o)}constructor(t,n,i,o,s){const[r,a,l]=o4(t);this.locale=r,this.numberingSystem=n||a||null,this.outputCalendar=i||l||null,this.weekSettings=o,this.intl=s4(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=l4(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:Jt.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Qy(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return rp(this,t,Kx,()=>{const i=this.intl==="ja"||this.intl.startsWith("ja-");n&=!i;const o=n?{month:t,day:"numeric"}:{month:t},s=n?"format":"standalone";if(!this.monthsCache[s][t]){const r=i?a=>this.dtFormatter(a,o).format():a=>this.extract(a,o,"month");this.monthsCache[s][t]=r4(r)}return this.monthsCache[s][t]})}weekdays(t,n=!1){return rp(this,t,Zx,()=>{const i=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=a4(s=>this.extract(s,i,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return rp(this,void 0,()=>Xx,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[tt.utc(2016,11,13,9),tt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return rp(this,t,Jx,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[tt.utc(-40,1,1),tt.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[t]})}extract(t,n,i){const o=this.dtFormatter(t,n),s=o.formatToParts(),r=s.find(a=>a.type.toLowerCase()===i);return r?r.value:null}numberFormatter(t={}){return new c4(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new u4(t,this.intl,n)}relFormatter(t={}){return new d4(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Q3(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||wx(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Gx()?i4(this.locale):bx}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Ky=null;class _i extends id{static get utcInstance(){return Ky===null&&(Ky=new _i(0)),Ky}static instance(t){return t===0?_i.utcInstance:new _i(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new _i(dp(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ad(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ad(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return ad(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class h4 extends id{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Vr(e,t){if(Dt(e)||e===null)return t;if(e instanceof id)return e;if(y4(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?sp.instance:n==="utc"||n==="gmt"?_i.utcInstance:_i.parseSpecifier(n)||Qs.create(e)}else return Br(e)?_i.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new h4(e)}const qy={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Sx={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},f4=qy.hanidec.replace(/[\[|\]]/g,"").split("");function p4(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(e[n].search(qy.hanidec)!==-1)t+=f4.indexOf(e[n]);else for(const o in Sx){const[s,r]=Sx[o];i>=s&&i<=r&&(t+=i-s)}}return parseInt(t,10)}else return t}const Yy=new Map;function g4(){Yy.clear()}function zo({numberingSystem:e},t=""){const n=e||"latn";let i=Yy.get(n);i===void 0&&(i=new Map,Yy.set(n,i));let o=i.get(t);return o===void 0&&(o=new RegExp(`${qy[n]}${t}`),i.set(t,o)),o}let Ex=()=>Date.now(),Rx="system",Dx=null,_x=null,xx=null,Fx=60,Tx,Px=null;class xn{static get now(){return Ex}static set now(t){Ex=t}static set defaultZone(t){Rx=t}static get defaultZone(){return Vr(Rx,sp.instance)}static get defaultLocale(){return Dx}static set defaultLocale(t){Dx=t}static get defaultNumberingSystem(){return _x}static set defaultNumberingSystem(t){_x=t}static get defaultOutputCalendar(){return xx}static set defaultOutputCalendar(t){xx=t}static get defaultWeekSettings(){return Px}static set defaultWeekSettings(t){Px=Qy(t)}static get twoDigitCutoffYear(){return Fx}static set twoDigitCutoffYear(t){Fx=t%100}static get throwOnInvalid(){return Tx}static set throwOnInvalid(t){Tx=t}static resetCaches(){Jt.resetCache(),Qs.resetCache(),tt.resetCache(),g4()}}class jo{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ix=[0,31,59,90,120,151,181,212,243,273,304,334],Ax=[0,31,60,91,121,152,182,213,244,274,305,335];function yo(e,t){return new jo("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Zy(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const o=i.getUTCDay();return o===0?7:o}function kx(e,t,n){return n+(sd(e)?Ax:Ix)[t-1]}function Ox(e,t){const n=sd(e)?Ax:Ix,i=n.findIndex(s=>s<t),o=t-n[i];return{month:i+1,day:o}}function Xy(e,t){return(e-t+7)%7+1}function ap(e,t=4,n=1){const{year:i,month:o,day:s}=e,r=kx(i,o,s),a=Xy(Zy(i,o,s),n);let l=Math.floor((r-a+14-t)/7),c;return l<1?(c=i-1,l=rd(c,t,n)):l>rd(i,t,n)?(c=i+1,l=1):c=i,{weekYear:c,weekNumber:l,weekday:a,...fp(e)}}function Mx(e,t=4,n=1){const{weekYear:i,weekNumber:o,weekday:s}=e,r=Xy(Zy(i,1,t),n),a=oc(i);let l=o*7+s-r-7+t,c;l<1?(c=i-1,l+=oc(c)):l>a?(c=i+1,l-=oc(i)):c=i;const{month:u,day:d}=Ox(c,l);return{year:c,month:u,day:d,...fp(e)}}function Jy(e){const{year:t,month:n,day:i}=e,o=kx(t,n,i);return{year:t,ordinal:o,...fp(e)}}function Lx(e){const{year:t,ordinal:n}=e,{month:i,day:o}=Ox(t,n);return{year:t,month:i,day:o,...fp(e)}}function Nx(e,t){if(!Dt(e.localWeekday)||!Dt(e.localWeekNumber)||!Dt(e.localWeekYear)){if(!Dt(e.weekday)||!Dt(e.weekNumber)||!Dt(e.weekYear))throw new nc("Cannot mix locale-based week fields with ISO-based week fields");return Dt(e.localWeekday)||(e.weekday=e.localWeekday),Dt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Dt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function m4(e,t=4,n=1){const i=lp(e.weekYear),o=Co(e.weekNumber,1,rd(e.weekYear,t,n)),s=Co(e.weekday,1,7);return i?o?s?!1:yo("weekday",e.weekday):yo("week",e.weekNumber):yo("weekYear",e.weekYear)}function v4(e){const t=lp(e.year),n=Co(e.ordinal,1,oc(e.year));return t?n?!1:yo("ordinal",e.ordinal):yo("year",e.year)}function Vx(e){const t=lp(e.year),n=Co(e.month,1,12),i=Co(e.day,1,cp(e.year,e.month));return t?n?i?!1:yo("day",e.day):yo("month",e.month):yo("year",e.year)}function Bx(e){const{hour:t,minute:n,second:i,millisecond:o}=e,s=Co(t,0,23)||t===24&&n===0&&i===0&&o===0,r=Co(n,0,59),a=Co(i,0,59),l=Co(o,0,999);return s?r?a?l?!1:yo("millisecond",o):yo("second",i):yo("minute",n):yo("hour",t)}function Dt(e){return typeof e>"u"}function Br(e){return typeof e=="number"}function lp(e){return typeof e=="number"&&e%1===0}function y4(e){return typeof e=="string"}function C4(e){return Object.prototype.toString.call(e)==="[object Date]"}function Hx(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Gx(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function w4(e){return Array.isArray(e)?e:[e]}function $x(e,t,n){if(e.length!==0)return e.reduce((i,o)=>{const s=[t(o),o];return i&&n(i[0],s[0])===i[0]?i:s},null)[1]}function b4(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function ic(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qy(e){if(e==null)return null;if(typeof e!="object")throw new ci("Week settings must be an object");if(!Co(e.firstDay,1,7)||!Co(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Co(t,1,7)))throw new ci("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Co(e,t,n){return lp(e)&&e>=t&&e<=n}function S4(e,t){return e-t*Math.floor(e/t)}function Gn(e,t=2){const n=e<0;let i;return n?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function Hr(e){if(!(Dt(e)||e===null||e===""))return parseInt(e,10)}function Wa(e){if(!(Dt(e)||e===null||e===""))return parseFloat(e)}function eC(e){if(!(Dt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function tC(e,t,n="round"){const i=10**t;switch(n){case"expand":return e>0?Math.ceil(e*i)/i:Math.floor(e*i)/i;case"trunc":return Math.trunc(e*i)/i;case"round":return Math.round(e*i)/i;case"floor":return Math.floor(e*i)/i;case"ceil":return Math.ceil(e*i)/i;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function sd(e){return e%4===0&&(e%100!==0||e%400===0)}function oc(e){return sd(e)?366:365}function cp(e,t){const n=S4(t-1,12)+1,i=e+(t-n)/12;return n===2?sd(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function up(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Wx(e,t,n){return-Xy(Zy(e,1,t),n)+t-1}function rd(e,t=4,n=1){const i=Wx(e,t,n),o=Wx(e+1,t,n);return(oc(e)-i+o)/7}function nC(e){return e>99?e:e>xn.twoDigitCutoffYear?1900+e:2e3+e}function Ux(e,t,n,i=null){const o=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(s.timeZone=i);const r={timeZoneName:t,...s},a=new Intl.DateTimeFormat(n,r).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function dp(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-i:i;return n*60+o}function zx(e){const t=Number(e);if(typeof e=="boolean"||e===""||!Number.isFinite(t))throw new ci(`Invalid unit value ${e}`);return t}function hp(e,t){const n={};for(const i in e)if(ic(e,i)){const o=e[i];if(o==null)continue;n[t(i)]=zx(o)}return n}function ad(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Gn(n,2)}:${Gn(i,2)}`;case"narrow":return`${o}${n}${i>0?`:${i}`:""}`;case"techie":return`${o}${Gn(n,2)}${Gn(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function fp(e){return b4(e,["hour","minute","second","millisecond"])}const E4=["January","February","March","April","May","June","July","August","September","October","November","December"],jx=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],R4=["J","F","M","A","M","J","J","A","S","O","N","D"];function Kx(e){switch(e){case"narrow":return[...R4];case"short":return[...jx];case"long":return[...E4];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const qx=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Yx=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],D4=["M","T","W","T","F","S","S"];function Zx(e){switch(e){case"narrow":return[...D4];case"short":return[...Yx];case"long":return[...qx];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Xx=["AM","PM"],_4=["Before Christ","Anno Domini"],x4=["BC","AD"],F4=["B","A"];function Jx(e){switch(e){case"narrow":return[...F4];case"short":return[...x4];case"long":return[..._4];default:return null}}function T4(e){return Xx[e.hour<12?0:1]}function P4(e,t){return Zx(t)[e.weekday-1]}function I4(e,t){return Kx(t)[e.month-1]}function A4(e,t){return Jx(t)[e.year<0?0:1]}function k4(e,t,n="always",i=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&s){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const r=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,c=o[e],u=i?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return r?`${a} ${u} ago`:`in ${a} ${u}`}function Qx(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const O4={D:op,DD:ex,DDD:tx,DDDD:nx,t:ix,tt:ox,ttt:sx,tttt:rx,T:ax,TT:lx,TTT:cx,TTTT:ux,f:dx,ff:fx,fff:gx,ffff:vx,F:hx,FF:px,FFF:mx,FFFF:yx};class ui{static create(t,n={}){return new ui(t,n)}static parseFormat(t){let n=null,i="",o=!1;const s=[];for(let r=0;r<t.length;r++){const a=t.charAt(r);a==="'"?((i.length>0||o)&&s.push({literal:o||/^\s+$/.test(i),val:i===""?"'":i}),n=null,i="",o=!o):o||a===n?i+=a:(i.length>0&&s.push({literal:/^\s+$/.test(i),val:i}),i=a,n=a)}return i.length>0&&s.push({literal:o||/^\s+$/.test(i),val:i}),s}static macroTokenToFormatOpts(t){return O4[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0,i=void 0){if(this.opts.forceSimple)return Gn(t,n);const o={...this.opts};return n>0&&(o.padTo=n),i&&(o.signDisplay=i),this.loc.numberFormatter(o).format(t)}formatDateTimeFromString(t,n){const i=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(f,g)=>this.loc.extract(t,f,g),r=f=>t.isOffsetFixed&&t.offset===0&&f.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,f.format):"",a=()=>i?T4(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(f,g)=>i?I4(t,f):s(g?{month:f}:{month:f,day:"numeric"},"month"),c=(f,g)=>i?P4(t,f):s(g?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),u=f=>{const g=ui.macroTokenToFormatOpts(f);return g?this.formatWithSystemDefault(t,g):f},d=f=>i?A4(t,f):s({era:f},"era"),h=f=>{switch(f){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return o?s({day:"numeric"},"day"):this.num(t.day);case"dd":return o?s({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?s({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?s({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?s({month:"numeric"},"month"):this.num(t.month);case"MM":return o?s({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?s({year:"numeric"},"year"):this.num(t.year);case"yy":return o?s({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?s({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?s({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(f)}};return Qx(ui.parseFormat(n),h)}formatDurationFromString(t,n){const i=this.opts.signMode==="negativeLargestOnly"?-1:1,o=u=>{switch(u[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},s=(u,d)=>h=>{const f=o(h);if(f){const g=d.isNegativeDuration&&f!==d.largestUnit?i:1;let m;return this.opts.signMode==="negativeLargestOnly"&&f!==d.largestUnit?m="never":this.opts.signMode==="all"?m="always":m="auto",this.num(u.get(f)*g,h.length,m)}else return h},r=ui.parseFormat(n),a=r.reduce((u,{literal:d,val:h})=>d?u:u.concat(h),[]),l=t.shiftTo(...a.map(o).filter(u=>u)),c={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return Qx(r,s(l,c))}}const eF=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function sc(...e){const t=e.reduce((n,i)=>n+i.source,"");return RegExp(`^${t}$`)}function rc(...e){return t=>e.reduce(([n,i,o],s)=>{const[r,a,l]=s(t,o);return[{...n,...r},a||i,l]},[{},null,1]).slice(0,2)}function ac(e,...t){if(e==null)return[null,null];for(const[n,i]of t){const o=n.exec(e);if(o)return i(o)}return[null,null]}function tF(...e){return(t,n)=>{const i={};let o;for(o=0;o<e.length;o++)i[e[o]]=Hr(t[n+o]);return[i,null,n+o]}}const nF=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,M4=`(?:${nF.source}?(?:\\[(${eF.source})\\])?)?`,iC=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,iF=RegExp(`${iC.source}${M4}`),oC=RegExp(`(?:[Tt]${iF.source})?`),L4=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,N4=/(\d{4})-?W(\d\d)(?:-?(\d))?/,V4=/(\d{4})-?(\d{3})/,B4=tF("weekYear","weekNumber","weekDay"),H4=tF("year","ordinal"),G4=/(\d{4})-(\d\d)-(\d\d)/,oF=RegExp(`${iC.source} ?(?:${nF.source}|(${eF.source}))?`),$4=RegExp(`(?: ${oF.source})?`);function lc(e,t,n){const i=e[t];return Dt(i)?n:Hr(i)}function W4(e,t){return[{year:lc(e,t),month:lc(e,t+1,1),day:lc(e,t+2,1)},null,t+3]}function cc(e,t){return[{hours:lc(e,t,0),minutes:lc(e,t+1,0),seconds:lc(e,t+2,0),milliseconds:eC(e[t+3])},null,t+4]}function ld(e,t){const n=!e[t]&&!e[t+1],i=dp(e[t+1],e[t+2]),o=n?null:_i.instance(i);return[{},o,t+3]}function cd(e,t){const n=e[t]?Qs.create(e[t]):null;return[{},n,t+1]}const U4=RegExp(`^T?${iC.source}$`),z4=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function j4(e){const[t,n,i,o,s,r,a,l,c]=e,u=t[0]==="-",d=l&&l[0]==="-",h=(f,g=!1)=>f!==void 0&&(g||f&&u)?-f:f;return[{years:h(Wa(n)),months:h(Wa(i)),weeks:h(Wa(o)),days:h(Wa(s)),hours:h(Wa(r)),minutes:h(Wa(a)),seconds:h(Wa(l),l==="-0"),milliseconds:h(eC(c),d)}]}const K4={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function sC(e,t,n,i,o,s,r){const a={year:t.length===2?nC(Hr(t)):Hr(t),month:jx.indexOf(n)+1,day:Hr(i),hour:Hr(o),minute:Hr(s)};return r&&(a.second=Hr(r)),e&&(a.weekday=e.length>3?qx.indexOf(e)+1:Yx.indexOf(e)+1),a}const q4=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Y4(e){const[,t,n,i,o,s,r,a,l,c,u,d]=e,h=sC(t,o,i,n,s,r,a);let f;return l?f=K4[l]:c?f=0:f=dp(u,d),[h,new _i(f)]}function Z4(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const X4=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,J4=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Q4=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function sF(e){const[,t,n,i,o,s,r,a]=e;return[sC(t,o,i,n,s,r,a),_i.utcInstance]}function e6(e){const[,t,n,i,o,s,r,a]=e;return[sC(t,a,n,i,o,s,r),_i.utcInstance]}const t6=sc(L4,oC),n6=sc(N4,oC),i6=sc(V4,oC),o6=sc(iF),rF=rc(W4,cc,ld,cd),s6=rc(B4,cc,ld,cd),r6=rc(H4,cc,ld,cd),a6=rc(cc,ld,cd);function l6(e){return ac(e,[t6,rF],[n6,s6],[i6,r6],[o6,a6])}function c6(e){return ac(Z4(e),[q4,Y4])}function u6(e){return ac(e,[X4,sF],[J4,sF],[Q4,e6])}function d6(e){return ac(e,[z4,j4])}const h6=rc(cc);function f6(e){return ac(e,[U4,h6])}const p6=sc(G4,$4),g6=sc(oF),m6=rc(cc,ld,cd);function v6(e){return ac(e,[p6,rF],[g6,m6])}const aF="Invalid Duration",lF={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},y6={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...lF},wo=146097/400,uc=146097/4800,C6={years:{quarters:4,months:12,weeks:wo/7,days:wo,hours:wo*24,minutes:wo*24*60,seconds:wo*24*60*60,milliseconds:wo*24*60*60*1e3},quarters:{months:3,weeks:wo/28,days:wo/4,hours:wo*24/4,minutes:wo*24*60/4,seconds:wo*24*60*60/4,milliseconds:wo*24*60*60*1e3/4},months:{weeks:uc/7,days:uc,hours:uc*24,minutes:uc*24*60,seconds:uc*24*60*60,milliseconds:uc*24*60*60*1e3},...lF},Ua=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],w6=Ua.slice(0).reverse();function er(e,t,n=!1){const i={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new $t(i)}function cF(e,t){let n=t.milliseconds??0;for(const i of w6.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function uF(e,t){const n=cF(e,t)<0?-1:1;Ua.reduceRight((i,o)=>{if(Dt(t[o]))return i;if(i){const s=t[i]*n,r=e[o][i],a=Math.floor(s/r);t[o]+=a*n,t[i]-=a*r*n}return o},null),Ua.reduce((i,o)=>{if(Dt(t[o]))return i;if(i){const s=t[i]%1;t[i]-=s,t[o]+=s*e[i][o]}return o},null)}function dF(e){const t={};for(const[n,i]of Object.entries(e))i!==0&&(t[n]=i);return t}class $t{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let i=n?C6:y6;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||Jt.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,n){return $t.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new ci(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new $t({values:hp(t,$t.normalizeUnit),loc:Jt.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Br(t))return $t.fromMillis(t);if($t.isDuration(t))return t;if(typeof t=="object")return $t.fromObject(t);throw new ci(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[i]=d6(t);return i?$t.fromObject(i,n):$t.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[i]=f6(t);return i?$t.fromObject(i,n):$t.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new ci("need to specify a reason the Duration is invalid");const i=t instanceof jo?t:new jo(t,n);if(xn.throwOnInvalid)throw new j3(i);return new $t({invalid:i})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new Q_(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?ui.create(this.loc,i).formatDurationFromString(this,t):aF}toHuman(t={}){if(!this.isValid)return aF;const n=t.showZeros!==!1,i=Ua.map(o=>{const s=this.values[o];return Dt(s)||s===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:o.slice(0,-1)}).format(s)}).filter(o=>o);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(i)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=tC(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},tt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?cF(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=$t.fromDurationLike(t),i={};for(const o of Ua)(ic(n.values,o)||ic(this.values,o))&&(i[o]=n.get(o)+this.get(o));return er(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const n=$t.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const i of Object.keys(this.values))n[i]=zx(t(this.values[i],i));return er(this,{values:n},!0)}get(t){return this[$t.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...hp(t,$t.normalizeUnit)};return er(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:i,matrix:o}={}){const r={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:i};return er(this,r)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return uF(this.matrix,t),er(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=dF(this.normalize().shiftToAll().toObject());return er(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(r=>$t.normalizeUnit(r));const n={},i={},o=this.toObject();let s;for(const r of Ua)if(t.indexOf(r)>=0){s=r;let a=0;for(const c in i)a+=this.matrix[c][r]*i[c],i[c]=0;Br(o[r])&&(a+=o[r]);const l=Math.trunc(a);n[r]=l,i[r]=(a*1e3-l*1e3)/1e3}else Br(o[r])&&(i[r]=o[r]);for(const r in i)i[r]!==0&&(n[s]+=r===s?i[r]:i[r]/this.matrix[s][r]);return uF(this.matrix,n),er(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return er(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;const t=dF(this.values);return er(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(i,o){return i===void 0||i===0?o===void 0||o===0:i===o}for(const i of Ua)if(!n(this.values[i],t.values[i]))return!1;return!0}}const dc="Invalid Interval";function b6(e,t){return!e||!e.isValid?Fn.invalid("missing or invalid start"):!t||!t.isValid?Fn.invalid("missing or invalid end"):t<e?Fn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Fn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new ci("need to specify a reason the Interval is invalid");const i=t instanceof jo?t:new jo(t,n);if(xn.throwOnInvalid)throw new z3(i);return new Fn({invalid:i})}static fromDateTimes(t,n){const i=hd(t),o=hd(n),s=b6(i,o);return s??new Fn({start:i,end:o})}static after(t,n){const i=$t.fromDurationLike(n),o=hd(t);return Fn.fromDateTimes(o,o.plus(i))}static before(t,n){const i=$t.fromDurationLike(n),o=hd(t);return Fn.fromDateTimes(o.minus(i),o)}static fromISO(t,n){const[i,o]=(t||"").split("/",2);if(i&&o){let s,r;try{s=tt.fromISO(i,n),r=s.isValid}catch{r=!1}let a,l;try{a=tt.fromISO(o,n),l=a.isValid}catch{l=!1}if(r&&l)return Fn.fromDateTimes(s,a);if(r){const c=$t.fromISO(o,n);if(c.isValid)return Fn.after(s,c)}else if(l){const c=$t.fromISO(i,n);if(c.isValid)return Fn.before(a,c)}}return Fn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const i=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:i.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(i,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Fn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(hd).filter(r=>this.contains(r)).sort((r,a)=>r.toMillis()-a.toMillis()),i=[];let{s:o}=this,s=0;for(;o<this.e;){const r=n[s]||this.e,a=+r>+this.e?this.e:r;i.push(Fn.fromDateTimes(o,a)),o=a,s+=1}return i}splitBy(t){const n=$t.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,o=1,s;const r=[];for(;i<this.e;){const a=this.start.plus(n.mapUnits(l=>l*o));s=+a>+this.e?this.e:a,r.push(Fn.fromDateTimes(i,s)),i=s,o+=1}return r}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return n>=i?null:Fn.fromDateTimes(n,i)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return Fn.fromDateTimes(n,i)}static merge(t){const[n,i]=t.sort((o,s)=>o.s-s.s).reduce(([o,s],r)=>s?s.overlaps(r)||s.abutsStart(r)?[o,s.union(r)]:[o.concat([s]),r]:[o,r],[[],null]);return i&&n.push(i),n}static xor(t){let n=null,i=0;const o=[],s=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),r=Array.prototype.concat(...s),a=r.sort((l,c)=>l.time-c.time);for(const l of a)i+=l.type==="s"?1:-1,i===1?n=l.time:(n&&+n!=+l.time&&o.push(Fn.fromDateTimes(n,l.time)),n=null);return Fn.merge(o)}difference(...t){return Fn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:dc}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=op,n={}){return this.isValid?ui.create(this.s.loc.clone(n),t).formatInterval(this):dc}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:dc}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:dc}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:dc}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:dc}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):$t.invalid(this.invalidReason)}mapEndpoints(t){return Fn.fromDateTimes(t(this.s),t(this.e))}}class hc{static hasDST(t=xn.defaultZone){const n=tt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Qs.isValidZone(t)}static normalizeZone(t){return Vr(t,xn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||Jt.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||Jt.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||Jt.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null,outputCalendar:s="gregory"}={}){return(o||Jt.create(n,i,s)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null,outputCalendar:s="gregory"}={}){return(o||Jt.create(n,i,s)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null}={}){return(o||Jt.create(n,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null}={}){return(o||Jt.create(n,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Jt.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Jt.create(n,null,"gregory").eras(t)}static features(){return{relative:Hx(),localeWeek:Gx()}}}function hF(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor($t.fromMillis(i).as("days"))}function S6(e,t,n){const i=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=hF(l,c);return(u-u%7)/7}],["days",hF]],o={},s=e;let r,a;for(const[l,c]of i)n.indexOf(l)>=0&&(r=l,o[l]=c(e,t),a=s.plus(o),a>t?(o[l]--,e=s.plus(o),e>t&&(a=e,o[l]--,e=s.plus(o))):e=a);return[e,o,a,r]}function E6(e,t,n,i){let[o,s,r,a]=S6(e,t,n);const l=t-o,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(r<t&&(r=o.plus({[a]:1})),r!==o&&(s[a]=(s[a]||0)+l/(r-o)));const u=$t.fromObject(s,i);return c.length>0?$t.fromMillis(l,i).shiftTo(...c).plus(u):u}const R6="missing Intl.DateTimeFormat.formatToParts support";function jt(e,t=n=>n){return{regex:e,deser:([n])=>t(p4(n))}}const fF="[  ]",pF=new RegExp(fF,"g");function D6(e){return e.replace(/\./g,"\\.?").replace(pF,fF)}function gF(e){return e.replace(/\./g,"").replace(pF," ").toLowerCase()}function Ko(e,t){return e===null?null:{regex:RegExp(e.map(D6).join("|")),deser:([n])=>e.findIndex(i=>gF(n)===gF(i))+t}}function mF(e,t){return{regex:e,deser:([,n,i])=>dp(n,i),groups:t}}function pp(e){return{regex:e,deser:([t])=>t}}function _6(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function x6(e,t){const n=zo(t),i=zo(t,"{2}"),o=zo(t,"{3}"),s=zo(t,"{4}"),r=zo(t,"{6}"),a=zo(t,"{1,2}"),l=zo(t,"{1,3}"),c=zo(t,"{1,6}"),u=zo(t,"{1,9}"),d=zo(t,"{2,4}"),h=zo(t,"{4,6}"),f=y=>({regex:RegExp(_6(y.val)),deser:([b])=>b,literal:!0}),m=(y=>{if(e.literal)return f(y);switch(y.val){case"G":return Ko(t.eras("short"),0);case"GG":return Ko(t.eras("long"),0);case"y":return jt(c);case"yy":return jt(d,nC);case"yyyy":return jt(s);case"yyyyy":return jt(h);case"yyyyyy":return jt(r);case"M":return jt(a);case"MM":return jt(i);case"MMM":return Ko(t.months("short",!0),1);case"MMMM":return Ko(t.months("long",!0),1);case"L":return jt(a);case"LL":return jt(i);case"LLL":return Ko(t.months("short",!1),1);case"LLLL":return Ko(t.months("long",!1),1);case"d":return jt(a);case"dd":return jt(i);case"o":return jt(l);case"ooo":return jt(o);case"HH":return jt(i);case"H":return jt(a);case"hh":return jt(i);case"h":return jt(a);case"mm":return jt(i);case"m":return jt(a);case"q":return jt(a);case"qq":return jt(i);case"s":return jt(a);case"ss":return jt(i);case"S":return jt(l);case"SSS":return jt(o);case"u":return pp(u);case"uu":return pp(a);case"uuu":return jt(n);case"a":return Ko(t.meridiems(),0);case"kkkk":return jt(s);case"kk":return jt(d,nC);case"W":return jt(a);case"WW":return jt(i);case"E":case"c":return jt(n);case"EEE":return Ko(t.weekdays("short",!1),1);case"EEEE":return Ko(t.weekdays("long",!1),1);case"ccc":return Ko(t.weekdays("short",!0),1);case"cccc":return Ko(t.weekdays("long",!0),1);case"Z":case"ZZ":return mF(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return mF(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return pp(/[a-z_+-/]{1,256}?/i);case" ":return pp(/[^\S\n\r]/);default:return f(y)}})(e)||{invalidReason:R6};return m.token=e,m}const F6={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function T6(e,t,n){const{type:i,value:o}=e;if(i==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const s=t[i];let r=i;i==="hour"&&(t.hour12!=null?r=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?r="hour12":r="hour24":r=n.hour12?"hour12":"hour24");let a=F6[r];if(typeof a=="object"&&(a=a[s]),a)return{literal:!1,val:a}}function P6(e){return[`^${e.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,e]}function I6(e,t,n){const i=e.match(t);if(i){const o={};let s=1;for(const r in n)if(ic(n,r)){const a=n[r],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(o[a.token.val[0]]=a.deser(i.slice(s,s+l))),s+=l}return[i,o]}else return[i,{}]}function A6(e){const t=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,i;return Dt(e.z)||(n=Qs.create(e.z)),Dt(e.Z)||(n||(n=new _i(e.Z)),i=e.Z),Dt(e.q)||(e.M=(e.q-1)*3+1),Dt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Dt(e.u)||(e.S=eC(e.u)),[Object.keys(e).reduce((s,r)=>{const a=t(r);return a&&(s[a]=e[r]),s},{}),n,i]}let rC=null;function k6(){return rC||(rC=tt.fromMillis(1555555555555)),rC}function O6(e,t){if(e.literal)return e;const n=ui.macroTokenToFormatOpts(e.val),i=wF(n,t);return i==null||i.includes(void 0)?e:i}function vF(e,t){return Array.prototype.concat(...e.map(n=>O6(n,t)))}class yF{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=vF(ui.parseFormat(n),t),this.units=this.tokens.map(i=>x6(i,t)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){const[i,o]=P6(this.units);this.regex=RegExp(i,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,i]=I6(t,this.regex,this.handlers),[o,s,r]=i?A6(i):[null,null,void 0];if(ic(i,"a")&&ic(i,"H"))throw new nc("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:i,result:o,zone:s,specificOffset:r}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function CF(e,t,n){return new yF(e,n).explainFromTokens(t)}function M6(e,t,n){const{result:i,zone:o,specificOffset:s,invalidReason:r}=CF(e,t,n);return[i,o,s,r]}function wF(e,t){if(!e)return null;const i=ui.create(t,e).dtFormatter(k6()),o=i.formatToParts(),s=i.resolvedOptions();return o.map(r=>T6(r,e,s))}const aC="Invalid DateTime",bF=864e13;function ud(e){return new jo("unsupported zone",`the zone "${e.name}" is not supported`)}function lC(e){return e.weekData===null&&(e.weekData=ap(e.c)),e.weekData}function cC(e){return e.localWeekData===null&&(e.localWeekData=ap(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function za(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new tt({...n,...t,old:n})}function SF(e,t,n){let i=e-t*60*1e3;const o=n.offset(i);if(t===o)return[i,t];i-=(o-t)*60*1e3;const s=n.offset(i);return o===s?[i,o]:[e-Math.min(o,s)*60*1e3,Math.max(o,s)]}function gp(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function mp(e,t,n){return SF(up(e),t,n)}function EF(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,s={...e.c,year:i,month:o,day:Math.min(e.c.day,cp(i,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},r=$t.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=up(s);let[l,c]=SF(a,n,e.zone);return r!==0&&(l+=r,c=e.zone.offset(l)),{ts:l,o:c}}function fc(e,t,n,i,o,s){const{setZone:r,zone:a}=n;if(e&&Object.keys(e).length!==0||t){const l=t||a,c=tt.fromObject(e,{...n,zone:l,specificOffset:s});return r?c:c.setZone(a)}else return tt.invalid(new jo("unparsable",`the input "${o}" can't be parsed as ${i}`))}function vp(e,t,n=!0){return e.isValid?ui.create(Jt.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function uC(e,t,n){const i=e.c.year>9999||e.c.year<0;let o="";if(i&&e.c.year>=0&&(o+="+"),o+=Gn(e.c.year,i?6:4),n==="year")return o;if(t){if(o+="-",o+=Gn(e.c.month),n==="month")return o;o+="-"}else if(o+=Gn(e.c.month),n==="month")return o;return o+=Gn(e.c.day),o}function RF(e,t,n,i,o,s,r){let a=!n||e.c.millisecond!==0||e.c.second!==0,l="";switch(r){case"day":case"month":case"year":break;default:if(l+=Gn(e.c.hour),r==="hour")break;if(t){if(l+=":",l+=Gn(e.c.minute),r==="minute")break;a&&(l+=":",l+=Gn(e.c.second))}else{if(l+=Gn(e.c.minute),r==="minute")break;a&&(l+=Gn(e.c.second))}if(r==="second")break;a&&(!i||e.c.millisecond!==0)&&(l+=".",l+=Gn(e.c.millisecond,3))}return o&&(e.isOffsetFixed&&e.offset===0&&!s?l+="Z":e.o<0?(l+="-",l+=Gn(Math.trunc(-e.o/60)),l+=":",l+=Gn(Math.trunc(-e.o%60))):(l+="+",l+=Gn(Math.trunc(e.o/60)),l+=":",l+=Gn(Math.trunc(e.o%60)))),s&&(l+="["+e.zone.ianaName+"]"),l}const DF={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},L6={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},N6={ordinal:1,hour:0,minute:0,second:0,millisecond:0},yp=["year","month","day","hour","minute","second","millisecond"],V6=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],B6=["year","ordinal","hour","minute","second","millisecond"];function Cp(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Q_(e);return t}function _F(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Cp(e)}}function H6(e){if(dd===void 0&&(dd=xn.now()),e.type!=="iana")return e.offset(dd);const t=e.name;let n=dC.get(t);return n===void 0&&(n=e.offset(dd),dC.set(t,n)),n}function xF(e,t){const n=Vr(t.zone,xn.defaultZone);if(!n.isValid)return tt.invalid(ud(n));const i=Jt.fromObject(t);let o,s;if(Dt(e.year))o=xn.now();else{for(const l of yp)Dt(e[l])&&(e[l]=DF[l]);const r=Vx(e)||Bx(e);if(r)return tt.invalid(r);const a=H6(n);[o,s]=mp(e,a,n)}return new tt({ts:o,zone:n,loc:i,o:s})}function FF(e,t,n){const i=Dt(n.round)?!0:n.round,o=Dt(n.rounding)?"trunc":n.rounding,s=(a,l)=>(a=tC(a,i||n.calendary?0:2,n.calendary?"round":o),t.loc.clone(n).relFormatter(n).format(a,l)),r=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return s(r(n.unit),n.unit);for(const a of n.units){const l=r(a);if(Math.abs(l)>=1)return s(l,a)}return s(e>t?-0:0,n.units[n.units.length-1])}function TF(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let dd;const dC=new Map;class tt{constructor(t){const n=t.zone||xn.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new jo("invalid input"):null)||(n.isValid?null:ud(n));this.ts=Dt(t.ts)?xn.now():t.ts;let o=null,s=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,s]=[t.old.c,t.old.o];else{const a=Br(t.o)&&!t.old?t.o:n.offset(this.ts);o=gp(this.ts,a),i=Number.isNaN(o.year)?new jo("invalid input"):null,o=i?null:o,s=i?null:a}this._zone=n,this.loc=t.loc||Jt.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=o,this.o=s,this.isLuxonDateTime=!0}static now(){return new tt({})}static local(){const[t,n]=TF(arguments),[i,o,s,r,a,l,c]=n;return xF({year:i,month:o,day:s,hour:r,minute:a,second:l,millisecond:c},t)}static utc(){const[t,n]=TF(arguments),[i,o,s,r,a,l,c]=n;return t.zone=_i.utcInstance,xF({year:i,month:o,day:s,hour:r,minute:a,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const i=C4(t)?t.valueOf():NaN;if(Number.isNaN(i))return tt.invalid("invalid input");const o=Vr(n.zone,xn.defaultZone);return o.isValid?new tt({ts:i,zone:o,loc:Jt.fromObject(n)}):tt.invalid(ud(o))}static fromMillis(t,n={}){if(Br(t))return t<-bF||t>bF?tt.invalid("Timestamp out of range"):new tt({ts:t,zone:Vr(n.zone,xn.defaultZone),loc:Jt.fromObject(n)});throw new ci(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Br(t))return new tt({ts:t*1e3,zone:Vr(n.zone,xn.defaultZone),loc:Jt.fromObject(n)});throw new ci("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const i=Vr(n.zone,xn.defaultZone);if(!i.isValid)return tt.invalid(ud(i));const o=Jt.fromObject(n),s=hp(t,_F),{minDaysInFirstWeek:r,startOfWeek:a}=Nx(s,o),l=xn.now(),c=Dt(n.specificOffset)?i.offset(l):n.specificOffset,u=!Dt(s.ordinal),d=!Dt(s.year),h=!Dt(s.month)||!Dt(s.day),f=d||h,g=s.weekYear||s.weekNumber;if((f||u)&&g)throw new nc("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new nc("Can't mix ordinal dates with month/day");const m=g||s.weekday&&!f;let y,b,S=gp(l,c);m?(y=V6,b=L6,S=ap(S,r,a)):u?(y=B6,b=N6,S=Jy(S)):(y=yp,b=DF);let F=!1;for(const A of y){const D=s[A];Dt(D)?F?s[A]=b[A]:s[A]=S[A]:F=!0}const C=m?m4(s,r,a):u?v4(s):Vx(s),R=C||Bx(s);if(R)return tt.invalid(R);const E=m?Mx(s,r,a):u?Lx(s):s,[x,k]=mp(E,c,i),O=new tt({ts:x,zone:i,o:k,loc:o});return s.weekday&&f&&t.weekday!==O.weekday?tt.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${O.toISO()}`):O.isValid?O:tt.invalid(O.invalid)}static fromISO(t,n={}){const[i,o]=l6(t);return fc(i,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[i,o]=c6(t);return fc(i,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[i,o]=u6(t);return fc(i,o,n,"HTTP",n)}static fromFormat(t,n,i={}){if(Dt(t)||Dt(n))throw new ci("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:s=null}=i,r=Jt.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0}),[a,l,c,u]=M6(r,t,n);return u?tt.invalid(u):fc(a,l,i,`format ${n}`,t,c)}static fromString(t,n,i={}){return tt.fromFormat(t,n,i)}static fromSQL(t,n={}){const[i,o]=v6(t);return fc(i,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new ci("need to specify a reason the DateTime is invalid");const i=t instanceof jo?t:new jo(t,n);if(xn.throwOnInvalid)throw new U3(i);return new tt({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const i=wF(t,Jt.fromObject(n));return i?i.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return vF(ui.parseFormat(t),Jt.fromObject(n)).map(o=>o.val).join("")}static resetCache(){dd=void 0,dC.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?lC(this).weekYear:NaN}get weekNumber(){return this.isValid?lC(this).weekNumber:NaN}get weekday(){return this.isValid?lC(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?cC(this).weekday:NaN}get localWeekNumber(){return this.isValid?cC(this).weekNumber:NaN}get localWeekYear(){return this.isValid?cC(this).weekYear:NaN}get ordinal(){return this.isValid?Jy(this.c).ordinal:NaN}get monthShort(){return this.isValid?hc.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?hc.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?hc.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?hc.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,i=up(this.c),o=this.zone.offset(i-t),s=this.zone.offset(i+t),r=this.zone.offset(i-o*n),a=this.zone.offset(i-s*n);if(r===a)return[this];const l=i-r*n,c=i-a*n,u=gp(l,r),d=gp(c,a);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[za(this,{ts:l}),za(this,{ts:c})]:[this]}get isInLeapYear(){return sd(this.year)}get daysInMonth(){return cp(this.year,this.month)}get daysInYear(){return this.isValid?oc(this.year):NaN}get weeksInWeekYear(){return this.isValid?rd(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?rd(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:i,calendar:o}=ui.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(_i.instance(t),n)}toLocal(){return this.setZone(xn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(t=Vr(t,xn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||i){const s=t.offset(this.ts),r=this.toObject();[o]=mp(r,s,t)}return za(this,{ts:o,zone:t})}else return tt.invalid(ud(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:i}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i});return za(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=hp(t,_F),{minDaysInFirstWeek:i,startOfWeek:o}=Nx(n,this.loc),s=!Dt(n.weekYear)||!Dt(n.weekNumber)||!Dt(n.weekday),r=!Dt(n.ordinal),a=!Dt(n.year),l=!Dt(n.month)||!Dt(n.day),c=a||l,u=n.weekYear||n.weekNumber;if((c||r)&&u)throw new nc("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new nc("Can't mix ordinal dates with month/day");let d;s?d=Mx({...ap(this.c,i,o),...n},i,o):Dt(n.ordinal)?(d={...this.toObject(),...n},Dt(n.day)&&(d.day=Math.min(cp(d.year,d.month),d.day))):d=Lx({...Jy(this.c),...n});const[h,f]=mp(d,this.o,this.zone);return za(this,{ts:h,o:f})}plus(t){if(!this.isValid)return this;const n=$t.fromDurationLike(t);return za(this,EF(this,n))}minus(t){if(!this.isValid)return this;const n=$t.fromDurationLike(t).negate();return za(this,EF(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const i={},o=$t.normalizeUnit(t);switch(o){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(o==="weeks")if(n){const s=this.loc.getStartOfWeek(),{weekday:r}=this;r<s&&(i.weekNumber=this.weekNumber-1),i.weekday=s}else i.weekday=1;if(o==="quarters"){const s=Math.ceil(this.month/3);i.month=(s-1)*3+1}return this.set(i)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?ui.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):aC}toLocaleString(t=op,n={}){return this.isValid?ui.create(this.loc.clone(n),t).formatDateTime(this):aC}toLocaleParts(t={}){return this.isValid?ui.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:o=!0,extendedZone:s=!1,precision:r="milliseconds"}={}){if(!this.isValid)return null;r=Cp(r);const a=t==="extended";let l=uC(this,a,r);return yp.indexOf(r)>=3&&(l+="T"),l+=RF(this,a,n,i,o,s,r),l}toISODate({format:t="extended",precision:n="day"}={}){return this.isValid?uC(this,t==="extended",Cp(n)):null}toISOWeekDate(){return vp(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:o=!1,extendedZone:s=!1,format:r="extended",precision:a="milliseconds"}={}){return this.isValid?(a=Cp(a),(o&&yp.indexOf(a)>=3?"T":"")+RF(this,r==="extended",n,t,i,s,a)):null}toRFC2822(){return vp(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return vp(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?uC(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(i&&(o+=" "),n?o+="z":t&&(o+="ZZ")),vp(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():aC}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",i={}){if(!this.isValid||!t.isValid)return $t.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...i},s=w4(n).map($t.normalizeUnit),r=t.valueOf()>this.valueOf(),a=r?this:t,l=r?t:this,c=E6(a,l,s,o);return r?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(tt.now(),t,n)}until(t){return this.isValid?Fn.fromDateTimes(this,t):this}hasSame(t,n,i){if(!this.isValid)return!1;const o=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(n,i)<=o&&o<=s.endOf(n,i)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||tt.fromObject({},{zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],s=t.unit;return Array.isArray(t.unit)&&(o=t.unit,s=void 0),FF(n,this.plus(i),{...t,numeric:"always",units:o,unit:s})}toRelativeCalendar(t={}){return this.isValid?FF(t.base||tt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(tt.isDateTime))throw new ci("min requires all arguments be DateTimes");return $x(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(tt.isDateTime))throw new ci("max requires all arguments be DateTimes");return $x(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,i={}){const{locale:o=null,numberingSystem:s=null}=i,r=Jt.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0});return CF(r,t,n)}static fromStringExplain(t,n,i={}){return tt.fromFormatExplain(t,n,i)}static buildFormatParser(t,n={}){const{locale:i=null,numberingSystem:o=null}=n,s=Jt.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return new yF(s,t)}static fromFormatParser(t,n,i={}){if(Dt(t)||Dt(n))throw new ci("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:s=null}=i,r=Jt.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0});if(!r.equals(n.locale))throw new ci(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${n.locale}`);const{result:a,zone:l,specificOffset:c,invalidReason:u}=n.explainFromTokens(t);return u?tt.invalid(u):fc(a,l,i,`format ${n.format}`,t,c)}static get DATE_SHORT(){return op}static get DATE_MED(){return ex}static get DATE_MED_WITH_WEEKDAY(){return K3}static get DATE_FULL(){return tx}static get DATE_HUGE(){return nx}static get TIME_SIMPLE(){return ix}static get TIME_WITH_SECONDS(){return ox}static get TIME_WITH_SHORT_OFFSET(){return sx}static get TIME_WITH_LONG_OFFSET(){return rx}static get TIME_24_SIMPLE(){return ax}static get TIME_24_WITH_SECONDS(){return lx}static get TIME_24_WITH_SHORT_OFFSET(){return cx}static get TIME_24_WITH_LONG_OFFSET(){return ux}static get DATETIME_SHORT(){return dx}static get DATETIME_SHORT_WITH_SECONDS(){return hx}static get DATETIME_MED(){return fx}static get DATETIME_MED_WITH_SECONDS(){return px}static get DATETIME_MED_WITH_WEEKDAY(){return q3}static get DATETIME_FULL(){return gx}static get DATETIME_FULL_WITH_SECONDS(){return mx}static get DATETIME_HUGE(){return vx}static get DATETIME_HUGE_WITH_SECONDS(){return yx}}function hd(e){if(tt.isDateTime(e))return e;if(e&&e.valueOf&&Br(e.valueOf()))return tt.fromJSDate(e);if(e&&typeof e=="object")return tt.fromObject(e);throw new ci(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const PF="account.last_prefered_timezone",wp=300;function fd(e){if(!e)return null;if(tt.isDateTime(e))return e;if(e instanceof Date){const t=tt.fromJSDate(e);return t.isValid?t:null}if(typeof e=="number"){const t=tt.fromMillis(e);return t.isValid?t:null}if(typeof e=="string"){let t=tt.fromISO(e);return t.isValid||(t=tt.fromRFC2822(e)),t.isValid?t:null}return null}function IF(e,t,n){const i=fd(e);if(!i)return"";const o=n?i.setZone(n):i;return o.isValid?o.toFormat(t):""}function G6(e,t){if(!e)return"";const n=tt.now().setZone(e);return n.isValid?n.toFormat(t):""}function $6(e,t){return G6(e,t)}const W6=e=>{const t=tt.now().setZone(e);if(!t.isValid)return"GMT+0";const n=t.offset,i=n>=0?"+":"-",o=Math.floor(Math.abs(n)/60),s=Math.abs(n)%60;return`GMT${i}${o}:${s.toString().padStart(2,"0")}`},hC=()=>W3(PF)||"UTC",AF=e=>({id:e.id,name:(e==null?void 0:e.name)??e.display_name,initial:e.initial,profile_image:e.profile_image,color:{bgColor:e.color.bgColor,textColor:e.color.textColor}}),bp=e=>e!=null&&e.length?e.map(AF):[],U6=e=>{if(!(e!=null&&e.length))return[];const t=new Set;return e.filter(n=>t.has(n.id)?!1:(t.add(n.id),!0))},kF=e=>{if(!e)return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:t},z6=e=>Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0)),OF=(e,t)=>{var i,o,s,r;const n={id:e.id,name:e.name,assignees:void 0,status:e.template_flow_status,dateRange:[kF(e.start_date),kF(e.due_date)],isStarted:!!Number(e.is_started),isCompleted:!!Number(e.is_completed),lastUpdated:{tooltip:((i=e==null?void 0:e.last_updated_by)==null?void 0:i.length)>0?"by "+((o=e.last_updated_by)==null?void 0:o.map(a=>a.display_name).join(", ")):"",value:IF(e.updated_at,"MMM dd, yyyy | HH:mm",t)||""},completedOn:{tooltip:e.actual_due_date?void 0:"Pending completion",value:IF(e.actual_due_date,"MMM dd, yyyy | HH:mm",t)},isDeleted:!1,isProcessing:(s=e.bulk_process)==null?void 0:s.message,isArchived:((r=e.property)==null?void 0:r.is_archived)===1||e.status==0};return z6(n)},MF={headphone:["headphones","headset"],sofa:["couch"],couch:["sofa"],run:["running","runner"]},fC=e=>e.toLowerCase().trim(),j6=e=>fC(e).split(/\s+/).filter(Boolean),LF=e=>e.replace(/(ing|ed|s)$/i,"");function K6(e){const t=new Set;for(const n of e){const i=LF(n);if(t.add(i),t.add(n),MF[i])for(const o of MF[i])t.add(LF(o))}return Array.from(t)}function q6(e,t){const n=fC(e),i=K6(j6(t));let o=0;for(const s of i)s&&(n.includes(s)&&(o+=s.length*2),n.startsWith(s)&&(o+=3));return o}function Y6(e,t){const n=s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=t.split(/\s+/).filter(Boolean).map(n);if(!i.length)return e;const o=new RegExp(`(${i.join("|")})`,"ig");return e.replace(o,"<mark>$1</mark>")}const Sp=({date:e,timezone:t,format:n})=>{if(!e)return"";const i=typeof e=="string"?tt.fromISO(e,{zone:t}):e,o=tt.now().setZone(t||"local"),s=i.setZone(t||"local"),r=o.startOf("day"),l=s.startOf("day").diff(r,"days").days;let c="";if(l===0?c="Today":l===-1?c="Yesterday":l===1&&(c="Tomorrow"),c&&(n!=null&&n.includes("HH:mm"))){const u=s.toFormat("HH:mm");return`${c} at ${u}`}else if(c)return c;return s.toFormat(n)},pC=()=>"Asia/Saigon",NF=e=>`${tt.fromJSDate(e,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,VF=e=>({id:e.id,label:e.name,value:e.id,data:e,color:e.color||{bgColor:"#CCCCCC",textColor:"#FFFFFF"},selected:!1,hover:!1,type:"text",disabled:!1,clickable:!0,danger:!1}),Z6=e=>{var R;const t=Y(((R=e.value)==null?void 0:R.map(E=>E.id))??[]),n=Y([]),i=Y(!1),o=Fr(e,"workspaceId"),s=Fr(e,"entityId"),r=Fr(e,"id"),a=Fr(e,"ids"),l=e.updateRowData,c=Y([]),{apiServices:u}=vo(!!e.params,e),d=q(()=>{var O,A;const E=new Set(((O=e.value)==null?void 0:O.map(D=>D.id))??[]),x=((A=e.value)==null?void 0:A.map(D=>({...VF(D),selected:!0})))??[],k=n.value.filter(D=>!E.has(D.id));return ip(x,k,"id")}),h=E=>{const x=d.value.find(k=>k.id===E);return x==null?void 0:x.data},f=()=>{var E;return(E=a.value)!=null&&E.length?a.value:[String(r.value)]},g=async(E,x,k)=>{if(i.value||!u.value)return!1;i.value=!0;try{const O=await E();if((O==null?void 0:O.message)!=="Done")throw new Error("API call failed");return x(),!0}catch(O){return console.error("API call error:",O),!1}finally{i.value=!1}},m=async()=>await g(()=>u.value.unAssignAll(String(o.value),String(s.value),f()),()=>{l({assignees:[],type:"removeAll"}),t.value=[]}),y=async E=>await g(()=>u.value.replaceAssignee(String(o.value),f(),[E]),()=>{t.value=[E];const k=h(E);k&&l({assignees:bp([k]),type:"overwrite"})}),b=async E=>await g(()=>u.value.addAssignee(String(o.value),f(),[E]),()=>{var O,A,D;t.value.push(E);const k=h(E);if(k){const P=(D=(A=(O=e.params)==null?void 0:O.api)==null?void 0:A.getRowNode(String(e.id)))==null?void 0:D.data,V=(P==null?void 0:P.assignees)||[],H=ip([...V,...bp([k])],"id");l({assignees:H,type:"add"})}}),S=async E=>await g(()=>u.value.removeAssignee(String(o.value),f(),[E]),()=>{var A,D,P;const k=(P=(D=(A=e.params)==null?void 0:A.api)==null?void 0:D.getRowNode(String(e.id)))==null?void 0:P.data;t.value=t.value.filter(V=>V!==E);const O=bp(((k==null?void 0:k.assignees)||[]).filter(V=>V.id!==E));l({assignees:O,type:"remove"})});return{isSubmitting:i,options:c,unAssignAll:m,replaceAssignees:y,addAssignee:b,removeAssignee:S,handleSelect:E=>{const x=String(E.id);t.value.includes(x)?S(x):b(x)},openPeopleInsight:E=>{if(!E||!o.value)return;const x=fo({type:"people_insight",config:{user_id:E,ws_code:o.value,baseDomain:sessionStorage.getItem("BASE_URL")||""}}).url;window.open(x,"_blank")},assigneeList:n,mergedOptions:d,selectedUserIds:t}},X6={placement:"bottom-start",theme:"light",trigger:"click",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0};function J6(e){return e.value?"$el"in e.value?e.value.$el:e.value:null}function tr(e={}){const t={...X6,...e},n=Y(null),i=Y(null),o=Y(null),s=Y(!1),r=m=>{(m.key==="Escape"||m.key==="Esc")&&d()},a=()=>{o.value&&(o.value.destroy(),o.value=null,s.value=!1),document.removeEventListener("keydown",r)},l=m=>{const{showOnInit:y,alwaysShow:b,showArrow:S,debug:F,...C}=t;return{...C,content:m,theme:t.theme,trigger:b?"manual":t.trigger,placement:t.placement||"bottom-start",arrow:!1,offset:t.offset,interactive:t.interactive,appendTo:t.appendTo,animation:"fade",maxWidth:t.maxWidth||350,onShow:R=>{if(s.value=!0,document.addEventListener("keydown",r),e.onShow)return e.onShow(R)},onHide:R=>{if(b)return!1;if(s.value=!1,document.removeEventListener("keydown",r),e.onHide)return e.onHide(R)},onClickOutside:(R,E)=>{if(e.onClickOutside)return e.onClickOutside(R,E);b||R.hide()},popperOptions:t.popperOptions||{modifiers:[{name:"computeStyles",options:{gpuAcceleration:!1}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{fallbackPlacements:["top","bottom","left","right"]}}]}}},c=()=>{var b;a();const m=J6(n),y=i.value;if(!(!m||!y)){y.style.display==="none"&&(y.style.display="");try{const S=l(y),F=Or(m,S);o.value=Array.isArray(F)?F[0]:F,(t.showOnInit||t.alwaysShow)&&((b=o.value)==null||b.show())}catch(S){console.error("[useTippyComposable] Failed to create Tippy instance:",S)}}},u=()=>{o.value&&o.value.show()},d=()=>{t.alwaysShow||o.value&&o.value.hide()},h=()=>{s.value?d():u()},f=m=>{o.value&&o.value.setContent(m)},g=m=>{o.value&&o.value.setProps(m)};return ut([n,i],c,{flush:"post"}),qn(()=>{a()}),{instance:o,isVisible:s,show:u,hide:d,toggle:h,triggerRef:n,popupRef:i,destroyTippy:a,setContent:f,setProps:g}}const gC=(e,t,n)=>{const i=Y(n?"Copy link":"Copy"),o=()=>{setTimeout(()=>{i.value=n?"Copy link":"Copy"},3e3)};return{copyToClipboard:async()=>{try{return await navigator.clipboard.writeText(e),i.value="Copied",t&&t(),o(),!0}catch(r){return console.error("Failed to copy text to clipboard:",r),i.value="Copy failed",o(),!1}},tooltip:i}},Q6=(e,t,n)=>{const i={truncate:"End date cleared because it was before start. Please pick an end date.",swap:"Dates auto-swapped because start was after end.",...e.messages},o=Mo({startDate:null,endDate:null,timezone:e.timezone||"UTC",format:e.format||"",isSelectingStart:!1,isSelectingEnd:!1,rangeFeedback:{status:"idle",action:null,message:""},cacheStartDate:null,cacheEndDate:null,isDirty:!1});fv(()=>{var E;((E=e.value)==null?void 0:E.length)===2&&(o.startDate=e.value[0],o.endDate=e.value[1]),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isSelectingStart=!1,o.isSelectingEnd=!1,e.timezone&&(o.timezone=e.timezone)});const s=()=>{var A,D,P,V,H,te,B,G;t("tracing",JSON.parse(JSON.stringify(n.value)));const E=((D=(A=o.startDate)==null?void 0:A.getTime)==null?void 0:D.call(A))!==((V=(P=o.cacheStartDate)==null?void 0:P.getTime)==null?void 0:V.call(P)),x=((te=(H=o.endDate)==null?void 0:H.getTime)==null?void 0:te.call(H))!==((G=(B=o.cacheEndDate)==null?void 0:B.getTime)==null?void 0:G.call(B)),k=o.startDate===null,O=o.endDate===null;E&&x&&k&&O?t("clearAll"):E&&!x?k?t("clearStart"):t("update:start",o.startDate):x&&!E?O?t("clearDue"):t("update:end",o.endDate):E&&x&&t("update",[o.startDate,o.endDate]),t("confirmed",{start:o.startDate,end:o.endDate}),o.isDirty=E||x},r=(E,x)=>{const k=tt.fromObject({year:E.year,month:E.month,day:E.day},{zone:o.timezone});return(x==="start"?k.startOf("day"):k.endOf("day")).toJSDate()},a=()=>{o.rangeFeedback.status="idle",o.rangeFeedback.action=null,o.rangeFeedback.message=""},l=E=>{e.enableRangeFeedback&&(o.rangeFeedback.status="corrected",o.rangeFeedback.action=E,o.rangeFeedback.message=E==="swap"?i.swap:i.truncate)},c=E=>{if(!(!o.startDate||!o.endDate)){if(o.startDate.getTime()<=o.endDate.getTime()){e.enableRangeFeedback&&a();return}if(E==="select-start"){const x={start:o.startDate,end:o.endDate};o.endDate=null,t("range:invalid",x),t("range:corrected",{start:o.startDate,end:o.endDate,action:"truncate"}),o.isSelectingEnd=!0,l("truncate")}else{const x={start:o.startDate,end:o.endDate},k=o.startDate;o.startDate=o.endDate,o.endDate=k,t("range:invalid",x),t("range:corrected",{start:o.startDate,end:o.endDate,action:"swap"}),l("swap")}}},u=(E,x=!0)=>{e.disabled||e.readOnly||(o.startDate=r(E,"start"),x?(o.isSelectingStart=!1,o.isSelectingEnd=!0):(o.isSelectingStart=!0,o.isSelectingEnd=!1),c("select-start"))},d=E=>{e.disabled||e.readOnly||(o.endDate=r(E,"end"),c("select-end"))},h=()=>{e.disabled||e.readOnly||(o.startDate=null,a())},f=()=>{e.disabled||e.readOnly||(o.endDate=null,a())},g=()=>{e.disabled||e.readOnly||(o.startDate=null,o.endDate=null,a(),y())},m=()=>{e.disabled||e.readOnly||o.isDirty||(o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate)},y=()=>{e.disabled||e.readOnly||(s(),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isDirty=!1)},b=()=>{e.disabled||e.readOnly||(o.startDate=o.cacheStartDate,o.endDate=o.cacheEndDate,a(),o.isDirty=!1)},S=q(()=>o.startDate?tt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat(o.format):e.startPlaceholder),F=q(()=>o.endDate?tt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat(o.format):e.duePlaceholder),C=q(()=>!o.startDate&&!e.disabled?e.startTooltip:!o.startDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.startDate?tt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.startTooltip),R=q(()=>!o.endDate&&!e.disabled?e.dueTooltip:!o.endDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.endDate?tt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.dueTooltip);return{states:o,displayStartDate:S,displayEndDate:F,tooltipStartDate:C,tooltipEndDate:R,selectEndDate:d,selectStartDate:u,clearDue:f,clearStart:h,clearAll:g,beginInteraction:m,confirmSelection:y,cancelSelection:b}},BF="MMM dd",e5=e=>{const t=e.timezone,n=q(()=>e.start?Sp({date:fd(e.start),timezone:t,format:BF}):"No start"),i=q(()=>e.end?Sp({date:fd(e.end),timezone:t,format:BF}):"No due"),o=d=>{if(!d)return null;const h=tt.now().setZone(t).startOf("day"),f=tt.fromISO(d).setZone(t).startOf("day");if(!f.isValid)return console.warn("Invalid date:",d,f.invalidReason),null;const g=f.diff(h,"days").days;return g===0?"today":g===1?"tomorrow":g===-1?"yesterday":g<-1?"past":"future"},s=q(()=>o(e.start)),r=q(()=>o(e.end)),a=q(()=>{if(n.value==="No start")return["empty"];const d=[];return s.value&&d.push(`start-${s.value}`),e.isStarted&&d.push("actual"),d}),l=q(()=>{if(i.value==="No due")return["empty"];const d=[];return r.value&&d.push(`end-${r.value}`),e.isEnded&&d.push("actual"),d}),c=q(()=>e.start?Sp({date:fd(e.start),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No start"),u=q(()=>e.end?Sp({date:fd(e.end),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No due");return{startDate:n,endDate:i,startClasses:a,endClasses:l,fullStartDate:c,fullEndDate:u}},t5="UserCache",n5="user",i5=()=>{const e=Y({}),{getCachedValue:t,setCachedValue:n}=qu({dbName:t5,storeName:n5}),i=async c=>c?await t(c):null;return{getCachedUser:i,setCachedUser:async c=>{if(!(c!=null&&c.id)){console.warn("Cannot cache user without id:",c);return}await n(c.id,c),e.value[c.id]=!0},getCachedUsers:async c=>{if(!c||c.length===0)return[];const u=c.map(h=>i(h));return(await Promise.all(u)).filter(h=>h!==null)},setCachedUsers:async c=>{if(!c||c.length===0)return;const d=ip(c,"id").filter(h=>h.id&&!e.value[h.id]).map(async h=>{await n(h.id,h),e.value[h.id]=!0});await Promise.all(d)},isUserCached:c=>!!e.value[c],clearCacheTracking:()=>{e.value={}}}},o5={placement:"bottom-start",theme:"light",trigger:"manual",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0,useTrigger:!0,showOverlay:!1,overlayOpacity:.5,closeOnOverlayClick:!0,centered:!1};let pd=0,Zi=null;function s5(e){return Zi||(Zi=document.createElement("div"),Zi.className="popup-overlay",Zi.style.cssText=`
60
60
  position: fixed;
61
61
  top: 0;
62
62
  left: 0;
@@ -80,11 +80,11 @@ Expected function or array of functions, received type ${typeof e}.`),Vn)}functi
80
80
  * @license MIT
81
81
  */const nr=typeof window<"u";let qa;const Sd=e=>qa=e;M.env.NODE_ENV;const Ip=M.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function Ya(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var vs;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(vs||(vs={}));const DP=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function d8(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function HC(e,t,n){const i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){FP(i.response,t,n)},i.onerror=function(){console.error("could not download file")},i.send()}function _P(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Ap(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(n)}}const kp=typeof navigator=="object"?navigator:{userAgent:""},xP=/Macintosh/.test(kp.userAgent)&&/AppleWebKit/.test(kp.userAgent)&&!/Safari/.test(kp.userAgent),FP=nr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!xP?h8:"msSaveOrOpenBlob"in kp?f8:p8:()=>{};function h8(e,t="download",n){const i=document.createElement("a");i.download=t,i.rel="noopener",typeof e=="string"?(i.href=e,i.origin!==location.origin?_P(i.href)?HC(e,t,n):(i.target="_blank",Ap(i)):Ap(i)):(i.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(i.href)},4e4),setTimeout(function(){Ap(i)},0))}function f8(e,t="download",n){if(typeof e=="string")if(_P(e))HC(e,t,n);else{const i=document.createElement("a");i.href=e,i.target="_blank",setTimeout(function(){Ap(i)})}else navigator.msSaveOrOpenBlob(d8(e,n),t)}function p8(e,t,n,i){if(i=i||open("","_blank"),i&&(i.document.title=i.document.body.innerText="downloading..."),typeof e=="string")return HC(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(DP.HTMLElement))||"safari"in DP,r=/CriOS\/[\d]+/.test(navigator.userAgent);if((r||o&&s||xP)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw i=null,new Error("Wrong reader.result type");l=r?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=l:location.assign(l),i=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);i?i.location.assign(a):location.href=a,i=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function Yn(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function GC(e){return"_a"in e&&"install"in e}function TP(){if(!("clipboard"in navigator))return Yn("Your browser doesn't support the Clipboard API","error"),!0}function PP(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(Yn('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function g8(e){if(!TP())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),Yn("Global state copied to clipboard.")}catch(t){if(PP(t))return;Yn("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function m8(e){if(!TP())try{IP(e,JSON.parse(await navigator.clipboard.readText())),Yn("Global state pasted from clipboard.")}catch(t){if(PP(t))return;Yn("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function v8(e){try{FP(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){Yn("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let ir;function y8(){ir||(ir=document.createElement("input"),ir.type="file",ir.accept=".json");function e(){return new Promise((t,n)=>{ir.onchange=async()=>{const i=ir.files;if(!i)return t(null);const o=i.item(0);return t(o?{text:await o.text(),file:o}:null)},ir.oncancel=()=>t(null),ir.onerror=n,ir.click()})}return e}async function C8(e){try{const n=await y8()();if(!n)return;const{text:i,file:o}=n;IP(e,JSON.parse(i)),Yn(`Global state imported from "${o.name}".`)}catch(t){Yn("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function IP(e,t){for(const n in t){const i=e.state.value[n];i?Object.assign(i,t[n]):e.state.value[n]=t[n]}}function qo(e){return{_custom:{display:e}}}const AP="🍍 Pinia (root)",Op="_root";function w8(e){return GC(e)?{id:Op,label:AP}:{id:e.$id,label:e.$id}}function b8(e){if(GC(e)){const n=Array.from(e._s.keys()),i=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>i.get(s)._getters).map(s=>{const r=i.get(s);return{editable:!1,key:s,value:r._getters.reduce((a,l)=>(a[l]=r[l],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function S8(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:qo(e.type),key:qo(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function E8(e){switch(e){case vs.direct:return"mutation";case vs.patchFunction:return"$patch";case vs.patchObject:return"$patch";default:return"unknown"}}let wc=!0;const Mp=[],Za="pinia:mutations",di="pinia",{assign:R8}=Object,Lp=e=>"🍍 "+e;function D8(e,t){OT({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Mp,app:e},n=>{typeof n.now!="function"&&Yn("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:Za,label:"Pinia 🍍",color:15064968}),n.addInspector({id:di,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{g8(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await m8(t),n.sendInspectorTree(di),n.sendInspectorState(di)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{v8(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await C8(t),n.sendInspectorTree(di),n.sendInspectorState(di)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:i=>{const o=t._s.get(i);o?typeof o.$reset!="function"?Yn(`Cannot reset "${i}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),Yn(`Store "${i}" reset.`)):Yn(`Cannot reset "${i}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent(i=>{const o=i.componentInstance&&i.componentInstance.proxy;if(o&&o._pStores){const s=i.componentInstance.proxy._pStores;Object.values(s).forEach(r=>{i.instanceData.state.push({type:Lp(r.$id),key:"state",editable:!0,value:r._isOptionsAPI?{_custom:{value:St(r.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>r.$reset()}]}}:Object.keys(r.$state).reduce((a,l)=>(a[l]=r.$state[l],a),{})}),r._getters&&r._getters.length&&i.instanceData.state.push({type:Lp(r.$id),key:"getters",editable:!1,value:r._getters.reduce((a,l)=>{try{a[l]=r[l]}catch(c){a[l]=c}return a},{})})})}}),n.on.getInspectorTree(i=>{if(i.app===e&&i.inspectorId===di){let o=[t];o=o.concat(Array.from(t._s.values())),i.rootNodes=(i.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(i.filter.toLowerCase()):AP.toLowerCase().includes(i.filter.toLowerCase())):o).map(w8)}}),globalThis.$pinia=t,n.on.getInspectorState(i=>{if(i.app===e&&i.inspectorId===di){const o=i.nodeId===Op?t:t._s.get(i.nodeId);if(!o)return;o&&(i.nodeId!==Op&&(globalThis.$store=St(o)),i.state=b8(o))}}),n.on.editInspectorState(i=>{if(i.app===e&&i.inspectorId===di){const o=i.nodeId===Op?t:t._s.get(i.nodeId);if(!o)return Yn(`store "${i.nodeId}" not found`,"error");const{path:s}=i;GC(o)?s.unshift("state"):(s.length!==1||!o._customProperties.has(s[0])||s[0]in o.$state)&&s.unshift("$state"),wc=!1,i.set(o,s,i.state.value),wc=!0}}),n.on.editComponentState(i=>{if(i.type.startsWith("🍍")){const o=i.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return Yn(`store "${o}" not found`,"error");const{path:r}=i;if(r[0]!=="state")return Yn(`Invalid path for store "${o}":
82
82
  ${r}
83
- Only state can be modified.`);r[0]="$state",wc=!1,i.set(s,r,i.state.value),wc=!0}})})}function _8(e,t){Mp.includes(Lp(t.$id))||Mp.push(Lp(t.$id)),OT({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Mp,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const i=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:r,onError:a,name:l,args:c})=>{const u=kP++;n.addTimelineEvent({layerId:Za,event:{time:i(),title:"🛫 "+l,subtitle:"start",data:{store:qo(t.$id),action:qo(l),args:c},groupId:u}}),r(d=>{$r=void 0,n.addTimelineEvent({layerId:Za,event:{time:i(),title:"🛬 "+l,subtitle:"end",data:{store:qo(t.$id),action:qo(l),args:c,result:d},groupId:u}})}),a(d=>{$r=void 0,n.addTimelineEvent({layerId:Za,event:{time:i(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:qo(t.$id),action:qo(l),args:c,error:d},groupId:u}})})},!0),t._customProperties.forEach(r=>{ut(()=>W(t[r]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(di),wc&&n.addTimelineEvent({layerId:Za,event:{time:i(),title:"Change",subtitle:r,data:{newValue:a,oldValue:l},groupId:$r}})},{deep:!0})}),t.$subscribe(({events:r,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(di),!wc)return;const c={time:i(),title:E8(a),data:R8({store:qo(t.$id)},S8(r)),groupId:$r};a===vs.patchFunction?c.subtitle="⤵️":a===vs.patchObject?c.subtitle="🧩":r&&!Array.isArray(r)&&(c.subtitle=r.type),r&&(c.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:r}}),n.addTimelineEvent({layerId:Za,event:c})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=xr(r=>{o(r),n.addTimelineEvent({layerId:Za,event:{time:i(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:qo(t.$id),info:qo("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(di),n.sendInspectorState(di)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(di),n.sendInspectorState(di),n.getSettings().logStoreChanges&&Yn(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(di),n.sendInspectorState(di),n.getSettings().logStoreChanges&&Yn(`"${t.$id}" store installed 🆕`)})}let kP=0,$r;function OP(e,t,n){const i=t.reduce((o,s)=>(o[s]=St(e)[s],o),{});for(const o in i)e[o]=function(){const s=kP,r=n?new Proxy(e,{get(...l){return $r=s,Reflect.get(...l)},set(...l){return $r=s,Reflect.set(...l)}}):e;$r=s;const a=i[o].apply(r,arguments);return $r=void 0,a}}function x8({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){OP(t,Object.keys(n.actions),t._isOptionsAPI);const i=t._hotUpdate;St(t)._hotUpdate=function(o){i.apply(this,arguments),OP(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}_8(e,t)}}function F8(){const e=D0(!0),t=e.run(()=>Y({}));let n=[],i=[];const o=xr({install(s){Sd(o),o._a=s,s.provide(Ip,o),s.config.globalProperties.$pinia=o,M.env.NODE_ENV!=="production"&&M.env.NODE_ENV!=="test"&&nr&&D8(s,o),i.forEach(r=>n.push(r)),i=[]},use(s){return this._a?n.push(s):i.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return M.env.NODE_ENV!=="production"&&M.env.NODE_ENV!=="test"&&nr&&typeof Proxy<"u"&&o.use(x8),o}function MP(e,t){for(const n in t){const i=t[n];if(!(n in e))continue;const o=e[n];Ya(o)&&Ya(i)&&!Zt(i)&&!ro(i)?e[n]=MP(o,i):e[n]=i}return e}const LP=()=>{};function NP(e,t,n,i=LP){e.add(t);const o=()=>{e.delete(t)&&i()};return!n&&_0()&&HL(o),o}function bc(e,...t){e.forEach(n=>{n(...t)})}const T8=e=>e(),VP=Symbol(),$C=Symbol();function WC(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,i)=>e.set(i,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const i=t[n],o=e[n];Ya(o)&&Ya(i)&&e.hasOwnProperty(n)&&!Zt(i)&&!ro(i)?e[n]=WC(o,i):e[n]=i}return e}const P8=M.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function I8(e){return!Ya(e)||!Object.prototype.hasOwnProperty.call(e,P8)}const{assign:bo}=Object;function BP(e){return!!(Zt(e)&&e.effect)}function HP(e,t,n,i){const{state:o,actions:s,getters:r}=t,a=n.state.value[e];let l;function c(){!a&&(M.env.NODE_ENV==="production"||!i)&&(n.state.value[e]=o?o():{});const u=M.env.NODE_ENV!=="production"&&i?tv(Y(o?o():{}).value):tv(n.state.value[e]);return bo(u,s,Object.keys(r||{}).reduce((d,h)=>(M.env.NODE_ENV!=="production"&&h in u&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${h}" in store "${e}".`),d[h]=xr(q(()=>{Sd(n);const f=n._s.get(e);return r[h].call(f,f)})),d),{}))}return l=UC(e,c,t,n,i,!0),l}function UC(e,t,n={},i,o,s){let r;const a=bo({actions:{}},n);if(M.env.NODE_ENV!=="production"&&!i._e.active)throw new Error("Pinia destroyed");const l={deep:!0};M.env.NODE_ENV!=="production"&&(l.onTrigger=A=>{c?f=A:c==!1&&!x._hotUpdating&&(Array.isArray(f)?f.push(A):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let c,u,d=new Set,h=new Set,f;const g=i.state.value[e];!s&&!g&&(M.env.NODE_ENV==="production"||!o)&&(i.state.value[e]={});const m=Y({});let y;function b(A){let D;c=u=!1,M.env.NODE_ENV!=="production"&&(f=[]),typeof A=="function"?(A(i.state.value[e]),D={type:vs.patchFunction,storeId:e,events:f}):(WC(i.state.value[e],A),D={type:vs.patchObject,payload:A,storeId:e,events:f});const P=y=Symbol();Xt().then(()=>{y===P&&(c=!0)}),u=!0,bc(d,D,i.state.value[e])}const S=s?function(){const{state:D}=n,P=D?D():{};this.$patch(V=>{bo(V,P)})}:M.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:LP;function F(){r.stop(),d.clear(),h.clear(),i._s.delete(e)}const C=(A,D="")=>{if(VP in A)return A[$C]=D,A;const P=function(){Sd(i);const V=Array.from(arguments),H=new Set,te=new Set;function B($){H.add($)}function G($){te.add($)}bc(h,{args:V,name:P[$C],store:x,after:B,onError:G});let Z;try{Z=A.apply(this&&this.$id===e?this:x,V)}catch($){throw bc(te,$),$}return Z instanceof Promise?Z.then($=>(bc(H,$),$)).catch($=>(bc(te,$),Promise.reject($))):(bc(H,Z),Z)};return P[VP]=!0,P[$C]=D,P},R=xr({actions:{},getters:{},state:[],hotState:m}),E={_p:i,$id:e,$onAction:NP.bind(null,h),$patch:b,$reset:S,$subscribe(A,D={}){const P=NP(d,A,D.detached,()=>V()),V=r.run(()=>ut(()=>i.state.value[e],H=>{(D.flush==="sync"?u:c)&&A({storeId:e,type:vs.direct,events:f},H)},bo({},l,D)));return P},$dispose:F},x=Mo(M.env.NODE_ENV!=="production"||M.env.NODE_ENV!=="production"&&M.env.NODE_ENV!=="test"&&nr?bo({_hmrPayload:R,_customProperties:xr(new Set)},E):E);i._s.set(e,x);const O=(i._a&&i._a.runWithContext||T8)(()=>i._e.run(()=>(r=D0()).run(()=>t({action:C}))));for(const A in O){const D=O[A];if(Zt(D)&&!BP(D)||ro(D))M.env.NODE_ENV!=="production"&&o?m.value[A]=Fr(O,A):s||(g&&I8(D)&&(Zt(D)?D.value=g[A]:WC(D,g[A])),i.state.value[e][A]=D),M.env.NODE_ENV!=="production"&&R.state.push(A);else if(typeof D=="function"){const P=M.env.NODE_ENV!=="production"&&o?D:C(D,A);O[A]=P,M.env.NODE_ENV!=="production"&&(R.actions[A]=D),a.actions[A]=D}else M.env.NODE_ENV!=="production"&&BP(D)&&(R.getters[A]=s?n.getters[A]:D,nr&&(O._getters||(O._getters=xr([]))).push(A))}if(bo(x,O),bo(St(x),O),Object.defineProperty(x,"$state",{get:()=>M.env.NODE_ENV!=="production"&&o?m.value:i.state.value[e],set:A=>{if(M.env.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");b(D=>{bo(D,A)})}}),M.env.NODE_ENV!=="production"&&(x._hotUpdate=xr(A=>{x._hotUpdating=!0,A._hmrPayload.state.forEach(D=>{if(D in x.$state){const P=A.$state[D],V=x.$state[D];typeof P=="object"&&Ya(P)&&Ya(V)?MP(P,V):A.$state[D]=V}x[D]=Fr(A.$state,D)}),Object.keys(x.$state).forEach(D=>{D in A.$state||delete x[D]}),c=!1,u=!1,i.state.value[e]=Fr(A._hmrPayload,"hotState"),u=!0,Xt().then(()=>{c=!0});for(const D in A._hmrPayload.actions){const P=A[D];x[D]=C(P,D)}for(const D in A._hmrPayload.getters){const P=A._hmrPayload.getters[D],V=s?q(()=>(Sd(i),P.call(x,x))):P;x[D]=V}Object.keys(x._hmrPayload.getters).forEach(D=>{D in A._hmrPayload.getters||delete x[D]}),Object.keys(x._hmrPayload.actions).forEach(D=>{D in A._hmrPayload.actions||delete x[D]}),x._hmrPayload=A._hmrPayload,x._getters=A._getters,x._hotUpdating=!1})),M.env.NODE_ENV!=="production"&&M.env.NODE_ENV!=="test"&&nr){const A={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(D=>{Object.defineProperty(x,D,bo({value:x[D]},A))})}return i._p.forEach(A=>{if(M.env.NODE_ENV!=="production"&&M.env.NODE_ENV!=="test"&&nr){const D=r.run(()=>A({store:x,app:i._a,pinia:i,options:a}));Object.keys(D||{}).forEach(P=>x._customProperties.add(P)),bo(x,D)}else bo(x,r.run(()=>A({store:x,app:i._a,pinia:i,options:a})))}),M.env.NODE_ENV!=="production"&&x.$state&&typeof x.$state=="object"&&typeof x.$state.constructor=="function"&&!x.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
83
+ Only state can be modified.`);r[0]="$state",wc=!1,i.set(s,r,i.state.value),wc=!0}})})}function _8(e,t){Mp.includes(Lp(t.$id))||Mp.push(Lp(t.$id)),OT({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Mp,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const i=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:r,onError:a,name:l,args:c})=>{const u=kP++;n.addTimelineEvent({layerId:Za,event:{time:i(),title:"🛫 "+l,subtitle:"start",data:{store:qo(t.$id),action:qo(l),args:c},groupId:u}}),r(d=>{$r=void 0,n.addTimelineEvent({layerId:Za,event:{time:i(),title:"🛬 "+l,subtitle:"end",data:{store:qo(t.$id),action:qo(l),args:c,result:d},groupId:u}})}),a(d=>{$r=void 0,n.addTimelineEvent({layerId:Za,event:{time:i(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:qo(t.$id),action:qo(l),args:c,error:d},groupId:u}})})},!0),t._customProperties.forEach(r=>{ut(()=>U(t[r]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(di),wc&&n.addTimelineEvent({layerId:Za,event:{time:i(),title:"Change",subtitle:r,data:{newValue:a,oldValue:l},groupId:$r}})},{deep:!0})}),t.$subscribe(({events:r,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(di),!wc)return;const c={time:i(),title:E8(a),data:R8({store:qo(t.$id)},S8(r)),groupId:$r};a===vs.patchFunction?c.subtitle="⤵️":a===vs.patchObject?c.subtitle="🧩":r&&!Array.isArray(r)&&(c.subtitle=r.type),r&&(c.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:r}}),n.addTimelineEvent({layerId:Za,event:c})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=xr(r=>{o(r),n.addTimelineEvent({layerId:Za,event:{time:i(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:qo(t.$id),info:qo("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(di),n.sendInspectorState(di)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(di),n.sendInspectorState(di),n.getSettings().logStoreChanges&&Yn(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(di),n.sendInspectorState(di),n.getSettings().logStoreChanges&&Yn(`"${t.$id}" store installed 🆕`)})}let kP=0,$r;function OP(e,t,n){const i=t.reduce((o,s)=>(o[s]=St(e)[s],o),{});for(const o in i)e[o]=function(){const s=kP,r=n?new Proxy(e,{get(...l){return $r=s,Reflect.get(...l)},set(...l){return $r=s,Reflect.set(...l)}}):e;$r=s;const a=i[o].apply(r,arguments);return $r=void 0,a}}function x8({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){OP(t,Object.keys(n.actions),t._isOptionsAPI);const i=t._hotUpdate;St(t)._hotUpdate=function(o){i.apply(this,arguments),OP(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}_8(e,t)}}function F8(){const e=D0(!0),t=e.run(()=>Y({}));let n=[],i=[];const o=xr({install(s){Sd(o),o._a=s,s.provide(Ip,o),s.config.globalProperties.$pinia=o,M.env.NODE_ENV!=="production"&&M.env.NODE_ENV!=="test"&&nr&&D8(s,o),i.forEach(r=>n.push(r)),i=[]},use(s){return this._a?n.push(s):i.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return M.env.NODE_ENV!=="production"&&M.env.NODE_ENV!=="test"&&nr&&typeof Proxy<"u"&&o.use(x8),o}function MP(e,t){for(const n in t){const i=t[n];if(!(n in e))continue;const o=e[n];Ya(o)&&Ya(i)&&!Zt(i)&&!ro(i)?e[n]=MP(o,i):e[n]=i}return e}const LP=()=>{};function NP(e,t,n,i=LP){e.add(t);const o=()=>{e.delete(t)&&i()};return!n&&_0()&&HL(o),o}function bc(e,...t){e.forEach(n=>{n(...t)})}const T8=e=>e(),VP=Symbol(),$C=Symbol();function WC(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,i)=>e.set(i,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const i=t[n],o=e[n];Ya(o)&&Ya(i)&&e.hasOwnProperty(n)&&!Zt(i)&&!ro(i)?e[n]=WC(o,i):e[n]=i}return e}const P8=M.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function I8(e){return!Ya(e)||!Object.prototype.hasOwnProperty.call(e,P8)}const{assign:bo}=Object;function BP(e){return!!(Zt(e)&&e.effect)}function HP(e,t,n,i){const{state:o,actions:s,getters:r}=t,a=n.state.value[e];let l;function c(){!a&&(M.env.NODE_ENV==="production"||!i)&&(n.state.value[e]=o?o():{});const u=M.env.NODE_ENV!=="production"&&i?tv(Y(o?o():{}).value):tv(n.state.value[e]);return bo(u,s,Object.keys(r||{}).reduce((d,h)=>(M.env.NODE_ENV!=="production"&&h in u&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${h}" in store "${e}".`),d[h]=xr(q(()=>{Sd(n);const f=n._s.get(e);return r[h].call(f,f)})),d),{}))}return l=UC(e,c,t,n,i,!0),l}function UC(e,t,n={},i,o,s){let r;const a=bo({actions:{}},n);if(M.env.NODE_ENV!=="production"&&!i._e.active)throw new Error("Pinia destroyed");const l={deep:!0};M.env.NODE_ENV!=="production"&&(l.onTrigger=A=>{c?f=A:c==!1&&!x._hotUpdating&&(Array.isArray(f)?f.push(A):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let c,u,d=new Set,h=new Set,f;const g=i.state.value[e];!s&&!g&&(M.env.NODE_ENV==="production"||!o)&&(i.state.value[e]={});const m=Y({});let y;function b(A){let D;c=u=!1,M.env.NODE_ENV!=="production"&&(f=[]),typeof A=="function"?(A(i.state.value[e]),D={type:vs.patchFunction,storeId:e,events:f}):(WC(i.state.value[e],A),D={type:vs.patchObject,payload:A,storeId:e,events:f});const P=y=Symbol();Xt().then(()=>{y===P&&(c=!0)}),u=!0,bc(d,D,i.state.value[e])}const S=s?function(){const{state:D}=n,P=D?D():{};this.$patch(V=>{bo(V,P)})}:M.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:LP;function F(){r.stop(),d.clear(),h.clear(),i._s.delete(e)}const C=(A,D="")=>{if(VP in A)return A[$C]=D,A;const P=function(){Sd(i);const V=Array.from(arguments),H=new Set,te=new Set;function B($){H.add($)}function G($){te.add($)}bc(h,{args:V,name:P[$C],store:x,after:B,onError:G});let Z;try{Z=A.apply(this&&this.$id===e?this:x,V)}catch($){throw bc(te,$),$}return Z instanceof Promise?Z.then($=>(bc(H,$),$)).catch($=>(bc(te,$),Promise.reject($))):(bc(H,Z),Z)};return P[VP]=!0,P[$C]=D,P},R=xr({actions:{},getters:{},state:[],hotState:m}),E={_p:i,$id:e,$onAction:NP.bind(null,h),$patch:b,$reset:S,$subscribe(A,D={}){const P=NP(d,A,D.detached,()=>V()),V=r.run(()=>ut(()=>i.state.value[e],H=>{(D.flush==="sync"?u:c)&&A({storeId:e,type:vs.direct,events:f},H)},bo({},l,D)));return P},$dispose:F},x=Mo(M.env.NODE_ENV!=="production"||M.env.NODE_ENV!=="production"&&M.env.NODE_ENV!=="test"&&nr?bo({_hmrPayload:R,_customProperties:xr(new Set)},E):E);i._s.set(e,x);const O=(i._a&&i._a.runWithContext||T8)(()=>i._e.run(()=>(r=D0()).run(()=>t({action:C}))));for(const A in O){const D=O[A];if(Zt(D)&&!BP(D)||ro(D))M.env.NODE_ENV!=="production"&&o?m.value[A]=Fr(O,A):s||(g&&I8(D)&&(Zt(D)?D.value=g[A]:WC(D,g[A])),i.state.value[e][A]=D),M.env.NODE_ENV!=="production"&&R.state.push(A);else if(typeof D=="function"){const P=M.env.NODE_ENV!=="production"&&o?D:C(D,A);O[A]=P,M.env.NODE_ENV!=="production"&&(R.actions[A]=D),a.actions[A]=D}else M.env.NODE_ENV!=="production"&&BP(D)&&(R.getters[A]=s?n.getters[A]:D,nr&&(O._getters||(O._getters=xr([]))).push(A))}if(bo(x,O),bo(St(x),O),Object.defineProperty(x,"$state",{get:()=>M.env.NODE_ENV!=="production"&&o?m.value:i.state.value[e],set:A=>{if(M.env.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");b(D=>{bo(D,A)})}}),M.env.NODE_ENV!=="production"&&(x._hotUpdate=xr(A=>{x._hotUpdating=!0,A._hmrPayload.state.forEach(D=>{if(D in x.$state){const P=A.$state[D],V=x.$state[D];typeof P=="object"&&Ya(P)&&Ya(V)?MP(P,V):A.$state[D]=V}x[D]=Fr(A.$state,D)}),Object.keys(x.$state).forEach(D=>{D in A.$state||delete x[D]}),c=!1,u=!1,i.state.value[e]=Fr(A._hmrPayload,"hotState"),u=!0,Xt().then(()=>{c=!0});for(const D in A._hmrPayload.actions){const P=A[D];x[D]=C(P,D)}for(const D in A._hmrPayload.getters){const P=A._hmrPayload.getters[D],V=s?q(()=>(Sd(i),P.call(x,x))):P;x[D]=V}Object.keys(x._hmrPayload.getters).forEach(D=>{D in A._hmrPayload.getters||delete x[D]}),Object.keys(x._hmrPayload.actions).forEach(D=>{D in A._hmrPayload.actions||delete x[D]}),x._hmrPayload=A._hmrPayload,x._getters=A._getters,x._hotUpdating=!1})),M.env.NODE_ENV!=="production"&&M.env.NODE_ENV!=="test"&&nr){const A={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(D=>{Object.defineProperty(x,D,bo({value:x[D]},A))})}return i._p.forEach(A=>{if(M.env.NODE_ENV!=="production"&&M.env.NODE_ENV!=="test"&&nr){const D=r.run(()=>A({store:x,app:i._a,pinia:i,options:a}));Object.keys(D||{}).forEach(P=>x._customProperties.add(P)),bo(x,D)}else bo(x,r.run(()=>A({store:x,app:i._a,pinia:i,options:a})))}),M.env.NODE_ENV!=="production"&&x.$state&&typeof x.$state=="object"&&typeof x.$state.constructor=="function"&&!x.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
84
84
  state: () => new MyClass()
85
85
  Found in store "${x.$id}".`),g&&s&&n.hydrate&&n.hydrate(x.$state,g),c=!0,u=!0,x}/*! #__NO_SIDE_EFFECTS__ */function Sc(e,t,n){let i;const o=typeof t=="function";i=o?n:t;function s(r,a){const l=bv();if(r=(M.env.NODE_ENV==="test"&&qa&&qa._testing?null:r)||(l?ki(Ip,null):null),r&&Sd(r),M.env.NODE_ENV!=="production"&&!qa)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
86
86
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
87
- This will fail in production.`);r=qa,r._s.has(e)||(o?UC(e,t,i,r):HP(e,i,r),M.env.NODE_ENV!=="production"&&(s._pinia=r));const c=r._s.get(e);if(M.env.NODE_ENV!=="production"&&a){const u="__hot:"+e,d=o?UC(u,t,i,r,!0):HP(u,bo({},i),r,!0);a._hotUpdate(d),delete r.state.value[u],r._s.delete(u)}if(M.env.NODE_ENV!=="production"&&nr){const u=Di();if(u&&u.proxy&&!a){const d=u.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[e]=c}}return c}return s.$id=e,s}function ys(e){const t=St(e),n={};for(const i in t){const o=t[i];o.effect?n[i]=q({get:()=>e[i],set(s){e[i]=s}}):(Zt(o)||ro(o))&&(n[i]=Fr(e,i))}return n}const zC=Sc("permissionStore",()=>{const e=Y([]),t=Y(),n=Y({});return{userPermissions:e,entityPermissions:t,itemPermission:n,setUserPermissions:r=>{e.value=r},setEntityPermissions:r=>{t.value=r},setItemPermission:(r,a)=>{n.value[r]=a}}}),A8="woohoo_getWoohooUserInterface_read",jC="media_getReviewUserInterface_read",k8="update_getUpdateUserInterface_read",O8=sessionStorage.getItem("BASE_URL"),M8=sessionStorage.getItem("BASE_REVIEW_URL"),L8=(e,t,n)=>{const i=zC(),{userPermissions:o}=ys(i),s=q(()=>{const{ws_code:H,entity_id:te,scene_id:B}=e.value;return{baseDomain:O8||"",ws_code:H||"",entity_id:te||"",scene_id:B||"",reviewDomain:M8||"",take_id:te||"",woohoo_id:te||"",parent_id:te||""}}),r=q(()=>{var te;const H=e.value.permissions;return{canOpenSceneHub:!0,canOpenReview:o.value.includes(jC),canCopyLink:!0,canRename:(H==null?void 0:H.has_edit_permission)??!1,canOpenTakeInReview:o.value.includes(jC),canOpenTakeInUpdate:o.value.includes(k8),canOpenTakeInWoohoo:o.value.includes(A8),canDeleteRendition:((te=H==null?void 0:H.media)==null?void 0:te.has_delete_rendition_permission)??!1,canDeleteThumbnail:(H==null?void 0:H.has_edit_thumbnail_permission)??!1,canArchiveScene:(H==null?void 0:H.has_edit_permission)??!1,canUnarchiveScene:(H==null?void 0:H.has_edit_permission)??!1,canDeleteScene:(H==null?void 0:H.has_delete_permission)??!1}}),a=q(()=>({project:fo({type:"project",config:s.value}).url,take_review:fo({type:"review_take",config:s.value}).url,review:fo({type:"review_scene",config:s.value}).url,review_scene:fo({type:"review_scene",config:s.value}).url,woohoo:fo({type:"woohoo",config:s.value}).url,update:fo({type:"update",config:s.value}).url,scene_hub:fo({type:"scene_hub",config:s.value}).url})),l=(H,te)=>{const B=H instanceof MouseEvent&&(H.metaKey||H.ctrlKey),G=a.value[te]||"";G&&(B?window.open(G,"_blank"):window.location.href=G)},c=async(H,te)=>{var B;try{const G=await((B=e.value.axiosService.value)==null?void 0:B.deleteRendition(s.value.ws_code,[s.value.scene_id],!0));if((G==null?void 0:G.message)!="Done"){console.error("Failed to delete rendition.");return}}catch(G){console.error("Error deleting rendition",G)}},u=async(H,te)=>{var B;try{await((B=e.value.axiosService.value)==null?void 0:B.deleteThumbnail(s.value.ws_code,[s.value.scene_id]))}catch(G){console.error("Error deleting thumbnail",G)}},d=async(H,te)=>{var B;try{const G=await((B=e.value.axiosService.value)==null?void 0:B.archiveScene(s.value.ws_code,s.value.entity_id,[s.value.scene_id]));if((G==null?void 0:G.message)!="Done"){console.error("Failed to archive scene.");return}te&&te("archived")}catch(G){console.error("Error archiving item",G)}},h=async(H,te)=>{var B;try{const G=await((B=e.value.axiosService.value)==null?void 0:B.deleteScene(s.value.ws_code,s.value.entity_id,s.value.scene_id));if((G==null?void 0:G.message)!="Done"){console.error("Failed to delete scene.");return}te&&te("deleted")}catch(G){console.error("Error deleting item",G)}},f=H=>{const te=a.value.scene_hub||"";te&&navigator.clipboard.writeText(te)},g=async(H,te)=>{var B;try{const G=await((B=e.value.axiosService.value)==null?void 0:B.unarchiveScene(s.value.ws_code,s.value.entity_id,[s.value.scene_id]));if((G==null?void 0:G.message)!="Done"){console.error("Failed to unarchive scene.");return}te&&te("unarchived")}catch(G){console.error("Error unarchiving item",G)}},m=H=>l(H,"scene_hub"),y=H=>l(H,"review_scene"),{tooltip:b,copyToClipboard:S}=gC(a.value.scene_hub||"",void 0,!0),F=H=>{S()},C=H=>n(H),R=H=>l(H,"review"),E=H=>l(H,"update"),x=H=>l(H,"woohoo"),k=H=>c(),O=H=>u(),A=H=>d(H,t),D=H=>g(H,t),P=H=>h(H,t),V=q(()=>{let H=[];return!s.value.scene_id&&e.value.optionBlock&&H.push(...e.value.optionBlock),Array.isArray(e.value.optionBlock)&&e.value.optionBlock.length?e.value.optionBlock:[{id:"quick-actions",groupLabel:"Quick actions",type:"row",options:[{id:"scene-tile",label:"",icon:"CustomSceneHub",description:"Scene tile",action:m,hide:!r.value.canOpenSceneHub,type:"icon"},{id:"open-in-arbo-review",label:"",icon:"PenRuler",description:"Open in arbo Review",action:y,hide:!r.value.canOpenReview,type:"icon"},{id:"copy-link",label:"",icon:"Link",description:b.value,action:F,hide:!r.value.canCopyLink,type:"icon"}]},{id:"action",groupLabel:"Action",type:"column",options:[{id:"rename",label:"Rename",icon:"Pen",action:C,hide:!r.value.canRename,type:"icon"}]},{id:"download-options-take",type:"column",groupLabel:"Download Options",options:[{id:"open-take-in",label:"Open Take in",icon:"ArrowUpRightFromSquare",subMenu:{id:"sub-menu",type:"column",groupLabel:"Sub Menu",options:[{id:"review",label:"Review",icon:"PenRuler",action:R,hide:!r.value.canOpenTakeInReview,type:"icon"},{id:"update",label:"Update",icon:"UserCheck",action:E,hide:!r.value.canOpenTakeInUpdate,type:"icon"},{id:"woohoo-details",label:"Woohoo Details",icon:"ChartPie",action:x,hide:!r.value.canOpenTakeInWoohoo,type:"icon"}]}}]},{id:"download-options-delete",type:"column",groupLabel:"Download Options",options:[{id:"delete-rendition",label:"Delete rendition",icon:"Clapperboard",action:k,hide:!r.value.canDeleteRendition,type:"icon"},{id:"delete-thumbnail",label:"Delete thumbnail",icon:"Image",action:O,hide:!r.value.canDeleteThumbnail,type:"icon"}]},{id:"download-options-archive",type:"column",groupLabel:"Download Options",options:[{id:"archive",label:"Archive",icon:"BoxArchive",action:A,hide:!r.value.canArchiveScene,type:"icon"},{id:"unarchive",label:"Unarchive",icon:"BoxArchive",action:D,hide:!r.value.canUnarchiveScene,type:"icon"},{id:"delete",label:"Delete",icon:"TrashCan",isDanger:!0,description:"Delete permanently",action:P,hide:!r.value.canDeleteScene,type:"icon"}]}]});return{linkMap:a,handleOpen:l,copyLink:f,deleteRendition:c,deleteThumbnail:u,archiveItem:d,deleteItem:h,unArchiveItem:g,options:V}};function or(e){const t=Y(!1),n=Y(!1),i=q(()=>{var d;const c=e.value,u=!!c.readOnly;return{readOnly:u,disabled:!!c.disabled,hovered:n.value,focused:t.value,isEmpty:c.empty??!1,error:!!c.error,actived:!!((d=c.active)!=null&&d.value),clickable:u?!1:c.clickable??!1}}),o=()=>{t.value=!0,Xt(()=>{const c=l(e.value.inputRef);c==null||c.focus()})},s=()=>{t.value=!1},r=()=>{n.value=!0},a=()=>{n.value=!1},l=c=>{if(!c)return null;const u=c.value||c;return(u instanceof HTMLElement?u:u==null?void 0:u.$el)||null};return Sn(()=>{const c=l(e.value.inputRef),u=l(e.value.wrapperRef);c&&(c.addEventListener("focus",o),c.addEventListener("blur",s)),u&&(u.addEventListener("mouseenter",r),u.addEventListener("mouseleave",a))}),qn(()=>{const c=l(e.value.inputRef),u=l(e.value.wrapperRef);c&&(c.removeEventListener("focus",o),c.removeEventListener("blur",s)),u&&(u.removeEventListener("mouseenter",r),u.removeEventListener("mouseleave",a))}),{isFocus:t,isHover:n,argsMain:i,handleFocus:o}}const KC=e=>{const t=Y(!1),n=q(()=>t.value);return Sn(()=>{var a,l,c,u;const i=(a=e.params)==null?void 0:a.api,o=(l=e.params)==null?void 0:l.node,s=o==null?void 0:o.rowIndex,r=(u=(c=e.params)==null?void 0:c.colDef)==null?void 0:u.field;return i==null||i.addEventListener("cellEditingStarted",d=>{d.rowIndex===s&&d.colDef.field===r&&(t.value=!0)}),i==null||i.addEventListener("cellEditingStopped",d=>{d.rowIndex===s&&d.colDef.field===r&&(t.value=!1)}),{isEditing:n}}),{isEditing:n}},GP=Ct(ct({__name:"StatusBadge",props:{size:{default:16},color:{default:"#02C39A"},label:{default:""},status:{default:"active"},statusTooltip:{default:"Online"},showBadge:{type:Boolean,default:!0},loading:{type:Boolean}},setup(e){const t=Go,{triggerRef:n,popupRef:i}=tr({trigger:"mouseenter focus",theme:"dark",placement:"right",arrow:!0}),o=q(()=>{switch(s.status){case"active":return"#02C39A";case"offline":return"#808080";case"busy":return"#ff0000";case"away":return"#F7941D";default:return"#02C39A"}}),s=e;return(r,a)=>(K(),Ce("div",{class:z(r.$style["status-badge-wrapper"]),style:gn({"--badge-size":`${s.size}px`,"--badge-color":o.value})},[_t(r.$slots,"default"),ot(we("div",{class:z(r.$style["badge-indicator"]),ref_key:"triggerRef",ref:n},null,2),[[us,s.showBadge],[W(t),{isLoading:s.loading,fullwidth:!0}]]),we("div",{ref_key:"popupRef",ref:i,class:z(r.$style["badge-tooltip"])},bt(s.statusTooltip),3)],6))}}),[["__cssModules",{$style:{"status-badge-wrapper":"_status-badge-wrapper_13xqg_1","badge-indicator":"_badge-indicator_13xqg_6",active:"_active_13xqg_19",offline:"_offline_13xqg_22",busy:"_busy_13xqg_25",away:"_away_13xqg_28","badge-tooltip":"_badge-tooltip_13xqg_32"}}]]),$P=Sc("switchStore",()=>{const e=ki("switchInstance");return{openSceneHub:(i,o)=>{if(i){if(!e)throw console.error("Switch instance not found"),new Error("Switch instance not found");e("scene_hub",{id:i,commentId:o},{showLoading:!1})}},openPeopleInsight:i=>{if(!e)throw console.error("Switch instance not found"),new Error("Switch instance not found");e("people_insight",{tab:"home",id:i||""},{showLoading:!1})}}}),N8=ct({__name:"MiniPeopleCard",props:{user:{},status:{default:"active"},timezone:{default:hC()},userConfig:{default:()=>({size:96,isUseShortLabel:!0,bgColor:"#E0E0E0",color:"#757575",isMe:!1})},showInsightButton:{type:Boolean,default:!0},showCopyLinkButton:{type:Boolean,default:!0},apiUpdateFunction:{type:Function,default:void 0},refreshInterval:{default:3e4},enableAutoRefresh:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},private:{type:Boolean,default:!1}},emits:["insightClick","copyLink","dataUpdated"],setup(e,{emit:t}){const n=mn,i=Go,o=e,s=t,r={active:"Active in the last 10 minutes",offline:"Logged out of TESSR",busy:"User is busy",away:"No activity in the last 10 minutes"},a={active:"#02C39A",offline:"#808080",busy:"#FF0000",away:"#F7941D"},l=Y(o.status),c=Y(o.timezone),u=Y(!0),d=Y(null),h=q(()=>r[l.value]),f=q(()=>a[l.value]),g=q(()=>{var P;return(P=o.user)==null?void 0:P.name}),m=q(()=>c.value?$6(c.value,"HH:mm"):""),y=q(()=>c.value?`(${W6(c.value)})`:""),b=async()=>{var P,V,H;if(o.apiUpdateFunction)try{const te=await o.apiUpdateFunction(o.user.id);if(!te)throw new Error("No data returned from API");(P=te.private_info)!=null&&P.is_offline?l.value="offline":(V=te.private_info)!=null&&V.last_active?l.value="active":l.value="away",(H=te.private_info)!=null&&H.timezone&&(c.value=te.private_info.timezone),s("dataUpdated",te)}catch(te){console.error("Failed to fetch user data:",te)}finally{u.value=!1}},S=()=>{!o.apiUpdateFunction||!o.enableAutoRefresh||(d.value!==null&&clearInterval(d.value),d.value=setInterval(b,o.refreshInterval))},F=()=>{d.value!==null&&(clearInterval(d.value),d.value=null)},C=q(()=>{const P=window.location.origin,V=sessionStorage.getItem("ws_code")||"";return fo({type:"people_insight",config:{ws_code:V,baseDomain:P,user_id:""}}).url}),{copyToClipboard:R,tooltip:E}=gC(C.value,()=>s("copyLink",o.user.id)),x=$P(),{openPeopleInsight:k}=x,O=P=>{if(P.ctrlKey||P.metaKey){window.open(C.value,"_blank");return}try{k(String(o.user.id))}catch{window.open(C.value,"_blank")}},A=P=>{O(P),s("insightClick",o.user.id)};ut([()=>o.enableAutoRefresh,()=>o.refreshInterval,()=>o.apiUpdateFunction],()=>{F(),o.enableAutoRefresh&&o.apiUpdateFunction&&S()}),Sn(async()=>{o.apiUpdateFunction&&(await b(),S())}),qn(F);const D=q(()=>({name:o.user.name,initial:o.user.initial,id:o.user.id,profile_image:o.user.profile_image,color:o.user.color,size:98}));return(P,V)=>(K(),Ce("div",{class:z([P.$style["mini-people-card"],{[P.$style.loading]:u.value},"bg-skeleton"])},[we("div",{class:z(P.$style["avatar-section"])},[o.private?(K(),Xe(Zu,_n({key:1,readOnly:!0},D.value),null,16)):(K(),Xe(GP,{key:0,size:16,status:l.value,loading:u.value,"status-tooltip":h.value},{default:Ee(()=>[ve(Zu,_n({readOnly:!0},D.value),null,16)]),_:1},8,["status","loading","status-tooltip"]))],2),we("div",{class:z(P.$style["user-info"])},[we("div",{class:z(P.$style["info-row"])},[we("h3",{class:z(P.$style["user-name"])},bt(g.value),3),o.private?it("",!0):ot((K(),Ce("span",{key:0,class:z(P.$style["status-badge"]),style:gn({color:f.value})},[dt(bt(l.value),1)],6)),[[W(i),{isLoading:u.value,fullwidth:!0}]])],2),c.value?(K(),Ce("div",{key:0,class:z([P.$style["info-row"],P.$style["time-row"]])},[ot((K(),Ce("div",{class:z(P.$style["time-display"])},[ve(mt,{source:"remote",src:"Clock",class:z(P.$style["clock-icon"])},null,8,["class"]),we("span",{class:z(P.$style["time-text"])},[we("strong",null,bt(m.value),1),we("span",{class:z(P.$style.separator)},"|",2),we("span",null,bt(y.value),1)],2)],2)),[[W(i),{isLoading:u.value,fullwidth:!0}]])],2)):it("",!0),!e.readOnly&&!o.private?(K(),Ce("div",{key:1,class:z([P.$style["info-row"],P.$style.actions])},[e.showInsightButton?(K(),Xe(pt,{key:0,label:"Insights",variant:"primary",size:"default",style:{flex:"1"},onClick:on(A,["prevent","stop"]),disabled:o.disabled},null,8,["disabled"])):it("",!0),e.showCopyLinkButton?ot((K(),Xe(pt,{key:1,variant:["icon","secondary"],size:"default","aria-label":"Copy link",onClick:on(W(R),["prevent","stop"]),disabled:o.disabled},{default:Ee(()=>[ve(mt,{source:"remote",src:"Link"})]),_:1},8,["onClick","disabled"])),[[W(n),{content:W(E),contentClass:["extra-padding"],hideOnClick:!1,delay:[300,0]}]]):it("",!0)],2)):it("",!0)],2)],2))}}),V8=Ct(N8,[["__cssModules",{$style:{"mini-people-card":"_mini-people-card_xknlb_1",loading:"_loading_xknlb_22","avatar-section":"_avatar-section_xknlb_25","user-info":"_user-info_xknlb_30","info-row":"_info-row_xknlb_36","time-row":"_time-row_xknlb_43","time-display":"_time-display_xknlb_49","time-text":"_time-text_xknlb_54","actions-row":"_actions-row_xknlb_61","user-name":"_user-name_xknlb_65","status-badge":"_status-badge_xknlb_76",active:"_active_xknlb_90",offline:"_offline_xknlb_93",busy:"_busy_xknlb_96",away:"_away_xknlb_99","user-local-time":"_user-local-time_xknlb_102","clock-icon":"_clock-icon_xknlb_110",separator:"_separator_xknlb_122",timezone:"_timezone_xknlb_125","refresh-btn":"_refresh-btn_xknlb_128",spinning:"_spinning_xknlb_131",spin:"_spin_xknlb_131","insight-btn":"_insight-btn_xknlb_134","copy-link-btn":"_copy-link-btn_xknlb_138","last-update":"_last-update_xknlb_141","loading-overlay":"_loading-overlay_xknlb_147","loading-spinner":"_loading-spinner_xknlb_159"}}]]),B8=Ct(ct({name:"MoreOption",__name:"MoreOption",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=mn,n=e,{isEditing:i}=KC(n);return(o,s)=>ot((K(),Xe(pt,{class:z(o.$style.btnMoreOptions),variant:["secondary","icon"],size:"small",actived:W(i)},{default:Ee(()=>[ve(mt,{src:"EllipsisVertical",source:"remote"})]),_:1},8,["class","actived"])),[[W(t),"More actions"]])}}),[["__cssModules",{$style:{btnMoreOptions:"_btnMoreOptions_r5y5p_1"}}]]),H8=["src","width","height","alt"],Np=Ct(ct({__name:"Visual",props:{src:{},source:{default:"remote"},size:{},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},color:{},ratio:{default:"1/1"}},setup(e){const t=Go,{getCachedValue:n,setCachedValue:i}=qu({dbName:"visual-cache-db",storeName:"visuals"}),o=h=>{if(h!==void 0)return typeof h=="number"?`${h}px`:typeof h=="string"&&/^\d+$/.test(h)?`${h}px`:h},s=e,r=q(()=>({minWidth:o(s.minWidth),maxWidth:o(s.maxWidth),minHeight:o(s.minHeight),maxHeight:o(s.maxHeight),aspectRatio:s.ratio,width:o(s.size)})),a=async h=>{const f=await n(h);return!f||!(f instanceof Blob)?void 0:URL.createObjectURL(f)},l=async(h,f)=>{await i(h,f)},c=q(()=>({name:s.src,size:Number(s.size||100),color:""})),{url:u,loading:d}=t_(c,"visual",l,a);return(h,f)=>ot((K(),Ce("div",{class:z([h.$style.visualWrapper,{[h.$style.loading]:W(d)}]),style:gn(r.value)},[we("img",{src:W(u),width:e.size,height:e.size,alt:"visual-"+e.src,style:gn(r.value)},null,12,H8)],6)),[[W(t),{isLoading:W(d),type:"skeleton",size:"cover",fullwidth:!0}]])}}),[["__cssModules",{$style:{visualWrapper:"_visualWrapper_1sro0_1",loading:"_loading_1sro0_8",pulse:"_pulse_1sro0_1"}}]]),G8=["tabindex"],Vp=Ct(ct({name:"ListItem",directives:{tooltip:mn},__name:"ListItem",props:{label:{},value:{},type:{},selected:{type:Boolean},disabled:{type:Boolean},hover:{type:Boolean},clickable:{type:Boolean,default:!0},danger:{type:Boolean},data:{},icon:{},readOnly:{type:Boolean,default:!1},show:{type:Boolean}},emits:["click","keydown","update:selected","select"],setup(e,{emit:t}){const n=e,i=t,o=Y(!1),s=Y(!1);function r(E){if(!E||typeof E!="object")return!1;const x=E;return typeof x.name=="string"&&typeof x.id=="string"&&typeof x.initial=="string"}const a=q(()=>n.type==="status"||n.type==="assignee"||n.type==="icon"||!!R.prefix),l=q(()=>!!R.suffix||n.danger&&o.value),c=q(()=>n.disabled||!n.clickable?-1:0),u=q(()=>{var E;return n.type==="status"&&typeof((E=n.data)==null?void 0:E.color)=="string"?{backgroundColor:n.data.color,border:my(n.data.color,"white")?"1px solid #ccc":"1px solid #fff"}:{}}),d=_f(),h=q(()=>({[d.active]:n.selected??!1,[d.disabled]:n.disabled??!1,[d.hover]:n.hover??!1,[d.clickable]:(n.clickable??!0)&&!n.disabled,[d.danger]:n.danger??!1,[d["has-prefix"]]:a.value,[d["has-suffix"]]:l.value,[d.readOnly]:n.readOnly})),f=q(()=>({content:"Cancel",...C})),g=q(()=>({content:"Confirm",theme:"warning",...C}));function m(E){return{name:E.name,initial:E.initial,id:E.id,profile_image:E.profile_image??null,color:E.color,size:24}}function y(){o.value=!1}function b(E){E&&i("click",E),(n.clickable??!0)&&(i("update:selected",!n.selected),i("select",!n.selected))}function S(E){if(!n.disabled){if(n.danger&&!o.value){o.value=!0;return}n.danger||b(E)}}function F(E){if(i("keydown",E),!n.disabled)if(E.key==="Enter"||E.key===" "){E.preventDefault();const x=new MouseEvent("click",{bubbles:!0,cancelable:!0});S(x)}else E.key==="Escape"&&o.value&&(E.preventDefault(),y())}const C=Object.freeze({delay:[500,0],contentClass:["extra-padding"]}),R=yv();return ut(()=>n.show,E=>{E===!1&&(o.value=!1)}),(E,x)=>{const k=df("tooltip");return K(),Ce("div",{class:z([E.$style["list-item"],h.value]),role:"listitem",tabindex:c.value,onClick:on(S,["stop","prevent"]),onKeydown:F,onMouseenter:x[0]||(x[0]=O=>s.value=!0),onMouseleave:x[1]||(x[1]=O=>s.value=!1)},[a.value?(K(),Ce("div",{key:0,class:z(E.$style["list-item__prefix"])},[_t(E.$slots,"prefix",{},()=>[e.type==="icon"&&e.icon?(K(),Xe(mt,{key:0,src:e.icon,source:"remote",class:z(E.$style["item-icon"])},null,8,["src","class"])):e.type==="status"?(K(),Ce("div",{key:1,class:z(E.$style["status-indicator"]),style:gn(u.value)},null,6)):e.type==="assignee"&&r(e.data)?(K(),Xe(Zu,_n({key:2},m(e.data),{class:E.$style["item-avatar"],readOnly:!0}),null,16,["class"])):it("",!0)])],2)):it("",!0),we("div",{class:z(E.$style["list-item__label"])},[_t(E.$slots,"label",{selected:e.selected},()=>[dt(bt(e.label),1)])],2),l.value?(K(),Ce("div",{key:1,class:z(E.$style["list-item__suffix"])},[_t(E.$slots,"suffix",{item:E.$props,hovered:s.value},()=>[e.danger&&o.value?(K(),Ce("div",{key:0,class:z(E.$style["confirm-action"])},[ot((K(),Xe(pt,{variant:["secondary","icon"],size:"small",onClick:on(y,["stop","prevent"])},{default:Ee(()=>[ve(mt,{src:"Xmark",source:"remote"})]),_:1})),[[k,f.value]]),ot((K(),Xe(pt,{variant:["danger","primary","icon"],size:"small",onClick:on(b,["stop","prevent"])},{default:Ee(()=>[ve(mt,{src:"Check",source:"remote"})]),_:1})),[[k,g.value]])],2)):it("",!0)])],2)):it("",!0)],42,G8)}}}),[["__cssModules",{$style:{"list-item":"_list-item_g74kb_1",disabled:"_disabled_g74kb_15",danger:"_danger_g74kb_18","has-prefix":"_has-prefix_g74kb_21","has-suffix":"_has-suffix_g74kb_21",clickable:"_clickable_g74kb_35",readOnly:"_readOnly_g74kb_38",hover:"_hover_g74kb_42",active:"_active_g74kb_48","list-item__prefix":"_list-item__prefix_g74kb_73","list-item__label":"_list-item__label_g74kb_81","list-item__suffix":"_list-item__suffix_g74kb_95","status-indicator":"_status-indicator_g74kb_102","item-icon":"_item-icon_g74kb_108","arbo-icon-state":"_arbo-icon-state_g74kb_113","item-avatar":"_item-avatar_g74kb_116","confirm-action":"_confirm-action_g74kb_125"}}]]),sr=Ct(ct({__name:"DisplayWrapper",props:{prefix:{},suffix:{},inputType:{},readOnly:{type:Boolean},disabled:{type:Boolean},hovered:{type:Boolean},focused:{type:Boolean},error:{type:Boolean},actived:{type:Boolean},clickable:{type:Boolean},size:{}},emits:["event"],setup(e,{expose:t,emit:n}){const i=e;yv();const o=_f(),s=Y(null),r=Y("default"),a=q(()=>{if(typeof i.size=="number")return`${i.size}px`;switch(i.size){case"small":return"32px";case"large":return"48px";case"default":default:return"32px"}}),l=q(()=>`${Math.max(50,Math.round(Math.random()*100))}%`),c=q(()=>({[o["display-wrapper"]]:!0,[o.disabled]:i.disabled,[o.readOnly]:i.readOnly,[o.error]:i.error,[o.clickable]:i.clickable,[o.active]:i.actived,[o.hovered]:i.hovered,[o.focused]:!i.readOnly&&!i.disabled&&i.focused})),u=()=>{var b,S;const f=((b=s.value)==null?void 0:b.querySelectorAll(".wrapper-prefix").length)||0,g=((S=s.value)==null?void 0:S.querySelectorAll(".wrapper-suffix").length)||0,m="var(--icon-size)",y=(f+g)*8;return f&&!g?`repeat(${f}, ${m}) calc(100% - ${f} * ${m} - ${y}px )`:!f&&g?`calc(100% - ${g} * ${m} - ${y}px ) repeat(${g}, ${m})`:f&&g?`repeat(${f}, ${m}) calc(100% - ${f} * ${m} - ${g} * ${m} - ${y}px ) repeat(${g}, ${m})`:"100%"},d=Y("100%");cf(()=>{Xt(()=>{d.value=u()})});const h=f=>{r.value=f};return t({rootEl:s,updateState:h,componentState:r}),(f,g)=>(K(),Ce("div",{ref_key:"rootEl",ref:s,class:z([[W(o)["display-wrapper"],c.value],"skeleton-loading-wrapper"]),style:gn({"--grid-template":d.value,"--wrapper-size":a.value,"--loading-overlay-width":l.value})},[_t(f.$slots,"prefix",{hovered:i.hovered,focused:i.focused}),_t(f.$slots,"default",{hovered:i.hovered,focused:i.focused,updateComponentState:h,disabled:i.disabled}),_t(f.$slots,"suffix",{hovered:i.hovered,focused:i.focused})],6))}}),[["__cssModules",{$style:{"display-wrapper":"_display-wrapper_1h8v5_1",readOnly:"_readOnly_1h8v5_22",disabled:"_disabled_1h8v5_22",error:"_error_1h8v5_22",hovered:"_hovered_1h8v5_22",active:"_active_1h8v5_26",clickable:"_clickable_1h8v5_31",suffix:"_suffix_1h8v5_37",prefix:"_prefix_1h8v5_38"}}]]),$8=["value","placeholder","disable","readonly","maxlength"],WP=Ct(ct({__name:"InputText",props:{modelValue:{},placeholder:{},focused:{type:Boolean},validatorFnc:{type:Function},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{}},emits:["update:modelValue","input","clear","enter","blur","cancel"],setup(e,{expose:t,emit:n}){const i=mn,o=e,s=n,r=Y(null),a=q(()=>{var S,F;return((S=o==null?void 0:o.modelValue)==null?void 0:S.length)&&((F=o==null?void 0:o.modelValue)==null?void 0:F.length)>0}),l=Wo(S=>{if(o.disabled||o.readOnly){S.preventDefault();return}const F=S.target;s("update:modelValue",F.value),s("input",F.value)},16),c=S=>{if(o.disabled||o.readOnly){S.preventDefault();return}s("update:modelValue",""),s("clear"),Xt(()=>{var F;(F=r.value)==null||F.focus()})},u=Wo(S=>{const F=(o==null?void 0:o.modelValue)||"";S.key==="Escape"?a.value?c(S):s("cancel"):S.key==="Enter"&&F.length>0&&(S.preventDefault(),S.stopImmediatePropagation(),S.stopPropagation(),s("input",F||""),s("enter",F||""))},300),d=`input-text-${Math.random().toString(36).substr(2,9)}`,h=Y(!1);ut(()=>o.modelValue,S=>{o.validatorFnc?h.value=!!S&&!o.validatorFnc(S):h.value=!1});const f=Y(null),g=q(()=>({disabled:o.disabled,readOnly:o.readOnly,error:h.value,inputRef:r,clickable:!o.disabled&&!o.readOnly,focused:o.focused,wrapperRef:f})),{argsMain:m,isHover:y,isFocus:b}=or(g);return t({focus:()=>{Xt(()=>{var S;(S=r.value)==null||S.focus(),console.log("focus called")})}}),(S,F)=>(K(),Ce("div",{class:z(S.$style["input-wrapper"])},[ve(sr,_n(W(m),{ref_key:"wrapperRef",ref:f,class:S.$style["input-box"]}),{suffix:Ee(()=>[(a.value||(W(y)||W(b))&&a.value)&&!o.disabled&&!o.readOnly?_t(S.$slots,"clear",{key:0},()=>[ot((K(),Xe(pt,{variant:["icon"],"aria-label":"Clear search",onClick:on(c,["stop"]),size:16,rounded:!0},{default:Ee(()=>[ve(mt,{class:z([S.$style["cs-icon"]]),src:"XMarkSolid",size:"8",color:"white"},null,8,["class"])]),_:1})),[[W(i),{content:"Clear",contentClass:"extra-padding"}]])]):_t(S.$slots,"suffix",{key:1})]),default:Ee(()=>[we("input",{ref_key:"inputRef",ref:r,type:"text",value:e.modelValue,placeholder:e.placeholder,class:z([S.$style["column-config__input"]]),id:d,disable:e.disabled,readonly:e.readOnly,onInput:F[0]||(F[0]=(...C)=>W(l)&&W(l)(...C)),onKeydown:F[1]||(F[1]=(...C)=>W(u)&&W(u)(...C)),maxlength:e.maxLength},null,42,$8)]),_:3},16,["class"]),h.value?_t(S.$slots,"error",{key:0}):it("",!0)],2))}}),[["__cssModules",{$style:{"input-box":"_input-box_51nuy_1","has-suffix":"_has-suffix_51nuy_11","has-value":"_has-value_51nuy_11","is-disabled":"_is-disabled_51nuy_17","is-readonly":"_is-readonly_51nuy_24","column-config__input":"_column-config__input_51nuy_31"}}]]),qC=Ct(ct({__name:"SearchBox",props:{modelValue:{default:""},placeholder:{default:"Search..."},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{}},emits:["update:modelValue","search","clear","cancel"],setup(e,{expose:t,emit:n}){const i=e,o=n,s=Y(null),r=q(()=>i.modelValue.length>0),a=Wo(u=>{o("update:modelValue",u),o("search",u)},300),l=()=>{o("update:modelValue",""),o("clear"),Xt(()=>{var u;(u=s.value)==null||u.focus()})},c=Y(i.modelValue);return`${Math.random().toString(36).substr(2,9)}`,t({focus:()=>{var u;(u=s.value)==null||u.focus()}}),(u,d)=>(K(),Xe(WP,{ref_key:"searchInput",ref:s,modelValue:c.value,"onUpdate:modelValue":d[0]||(d[0]=h=>c.value=h),placeholder:e.placeholder,onInput:W(a),onClear:l,onCancel:d[1]||(d[1]=h=>o("cancel"))},{suffix:Ee(()=>[r.value?it("",!0):(K(),Xe(mt,{key:0,src:"MagnifyingGlass",class:z(u.$style.icon),color:"#a6a6a6"},null,8,["class"]))]),_:1},8,["modelValue","placeholder","onInput"]))}}),[["__cssModules",{$style:{"search-box":"_search-box_18t5g_1",icon:"_icon_18t5g_18"}}]]),W8=["aria-activedescendant"],U8=["innerHTML"],z8=10,YC=Ct(ct({__name:"SearchList",props:{options:{default:()=>[]},selectedId:{},loading:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},error:{default:null},params:{},maxHeight:{default:"282px"},width:{default:"200px"},minQueryLength:{default:0}},emits:["select","close","search","loadMore","cancel"],setup(e,{expose:t,emit:n}){const i=mn,o={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",TAB:"Tab"},s=e,r=n,a=Y(""),l=Y(-1),c=Y(null),u=Y(null),d=Y(new Map),h=q(()=>fC(a.value)),f=q(()=>{const $=h.value;if(!$||$.length<s.minQueryLength)return s.options;if(d.value.has($))return d.value.get($);const ce=s.options.map(ue=>({item:ue,score:q6(ue.label,$)})).filter(({score:ue})=>ue>0).sort((ue,xe)=>xe.score-ue.score).map(({item:ue})=>ue);return d.value.set($,ce),ce}),g=q(()=>s.hasMore&&!s.loading&&!s.loadingMore),m=Wo($=>{Z.value=0,a.value=$,l.value=-1,r("search",$)},wp),y=$=>{Z.value=0,m($)},b=$=>a.value?Y6($,a.value):$,S=$=>{const ue={[o.ARROW_DOWN]:()=>F($),[o.ARROW_UP]:()=>C($),[o.ENTER]:()=>x($),[o.ESCAPE]:()=>k($),[o.TAB]:()=>O($)}[$.key];ue&&ue()},F=$=>{$.preventDefault(),R(1)},C=$=>{$.preventDefault(),R(-1)},R=$=>{const ce=f.value.length;if(ce===0)return;let ue;$>0?ue=(l.value+1)%ce:l.value>0?ue=l.value-1:ue=ce-1,l.value=ue,E()},E=()=>{Xt(()=>{var ce;const $=(ce=u.value)==null?void 0:ce.querySelectorAll('[role="menuitem"]')[l.value];$==null||$.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})},x=$=>{if($.preventDefault(),l.value>=0&&l.value<f.value.length){const ue=f.value[l.value];A(ue)}},k=$=>{$.preventDefault(),P()},O=$=>{l.value>=0&&($.preventDefault(),x($))},A=$=>{!$||$.disabled||(r("select",$),l.value=-1,P())},D=$=>{$>=0&&$<f.value.length&&(l.value=$)},P=()=>{r("close")},V=()=>{if(!g.value||!u.value)return;const{scrollTop:$,clientHeight:ce,scrollHeight:ue}=u.value;ue-($+ce)<=z8&&r("loadMore")},H=()=>{var $,ce;($=u.value)==null||$.addEventListener("scroll",V),(ce=c.value)==null||ce.addEventListener("keydown",S)},te=()=>{var $,ce;($=u.value)==null||$.removeEventListener("scroll",V),(ce=c.value)==null||ce.removeEventListener("keydown",S)};Sn(()=>{H()}),qn(()=>{te()}),ut(()=>s.loading,$=>{!$&&f.value.length>0&&(l.value=-1)});const B=$=>$?Array.isArray(s.selectedId)?s.selectedId.includes(String($.id)):s.selectedId==$.id:!1,G=Y(null);ut(l,()=>{E()}),t({focus:()=>{Xt(()=>{var $;($=G.value)==null||$.focus()})},query:a,filteredOptions:f,selectedIndex:l,closeDropdown:P,clearSearch:()=>{a.value=""}});const Z=Y(0);return ut(()=>s.loading,$=>{const ce=s.options.length>0&&f.value.length>0,ue=!ce&&a.value.length>0,xe=!ce&&a.value.length===0;if($){Z.value=0;return}else if(ce){Z.value=1;return}else if(ue){Z.value=2;return}else if(xe){Z.value=3;return}},{immediate:!0}),($,ce)=>(K(),Ce("datalist",{ref_key:"searchListRef",ref:c,class:z($.$style["search-list"]),"aria-activedescendant":l.value>=0?`item-${l.value}`:void 0,style:gn({width:e.width})},[ve(qC,{ref_key:"searchBoxRef",ref:G,modelValue:a.value,"onUpdate:modelValue":ce[0]||(ce[0]=ue=>a.value=ue),class:z($.$style["search-box"]),disabled:e.loading,onSearch:y,onClear:ce[1]||(ce[1]=ue=>y("")),onCancel:ce[2]||(ce[2]=ue=>r("cancel"))},null,8,["modelValue","class","disabled"]),we("div",{ref_key:"popupRef",ref:u,class:z($.$style["list-container"]),style:gn({maxHeight:e.maxHeight})},[_t($.$slots,"extra-item"),(K(!0),Ce(Ot,null,Un(f.value,(ue,xe)=>ot((K(),Ce("div",{key:`${ue.id}-${xe}`,role:"menuitem"},[_t($.$slots,"item",{item:ue,index:xe,selectedIndex:l.value,isSelected:B,handleSelect:A,handleItemHover:D,getHighlightedLabel:b,query:a.value,idx:xe},()=>[ue.hide?it("",!0):(K(),Xe(Vp,_n({key:0,ref_for:!0},ue,{hover:xe===l.value,selected:B(ue),type:ue.type,id:`item-${xe}`,"aria-selected":xe===l.value,onClick:on(re=>A(ue),["stop","prevent"]),onMouseover:re=>D(xe)}),{prefix:Ee(()=>[_t($.$slots,"prefix-item",{item:ue})]),label:Ee(()=>[a.value?ot((K(),Ce("span",{key:0,class:z($.$style.match),innerHTML:b(ue.label)},null,10,U8)),[[W(i),{content:ue.label}]]):ot((K(),Ce("span",{key:1,class:z($.$style["item-label"])},[dt(bt(ue.label),1)],2)),[[W(i),{content:ue.label}]])]),suffix:Ee(({hovered:re})=>[_t($.$slots,"action",{item:ue,isHovered:xe===l.value,hovered:re,selected:l.value==xe})]),_:2},1040,["hover","selected","type","id","aria-selected","onClick","onMouseover"]))])])),[[us,Z.value===1]])),128)),Z.value===0?_t($.$slots,"loading-more",{key:0},()=>[(K(),Ce(Ot,null,Un(7,ue=>we("div",{class:z($.$style["loading-more"]),key:ue},[we("div",{class:z($.$style["loading-skeleton"])},null,2),we("div",{class:z($.$style["loading-skeleton"])},null,2)],2)),64))]):it("",!0),Z.value===2?(K(),Ce("div",{key:1,class:z($.$style["no-results"])},[_t($.$slots,"empty",{query:a.value},()=>[we("div",{class:z($.$style["no-results-content"])},[...ce[3]||(ce[3]=[we("p",null,[dt(" No results. "),we("br"),dt(" Try another search. ")],-1)])],2)])],2)):it("",!0),Z.value===3?(K(),Ce("div",{key:2,class:z($.$style["no-results"])},[_t($.$slots,"empty-list",{},()=>[we("div",{class:z($.$style["no-results-content"])},[...ce[4]||(ce[4]=[we("p",null,"No items available.",-1)])],2)])],2)):it("",!0),_t($.$slots,"footer")],6)],14,W8))}}),[["__cssModules",{$style:{"search-list":"_search-list_qr9ld_1","list-container":"_list-container_qr9ld_13","item-label":"_item-label_qr9ld_32","loading-state":"_loading-state_qr9ld_40","loading-more":"_loading-more_qr9ld_41","loading-skeleton":"_loading-skeleton_qr9ld_52","is-loading":"_is-loading_qr9ld_59","skeleton-loading":"_skeleton-loading_qr9ld_1","no-results":"_no-results_qr9ld_114","no-results-content":"_no-results-content_qr9ld_121",title:"_title_qr9ld_124",tips:"_tips_qr9ld_130",match:"_match_qr9ld_144"}}]]),j8=["innerHTML"],K8=20,UP=Ct(ct({__name:"AssigneeGroupEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{}},emits:["updated","cancel","start-update"],setup(e,{expose:t,emit:n}){const i=mn,o=e,s=OD,r=Z=>{const $=Z.data;return{name:String(($==null?void 0:$.name)??"Unknown"),initial:String(($==null?void 0:$.initial)??"U"),id:String(Z.id),profile_image:($==null?void 0:$.profile_image)??null,color:($==null?void 0:$.color)??{bgColor:"#CCCCCC",textColor:"var(--background-color)"},size:24,isUseShortLabel:!0}},{id:a}=tv(o),l=n,c=Z=>{var ce,ue;const $=(ue=(ce=o.params)==null?void 0:ce.api)==null?void 0:ue.getRowNode(String(a.value));$==null||$.setDataValue("assignees",kz(Z.assignees)),l("updated",Z)},u=Y(!1),d=Y(!1),h=Y(null),f=Y(1),g=Y(!0),m=Y(0),y=Y(""),{isSubmitting:b,unAssignAll:S,replaceAssignees:F,handleSelect:C,assigneeList:R,mergedOptions:E,selectedUserIds:x}=Z6({...o,updateRowData:c,value:o.value}),k=ki("bulkUpdate",!1),{apiServices:O}=vo(!k,o),A=ki("workspaceId"),D=async(Z=1,$="",ce=!1)=>{var ue,xe,re,Ie,Me;if(!O.value||!o.id&&!o.ids)throw console.error("API service or item identifiers are undefined"),new Error("API service or item identifiers are undefined");if(ce?d.value=!0:u.value=!0,h.value=null,!((ue=O.value)!=null&&ue.multipleAssignableUser))throw new Error("API service getAssignableUsers is undefined");try{const Je=await((xe=O.value)==null?void 0:xe.multipleAssignableUser({workspaceId:String(A),itemIds:(o.ids??(o.id?[o.id]:[])).map(String),page:Z,perPage:K8,q:$.trim()})),gt=((re=bp(Je.data))==null?void 0:re.map(VF))??[];R.value=ce?ip(R.value,gt,"id"):gt,m.value=Je.meta.total,g.value=(((Ie=Je==null?void 0:Je.meta)==null?void 0:Ie.current_page)||0)<(((Me=Je==null?void 0:Je.meta)==null?void 0:Me.last_page)||0),f.value=Z}catch(Je){console.error("Error fetching assignable users:",Je),h.value="Failed to load assignable users"}finally{u.value=!1,d.value=!1}},P=()=>{!d.value&&g.value&&D(f.value+1,y.value,!0)},V=Wo(async Z=>{y.value=Z,await D(1,Z,!1)},wp),H=()=>D(1,y.value,!1),te=q(hC);Sn(()=>{var Z;(Z=G.value)==null||Z.focus()}),t({getValue:()=>{var Z;return(Z=E.value.find($=>$.selected))==null?void 0:Z.value},refresh:H,clearInternal:()=>{x.value=[]},focus:()=>{var Z;(Z=G.value)==null||Z.focus()}});const B=()=>{const Z=sessionStorage.getItem("BASE_URL"),$=fo({type:"access_setting",config:{baseDomain:Z,ws_code:o.workspaceId,entity_id:A}}).url;window.open($,"_blank")},G=Y(null);return Sn(()=>{Xt(()=>{var Z;(Z=G.value)==null||Z.focus()})}),ut([()=>o.id,()=>o.workspaceId,()=>o.ids],()=>{D()},{deep:!0,immediate:!0}),(Z,$)=>(K(),Xe(YC,_n({"selected-id":W(x)},{...o},{options:W(E),loading:u.value,ref_key:"popupRef",ref:G,"loading-more":d.value,"has-more":g.value,onSelect:$[0]||($[0]=ce=>{W(C)(ce),l("start-update")}),onSearch:W(V),onLoadMore:P}),_u({"extra-item":Ee(()=>[ve(pt,{variant:"menu-item",onHandleClick:W(S)},{prefix:Ee(()=>[we("div",{class:z(Z.$style["unassign-icon"])},[ve(mt,{src:"UserXMark",source:"remote"})],2)]),default:Ee(()=>[$[1]||($[1]=dt(" Unassign all ",-1))]),_:1},8,["onHandleClick"])]),item:Ee(({item:ce,selectedIndex:ue,isSelected:xe,handleSelect:re,handleItemHover:Ie,getHighlightedLabel:Me,query:Je,idx:gt})=>[ve(Vp,_n(ce,{hover:gt===ue,selected:xe(ce),type:ce.type,onClick:on(Ft=>re(ce),["stop","prevent"]),onMouseover:Ft=>Ie(gt),class:Z.$style["item-assignee"]}),{prefix:Ee(()=>[ot(ve(Zu,Um(wf(r(ce))),null,16),[[W(s),{user:ce.data,status:"active",timezone:te.value,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0}]])]),label:Ee(({selected:Ft})=>[Je?ot((K(),Ce("span",{key:0,class:z([Z.$style["item-label"],Z.$style.match]),style:{flex:"1"},innerHTML:Me(ce.label)},null,10,j8)),[[W(i),{content:ce.label}]]):ot((K(),Ce("span",{key:1,class:z(Z.$style["item-label"]),style:{flex:"1"}},[dt(bt(ce.label),1)],2)),[[W(i),{content:ce.label}]]),we("div",{class:z(Z.$style["item-action"])},[ot((K(),Xe(pt,{variant:["icon","tertiary"],size:24,highlightOnHover:!0,disabled:W(b),onClick:on(He=>re(ce),["stop","prevent"])},{prefix:Ee(()=>[ve(mt,{src:Ft?"UserMinus":"UserPlus",source:"remote"},null,8,["src"])]),_:2},1032,["disabled","onClick"])),[[W(i),Ft?"Unassign":"Assign"]]),ot((K(),Xe(pt,{variant:["icon","tertiary"],size:24,highlightOnHover:!0,disabled:W(b),onClick:on(He=>{var en;return W(F)((en=ce.data)==null?void 0:en.id)},["stop","prevent"])},{prefix:Ee(()=>[ve(mt,{src:"IdCardClip",source:"remote"})]),_:1},8,["disabled","onClick"])),[[W(i),"Unassign others and reassign"]])],2)]),_:2},1040,["hover","selected","type","onClick","onMouseover","class"])]),"empty-list":Ee(()=>[we("div",{class:z(Z.$style["empty-state"])},[$[4]||($[4]=dt(" No assignee available. ",-1)),$[5]||($[5]=we("br",null,null,-1)),ve(pt,{onClick:B,variant:["tertiary"],size:"small"},{default:Ee(()=>[...$[3]||($[3]=[dt(" Go to Access Settings to add team. ",-1)])]),_:1})],2)]),_:2},[h.value?{name:"error",fn:Ee(()=>[we("div",{class:z(Z.$style["error-message"])},[dt(bt(h.value)+" ",1),ve(pt,{onClick:H,size:"small"},{default:Ee(()=>[...$[2]||($[2]=[dt(" Retry ",-1)])]),_:1})],2)]),key:"0"}:void 0]),1040,["selected-id","options","loading","loading-more","has-more","onSearch"]))}}),[["__cssModules",{$style:{action:"_action_1dg6a_1","item-assignee":"_item-assignee_1dg6a_6","item-action":"_item-action_1dg6a_6","item-label":"_item-label_1dg6a_16","unassign-icon":"_unassign-icon_1dg6a_25","error-message":"_error-message_1dg6a_36","empty-state":"_empty-state_1dg6a_46"}}]]),q8=ct({__name:"AssignneeUpdateButton",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{},variant:{}},emits:["update"],setup(e,{emit:t}){const n=e;Ta("bulkUpdate",!0);const i=t,o=Y(null),s=f=>{var g;h.value=!1,i("update",f),(g=o.value)==null||g.clearInternal()},{triggerRef:r,popupRef:a,hide:l,isVisible:c}=tr(),u=Y(null),d=f=>{f.key==="Escape"&&a.value&&l()};Sn(()=>{var g;const f=u.value instanceof HTMLElement?u.value:(g=u.value)==null?void 0:g.$el;f&&f.addEventListener("keydown",d)}),qn(()=>{var g;const f=u.value instanceof HTMLElement?u.value:(g=u.value)==null?void 0:g.$el;f&&f.removeEventListener("keydown",d)}),ut(c,f=>{var g,m;f?(g=o.value)==null||g.focus():(m=o.value)==null||m.clearInternal()});const h=Y(!1);return(f,g)=>(K(),Ce("div",{ref_key:"mainRef",ref:u},[we("div",{ref_key:"triggerRef",ref:r},[ve(pt,{class:"action-button",variant:n.variant,loading:h.value},{default:Ee(()=>[ve(mt,{src:"UserPlus",class:"icon"}),g[1]||(g[1]=dt(" Assignee ",-1))]),_:1},8,["variant","loading"])],512),we("div",{ref_key:"popupRef",ref:a,style:{display:"none"}},[W(c)?(K(),Xe(UP,_n({key:0,ref_key:"assigneeGroupEditorRef",ref:o},n,{ids:e.ids,onUpdated:s,onStartUpdate:g[0]||(g[0]=m=>h.value=!0)}),null,16,["ids"])):it("",!0)],512)],512))}}),Y8=["aria-label"],Z8=["disabled","readOnly","aria-label","data-date","data-weekday","tabindex","onClick"],X8=Ct(ct({__name:"MainCalendar",props:yE({year:{},month:{},startDate:{},endDate:{},timezone:{default:"UTC"},activeField:{default:"start"},requireConfirm:{type:Boolean,default:!1},locale:{default:"en-US"},weekdayLabelStyle:{default:"narrow"},weekStart:{default:0},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Confirm"},immediatelyUpdate:{type:Boolean,default:!1},disabled:{type:Boolean},readOnly:{type:Boolean},disableConfirm:{type:Boolean,default:!1}},{tracingCase:{default:()=>({case:"",behavior:""})},tracingCaseModifiers:{}}),emits:yE(["select-start","select-end","select-start-utc","select-end-utc","update:activeField","update:tracingCase","update:month","update:year","close","confirm","cancel"],["update:tracingCase"]),setup(e,{emit:t}){const n=e,i=q(()=>n.startDate&&n.endDate),o=pV(e,"tracingCase"),s=t,r=Y(n.year),a=Y(n.month);ut(()=>[n.year,n.month],([B,G])=>{r.value=B,a.value=G});const l=q(()=>tt.fromObject({year:r.value,month:a.value,day:1},{zone:n.timezone}).setLocale(n.locale||"en-US").toFormat("LLLL yyyy")),c=q(()=>tt.now().setZone(n.timezone)),u=q(()=>n.startDate?tt.fromJSDate(n.startDate,{zone:n.timezone}):null),d=q(()=>n.endDate?tt.fromJSDate(n.endDate,{zone:n.timezone}):null),h=Y(u.value),f=Y(d.value),g=Y(u.value),m=Y(d.value);ut([u,d],()=>{n.requireConfirm||(h.value=u.value,f.value=d.value,g.value=u.value,m.value=d.value)},{immediate:!0});const y=q(()=>n.requireConfirm?h.value:u.value),b=q(()=>n.requireConfirm?f.value:d.value);ut(()=>n.activeField,B=>{const G=B==="start"?y.value:b.value;G&&(r.value=G.year,a.value=G.month)}),ut(()=>{var B,G;return[(B=y.value)==null?void 0:B.toISODate(),(G=b.value)==null?void 0:G.toISODate(),n.activeField]},()=>{const B=n.activeField==="start"?y.value:b.value;B&&(B.year!==r.value||B.month!==a.value)&&(r.value=B.year,a.value=B.month)});function S(B){return B.setZone("utc")}const F=Y("");function C(B){F.value=B.toISODate()||"",Xt(()=>{const G=document.querySelector(`.arbo-calendar-day[data-date="${F.value}"]`);G==null||G.focus()})}ut(()=>{var B,G;return[r.value,a.value,n.activeField,(B=y.value)==null?void 0:B.toISODate(),(G=b.value)==null?void 0:G.toISODate()]},()=>{const B=n.activeField==="start"?y.value:b.value;let G;B&&B.year===r.value&&B.month===a.value?G=B:y.value&&y.value.year===r.value&&y.value.month===a.value?G=y.value:G=c.value,C(G)});function R(B){return B.toFormat("d")}const E=q(()=>{const B=tt.fromObject({year:r.value,month:a.value,day:1},{zone:n.timezone}),G=B.weekday,Z=n.weekStart===1?(G+6)%7:G%7;let $=B.minus({days:Z});const ce=[],ue=hc.weekdays(n.weekdayLabelStyle||"short",{locale:n.locale||"en-US"}),xe=_f();for(let Ie=0;Ie<42;Ie++){const Me=[];$.month!==a.value&&Me.push(xe["is-outside"]),$.hasSame(c.value,"day")&&Me.push(xe["is-today"]),y.value&&$.hasSame(y.value,"day")&&Me.push(xe["is-selected-start"]),b.value&&$.hasSame(b.value,"day")&&Me.push(xe["is-selected-end"]),y.value&&b.value&&$>y.value&&$<b.value&&Me.push(xe["is-in-range"]);const Je=R($),gt=ue[$.weekday-1]||"";ce.push({dt:$,iso:$.toISODate()||"",label:$.toFormat("d"),displayLabel:Je,weekdayLabel:gt,aria:$.setLocale(n.locale||"en-US").toFormat("cccc, d LLLL yyyy"),classes:Me}),$=$.plus({days:1})}const re=[];for(let Ie=0;Ie<6;Ie++)re.push(ce.slice(Ie*7,Ie*7+7));return re}),x=q(()=>{const B=hc.weekdays(n.weekdayLabelStyle||"short",{locale:n.locale||"en-US"});return n.weekStart===1?B:[B[6],...B.slice(0,6)]});function k(B,G,Z){const $=B==="start"?G.startOf("day"):G.endOf("day"),ce=S($),ue={year:$.year,month:$.month,day:$.day,utc:ce.toISO()||""};B==="start"?(s("select-start",ue,Z??!0),s("select-start-utc",ue.utc)):(s("select-end",ue),s("select-end-utc",ue.utc))}function O(B){let G=r.value,Z=a.value+B;for(;Z<1;)Z+=12,G-=1;for(;Z>12;)Z-=12,G+=1;r.value=G,a.value=Z,s("update:year",G),s("update:month",Z)}function A(B){const Z=(F.value?tt.fromISO(F.value,{zone:n.timezone}):c.value).plus({days:B});(Z.month!==a.value||Z.year!==r.value)&&(a.value=Z.month,r.value=Z.year,s("update:year",Z.year),s("update:month",Z.month)),C(Z)}function D(B=!1){const Z=(F.value?tt.fromISO(F.value,{zone:n.timezone}):c.value).weekday%7,$=B?6-Z:-Z;A($)}function P(B){switch(B.key){case"ArrowLeft":B.preventDefault(),A(-1);break;case"ArrowRight":B.preventDefault(),A(1);break;case"ArrowUp":B.preventDefault(),A(-7);break;case"ArrowDown":B.preventDefault(),A(7);break;case"Home":B.preventDefault(),D(!1);break;case"End":B.preventDefault(),D(!0);break;case"PageUp":B.preventDefault(),O(B.shiftKey?-12:-1);break;case"PageDown":B.preventDefault(),O(B.shiftKey?12:1);break;case"Enter":case" ":{B.preventDefault();const G=F.value?tt.fromISO(F.value,{zone:n.timezone}):c.value,Z=E.value.flat().find($=>$.iso===G.toISODate());Z&&V(Z);break}}}function V(B){var He,en;const G=!!u.value,Z=!!d.value,$=n.activeField,ce=((He=u.value)==null?void 0:He.toISODate())||"null",ue=((en=d.value)==null?void 0:en.toISODate())||"null",xe=B.dt.toISODate()||"",re=(tn,At)=>{o.value={case:tn,behavior:At}},Ie=()=>`Selected start ${xe} > existing end ${ue} -> reset both to ${xe}`,Me=()=>`Selected end ${xe} < existing start ${ce} -> reset both to ${xe}`,Je=()=>{k("start",B.dt,!0),k("end",B.dt),s("update:activeField","end")},gt=(tn=!1)=>{k("start",B.dt,tn),tn&&s("update:activeField","end")},Ft=(tn=!1)=>{console.trace("doSelectEnd called with closeAfter:",tn,n.immediatelyUpdate),k("end",B.dt),tn&&s("close")};if(G&&Z){$==="start"?d.value&&B.dt>d.value?(Je(),re("INVERT_RANGE_FROM_START",Ie())):(gt(!1),re("UPDATE_START_IN_RANGE",`Updated start from ${ce} to ${xe}; end remains ${ue}`)):u.value&&B.dt<u.value?(Je(),re("INVERT_RANGE_FROM_END",Me())):(Ft(!1),re("UPDATE_END_IN_RANGE",`Updated end from ${ue} to ${xe}; start remains ${ce}`));return}if(!G&&Z&&$==="start"&&d.value&&B.dt>d.value){Je(),re("CREATE_RANGE_FROM_LATE_START",Ie());return}if(G&&!Z&&$==="end"&&u.value&&B.dt<u.value){Je(),re("CREATE_RANGE_FROM_EARLY_END",Me());return}if(!G&&!Z){if($==="start"){gt(!0),re("INIT_START",`Picked start ${xe}; awaiting end selection`);return}Ft(n.immediatelyUpdate),re("INIT_END",`Picked end ${xe}; awaiting start selection`);return}if(!G&&Z){if($==="start"){gt(!0),re("FILL_MISSING_START",`Inserted start ${xe}; existing end ${ue}`);return}Ft(!1),re("STRICT_UPDATE_END_ONLY",`Updated end to ${xe}; start still null`);return}if(G&&!Z){if($==="start"){gt(!0),re("RESELECT_START_BEFORE_END",`Replaced start with ${xe}; end still null, switching to end`);return}Ft(n.immediatelyUpdate),re("FILL_MISSING_END",`Picked end ${xe}; start ${ce}`);return}}function H(){g.value=h.value,m.value=f.value,s("confirm")}function te(){h.value=g.value,f.value=m.value,s("cancel")}return(B,G)=>(K(),Ce("div",{class:z([B.$style["arbo-calendar"],{[B.$style["arbo-date-range-picker"]]:i.value}]),role:"grid","aria-label":l.value,tabindex:"0",onKeydown:P},[we("div",{class:z([B.$style["arbo-calendar-header"],B.$style["arbo-calendar-week"]]),role:"row"},[(K(!0),Ce(Ot,null,Un(x.value,Z=>(K(),Ce("div",{key:Z,class:z(B.$style["arbo-calendar-weekday"]),role:"columnheader"},bt(Z),3))),128))],2),we("div",{class:z(B.$style["arbo-calendar-weeks"])},[(K(!0),Ce(Ot,null,Un(E.value,(Z,$)=>(K(),Ce("div",{key:$,class:z(B.$style["arbo-calendar-week"]),role:"row"},[(K(!0),Ce(Ot,null,Un(Z,ce=>(K(),Ce("div",{key:ce.iso,class:z([B.$style["arbo-calendar-day"],ce.classes,{[B.$style["is-focused"]]:ce.iso===F.value}]),disabled:n.disabled,readOnly:n.readOnly,role:"gridcell","aria-label":ce.aria,"data-date":ce.iso,"data-weekday":ce.weekdayLabel,tabindex:ce.iso===F.value?0:-1,onClick:ue=>V(ce)},bt(ce.displayLabel),11,Z8))),128))],2))),128))],2),n.readOnly?it("",!0):(K(),Ce("div",{key:0,class:z(B.$style["arbo-calendar-actions"])},[ve(pt,{disabled:n.disabled,readOnly:n.readOnly,variant:"secondary",size:"medium",onClick:te},{default:Ee(()=>[dt(bt(n.cancelLabel),1)]),_:1},8,["disabled","readOnly"]),ve(pt,{disabled:n.disabled||n.disableConfirm,readOnly:n.readOnly,variant:"primary",size:"medium",onClick:H},{default:Ee(()=>[dt(bt(n.confirmLabel),1)]),_:1},8,["disabled","readOnly"])],2))],42,Y8))}}),[["__cssModules",{$style:{"arbo-date-range-picker":"_arbo-date-range-picker_1xc07_1","arbo-calendar-day":"_arbo-calendar-day_1xc07_2","arbo-calendar-week":"_arbo-calendar-week_1xc07_3","arbo-calendar":"_arbo-calendar_1xc07_2","arbo-calendar-nav":"_arbo-calendar-nav_1xc07_37","arbo-calendar-nav-btn":"_arbo-calendar-nav-btn_1xc07_45","arbo-calendar-nav-label":"_arbo-calendar-nav-label_1xc07_52","arbo-calendar-weekday":"_arbo-calendar-weekday_1xc07_57","arbo-calendar-weeks":"_arbo-calendar-weeks_1xc07_62","is-today":"_is-today_1xc07_93","is-selected-start":"_is-selected-start_1xc07_99","is-outside":"_is-outside_1xc07_108","is-selected-end":"_is-selected-end_1xc07_108","is-in-range":"_is-in-range_1xc07_136","arbo-calendar-actions":"_arbo-calendar-actions_1xc07_141","arbo-calendar-btn":"_arbo-calendar-btn_1xc07_150",cancel:"_cancel_1xc07_159",confirm:"_confirm_1xc07_164"}}]]),J8=Ct(ct({__name:"CalendarNavigationControl",props:{year:{},month:{},minYear:{default:1970},maxYear:{default:2100},yearSpan:{default:12},monthLabels:{},locale:{default:"en-US"},monthLabelStyle:{default:"short"},ariaPrevLabel:{default:"Previous"},ariaNextLabel:{default:"Next"},ariaToolbarLabel:{default:"Calendar navigation"},ariaSelectYearLabel:{default:"Select year"},ariaSelectMonthLabel:{default:"Select month"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:year","update:month","mode-change","year-selected","month-selected"],setup(e,{emit:t}){const n=e,i=q(()=>{if(n.monthLabels&&n.monthLabels.length===12)return n.monthLabels;const D=n.locale||"en-US",P=n.monthLabelStyle||"short",V=new Intl.DateTimeFormat(D,{month:P,timeZone:"UTC"});return Array.from({length:12},(te,B)=>V.format(new Date(Date.UTC(2020,B,1))))}),o=t,s=Y(n.year),r=Y(n.month);ut(()=>n.year,D=>{D!==s.value&&(s.value=D)}),ut(()=>n.month,D=>{D!==r.value&&(r.value=D)});const a=Y("days");function l(D){a.value!==D&&(a.value=D,o("mode-change",D))}const c=q(()=>n.minYear),u=q(()=>n.maxYear),d=q(()=>{const D=n.yearSpan;return s.value-s.value%D}),h=q(()=>d.value+n.yearSpan-1);function f(){const D=n.yearSpan,P=d.value-D;P>=c.value&&(s.value=P)}function g(){const D=n.yearSpan,P=d.value+D;P<=u.value&&(s.value=P)}const m=q(()=>d.value-n.yearSpan<c.value),y=q(()=>h.value+n.yearSpan>u.value),b=q(()=>{const D=n.yearSpan;return Math.ceil(D/3)});function S(D){const V=d.value+(D-1)*3;return Array.from({length:3},(H,te)=>V+te).filter(H=>H<=h.value)}function F(){a.value==="months"?l("days"):l("months")}function C(){a.value==="years"?l("days"):l("years")}function R(D){s.value=D,o("update:year",D),o("year-selected",D),l("months")}function E(D){r.value=D,o("update:month",D),o("month-selected",D),l("days")}function x(){if(a.value==="days"){let D=s.value,P=r.value-1;if(P<1&&(P=12,D--),D<c.value)return;s.value=D,r.value=P,o("update:year",D),o("update:month",P)}else if(a.value==="months"){if(s.value-1<c.value)return;s.value--,o("update:year",s.value)}else a.value==="years"&&f()}function k(){if(a.value==="days"){let D=s.value,P=r.value+1;if(P>12&&(P=1,D++),D>u.value)return;s.value=D,r.value=P,o("update:year",D),o("update:month",P)}else if(a.value==="months"){if(s.value+1>u.value)return;s.value++,o("update:year",s.value)}else a.value==="years"&&g()}const O=q(()=>a.value==="days"?s.value===c.value&&r.value===1:a.value==="months"?s.value-1<c.value:m.value),A=q(()=>a.value==="days"?s.value===u.value&&r.value===12:a.value==="months"?s.value+1>u.value:y.value);return(D,P)=>(K(),Ce("div",{class:z(D.$style["cal-nav-wrapper"])},[_t(D.$slots,"selection"),we("div",{class:z(D.$style["cal-nav-bar"]),role:"toolbar","aria-label":"Calendar navigation"},[ve(pt,{variant:"secondary",class:z([D.$style["cal-nav-btn"],D.$style.prev]),"aria-label":"Previous",disabled:O.value,label:"",onClick:x},{default:Ee(()=>[ve(mt,{src:"ChevronLeft",source:"remote"})]),_:1},8,["class","disabled"]),we("div",{class:z(D.$style["cal-nav-center"])},[ve(pt,{"aria-pressed":a.value==="months",onClick:F,variant:"secondary"},{default:Ee(()=>[dt(bt(i.value[r.value-1]),1)]),_:1},8,["aria-pressed"]),ve(pt,{variant:"secondary","aria-pressed":a.value==="years",onClick:C},{default:Ee(()=>[dt(bt(s.value),1)]),_:1},8,["aria-pressed"])],2),ve(pt,{variant:"secondary",class:z([D.$style["cal-nav-btn"],D.$style.next]),"aria-label":"Next",disabled:A.value,label:"",onClick:k},{default:Ee(()=>[ve(mt,{src:"ChevronRight",source:"remote"})]),_:1},8,["class","disabled"])],2),a.value==="years"?(K(),Ce("div",{key:0,class:z(D.$style["year-grid"])},[we("div",{class:z(D.$style["year-grid-header"])},[ve(pt,{variant:"secondary",class:z([D.$style["cal-nav-btn"],D.$style.prev]),"aria-label":"Next",disabled:m.value,"prefix-icon":"AnglesRight",label:"",onClick:f},{default:Ee(()=>[ve(mt,{src:"AnglesRight",source:"remote",class:z(D.$style["arbo-label__prefix--icon"])},null,8,["class"])]),_:1},8,["class","disabled"]),we("div",{class:z(D.$style["range-label"])},bt(d.value)+" - "+bt(h.value),3),ve(pt,{variant:"secondary",class:z([D.$style["cal-nav-btn"],D.$style.next]),"aria-label":"Next",disabled:y.value,"prefix-icon":"AnglesRight",label:"",onClick:g},{default:Ee(()=>[ve(mt,{src:"AnglesRight",source:"remote",class:z(D.$style["arbo-label__prefix--icon"])},null,8,["class"])]),_:1},8,["class","disabled"])],2),we("div",{class:z(D.$style["year-grid-body"]),role:"grid"},[(K(!0),Ce(Ot,null,Un(b.value,V=>(K(),Ce("div",{key:"yr-row-"+V,class:z(D.$style["year-grid-row"]),role:"row"},[(K(!0),Ce(Ot,null,Un(S(V),H=>(K(),Xe(pt,{key:H,variant:"secondary",class:z([D.$style["year-cell"],{[D.$style.selected]:H===s.value}]),role:"gridcell",disabled:H<c.value||H>u.value,onClick:te=>R(H)},{default:Ee(()=>[dt(bt(H),1)]),_:2},1032,["class","disabled","onClick"]))),128))],2))),128))],2)],2)):a.value==="months"?(K(),Ce("div",{key:1,class:z(D.$style["month-grid"]),role:"dialog","aria-label":"Select month"},[we("div",{class:z(D.$style.months),role:"grid"},[(K(!0),Ce(Ot,null,Un(i.value,(V,H)=>(K(),Xe(pt,{disabled:n.disabled,"read-only":n.readOnly,key:V,variant:"secondary",class:z([D.$style["month-cell"],{[D.$style.selected]:H+1===r.value}]),role:"gridcell",onClick:te=>E(H+1)},{default:Ee(()=>[dt(bt(V),1)]),_:2},1032,["disabled","read-only","class","onClick"]))),128))],2)],2)):(K(),Ce("div",{key:2,class:z(D.$style["days-slot"])},[_t(D.$slots,"default",{year:s.value,month:r.value,mode:a.value})],2))],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_lnmem_1","cal-nav-bar":"_cal-nav-bar_lnmem_11","cal-nav-btn":"_cal-nav-btn_lnmem_19","year-grid-header":"_year-grid-header_lnmem_33",prev:"_prev_lnmem_33","cal-nav-center":"_cal-nav-center_lnmem_45","cal-nav-label":"_cal-nav-label_lnmem_51","month-grid":"_month-grid_lnmem_65","year-grid":"_year-grid_lnmem_33",months:"_months_lnmem_78","month-cell":"_month-cell_lnmem_85","pg-btn":"_pg-btn_lnmem_100","year-grid-body":"_year-grid-body_lnmem_113","year-grid-row":"_year-grid-row_lnmem_120","year-cell":"_year-cell_lnmem_126",selected:"_selected_lnmem_134","days-slot":"_days-slot_lnmem_143","range-label":"_range-label_lnmem_147"}}]]);function Q8(e){const{format:t="dd/MM/yyyy",timezone:n="local",minDate:i,maxDate:o}=e,s=Y(""),r=q(()=>{const m=tt.fromFormat(s.value,t,{zone:n});return m.isValid?m:null}),a=q(()=>{if(!i||!r.value)return!0;const m={year:i.getFullYear(),month:i.getMonth()+1,day:i.getDate()},y={year:r.value.year,month:r.value.month,day:r.value.day};return y.year>m.year?!0:y.year<m.year?!1:y.month>m.month?!0:y.month<m.month?!1:l(y,m)>=0}),l=(m,y)=>{const b=new Date(m.year,m.month-1,m.day),S=new Date(y.year,y.month-1,y.day);return b<S?-1:b>S?1:0},c=q(()=>{if(!o||!r.value)return!0;const m={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},y={year:r.value.year,month:r.value.month,day:r.value.day};return y.year<m.year?!0:y.year>m.year?!1:y.month<m.month?!0:y.month>m.month?!1:l(y,m)<=0}),u=q(()=>s.value.length==0||s.value.length>0&&r.value!==null&&a.value&&c.value),d=q(()=>s.value.length===t.length&&u.value);return{inputValue:s,isValid:u,isComplete:d,clear:()=>{s.value=""},setDate:m=>{let y;m instanceof Date?y=tt.fromJSDate(m,{zone:n}):y=m.setZone(n),y.isValid?s.value=y.toFormat(t):s.value=""},getDate:()=>u.value?r.value:null}}const eK=["disabled","readonly","placeholder"],zP=Ct(ct({__name:"DateInput",props:{modelValue:{},format:{default:"dd/MM/yyyy"},showDebug:{type:Boolean,default:!0},allowPastDates:{type:Boolean,default:!0},allowFutureDates:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},timezone:{default:""},placeholder:{default:""},size:{},minDate:{default:void 0},maxDate:{default:void 0}},emits:["complete","invalid","clear"],setup(e,{expose:t,emit:n}){const i=mn,o=e,s=n,r=Y(null),a=Y(null),{isValid:l,isComplete:c,inputValue:u,clear:d,setDate:h,getDate:f}=Q8({format:o.format,allowPastDates:o.allowPastDates,allowFutureDates:o.allowFutureDates,timezone:o.timezone,minDate:o.minDate,maxDate:o.maxDate}),g=q(()=>o.active),m=q(()=>({disabled:o.disabled,error:!l.value&&u.value.length>0,readOnly:o.readOnly,isEmpty:u.value.length===0,inputRef:r,wrapperRef:a,active:g})),{argsMain:y,isHover:b,isFocus:S}=or(m),F=R=>{var x;const E=(x=R.clipboardData)==null?void 0:x.getData("text/plain");E&&(u.value=E.trim())},C=()=>{d(),s("clear")};return t({clear:C,setDate:h,getDate:f,focus:()=>{var R;return(R=r.value)==null?void 0:R.focus()}}),ut(()=>o.modelValue,R=>{R?h(R):d()},{immediate:!0}),ut([()=>c.value,()=>u.value],()=>{if(u.value.length===0){s("complete",null);return}else if(l.value&&!o.readOnly&&!o.disabled&&c.value){const R=f();(R||u.value.length===0)&&s("complete",R)}}),ut(()=>l.value,R=>{R||s("invalid","")}),(R,E)=>(K(),Xe(sr,_n(W(y),{ref_key:"wrapperRef",ref:a,size:26,style:{padding:0,background:"var(--bg-secondary,)"}}),{default:Ee(()=>{var x;return[we("div",{class:z([R.$style["date-input-wrapper"]])},[ve(mt,{src:"Calendar",source:"remote",class:z(R.$style["icon-calendar"]),color:"var(--primary-color)"},null,8,["class"]),ot(we("input",{disabled:o.disabled,readonly:o.readOnly,ref_key:"inputRef",ref:r,type:"text","onUpdate:modelValue":E[0]||(E[0]=k=>Zt(u)?u.value=k:null),onPaste:on(F,["prevent"]),placeholder:(x=o.format)==null?void 0:x.toLocaleUpperCase(),class:z([R.$style["date-input"]])},null,42,eK),[[IR,W(u)]]),_t(R.$slots,"clear",{handleClear:C},()=>[W(u).length>0&&!o.readOnly&&!o.disabled&&(W(b)||W(S))?ot((K(),Xe(pt,{key:0,variant:["icon","primary"],onClick:on(C,["stop"]),size:16,rounded:!0},{default:Ee(()=>[ve(mt,{src:"XMarkSolid",source:"remote",size:"8",color:"white"})]),_:1})),[[W(i),"Clear"]]):it("",!0)])],2)]}),_:3},16))}}),[["__cssModules",{$style:{"date-input-wrapper":"_date-input-wrapper_fako3_1","icon-calendar":"_icon-calendar_fako3_9",focus:"_focus_fako3_12",hover:"_hover_fako3_12",active:"_active_fako3_12","date-input":"_date-input_fako3_1",invalid:"_invalid_fako3_38"}}]]),tK=ct({__name:"Calendar",props:{params:{},label:{},value:{},timezone:{default:pC()},format:{default:"LLL dd"},placeholder:{},enableRangeFeedback:{type:Boolean},messages:{},isCompleted:{type:Boolean},isStarted:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{},duePlaceholder:{default:"No due"},startPlaceholder:{default:"No start"},startTooltip:{default:"Select start date"},dueTooltip:{default:"Select due date"},showCalendarIcon:{type:Boolean,default:!0},locale:{default:"en-US"},immediatelyUpdate:{type:Boolean,default:!1}},emits:["clearStart","clearDue","clearAll","update","update:start","update:end","range:invalid","range:corrected","tracing","confirmed","closed","start-update","finish-update"],setup(e,{expose:t,emit:n}){const i=Y({case:"",behavior:""}),o=e,s=Y(null),r=n,a=async(ce,ue)=>{var xe,re;r("start-update"),await ce(),(re=(xe=o.params)==null?void 0:xe.api)==null||re.stopEditing(),Xt(()=>{ue(),r("finish-update")})},l=(ce,ue)=>{var xe,re;ce(),(re=(xe=o.params)==null?void 0:xe.api)==null||re.stopEditing(),Xt(()=>{ue()})},c=Mo({start:!1,end:!1}),{states:u,selectEndDate:d,cancelSelection:h,confirmSelection:f,selectStartDate:g,beginInteraction:m,clearStart:y,clearDue:b}=Q6(o,r,i),S=q(()=>{if(u.isSelectingStart)return"start";if(u.isSelectingEnd)return"end"}),F=ce=>{if(!ce){c.start=!1,y();return}const ue=u.endDate?tt.fromJSDate(u.endDate,{zone:o.timezone}):null;if(ue&&C(ce,ue)>0){const re={year:ce.year,month:ce.month,day:ce.day};c.start=!1,g(re,!1),d(re),Xt(()=>{u.isSelectingStart=!0,u.isSelectingEnd=!1});return}const xe={year:ce.year,month:ce.month,day:ce.day};c.start=!1,g(xe,!0)},C=(ce,ue)=>{const xe=ce.startOf("day"),re=ue.startOf("day");return xe<re?-1:xe>re?1:0},R=ce=>{if(!ce){c.end=!1,b();return}const ue=u.startDate?tt.fromJSDate(u.startDate,{zone:o.timezone}):null;if(ue&&C(ce,ue)<0){const re={year:ce.year,month:ce.month,day:ce.day};c.end=!1,g(re),d(re),Xt(()=>{u.isSelectingEnd=!0,u.isSelectingStart=!1});return}const xe={year:ce.year,month:ce.month,day:ce.day};c.end=!1,d(xe)},E=()=>{y()},x=()=>{b()},k=()=>{P()},O=q(()=>u.isSelectingStart||u.isSelectingEnd);function A(){o.disabled||o.readOnly||(m(),u.isSelectingStart=!0,u.isSelectingEnd=!1)}function D(){o.disabled||o.readOnly||(m(),u.isSelectingEnd=!0,u.isSelectingStart=!1)}function P(){u.isSelectingStart=!1,u.isSelectingEnd=!1,r("closed")}function V(ce){ce.key==="Escape"&&(ce.stopPropagation(),P())}const H=Y(new Date().getFullYear()),te=Y(new Date().getMonth()+1);ut(()=>[u.isSelectingStart,u.isSelectingEnd,u.startDate,u.endDate],()=>{u.isSelectingStart&&u.startDate?(H.value=u.startDate.getFullYear(),te.value=u.startDate.getMonth()+1):u.isSelectingEnd&&u.endDate&&(H.value=u.endDate.getFullYear(),te.value=u.endDate.getMonth()+1)},{immediate:!0});const B=Y(null);function G(){if(Array.isArray(o.value)){const[ue,xe]=o.value;u.startDate=ue||null,u.endDate=xe||null}u.isSelectingStart=!1,u.isSelectingEnd=!1;const ce=u.startDate||u.endDate||new Date;H.value=ce.getFullYear(),te.value=ce.getMonth()+1}ut(()=>{var ce,ue,xe,re,Ie,Me,Je,gt;return[((xe=(ue=(ce=o.value)==null?void 0:ce[0])==null?void 0:ue.getTime)==null?void 0:xe.call(ue))||((re=o.value)==null?void 0:re[0]),((Je=(Me=(Ie=o.value)==null?void 0:Ie[1])==null?void 0:Me.getTime)==null?void 0:Je.call(Me))||((gt=o.value)==null?void 0:gt[1]),o.timezone,o.format,o.placeholder,o.enableRangeFeedback]},()=>{G()},{immediate:!0,deep:!0}),t({resetCalendarLogic:G,openStart:A,openEnd:D,closePicker:P,clearAll:k,isOpen:O,drpRef:B,getValues:()=>({startDate:u.startDate,endDate:u.endDate,dateRange:[u.startDate,u.endDate]}),focus:()=>{var ce;u.startDate||u.endDate?u.startDate?A():D():(A(),(ce=s.value)==null||ce.focus())}});const $=Y(null);return ut(()=>O.value,ce=>{if(o.disabled||o.readOnly)return;const ue=$.value;ue&&(ce?ue.show():ue.hide())},{immediate:!0}),(ce,ue)=>(K(),Ce("div",{class:z(ce.$style["calendar-wrapper"])},[ve(J8,{year:H.value,"onUpdate:year":ue[6]||(ue[6]=xe=>H.value=xe),month:te.value,"onUpdate:month":ue[7]||(ue[7]=xe=>te.value=xe),locale:o.locale,disabled:o.disabled,readOnly:o.readOnly,onKeydown:V},{selection:Ee(()=>[we("div",{class:z(ce.$style["calendar-input-section"])},[ve(zP,{ref_key:"starDateRef",ref:s,"model-value":W(u).startDate,placeholder:o.startPlaceholder,timezone:o.timezone,active:W(u).isSelectingStart,onClick:A,onClear:E,onComplete:F,onInvalid:ue[0]||(ue[0]=xe=>c.start=!0),disabled:o.disabled,readOnly:o.readOnly},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"]),ve(zP,{"model-value":W(u).endDate,placeholder:o.duePlaceholder,timezone:o.timezone,active:W(u).isSelectingEnd,onClick:D,onClear:x,disabled:o.disabled,onComplete:R,onInvalid:ue[1]||(ue[1]=xe=>c.end=!0),readOnly:o.readOnly},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"])],2)]),default:Ee(({year:xe,month:re})=>[ve(X8,{disabled:o.disabled,disableConfirm:c.end||c.start,readOnly:o.readOnly,ref_key:"drpRef",ref:B,"tracing-case":i.value,"onUpdate:tracingCase":ue[2]||(ue[2]=Ie=>i.value=Ie),year:xe,month:re,"start-date":W(u).startDate,"end-date":W(u).endDate,"active-field":S.value,timezone:o.timezone,immediatelyUpdate:e.immediatelyUpdate,onSelectStart:W(g),onSelectEnd:W(d),onConfirm:ue[3]||(ue[3]=()=>{a(W(f),P)}),onCancel:ue[4]||(ue[4]=Ie=>l(W(h),P)),onClose:ue[5]||(ue[5]=Ie=>a(W(f),P))},null,8,["disabled","disableConfirm","readOnly","tracing-case","year","month","start-date","end-date","active-field","timezone","immediatelyUpdate","onSelectStart","onSelectEnd"])]),_:1},8,["year","month","locale","disabled","readOnly"])],2))}}),jP=Ct(tK,[["__cssModules",{$style:{"calendar-wrapper":"_calendar-wrapper_f7hcw_1","calendar-input-section":"_calendar-input-section_f7hcw_10","display-wrapper":"_display-wrapper_f7hcw_18","calendar-actions":"_calendar-actions_f7hcw_22","clear-all-btn":"_clear-all-btn_f7hcw_28"}}]]),nK={ref:"mainRef"},iK=ct({__name:"DateUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{}},emits:["updated"],setup(e,{emit:t}){const n=t,i=e,o=ki("bulkUpdate",!1),{apiServices:s}=vo(!o,i),r=async g=>{var y,b;f.value=!0;const m={workspaceId:i.workspaceId,itemIds:i.ids,startDate:g.start?NF(g.start):null,dueDate:g.end?NF(g.end):null};await((b=(y=s.value)==null?void 0:y.changeDate)==null?void 0:b.call(y,m).then(()=>{n("updated",{workspaceId:i.workspaceId,itemIds:i.ids,data:[g.start,g.end]})})),f.value=!1};ut(()=>i.ids,g=>{h.value=[null,null]});const a=Y(null),{triggerRef:l,popupRef:c,hide:u,isVisible:d}=tr(),h=Y([null,null]);ut(d,g=>{var m;g&&((m=a.value)==null||m.focus())});const f=Y(!1);return(g,m)=>(K(),Ce("div",nK,[we("div",{ref_key:"triggerRef",ref:l},[ve(pt,{variant:i.variant,loading:f.value},{default:Ee(()=>[ve(mt,{src:"Calendar"}),m[1]||(m[1]=dt(" Date ",-1))]),_:1},8,["variant","loading"])],512),we("div",{ref_key:"popupRef",ref:c,style:{display:"none"}},[ve(jP,{immediatelyUpdate:!1,value:h.value,onConfirmed:r,ref_key:"calendarRef",ref:a,onClosed:W(u),onStartUpdate:m[0]||(m[0]=y=>f.value=!0)},null,8,["value","onClosed"])],512)],512))}}),KP=Ct(ct({__name:"DropdownWrapper",props:{placement:{default:"bottom-start"},show:{type:Boolean,default:!1},maxWidth:{default:400}},emits:["open","close"],setup(e,{expose:t,emit:n}){const i=e,o=n,{hide:s,triggerRef:r,popupRef:a,isVisible:l}=tr({placement:i.placement,trigger:"click",interactive:!0,arrow:!1,offset:[0,4],showOnInit:i.show,maxWidth:i.maxWidth}),c=q(()=>l.value);ut(l,h=>{o(h?"open":"close")});const u=()=>{s()};t({closeDropdown:u,isOpen:c});const d=h=>{h.key==="Escape"&&a.value&&s()};return Sn(()=>{var f;const h=r.value instanceof HTMLElement?r.value:(f=r.value)==null?void 0:f.$el;h&&h.addEventListener("keydown",d)}),qn(()=>{var f;const h=r.value instanceof HTMLElement?r.value:(f=r.value)==null?void 0:f.$el;h&&h.removeEventListener("keydown",d)}),(h,f)=>(K(),Ce("div",{ref_key:"triggerRef",ref:r,class:z(h.$style["dropdown-wrapper"])},[_t(h.$slots,"trigger",{open:W(l)},()=>[we("button",{class:z(h.$style["editable-dropdown__trigger"]),"aria-label":"Select or type"}," ▼ ",2)]),we("div",{ref_key:"popupRef",ref:a,class:z(h.$style["dropdown-content"]),style:gn({display:W(l)?"block":"none",maxWidth:i.maxWidth?i.maxWidth+"px":"unset"})},[_t(h.$slots,"content",{closeDropdown:u,visible:W(l)},()=>[we("div",{class:z(h.$style["dropdown-list"])},null,2)])],6)],2))}}),[["__cssModules",{$style:{"dropdown-wrapper":"_dropdown-wrapper_1fn64_1","dropdown-content":"_dropdown-content_1fn64_5","dropdown-list":"_dropdown-list_1fn64_9"}}]]),qP=ct({__name:"StatusEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{}},emits:["updated","error","cancel","start-update"],setup(e,{expose:t,emit:n}){const i={PER_PAGE:50,INITIAL_PAGE:1},o=e,s=n,r=Y([]),a=Y(!1),l=Y(!1),c=Y(null),u=Y(i.INITIAL_PAGE),d=Y(!0),h=Y(0),f=Y(""),g=q(()=>{var A;return(A=o.value)==null?void 0:A.id}),m=q(()=>!!(o.id||o.ids&&o.ids.length>0)),y=A=>({label:A.name,value:A.id,selected:g.value===A.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:A,id:A.id,color:A.color}),b=q(()=>{const A=new Set;return o.id&&A.add(String(o.id)),o.ids&&o.ids.forEach(D=>{D&&A.add(String(D))}),Array.from(A)}),S=ki("bulkUpdate",!1),{apiServices:F}=vo(!S,o),C=async(A=i.INITIAL_PAGE,D="",P=!1)=>{var V,H,te,B;if(!m.value){console.error("Missing required props",o);return}P?l.value=!0:a.value=!0,c.value=null;try{const G={workspaceId:String(o.workspaceId),itemIds:b.value,page:A,perPage:i.PER_PAGE,name_like:D.trim()};if(((V=F.value)==null?void 0:V.getAssignableStatus)===void 0)throw new Error("API service getAssignableStatus is undefined");const Z=await((H=F.value)==null?void 0:H.getAssignableStatus(G));if(!(Z!=null&&Z.data)){P||(r.value=[]),d.value=!1;return}const $=Z.data.map(y);r.value=P?[...r.value,...$]:$,h.value=((te=Z.meta)==null?void 0:te.total)??Z.data.length,d.value=!((B=Z.meta)!=null&&B.on_last_page),u.value=A}catch(G){console.error("Error fetching statuses:",G),c.value="Failed to load statuses",P||(r.value=[]),d.value=!1,s("error",c.value)}finally{a.value=!1,l.value=!1}},R=Wo(async A=>{f.value=A,u.value=i.INITIAL_PAGE,await C(i.INITIAL_PAGE,A,!1)},wp),E=async()=>{!d.value||l.value||await C(u.value+1,f.value,!0)},x=async A=>{var D,P,V;if(!m.value){console.error("Missing required props for updating status",o);return}try{s("start-update");const H=await F.value.updateItemStatus({workspaceId:String(o.workspaceId),itemIds:b.value,statusId:String(A.value)});if(!(H!=null&&H.message))throw s("error","API did not return success"),new Error("API did not return success");o.params&&((P=o.params)==null||P.node.setData({...(D=o.params)==null?void 0:D.node.data,status:{id:A.id,name:A.label,color:A.color}}),(V=o.params)==null||V.api.stopEditing()),s("updated",{workspaceId:String(o.workspaceId),itemIds:b.value,data:{id:A.id,name:A.label,color:A.color}})}catch(H){console.error("Error updating status:",H),c.value="Failed to update status",s("error",c.value)}},k=q(()=>r.value.map(A=>({...A})));ut([()=>o.id,()=>o.workspaceId,()=>o.ids],()=>{C()},{deep:!0,immediate:!0}),t({refresh:()=>C(i.INITIAL_PAGE,f.value,!1),loadMore:E});const O=Y(null);return Sn(()=>{Xt(()=>{var A;(A=O.value)==null||A.focus()})}),(A,D)=>{var P;return K(),Xe(YC,_n({ref_key:"popupRef",ref:O},o,{"selected-id":(P=o.value)==null?void 0:P.id,options:k.value,loading:a.value,"loading-more":l.value,"has-more":d.value,error:c.value,onSearch:W(R),onSelect:x,onLoadMore:E,onCancel:D[0]||(D[0]=V=>s("cancel"))}),null,16,["selected-id","options","loading","loading-more","has-more","error","onSearch"])}}}),oK=ct({__name:"StatusUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{}},emits:["updated"],setup(e,{emit:t}){const n=e,i=q(()=>{const g=Di();return g==null?void 0:g.appContext.config.globalProperties.apiServices}),{popupRef:o,triggerRef:s,isVisible:r,hide:a}=tr(),l=t,c=Y(!1),u=g=>{c.value=!1,l("updated",g),a()},d=q(()=>({apiServices:i.value,ids:n.ids,workspaceId:n.workspaceId,entityId:n.entityId})),h=Y(null),f=g=>{g.key==="Escape"&&o.value&&a()};return Sn(()=>{var m;const g=h.value instanceof HTMLElement?h.value:(m=h.value)==null?void 0:m.$el;g&&g.addEventListener("keydown",f)}),qn(()=>{var m;const g=h.value instanceof HTMLElement?h.value:(m=h.value)==null?void 0:m.$el;g&&g.removeEventListener("keydown",f)}),Ta("bulkUpdate",!0),(g,m)=>(K(),Ce("div",{ref_key:"mainRef",ref:h},[ve(pt,{ref_key:"triggerRef",ref:s,variant:e.variant,loading:c.value},{default:Ee(()=>[ve(mt,{src:"Square",class:"icon"}),m[2]||(m[2]=dt(" Status ",-1))]),_:1},8,["variant","loading"]),we("div",{ref_key:"popupRef",ref:o},[W(r)?(K(),Xe(qP,_n({key:0},d.value,{onUpdated:u,onCancel:W(a),onStartUpdate:m[0]||(m[0]=y=>c.value=!0),onError:m[1]||(m[1]=y=>c.value=!1)}),null,16,["onCancel"])):it("",!0)],512)],512))}}),ZC=Sc("bulkUpdate",()=>{const e=Mo({loaded:0,total:0}),t=u=>{e.total=u},n=u=>{e.loaded=u},i=Mo({isBulkUpdating:!1});function o(u){i.isBulkUpdating=u}const s=Y({}),r=u=>{s.value=u},a=(u,d)=>{s.value[u]=d},l=Y(0);return{bulkUpdateState:i,setIsBulkUpdating:o,selectionIds:s,setSelectionIds:r,setCheckedForId:a,setSelectionStatus:u=>{l.value=u},selectionStatus:l,rowCount:e,setTotalRowCount:t,setLoadedRowCount:n}}),sK=Ct(ct({__name:"BulkUpdate",props:{selectRowData:{},workspaceId:{},entityId:{},gridApi:{},selectedAll:{type:Boolean},takeName:{}},emits:["close","assignStatus","assignAssignee","assignDate","assignMetric","moreActions","deleteSelected","unselect"],setup(e,{emit:t}){const n=mn,i=e,o=t,s=ZC(),{selectionStatus:r}=ys(s),a=q(()=>i.selectRowData.map(D=>D.id));Ta("bulkUpdate",!0);const l=({itemIds:D,data:P})=>{const V=i.gridApi;D.forEach(H=>{if(!V){console.error("Grid API is undefined");return}const te=V.getRowNode(H);if(te){const B={...te.data,status:P};te.setData(B)}})},c=({itemIds:D,data:P})=>{const V=i.gridApi;D.forEach(H=>{if(!V){console.error("Grid API is undefined");return}const te=V.getRowNode(H);if(te){const B={...te.data,dateRange:P};te.setData(B)}})},u=["primary"],d=[{label:"Delete Thumbnail",icon:"Image",id:"delete-thumbnail",type:"icon",value:"delete-thumbnail"},{label:"Delete Rendition",icon:"Film",id:"delete-rendition",type:"icon",value:"delete-rendition"},{label:"Unarchive",value:"UnBoxArchive",type:"icon",icon:"BoxArchive",id:"unarchive",clickable:!0},{label:"Archive",value:"BoxArchive",type:"icon",icon:"BoxArchive",id:"archive",clickable:!0},{label:"Delete",value:"delete",type:"icon",icon:"TrashCan",id:"delete",danger:!0,clickable:!0}],h=()=>{o("unselect")},f=zC(),{userPermissions:g}=ys(f),m=q(()=>g.value.includes(jC)),y=()=>{const P=`https://review.dev.arbocollab.com/w:yngazem?scene_ids=${i.selectRowData.map(V=>V.id).join(",")}`;window.open(P,"_blank")},b=D=>{const{assignees:P,type:V}=D,H=i.gridApi;if(!H){console.error("Grid API is not available for bulk update.");return}i.selectRowData.map(B=>{const G=H.getRowNode(B.id);if(!G)return null;const Z=G.data.assignees||[];let $=[];switch(V){case"add":{const ce=new Set(Z.map(xe=>xe.id)),ue=P.filter(xe=>!ce.has(xe.id));$=[...Z,...ue];break}case"overwrite":{$=P;break}case"remove":{const ce=new Set(P.map(ue=>ue.id));$=Z.filter(ue=>!ce.has(ue.id));break}case"removeAll":{$=[];break}}return{...G.data,assignees:$}}).filter(B=>B!==null).forEach(B=>{const G=H.getRowNode(B.id);G&&G.setData(B)})},{apiServices:S}=vo(!1,i),F=async()=>{var H;const D=i.selectRowData.map(te=>te.id),P=i.gridApi;if(!P){console.error("Grid API is not available for bulk delete.");return}const V=await((H=S.value)==null?void 0:H.bulkDeleteItems(String(i.workspaceId),D));(V==null?void 0:V.message)=="Done"&&(D.forEach(te=>{const B=P.getRowNode(te);if(B){const G={...B.data,isDeleted:!0,disabled:!0};B.setData(G)}}),P.deselectAll())},C=async()=>{var H;const D=i.selectRowData.map(te=>te.id);if(!i.gridApi){console.error("Grid API is not available for bulk unarchive.");return}const V=await((H=S.value)==null?void 0:H.bulkUnarchiveItems(String(i.workspaceId),D));if((V==null?void 0:V.message)!="Done"){console.error("Failed to unarchive items.");return}E(D,"isArchived",!1)},R=async()=>{var H;const D=i.selectRowData.map(te=>te.id);if(!i.gridApi){console.error("Grid API is not available for bulk archive.");return}const V=await((H=S.value)==null?void 0:H.bulkArchiveItems(String(i.workspaceId),D));if((V==null?void 0:V.message)!="Done"){console.error("Failed to archive items.");return}E(D,"isArchived",!0)},E=(D,P,V)=>{const H=i.gridApi;if(!H){console.error("Grid API is not available for bulk update.");return}const te=D.map(B=>{const G=H.getRowNode(B);if(G){const Z={...G.data,[P]:V};G.setData(Z)}return G}).filter(B=>B!=null);H.redrawRows({rowNodes:te})},x=async()=>{var H;const D=i.selectRowData.map(te=>te.id),P=i.gridApi;if(!P){console.error("Grid API is not available for bulk thumbnail deletion.");return}const V=await((H=S.value)==null?void 0:H.deleteThumbnail(String(i.workspaceId),D));if((V==null?void 0:V.message)!="Done"){console.error("Failed to delete thumbnails.");return}D.forEach(te=>{const B=P.getRowNode(te);if(B){const G={...B.data,thumbnail:null};B.setData(G)}})},k=async()=>{var H;const D=i.selectRowData.map(te=>te.id),P=i.gridApi;if(!P){console.error("Grid API is not available for bulk rendition deletion.");return}const V=await((H=S.value)==null?void 0:H.deleteRendition(String(i.workspaceId),D));if((V==null?void 0:V.message)!="Done"){console.error("Failed to delete renditions.");return}D.forEach(te=>{const B=P.getRowNode(te);if(B){const G={...B.data,rendition:null};B.setData(G)}})},O=Y(!1),A=async D=>{O.value=!0,D.id==="unarchive"?await C():D.id==="delete"?await F():D.id==="archive"?await R():D.id==="delete-thumbnail"?await x():D.id==="delete-rendition"&&await k(),Xt(()=>{O.value=!1})};return(D,P)=>ot((K(),Ce("div",{class:z(D.$style["bulk-update-action"])},[we("div",{class:z(D.$style["left-actions"])},[we("div",{class:z(D.$style["selection-track"])},[ve(pt,{variant:["icon","tertiary"],onClick:h},{default:Ee(()=>[ve(mt,{src:"XMarkSolid",source:"remote"})]),_:1}),W(r)==1?(K(),Ce("span",{key:0,class:z(D.$style["selected-count"])},bt(e.selectRowData.length)+" selected ",3)):it("",!0),W(r)==2?(K(),Ce("span",{key:1,class:z(D.$style["selected-count"])}," All in "+bt(e.takeName),3)):it("",!0),we("span",{class:z(D.$style.divider)},null,2)],2),ve(oK,{ids:a.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:u,onUpdated:l},null,8,["ids","workspace-id","entity-id"]),ve(q8,{onUpdate:b,ids:a.value,"workspace-id":e.workspaceId,variant:u,"entity-id":e.entityId},null,8,["ids","workspace-id","entity-id"]),ve(iK,{ids:a.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:u,onUpdated:c},null,8,["ids","workspace-id","entity-id"]),we("span",{class:z(D.$style.divider)},null,2),m.value?ot((K(),Xe(pt,{key:0,class:z(D.$style["action-button"]),variant:[...u,"icon"],onClick:y},{default:Ee(()=>[ve(mt,{src:"PenRuler",class:z(D.$style["icon-btn"])},null,8,["class"])]),_:1},8,["class","variant"])),[[W(n),{content:"Open in Review"}]]):it("",!0),we("span",{class:z(D.$style.divider)},null,2),ve(KP,{placement:"top-end"},{trigger:Ee(({open:V})=>[ot((K(),Xe(pt,{actived:V,class:z(D.$style["action-button"]),variant:[...u,"icon"],loading:O.value},{default:Ee(()=>[ve(mt,{src:"EllipsisVertical",class:z(D.$style.icon),source:"remote"},null,8,["class"])]),_:1},8,["actived","class","variant","loading"])),[[W(n),{content:"More actions"}]])]),content:Ee(({visible:V,closeDropdown:H})=>[(K(),Ce(Ot,null,Un(d,te=>ve(Vp,_n({key:te.id,selected:!1},{ref_for:!0},te,{show:V,onSelect:()=>{A(te),H()}}),null,16,["show","onSelect"])),64))]),_:1})],2)],2)),[[us,e.selectRowData.length>0]])}}),[["__cssModules",{$style:{"bulk-update-action":"_bulk-update-action_o4psi_1","left-actions":"_left-actions_o4psi_19","right-actions":"_right-actions_o4psi_20","selection-track":"_selection-track_o4psi_25","close-icon":"_close-icon_o4psi_30","selected-count":"_selected-count_o4psi_34",divider:"_divider_o4psi_37","more-button":"_more-button_o4psi_42",dropdown:"_dropdown_o4psi_46","dropdown-content":"_dropdown-content_o4psi_49",delete:"_delete_o4psi_72","icon-btn":"_icon-btn_o4psi_79","selected-list":"_selected-list_o4psi_83"}}]]),Xa=Ct(ct({name:"LabelRenderer",__name:"LabelRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=Go,n=mn,i=e,o=q(()=>({disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:i.value===void 0||i.value===null||i.value==="",clickable:!0})),{argsMain:s}=or(o),r=q(()=>{var l,c,u;return!!((l=i.params)!=null&&l.api||(c=i.params)!=null&&c.node||(u=i.params)!=null&&u.context)}),a=q(()=>i.value===void 0);return(l,c)=>ot((K(),Xe(sr,Um(wf(W(s))),{default:Ee(()=>[we("span",{class:z(l.$style["item-table-label-renderer"])},bt(i.value||"-"),3)]),_:1},16)),[[W(t),{isLoading:a.value||!r.value}],[W(n),i.tooltip?i.tooltip:{content:void 0}]])}}),[["__cssModules",{$style:{"item-table-label-renderer":"_item-table-label-renderer_s1gdy_1"}}]]),rK=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const aK=Object.prototype.toString,lK=e=>aK.call(e)==="[object Object]",Bp=()=>{};function XC(e){return Array.isArray(e)?e:[e]}function cK(e,t,n){return ut(e,t,{...n,immediate:!0})}const YP=rK?window:void 0;function Ed(e){var t;const n=ba(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function JC(...e){const t=(i,o,s,r)=>(i.addEventListener(o,s,r),()=>i.removeEventListener(o,s,r)),n=q(()=>{const i=XC(ba(e[0])).filter(o=>o!=null);return i.every(o=>typeof o!="string")?i:void 0});return cK(()=>{var i,o;return[(i=(o=n.value)===null||o===void 0?void 0:o.map(s=>Ed(s)))!==null&&i!==void 0?i:[YP].filter(s=>s!=null),XC(ba(n.value?e[1]:e[0])),XC(W(n.value?e[2]:e[1])),ba(n.value?e[3]:e[2])]},([i,o,s,r],a,l)=>{if(!(i!=null&&i.length)||!(o!=null&&o.length)||!(s!=null&&s.length))return;const c=lK(r)?{...r}:r,u=i.flatMap(d=>o.flatMap(h=>s.map(f=>t(d,h,f,c))));l(()=>{u.forEach(d=>d())})},{flush:"post"})}function ZP(e,t,n={}){const{window:i=YP,ignore:o=[],capture:s=!0,detectIframe:r=!1,controls:a=!1}=n;if(!i)return a?{stop:Bp,cancel:Bp,trigger:Bp}:Bp;let l=!0;const c=y=>ba(o).some(b=>{if(typeof b=="string")return Array.from(i.document.querySelectorAll(b)).some(S=>S===y.target||y.composedPath().includes(S));{const S=Ed(b);return S&&(y.target===S||y.composedPath().includes(S))}});function u(y){const b=ba(y);return b&&b.$.subTree.shapeFlag===16}function d(y,b){const S=ba(y),F=S.$.subTree&&S.$.subTree.children;return F==null||!Array.isArray(F)?!1:F.some(C=>C.el===b.target||b.composedPath().includes(C.el))}const h=y=>{const b=Ed(e);if(y.target!=null&&!(!(b instanceof Element)&&u(e)&&d(e,y))&&!(!b||b===y.target||y.composedPath().includes(b))){if("detail"in y&&y.detail===0&&(l=!c(y)),!l){l=!0;return}t(y)}};let f=!1;const g=[JC(i,"click",y=>{f||(f=!0,setTimeout(()=>{f=!1},0),h(y))},{passive:!0,capture:s}),JC(i,"pointerdown",y=>{const b=Ed(e);l=!c(y)&&!!(b&&!y.composedPath().includes(b))},{passive:!0}),r&&JC(i,"blur",y=>{setTimeout(()=>{var b;const S=Ed(e);((b=i.document.activeElement)===null||b===void 0?void 0:b.tagName)==="IFRAME"&&!(S!=null&&S.contains(i.document.activeElement))&&t(y)},0)},{passive:!0})].filter(Boolean),m=()=>g.forEach(y=>y());return a?{stop:m,cancel:()=>{l=!1},trigger:y=>{l=!0,h(y),l=!1}}:m}const uK=["placeholder","maxlength"],dK={key:0,class:"wrapper-suffix"},QC=Ct(ct({name:"LabelEditor",__name:"LabelEditor",props:{value:{},placeholder:{default:"Enter name"},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{}},emits:["update:value","enter","blur"],setup(e,{expose:t,emit:n}){const i=Go,o=mn,s=e,r=n,a=Y(s.value),l=Y(null),c=Y(null),u=q(()=>{var R;return{disabled:s.disabled,error:!1,readOnly:s.readOnly,isEmpty:((R=s.value)==null?void 0:R.length)===0,inputRef:l,wrapperRef:c,clickable:!0}}),{argsMain:d,isFocus:h}=or(u),f=R=>{const E=document.createElement("div");return E.textContent=R,E.innerHTML},g=R=>{h.value=!1,C.value=a.value,r("update:value",a.value)},m=R=>{if(!h.value||!l.value)return;const E=f(l.value.value);r("update:value",E),r("enter",E),h.value=!1},y=R=>{var E;if(R.ctrlKey&&R.key=="a"||R.key=="A"){(E=l.value)==null||E.select();return}R.key==="Enter"?(R.preventDefault(),m()):R.key==="Escape"&&(R.preventDefault(),g())},b=()=>{a.value=s.value,h.value=!0,Xt(()=>{var R;(R=l.value)==null||R.focus()})},S={focus:()=>{var R;h.value=!0,(R=l.value)==null||R.focus()}};Sn(()=>{const R=c.value.$el;R&&(R.__sceneNameEditor=S)}),qn(()=>{const R=c.value;R&&delete R.__sceneNameEditor}),t({focus:()=>{b()}});const F=q(()=>s.value===void 0),C=Y(s.value||"");return ZP(c,R=>{h.value&&m()}),(R,E)=>ot((K(),Xe(W(sr),_n(W(d),{ref_key:"wrapperRef",ref:c}),_u({default:Ee(()=>[W(h)?it("",!0):_t(R.$slots,"default",{key:0},()=>[ot((K(),Ce("span",{class:z(R.$style["label-renderer"])},[dt(bt(C.value),1)],2)),[[W(o),{content:C.value||void 0}]])]),ot(we("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":E[0]||(E[0]=x=>C.value=x),class:z(R.$style["label-editor"]),placeholder:e.placeholder,maxlength:e.maxLength,onKeydown:y},null,42,uK),[[us,W(h)],[IR,C.value]])]),_:2},[!e.disabled&&!e.readOnly?{name:"suffix",fn:Ee(({hovered:x,focused:k})=>[x||k?(K(),Ce("div",dK,[x&&!k?ot((K(),Xe(W(pt),{key:0,variant:["icon","secondary"],size:24,onClick:on(b,["prevent","stop"])},{default:Ee(()=>[ve(W(mt),{src:"Pen",source:"remote"})]),_:1})),[[W(o),"Edit"]]):k?ot((K(),Xe(W(pt),{key:1,variant:["icon","tertiary","danger"],size:24,onMousedown:on(g,["prevent"])},{default:Ee(()=>[ve(W(mt),{src:"XMarkSolid",source:"remote"})]),_:1})),[[W(o),"Cancel"]]):it("",!0)])):it("",!0)]),key:"0"}:void 0]),1040)),[[W(i),{isLoading:F.value}]])}}),[["__cssModules",{$style:{"label-renderer":"_label-renderer_cyzth_1","label-editor":"_label-editor_cyzth_10"}}]]);/*! js-cookie v3.0.5 | MIT */function Hp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}var hK={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ew(e,t){function n(o,s,r){if(!(typeof document>"u")){r=Hp({},t,r),typeof r.expires=="number"&&(r.expires=new Date(Date.now()+r.expires*864e5)),r.expires&&(r.expires=r.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in r)r[l]&&(a+="; "+l,r[l]!==!0&&(a+="="+r[l].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function i(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],r={},a=0;a<s.length;a++){var l=s[a].split("="),c=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(r[u]=e.read(c,u),o===u)break}catch{}}return o?r[o]:r}}return Object.create({set:n,get:i,remove:function(o,s){n(o,"",Hp({},s,{expires:-1}))},withAttributes:function(o){return ew(this.converter,Hp({},this.attributes,o))},withConverter:function(o){return ew(Hp({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var fK=ew(hK,{path:"/"});const XP=Ct(ct({name:"SceneNameEditor",__name:"SceneNameEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},placeholder:{default:"Enter name"}},emits:["update:value","enter","blur"],setup(e,{emit:t}){const n=sessionStorage.getItem("ws.code"),i=sessionStorage.getItem("BASE_URL")||"https://app.dev.arbocollab.com",o=mn,s=Go,r=e,a=t,l=Y(r.value),c=Y(r.value),u=Y(null),d=Y(null),h=ki("bulkUpdate",!1),{apiServices:f}=vo(!h,r),g=q(()=>{var D;return{componentType:void 0,disabled:r.disabled,error:!1,readOnly:r.readOnly,isEmpty:((D=l==null?void 0:l.value)==null?void 0:D.length)===0,inputRef:u,wrapperRef:d,clickable:!0}}),{isFocus:m}=or(g),y=q(()=>{const D=n||r.workspaceId;return fo({type:"scene_hub",config:{baseDomain:i,ws_code:D,scene_id:String(r.id)}}).url}),b=q(()=>{var D,P,V;return((D=r.data)==null?void 0:D.isDeleted)==!0||((V=(P=r.data)==null?void 0:P.isProcessing)==null?void 0:V.length)>0}),S=q(()=>{var D;return(D=r.data)==null?void 0:D.isProcessing}),F=q(()=>{var D;return((D=r.data)==null?void 0:D.isArchived)==1}),C=q(()=>r.value===void 0),R=async D=>{var P,V,H,te;l.value=D,m.value=!1;try{const B=await((V=(P=f.value)==null?void 0:P.updateSceneName)==null?void 0:V.call(P,{workspaceId:r.workspaceId,entityId:r.entityId,itemId:r.id,name:l.value})),G=fK.get(PF)||"UTC";if(B){const Z=OF(B,G),$={...r.data,...Z};(te=(H=r.params)==null?void 0:H.node)==null||te.setData($),c.value=l.value,a("enter")}else l.value=c.value}catch(B){console.error("Failed to update scene name:",B),l.value=c.value}},E={focus:()=>{m.value=!0,setTimeout(()=>{var D;return(D=d.value)==null?void 0:D.focus()},0)}},x=()=>d.value?"$el"in d.value?d.value.$el:d.value:null;ut(()=>r.value,D=>{l.value=D,c.value=D}),Sn(()=>{const D=x();D&&(D.__sceneNameEditor=E)}),qn(()=>{const D=d.value,P=D&&"$el"in D?D.$el:D;P&&delete P.__sceneNameEditor});const k=$P(),{openSceneHub:O}=k,A=D=>{try{if(D.ctrlKey||D.metaKey){window.open(y.value,"_blank");return}O(String(r.id))}catch{window.open(y.value,"_blank")}};return(D,P)=>ot((K(),Xe(QC,{"save-on-blur":!0,ref_key:"wrapperRef",ref:d,disabled:r.disabled,"read-only":r.readOnly,placeholder:r.placeholder,value:l.value,"onUpdate:value":P[0]||(P[0]=V=>l.value=V),id:`scene-name-${r.id}`,onEnter:R,"max-length":25},{default:Ee(()=>[ot(we("div",{class:z(D.$style["scene-name-display"])},[ot((K(),Ce("a",{onClick:on(A,["prevent"]),target:"_blank",class:z(D.$style["scene-name-text"])},[dt(bt(l.value),1)],2)),[[W(o),{content:l.value}]]),F.value?(K(),Ce("div",{key:0,class:z([D.$style["icon-processing"],D.$style.archived])},[ve(mt,{src:"BoxArchive",color:"#959595"})],2)):it("",!0),b.value?ot((K(),Ce("div",{key:1,class:z([D.$style["icon-processing"],D.$style.processing])},[ve(mt,{src:"AnimatedHourglass",color:"#DE851A"})],2)),[[W(o),S.value]]):it("",!0)],2),[[us,!W(m)]])]),_:1},8,["disabled","read-only","placeholder","value","id"])),[[W(s),{isLoading:C.value}]])}}),[["__cssModules",{$style:{"scene-name-editor":"_scene-name-editor_nlzfn_1","scene-name-display":"_scene-name-display_nlzfn_11","icon-processing":"_icon-processing_nlzfn_18",archived:"_archived_nlzfn_26",processing:"_processing_nlzfn_29","scene-name-text":"_scene-name-text_nlzfn_33"}}]]),pK=Ct(ct({__name:"OptionList",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},options:{}},emits:["select"],setup(e,{emit:t}){const n=t;function i(o){n("select",o)}return(o,s)=>(K(),Ce("div",{class:z(o.$style["dropdown-list"])},[(K(!0),Ce(Ot,null,Un(e.options,r=>(K(),Xe(Vp,_n({key:r.value},{ref_for:!0},{...r},{"icon-name":r.icon,onClick:on(a=>i(r.value),["stop","prevent"])}),{label:Ee(()=>[dt(bt(r.label),1)]),_:2},1040,["icon-name","onClick"]))),128)),e.options.length==0?(K(),Ce("div",{key:0,class:z(o.$style["empty-list"])}," No options available. ",2)):it("",!0)],2))}}),[["__cssModules",{$style:{"dropdown-list":"_dropdown-list_1d2i1_1","empty-list":"_empty-list_1d2i1_8"}}]]),tw=Ct(ct({__name:"ButtonDropdown",props:{label:{},value:{},variant:{},options:{default:()=>[]},size:{},placement:{default:"bottom"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["select","handleClick"],setup(e,{expose:t,emit:n}){const i=e,o=q(()=>typeof i.size=="number"?`${i.size}px`:{small:"24px",medium:"32px",large:"48px"}[i.size]??"32px"),s=q(()=>{let g=[];return typeof i.variant=="string"?g.push(i.variant):Array.isArray(i.variant)&&(g=[...i.variant]),[...g,"icon"]}),r=n,{hide:a,isVisible:l,show:c,triggerRef:u,popupRef:d,instance:h}=tr();function f(g){r("select",g),a()}return cf(()=>{h.value&&h.value.setProps({placement:i.placement})}),t({show:c,hide:a,popupRef:d}),(g,m)=>(K(),Ce("div",{class:z(g.$style["button-dropdown-wrapper"]),style:gn({"--button-size":o.value})},[we("div",{class:z(g.$style["button-group"])},[_t(g.$slots,"prefix"),we("div",{ref_key:"triggerRef",ref:u,class:z(W(l)?g.$style.open:"")},[_t(g.$slots,"triggerDropdown",{open:W(l)},()=>[i.readOnly?it("",!0):(K(),Xe(pt,{key:0,actived:W(l),class:z(g.$style["button-dropdown-trigger"]),variant:s.value,size:e.size,disabled:i.disabled},{default:Ee(()=>[_t(g.$slots,"iconDropdown",{},()=>[ve(mt,{class:z(g.$style["icon-dropdown"]),src:"ChevronDown",source:"remote"},null,8,["class"])])]),_:3},8,["actived","class","variant","size","disabled"]))])],2)],2),we("div",{ref_key:"popupRef",ref:d,class:z(g.$style["button-dropdown-list"])},[ve(pK,{options:e.options,onSelect:f,style:{width:"max-content"}},null,8,["options"])],2)],6))}}),[["__cssModules",{$style:{"button-dropdown-wrapper":"_button-dropdown-wrapper_12xlv_1","button-group":"_button-group_12xlv_7","overflow-elipsis":"_overflow-elipsis_12xlv_26","button-dropdown-list":"_button-dropdown-list_12xlv_33",show:"_show_12xlv_36","button-dropdown-item":"_button-dropdown-item_12xlv_39","icon-dropdown":"_icon-dropdown_12xlv_43",open:"_open_12xlv_46"}}]]),gK=Ct(ct({name:"AssigneeGroupRenderer",__name:"AssigneeGroupRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean},maxVisible:{default:4}},setup(e){const t=mn,n=Go,i=OD,o=e,{isEditing:s}=KC(o),r=Y(o.value),a=Y(null),l=Y(null),{apiServices:c}=vo(!0,o),u=q(()=>({disabled:o.disabled,readOnly:o.readOnly,error:o.error,inputRef:a,wrapperRef:l,clickable:!0,active:s})),{argsMain:d,isHover:h}=or(u),f=q(()=>o.value===void 0),g=q(()=>{var C;return((C=r.value)==null?void 0:C.slice(0,o.maxVisible))||[]}),m=q(()=>{var C;return Math.max(0,(((C=r.value)==null?void 0:C.length)||0)-o.maxVisible)}),y=q(()=>{var C;return m.value<=0?"":((C=r.value)==null?void 0:C.slice(o.maxVisible).map(R=>R.name).join(", "))||""}),b=q(()=>g.value.map(C=>({id:C.id,name:C.name,initial:C.initial,avatarId:C.id,profile_image:C.profile_image,color:C.color,size:24,user:C}))),S=q(()=>({color:h.value?"var(--primary-color)":"var(--grey-300)",display:"flex",alignItems:"center",marginLeft:"4px"})),F=async C=>{var E;const R=o.workspaceId;return await((E=c.value)==null?void 0:E.getUserInformation(R,C))??void 0};return ut(()=>o.value,C=>{r.value=C},{immediate:!0,deep:!0}),(C,R)=>ot((K(),Xe(sr,Um(wf(W(d))),{default:Ee(()=>{var E;return[we("div",{class:z(C.$style.assigneeGroupRenderer)},[(E=r.value)!=null&&E.length?it("",!0):(K(),Xe(mt,{key:0,src:"UserPlus",source:"remote",style:gn(S.value)},null,8,["style"])),(K(!0),Ce(Ot,null,Un(b.value,x=>ot((K(),Xe(Zu,{key:x.id,readOnly:!0,class:z(C.$style["ib-assignee-avatar"]),name:x.name,initial:x.initial,id:`assignee-avatar-${x.avatarId}`,profile_image:x.profile_image,color:x.color,size:x.size},null,8,["class","name","initial","id","profile_image","color","size"])),[[W(i),{user:x.user,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0,apiUpdateFunction:F}]])),128)),m.value>0?ot((K(),Ce("div",{key:1,class:z(C.$style["extra-avatars"])},[dt(" +"+bt(m.value),1)],2)),[[W(t),y.value]]):it("",!0)],2)]}),_:1},16)),[[W(n),{isLoading:f.value}]])}}),[["__cssModules",{$style:{assigneeGroupRenderer:"_assigneeGroupRenderer_1tgm9_1","ib-assignee-group-renderer":"_ib-assignee-group-renderer_1tgm9_7","ib-assignee-avatar":"_ib-assignee-avatar_1tgm9_17","assignee-wrapper":"_assignee-wrapper_1tgm9_21","extra-avatars":"_extra-avatars_1tgm9_28"}}]]),mK=Ct(ct({name:"DateRangeRenderer",__name:"DateRangeRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{}},setup(e){var R,E;const t=mn,n=Go,i=pC(),o=e,s=Y(null),r=Y(null),a=x=>{if(x){if(typeof x=="string")return x;if(x instanceof Date)return x.toISOString()}},l=q(()=>o.value===void 0),c=q(()=>{var x;return(x=o.data)==null?void 0:x.isStarted}),u=q(()=>{var x;return(x=o.data)==null?void 0:x.isCompleted}),d=q(()=>!!(o.value&&(o.value[0]||o.value[1]))),h=q(()=>d.value?o.disabled&&!o.readOnly?"var(--disabled-color)":"var(--primary-color)":"var(--grey-300)"),f=q(()=>({disabled:o.disabled,error:!1,readOnly:o.readOnly,inputRef:s,wrapperRef:r,clickable:!0})),{argsMain:g}=or(f),{startDate:m,endDate:y,startClasses:b,endClasses:S,fullStartDate:F,fullEndDate:C}=e5({start:a((R=o.value)==null?void 0:R[0]),end:a((E=o.value)==null?void 0:E[1]),isStarted:c.value,isEnded:u.value,timezone:o.timezone||i});return(x,k)=>ot((K(),Xe(sr,_n(W(g),{ref_key:"wrapperRef",ref:r}),{default:Ee(()=>[l.value?it("",!0):(K(),Ce("div",{key:0,class:z(x.$style.dateRangeRenderer)},[d.value?it("",!0):(K(),Xe(mt,{key:0,src:"Calendar",class:z(x.$style.calendarIcon),color:h.value},null,8,["class","color"])),d.value?(K(),Ce(Ot,{key:1},[ot((K(),Ce("span",{class:z([x.$style.dateLabelDisplay,...W(b).map(O=>x.$style[O])])},[dt(bt(W(m)),1)],2)),[[W(t),W(F)]]),k[0]||(k[0]=we("span",null,"→",-1)),ot((K(),Ce("span",{class:z([x.$style.dateLabelDisplay,...W(S).map(O=>x.$style[O])])},[dt(bt(W(y)),1)],2)),[[W(t),W(C)]])],64)):it("",!0)],2))]),_:1},16)),[[W(n),{isLoading:l.value,fullwidth:!0}]])}}),[["__cssModules",{$style:{dateRangeRenderer:"_dateRangeRenderer_1hon8_1",calendarIcon:"_calendarIcon_1hon8_7",dateSection:"_dateSection_1hon8_11",dateLabelDisplay:"_dateLabelDisplay_1hon8_18",empty:"_empty_1hon8_28","end-today":"_end-today_1hon8_34",actual:"_actual_1hon8_37","end-tomorrow":"_end-tomorrow_1hon8_40","end-yesterday":"_end-yesterday_1hon8_46","end-past":"_end-past_1hon8_52","end-future":"_end-future_1hon8_58","start-today":"_start-today_1hon8_61","start-tomorrow":"_start-tomorrow_1hon8_67","start-yesterday":"_start-yesterday_1hon8_73","start-past":"_start-past_1hon8_79","start-future":"_start-future_1hon8_85"}}]]),vK=ct({__name:"DateRangeEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{default:void 0},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{default:pC()}},emits:["closed"],setup(e,{expose:t,emit:n}){const i=Y(null);Sn(()=>{Xt(()=>{i.value&&i.value.focus()})});const o=e,s=n,r=y=>`${tt.fromJSDate(y,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,a=async y=>{await m({startDate:y[0]?r(y[0]):null,dueDate:y[1]?r(y[1]):null})},l=async()=>{await m({startDate:null})},c=async()=>{await m({dueDate:null})},u=async y=>{await m({startDate:y?r(y):null})},d=async y=>{await m({dueDate:y?r(y):null})},h=async()=>{await m({startDate:null,dueDate:null})},f=ki("bulkUpdate",!1),{apiServices:g}=vo(!f,o),m=async y=>{var b,S,F,C,R;try{const E=(b=i.value)==null?void 0:b.getValues(),x=await((F=(S=g.value)==null?void 0:S.changeDate)==null?void 0:F.call(S,{workspaceId:o.workspaceId,itemIds:[o.id],startDate:y.startDate,dueDate:y.dueDate}));x!=null&&x.message&&((R=o.params)==null||R.node.setData({...(C=o.params)==null?void 0:C.node.data,dateRange:E==null?void 0:E.dateRange}))}catch(E){console.error("Failed to update scene name:",E)}};return t({focus:()=>{Xt(()=>{var y;(y=i.value)==null||y.focus()})}}),(y,b)=>(K(),Xe(jP,_n(o,{onUpdate:a,"onUpdate:end":d,"onUpdate:start":u,onClearAll:h,onClearDue:c,onClearStart:l,onClosed:b[0]||(b[0]=S=>s("closed")),ref_key:"calendarRef",ref:i}),null,16))}}),yK=Ct(ct({__name:"item-table-layout",props:{isSidebarOpen:{type:Boolean,default:!1}},emits:["close-sidebar","sidebar-clear","sidebar-apply"],setup(e,{emit:t}){const n=Y(null),i=Y(0);let o=null;Sn(()=>{n.value&&(o=new ResizeObserver(r=>{for(const a of r)i.value=a.contentRect.height}),o.observe(n.value))}),Vl(()=>{o&&n.value&&o.unobserve(n.value)});const s=q(()=>{const r=i.value;return r>120?r-42-36:0});return(r,a)=>(K(),Ce("div",{class:z(r.$style["item-table-wrapper"]),ref_key:"itemTableWrapperRef",ref:n},[we("div",{class:z(r.$style["item-header"])},[we("div",{class:z(r.$style["item-header__left"])},[_t(r.$slots,"header-left",{},()=>[we("h1",{class:z(r.$style["item-header__title"])},[_t(r.$slots,"title",{},()=>[a[0]||(a[0]=dt("Items",-1))])],2)])],2),we("div",{class:z(r.$style["item-header__spacer"])},null,2),we("div",{class:z(r.$style["item-header__actions"])},[_t(r.$slots,"header-actions")],2)],2),_t(r.$slots,"grid",{availableHeight:s.value}),we("div",{class:z(r.$style.footer)},[_t(r.$slots,"footer")],2),_t(r.$slots,"new-row"),_t(r.$slots,"bulk-update-actions"),_t(r.$slots,"snackbar"),_t(r.$slots,"popup")],2))}}),[["__cssModules",{$style:{"item-table-wrapper":"_item-table-wrapper_1o9sg_1","item-header":"_item-header_1o9sg_15","item-header__left":"_item-header__left_1o9sg_23","item-header__title":"_item-header__title_1o9sg_28","item-header__spacer":"_item-header__spacer_1o9sg_33","item-header__actions":"_item-header__actions_1o9sg_36","main-content":"_main-content_1o9sg_42",sidebar:"_sidebar_1o9sg_49","is-open":"_is-open_1o9sg_65","sidebar-header":"_sidebar-header_1o9sg_69","sidebar-footer":"_sidebar-footer_1o9sg_70","sidebar-content":"_sidebar-content_1o9sg_90",footer:"_footer_1o9sg_95"}}]]),JP=Ct(ct({__name:"MoreOptionEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},optionBlock:{},isSubmenu:{type:Boolean,default:!1},layer:{default:0}},emits:["actionExecuted"],setup(e,{emit:t}){const n=e,i=q(()=>(n==null?void 0:n.workspaceId)||""),o=q(()=>(n==null?void 0:n.entityId)||""),s=m=>{const y=`scene-name-${n.id}`,b=document.getElementById(y);b.__sceneNameEditor&&b.__sceneNameEditor.focus()},{apiServices:r}=vo(!0,n),a=q(()=>{var m;return{ws_code:i.value,entity_id:o.value,scene_id:n.id,axiosService:r,optionBlock:n.optionBlock,permissions:(m=n.data)==null?void 0:m.permissions}}),l=m=>{var b,S,F,C,R,E;let y=(S=(b=n.params)==null?void 0:b.api)==null?void 0:S.getRowNode(String(n.id));if(y){const x={...y.data,isDeleted:m==="deleted",isArchived:m==="archived"?!0:m==="unarchived"?!1:y.data.isArchived,disabled:!0};(C=(F=n.params)==null?void 0:F.api)==null||C.redrawRows({rowNodes:[y]}),y.setData(x),(E=(R=n.params)==null?void 0:R.api)==null||E.redrawRows({rowNodes:[y]})}},{options:c}=L8(a,l,s),u=t,d=m=>{var y,b;m.id!=="copy-link"&&((b=(y=n==null?void 0:n.params)==null?void 0:y.api)==null||b.stopEditing()),u("actionExecuted",m)},h=m=>{var y,b,S,F;return m=="archive"?!((b=(y=n.params)==null?void 0:y.data)!=null&&b.isArchived):m==="unarchive"?(F=(S=n.params)==null?void 0:S.data)==null?void 0:F.isArchived:!0},f=m=>m.map(y=>({...y,options:y.options.filter(b=>!b.hide)})),g=q(()=>f(c.value));return(m,y)=>(K(),Ce("div",{class:z([m.$style["more-option-section"],{[m.$style.submenu]:e.isSubmenu}])},[(K(!0),Ce(Ot,null,Un(g.value,b=>(K(),Ce("div",{key:b.id,style:gn({"--g-number":Math.min(b.options.length,4)}),class:z([m.$style["option-block"],m.$style[b.type]])},[(K(!0),Ce(Ot,null,Un(b.options,S=>ot((K(),Ce("div",{key:S.id,class:z(m.$style["option-item"])},[S.hide?it("",!0):(K(),Xe(wK,{key:0,layer:n.layer,"scene-id":String(n.id),option:S,type:b.type,onActionExecuted:d},null,8,["layer","scene-id","option","type"]))],2)),[[us,h(S.id)]])),128))],6))),128))],2))}}),[["__cssModules",{$style:{"more-option-section":"_more-option-section_1xceh_1","option-block":"_option-block_1xceh_8","option-item":"_option-item_1xceh_18",row:"_row_1xceh_22",column:"_column_1xceh_28",block:"_block_1xceh_32"}}]]),CK={key:0},wK=Ct(ct({__name:"MoreOptionItem",props:{option:{},sceneId:{},type:{},layer:{}},emits:["actionExecuted"],setup(e,{emit:t}){const n=mn,i=e,o=Y(!1),s=Y(!1),r=(C,R)=>{if(!R){h();return}const E=R.target;E.closest(".tippy-content")||E.closest(".tippy-box")||E.closest("[data-tippy-root]")||E.closest(".option-item")||h()},a=Y(null),{triggerRef:l,popupRef:c,show:u,isVisible:d,hide:h}=tr({interactive:!0,trigger:"click",placement:"left",showArrow:!1,offset:[0,4],hideOnClick:!1,allowHTML:!0,onClickOutside:r,appendTo:a.value||void 0}),f=t,g=async C=>{var R,E;if(!s.value){s.value=!0;try{await((E=(R=i.option).action)==null?void 0:E.call(R,C)),f("actionExecuted",i.option)}catch(x){console.error("Action execution failed:",x)}finally{s.value=!1,o.value=!1}}},m=async C=>{var R,E;if(C.preventDefault(),C.stopPropagation(),!s.value){if(i.option.isDanger){o.value=!o.value;return}if(!i.option.subMenu){s.value=!0;try{await((E=(R=i.option).action)==null?void 0:E.call(R,C)),f("actionExecuted",i.option)}catch(x){console.error("Action execution failed:",x)}finally{s.value=!1}return}Xt(()=>{d.value?h():u()})}},y=C=>{f("actionExecuted",C),h()},b=C=>{C.key==="Escape"?h():(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),m(C))},S=C=>({row:"small",column:"large",block:"small"})[C]||"large",F=C=>{const R=i.option.isDanger?["danger","tertiary"]:[];return{row:["secondary","icon",...R],column:["menu-item",...R],block:["secondary",...R]}[C]||[]};return(C,R)=>{var E;return K(),Ce("div",{ref_key:"wrapperRef",ref:a,class:z(C.$style["option-item-wrapper"])},[ot((K(),Xe(pt,{ref_key:"triggerRef",ref:l,class:z(C.$style["option-item"]),disabled:e.option.disabled||s.value,actived:W(d)||o.value,size:S(e.type),variant:F(e.type),tabindex:"0",onClick:on(m,["stop","prevent"]),onKeydown:b},{prefix:Ee(()=>[e.option.icon?ot((K(),Xe(mt,{key:0,src:e.option.icon,source:"remote"},null,8,["src"])),[[W(n),{content:e.option.label,delay:[500,0],contentClass:["extra-padding"]}]]):it("",!0)]),suffix:Ee(()=>[e.option.subMenu?(K(),Xe(mt,{key:0,src:"Play",source:"remote"})):it("",!0),e.option.isDanger&&o.value?(K(),Ce("div",{key:1,class:z(C.$style["confirm-action"])},[ot((K(),Xe(pt,{variant:["tertiary","icon","danger"],size:"small",onClick:R[0]||(R[0]=on(x=>o.value=!1,["stop","prevent"]))},{default:Ee(()=>[ve(mt,{src:"XMarkSolid",source:"remote"})]),_:1})),[[W(n),{content:"Cancel ",delay:[500,0],contentClass:["extra-padding"]}]]),ot((K(),Xe(pt,{variant:["danger","primary","icon"],size:"small",onClick:on(g,["stop","prevent"])},{default:Ee(()=>[ve(mt,{src:"Check",source:"remote"})]),_:1})),[[W(n),{delay:[500,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):it("",!0)]),default:Ee(()=>[e.option.label?(K(),Ce("span",CK,bt(e.option.label),1)):it("",!0)]),_:1},8,["class","disabled","actived","size","variant"])),[[W(n),{content:e.option.description,contentClass:["extra-padding"],theme:e.option.isDanger?"warning":"arbo",hideOnClick:!1,trigger:"mouseenter focus"}]]),e.option.subMenu?(K(),Ce("div",{key:0,ref_key:"popupRef",ref:c,class:z(C.$style["submenu-container"])},[ve(JP,{layer:i.layer+1,ref:"submenuRef","option-block":[((E=e.option)==null?void 0:E.subMenu)||[]],"is-submenu":!1,onActionExecuted:y},null,8,["layer","option-block"])],2)):it("",!0)],2)}}}),[["__cssModules",{$style:{"option-item":"_option-item_82ug7_1","icon-wrapper":"_icon-wrapper_82ug7_11","confirm-action":"_confirm-action_82ug7_19"}}]]);var Ec=(e=>(e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.TOO_EARLY=425]="TOO_EARLY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e))(Ec||{});const QP=e=>{const t=Y(Number(e.value.value)),n=q(()=>e.value.metricConfig),i=q(()=>{var u,d;const a=e.value.value=="N/A"||e.value.value===null||e.value.value===void 0||String(e.value.value).length===0,l=!!e.value.error,c=n.value.format_type==="icon";return{pendingCalculation:e.value.value=="N/A",isEmpty:a,isError:l,hasPrefix:!a&&!l&&n.value.morpheme_type==="prefix",hasSuffix:!a&&!l&&n.value.morpheme_type==="suffix",isDropdown:n.value.format_type==="dropdown",isFormula:((d=(u=n.value)==null?void 0:u.metric_type)==null?void 0:d.code)==="formula",isLoading:e.value.value===void 0,isRating:c,showActions:e.value.hovered&&!a&&!e.value.disabled&&!c}}),o=14,s=q(()=>({maxRating:n.value.range||5,readOnly:e.value.readOnly,disabled:e.value.disabled,size:o}));return{componentState:i,metricConfig:n,ICON_SIZE:o,ratingParams:s,standardNameforIcon:()=>(n.value.format_symbol||"").split(/[\s-_]+/).map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join("").replace(/Outline|Solid/g,""),internalValue:t}},bK={key:2},e1=Ct(ct({name:"MetricRenderer",__name:"MetricRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean}},emits:["update:value","clear","copy"],setup(e,{emit:t}){const n=Go,i=mn,o=e,s=j0(!1),r=Y(null),a=Y(null),l=q(()=>{var O,A;return{value:o.value,metricConfig:(A=(O=o.params)==null?void 0:O.colDef)==null?void 0:A.context,error:o.error,hovered:!1,readOnly:o.disabled,disabled:o.readOnly}}),{componentState:c,metricConfig:u,ICON_SIZE:d,internalValue:h}=QP(l),f=q(()=>{if(c.value.isError)return"Something went wrong. Review formula, inputs and retry.";if(c.value.pendingCalculation)return"Can’t calculate yet. Complete required fields.";if(c.value.isEmpty)return;const O=F.value,A=u.value.morpheme_type;return A==="prefix"?`${u.value.morpheme_value||""} ${O}`.trim():A==="suffix"?`${O} ${u.value.morpheme_value||""}`.trim():`${O}`}),g=q(()=>{const{format_type:O,format_value:A}=u.value;if(O==="dropdown"&&typeof A=="string"&&A.startsWith("["))try{return JSON.parse(A)}catch{return[]}return[]}),m=q(()=>c.value.isError?"var(--error-color, #d32f2f)":"var(--grey-300)"),y=q(()=>({disabled:o.disabled,error:c.value.isError,inputRef:r,wrapperRef:a,clickable:!0,readOnly:!0,isEmpty:c.value.isEmpty})),{argsMain:b,isHover:S}=or(y),F=q(()=>{if(c.value.isEmpty)return"";if(c.value.pendingCalculation)return"pending";const O=o.value,{format_type:A,format_value:D,mapping:P}=u.value;if(P&&typeof P=="object"&&!Array.isArray(P)){const H=P[`!${O}`];if(H)return H}if(A==="dropdown"){const H=g.value.find(te=>String(te.name)===String(O));if(H)return H.name}if(typeof O=="string"&&Number.isNaN(Number(O)))return O;const V=Number.parseInt(String(D)||"2",10)||2;try{return Number(O).toFixed(V)}catch(H){return console.error("Error formatting metric value:",H),String(O)}}),{copyToClipboard:C,tooltip:R}=gC(F.value);ut(()=>o.value,O=>{const A=Number(O);Number.isFinite(A)&&A!==h.value?h.value=A:O==null&&h.value!==0&&(h.value=0)},{immediate:!0});const x=()=>{o.disabled||(s.value=!0)},k=()=>{o.disabled||(s.value=!1)};return(O,A)=>QV([o.value],()=>ot((K(),Xe(sr,_n(W(b),{onMouseenter:x,style:{"--icon-size":"24px"},onMouseleave:k,ref_key:"wrapperRef",ref:a}),_u({default:Ee(()=>[ot((K(),Ce("div",{class:z(O.$style["metric-wrapper"])},[we("div",{class:z([O.$style["metric-content"],o.disabled?O.$style.disabled:""])},[!W(c).isError&&W(c).isEmpty?(K(),Ce(Ot,{key:0},[W(c).isDropdown?(K(),Xe(mt,{key:0,src:"ChevronDown",source:"remote",size:12,style:{width:"20px"},color:"var(--grey-300)"})):W(c).isFormula?(K(),Xe(mt,{key:1,src:"SquareRootVariable",source:"remote",size:W(d),color:m.value},null,8,["size","color"])):it("",!0),W(c).pendingCalculation?(K(),Ce("span",{key:2,class:z(O.$style["metric-empty"])}," Pending ",2)):W(c).isDropdown?it("",!0):(K(),Ce("span",{key:3,class:z(O.$style["metric-empty"])}," - ",2))],64)):W(c).isFormula?(K(),Xe(mt,{key:1,src:"SquareRootVariable",source:"remote",size:W(d),color:m.value},null,8,["size","color"])):it("",!0),W(c).isError?(K(),Ce("div",bK,"Error")):it("",!0),!W(c).isEmpty&&!W(c).isError?(K(),Ce(Ot,{key:3},[W(c).hasPrefix?(K(),Ce("span",{key:0,class:z([O.$style["metric-morpheme"],O.$style["metric-morpheme--prefix"]])},bt(W(u).morpheme_value),3)):it("",!0),we("span",{class:z([O.$style["metric-value"],W(S)?O.$style.hovered:"",{[O.$style["with-morpheme"]]:W(c).hasPrefix||W(c).hasSuffix,[O.$style["with-formula-icon"]]:W(c).isFormula,[O.$style.disabled]:o.disabled}])},bt(F.value),3),W(c).hasSuffix?(K(),Ce("span",{key:1,class:z([O.$style["metric-morpheme"],O.$style["metric-morpheme--suffix"]])},bt(W(u).morpheme_value),3)):it("",!0)],64)):it("",!0)],2)],2)),[[W(i),{content:f.value,bypassOverflowCheck:!1}]])]),_:2},[W(S)&&!o.disabled?{name:"suffix",fn:Ee(()=>[we("div",{class:z([O.$style.suffix,"wrapper-suffix"])},[W(c).showActions&&!W(c).isEmpty&&!W(c).isError?ot((K(),Xe(pt,{key:0,variant:["icon","secondary"],size:24,onClick:on(W(C),["prevent","stop"])},{default:Ee(()=>[ve(mt,{src:"Copy",source:"remote",size:12})]),_:1},8,["onClick"])),[[W(i),{content:W(R),hideOnClick:!1,contentClass:"extra-padding"}]]):it("",!0)],2)]),key:"0"}:void 0]),1040)),[[W(n),{isLoading:W(c).isLoading}]]),A,0)}}),[["__cssModules",{$style:{"metric-wrapper":"_metric-wrapper_tcd7x_1","metric-content":"_metric-content_tcd7x_5",disabled:"_disabled_tcd7x_15","metric-value":"_metric-value_tcd7x_19",hovered:"_hovered_tcd7x_19","with-morpheme":"_with-morpheme_tcd7x_34","with-formula-icon":"_with-formula-icon_tcd7x_37","metric-value--number":"_metric-value--number_tcd7x_43","metric-value--currency":"_metric-value--currency_tcd7x_43","metric-value--percentage":"_metric-value--percentage_tcd7x_43","metric-morpheme":"_metric-morpheme_tcd7x_47","metric-empty":"_metric-empty_tcd7x_60","metric-icon":"_metric-icon_tcd7x_67"}}]]),SK=Ct(ct({__name:"HeaderSorting",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean},modelValue:{}},emits:["sort-changed","update:modelValue"],setup(e,{emit:t}){const n=mn,i={START_ASC:{value:"start_asc",label:"Soonest to furthest start",id:"start_asc"},START_DESC:{value:"start_desc",label:"Furthest to soonest start",id:"start_desc"},DUE_ASC:{value:"due_asc",label:"Soonest to furthest due",id:"due_asc"},DUE_DESC:{value:"due_desc",label:"Furthest to soonest due",id:"due_desc"}},o={desc:{value:"desc",label:"Newest to oldest",id:"desc"},asc:{value:"asc",label:"Oldest to newest",id:"asc"}},s={asc:{value:"asc",label:"Smallest to largest",id:"asc"},desc:{value:"desc",label:"Largest to smallest",id:"desc"}},r={asc:{value:"asc",label:"Ascending",id:"asc"},desc:{value:"desc",label:"Descending",id:"desc"}},a=e,l={assignees:"default",completedOn:"date",dateRange:"dateRange",id:"number",isArchived:"default",isCompleted:"default",isDeleted:"default",isProcessing:"default",isStarted:"default",lastUpdated:"date",name:"default",status:"default",permissions:"default",options:"default"},c=q(()=>{var O,A;if(a.headerType)return a.headerType;if(((A=(O=a.params)==null?void 0:O.column)==null?void 0:A.getColId()).includes("metric"))return"default";const k=a.headerType??a.params.column.getColId();return l[k]||"default"}),u=q(()=>{var x;return((x=a.params)==null?void 0:x.displayName)??""}),d=q(()=>{let x=[];switch(c.value){case"dateRange":x=Object.values(i).map(k=>({...k,selected:f.value===k.value,type:"text",hover:C.value===k.value}));break;case"date":x=Object.values(o).map(k=>({...k,selected:f.value===k.value,type:"text",hover:C.value===k.value}));break;case"number":x=Object.values(s).map(k=>({...k,selected:f.value===k.value,type:"text",hover:C.value===k.value}));break;default:x=Object.values(r).map(k=>({...k,selected:f.value===k.value,type:"text",hover:C.value===k.value}));break}return f.value!=="none"&&x.push({id:"clear",label:"Clear",value:"none",selected:!1,type:"text",icon:"XMark",hover:C.value=="none"}),x}),h=q(()=>String(f.value).endsWith("asc")?"SortUp":String(f.value).endsWith("desc")?"SortDown":"Sort"),f=Y(a.modelValue??"none"),g=x=>{S("update:modelValue",x),S("sort-changed",x)},m=x=>{f.value=x},y=Wo(()=>{if(c.value==="date"||c.value==="default"||c.value==="number"){let x;f.value==="none"?x="asc":f.value==="asc"?x="desc":x="none",f.value=x}else{const x=[i.START_ASC.value,i.START_DESC.value,i.DUE_ASC.value,i.DUE_DESC.value,"none"],O=(x.indexOf(f.value)+1)%x.length;f.value=x[O]}},300),b=q(()=>{if(f.value==="none")return"No sorting applied";const x=d.value.find(k=>k.value===f.value);return(x==null?void 0:x.label)||""}),S=t,F=q(()=>{if(a.disabled&&!a.readOnly)return"var(--disabled-color)";if(f.value!=="none")return"var(--primary-color-hover)"});ut(()=>a.modelValue,x=>{x!=f.value&&(f.value=x)}),ut(f,x=>{x!==a.modelValue&&g(x)});const C=Y(f.value);ut(()=>f.value,x=>{C.value=x});const R=x=>{var D,P;if(a.readOnly||a.disabled)return;let k=0;x.key==="ArrowDown"?k=1:x.key==="ArrowUp"&&(k=-1);const O=d.value.findIndex(V=>V.value===C.value),A=d.value.length;if(x.key==="Enter"||x.key===" ")x.preventDefault(),f.value=C.value,(D=E.value)==null||D.hide();else if(k!==0){x.preventDefault();let V=(O+k+A)%A;C.value=d.value[V].value}else x.key==="Escape"&&((P=E.value)==null||P.hide())},E=Y(null);return Sn(()=>{var x,k;(k=(x=E.value)==null?void 0:x.$el)==null||k.addEventListener("keydown",R)}),Vl(()=>{var x,k;(k=(x=E.value)==null?void 0:x.$el)==null||k.removeEventListener("keydown",R)}),(x,k)=>(K(),Xe(tw,{ref_key:"dropdownRef",ref:E,options:d.value,label:u.value,readOnly:a.readOnly,disabled:a.disabled,variant:["icon","tertiary"],size:"small",onHandleClick:W(y),onSelect:k[0]||(k[0]=O=>m(O))},{prefix:Ee(()=>[ve(pt,{variant:["text"],onClick:W(y),label:u.value,size:"small"},null,8,["onClick","label"])]),iconDropdown:Ee(()=>[ot(ve(mt,{src:h.value,source:"remote",color:F.value},null,8,["src","color"]),[[W(n),b.value]])]),_:1},8,["options","label","readOnly","disabled","onHandleClick"]))}}),[["__cssModules",{$style:{iconSorting:"_iconSorting_18bqx_1","button-group":"_button-group_18bqx_7","ab-table-button":"_ab-table-button_18bqx_18","button-main":"_button-main_18bqx_24","button-dropdown-trigger":"_button-dropdown-trigger_18bqx_29",headerSorting:"_headerSorting_18bqx_39"}}]]),EK=["disabled","readonly","checked","indeterminate"],nw=Ct(ct({__name:"Checkbox",props:{modelValue:{type:[Number,Boolean]},disabled:{type:Boolean},readOnly:{type:Boolean},tooltipText:{},allowIndeterminate:{type:Boolean},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=mn,i=e,o=t,s=q(()=>i.allowIndeterminate?[0,1,2]:[0,2]),r=q(()=>{if(typeof i.tooltipText=="string"||!i.tooltipText)return i.tooltipText||"";switch(l.value){case 0:return i.tooltipText.unchecked;case 1:return i.tooltipText.indeterminate;case 2:return i.tooltipText.checked;default:return""}}),a=()=>{if(u.value)return;const h=(s.value.indexOf(l.value)+1)%s.value.length;l.value=s.value[h]},l=Y(typeof i.modelValue=="boolean"?i.modelValue?2:0:i.modelValue),c=q(()=>({checked:l.value===2,indeterminate:l.value===1,none:l.value===0})),u=q(()=>i.disabled||i.readOnly);return ut(()=>l.value,d=>{o("update:modelValue",d===2)}),(d,h)=>ot((K(),Ce("input",{disabled:i.disabled,key:l.value,readonly:i.readOnly,type:"checkbox",class:z([d.$style["input-checkbox"],d.$style[i.size||"medium"]]),checked:c.value.checked,indeterminate:c.value.indeterminate,onChange:a,"aria-label":"Select All Items"},null,42,EK)),[[W(n),{content:r.value,hideOnClick:!1,contentClass:"extra-padding"}]])}}),[["__cssModules",{$style:{small:"_small_p7d2l_68",large:"_large_p7d2l_72",medium:"_medium_p7d2l_76"}}]]),RK=Ct(ct({name:"HeaderCheckbox",__name:"HeaderCheckbox",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=e,n=mn,i=ZC(),{setSelectionStatus:o}=i,{rowCount:s}=ys(i),r=Y(0);ut(r,S=>{o(r.value)},{immediate:!0});const a=q(()=>r.value!==0),l=q(()=>({checked:r.value===2,indeterminate:r.value===1,UNCHECK:r.value===0})),c=q(()=>({0:"Click to select check visible items",1:"Click to select All",2:"Click to clear selection"})[r.value]),u=q(()=>{const S=[{label:"All visible",value:"INDETERMINATE",type:"text",clickable:!0,selected:r.value===1,id:"indeterminate"},{label:"All",value:"CHECKED",type:"text",clickable:!0,selected:r.value===2,id:"checked"}];return a.value&&S.push({label:"None",value:"UNCHECK",type:"text",clickable:!0,selected:r.value===0,id:"uncheck"}),S}),d=S=>({selected:S.getSelectedRows().length,total:s.value.total,loaded:s.value.loaded}),h=({api:S,state:F})=>{r.value=F,F===0?S==null||S.deselectAll():S==null||S.forEachNode(C=>C.setSelected(!0))},f=()=>{var C;const S=(C=t.params)==null?void 0:C.api;S||console.error("[HeaderCheckbox] There is no API available"),h({api:S,state:{0:1,1:2,2:0}[r.value]})},g=S=>{var R;const F=(R=t.params)==null?void 0:R.api;F||console.error("no api"),h({api:F,state:{INDETERMINATE:1,CHECKED:2,UNCHECK:0}[S]})},m=Wo(S=>{const{selected:F,total:C}=d(S);F===0?r.value=0:F===C?r.value=2:r.value=1},300);let y=[];Sn(()=>{var R;const S=(R=t.params)==null?void 0:R.api;if(!S)return;const F=E=>m(E.api),C=()=>m(S);S.addEventListener("selectionChanged",F),S.addEventListener("rowDataUpdated",C),S.addEventListener("modelUpdated",C),y=[()=>S.removeEventListener("selectionChanged",F),()=>S.removeEventListener("rowDataUpdated",C),()=>S.removeEventListener("modelUpdated",C)]}),qn(()=>{y.forEach(S=>S())});const b=`header-checkbox-${Math.random().toString(36).substr(2,9)}`;return(S,F)=>(K(),Xe(tw,{options:u.value,size:24,disabled:t.disabled,readOnly:t.readOnly,variant:["icon","tertiary"],placement:"bottom-start",onSelect:g},{prefix:Ee(()=>[ot((K(),Xe(nw,{id:b,disabled:t.disabled,key:r.value,readonly:t.readOnly,type:"checkbox",checked:l.value.checked,indeterminate:l.value.indeterminate,modelValue:r.value,"onUpdate:modelValue":F[0]||(F[0]=C=>r.value=C),onChange:f,"aria-label":"Select CHECKED Items",class:z(S.$style["ag-checkbox-input"])},null,8,["disabled","readonly","checked","indeterminate","modelValue","class"])),[[W(n),{content:c.value,hideOnClick:!1,contentClass:"extra-padding"}]])]),_:1},8,["options","disabled","readOnly"]))}}),[["__cssModules",{$style:{"ag-checkbox-input":"_ag-checkbox-input_1efbt_1","button-group":"_button-group_1efbt_46","button-main":"_button-main_1efbt_46",headerCheckbox:"_headerCheckbox_1efbt_50"}}]]),DK={key:1},_K=Ct(ct({name:"StatusRenderer",__name:"StatusRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=Go,n=mn,i=e,{isEditing:o}=KC(i),s=Y(null),r=Y(null),a=q(()=>i.value),l=q(()=>a.value===void 0),c=q(()=>{var f;return((f=a.value)==null?void 0:f.name)||"No status"}),u=q(()=>{var g;const f=(g=a.value)==null?void 0:g.color;return{backgroundColor:gy(f)?f:"#fff",border:my(f,"white")?"1px solid #ccc":"1px solid #fff"}}),d=q(()=>{var f;return{disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:I3((f=a.value)==null?void 0:f.label),inputRef:s,wrapperRef:r,clickable:!i.disabled&&!i.readOnly,active:o}}),{argsMain:h}=or(d);return(f,g)=>ot((K(),Xe(W(sr),_n(W(h),{ref_key:"wrapperRef",ref:r}),{default:Ee(()=>[l.value?it("",!0):(K(),Ce("div",{key:0,class:z(f.$style["status-renderer"])},[a.value?(K(),Ce(Ot,{key:0},[we("div",{class:z(f.$style["status-renderer__color-code"]),style:gn(u.value)},null,6),ot((K(),Ce("div",{class:z(f.$style["status-renderer__status-name"])},[dt(bt(c.value),1)],2)),[[W(n),{content:c.value}]])],64)):l.value?it("",!0):(K(),Ce("div",DK,"No status"))],2))]),_:1},16)),[[W(t),{isLoading:l.value}]])}}),[["__cssModules",{$style:{"status-renderer":"_status-renderer_ui0ga_1","status-renderer__color-code":"_status-renderer__color-code_ui0ga_10","status-renderer__status-name":"_status-renderer__status-name_ui0ga_20"}}]]),xK=["width","height","viewBox"],FK=["d"],TK="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",PK=ct({__name:"RatingComponent",props:{params:{default:()=>({maxRating:5,readOnly:!1,disabled:!1})},modelValue:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","change"],setup(e,{emit:t}){const n=e,i=t,o=Y(n.modelValue??0),s=q(()=>{var b;return((b=n.params)==null?void 0:b.size)??40}),r=q(()=>{var b;return((b=n.params)==null?void 0:b.iconViewBox)??"0 0 24 24"}),a=q(()=>{var b;return((b=n.params)==null?void 0:b.iconPath)??TK}),l=q(()=>{var b;return((b=n.params)==null?void 0:b.wrapperTag)??"span"}),c=q(()=>{var b;return n.disabled||((b=n.params)==null?void 0:b.disabled)||!1}),u=q(()=>{var b;return n.readOnly||((b=n.params)==null?void 0:b.readOnly)||!1}),d=q(()=>!c.value&&!u.value),h=q(()=>c.value?"not-allowed":u.value?"default":"pointer");ut(()=>n.modelValue,b=>{typeof b=="number"&&b!==o.value&&(o.value=b)});const f=b=>{var S;return((S=n.params)==null?void 0:S.maxRating)-b+1<=o.value},g=b=>{d.value&&y(b)},m=b=>{d.value&&y(b)},y=b=>{var F,C;if(!d.value)return;const S=((F=n.params)==null?void 0:F.maxRating)-b+1;o.value=S,i("update:modelValue",S),i("update",S),i("change",S),(C=n.params)!=null&&C.onUpdate&&n.params.onUpdate(S)};return(b,S)=>(K(),Ce("div",{class:z(["rating-component",{"rating-component--disabled":c.value,"rating-component--readOnly":u.value}])},[(K(!0),Ce(Ot,null,Un(e.params.maxRating,F=>(K(),Xe(XN(l.value),{key:F,class:z(["rating-item",{filled:f(F),"rating-item--disabled":c.value,"rating-item--readOnly":u.value}]),style:gn({cursor:h.value,order:e.params.maxRating-F,height:s.value+"px",width:s.value+"px"}),"aria-checked":f(F),"aria-disabled":c.value,"aria-readOnly":u.value,tabindex:c.value?-1:0,onClick:on(C=>g(F),["prevent","stop"]),onKeyup:[AR(on(C=>m(F),["prevent"]),["enter"]),AR(on(C=>m(F),["prevent"]),["space"])]},{default:Ee(()=>[_t(b.$slots,"icon",{index:F,filled:f(F),size:s.value,iconViewBox:r.value,disabled:c.value,readOnly:u.value},()=>[(K(),Ce("svg",{class:"rating-icon",width:s.value,height:s.value,viewBox:r.value,"aria-hidden":"true",focusable:"false"},[we("path",{d:a.value},null,8,FK)],8,xK))]),_t(b.$slots,"overlay",{index:F,filled:f(F),disabled:c.value,readOnly:u.value})]),_:2},1064,["class","style","aria-checked","aria-disabled","aria-readOnly","tabindex","onClick","onKeyup"]))),128))],2))}}),t1=Ct(ct({__name:"PopupLayout",props:{popupName:{},showOverlay:{type:Boolean,default:!0},overlayOpacity:{default:.5},closeOnOverlayClick:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0}},emits:["shown","hidden"],setup(e,{expose:t,emit:n}){const i=e,{popupRef:o,show:s,hide:r,isVisible:a}=r5({useTrigger:!1,arrow:!1,centered:!0,showOverlay:i.showOverlay,overlayOpacity:i.overlayOpacity,closeOnOverlayClick:i.closeOnOverlayClick,appendTo(u){return document.body}}),l=u=>{i.closeOnEscape&&u.key==="Escape"&&a.value&&r()};Sn(()=>{document.addEventListener("keydown",l)}),qn(()=>{document.removeEventListener("keydown",l)}),t({show:s,hide:r,isVisible:a});const c=n;return ut(()=>a.value,u=>{c(u?"shown":"hidden")}),(u,d)=>{const h=df("tooltip");return K(),Ce("div",{ref_key:"popupRef",ref:o,class:z(u.$style.popupContainer)},[we("div",{class:z(u.$style.popupWrapper)},[we("div",{class:z(u.$style.header)},[we("span",{class:z(u.$style["header-title"])},bt(e.popupName),3),ot((K(),Xe(pt,{style:{position:"absolute",top:"0",right:"0"},variant:"text",onClick:W(r),"aria-label":"Close popup"},{default:Ee(()=>[ve(mt,{src:"Xmark"})]),_:1},8,["onClick"])),[[h,"Close"]])],2),we("div",{class:z(u.$style.body)},[_t(u.$slots,"default")],2),we("div",{class:z(u.$style.footer)},[_t(u.$slots,"footer")],2)],2)],2)}}}),[["__cssModules",{$style:{popupContainer:"_popupContainer_1cwaa_1",popupWrapper:"_popupWrapper_1cwaa_5",popupFadeIn:"_popupFadeIn_1cwaa_1",header:"_header_1cwaa_19","header-title":"_header-title_1cwaa_28",body:"_body_1cwaa_38",footer:"_footer_1cwaa_43"}}]]),IK={list_cursor:{error:"Failed to fetch data. Please reload table."},assignedUser:{error:"Failed to fetch assignees. Please reload table."},metricValues:{error:"Failed to fetch metric values. Please reload table."},assignableUser:{error:"Failed to fetch people. Please try again."},assignableStatus:{error:"Failed to fetch statuses. Please try again."},basicInfor:{error:"Failed to fetch data. Please try again."},item:{error:"Update failed. Please try again."},removeAssignee:{error:"Update failed. Please try again."},createNewScene:{error:"Creation failed. Please try again."},metricList:{error:"Failed to fetch metrics. Please try again."},multipleAssignableUser:{error:"Failed to fetch data. Please reload table."},getPermission:{error:"Failed to fetch permissions."},delete_rendition:{success:"Deletion successful.",error:"Deletion failed. Please try again."},delete_thumbnail:{success:"Deletion successful.",error:"Deletion failed. Please try again."},archive_item:{success:"Archive successful.",error:"Archive failed. Please try again."},unarchive_item:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},bulkDelete:{success:"Deletion successful.",error:"Deletion failed. Please try again."},bulkArchive:{success:"Archive successful.",error:"Archive failed. Please try again."},bulkDateUpdate:{error:"Failed to update items."},bulkAssignUpdate:{error:"Failed to update assignees."},bulkStatusUpdate:{error:"Failed to update items."},getUserPermission:{error:"Failed to fetch user permissions."},getEntityDetail:{error:"Failed to fetch entity details."},bulkUnarchive:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},downloadTemplate:{},importItems:{},exportItems:{},updateFromFile:{},getStatuses:{},me:{},workspaces:{}},Rd=Sc("toast",()=>{const e=Y([]),t=(o,s)=>{const r=IK[o];if(r){const a=r[s];if(a){n({id:o,type:s,message:a});return}}else n({id:o,type:s,message:o})},n=(o,s=5e3)=>{const r={...o,id:o.id??Date.now()+Math.random()};e.value.push(r),setTimeout(()=>{i(r.id)},s)};function i(o){e.value=e.value.filter(s=>s.id!==o)}return{notifications:e,addNotification:n,removeNotification:i,showMessage:t}}),AK=["innerHTML"],kK=Ct(ct({__name:"Snackbar",setup(e){const t=HB,n=Rd(),{removeNotification:i}=n,{notifications:o}=ys(n),s=c=>c.trim().startsWith("<svg"),r=Y("Copy to clipboard"),a=()=>{setTimeout(()=>{r.value="Copy to clipboard"},1e3)},l=c=>{navigator.clipboard.writeText(c).then(()=>{r.value="Copied!",a()},()=>{r.value="Copy failed",a()})};return(c,u)=>{const d=df("tooltip");return K(),Xe(EB,{name:"list",tag:"div",class:z(c.$style["notification-wrapper"])},{default:Ee(()=>[(K(!0),Ce(Ot,null,Un(W(o),h=>{var f;return ot((K(),Ce("div",{key:h.id,class:z([c.$style["notification-item"],c.$style[`notification--${h.type||"info"}`],!(h!=null&&h.actions)||((f=h==null?void 0:h.actions)==null?void 0:f.length)==0?c.$style["snackbar-type"]:""])},[we("p",{class:z(c.$style.snackbar__message)},[h.icon&&!s(h.icon)?(K(),Xe(mt,{key:0,src:h.icon,source:"remote"},null,8,["src"])):it("",!0),h.icon&&s(h.icon)?(K(),Ce("i",{key:1,class:z(c.$style["icon-draw"]),innerHTML:h.icon},null,10,AK)):it("",!0),ot((K(),Ce("span",{class:z(c.$style["error-message"])},[dt(bt(h.message),1)],2)),[[d,{content:h.message}]])],2),h.actions?(K(),Ce("div",{key:0,class:z(c.$style["actions-notification"])},[(K(!0),Ce(Ot,null,Un(h.actions,g=>(K(),Xe(pt,_n({key:g.label},{ref_for:!0},g,{onClick:g.action}),{prefix:Ee(()=>[g.btnIcon?(K(),Xe(mt,{key:0,src:g.btnIcon,source:"remote",color:"white"},null,8,["src"])):it("",!0)]),_:2},1040,["onClick"]))),128))],2)):it("",!0),h.type=="error"?ot((K(),Xe(pt,{key:1,variant:"tertiary",onClick:g=>l(h.message)},{prefix:Ee(()=>[ve(mt,{src:"Copy",source:"remote",color:"white"})]),_:1},8,["onClick"])),[[d,r.value]]):it("",!0),ve(pt,{variant:"tertiary",onClick:g=>W(i)(h.id),class:z(c.$style["close-btn"]),size:18},{default:Ee(()=>[ve(mt,{src:"Xmark",color:"var(--icon-color)"})]),_:1},8,["onClick","class"])],2)),[[W(t)]])}),128))]),_:1},8,["class"])}}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_1tunr_1","notification-item":"_notification-item_1tunr_16","notification--success":"_notification--success_1tunr_30","notification--error":"_notification--error_1tunr_33","close-btn":"_close-btn_1tunr_37","notification--info":"_notification--info_1tunr_40","notification--warning":"_notification--warning_1tunr_47","notification--interactive":"_notification--interactive_1tunr_54","snackbar-type":"_snackbar-type_1tunr_60",snackbar__message:"_snackbar__message_1tunr_68","error-message":"_error-message_1tunr_80","actions-notification":"_actions-notification_1tunr_89"}}]]);/*!
87
+ This will fail in production.`);r=qa,r._s.has(e)||(o?UC(e,t,i,r):HP(e,i,r),M.env.NODE_ENV!=="production"&&(s._pinia=r));const c=r._s.get(e);if(M.env.NODE_ENV!=="production"&&a){const u="__hot:"+e,d=o?UC(u,t,i,r,!0):HP(u,bo({},i),r,!0);a._hotUpdate(d),delete r.state.value[u],r._s.delete(u)}if(M.env.NODE_ENV!=="production"&&nr){const u=Di();if(u&&u.proxy&&!a){const d=u.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[e]=c}}return c}return s.$id=e,s}function ys(e){const t=St(e),n={};for(const i in t){const o=t[i];o.effect?n[i]=q({get:()=>e[i],set(s){e[i]=s}}):(Zt(o)||ro(o))&&(n[i]=Fr(e,i))}return n}const zC=Sc("permissionStore",()=>{const e=Y([]),t=Y(),n=Y({});return{userPermissions:e,entityPermissions:t,itemPermission:n,setUserPermissions:r=>{e.value=r},setEntityPermissions:r=>{t.value=r},setItemPermission:(r,a)=>{n.value[r]=a}}}),A8="woohoo_getWoohooUserInterface_read",jC="media_getReviewUserInterface_read",k8="update_getUpdateUserInterface_read",O8=sessionStorage.getItem("BASE_URL"),M8=sessionStorage.getItem("BASE_REVIEW_URL"),L8=(e,t,n)=>{const i=zC(),{userPermissions:o}=ys(i),s=q(()=>{const{ws_code:H,entity_id:te,scene_id:B}=e.value;return{baseDomain:O8||"",ws_code:H||"",entity_id:te||"",scene_id:B||"",reviewDomain:M8||"",take_id:te||"",woohoo_id:te||"",parent_id:te||""}}),r=q(()=>{var te;const H=e.value.permissions;return{canOpenSceneHub:!0,canOpenReview:o.value.includes(jC),canCopyLink:!0,canRename:(H==null?void 0:H.has_edit_permission)??!1,canOpenTakeInReview:o.value.includes(jC),canOpenTakeInUpdate:o.value.includes(k8),canOpenTakeInWoohoo:o.value.includes(A8),canDeleteRendition:((te=H==null?void 0:H.media)==null?void 0:te.has_delete_rendition_permission)??!1,canDeleteThumbnail:(H==null?void 0:H.has_edit_thumbnail_permission)??!1,canArchiveScene:(H==null?void 0:H.has_edit_permission)??!1,canUnarchiveScene:(H==null?void 0:H.has_edit_permission)??!1,canDeleteScene:(H==null?void 0:H.has_delete_permission)??!1}}),a=q(()=>({project:fo({type:"project",config:s.value}).url,take_review:fo({type:"review_take",config:s.value}).url,review:fo({type:"review_scene",config:s.value}).url,review_scene:fo({type:"review_scene",config:s.value}).url,woohoo:fo({type:"woohoo",config:s.value}).url,update:fo({type:"update",config:s.value}).url,scene_hub:fo({type:"scene_hub",config:s.value}).url})),l=(H,te)=>{const B=H instanceof MouseEvent&&(H.metaKey||H.ctrlKey),G=a.value[te]||"";G&&(B?window.open(G,"_blank"):window.location.href=G)},c=async(H,te)=>{var B;try{const G=await((B=e.value.axiosService.value)==null?void 0:B.deleteRendition(s.value.ws_code,[s.value.scene_id],!0));if((G==null?void 0:G.message)!="Done"){console.error("Failed to delete rendition.");return}}catch(G){console.error("Error deleting rendition",G)}},u=async(H,te)=>{var B;try{await((B=e.value.axiosService.value)==null?void 0:B.deleteThumbnail(s.value.ws_code,[s.value.scene_id]))}catch(G){console.error("Error deleting thumbnail",G)}},d=async(H,te)=>{var B;try{const G=await((B=e.value.axiosService.value)==null?void 0:B.archiveScene(s.value.ws_code,s.value.entity_id,[s.value.scene_id]));if((G==null?void 0:G.message)!="Done"){console.error("Failed to archive scene.");return}te&&te("archived")}catch(G){console.error("Error archiving item",G)}},h=async(H,te)=>{var B;try{const G=await((B=e.value.axiosService.value)==null?void 0:B.deleteScene(s.value.ws_code,s.value.entity_id,s.value.scene_id));if((G==null?void 0:G.message)!="Done"){console.error("Failed to delete scene.");return}te&&te("deleted")}catch(G){console.error("Error deleting item",G)}},f=H=>{const te=a.value.scene_hub||"";te&&navigator.clipboard.writeText(te)},g=async(H,te)=>{var B;try{const G=await((B=e.value.axiosService.value)==null?void 0:B.unarchiveScene(s.value.ws_code,s.value.entity_id,[s.value.scene_id]));if((G==null?void 0:G.message)!="Done"){console.error("Failed to unarchive scene.");return}te&&te("unarchived")}catch(G){console.error("Error unarchiving item",G)}},m=H=>l(H,"scene_hub"),y=H=>l(H,"review_scene"),{tooltip:b,copyToClipboard:S}=gC(a.value.scene_hub||"",void 0,!0),F=H=>{S()},C=H=>n(H),R=H=>l(H,"review"),E=H=>l(H,"update"),x=H=>l(H,"woohoo"),k=H=>c(),O=H=>u(),A=H=>d(H,t),D=H=>g(H,t),P=H=>h(H,t),V=q(()=>{let H=[];return!s.value.scene_id&&e.value.optionBlock&&H.push(...e.value.optionBlock),Array.isArray(e.value.optionBlock)&&e.value.optionBlock.length?e.value.optionBlock:[{id:"quick-actions",groupLabel:"Quick actions",type:"row",options:[{id:"scene-tile",label:"",icon:"CustomSceneHub",description:"Scene tile",action:m,hide:!r.value.canOpenSceneHub,type:"icon"},{id:"open-in-arbo-review",label:"",icon:"PenRuler",description:"Open in arbo Review",action:y,hide:!r.value.canOpenReview,type:"icon"},{id:"copy-link",label:"",icon:"Link",description:b.value,action:F,hide:!r.value.canCopyLink,type:"icon"}]},{id:"action",groupLabel:"Action",type:"column",options:[{id:"rename",label:"Rename",icon:"Pen",action:C,hide:!r.value.canRename,type:"icon"}]},{id:"download-options-take",type:"column",groupLabel:"Download Options",options:[{id:"open-take-in",label:"Open Take in",icon:"ArrowUpRightFromSquare",subMenu:{id:"sub-menu",type:"column",groupLabel:"Sub Menu",options:[{id:"review",label:"Review",icon:"PenRuler",action:R,hide:!r.value.canOpenTakeInReview,type:"icon"},{id:"update",label:"Update",icon:"UserCheck",action:E,hide:!r.value.canOpenTakeInUpdate,type:"icon"},{id:"woohoo-details",label:"Woohoo Details",icon:"ChartPie",action:x,hide:!r.value.canOpenTakeInWoohoo,type:"icon"}]}}]},{id:"download-options-delete",type:"column",groupLabel:"Download Options",options:[{id:"delete-rendition",label:"Delete rendition",icon:"Clapperboard",action:k,hide:!r.value.canDeleteRendition,type:"icon"},{id:"delete-thumbnail",label:"Delete thumbnail",icon:"Image",action:O,hide:!r.value.canDeleteThumbnail,type:"icon"}]},{id:"download-options-archive",type:"column",groupLabel:"Download Options",options:[{id:"archive",label:"Archive",icon:"BoxArchive",action:A,hide:!r.value.canArchiveScene,type:"icon"},{id:"unarchive",label:"Unarchive",icon:"BoxArchive",action:D,hide:!r.value.canUnarchiveScene,type:"icon"},{id:"delete",label:"Delete",icon:"TrashCan",isDanger:!0,description:"Delete permanently",action:P,hide:!r.value.canDeleteScene,type:"icon"}]}]});return{linkMap:a,handleOpen:l,copyLink:f,deleteRendition:c,deleteThumbnail:u,archiveItem:d,deleteItem:h,unArchiveItem:g,options:V}};function or(e){const t=Y(!1),n=Y(!1),i=q(()=>{var d;const c=e.value,u=!!c.readOnly;return{readOnly:u,disabled:!!c.disabled,hovered:n.value,focused:t.value,isEmpty:c.empty??!1,error:!!c.error,actived:!!((d=c.active)!=null&&d.value),clickable:u?!1:c.clickable??!1}}),o=()=>{t.value=!0,Xt(()=>{const c=l(e.value.inputRef);c==null||c.focus()})},s=()=>{t.value=!1},r=()=>{n.value=!0},a=()=>{n.value=!1},l=c=>{if(!c)return null;const u=c.value||c;return(u instanceof HTMLElement?u:u==null?void 0:u.$el)||null};return Sn(()=>{const c=l(e.value.inputRef),u=l(e.value.wrapperRef);c&&(c.addEventListener("focus",o),c.addEventListener("blur",s)),u&&(u.addEventListener("mouseenter",r),u.addEventListener("mouseleave",a))}),qn(()=>{const c=l(e.value.inputRef),u=l(e.value.wrapperRef);c&&(c.removeEventListener("focus",o),c.removeEventListener("blur",s)),u&&(u.removeEventListener("mouseenter",r),u.removeEventListener("mouseleave",a))}),{isFocus:t,isHover:n,argsMain:i,handleFocus:o}}const KC=e=>{const t=Y(!1),n=q(()=>t.value);return Sn(()=>{var a,l,c,u;const i=(a=e.params)==null?void 0:a.api,o=(l=e.params)==null?void 0:l.node,s=o==null?void 0:o.rowIndex,r=(u=(c=e.params)==null?void 0:c.colDef)==null?void 0:u.field;return i==null||i.addEventListener("cellEditingStarted",d=>{d.rowIndex===s&&d.colDef.field===r&&(t.value=!0)}),i==null||i.addEventListener("cellEditingStopped",d=>{d.rowIndex===s&&d.colDef.field===r&&(t.value=!1)}),{isEditing:n}}),{isEditing:n}},GP=Ct(ct({__name:"StatusBadge",props:{size:{default:16},color:{default:"#02C39A"},label:{default:""},status:{default:"active"},statusTooltip:{default:"Online"},showBadge:{type:Boolean,default:!0},loading:{type:Boolean}},setup(e){const t=Go,{triggerRef:n,popupRef:i}=tr({trigger:"mouseenter focus",theme:"dark",placement:"right",arrow:!0}),o=q(()=>{switch(s.status){case"active":return"#02C39A";case"offline":return"#808080";case"busy":return"#ff0000";case"away":return"#F7941D";default:return"#02C39A"}}),s=e;return(r,a)=>(K(),Ce("div",{class:z(r.$style["status-badge-wrapper"]),style:gn({"--badge-size":`${s.size}px`,"--badge-color":o.value})},[_t(r.$slots,"default"),ot(we("div",{class:z(r.$style["badge-indicator"]),ref_key:"triggerRef",ref:n},null,2),[[us,s.showBadge],[U(t),{isLoading:s.loading,fullwidth:!0}]]),we("div",{ref_key:"popupRef",ref:i,class:z(r.$style["badge-tooltip"])},bt(s.statusTooltip),3)],6))}}),[["__cssModules",{$style:{"status-badge-wrapper":"_status-badge-wrapper_13xqg_1","badge-indicator":"_badge-indicator_13xqg_6",active:"_active_13xqg_19",offline:"_offline_13xqg_22",busy:"_busy_13xqg_25",away:"_away_13xqg_28","badge-tooltip":"_badge-tooltip_13xqg_32"}}]]),$P=Sc("switchStore",()=>{const e=ki("switchInstance");return{openSceneHub:(i,o)=>{if(i){if(!e)throw console.error("Switch instance not found"),new Error("Switch instance not found");e("scene_hub",{id:i,commentId:o},{showLoading:!1})}},openPeopleInsight:i=>{if(!e)throw console.error("Switch instance not found"),new Error("Switch instance not found");e("people_insight",{tab:"home",id:i||""},{showLoading:!1})}}}),N8=ct({__name:"MiniPeopleCard",props:{user:{},status:{default:"active"},timezone:{default:hC()},userConfig:{default:()=>({size:96,isUseShortLabel:!0,bgColor:"#E0E0E0",color:"#757575",isMe:!1})},showInsightButton:{type:Boolean,default:!0},showCopyLinkButton:{type:Boolean,default:!0},apiUpdateFunction:{type:Function,default:void 0},refreshInterval:{default:3e4},enableAutoRefresh:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},private:{type:Boolean,default:!1}},emits:["insightClick","copyLink","dataUpdated"],setup(e,{emit:t}){const n=mn,i=Go,o=e,s=t,r={active:"Active in the last 10 minutes",offline:"Logged out of TESSR",busy:"User is busy",away:"No activity in the last 10 minutes"},a={active:"#02C39A",offline:"#808080",busy:"#FF0000",away:"#F7941D"},l=Y(o.status),c=Y(o.timezone),u=Y(!0),d=Y(null),h=q(()=>r[l.value]),f=q(()=>a[l.value]),g=q(()=>{var P;return(P=o.user)==null?void 0:P.name}),m=q(()=>c.value?$6(c.value,"HH:mm"):""),y=q(()=>c.value?`(${W6(c.value)})`:""),b=async()=>{var P,V,H;if(o.apiUpdateFunction)try{const te=await o.apiUpdateFunction(o.user.id);if(!te)throw new Error("No data returned from API");(P=te.private_info)!=null&&P.is_offline?l.value="offline":(V=te.private_info)!=null&&V.last_active?l.value="active":l.value="away",(H=te.private_info)!=null&&H.timezone&&(c.value=te.private_info.timezone),s("dataUpdated",te)}catch(te){console.error("Failed to fetch user data:",te)}finally{u.value=!1}},S=()=>{!o.apiUpdateFunction||!o.enableAutoRefresh||(d.value!==null&&clearInterval(d.value),d.value=setInterval(b,o.refreshInterval))},F=()=>{d.value!==null&&(clearInterval(d.value),d.value=null)},C=q(()=>{const P=window.location.origin,V=sessionStorage.getItem("ws_code")||"";return fo({type:"people_insight",config:{ws_code:V,baseDomain:P,user_id:""}}).url}),{copyToClipboard:R,tooltip:E}=gC(C.value,()=>s("copyLink",o.user.id)),x=$P(),{openPeopleInsight:k}=x,O=P=>{if(P.ctrlKey||P.metaKey){window.open(C.value,"_blank");return}try{k(String(o.user.id))}catch{window.open(C.value,"_blank")}},A=P=>{O(P),s("insightClick",o.user.id)};ut([()=>o.enableAutoRefresh,()=>o.refreshInterval,()=>o.apiUpdateFunction],()=>{F(),o.enableAutoRefresh&&o.apiUpdateFunction&&S()}),Sn(async()=>{o.apiUpdateFunction&&(await b(),S())}),qn(F);const D=q(()=>({name:o.user.name,initial:o.user.initial,id:o.user.id,profile_image:o.user.profile_image,color:o.user.color,size:98}));return(P,V)=>(K(),Ce("div",{class:z([P.$style["mini-people-card"],{[P.$style.loading]:u.value},"bg-skeleton"])},[we("div",{class:z(P.$style["avatar-section"])},[o.private?(K(),Xe(Zu,_n({key:1,readOnly:!0},D.value),null,16)):(K(),Xe(GP,{key:0,size:16,status:l.value,loading:u.value,"status-tooltip":h.value},{default:Ee(()=>[ve(Zu,_n({readOnly:!0},D.value),null,16)]),_:1},8,["status","loading","status-tooltip"]))],2),we("div",{class:z(P.$style["user-info"])},[we("div",{class:z(P.$style["info-row"])},[we("h3",{class:z(P.$style["user-name"])},bt(g.value),3),o.private?it("",!0):ot((K(),Ce("span",{key:0,class:z(P.$style["status-badge"]),style:gn({color:f.value})},[dt(bt(l.value),1)],6)),[[U(i),{isLoading:u.value,fullwidth:!0}]])],2),c.value?(K(),Ce("div",{key:0,class:z([P.$style["info-row"],P.$style["time-row"]])},[ot((K(),Ce("div",{class:z(P.$style["time-display"])},[ve(mt,{source:"remote",src:"Clock",class:z(P.$style["clock-icon"])},null,8,["class"]),we("span",{class:z(P.$style["time-text"])},[we("strong",null,bt(m.value),1),we("span",{class:z(P.$style.separator)},"|",2),we("span",null,bt(y.value),1)],2)],2)),[[U(i),{isLoading:u.value,fullwidth:!0}]])],2)):it("",!0),!e.readOnly&&!o.private?(K(),Ce("div",{key:1,class:z([P.$style["info-row"],P.$style.actions])},[e.showInsightButton?(K(),Xe(pt,{key:0,label:"Insights",variant:"primary",size:"default",style:{flex:"1"},onClick:on(A,["prevent","stop"]),disabled:o.disabled},null,8,["disabled"])):it("",!0),e.showCopyLinkButton?ot((K(),Xe(pt,{key:1,variant:["icon","secondary"],size:"default","aria-label":"Copy link",onClick:on(U(R),["prevent","stop"]),disabled:o.disabled},{default:Ee(()=>[ve(mt,{source:"remote",src:"Link"})]),_:1},8,["onClick","disabled"])),[[U(n),{content:U(E),contentClass:["extra-padding"],hideOnClick:!1,delay:[300,0]}]]):it("",!0)],2)):it("",!0)],2)],2))}}),V8=Ct(N8,[["__cssModules",{$style:{"mini-people-card":"_mini-people-card_xknlb_1",loading:"_loading_xknlb_22","avatar-section":"_avatar-section_xknlb_25","user-info":"_user-info_xknlb_30","info-row":"_info-row_xknlb_36","time-row":"_time-row_xknlb_43","time-display":"_time-display_xknlb_49","time-text":"_time-text_xknlb_54","actions-row":"_actions-row_xknlb_61","user-name":"_user-name_xknlb_65","status-badge":"_status-badge_xknlb_76",active:"_active_xknlb_90",offline:"_offline_xknlb_93",busy:"_busy_xknlb_96",away:"_away_xknlb_99","user-local-time":"_user-local-time_xknlb_102","clock-icon":"_clock-icon_xknlb_110",separator:"_separator_xknlb_122",timezone:"_timezone_xknlb_125","refresh-btn":"_refresh-btn_xknlb_128",spinning:"_spinning_xknlb_131",spin:"_spin_xknlb_131","insight-btn":"_insight-btn_xknlb_134","copy-link-btn":"_copy-link-btn_xknlb_138","last-update":"_last-update_xknlb_141","loading-overlay":"_loading-overlay_xknlb_147","loading-spinner":"_loading-spinner_xknlb_159"}}]]),B8=Ct(ct({name:"MoreOption",__name:"MoreOption",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=mn,n=e,{isEditing:i}=KC(n);return(o,s)=>ot((K(),Xe(pt,{class:z(o.$style.btnMoreOptions),variant:["secondary","icon"],size:"small",actived:U(i)},{default:Ee(()=>[ve(mt,{src:"EllipsisVertical",source:"remote"})]),_:1},8,["class","actived"])),[[U(t),"More actions"]])}}),[["__cssModules",{$style:{btnMoreOptions:"_btnMoreOptions_r5y5p_1"}}]]),H8=["src","width","height","alt"],Np=Ct(ct({__name:"Visual",props:{src:{},source:{default:"remote"},size:{},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},color:{},ratio:{default:"1/1"}},setup(e){const t=Go,{getCachedValue:n,setCachedValue:i}=qu({dbName:"visual-cache-db",storeName:"visuals"}),o=h=>{if(h!==void 0)return typeof h=="number"?`${h}px`:typeof h=="string"&&/^\d+$/.test(h)?`${h}px`:h},s=e,r=q(()=>({minWidth:o(s.minWidth),maxWidth:o(s.maxWidth),minHeight:o(s.minHeight),maxHeight:o(s.maxHeight),aspectRatio:s.ratio,width:o(s.size)})),a=async h=>{const f=await n(h);return!f||!(f instanceof Blob)?void 0:URL.createObjectURL(f)},l=async(h,f)=>{await i(h,f)},c=q(()=>({name:s.src,size:Number(s.size||100),color:""})),{url:u,loading:d}=t_(c,"visual",l,a);return(h,f)=>ot((K(),Ce("div",{class:z([h.$style.visualWrapper,{[h.$style.loading]:U(d)}]),style:gn(r.value)},[we("img",{src:U(u),width:e.size,height:e.size,alt:"visual-"+e.src,style:gn(r.value)},null,12,H8)],6)),[[U(t),{isLoading:U(d),type:"skeleton",size:"cover",fullwidth:!0}]])}}),[["__cssModules",{$style:{visualWrapper:"_visualWrapper_1sro0_1",loading:"_loading_1sro0_8",pulse:"_pulse_1sro0_1"}}]]),G8=["tabindex"],Vp=Ct(ct({name:"ListItem",directives:{tooltip:mn},__name:"ListItem",props:{label:{},value:{},type:{},selected:{type:Boolean},disabled:{type:Boolean},hover:{type:Boolean},clickable:{type:Boolean,default:!0},danger:{type:Boolean},data:{},icon:{},readOnly:{type:Boolean,default:!1},show:{type:Boolean}},emits:["click","keydown","update:selected","select"],setup(e,{emit:t}){const n=e,i=t,o=Y(!1),s=Y(!1);function r(E){if(!E||typeof E!="object")return!1;const x=E;return typeof x.name=="string"&&typeof x.id=="string"&&typeof x.initial=="string"}const a=q(()=>n.type==="status"||n.type==="assignee"||n.type==="icon"||!!R.prefix),l=q(()=>!!R.suffix||n.danger&&o.value),c=q(()=>n.disabled||!n.clickable?-1:0),u=q(()=>{var E;return n.type==="status"&&typeof((E=n.data)==null?void 0:E.color)=="string"?{backgroundColor:n.data.color,border:my(n.data.color,"white")?"1px solid #ccc":"1px solid #fff"}:{}}),d=_f(),h=q(()=>({[d.active]:n.selected??!1,[d.disabled]:n.disabled??!1,[d.hover]:n.hover??!1,[d.clickable]:(n.clickable??!0)&&!n.disabled,[d.danger]:n.danger??!1,[d["has-prefix"]]:a.value,[d["has-suffix"]]:l.value,[d.readOnly]:n.readOnly})),f=q(()=>({content:"Cancel",...C})),g=q(()=>({content:"Confirm",theme:"warning",...C}));function m(E){return{name:E.name,initial:E.initial,id:E.id,profile_image:E.profile_image??null,color:E.color,size:24}}function y(){o.value=!1}function b(E){E&&i("click",E),(n.clickable??!0)&&(i("update:selected",!n.selected),i("select",!n.selected))}function S(E){if(!n.disabled){if(n.danger&&!o.value){o.value=!0;return}n.danger||b(E)}}function F(E){if(i("keydown",E),!n.disabled)if(E.key==="Enter"||E.key===" "){E.preventDefault();const x=new MouseEvent("click",{bubbles:!0,cancelable:!0});S(x)}else E.key==="Escape"&&o.value&&(E.preventDefault(),y())}const C=Object.freeze({delay:[500,0],contentClass:["extra-padding"]}),R=yv();return ut(()=>n.show,E=>{E===!1&&(o.value=!1)}),(E,x)=>{const k=df("tooltip");return K(),Ce("div",{class:z([E.$style["list-item"],h.value]),role:"listitem",tabindex:c.value,onClick:on(S,["stop","prevent"]),onKeydown:F,onMouseenter:x[0]||(x[0]=O=>s.value=!0),onMouseleave:x[1]||(x[1]=O=>s.value=!1)},[a.value?(K(),Ce("div",{key:0,class:z(E.$style["list-item__prefix"])},[_t(E.$slots,"prefix",{},()=>[e.type==="icon"&&e.icon?(K(),Xe(mt,{key:0,src:e.icon,source:"remote",class:z(E.$style["item-icon"])},null,8,["src","class"])):e.type==="status"?(K(),Ce("div",{key:1,class:z(E.$style["status-indicator"]),style:gn(u.value)},null,6)):e.type==="assignee"&&r(e.data)?(K(),Xe(Zu,_n({key:2},m(e.data),{class:E.$style["item-avatar"],readOnly:!0}),null,16,["class"])):it("",!0)])],2)):it("",!0),we("div",{class:z(E.$style["list-item__label"])},[_t(E.$slots,"label",{selected:e.selected},()=>[dt(bt(e.label),1)])],2),l.value?(K(),Ce("div",{key:1,class:z(E.$style["list-item__suffix"])},[_t(E.$slots,"suffix",{item:E.$props,hovered:s.value},()=>[e.danger&&o.value?(K(),Ce("div",{key:0,class:z(E.$style["confirm-action"])},[ot((K(),Xe(pt,{variant:["secondary","icon"],size:"small",onClick:on(y,["stop","prevent"])},{default:Ee(()=>[ve(mt,{src:"Xmark",source:"remote"})]),_:1})),[[k,f.value]]),ot((K(),Xe(pt,{variant:["danger","primary","icon"],size:"small",onClick:on(b,["stop","prevent"])},{default:Ee(()=>[ve(mt,{src:"Check",source:"remote"})]),_:1})),[[k,g.value]])],2)):it("",!0)])],2)):it("",!0)],42,G8)}}}),[["__cssModules",{$style:{"list-item":"_list-item_g74kb_1",disabled:"_disabled_g74kb_15",danger:"_danger_g74kb_18","has-prefix":"_has-prefix_g74kb_21","has-suffix":"_has-suffix_g74kb_21",clickable:"_clickable_g74kb_35",readOnly:"_readOnly_g74kb_38",hover:"_hover_g74kb_42",active:"_active_g74kb_48","list-item__prefix":"_list-item__prefix_g74kb_73","list-item__label":"_list-item__label_g74kb_81","list-item__suffix":"_list-item__suffix_g74kb_95","status-indicator":"_status-indicator_g74kb_102","item-icon":"_item-icon_g74kb_108","arbo-icon-state":"_arbo-icon-state_g74kb_113","item-avatar":"_item-avatar_g74kb_116","confirm-action":"_confirm-action_g74kb_125"}}]]),sr=Ct(ct({__name:"DisplayWrapper",props:{prefix:{},suffix:{},inputType:{},readOnly:{type:Boolean},disabled:{type:Boolean},hovered:{type:Boolean},focused:{type:Boolean},error:{type:Boolean},actived:{type:Boolean},clickable:{type:Boolean},size:{}},emits:["event"],setup(e,{expose:t,emit:n}){const i=e;yv();const o=_f(),s=Y(null),r=Y("default"),a=q(()=>{if(typeof i.size=="number")return`${i.size}px`;switch(i.size){case"small":return"32px";case"large":return"48px";case"default":default:return"32px"}}),l=q(()=>`${Math.max(50,Math.round(Math.random()*100))}%`),c=q(()=>({[o["display-wrapper"]]:!0,[o.disabled]:i.disabled,[o.readOnly]:i.readOnly,[o.error]:i.error,[o.clickable]:i.clickable,[o.active]:i.actived,[o.hovered]:i.hovered,[o.focused]:!i.readOnly&&!i.disabled&&i.focused})),u=()=>{var b,S;const f=((b=s.value)==null?void 0:b.querySelectorAll(".wrapper-prefix").length)||0,g=((S=s.value)==null?void 0:S.querySelectorAll(".wrapper-suffix").length)||0,m="var(--icon-size)",y=(f+g)*8;return f&&!g?`repeat(${f}, ${m}) calc(100% - ${f} * ${m} - ${y}px )`:!f&&g?`calc(100% - ${g} * ${m} - ${y}px ) repeat(${g}, ${m})`:f&&g?`repeat(${f}, ${m}) calc(100% - ${f} * ${m} - ${g} * ${m} - ${y}px ) repeat(${g}, ${m})`:"100%"},d=Y("100%");cf(()=>{Xt(()=>{d.value=u()})});const h=f=>{r.value=f};return t({rootEl:s,updateState:h,componentState:r}),(f,g)=>(K(),Ce("div",{ref_key:"rootEl",ref:s,class:z([[U(o)["display-wrapper"],c.value],"skeleton-loading-wrapper"]),style:gn({"--grid-template":d.value,"--wrapper-size":a.value,"--loading-overlay-width":l.value})},[_t(f.$slots,"prefix",{hovered:i.hovered,focused:i.focused}),_t(f.$slots,"default",{hovered:i.hovered,focused:i.focused,updateComponentState:h,disabled:i.disabled}),_t(f.$slots,"suffix",{hovered:i.hovered,focused:i.focused})],6))}}),[["__cssModules",{$style:{"display-wrapper":"_display-wrapper_1h8v5_1",readOnly:"_readOnly_1h8v5_22",disabled:"_disabled_1h8v5_22",error:"_error_1h8v5_22",hovered:"_hovered_1h8v5_22",active:"_active_1h8v5_26",clickable:"_clickable_1h8v5_31",suffix:"_suffix_1h8v5_37",prefix:"_prefix_1h8v5_38"}}]]),$8=["value","placeholder","disable","readonly","maxlength"],WP=Ct(ct({__name:"InputText",props:{modelValue:{},placeholder:{},focused:{type:Boolean},validatorFnc:{type:Function},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{}},emits:["update:modelValue","input","clear","enter","blur","cancel"],setup(e,{expose:t,emit:n}){const i=mn,o=e,s=n,r=Y(null),a=q(()=>{var S,F;return((S=o==null?void 0:o.modelValue)==null?void 0:S.length)&&((F=o==null?void 0:o.modelValue)==null?void 0:F.length)>0}),l=Wo(S=>{if(o.disabled||o.readOnly){S.preventDefault();return}const F=S.target;s("update:modelValue",F.value),s("input",F.value)},16),c=S=>{if(o.disabled||o.readOnly){S.preventDefault();return}s("update:modelValue",""),s("clear"),Xt(()=>{var F;(F=r.value)==null||F.focus()})},u=Wo(S=>{const F=(o==null?void 0:o.modelValue)||"";S.key==="Escape"?a.value?c(S):s("cancel"):S.key==="Enter"&&F.length>0&&(S.preventDefault(),S.stopImmediatePropagation(),S.stopPropagation(),s("input",F||""),s("enter",F||""))},300),d=`input-text-${Math.random().toString(36).substr(2,9)}`,h=Y(!1);ut(()=>o.modelValue,S=>{o.validatorFnc?h.value=!!S&&!o.validatorFnc(S):h.value=!1});const f=Y(null),g=q(()=>({disabled:o.disabled,readOnly:o.readOnly,error:h.value,inputRef:r,clickable:!o.disabled&&!o.readOnly,focused:o.focused,wrapperRef:f})),{argsMain:m,isHover:y,isFocus:b}=or(g);return t({focus:()=>{Xt(()=>{var S;(S=r.value)==null||S.focus(),console.log("focus called")})}}),(S,F)=>(K(),Ce("div",{class:z(S.$style["input-wrapper"])},[ve(sr,_n(U(m),{ref_key:"wrapperRef",ref:f,class:S.$style["input-box"]}),{suffix:Ee(()=>[(a.value||(U(y)||U(b))&&a.value)&&!o.disabled&&!o.readOnly?_t(S.$slots,"clear",{key:0},()=>[ot((K(),Xe(pt,{variant:["icon"],"aria-label":"Clear search",onClick:on(c,["stop"]),size:16,rounded:!0},{default:Ee(()=>[ve(mt,{class:z([S.$style["cs-icon"]]),src:"XMarkSolid",size:"8",color:"white"},null,8,["class"])]),_:1})),[[U(i),{content:"Clear",contentClass:"extra-padding"}]])]):_t(S.$slots,"suffix",{key:1})]),default:Ee(()=>[we("input",{ref_key:"inputRef",ref:r,type:"text",value:e.modelValue,placeholder:e.placeholder,class:z([S.$style["column-config__input"]]),id:d,disable:e.disabled,readonly:e.readOnly,onInput:F[0]||(F[0]=(...C)=>U(l)&&U(l)(...C)),onKeydown:F[1]||(F[1]=(...C)=>U(u)&&U(u)(...C)),maxlength:e.maxLength},null,42,$8)]),_:3},16,["class"]),h.value?_t(S.$slots,"error",{key:0}):it("",!0)],2))}}),[["__cssModules",{$style:{"input-box":"_input-box_51nuy_1","has-suffix":"_has-suffix_51nuy_11","has-value":"_has-value_51nuy_11","is-disabled":"_is-disabled_51nuy_17","is-readonly":"_is-readonly_51nuy_24","column-config__input":"_column-config__input_51nuy_31"}}]]),qC=Ct(ct({__name:"SearchBox",props:{modelValue:{default:""},placeholder:{default:"Search..."},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{}},emits:["update:modelValue","search","clear","cancel"],setup(e,{expose:t,emit:n}){const i=e,o=n,s=Y(null),r=q(()=>i.modelValue.length>0),a=Wo(u=>{o("update:modelValue",u),o("search",u)},300),l=()=>{o("update:modelValue",""),o("clear"),Xt(()=>{var u;(u=s.value)==null||u.focus()})},c=Y(i.modelValue);return`${Math.random().toString(36).substr(2,9)}`,t({focus:()=>{var u;(u=s.value)==null||u.focus()}}),(u,d)=>(K(),Xe(WP,{ref_key:"searchInput",ref:s,modelValue:c.value,"onUpdate:modelValue":d[0]||(d[0]=h=>c.value=h),placeholder:e.placeholder,onInput:U(a),onClear:l,onCancel:d[1]||(d[1]=h=>o("cancel"))},{suffix:Ee(()=>[r.value?it("",!0):(K(),Xe(mt,{key:0,src:"MagnifyingGlass",class:z(u.$style.icon),color:"#a6a6a6"},null,8,["class"]))]),_:1},8,["modelValue","placeholder","onInput"]))}}),[["__cssModules",{$style:{"search-box":"_search-box_18t5g_1",icon:"_icon_18t5g_18"}}]]),W8=["aria-activedescendant"],U8=["innerHTML"],z8=10,YC=Ct(ct({__name:"SearchList",props:{options:{default:()=>[]},selectedId:{},loading:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},error:{default:null},params:{},maxHeight:{default:"282px"},width:{default:"200px"},minQueryLength:{default:0}},emits:["select","close","search","loadMore","cancel"],setup(e,{expose:t,emit:n}){const i=mn,o={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",TAB:"Tab"},s=e,r=n,a=Y(""),l=Y(-1),c=Y(null),u=Y(null),d=Y(new Map),h=q(()=>fC(a.value)),f=q(()=>{const $=h.value;if(!$||$.length<s.minQueryLength)return s.options;if(d.value.has($))return d.value.get($);const ce=s.options.map(ue=>({item:ue,score:q6(ue.label,$)})).filter(({score:ue})=>ue>0).sort((ue,xe)=>xe.score-ue.score).map(({item:ue})=>ue);return d.value.set($,ce),ce}),g=q(()=>s.hasMore&&!s.loading&&!s.loadingMore),m=Wo($=>{Z.value=0,a.value=$,l.value=-1,r("search",$)},wp),y=$=>{Z.value=0,m($)},b=$=>a.value?Y6($,a.value):$,S=$=>{const ue={[o.ARROW_DOWN]:()=>F($),[o.ARROW_UP]:()=>C($),[o.ENTER]:()=>x($),[o.ESCAPE]:()=>k($),[o.TAB]:()=>O($)}[$.key];ue&&ue()},F=$=>{$.preventDefault(),R(1)},C=$=>{$.preventDefault(),R(-1)},R=$=>{const ce=f.value.length;if(ce===0)return;let ue;$>0?ue=(l.value+1)%ce:l.value>0?ue=l.value-1:ue=ce-1,l.value=ue,E()},E=()=>{Xt(()=>{var ce;const $=(ce=u.value)==null?void 0:ce.querySelectorAll('[role="menuitem"]')[l.value];$==null||$.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})},x=$=>{if($.preventDefault(),l.value>=0&&l.value<f.value.length){const ue=f.value[l.value];A(ue)}},k=$=>{$.preventDefault(),P()},O=$=>{l.value>=0&&($.preventDefault(),x($))},A=$=>{!$||$.disabled||(r("select",$),l.value=-1,P())},D=$=>{$>=0&&$<f.value.length&&(l.value=$)},P=()=>{r("close")},V=()=>{if(!g.value||!u.value)return;const{scrollTop:$,clientHeight:ce,scrollHeight:ue}=u.value;ue-($+ce)<=z8&&r("loadMore")},H=()=>{var $,ce;($=u.value)==null||$.addEventListener("scroll",V),(ce=c.value)==null||ce.addEventListener("keydown",S)},te=()=>{var $,ce;($=u.value)==null||$.removeEventListener("scroll",V),(ce=c.value)==null||ce.removeEventListener("keydown",S)};Sn(()=>{H()}),qn(()=>{te()}),ut(()=>s.loading,$=>{!$&&f.value.length>0&&(l.value=-1)});const B=$=>$?Array.isArray(s.selectedId)?s.selectedId.includes(String($.id)):s.selectedId==$.id:!1,G=Y(null);ut(l,()=>{E()}),t({focus:()=>{Xt(()=>{var $;($=G.value)==null||$.focus()})},query:a,filteredOptions:f,selectedIndex:l,closeDropdown:P,clearSearch:()=>{a.value=""}});const Z=Y(0);return ut(()=>s.loading,$=>{const ce=s.options.length>0&&f.value.length>0,ue=!ce&&a.value.length>0,xe=!ce&&a.value.length===0;if($){Z.value=0;return}else if(ce){Z.value=1;return}else if(ue){Z.value=2;return}else if(xe){Z.value=3;return}},{immediate:!0}),($,ce)=>(K(),Ce("datalist",{ref_key:"searchListRef",ref:c,class:z($.$style["search-list"]),"aria-activedescendant":l.value>=0?`item-${l.value}`:void 0,style:gn({width:e.width})},[ve(qC,{ref_key:"searchBoxRef",ref:G,modelValue:a.value,"onUpdate:modelValue":ce[0]||(ce[0]=ue=>a.value=ue),class:z($.$style["search-box"]),disabled:e.loading,onSearch:y,onClear:ce[1]||(ce[1]=ue=>y("")),onCancel:ce[2]||(ce[2]=ue=>r("cancel"))},null,8,["modelValue","class","disabled"]),we("div",{ref_key:"popupRef",ref:u,class:z($.$style["list-container"]),style:gn({maxHeight:e.maxHeight})},[_t($.$slots,"extra-item"),(K(!0),Ce(Ot,null,Un(f.value,(ue,xe)=>ot((K(),Ce("div",{key:`${ue.id}-${xe}`,role:"menuitem"},[_t($.$slots,"item",{item:ue,index:xe,selectedIndex:l.value,isSelected:B,handleSelect:A,handleItemHover:D,getHighlightedLabel:b,query:a.value,idx:xe},()=>[ue.hide?it("",!0):(K(),Xe(Vp,_n({key:0,ref_for:!0},ue,{hover:xe===l.value,selected:B(ue),type:ue.type,id:`item-${xe}`,"aria-selected":xe===l.value,onClick:on(re=>A(ue),["stop","prevent"]),onMouseover:re=>D(xe)}),{prefix:Ee(()=>[_t($.$slots,"prefix-item",{item:ue})]),label:Ee(()=>[a.value?ot((K(),Ce("span",{key:0,class:z($.$style.match),innerHTML:b(ue.label)},null,10,U8)),[[U(i),{content:ue.label}]]):ot((K(),Ce("span",{key:1,class:z($.$style["item-label"])},[dt(bt(ue.label),1)],2)),[[U(i),{content:ue.label}]])]),suffix:Ee(({hovered:re})=>[_t($.$slots,"action",{item:ue,isHovered:xe===l.value,hovered:re,selected:l.value==xe})]),_:2},1040,["hover","selected","type","id","aria-selected","onClick","onMouseover"]))])])),[[us,Z.value===1]])),128)),Z.value===0?_t($.$slots,"loading-more",{key:0},()=>[(K(),Ce(Ot,null,Un(7,ue=>we("div",{class:z($.$style["loading-more"]),key:ue},[we("div",{class:z($.$style["loading-skeleton"])},null,2),we("div",{class:z($.$style["loading-skeleton"])},null,2)],2)),64))]):it("",!0),Z.value===2?(K(),Ce("div",{key:1,class:z($.$style["no-results"])},[_t($.$slots,"empty",{query:a.value},()=>[we("div",{class:z($.$style["no-results-content"])},[...ce[3]||(ce[3]=[we("p",null,[dt(" No results. "),we("br"),dt(" Try another search. ")],-1)])],2)])],2)):it("",!0),Z.value===3?(K(),Ce("div",{key:2,class:z($.$style["no-results"])},[_t($.$slots,"empty-list",{},()=>[we("div",{class:z($.$style["no-results-content"])},[...ce[4]||(ce[4]=[we("p",null,"No items available.",-1)])],2)])],2)):it("",!0),_t($.$slots,"footer")],6)],14,W8))}}),[["__cssModules",{$style:{"search-list":"_search-list_qr9ld_1","list-container":"_list-container_qr9ld_13","item-label":"_item-label_qr9ld_32","loading-state":"_loading-state_qr9ld_40","loading-more":"_loading-more_qr9ld_41","loading-skeleton":"_loading-skeleton_qr9ld_52","is-loading":"_is-loading_qr9ld_59","skeleton-loading":"_skeleton-loading_qr9ld_1","no-results":"_no-results_qr9ld_114","no-results-content":"_no-results-content_qr9ld_121",title:"_title_qr9ld_124",tips:"_tips_qr9ld_130",match:"_match_qr9ld_144"}}]]),j8=["innerHTML"],K8=20,UP=Ct(ct({__name:"AssigneeGroupEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{}},emits:["updated","cancel","start-update"],setup(e,{expose:t,emit:n}){const i=mn,o=e,s=OD,r=Z=>{const $=Z.data;return{name:String(($==null?void 0:$.name)??"Unknown"),initial:String(($==null?void 0:$.initial)??"U"),id:String(Z.id),profile_image:($==null?void 0:$.profile_image)??null,color:($==null?void 0:$.color)??{bgColor:"#CCCCCC",textColor:"var(--background-color)"},size:24,isUseShortLabel:!0}},{id:a}=tv(o),l=n,c=Z=>{var ce,ue;const $=(ue=(ce=o.params)==null?void 0:ce.api)==null?void 0:ue.getRowNode(String(a.value));$==null||$.setDataValue("assignees",kz(Z.assignees)),l("updated",Z)},u=Y(!1),d=Y(!1),h=Y(null),f=Y(1),g=Y(!0),m=Y(0),y=Y(""),{isSubmitting:b,unAssignAll:S,replaceAssignees:F,handleSelect:C,assigneeList:R,mergedOptions:E,selectedUserIds:x}=Z6({...o,updateRowData:c,value:o.value}),k=ki("bulkUpdate",!1),{apiServices:O}=vo(!k,o),A=ki("workspaceId"),D=async(Z=1,$="",ce=!1)=>{var ue,xe,re,Ie,Me;if(!O.value||!o.id&&!o.ids)throw console.error("API service or item identifiers are undefined"),new Error("API service or item identifiers are undefined");if(ce?d.value=!0:u.value=!0,h.value=null,!((ue=O.value)!=null&&ue.multipleAssignableUser))throw new Error("API service getAssignableUsers is undefined");try{const Je=await((xe=O.value)==null?void 0:xe.multipleAssignableUser({workspaceId:String(A),itemIds:(o.ids??(o.id?[o.id]:[])).map(String),page:Z,perPage:K8,q:$.trim()})),gt=((re=bp(Je.data))==null?void 0:re.map(VF))??[];R.value=ce?ip(R.value,gt,"id"):gt,m.value=Je.meta.total,g.value=(((Ie=Je==null?void 0:Je.meta)==null?void 0:Ie.current_page)||0)<(((Me=Je==null?void 0:Je.meta)==null?void 0:Me.last_page)||0),f.value=Z}catch(Je){console.error("Error fetching assignable users:",Je),h.value="Failed to load assignable users"}finally{u.value=!1,d.value=!1}},P=()=>{!d.value&&g.value&&D(f.value+1,y.value,!0)},V=Wo(async Z=>{y.value=Z,await D(1,Z,!1)},wp),H=()=>D(1,y.value,!1),te=q(hC);Sn(()=>{var Z;(Z=G.value)==null||Z.focus()}),t({getValue:()=>{var Z;return(Z=E.value.find($=>$.selected))==null?void 0:Z.value},refresh:H,clearInternal:()=>{x.value=[]},focus:()=>{var Z;(Z=G.value)==null||Z.focus()}});const B=()=>{const Z=sessionStorage.getItem("BASE_URL"),$=fo({type:"access_setting",config:{baseDomain:Z,ws_code:o.workspaceId,entity_id:A}}).url;window.open($,"_blank")},G=Y(null);return Sn(()=>{Xt(()=>{var Z;(Z=G.value)==null||Z.focus()})}),ut([()=>o.id,()=>o.workspaceId,()=>o.ids],()=>{D()},{deep:!0,immediate:!0}),(Z,$)=>(K(),Xe(YC,_n({"selected-id":U(x)},{...o},{options:U(E),loading:u.value,ref_key:"popupRef",ref:G,"loading-more":d.value,"has-more":g.value,onSelect:$[0]||($[0]=ce=>{U(C)(ce),l("start-update")}),onSearch:U(V),onLoadMore:P}),_u({"extra-item":Ee(()=>[ve(pt,{variant:"menu-item",onHandleClick:U(S)},{prefix:Ee(()=>[we("div",{class:z(Z.$style["unassign-icon"])},[ve(mt,{src:"UserXMark",source:"remote"})],2)]),default:Ee(()=>[$[1]||($[1]=dt(" Unassign all ",-1))]),_:1},8,["onHandleClick"])]),item:Ee(({item:ce,selectedIndex:ue,isSelected:xe,handleSelect:re,handleItemHover:Ie,getHighlightedLabel:Me,query:Je,idx:gt})=>[ve(Vp,_n(ce,{hover:gt===ue,selected:xe(ce),type:ce.type,onClick:on(Ft=>re(ce),["stop","prevent"]),onMouseover:Ft=>Ie(gt),class:Z.$style["item-assignee"]}),{prefix:Ee(()=>[ot(ve(Zu,Um(wf(r(ce))),null,16),[[U(s),{user:ce.data,status:"active",timezone:te.value,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0}]])]),label:Ee(({selected:Ft})=>[Je?ot((K(),Ce("span",{key:0,class:z([Z.$style["item-label"],Z.$style.match]),style:{flex:"1"},innerHTML:Me(ce.label)},null,10,j8)),[[U(i),{content:ce.label}]]):ot((K(),Ce("span",{key:1,class:z(Z.$style["item-label"]),style:{flex:"1"}},[dt(bt(ce.label),1)],2)),[[U(i),{content:ce.label}]]),we("div",{class:z(Z.$style["item-action"])},[ot((K(),Xe(pt,{variant:["icon","tertiary"],size:24,highlightOnHover:!0,disabled:U(b),onClick:on(He=>re(ce),["stop","prevent"])},{prefix:Ee(()=>[ve(mt,{src:Ft?"UserMinus":"UserPlus",source:"remote"},null,8,["src"])]),_:2},1032,["disabled","onClick"])),[[U(i),Ft?"Unassign":"Assign"]]),ot((K(),Xe(pt,{variant:["icon","tertiary"],size:24,highlightOnHover:!0,disabled:U(b),onClick:on(He=>{var en;return U(F)((en=ce.data)==null?void 0:en.id)},["stop","prevent"])},{prefix:Ee(()=>[ve(mt,{src:"IdCardClip",source:"remote"})]),_:1},8,["disabled","onClick"])),[[U(i),"Unassign others and reassign"]])],2)]),_:2},1040,["hover","selected","type","onClick","onMouseover","class"])]),"empty-list":Ee(()=>[we("div",{class:z(Z.$style["empty-state"])},[$[4]||($[4]=dt(" No assignee available. ",-1)),$[5]||($[5]=we("br",null,null,-1)),ve(pt,{onClick:B,variant:["tertiary"],size:"small"},{default:Ee(()=>[...$[3]||($[3]=[dt(" Go to Access Settings to add team. ",-1)])]),_:1})],2)]),_:2},[h.value?{name:"error",fn:Ee(()=>[we("div",{class:z(Z.$style["error-message"])},[dt(bt(h.value)+" ",1),ve(pt,{onClick:H,size:"small"},{default:Ee(()=>[...$[2]||($[2]=[dt(" Retry ",-1)])]),_:1})],2)]),key:"0"}:void 0]),1040,["selected-id","options","loading","loading-more","has-more","onSearch"]))}}),[["__cssModules",{$style:{action:"_action_1dg6a_1","item-assignee":"_item-assignee_1dg6a_6","item-action":"_item-action_1dg6a_6","item-label":"_item-label_1dg6a_16","unassign-icon":"_unassign-icon_1dg6a_25","error-message":"_error-message_1dg6a_36","empty-state":"_empty-state_1dg6a_46"}}]]),q8=ct({__name:"AssignneeUpdateButton",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{},variant:{}},emits:["update"],setup(e,{emit:t}){const n=e;Ta("bulkUpdate",!0);const i=t,o=Y(null),s=f=>{var g;h.value=!1,i("update",f),(g=o.value)==null||g.clearInternal()},{triggerRef:r,popupRef:a,hide:l,isVisible:c}=tr(),u=Y(null),d=f=>{f.key==="Escape"&&a.value&&l()};Sn(()=>{var g;const f=u.value instanceof HTMLElement?u.value:(g=u.value)==null?void 0:g.$el;f&&f.addEventListener("keydown",d)}),qn(()=>{var g;const f=u.value instanceof HTMLElement?u.value:(g=u.value)==null?void 0:g.$el;f&&f.removeEventListener("keydown",d)}),ut(c,f=>{var g,m;f?(g=o.value)==null||g.focus():(m=o.value)==null||m.clearInternal()});const h=Y(!1);return(f,g)=>(K(),Ce("div",{ref_key:"mainRef",ref:u},[we("div",{ref_key:"triggerRef",ref:r},[ve(pt,{class:"action-button",variant:n.variant,loading:h.value},{default:Ee(()=>[ve(mt,{src:"UserPlus",class:"icon"}),g[1]||(g[1]=dt(" Assignee ",-1))]),_:1},8,["variant","loading"])],512),we("div",{ref_key:"popupRef",ref:a,style:{display:"none"}},[U(c)?(K(),Xe(UP,_n({key:0,ref_key:"assigneeGroupEditorRef",ref:o},n,{ids:e.ids,onUpdated:s,onStartUpdate:g[0]||(g[0]=m=>h.value=!0)}),null,16,["ids"])):it("",!0)],512)],512))}}),Y8=["aria-label"],Z8=["disabled","readOnly","aria-label","data-date","data-weekday","tabindex","onClick"],X8=Ct(ct({__name:"MainCalendar",props:yE({year:{},month:{},startDate:{},endDate:{},timezone:{default:"UTC"},activeField:{default:"start"},requireConfirm:{type:Boolean,default:!1},locale:{default:"en-US"},weekdayLabelStyle:{default:"narrow"},weekStart:{default:0},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Confirm"},immediatelyUpdate:{type:Boolean,default:!1},disabled:{type:Boolean},readOnly:{type:Boolean},disableConfirm:{type:Boolean,default:!1}},{tracingCase:{default:()=>({case:"",behavior:""})},tracingCaseModifiers:{}}),emits:yE(["select-start","select-end","select-start-utc","select-end-utc","update:activeField","update:tracingCase","update:month","update:year","close","confirm","cancel"],["update:tracingCase"]),setup(e,{emit:t}){const n=e,i=q(()=>n.startDate&&n.endDate),o=pV(e,"tracingCase"),s=t,r=Y(n.year),a=Y(n.month);ut(()=>[n.year,n.month],([B,G])=>{r.value=B,a.value=G});const l=q(()=>tt.fromObject({year:r.value,month:a.value,day:1},{zone:n.timezone}).setLocale(n.locale||"en-US").toFormat("LLLL yyyy")),c=q(()=>tt.now().setZone(n.timezone)),u=q(()=>n.startDate?tt.fromJSDate(n.startDate,{zone:n.timezone}):null),d=q(()=>n.endDate?tt.fromJSDate(n.endDate,{zone:n.timezone}):null),h=Y(u.value),f=Y(d.value),g=Y(u.value),m=Y(d.value);ut([u,d],()=>{n.requireConfirm||(h.value=u.value,f.value=d.value,g.value=u.value,m.value=d.value)},{immediate:!0});const y=q(()=>n.requireConfirm?h.value:u.value),b=q(()=>n.requireConfirm?f.value:d.value);ut(()=>n.activeField,B=>{const G=B==="start"?y.value:b.value;G&&(r.value=G.year,a.value=G.month)}),ut(()=>{var B,G;return[(B=y.value)==null?void 0:B.toISODate(),(G=b.value)==null?void 0:G.toISODate(),n.activeField]},()=>{const B=n.activeField==="start"?y.value:b.value;B&&(B.year!==r.value||B.month!==a.value)&&(r.value=B.year,a.value=B.month)});function S(B){return B.setZone("utc")}const F=Y("");function C(B){F.value=B.toISODate()||"",Xt(()=>{const G=document.querySelector(`.arbo-calendar-day[data-date="${F.value}"]`);G==null||G.focus()})}ut(()=>{var B,G;return[r.value,a.value,n.activeField,(B=y.value)==null?void 0:B.toISODate(),(G=b.value)==null?void 0:G.toISODate()]},()=>{const B=n.activeField==="start"?y.value:b.value;let G;B&&B.year===r.value&&B.month===a.value?G=B:y.value&&y.value.year===r.value&&y.value.month===a.value?G=y.value:G=c.value,C(G)});function R(B){return B.toFormat("d")}const E=q(()=>{const B=tt.fromObject({year:r.value,month:a.value,day:1},{zone:n.timezone}),G=B.weekday,Z=n.weekStart===1?(G+6)%7:G%7;let $=B.minus({days:Z});const ce=[],ue=hc.weekdays(n.weekdayLabelStyle||"short",{locale:n.locale||"en-US"}),xe=_f();for(let Ie=0;Ie<42;Ie++){const Me=[];$.month!==a.value&&Me.push(xe["is-outside"]),$.hasSame(c.value,"day")&&Me.push(xe["is-today"]),y.value&&$.hasSame(y.value,"day")&&Me.push(xe["is-selected-start"]),b.value&&$.hasSame(b.value,"day")&&Me.push(xe["is-selected-end"]),y.value&&b.value&&$>y.value&&$<b.value&&Me.push(xe["is-in-range"]);const Je=R($),gt=ue[$.weekday-1]||"";ce.push({dt:$,iso:$.toISODate()||"",label:$.toFormat("d"),displayLabel:Je,weekdayLabel:gt,aria:$.setLocale(n.locale||"en-US").toFormat("cccc, d LLLL yyyy"),classes:Me}),$=$.plus({days:1})}const re=[];for(let Ie=0;Ie<6;Ie++)re.push(ce.slice(Ie*7,Ie*7+7));return re}),x=q(()=>{const B=hc.weekdays(n.weekdayLabelStyle||"short",{locale:n.locale||"en-US"});return n.weekStart===1?B:[B[6],...B.slice(0,6)]});function k(B,G,Z){const $=B==="start"?G.startOf("day"):G.endOf("day"),ce=S($),ue={year:$.year,month:$.month,day:$.day,utc:ce.toISO()||""};B==="start"?(s("select-start",ue,Z??!0),s("select-start-utc",ue.utc)):(s("select-end",ue),s("select-end-utc",ue.utc))}function O(B){let G=r.value,Z=a.value+B;for(;Z<1;)Z+=12,G-=1;for(;Z>12;)Z-=12,G+=1;r.value=G,a.value=Z,s("update:year",G),s("update:month",Z)}function A(B){const Z=(F.value?tt.fromISO(F.value,{zone:n.timezone}):c.value).plus({days:B});(Z.month!==a.value||Z.year!==r.value)&&(a.value=Z.month,r.value=Z.year,s("update:year",Z.year),s("update:month",Z.month)),C(Z)}function D(B=!1){const Z=(F.value?tt.fromISO(F.value,{zone:n.timezone}):c.value).weekday%7,$=B?6-Z:-Z;A($)}function P(B){switch(B.key){case"ArrowLeft":B.preventDefault(),A(-1);break;case"ArrowRight":B.preventDefault(),A(1);break;case"ArrowUp":B.preventDefault(),A(-7);break;case"ArrowDown":B.preventDefault(),A(7);break;case"Home":B.preventDefault(),D(!1);break;case"End":B.preventDefault(),D(!0);break;case"PageUp":B.preventDefault(),O(B.shiftKey?-12:-1);break;case"PageDown":B.preventDefault(),O(B.shiftKey?12:1);break;case"Enter":case" ":{B.preventDefault();const G=F.value?tt.fromISO(F.value,{zone:n.timezone}):c.value,Z=E.value.flat().find($=>$.iso===G.toISODate());Z&&V(Z);break}}}function V(B){var He,en;const G=!!u.value,Z=!!d.value,$=n.activeField,ce=((He=u.value)==null?void 0:He.toISODate())||"null",ue=((en=d.value)==null?void 0:en.toISODate())||"null",xe=B.dt.toISODate()||"",re=(tn,At)=>{o.value={case:tn,behavior:At}},Ie=()=>`Selected start ${xe} > existing end ${ue} -> reset both to ${xe}`,Me=()=>`Selected end ${xe} < existing start ${ce} -> reset both to ${xe}`,Je=()=>{k("start",B.dt,!0),k("end",B.dt),s("update:activeField","end")},gt=(tn=!1)=>{k("start",B.dt,tn),tn&&s("update:activeField","end")},Ft=(tn=!1)=>{console.trace("doSelectEnd called with closeAfter:",tn,n.immediatelyUpdate),k("end",B.dt),tn&&s("close")};if(G&&Z){$==="start"?d.value&&B.dt>d.value?(Je(),re("INVERT_RANGE_FROM_START",Ie())):(gt(!1),re("UPDATE_START_IN_RANGE",`Updated start from ${ce} to ${xe}; end remains ${ue}`)):u.value&&B.dt<u.value?(Je(),re("INVERT_RANGE_FROM_END",Me())):(Ft(!1),re("UPDATE_END_IN_RANGE",`Updated end from ${ue} to ${xe}; start remains ${ce}`));return}if(!G&&Z&&$==="start"&&d.value&&B.dt>d.value){Je(),re("CREATE_RANGE_FROM_LATE_START",Ie());return}if(G&&!Z&&$==="end"&&u.value&&B.dt<u.value){Je(),re("CREATE_RANGE_FROM_EARLY_END",Me());return}if(!G&&!Z){if($==="start"){gt(!0),re("INIT_START",`Picked start ${xe}; awaiting end selection`);return}Ft(n.immediatelyUpdate),re("INIT_END",`Picked end ${xe}; awaiting start selection`);return}if(!G&&Z){if($==="start"){gt(!0),re("FILL_MISSING_START",`Inserted start ${xe}; existing end ${ue}`);return}Ft(!1),re("STRICT_UPDATE_END_ONLY",`Updated end to ${xe}; start still null`);return}if(G&&!Z){if($==="start"){gt(!0),re("RESELECT_START_BEFORE_END",`Replaced start with ${xe}; end still null, switching to end`);return}Ft(n.immediatelyUpdate),re("FILL_MISSING_END",`Picked end ${xe}; start ${ce}`);return}}function H(){g.value=h.value,m.value=f.value,s("confirm")}function te(){h.value=g.value,f.value=m.value,s("cancel")}return(B,G)=>(K(),Ce("div",{class:z([B.$style["arbo-calendar"],{[B.$style["arbo-date-range-picker"]]:i.value}]),role:"grid","aria-label":l.value,tabindex:"0",onKeydown:P},[we("div",{class:z([B.$style["arbo-calendar-header"],B.$style["arbo-calendar-week"]]),role:"row"},[(K(!0),Ce(Ot,null,Un(x.value,Z=>(K(),Ce("div",{key:Z,class:z(B.$style["arbo-calendar-weekday"]),role:"columnheader"},bt(Z),3))),128))],2),we("div",{class:z(B.$style["arbo-calendar-weeks"])},[(K(!0),Ce(Ot,null,Un(E.value,(Z,$)=>(K(),Ce("div",{key:$,class:z(B.$style["arbo-calendar-week"]),role:"row"},[(K(!0),Ce(Ot,null,Un(Z,ce=>(K(),Ce("div",{key:ce.iso,class:z([B.$style["arbo-calendar-day"],ce.classes,{[B.$style["is-focused"]]:ce.iso===F.value}]),disabled:n.disabled,readOnly:n.readOnly,role:"gridcell","aria-label":ce.aria,"data-date":ce.iso,"data-weekday":ce.weekdayLabel,tabindex:ce.iso===F.value?0:-1,onClick:ue=>V(ce)},bt(ce.displayLabel),11,Z8))),128))],2))),128))],2),n.readOnly?it("",!0):(K(),Ce("div",{key:0,class:z(B.$style["arbo-calendar-actions"])},[ve(pt,{disabled:n.disabled,readOnly:n.readOnly,variant:"secondary",size:"medium",onClick:te},{default:Ee(()=>[dt(bt(n.cancelLabel),1)]),_:1},8,["disabled","readOnly"]),ve(pt,{disabled:n.disabled||n.disableConfirm,readOnly:n.readOnly,variant:"primary",size:"medium",onClick:H},{default:Ee(()=>[dt(bt(n.confirmLabel),1)]),_:1},8,["disabled","readOnly"])],2))],42,Y8))}}),[["__cssModules",{$style:{"arbo-date-range-picker":"_arbo-date-range-picker_1xc07_1","arbo-calendar-day":"_arbo-calendar-day_1xc07_2","arbo-calendar-week":"_arbo-calendar-week_1xc07_3","arbo-calendar":"_arbo-calendar_1xc07_2","arbo-calendar-nav":"_arbo-calendar-nav_1xc07_37","arbo-calendar-nav-btn":"_arbo-calendar-nav-btn_1xc07_45","arbo-calendar-nav-label":"_arbo-calendar-nav-label_1xc07_52","arbo-calendar-weekday":"_arbo-calendar-weekday_1xc07_57","arbo-calendar-weeks":"_arbo-calendar-weeks_1xc07_62","is-today":"_is-today_1xc07_93","is-selected-start":"_is-selected-start_1xc07_99","is-outside":"_is-outside_1xc07_108","is-selected-end":"_is-selected-end_1xc07_108","is-in-range":"_is-in-range_1xc07_136","arbo-calendar-actions":"_arbo-calendar-actions_1xc07_141","arbo-calendar-btn":"_arbo-calendar-btn_1xc07_150",cancel:"_cancel_1xc07_159",confirm:"_confirm_1xc07_164"}}]]),J8=Ct(ct({__name:"CalendarNavigationControl",props:{year:{},month:{},minYear:{default:1970},maxYear:{default:2100},yearSpan:{default:12},monthLabels:{},locale:{default:"en-US"},monthLabelStyle:{default:"short"},ariaPrevLabel:{default:"Previous"},ariaNextLabel:{default:"Next"},ariaToolbarLabel:{default:"Calendar navigation"},ariaSelectYearLabel:{default:"Select year"},ariaSelectMonthLabel:{default:"Select month"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:year","update:month","mode-change","year-selected","month-selected"],setup(e,{emit:t}){const n=e,i=q(()=>{if(n.monthLabels&&n.monthLabels.length===12)return n.monthLabels;const D=n.locale||"en-US",P=n.monthLabelStyle||"short",V=new Intl.DateTimeFormat(D,{month:P,timeZone:"UTC"});return Array.from({length:12},(te,B)=>V.format(new Date(Date.UTC(2020,B,1))))}),o=t,s=Y(n.year),r=Y(n.month);ut(()=>n.year,D=>{D!==s.value&&(s.value=D)}),ut(()=>n.month,D=>{D!==r.value&&(r.value=D)});const a=Y("days");function l(D){a.value!==D&&(a.value=D,o("mode-change",D))}const c=q(()=>n.minYear),u=q(()=>n.maxYear),d=q(()=>{const D=n.yearSpan;return s.value-s.value%D}),h=q(()=>d.value+n.yearSpan-1);function f(){const D=n.yearSpan,P=d.value-D;P>=c.value&&(s.value=P)}function g(){const D=n.yearSpan,P=d.value+D;P<=u.value&&(s.value=P)}const m=q(()=>d.value-n.yearSpan<c.value),y=q(()=>h.value+n.yearSpan>u.value),b=q(()=>{const D=n.yearSpan;return Math.ceil(D/3)});function S(D){const V=d.value+(D-1)*3;return Array.from({length:3},(H,te)=>V+te).filter(H=>H<=h.value)}function F(){a.value==="months"?l("days"):l("months")}function C(){a.value==="years"?l("days"):l("years")}function R(D){s.value=D,o("update:year",D),o("year-selected",D),l("months")}function E(D){r.value=D,o("update:month",D),o("month-selected",D),l("days")}function x(){if(a.value==="days"){let D=s.value,P=r.value-1;if(P<1&&(P=12,D--),D<c.value)return;s.value=D,r.value=P,o("update:year",D),o("update:month",P)}else if(a.value==="months"){if(s.value-1<c.value)return;s.value--,o("update:year",s.value)}else a.value==="years"&&f()}function k(){if(a.value==="days"){let D=s.value,P=r.value+1;if(P>12&&(P=1,D++),D>u.value)return;s.value=D,r.value=P,o("update:year",D),o("update:month",P)}else if(a.value==="months"){if(s.value+1>u.value)return;s.value++,o("update:year",s.value)}else a.value==="years"&&g()}const O=q(()=>a.value==="days"?s.value===c.value&&r.value===1:a.value==="months"?s.value-1<c.value:m.value),A=q(()=>a.value==="days"?s.value===u.value&&r.value===12:a.value==="months"?s.value+1>u.value:y.value);return(D,P)=>(K(),Ce("div",{class:z(D.$style["cal-nav-wrapper"])},[_t(D.$slots,"selection"),we("div",{class:z(D.$style["cal-nav-bar"]),role:"toolbar","aria-label":"Calendar navigation"},[ve(pt,{variant:"secondary",class:z([D.$style["cal-nav-btn"],D.$style.prev]),"aria-label":"Previous",disabled:O.value,label:"",onClick:x},{default:Ee(()=>[ve(mt,{src:"ChevronLeft",source:"remote"})]),_:1},8,["class","disabled"]),we("div",{class:z(D.$style["cal-nav-center"])},[ve(pt,{"aria-pressed":a.value==="months",onClick:F,variant:"secondary"},{default:Ee(()=>[dt(bt(i.value[r.value-1]),1)]),_:1},8,["aria-pressed"]),ve(pt,{variant:"secondary","aria-pressed":a.value==="years",onClick:C},{default:Ee(()=>[dt(bt(s.value),1)]),_:1},8,["aria-pressed"])],2),ve(pt,{variant:"secondary",class:z([D.$style["cal-nav-btn"],D.$style.next]),"aria-label":"Next",disabled:A.value,label:"",onClick:k},{default:Ee(()=>[ve(mt,{src:"ChevronRight",source:"remote"})]),_:1},8,["class","disabled"])],2),a.value==="years"?(K(),Ce("div",{key:0,class:z(D.$style["year-grid"])},[we("div",{class:z(D.$style["year-grid-header"])},[ve(pt,{variant:"secondary",class:z([D.$style["cal-nav-btn"],D.$style.prev]),"aria-label":"Next",disabled:m.value,"prefix-icon":"AnglesRight",label:"",onClick:f},{default:Ee(()=>[ve(mt,{src:"AnglesRight",source:"remote",class:z(D.$style["arbo-label__prefix--icon"])},null,8,["class"])]),_:1},8,["class","disabled"]),we("div",{class:z(D.$style["range-label"])},bt(d.value)+" - "+bt(h.value),3),ve(pt,{variant:"secondary",class:z([D.$style["cal-nav-btn"],D.$style.next]),"aria-label":"Next",disabled:y.value,"prefix-icon":"AnglesRight",label:"",onClick:g},{default:Ee(()=>[ve(mt,{src:"AnglesRight",source:"remote",class:z(D.$style["arbo-label__prefix--icon"])},null,8,["class"])]),_:1},8,["class","disabled"])],2),we("div",{class:z(D.$style["year-grid-body"]),role:"grid"},[(K(!0),Ce(Ot,null,Un(b.value,V=>(K(),Ce("div",{key:"yr-row-"+V,class:z(D.$style["year-grid-row"]),role:"row"},[(K(!0),Ce(Ot,null,Un(S(V),H=>(K(),Xe(pt,{key:H,variant:"secondary",class:z([D.$style["year-cell"],{[D.$style.selected]:H===s.value}]),role:"gridcell",disabled:H<c.value||H>u.value,onClick:te=>R(H)},{default:Ee(()=>[dt(bt(H),1)]),_:2},1032,["class","disabled","onClick"]))),128))],2))),128))],2)],2)):a.value==="months"?(K(),Ce("div",{key:1,class:z(D.$style["month-grid"]),role:"dialog","aria-label":"Select month"},[we("div",{class:z(D.$style.months),role:"grid"},[(K(!0),Ce(Ot,null,Un(i.value,(V,H)=>(K(),Xe(pt,{disabled:n.disabled,"read-only":n.readOnly,key:V,variant:"secondary",class:z([D.$style["month-cell"],{[D.$style.selected]:H+1===r.value}]),role:"gridcell",onClick:te=>E(H+1)},{default:Ee(()=>[dt(bt(V),1)]),_:2},1032,["disabled","read-only","class","onClick"]))),128))],2)],2)):(K(),Ce("div",{key:2,class:z(D.$style["days-slot"])},[_t(D.$slots,"default",{year:s.value,month:r.value,mode:a.value})],2))],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_lnmem_1","cal-nav-bar":"_cal-nav-bar_lnmem_11","cal-nav-btn":"_cal-nav-btn_lnmem_19","year-grid-header":"_year-grid-header_lnmem_33",prev:"_prev_lnmem_33","cal-nav-center":"_cal-nav-center_lnmem_45","cal-nav-label":"_cal-nav-label_lnmem_51","month-grid":"_month-grid_lnmem_65","year-grid":"_year-grid_lnmem_33",months:"_months_lnmem_78","month-cell":"_month-cell_lnmem_85","pg-btn":"_pg-btn_lnmem_100","year-grid-body":"_year-grid-body_lnmem_113","year-grid-row":"_year-grid-row_lnmem_120","year-cell":"_year-cell_lnmem_126",selected:"_selected_lnmem_134","days-slot":"_days-slot_lnmem_143","range-label":"_range-label_lnmem_147"}}]]);function Q8(e){const{format:t="dd/MM/yyyy",timezone:n="local",minDate:i,maxDate:o}=e,s=Y(""),r=q(()=>{const m=tt.fromFormat(s.value,t,{zone:n});return m.isValid?m:null}),a=q(()=>{if(!i||!r.value)return!0;const m={year:i.getFullYear(),month:i.getMonth()+1,day:i.getDate()},y={year:r.value.year,month:r.value.month,day:r.value.day};return y.year>m.year?!0:y.year<m.year?!1:y.month>m.month?!0:y.month<m.month?!1:l(y,m)>=0}),l=(m,y)=>{const b=new Date(m.year,m.month-1,m.day),S=new Date(y.year,y.month-1,y.day);return b<S?-1:b>S?1:0},c=q(()=>{if(!o||!r.value)return!0;const m={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},y={year:r.value.year,month:r.value.month,day:r.value.day};return y.year<m.year?!0:y.year>m.year?!1:y.month<m.month?!0:y.month>m.month?!1:l(y,m)<=0}),u=q(()=>s.value.length==0||s.value.length>0&&r.value!==null&&a.value&&c.value),d=q(()=>s.value.length===t.length&&u.value);return{inputValue:s,isValid:u,isComplete:d,clear:()=>{s.value=""},setDate:m=>{let y;m instanceof Date?y=tt.fromJSDate(m,{zone:n}):y=m.setZone(n),y.isValid?s.value=y.toFormat(t):s.value=""},getDate:()=>u.value?r.value:null}}const eK=["disabled","readonly","placeholder"],zP=Ct(ct({__name:"DateInput",props:{modelValue:{},format:{default:"dd/MM/yyyy"},showDebug:{type:Boolean,default:!0},allowPastDates:{type:Boolean,default:!0},allowFutureDates:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},timezone:{default:""},placeholder:{default:""},size:{},minDate:{default:void 0},maxDate:{default:void 0}},emits:["complete","invalid","clear"],setup(e,{expose:t,emit:n}){const i=mn,o=e,s=n,r=Y(null),a=Y(null),{isValid:l,isComplete:c,inputValue:u,clear:d,setDate:h,getDate:f}=Q8({format:o.format,allowPastDates:o.allowPastDates,allowFutureDates:o.allowFutureDates,timezone:o.timezone,minDate:o.minDate,maxDate:o.maxDate}),g=q(()=>o.active),m=q(()=>({disabled:o.disabled,error:!l.value&&u.value.length>0,readOnly:o.readOnly,isEmpty:u.value.length===0,inputRef:r,wrapperRef:a,active:g})),{argsMain:y,isHover:b,isFocus:S}=or(m),F=R=>{var x;const E=(x=R.clipboardData)==null?void 0:x.getData("text/plain");E&&(u.value=E.trim())},C=()=>{d(),s("clear")};return t({clear:C,setDate:h,getDate:f,focus:()=>{var R;return(R=r.value)==null?void 0:R.focus()}}),ut(()=>o.modelValue,R=>{R?h(R):d()},{immediate:!0}),ut([()=>c.value,()=>u.value],()=>{if(u.value.length===0){s("complete",null);return}else if(l.value&&!o.readOnly&&!o.disabled&&c.value){const R=f();(R||u.value.length===0)&&s("complete",R)}}),ut(()=>l.value,R=>{R||s("invalid","")}),(R,E)=>(K(),Xe(sr,_n(U(y),{ref_key:"wrapperRef",ref:a,size:26,style:{padding:0,background:"var(--bg-secondary,)"}}),{default:Ee(()=>{var x;return[we("div",{class:z([R.$style["date-input-wrapper"]])},[ve(mt,{src:"Calendar",source:"remote",class:z(R.$style["icon-calendar"]),color:"var(--primary-color)"},null,8,["class"]),ot(we("input",{disabled:o.disabled,readonly:o.readOnly,ref_key:"inputRef",ref:r,type:"text","onUpdate:modelValue":E[0]||(E[0]=k=>Zt(u)?u.value=k:null),onPaste:on(F,["prevent"]),placeholder:(x=o.format)==null?void 0:x.toLocaleUpperCase(),class:z([R.$style["date-input"]])},null,42,eK),[[IR,U(u)]]),_t(R.$slots,"clear",{handleClear:C},()=>[U(u).length>0&&!o.readOnly&&!o.disabled&&(U(b)||U(S))?ot((K(),Xe(pt,{key:0,variant:["icon","primary"],onClick:on(C,["stop"]),size:16,rounded:!0},{default:Ee(()=>[ve(mt,{src:"XMarkSolid",source:"remote",size:"8",color:"white"})]),_:1})),[[U(i),"Clear"]]):it("",!0)])],2)]}),_:3},16))}}),[["__cssModules",{$style:{"date-input-wrapper":"_date-input-wrapper_fako3_1","icon-calendar":"_icon-calendar_fako3_9",focus:"_focus_fako3_12",hover:"_hover_fako3_12",active:"_active_fako3_12","date-input":"_date-input_fako3_1",invalid:"_invalid_fako3_38"}}]]),tK=ct({__name:"Calendar",props:{params:{},label:{},value:{},timezone:{default:pC()},format:{default:"LLL dd"},placeholder:{},enableRangeFeedback:{type:Boolean},messages:{},isCompleted:{type:Boolean},isStarted:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{},duePlaceholder:{default:"No due"},startPlaceholder:{default:"No start"},startTooltip:{default:"Select start date"},dueTooltip:{default:"Select due date"},showCalendarIcon:{type:Boolean,default:!0},locale:{default:"en-US"},immediatelyUpdate:{type:Boolean,default:!1}},emits:["clearStart","clearDue","clearAll","update","update:start","update:end","range:invalid","range:corrected","tracing","confirmed","closed","start-update","finish-update"],setup(e,{expose:t,emit:n}){const i=Y({case:"",behavior:""}),o=e,s=Y(null),r=n,a=async(ce,ue)=>{var xe,re;r("start-update"),await ce(),(re=(xe=o.params)==null?void 0:xe.api)==null||re.stopEditing(),Xt(()=>{ue(),r("finish-update")})},l=(ce,ue)=>{var xe,re;ce(),(re=(xe=o.params)==null?void 0:xe.api)==null||re.stopEditing(),Xt(()=>{ue()})},c=Mo({start:!1,end:!1}),{states:u,selectEndDate:d,cancelSelection:h,confirmSelection:f,selectStartDate:g,beginInteraction:m,clearStart:y,clearDue:b}=Q6(o,r,i),S=q(()=>{if(u.isSelectingStart)return"start";if(u.isSelectingEnd)return"end"}),F=ce=>{if(!ce){c.start=!1,y();return}const ue=u.endDate?tt.fromJSDate(u.endDate,{zone:o.timezone}):null;if(ue&&C(ce,ue)>0){const re={year:ce.year,month:ce.month,day:ce.day};c.start=!1,g(re,!1),d(re),Xt(()=>{u.isSelectingStart=!0,u.isSelectingEnd=!1});return}const xe={year:ce.year,month:ce.month,day:ce.day};c.start=!1,g(xe,!0)},C=(ce,ue)=>{const xe=ce.startOf("day"),re=ue.startOf("day");return xe<re?-1:xe>re?1:0},R=ce=>{if(!ce){c.end=!1,b();return}const ue=u.startDate?tt.fromJSDate(u.startDate,{zone:o.timezone}):null;if(ue&&C(ce,ue)<0){const re={year:ce.year,month:ce.month,day:ce.day};c.end=!1,g(re),d(re),Xt(()=>{u.isSelectingEnd=!0,u.isSelectingStart=!1});return}const xe={year:ce.year,month:ce.month,day:ce.day};c.end=!1,d(xe)},E=()=>{y()},x=()=>{b()},k=()=>{P()},O=q(()=>u.isSelectingStart||u.isSelectingEnd);function A(){o.disabled||o.readOnly||(m(),u.isSelectingStart=!0,u.isSelectingEnd=!1)}function D(){o.disabled||o.readOnly||(m(),u.isSelectingEnd=!0,u.isSelectingStart=!1)}function P(){u.isSelectingStart=!1,u.isSelectingEnd=!1,r("closed")}function V(ce){ce.key==="Escape"&&(ce.stopPropagation(),P())}const H=Y(new Date().getFullYear()),te=Y(new Date().getMonth()+1);ut(()=>[u.isSelectingStart,u.isSelectingEnd,u.startDate,u.endDate],()=>{u.isSelectingStart&&u.startDate?(H.value=u.startDate.getFullYear(),te.value=u.startDate.getMonth()+1):u.isSelectingEnd&&u.endDate&&(H.value=u.endDate.getFullYear(),te.value=u.endDate.getMonth()+1)},{immediate:!0});const B=Y(null);function G(){if(Array.isArray(o.value)){const[ue,xe]=o.value;u.startDate=ue||null,u.endDate=xe||null}u.isSelectingStart=!1,u.isSelectingEnd=!1;const ce=u.startDate||u.endDate||new Date;H.value=ce.getFullYear(),te.value=ce.getMonth()+1}ut(()=>{var ce,ue,xe,re,Ie,Me,Je,gt;return[((xe=(ue=(ce=o.value)==null?void 0:ce[0])==null?void 0:ue.getTime)==null?void 0:xe.call(ue))||((re=o.value)==null?void 0:re[0]),((Je=(Me=(Ie=o.value)==null?void 0:Ie[1])==null?void 0:Me.getTime)==null?void 0:Je.call(Me))||((gt=o.value)==null?void 0:gt[1]),o.timezone,o.format,o.placeholder,o.enableRangeFeedback]},()=>{G()},{immediate:!0,deep:!0}),t({resetCalendarLogic:G,openStart:A,openEnd:D,closePicker:P,clearAll:k,isOpen:O,drpRef:B,getValues:()=>({startDate:u.startDate,endDate:u.endDate,dateRange:[u.startDate,u.endDate]}),focus:()=>{var ce;u.startDate||u.endDate?u.startDate?A():D():(A(),(ce=s.value)==null||ce.focus())}});const $=Y(null);return ut(()=>O.value,ce=>{if(o.disabled||o.readOnly)return;const ue=$.value;ue&&(ce?ue.show():ue.hide())},{immediate:!0}),(ce,ue)=>(K(),Ce("div",{class:z(ce.$style["calendar-wrapper"])},[ve(J8,{year:H.value,"onUpdate:year":ue[6]||(ue[6]=xe=>H.value=xe),month:te.value,"onUpdate:month":ue[7]||(ue[7]=xe=>te.value=xe),locale:o.locale,disabled:o.disabled,readOnly:o.readOnly,onKeydown:V},{selection:Ee(()=>[we("div",{class:z(ce.$style["calendar-input-section"])},[ve(zP,{ref_key:"starDateRef",ref:s,"model-value":U(u).startDate,placeholder:o.startPlaceholder,timezone:o.timezone,active:U(u).isSelectingStart,onClick:A,onClear:E,onComplete:F,onInvalid:ue[0]||(ue[0]=xe=>c.start=!0),disabled:o.disabled,readOnly:o.readOnly},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"]),ve(zP,{"model-value":U(u).endDate,placeholder:o.duePlaceholder,timezone:o.timezone,active:U(u).isSelectingEnd,onClick:D,onClear:x,disabled:o.disabled,onComplete:R,onInvalid:ue[1]||(ue[1]=xe=>c.end=!0),readOnly:o.readOnly},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"])],2)]),default:Ee(({year:xe,month:re})=>[ve(X8,{disabled:o.disabled,disableConfirm:c.end||c.start,readOnly:o.readOnly,ref_key:"drpRef",ref:B,"tracing-case":i.value,"onUpdate:tracingCase":ue[2]||(ue[2]=Ie=>i.value=Ie),year:xe,month:re,"start-date":U(u).startDate,"end-date":U(u).endDate,"active-field":S.value,timezone:o.timezone,immediatelyUpdate:e.immediatelyUpdate,onSelectStart:U(g),onSelectEnd:U(d),onConfirm:ue[3]||(ue[3]=()=>{a(U(f),P)}),onCancel:ue[4]||(ue[4]=Ie=>l(U(h),P)),onClose:ue[5]||(ue[5]=Ie=>a(U(f),P))},null,8,["disabled","disableConfirm","readOnly","tracing-case","year","month","start-date","end-date","active-field","timezone","immediatelyUpdate","onSelectStart","onSelectEnd"])]),_:1},8,["year","month","locale","disabled","readOnly"])],2))}}),jP=Ct(tK,[["__cssModules",{$style:{"calendar-wrapper":"_calendar-wrapper_f7hcw_1","calendar-input-section":"_calendar-input-section_f7hcw_10","display-wrapper":"_display-wrapper_f7hcw_18","calendar-actions":"_calendar-actions_f7hcw_22","clear-all-btn":"_clear-all-btn_f7hcw_28"}}]]),nK={ref:"mainRef"},iK=ct({__name:"DateUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{}},emits:["updated"],setup(e,{emit:t}){const n=t,i=e,o=ki("bulkUpdate",!1),{apiServices:s}=vo(!o,i),r=async g=>{var y,b;f.value=!0;const m={workspaceId:i.workspaceId,itemIds:i.ids,startDate:g.start?NF(g.start):null,dueDate:g.end?NF(g.end):null};await((b=(y=s.value)==null?void 0:y.changeDate)==null?void 0:b.call(y,m).then(()=>{n("updated",{workspaceId:i.workspaceId,itemIds:i.ids,data:[g.start,g.end]})})),f.value=!1};ut(()=>i.ids,g=>{h.value=[null,null]});const a=Y(null),{triggerRef:l,popupRef:c,hide:u,isVisible:d}=tr(),h=Y([null,null]);ut(d,g=>{var m;g&&((m=a.value)==null||m.focus())});const f=Y(!1);return(g,m)=>(K(),Ce("div",nK,[we("div",{ref_key:"triggerRef",ref:l},[ve(pt,{variant:i.variant,loading:f.value},{default:Ee(()=>[ve(mt,{src:"Calendar"}),m[1]||(m[1]=dt(" Date ",-1))]),_:1},8,["variant","loading"])],512),we("div",{ref_key:"popupRef",ref:c,style:{display:"none"}},[ve(jP,{immediatelyUpdate:!1,value:h.value,onConfirmed:r,ref_key:"calendarRef",ref:a,onClosed:U(u),onStartUpdate:m[0]||(m[0]=y=>f.value=!0)},null,8,["value","onClosed"])],512)],512))}}),KP=Ct(ct({__name:"DropdownWrapper",props:{placement:{default:"bottom-start"},show:{type:Boolean,default:!1},maxWidth:{default:400}},emits:["open","close"],setup(e,{expose:t,emit:n}){const i=e,o=n,{hide:s,triggerRef:r,popupRef:a,isVisible:l}=tr({placement:i.placement,trigger:"click",interactive:!0,arrow:!1,offset:[0,4],showOnInit:i.show,maxWidth:i.maxWidth}),c=q(()=>l.value);ut(l,h=>{o(h?"open":"close")});const u=()=>{s()};t({closeDropdown:u,isOpen:c});const d=h=>{h.key==="Escape"&&a.value&&s()};return Sn(()=>{var f;const h=r.value instanceof HTMLElement?r.value:(f=r.value)==null?void 0:f.$el;h&&h.addEventListener("keydown",d)}),qn(()=>{var f;const h=r.value instanceof HTMLElement?r.value:(f=r.value)==null?void 0:f.$el;h&&h.removeEventListener("keydown",d)}),(h,f)=>(K(),Ce("div",{ref_key:"triggerRef",ref:r,class:z(h.$style["dropdown-wrapper"])},[_t(h.$slots,"trigger",{open:U(l)},()=>[we("button",{class:z(h.$style["editable-dropdown__trigger"]),"aria-label":"Select or type"}," ▼ ",2)]),we("div",{ref_key:"popupRef",ref:a,class:z(h.$style["dropdown-content"]),style:gn({display:U(l)?"block":"none",maxWidth:i.maxWidth?i.maxWidth+"px":"unset"})},[_t(h.$slots,"content",{closeDropdown:u,visible:U(l)},()=>[we("div",{class:z(h.$style["dropdown-list"])},null,2)])],6)],2))}}),[["__cssModules",{$style:{"dropdown-wrapper":"_dropdown-wrapper_1fn64_1","dropdown-content":"_dropdown-content_1fn64_5","dropdown-list":"_dropdown-list_1fn64_9"}}]]),qP=ct({__name:"StatusEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{}},emits:["updated","error","cancel","start-update"],setup(e,{expose:t,emit:n}){const i={PER_PAGE:50,INITIAL_PAGE:1},o=e,s=n,r=Y([]),a=Y(!1),l=Y(!1),c=Y(null),u=Y(i.INITIAL_PAGE),d=Y(!0),h=Y(0),f=Y(""),g=q(()=>{var A;return(A=o.value)==null?void 0:A.id}),m=q(()=>!!(o.id||o.ids&&o.ids.length>0)),y=A=>({label:A.name,value:A.id,selected:g.value===A.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:A,id:A.id,color:A.color}),b=q(()=>{const A=new Set;return o.id&&A.add(String(o.id)),o.ids&&o.ids.forEach(D=>{D&&A.add(String(D))}),Array.from(A)}),S=ki("bulkUpdate",!1),{apiServices:F}=vo(!S,o),C=async(A=i.INITIAL_PAGE,D="",P=!1)=>{var V,H,te,B;if(!m.value){console.error("Missing required props",o);return}P?l.value=!0:a.value=!0,c.value=null;try{const G={workspaceId:String(o.workspaceId),itemIds:b.value,page:A,perPage:i.PER_PAGE,name_like:D.trim()};if(((V=F.value)==null?void 0:V.getAssignableStatus)===void 0)throw new Error("API service getAssignableStatus is undefined");const Z=await((H=F.value)==null?void 0:H.getAssignableStatus(G));if(!(Z!=null&&Z.data)){P||(r.value=[]),d.value=!1;return}const $=Z.data.map(y);r.value=P?[...r.value,...$]:$,h.value=((te=Z.meta)==null?void 0:te.total)??Z.data.length,d.value=!((B=Z.meta)!=null&&B.on_last_page),u.value=A}catch(G){console.error("Error fetching statuses:",G),c.value="Failed to load statuses",P||(r.value=[]),d.value=!1,s("error",c.value)}finally{a.value=!1,l.value=!1}},R=Wo(async A=>{f.value=A,u.value=i.INITIAL_PAGE,await C(i.INITIAL_PAGE,A,!1)},wp),E=async()=>{!d.value||l.value||await C(u.value+1,f.value,!0)},x=async A=>{var D,P,V;if(!m.value){console.error("Missing required props for updating status",o);return}try{s("start-update");const H=await F.value.updateItemStatus({workspaceId:String(o.workspaceId),itemIds:b.value,statusId:String(A.value)});if(!(H!=null&&H.message))throw s("error","API did not return success"),new Error("API did not return success");o.params&&((P=o.params)==null||P.node.setData({...(D=o.params)==null?void 0:D.node.data,status:{id:A.id,name:A.label,color:A.color}}),(V=o.params)==null||V.api.stopEditing()),s("updated",{workspaceId:String(o.workspaceId),itemIds:b.value,data:{id:A.id,name:A.label,color:A.color}})}catch(H){console.error("Error updating status:",H),c.value="Failed to update status",s("error",c.value)}},k=q(()=>r.value.map(A=>({...A})));ut([()=>o.id,()=>o.workspaceId,()=>o.ids],()=>{C()},{deep:!0,immediate:!0}),t({refresh:()=>C(i.INITIAL_PAGE,f.value,!1),loadMore:E});const O=Y(null);return Sn(()=>{Xt(()=>{var A;(A=O.value)==null||A.focus()})}),(A,D)=>{var P;return K(),Xe(YC,_n({ref_key:"popupRef",ref:O},o,{"selected-id":(P=o.value)==null?void 0:P.id,options:k.value,loading:a.value,"loading-more":l.value,"has-more":d.value,error:c.value,onSearch:U(R),onSelect:x,onLoadMore:E,onCancel:D[0]||(D[0]=V=>s("cancel"))}),null,16,["selected-id","options","loading","loading-more","has-more","error","onSearch"])}}}),oK=ct({__name:"StatusUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{}},emits:["updated"],setup(e,{emit:t}){const n=e,i=q(()=>{const g=Di();return g==null?void 0:g.appContext.config.globalProperties.apiServices}),{popupRef:o,triggerRef:s,isVisible:r,hide:a}=tr(),l=t,c=Y(!1),u=g=>{c.value=!1,l("updated",g),a()},d=q(()=>({apiServices:i.value,ids:n.ids,workspaceId:n.workspaceId,entityId:n.entityId})),h=Y(null),f=g=>{g.key==="Escape"&&o.value&&a()};return Sn(()=>{var m;const g=h.value instanceof HTMLElement?h.value:(m=h.value)==null?void 0:m.$el;g&&g.addEventListener("keydown",f)}),qn(()=>{var m;const g=h.value instanceof HTMLElement?h.value:(m=h.value)==null?void 0:m.$el;g&&g.removeEventListener("keydown",f)}),Ta("bulkUpdate",!0),(g,m)=>(K(),Ce("div",{ref_key:"mainRef",ref:h},[ve(pt,{ref_key:"triggerRef",ref:s,variant:e.variant,loading:c.value},{default:Ee(()=>[ve(mt,{src:"Square",class:"icon"}),m[2]||(m[2]=dt(" Status ",-1))]),_:1},8,["variant","loading"]),we("div",{ref_key:"popupRef",ref:o},[U(r)?(K(),Xe(qP,_n({key:0},d.value,{onUpdated:u,onCancel:U(a),onStartUpdate:m[0]||(m[0]=y=>c.value=!0),onError:m[1]||(m[1]=y=>c.value=!1)}),null,16,["onCancel"])):it("",!0)],512)],512))}}),ZC=Sc("bulkUpdate",()=>{const e=Mo({loaded:0,total:0}),t=u=>{e.total=u},n=u=>{e.loaded=u},i=Mo({isBulkUpdating:!1});function o(u){i.isBulkUpdating=u}const s=Y({}),r=u=>{s.value=u},a=(u,d)=>{s.value[u]=d},l=Y(0);return{bulkUpdateState:i,setIsBulkUpdating:o,selectionIds:s,setSelectionIds:r,setCheckedForId:a,setSelectionStatus:u=>{l.value=u},selectionStatus:l,rowCount:e,setTotalRowCount:t,setLoadedRowCount:n}}),sK=Ct(ct({__name:"BulkUpdate",props:{selectRowData:{},workspaceId:{},entityId:{},gridApi:{},selectedAll:{type:Boolean},takeName:{}},emits:["close","assignStatus","assignAssignee","assignDate","assignMetric","moreActions","deleteSelected","unselect"],setup(e,{emit:t}){const n=mn,i=e,o=t,s=ZC(),{selectionStatus:r}=ys(s),a=q(()=>i.selectRowData.map(D=>D.id));Ta("bulkUpdate",!0);const l=({itemIds:D,data:P})=>{const V=i.gridApi;D.forEach(H=>{if(!V){console.error("Grid API is undefined");return}const te=V.getRowNode(H);if(te){const B={...te.data,status:P};te.setData(B)}})},c=({itemIds:D,data:P})=>{const V=i.gridApi;D.forEach(H=>{if(!V){console.error("Grid API is undefined");return}const te=V.getRowNode(H);if(te){const B={...te.data,dateRange:P};te.setData(B)}})},u=["primary"],d=[{label:"Delete Thumbnail",icon:"Image",id:"delete-thumbnail",type:"icon",value:"delete-thumbnail"},{label:"Delete Rendition",icon:"Film",id:"delete-rendition",type:"icon",value:"delete-rendition"},{label:"Unarchive",value:"UnBoxArchive",type:"icon",icon:"BoxArchive",id:"unarchive",clickable:!0},{label:"Archive",value:"BoxArchive",type:"icon",icon:"BoxArchive",id:"archive",clickable:!0},{label:"Delete",value:"delete",type:"icon",icon:"TrashCan",id:"delete",danger:!0,clickable:!0}],h=()=>{o("unselect")},f=zC(),{userPermissions:g}=ys(f),m=q(()=>g.value.includes(jC)),y=()=>{const P=`https://review.dev.arbocollab.com/w:yngazem?scene_ids=${i.selectRowData.map(V=>V.id).join(",")}`;window.open(P,"_blank")},b=D=>{const{assignees:P,type:V}=D,H=i.gridApi;if(!H){console.error("Grid API is not available for bulk update.");return}i.selectRowData.map(B=>{const G=H.getRowNode(B.id);if(!G)return null;const Z=G.data.assignees||[];let $=[];switch(V){case"add":{const ce=new Set(Z.map(xe=>xe.id)),ue=P.filter(xe=>!ce.has(xe.id));$=[...Z,...ue];break}case"overwrite":{$=P;break}case"remove":{const ce=new Set(P.map(ue=>ue.id));$=Z.filter(ue=>!ce.has(ue.id));break}case"removeAll":{$=[];break}}return{...G.data,assignees:$}}).filter(B=>B!==null).forEach(B=>{const G=H.getRowNode(B.id);G&&G.setData(B)})},{apiServices:S}=vo(!1,i),F=async()=>{var H;const D=i.selectRowData.map(te=>te.id),P=i.gridApi;if(!P){console.error("Grid API is not available for bulk delete.");return}const V=await((H=S.value)==null?void 0:H.bulkDeleteItems(String(i.workspaceId),D));(V==null?void 0:V.message)=="Done"&&(D.forEach(te=>{const B=P.getRowNode(te);if(B){const G={...B.data,isDeleted:!0,disabled:!0};B.setData(G)}}),P.deselectAll())},C=async()=>{var H;const D=i.selectRowData.map(te=>te.id);if(!i.gridApi){console.error("Grid API is not available for bulk unarchive.");return}const V=await((H=S.value)==null?void 0:H.bulkUnarchiveItems(String(i.workspaceId),D));if((V==null?void 0:V.message)!="Done"){console.error("Failed to unarchive items.");return}E(D,"isArchived",!1)},R=async()=>{var H;const D=i.selectRowData.map(te=>te.id);if(!i.gridApi){console.error("Grid API is not available for bulk archive.");return}const V=await((H=S.value)==null?void 0:H.bulkArchiveItems(String(i.workspaceId),D));if((V==null?void 0:V.message)!="Done"){console.error("Failed to archive items.");return}E(D,"isArchived",!0)},E=(D,P,V)=>{const H=i.gridApi;if(!H){console.error("Grid API is not available for bulk update.");return}const te=D.map(B=>{const G=H.getRowNode(B);if(G){const Z={...G.data,[P]:V};G.setData(Z)}return G}).filter(B=>B!=null);H.redrawRows({rowNodes:te})},x=async()=>{var H;const D=i.selectRowData.map(te=>te.id),P=i.gridApi;if(!P){console.error("Grid API is not available for bulk thumbnail deletion.");return}const V=await((H=S.value)==null?void 0:H.deleteThumbnail(String(i.workspaceId),D));if((V==null?void 0:V.message)!="Done"){console.error("Failed to delete thumbnails.");return}D.forEach(te=>{const B=P.getRowNode(te);if(B){const G={...B.data,thumbnail:null};B.setData(G)}})},k=async()=>{var H;const D=i.selectRowData.map(te=>te.id),P=i.gridApi;if(!P){console.error("Grid API is not available for bulk rendition deletion.");return}const V=await((H=S.value)==null?void 0:H.deleteRendition(String(i.workspaceId),D));if((V==null?void 0:V.message)!="Done"){console.error("Failed to delete renditions.");return}D.forEach(te=>{const B=P.getRowNode(te);if(B){const G={...B.data,rendition:null};B.setData(G)}})},O=Y(!1),A=async D=>{O.value=!0,D.id==="unarchive"?await C():D.id==="delete"?await F():D.id==="archive"?await R():D.id==="delete-thumbnail"?await x():D.id==="delete-rendition"&&await k(),Xt(()=>{O.value=!1})};return(D,P)=>ot((K(),Ce("div",{class:z(D.$style["bulk-update-action"])},[we("div",{class:z(D.$style["left-actions"])},[we("div",{class:z(D.$style["selection-track"])},[ve(pt,{variant:["icon","tertiary"],onClick:h},{default:Ee(()=>[ve(mt,{src:"XMarkSolid",source:"remote"})]),_:1}),U(r)==1?(K(),Ce("span",{key:0,class:z(D.$style["selected-count"])},bt(e.selectRowData.length)+" selected ",3)):it("",!0),U(r)==2?(K(),Ce("span",{key:1,class:z(D.$style["selected-count"])}," All in "+bt(e.takeName),3)):it("",!0),we("span",{class:z(D.$style.divider)},null,2)],2),ve(oK,{ids:a.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:u,onUpdated:l},null,8,["ids","workspace-id","entity-id"]),ve(q8,{onUpdate:b,ids:a.value,"workspace-id":e.workspaceId,variant:u,"entity-id":e.entityId},null,8,["ids","workspace-id","entity-id"]),ve(iK,{ids:a.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:u,onUpdated:c},null,8,["ids","workspace-id","entity-id"]),we("span",{class:z(D.$style.divider)},null,2),m.value?ot((K(),Xe(pt,{key:0,class:z(D.$style["action-button"]),variant:[...u,"icon"],onClick:y},{default:Ee(()=>[ve(mt,{src:"PenRuler",class:z(D.$style["icon-btn"])},null,8,["class"])]),_:1},8,["class","variant"])),[[U(n),{content:"Open in Review"}]]):it("",!0),we("span",{class:z(D.$style.divider)},null,2),ve(KP,{placement:"top-end"},{trigger:Ee(({open:V})=>[ot((K(),Xe(pt,{actived:V,class:z(D.$style["action-button"]),variant:[...u,"icon"],loading:O.value},{default:Ee(()=>[ve(mt,{src:"EllipsisVertical",class:z(D.$style.icon),source:"remote"},null,8,["class"])]),_:1},8,["actived","class","variant","loading"])),[[U(n),{content:"More actions"}]])]),content:Ee(({visible:V,closeDropdown:H})=>[(K(),Ce(Ot,null,Un(d,te=>ve(Vp,_n({key:te.id,selected:!1},{ref_for:!0},te,{show:V,onSelect:()=>{A(te),H()}}),null,16,["show","onSelect"])),64))]),_:1})],2)],2)),[[us,e.selectRowData.length>0]])}}),[["__cssModules",{$style:{"bulk-update-action":"_bulk-update-action_o4psi_1","left-actions":"_left-actions_o4psi_19","right-actions":"_right-actions_o4psi_20","selection-track":"_selection-track_o4psi_25","close-icon":"_close-icon_o4psi_30","selected-count":"_selected-count_o4psi_34",divider:"_divider_o4psi_37","more-button":"_more-button_o4psi_42",dropdown:"_dropdown_o4psi_46","dropdown-content":"_dropdown-content_o4psi_49",delete:"_delete_o4psi_72","icon-btn":"_icon-btn_o4psi_79","selected-list":"_selected-list_o4psi_83"}}]]),Xa=Ct(ct({name:"LabelRenderer",__name:"LabelRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=Go,n=mn,i=e,o=q(()=>({disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:i.value===void 0||i.value===null||i.value==="",clickable:!0})),{argsMain:s}=or(o),r=q(()=>{var l,c,u;return!!((l=i.params)!=null&&l.api||(c=i.params)!=null&&c.node||(u=i.params)!=null&&u.context)}),a=q(()=>i.value===void 0);return(l,c)=>ot((K(),Xe(sr,Um(wf(U(s))),{default:Ee(()=>[we("span",{class:z(l.$style["item-table-label-renderer"])},bt(i.value||"-"),3)]),_:1},16)),[[U(t),{isLoading:a.value||!r.value}],[U(n),i.tooltip?i.tooltip:{content:void 0}]])}}),[["__cssModules",{$style:{"item-table-label-renderer":"_item-table-label-renderer_s1gdy_1"}}]]),rK=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const aK=Object.prototype.toString,lK=e=>aK.call(e)==="[object Object]",Bp=()=>{};function XC(e){return Array.isArray(e)?e:[e]}function cK(e,t,n){return ut(e,t,{...n,immediate:!0})}const YP=rK?window:void 0;function Ed(e){var t;const n=ba(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function JC(...e){const t=(i,o,s,r)=>(i.addEventListener(o,s,r),()=>i.removeEventListener(o,s,r)),n=q(()=>{const i=XC(ba(e[0])).filter(o=>o!=null);return i.every(o=>typeof o!="string")?i:void 0});return cK(()=>{var i,o;return[(i=(o=n.value)===null||o===void 0?void 0:o.map(s=>Ed(s)))!==null&&i!==void 0?i:[YP].filter(s=>s!=null),XC(ba(n.value?e[1]:e[0])),XC(U(n.value?e[2]:e[1])),ba(n.value?e[3]:e[2])]},([i,o,s,r],a,l)=>{if(!(i!=null&&i.length)||!(o!=null&&o.length)||!(s!=null&&s.length))return;const c=lK(r)?{...r}:r,u=i.flatMap(d=>o.flatMap(h=>s.map(f=>t(d,h,f,c))));l(()=>{u.forEach(d=>d())})},{flush:"post"})}function ZP(e,t,n={}){const{window:i=YP,ignore:o=[],capture:s=!0,detectIframe:r=!1,controls:a=!1}=n;if(!i)return a?{stop:Bp,cancel:Bp,trigger:Bp}:Bp;let l=!0;const c=y=>ba(o).some(b=>{if(typeof b=="string")return Array.from(i.document.querySelectorAll(b)).some(S=>S===y.target||y.composedPath().includes(S));{const S=Ed(b);return S&&(y.target===S||y.composedPath().includes(S))}});function u(y){const b=ba(y);return b&&b.$.subTree.shapeFlag===16}function d(y,b){const S=ba(y),F=S.$.subTree&&S.$.subTree.children;return F==null||!Array.isArray(F)?!1:F.some(C=>C.el===b.target||b.composedPath().includes(C.el))}const h=y=>{const b=Ed(e);if(y.target!=null&&!(!(b instanceof Element)&&u(e)&&d(e,y))&&!(!b||b===y.target||y.composedPath().includes(b))){if("detail"in y&&y.detail===0&&(l=!c(y)),!l){l=!0;return}t(y)}};let f=!1;const g=[JC(i,"click",y=>{f||(f=!0,setTimeout(()=>{f=!1},0),h(y))},{passive:!0,capture:s}),JC(i,"pointerdown",y=>{const b=Ed(e);l=!c(y)&&!!(b&&!y.composedPath().includes(b))},{passive:!0}),r&&JC(i,"blur",y=>{setTimeout(()=>{var b;const S=Ed(e);((b=i.document.activeElement)===null||b===void 0?void 0:b.tagName)==="IFRAME"&&!(S!=null&&S.contains(i.document.activeElement))&&t(y)},0)},{passive:!0})].filter(Boolean),m=()=>g.forEach(y=>y());return a?{stop:m,cancel:()=>{l=!1},trigger:y=>{l=!0,h(y),l=!1}}:m}const uK=["placeholder","maxlength"],dK={key:0,class:"wrapper-suffix"},QC=Ct(ct({name:"LabelEditor",__name:"LabelEditor",props:{value:{},placeholder:{default:"Enter name"},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{}},emits:["update:value","enter","blur"],setup(e,{expose:t,emit:n}){const i=Go,o=mn,s=e,r=n,a=Y(s.value),l=Y(null),c=Y(null),u=q(()=>{var R;return{disabled:s.disabled,error:!1,readOnly:s.readOnly,isEmpty:((R=s.value)==null?void 0:R.length)===0,inputRef:l,wrapperRef:c,clickable:!0}}),{argsMain:d,isFocus:h}=or(u),f=R=>{const E=document.createElement("div");return E.textContent=R,E.innerHTML},g=R=>{h.value=!1,C.value=a.value,r("update:value",a.value)},m=R=>{if(!h.value||!l.value)return;const E=f(l.value.value);r("update:value",E),r("enter",E),h.value=!1},y=R=>{var E;if(R.ctrlKey&&R.key=="a"||R.key=="A"){(E=l.value)==null||E.select();return}R.key==="Enter"?(R.preventDefault(),m()):R.key==="Escape"&&(R.preventDefault(),g())},b=()=>{a.value=s.value,h.value=!0,Xt(()=>{var R;(R=l.value)==null||R.focus()})},S={focus:()=>{var R;h.value=!0,(R=l.value)==null||R.focus()}};Sn(()=>{const R=c.value.$el;R&&(R.__sceneNameEditor=S)}),qn(()=>{const R=c.value;R&&delete R.__sceneNameEditor}),t({focus:()=>{b()}});const F=q(()=>s.value===void 0),C=Y(s.value||"");return ZP(c,R=>{h.value&&m()}),(R,E)=>ot((K(),Xe(U(sr),_n(U(d),{ref_key:"wrapperRef",ref:c}),_u({default:Ee(()=>[U(h)?it("",!0):_t(R.$slots,"default",{key:0},()=>[ot((K(),Ce("span",{class:z(R.$style["label-renderer"])},[dt(bt(C.value),1)],2)),[[U(o),{content:C.value||void 0}]])]),ot(we("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":E[0]||(E[0]=x=>C.value=x),class:z(R.$style["label-editor"]),placeholder:e.placeholder,maxlength:e.maxLength,onKeydown:y},null,42,uK),[[us,U(h)],[IR,C.value]])]),_:2},[!e.disabled&&!e.readOnly?{name:"suffix",fn:Ee(({hovered:x,focused:k})=>[x||k?(K(),Ce("div",dK,[x&&!k?ot((K(),Xe(U(pt),{key:0,variant:["icon","secondary"],size:24,onClick:on(b,["prevent","stop"])},{default:Ee(()=>[ve(U(mt),{src:"Pen",source:"remote"})]),_:1})),[[U(o),"Edit"]]):k?ot((K(),Xe(U(pt),{key:1,variant:["icon","tertiary","danger"],size:24,onMousedown:on(g,["prevent"])},{default:Ee(()=>[ve(U(mt),{src:"XMarkSolid",source:"remote"})]),_:1})),[[U(o),"Cancel"]]):it("",!0)])):it("",!0)]),key:"0"}:void 0]),1040)),[[U(i),{isLoading:F.value}]])}}),[["__cssModules",{$style:{"label-renderer":"_label-renderer_cyzth_1","label-editor":"_label-editor_cyzth_10"}}]]);/*! js-cookie v3.0.5 | MIT */function Hp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}var hK={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ew(e,t){function n(o,s,r){if(!(typeof document>"u")){r=Hp({},t,r),typeof r.expires=="number"&&(r.expires=new Date(Date.now()+r.expires*864e5)),r.expires&&(r.expires=r.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in r)r[l]&&(a+="; "+l,r[l]!==!0&&(a+="="+r[l].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function i(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],r={},a=0;a<s.length;a++){var l=s[a].split("="),c=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(r[u]=e.read(c,u),o===u)break}catch{}}return o?r[o]:r}}return Object.create({set:n,get:i,remove:function(o,s){n(o,"",Hp({},s,{expires:-1}))},withAttributes:function(o){return ew(this.converter,Hp({},this.attributes,o))},withConverter:function(o){return ew(Hp({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var fK=ew(hK,{path:"/"});const XP=Ct(ct({name:"SceneNameEditor",__name:"SceneNameEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},placeholder:{default:"Enter name"}},emits:["update:value","enter","blur"],setup(e,{emit:t}){const n=sessionStorage.getItem("ws.code"),i=sessionStorage.getItem("BASE_URL")||"https://app.dev.arbocollab.com",o=mn,s=Go,r=e,a=t,l=Y(r.value),c=Y(r.value),u=Y(null),d=Y(null),h=ki("bulkUpdate",!1),{apiServices:f}=vo(!h,r),g=q(()=>{var D;return{componentType:void 0,disabled:r.disabled,error:!1,readOnly:r.readOnly,isEmpty:((D=l==null?void 0:l.value)==null?void 0:D.length)===0,inputRef:u,wrapperRef:d,clickable:!0}}),{isFocus:m}=or(g),y=q(()=>{const D=n||r.workspaceId;return fo({type:"scene_hub",config:{baseDomain:i,ws_code:D,scene_id:String(r.id)}}).url}),b=q(()=>{var D,P,V;return((D=r.data)==null?void 0:D.isDeleted)==!0||((V=(P=r.data)==null?void 0:P.isProcessing)==null?void 0:V.length)>0}),S=q(()=>{var D;return(D=r.data)==null?void 0:D.isProcessing}),F=q(()=>{var D;return((D=r.data)==null?void 0:D.isArchived)==1}),C=q(()=>r.value===void 0),R=async D=>{var P,V,H,te;l.value=D,m.value=!1;try{const B=await((V=(P=f.value)==null?void 0:P.updateSceneName)==null?void 0:V.call(P,{workspaceId:r.workspaceId,entityId:r.entityId,itemId:r.id,name:l.value})),G=fK.get(PF)||"UTC";if(B){const Z=OF(B,G),$={...r.data,...Z};(te=(H=r.params)==null?void 0:H.node)==null||te.setData($),c.value=l.value,a("enter")}else l.value=c.value}catch(B){console.error("Failed to update scene name:",B),l.value=c.value}},E={focus:()=>{m.value=!0,setTimeout(()=>{var D;return(D=d.value)==null?void 0:D.focus()},0)}},x=()=>d.value?"$el"in d.value?d.value.$el:d.value:null;ut(()=>r.value,D=>{l.value=D,c.value=D}),Sn(()=>{const D=x();D&&(D.__sceneNameEditor=E)}),qn(()=>{const D=d.value,P=D&&"$el"in D?D.$el:D;P&&delete P.__sceneNameEditor});const k=$P(),{openSceneHub:O}=k,A=D=>{try{if(D.ctrlKey||D.metaKey){window.open(y.value,"_blank");return}O(String(r.id))}catch{window.open(y.value,"_blank")}};return(D,P)=>ot((K(),Xe(QC,{"save-on-blur":!0,ref_key:"wrapperRef",ref:d,disabled:r.disabled,"read-only":r.readOnly,placeholder:r.placeholder,value:l.value,"onUpdate:value":P[0]||(P[0]=V=>l.value=V),id:`scene-name-${r.id}`,onEnter:R,"max-length":25},{default:Ee(()=>[ot(we("div",{class:z(D.$style["scene-name-display"])},[ot((K(),Ce("a",{onClick:on(A,["prevent"]),target:"_blank",class:z(D.$style["scene-name-text"])},[dt(bt(l.value),1)],2)),[[U(o),{content:l.value}]]),F.value?(K(),Ce("div",{key:0,class:z([D.$style["icon-processing"],D.$style.archived])},[ve(mt,{src:"BoxArchive",color:"#959595"})],2)):it("",!0),b.value?ot((K(),Ce("div",{key:1,class:z([D.$style["icon-processing"],D.$style.processing])},[ve(mt,{src:"AnimatedHourglass",color:"#DE851A"})],2)),[[U(o),S.value]]):it("",!0)],2),[[us,!U(m)]])]),_:1},8,["disabled","read-only","placeholder","value","id"])),[[U(s),{isLoading:C.value}]])}}),[["__cssModules",{$style:{"scene-name-editor":"_scene-name-editor_nlzfn_1","scene-name-display":"_scene-name-display_nlzfn_11","icon-processing":"_icon-processing_nlzfn_18",archived:"_archived_nlzfn_26",processing:"_processing_nlzfn_29","scene-name-text":"_scene-name-text_nlzfn_33"}}]]),pK=Ct(ct({__name:"OptionList",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},options:{}},emits:["select"],setup(e,{emit:t}){const n=t;function i(o){n("select",o)}return(o,s)=>(K(),Ce("div",{class:z(o.$style["dropdown-list"])},[(K(!0),Ce(Ot,null,Un(e.options,r=>(K(),Xe(Vp,_n({key:r.value},{ref_for:!0},{...r},{"icon-name":r.icon,onClick:on(a=>i(r.value),["stop","prevent"])}),{label:Ee(()=>[dt(bt(r.label),1)]),_:2},1040,["icon-name","onClick"]))),128)),e.options.length==0?(K(),Ce("div",{key:0,class:z(o.$style["empty-list"])}," No options available. ",2)):it("",!0)],2))}}),[["__cssModules",{$style:{"dropdown-list":"_dropdown-list_1d2i1_1","empty-list":"_empty-list_1d2i1_8"}}]]),tw=Ct(ct({__name:"ButtonDropdown",props:{label:{},value:{},variant:{},options:{default:()=>[]},size:{},placement:{default:"bottom"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["select","handleClick"],setup(e,{expose:t,emit:n}){const i=e,o=q(()=>typeof i.size=="number"?`${i.size}px`:{small:"24px",medium:"32px",large:"48px"}[i.size]??"32px"),s=q(()=>{let g=[];return typeof i.variant=="string"?g.push(i.variant):Array.isArray(i.variant)&&(g=[...i.variant]),[...g,"icon"]}),r=n,{hide:a,isVisible:l,show:c,triggerRef:u,popupRef:d,instance:h}=tr();function f(g){r("select",g),a()}return cf(()=>{h.value&&h.value.setProps({placement:i.placement})}),t({show:c,hide:a,popupRef:d}),(g,m)=>(K(),Ce("div",{class:z(g.$style["button-dropdown-wrapper"]),style:gn({"--button-size":o.value})},[we("div",{class:z(g.$style["button-group"])},[_t(g.$slots,"prefix"),we("div",{ref_key:"triggerRef",ref:u,class:z(U(l)?g.$style.open:"")},[_t(g.$slots,"triggerDropdown",{open:U(l)},()=>[i.readOnly?it("",!0):(K(),Xe(pt,{key:0,actived:U(l),class:z(g.$style["button-dropdown-trigger"]),variant:s.value,size:e.size,disabled:i.disabled},{default:Ee(()=>[_t(g.$slots,"iconDropdown",{},()=>[ve(mt,{class:z(g.$style["icon-dropdown"]),src:"ChevronDown",source:"remote"},null,8,["class"])])]),_:3},8,["actived","class","variant","size","disabled"]))])],2)],2),we("div",{ref_key:"popupRef",ref:d,class:z(g.$style["button-dropdown-list"])},[ve(pK,{options:e.options,onSelect:f,style:{width:"max-content"}},null,8,["options"])],2)],6))}}),[["__cssModules",{$style:{"button-dropdown-wrapper":"_button-dropdown-wrapper_12xlv_1","button-group":"_button-group_12xlv_7","overflow-elipsis":"_overflow-elipsis_12xlv_26","button-dropdown-list":"_button-dropdown-list_12xlv_33",show:"_show_12xlv_36","button-dropdown-item":"_button-dropdown-item_12xlv_39","icon-dropdown":"_icon-dropdown_12xlv_43",open:"_open_12xlv_46"}}]]),gK=Ct(ct({name:"AssigneeGroupRenderer",__name:"AssigneeGroupRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean},maxVisible:{default:4}},setup(e){const t=mn,n=Go,i=OD,o=e,{isEditing:s}=KC(o),r=Y(o.value),a=Y(null),l=Y(null),{apiServices:c}=vo(!0,o),u=q(()=>({disabled:o.disabled,readOnly:o.readOnly,error:o.error,inputRef:a,wrapperRef:l,clickable:!0,active:s})),{argsMain:d,isHover:h}=or(u),f=q(()=>o.value===void 0),g=q(()=>{var C;return((C=r.value)==null?void 0:C.slice(0,o.maxVisible))||[]}),m=q(()=>{var C;return Math.max(0,(((C=r.value)==null?void 0:C.length)||0)-o.maxVisible)}),y=q(()=>{var C;return m.value<=0?"":((C=r.value)==null?void 0:C.slice(o.maxVisible).map(R=>R.name).join(", "))||""}),b=q(()=>g.value.map(C=>({id:C.id,name:C.name,initial:C.initial,avatarId:C.id,profile_image:C.profile_image,color:C.color,size:24,user:C}))),S=q(()=>({color:h.value?"var(--primary-color)":"var(--grey-300)",display:"flex",alignItems:"center",marginLeft:"4px"})),F=async C=>{var E;const R=o.workspaceId;return await((E=c.value)==null?void 0:E.getUserInformation(R,C))??void 0};return ut(()=>o.value,C=>{r.value=C},{immediate:!0,deep:!0}),(C,R)=>ot((K(),Xe(sr,Um(wf(U(d))),{default:Ee(()=>{var E;return[we("div",{class:z(C.$style.assigneeGroupRenderer)},[(E=r.value)!=null&&E.length?it("",!0):(K(),Xe(mt,{key:0,src:"UserPlus",source:"remote",style:gn(S.value)},null,8,["style"])),(K(!0),Ce(Ot,null,Un(b.value,x=>ot((K(),Xe(Zu,{key:x.id,readOnly:!0,class:z(C.$style["ib-assignee-avatar"]),name:x.name,initial:x.initial,id:`assignee-avatar-${x.avatarId}`,profile_image:x.profile_image,color:x.color,size:x.size},null,8,["class","name","initial","id","profile_image","color","size"])),[[U(i),{user:x.user,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0,apiUpdateFunction:F}]])),128)),m.value>0?ot((K(),Ce("div",{key:1,class:z(C.$style["extra-avatars"])},[dt(" +"+bt(m.value),1)],2)),[[U(t),y.value]]):it("",!0)],2)]}),_:1},16)),[[U(n),{isLoading:f.value}]])}}),[["__cssModules",{$style:{assigneeGroupRenderer:"_assigneeGroupRenderer_1tgm9_1","ib-assignee-group-renderer":"_ib-assignee-group-renderer_1tgm9_7","ib-assignee-avatar":"_ib-assignee-avatar_1tgm9_17","assignee-wrapper":"_assignee-wrapper_1tgm9_21","extra-avatars":"_extra-avatars_1tgm9_28"}}]]),mK=Ct(ct({name:"DateRangeRenderer",__name:"DateRangeRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{}},setup(e){var R,E;const t=mn,n=Go,i=pC(),o=e,s=Y(null),r=Y(null),a=x=>{if(x){if(typeof x=="string")return x;if(x instanceof Date)return x.toISOString()}},l=q(()=>o.value===void 0),c=q(()=>{var x;return(x=o.data)==null?void 0:x.isStarted}),u=q(()=>{var x;return(x=o.data)==null?void 0:x.isCompleted}),d=q(()=>!!(o.value&&(o.value[0]||o.value[1]))),h=q(()=>d.value?o.disabled&&!o.readOnly?"var(--disabled-color)":"var(--primary-color)":"var(--grey-300)"),f=q(()=>({disabled:o.disabled,error:!1,readOnly:o.readOnly,inputRef:s,wrapperRef:r,clickable:!0})),{argsMain:g}=or(f),{startDate:m,endDate:y,startClasses:b,endClasses:S,fullStartDate:F,fullEndDate:C}=e5({start:a((R=o.value)==null?void 0:R[0]),end:a((E=o.value)==null?void 0:E[1]),isStarted:c.value,isEnded:u.value,timezone:o.timezone||i});return(x,k)=>ot((K(),Xe(sr,_n(U(g),{ref_key:"wrapperRef",ref:r}),{default:Ee(()=>[l.value?it("",!0):(K(),Ce("div",{key:0,class:z(x.$style.dateRangeRenderer)},[d.value?it("",!0):(K(),Xe(mt,{key:0,src:"Calendar",class:z(x.$style.calendarIcon),color:h.value},null,8,["class","color"])),d.value?(K(),Ce(Ot,{key:1},[ot((K(),Ce("span",{class:z([x.$style.dateLabelDisplay,...U(b).map(O=>x.$style[O])])},[dt(bt(U(m)),1)],2)),[[U(t),U(F)]]),k[0]||(k[0]=we("span",null,"→",-1)),ot((K(),Ce("span",{class:z([x.$style.dateLabelDisplay,...U(S).map(O=>x.$style[O])])},[dt(bt(U(y)),1)],2)),[[U(t),U(C)]])],64)):it("",!0)],2))]),_:1},16)),[[U(n),{isLoading:l.value,fullwidth:!0}]])}}),[["__cssModules",{$style:{dateRangeRenderer:"_dateRangeRenderer_1hon8_1",calendarIcon:"_calendarIcon_1hon8_7",dateSection:"_dateSection_1hon8_11",dateLabelDisplay:"_dateLabelDisplay_1hon8_18",empty:"_empty_1hon8_28","end-today":"_end-today_1hon8_34",actual:"_actual_1hon8_37","end-tomorrow":"_end-tomorrow_1hon8_40","end-yesterday":"_end-yesterday_1hon8_46","end-past":"_end-past_1hon8_52","end-future":"_end-future_1hon8_58","start-today":"_start-today_1hon8_61","start-tomorrow":"_start-tomorrow_1hon8_67","start-yesterday":"_start-yesterday_1hon8_73","start-past":"_start-past_1hon8_79","start-future":"_start-future_1hon8_85"}}]]),vK=ct({__name:"DateRangeEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{default:void 0},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{default:pC()}},emits:["closed"],setup(e,{expose:t,emit:n}){const i=Y(null);Sn(()=>{Xt(()=>{i.value&&i.value.focus()})});const o=e,s=n,r=y=>`${tt.fromJSDate(y,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,a=async y=>{await m({startDate:y[0]?r(y[0]):null,dueDate:y[1]?r(y[1]):null})},l=async()=>{await m({startDate:null})},c=async()=>{await m({dueDate:null})},u=async y=>{await m({startDate:y?r(y):null})},d=async y=>{await m({dueDate:y?r(y):null})},h=async()=>{await m({startDate:null,dueDate:null})},f=ki("bulkUpdate",!1),{apiServices:g}=vo(!f,o),m=async y=>{var b,S,F,C,R;try{const E=(b=i.value)==null?void 0:b.getValues(),x=await((F=(S=g.value)==null?void 0:S.changeDate)==null?void 0:F.call(S,{workspaceId:o.workspaceId,itemIds:[o.id],startDate:y.startDate,dueDate:y.dueDate}));x!=null&&x.message&&((R=o.params)==null||R.node.setData({...(C=o.params)==null?void 0:C.node.data,dateRange:E==null?void 0:E.dateRange}))}catch(E){console.error("Failed to update scene name:",E)}};return t({focus:()=>{Xt(()=>{var y;(y=i.value)==null||y.focus()})}}),(y,b)=>(K(),Xe(jP,_n(o,{onUpdate:a,"onUpdate:end":d,"onUpdate:start":u,onClearAll:h,onClearDue:c,onClearStart:l,onClosed:b[0]||(b[0]=S=>s("closed")),ref_key:"calendarRef",ref:i}),null,16))}}),yK=Ct(ct({__name:"item-table-layout",props:{isSidebarOpen:{type:Boolean,default:!1}},emits:["close-sidebar","sidebar-clear","sidebar-apply"],setup(e,{emit:t}){const n=Y(null),i=Y(0);let o=null;Sn(()=>{n.value&&(o=new ResizeObserver(r=>{for(const a of r)i.value=a.contentRect.height}),o.observe(n.value))}),Vl(()=>{o&&n.value&&o.unobserve(n.value)});const s=q(()=>{const r=i.value;return r>120?r-42-36:0});return(r,a)=>(K(),Ce("div",{class:z(r.$style["item-table-wrapper"]),ref_key:"itemTableWrapperRef",ref:n},[we("div",{class:z(r.$style["item-header"])},[we("div",{class:z(r.$style["item-header__left"])},[_t(r.$slots,"header-left",{},()=>[we("h1",{class:z(r.$style["item-header__title"])},[_t(r.$slots,"title",{},()=>[a[0]||(a[0]=dt("Items",-1))])],2)])],2),we("div",{class:z(r.$style["item-header__spacer"])},null,2),we("div",{class:z(r.$style["item-header__actions"])},[_t(r.$slots,"header-actions")],2)],2),_t(r.$slots,"grid",{availableHeight:s.value}),we("div",{class:z(r.$style.footer)},[_t(r.$slots,"footer")],2),_t(r.$slots,"new-row"),_t(r.$slots,"bulk-update-actions"),_t(r.$slots,"snackbar"),_t(r.$slots,"popup")],2))}}),[["__cssModules",{$style:{"item-table-wrapper":"_item-table-wrapper_1o9sg_1","item-header":"_item-header_1o9sg_15","item-header__left":"_item-header__left_1o9sg_23","item-header__title":"_item-header__title_1o9sg_28","item-header__spacer":"_item-header__spacer_1o9sg_33","item-header__actions":"_item-header__actions_1o9sg_36","main-content":"_main-content_1o9sg_42",sidebar:"_sidebar_1o9sg_49","is-open":"_is-open_1o9sg_65","sidebar-header":"_sidebar-header_1o9sg_69","sidebar-footer":"_sidebar-footer_1o9sg_70","sidebar-content":"_sidebar-content_1o9sg_90",footer:"_footer_1o9sg_95"}}]]),JP=Ct(ct({__name:"MoreOptionEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},optionBlock:{},isSubmenu:{type:Boolean,default:!1},layer:{default:0}},emits:["actionExecuted"],setup(e,{emit:t}){const n=e,i=q(()=>(n==null?void 0:n.workspaceId)||""),o=q(()=>(n==null?void 0:n.entityId)||""),s=m=>{const y=`scene-name-${n.id}`,b=document.getElementById(y);b.__sceneNameEditor&&b.__sceneNameEditor.focus()},{apiServices:r}=vo(!0,n),a=q(()=>{var m;return{ws_code:i.value,entity_id:o.value,scene_id:n.id,axiosService:r,optionBlock:n.optionBlock,permissions:(m=n.data)==null?void 0:m.permissions}}),l=m=>{var b,S,F,C,R,E;let y=(S=(b=n.params)==null?void 0:b.api)==null?void 0:S.getRowNode(String(n.id));if(y){const x={...y.data,isDeleted:m==="deleted",isArchived:m==="archived"?!0:m==="unarchived"?!1:y.data.isArchived,disabled:!0};(C=(F=n.params)==null?void 0:F.api)==null||C.redrawRows({rowNodes:[y]}),y.setData(x),(E=(R=n.params)==null?void 0:R.api)==null||E.redrawRows({rowNodes:[y]})}},{options:c}=L8(a,l,s),u=t,d=m=>{var y,b;m.id!=="copy-link"&&((b=(y=n==null?void 0:n.params)==null?void 0:y.api)==null||b.stopEditing()),u("actionExecuted",m)},h=m=>{var y,b,S,F;return m=="archive"?!((b=(y=n.params)==null?void 0:y.data)!=null&&b.isArchived):m==="unarchive"?(F=(S=n.params)==null?void 0:S.data)==null?void 0:F.isArchived:!0},f=m=>m.map(y=>({...y,options:y.options.filter(b=>!b.hide)})),g=q(()=>f(c.value));return(m,y)=>(K(),Ce("div",{class:z([m.$style["more-option-section"],{[m.$style.submenu]:e.isSubmenu}])},[(K(!0),Ce(Ot,null,Un(g.value,b=>(K(),Ce("div",{key:b.id,style:gn({"--g-number":Math.min(b.options.length,4)}),class:z([m.$style["option-block"],m.$style[b.type]])},[(K(!0),Ce(Ot,null,Un(b.options,S=>ot((K(),Ce("div",{key:S.id,class:z(m.$style["option-item"])},[S.hide?it("",!0):(K(),Xe(wK,{key:0,layer:n.layer,"scene-id":String(n.id),option:S,type:b.type,onActionExecuted:d},null,8,["layer","scene-id","option","type"]))],2)),[[us,h(S.id)]])),128))],6))),128))],2))}}),[["__cssModules",{$style:{"more-option-section":"_more-option-section_1xceh_1","option-block":"_option-block_1xceh_8","option-item":"_option-item_1xceh_18",row:"_row_1xceh_22",column:"_column_1xceh_28",block:"_block_1xceh_32"}}]]),CK={key:0},wK=Ct(ct({__name:"MoreOptionItem",props:{option:{},sceneId:{},type:{},layer:{}},emits:["actionExecuted"],setup(e,{emit:t}){const n=mn,i=e,o=Y(!1),s=Y(!1),r=(C,R)=>{if(!R){h();return}const E=R.target;E.closest(".tippy-content")||E.closest(".tippy-box")||E.closest("[data-tippy-root]")||E.closest(".option-item")||h()},a=Y(null),{triggerRef:l,popupRef:c,show:u,isVisible:d,hide:h}=tr({interactive:!0,trigger:"click",placement:"left",showArrow:!1,offset:[0,4],hideOnClick:!1,allowHTML:!0,onClickOutside:r,appendTo:a.value||void 0}),f=t,g=async C=>{var R,E;if(!s.value){s.value=!0;try{await((E=(R=i.option).action)==null?void 0:E.call(R,C)),f("actionExecuted",i.option)}catch(x){console.error("Action execution failed:",x)}finally{s.value=!1,o.value=!1}}},m=async C=>{var R,E;if(C.preventDefault(),C.stopPropagation(),!s.value){if(i.option.isDanger){o.value=!o.value;return}if(!i.option.subMenu){s.value=!0;try{await((E=(R=i.option).action)==null?void 0:E.call(R,C)),f("actionExecuted",i.option)}catch(x){console.error("Action execution failed:",x)}finally{s.value=!1}return}Xt(()=>{d.value?h():u()})}},y=C=>{f("actionExecuted",C),h()},b=C=>{C.key==="Escape"?h():(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),m(C))},S=C=>({row:"small",column:"large",block:"small"})[C]||"large",F=C=>{const R=i.option.isDanger?["danger","tertiary"]:[];return{row:["secondary","icon",...R],column:["menu-item",...R],block:["secondary",...R]}[C]||[]};return(C,R)=>{var E;return K(),Ce("div",{ref_key:"wrapperRef",ref:a,class:z(C.$style["option-item-wrapper"])},[ot((K(),Xe(pt,{ref_key:"triggerRef",ref:l,class:z(C.$style["option-item"]),disabled:e.option.disabled||s.value,actived:U(d)||o.value,size:S(e.type),variant:F(e.type),tabindex:"0",onClick:on(m,["stop","prevent"]),onKeydown:b},{prefix:Ee(()=>[e.option.icon?ot((K(),Xe(mt,{key:0,src:e.option.icon,source:"remote"},null,8,["src"])),[[U(n),{content:e.option.label,delay:[500,0],contentClass:["extra-padding"]}]]):it("",!0)]),suffix:Ee(()=>[e.option.subMenu?(K(),Xe(mt,{key:0,src:"Play",source:"remote"})):it("",!0),e.option.isDanger&&o.value?(K(),Ce("div",{key:1,class:z(C.$style["confirm-action"])},[ot((K(),Xe(pt,{variant:["tertiary","icon","danger"],size:"small",onClick:R[0]||(R[0]=on(x=>o.value=!1,["stop","prevent"]))},{default:Ee(()=>[ve(mt,{src:"XMarkSolid",source:"remote"})]),_:1})),[[U(n),{content:"Cancel ",delay:[500,0],contentClass:["extra-padding"]}]]),ot((K(),Xe(pt,{variant:["danger","primary","icon"],size:"small",onClick:on(g,["stop","prevent"])},{default:Ee(()=>[ve(mt,{src:"Check",source:"remote"})]),_:1})),[[U(n),{delay:[500,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):it("",!0)]),default:Ee(()=>[e.option.label?(K(),Ce("span",CK,bt(e.option.label),1)):it("",!0)]),_:1},8,["class","disabled","actived","size","variant"])),[[U(n),{content:e.option.description,contentClass:["extra-padding"],theme:e.option.isDanger?"warning":"arbo",hideOnClick:!1,trigger:"mouseenter focus"}]]),e.option.subMenu?(K(),Ce("div",{key:0,ref_key:"popupRef",ref:c,class:z(C.$style["submenu-container"])},[ve(JP,{layer:i.layer+1,ref:"submenuRef","option-block":[((E=e.option)==null?void 0:E.subMenu)||[]],"is-submenu":!1,onActionExecuted:y},null,8,["layer","option-block"])],2)):it("",!0)],2)}}}),[["__cssModules",{$style:{"option-item":"_option-item_82ug7_1","icon-wrapper":"_icon-wrapper_82ug7_11","confirm-action":"_confirm-action_82ug7_19"}}]]);var Ec=(e=>(e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.TOO_EARLY=425]="TOO_EARLY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e))(Ec||{});const QP=e=>{const t=Y(Number(e.value.value)),n=q(()=>e.value.metricConfig),i=q(()=>{var u,d;const a=e.value.value=="N/A"||e.value.value===null||e.value.value===void 0||String(e.value.value).length===0,l=!!e.value.error,c=n.value.format_type==="icon";return{pendingCalculation:e.value.value=="N/A",isEmpty:a,isError:l,hasPrefix:!a&&!l&&n.value.morpheme_type==="prefix",hasSuffix:!a&&!l&&n.value.morpheme_type==="suffix",isDropdown:n.value.format_type==="dropdown",isFormula:((d=(u=n.value)==null?void 0:u.metric_type)==null?void 0:d.code)==="formula",isLoading:e.value.value===void 0,isRating:c,showActions:e.value.hovered&&!a&&!e.value.disabled&&!c}}),o=14,s=q(()=>({maxRating:n.value.range||5,readOnly:e.value.readOnly,disabled:e.value.disabled,size:o}));return{componentState:i,metricConfig:n,ICON_SIZE:o,ratingParams:s,standardNameforIcon:()=>(n.value.format_symbol||"").split(/[\s-_]+/).map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join("").replace(/Outline|Solid/g,""),internalValue:t}},bK={key:2},e1=Ct(ct({name:"MetricRenderer",__name:"MetricRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean}},emits:["update:value","clear","copy"],setup(e,{emit:t}){const n=Go,i=mn,o=e,s=j0(!1),r=Y(null),a=Y(null),l=q(()=>{var O,A;return{value:o.value,metricConfig:(A=(O=o.params)==null?void 0:O.colDef)==null?void 0:A.context,error:o.error,hovered:!1,readOnly:o.disabled,disabled:o.readOnly}}),{componentState:c,metricConfig:u,ICON_SIZE:d,internalValue:h}=QP(l),f=q(()=>{if(c.value.isError)return"Something went wrong. Review formula, inputs and retry.";if(c.value.pendingCalculation)return"Can’t calculate yet. Complete required fields.";if(c.value.isEmpty)return;const O=F.value,A=u.value.morpheme_type;return A==="prefix"?`${u.value.morpheme_value||""} ${O}`.trim():A==="suffix"?`${O} ${u.value.morpheme_value||""}`.trim():`${O}`}),g=q(()=>{const{format_type:O,format_value:A}=u.value;if(O==="dropdown"&&typeof A=="string"&&A.startsWith("["))try{return JSON.parse(A)}catch{return[]}return[]}),m=q(()=>c.value.isError?"var(--error-color, #d32f2f)":"var(--grey-300)"),y=q(()=>({disabled:o.disabled,error:c.value.isError,inputRef:r,wrapperRef:a,clickable:!0,readOnly:!0,isEmpty:c.value.isEmpty})),{argsMain:b,isHover:S}=or(y),F=q(()=>{if(c.value.isEmpty)return"";if(c.value.pendingCalculation)return"pending";const O=o.value,{format_type:A,format_value:D,mapping:P}=u.value;if(P&&typeof P=="object"&&!Array.isArray(P)){const H=P[`!${O}`];if(H)return H}if(A==="dropdown"){const H=g.value.find(te=>String(te.name)===String(O));if(H)return H.name}if(typeof O=="string"&&Number.isNaN(Number(O)))return O;const V=Number.parseInt(String(D)||"2",10)||2;try{return Number(O).toFixed(V)}catch(H){return console.error("Error formatting metric value:",H),String(O)}}),{copyToClipboard:C,tooltip:R}=gC(F.value);ut(()=>o.value,O=>{const A=Number(O);Number.isFinite(A)&&A!==h.value?h.value=A:O==null&&h.value!==0&&(h.value=0)},{immediate:!0});const x=()=>{o.disabled||(s.value=!0)},k=()=>{o.disabled||(s.value=!1)};return(O,A)=>QV([o.value],()=>ot((K(),Xe(sr,_n(U(b),{onMouseenter:x,style:{"--icon-size":"24px"},onMouseleave:k,ref_key:"wrapperRef",ref:a}),_u({default:Ee(()=>[ot((K(),Ce("div",{class:z(O.$style["metric-wrapper"])},[we("div",{class:z([O.$style["metric-content"],o.disabled?O.$style.disabled:""])},[!U(c).isError&&U(c).isEmpty?(K(),Ce(Ot,{key:0},[U(c).isDropdown?(K(),Xe(mt,{key:0,src:"ChevronDown",source:"remote",size:12,style:{width:"20px"},color:"var(--grey-300)"})):U(c).isFormula?(K(),Xe(mt,{key:1,src:"SquareRootVariable",source:"remote",size:U(d),color:m.value},null,8,["size","color"])):it("",!0),U(c).pendingCalculation?(K(),Ce("span",{key:2,class:z(O.$style["metric-empty"])}," Pending ",2)):U(c).isDropdown?it("",!0):(K(),Ce("span",{key:3,class:z(O.$style["metric-empty"])}," - ",2))],64)):U(c).isFormula?(K(),Xe(mt,{key:1,src:"SquareRootVariable",source:"remote",size:U(d),color:m.value},null,8,["size","color"])):it("",!0),U(c).isError?(K(),Ce("div",bK,"Error")):it("",!0),!U(c).isEmpty&&!U(c).isError?(K(),Ce(Ot,{key:3},[U(c).hasPrefix?(K(),Ce("span",{key:0,class:z([O.$style["metric-morpheme"],O.$style["metric-morpheme--prefix"]])},bt(U(u).morpheme_value),3)):it("",!0),we("span",{class:z([O.$style["metric-value"],U(S)?O.$style.hovered:"",{[O.$style["with-morpheme"]]:U(c).hasPrefix||U(c).hasSuffix,[O.$style["with-formula-icon"]]:U(c).isFormula,[O.$style.disabled]:o.disabled}])},bt(F.value),3),U(c).hasSuffix?(K(),Ce("span",{key:1,class:z([O.$style["metric-morpheme"],O.$style["metric-morpheme--suffix"]])},bt(U(u).morpheme_value),3)):it("",!0)],64)):it("",!0)],2)],2)),[[U(i),{content:f.value,bypassOverflowCheck:!1}]])]),_:2},[U(S)&&!o.disabled?{name:"suffix",fn:Ee(()=>[we("div",{class:z([O.$style.suffix,"wrapper-suffix"])},[U(c).showActions&&!U(c).isEmpty&&!U(c).isError?ot((K(),Xe(pt,{key:0,variant:["icon","secondary"],size:24,onClick:on(U(C),["prevent","stop"])},{default:Ee(()=>[ve(mt,{src:"Copy",source:"remote",size:12})]),_:1},8,["onClick"])),[[U(i),{content:U(R),hideOnClick:!1,contentClass:"extra-padding"}]]):it("",!0)],2)]),key:"0"}:void 0]),1040)),[[U(n),{isLoading:U(c).isLoading}]]),A,0)}}),[["__cssModules",{$style:{"metric-wrapper":"_metric-wrapper_tcd7x_1","metric-content":"_metric-content_tcd7x_5",disabled:"_disabled_tcd7x_15","metric-value":"_metric-value_tcd7x_19",hovered:"_hovered_tcd7x_19","with-morpheme":"_with-morpheme_tcd7x_34","with-formula-icon":"_with-formula-icon_tcd7x_37","metric-value--number":"_metric-value--number_tcd7x_43","metric-value--currency":"_metric-value--currency_tcd7x_43","metric-value--percentage":"_metric-value--percentage_tcd7x_43","metric-morpheme":"_metric-morpheme_tcd7x_47","metric-empty":"_metric-empty_tcd7x_60","metric-icon":"_metric-icon_tcd7x_67"}}]]),SK=Ct(ct({__name:"HeaderSorting",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean},modelValue:{}},emits:["sort-changed","update:modelValue"],setup(e,{emit:t}){const n=mn,i={START_ASC:{value:"start_asc",label:"Soonest to furthest start",id:"start_asc"},START_DESC:{value:"start_desc",label:"Furthest to soonest start",id:"start_desc"},DUE_ASC:{value:"due_asc",label:"Soonest to furthest due",id:"due_asc"},DUE_DESC:{value:"due_desc",label:"Furthest to soonest due",id:"due_desc"}},o={desc:{value:"desc",label:"Newest to oldest",id:"desc"},asc:{value:"asc",label:"Oldest to newest",id:"asc"}},s={asc:{value:"asc",label:"Smallest to largest",id:"asc"},desc:{value:"desc",label:"Largest to smallest",id:"desc"}},r={asc:{value:"asc",label:"Ascending",id:"asc"},desc:{value:"desc",label:"Descending",id:"desc"}},a=e,l={assignees:"default",completedOn:"date",dateRange:"dateRange",id:"number",isArchived:"default",isCompleted:"default",isDeleted:"default",isProcessing:"default",isStarted:"default",lastUpdated:"date",name:"default",status:"default",permissions:"default",options:"default"},c=q(()=>{var O,A;if(a.headerType)return a.headerType;if(((A=(O=a.params)==null?void 0:O.column)==null?void 0:A.getColId()).includes("metric"))return"default";const k=a.headerType??a.params.column.getColId();return l[k]||"default"}),u=q(()=>{var x;return((x=a.params)==null?void 0:x.displayName)??""}),d=q(()=>{let x=[];switch(c.value){case"dateRange":x=Object.values(i).map(k=>({...k,selected:f.value===k.value,type:"text",hover:C.value===k.value}));break;case"date":x=Object.values(o).map(k=>({...k,selected:f.value===k.value,type:"text",hover:C.value===k.value}));break;case"number":x=Object.values(s).map(k=>({...k,selected:f.value===k.value,type:"text",hover:C.value===k.value}));break;default:x=Object.values(r).map(k=>({...k,selected:f.value===k.value,type:"text",hover:C.value===k.value}));break}return f.value!=="none"&&x.push({id:"clear",label:"Clear",value:"none",selected:!1,type:"text",icon:"XMark",hover:C.value=="none"}),x}),h=q(()=>String(f.value).endsWith("asc")?"SortUp":String(f.value).endsWith("desc")?"SortDown":"Sort"),f=Y(a.modelValue??"none"),g=x=>{S("update:modelValue",x),S("sort-changed",x)},m=x=>{f.value=x},y=Wo(()=>{if(c.value==="date"||c.value==="default"||c.value==="number"){let x;f.value==="none"?x="asc":f.value==="asc"?x="desc":x="none",f.value=x}else{const x=[i.START_ASC.value,i.START_DESC.value,i.DUE_ASC.value,i.DUE_DESC.value,"none"],O=(x.indexOf(f.value)+1)%x.length;f.value=x[O]}},300),b=q(()=>{if(f.value==="none")return"No sorting applied";const x=d.value.find(k=>k.value===f.value);return(x==null?void 0:x.label)||""}),S=t,F=q(()=>{if(a.disabled&&!a.readOnly)return"var(--disabled-color)";if(f.value!=="none")return"var(--primary-color-hover)"});ut(()=>a.modelValue,x=>{x!=f.value&&(f.value=x)}),ut(f,x=>{x!==a.modelValue&&g(x)});const C=Y(f.value);ut(()=>f.value,x=>{C.value=x});const R=x=>{var D,P;if(a.readOnly||a.disabled)return;let k=0;x.key==="ArrowDown"?k=1:x.key==="ArrowUp"&&(k=-1);const O=d.value.findIndex(V=>V.value===C.value),A=d.value.length;if(x.key==="Enter"||x.key===" ")x.preventDefault(),f.value=C.value,(D=E.value)==null||D.hide();else if(k!==0){x.preventDefault();let V=(O+k+A)%A;C.value=d.value[V].value}else x.key==="Escape"&&((P=E.value)==null||P.hide())},E=Y(null);return Sn(()=>{var x,k;(k=(x=E.value)==null?void 0:x.$el)==null||k.addEventListener("keydown",R)}),Vl(()=>{var x,k;(k=(x=E.value)==null?void 0:x.$el)==null||k.removeEventListener("keydown",R)}),(x,k)=>(K(),Xe(tw,{ref_key:"dropdownRef",ref:E,options:d.value,label:u.value,readOnly:a.readOnly,disabled:a.disabled,variant:["icon","tertiary"],size:"small",onHandleClick:U(y),onSelect:k[0]||(k[0]=O=>m(O))},{prefix:Ee(()=>[ve(pt,{variant:["text"],onClick:U(y),label:u.value,size:"small"},null,8,["onClick","label"])]),iconDropdown:Ee(()=>[ot(ve(mt,{src:h.value,source:"remote",color:F.value},null,8,["src","color"]),[[U(n),b.value]])]),_:1},8,["options","label","readOnly","disabled","onHandleClick"]))}}),[["__cssModules",{$style:{iconSorting:"_iconSorting_18bqx_1","button-group":"_button-group_18bqx_7","ab-table-button":"_ab-table-button_18bqx_18","button-main":"_button-main_18bqx_24","button-dropdown-trigger":"_button-dropdown-trigger_18bqx_29",headerSorting:"_headerSorting_18bqx_39"}}]]),EK=["disabled","readonly","checked","indeterminate"],nw=Ct(ct({__name:"Checkbox",props:{modelValue:{type:[Number,Boolean]},disabled:{type:Boolean},readOnly:{type:Boolean},tooltipText:{},allowIndeterminate:{type:Boolean},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=mn,i=e,o=t,s=q(()=>i.allowIndeterminate?[0,1,2]:[0,2]),r=q(()=>{if(typeof i.tooltipText=="string"||!i.tooltipText)return i.tooltipText||"";switch(l.value){case 0:return i.tooltipText.unchecked;case 1:return i.tooltipText.indeterminate;case 2:return i.tooltipText.checked;default:return""}}),a=()=>{if(u.value)return;const h=(s.value.indexOf(l.value)+1)%s.value.length;l.value=s.value[h]},l=Y(typeof i.modelValue=="boolean"?i.modelValue?2:0:i.modelValue),c=q(()=>({checked:l.value===2,indeterminate:l.value===1,none:l.value===0})),u=q(()=>i.disabled||i.readOnly);return ut(()=>l.value,d=>{o("update:modelValue",d===2)}),(d,h)=>ot((K(),Ce("input",{disabled:i.disabled,key:l.value,readonly:i.readOnly,type:"checkbox",class:z([d.$style["input-checkbox"],d.$style[i.size||"medium"]]),checked:c.value.checked,indeterminate:c.value.indeterminate,onChange:a,"aria-label":"Select All Items"},null,42,EK)),[[U(n),{content:r.value,hideOnClick:!1,contentClass:"extra-padding"}]])}}),[["__cssModules",{$style:{small:"_small_p7d2l_68",large:"_large_p7d2l_72",medium:"_medium_p7d2l_76"}}]]),RK=Ct(ct({name:"HeaderCheckbox",__name:"HeaderCheckbox",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=e,n=mn,i=ZC(),{setSelectionStatus:o}=i,{rowCount:s}=ys(i),r=Y(0);ut(r,S=>{o(r.value)},{immediate:!0});const a=q(()=>r.value!==0),l=q(()=>({checked:r.value===2,indeterminate:r.value===1,UNCHECK:r.value===0})),c=q(()=>({0:"Click to select check visible items",1:"Click to select All",2:"Click to clear selection"})[r.value]),u=q(()=>{const S=[{label:"All visible",value:"INDETERMINATE",type:"text",clickable:!0,selected:r.value===1,id:"indeterminate"},{label:"All",value:"CHECKED",type:"text",clickable:!0,selected:r.value===2,id:"checked"}];return a.value&&S.push({label:"None",value:"UNCHECK",type:"text",clickable:!0,selected:r.value===0,id:"uncheck"}),S}),d=S=>({selected:S.getSelectedRows().length,total:s.value.total,loaded:s.value.loaded}),h=({api:S,state:F})=>{r.value=F,F===0?S==null||S.deselectAll():S==null||S.forEachNode(C=>C.setSelected(!0))},f=()=>{var C;const S=(C=t.params)==null?void 0:C.api;S||console.error("[HeaderCheckbox] There is no API available"),h({api:S,state:{0:1,1:2,2:0}[r.value]})},g=S=>{var R;const F=(R=t.params)==null?void 0:R.api;F||console.error("no api"),h({api:F,state:{INDETERMINATE:1,CHECKED:2,UNCHECK:0}[S]})},m=Wo(S=>{const{selected:F,total:C}=d(S);F===0?r.value=0:F===C?r.value=2:r.value=1},300);let y=[];Sn(()=>{var R;const S=(R=t.params)==null?void 0:R.api;if(!S)return;const F=E=>m(E.api),C=()=>m(S);S.addEventListener("selectionChanged",F),S.addEventListener("rowDataUpdated",C),S.addEventListener("modelUpdated",C),y=[()=>S.removeEventListener("selectionChanged",F),()=>S.removeEventListener("rowDataUpdated",C),()=>S.removeEventListener("modelUpdated",C)]}),qn(()=>{y.forEach(S=>S())});const b=`header-checkbox-${Math.random().toString(36).substr(2,9)}`;return(S,F)=>(K(),Xe(tw,{options:u.value,size:24,disabled:t.disabled,readOnly:t.readOnly,variant:["icon","tertiary"],placement:"bottom-start",onSelect:g},{prefix:Ee(()=>[ot((K(),Xe(nw,{id:b,disabled:t.disabled,key:r.value,readonly:t.readOnly,type:"checkbox",checked:l.value.checked,indeterminate:l.value.indeterminate,modelValue:r.value,"onUpdate:modelValue":F[0]||(F[0]=C=>r.value=C),onChange:f,"aria-label":"Select CHECKED Items",class:z(S.$style["ag-checkbox-input"])},null,8,["disabled","readonly","checked","indeterminate","modelValue","class"])),[[U(n),{content:c.value,hideOnClick:!1,contentClass:"extra-padding"}]])]),_:1},8,["options","disabled","readOnly"]))}}),[["__cssModules",{$style:{"ag-checkbox-input":"_ag-checkbox-input_1efbt_1","button-group":"_button-group_1efbt_46","button-main":"_button-main_1efbt_46",headerCheckbox:"_headerCheckbox_1efbt_50"}}]]),DK={key:1},_K=Ct(ct({name:"StatusRenderer",__name:"StatusRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=Go,n=mn,i=e,{isEditing:o}=KC(i),s=Y(null),r=Y(null),a=q(()=>i.value),l=q(()=>a.value===void 0),c=q(()=>{var f;return((f=a.value)==null?void 0:f.name)||"No status"}),u=q(()=>{var g;const f=(g=a.value)==null?void 0:g.color;return{backgroundColor:gy(f)?f:"#fff",border:my(f,"white")?"1px solid #ccc":"1px solid #fff"}}),d=q(()=>{var f;return{disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:I3((f=a.value)==null?void 0:f.label),inputRef:s,wrapperRef:r,clickable:!i.disabled&&!i.readOnly,active:o}}),{argsMain:h}=or(d);return(f,g)=>ot((K(),Xe(U(sr),_n(U(h),{ref_key:"wrapperRef",ref:r}),{default:Ee(()=>[l.value?it("",!0):(K(),Ce("div",{key:0,class:z(f.$style["status-renderer"])},[a.value?(K(),Ce(Ot,{key:0},[we("div",{class:z(f.$style["status-renderer__color-code"]),style:gn(u.value)},null,6),ot((K(),Ce("div",{class:z(f.$style["status-renderer__status-name"])},[dt(bt(c.value),1)],2)),[[U(n),{content:c.value}]])],64)):l.value?it("",!0):(K(),Ce("div",DK,"No status"))],2))]),_:1},16)),[[U(t),{isLoading:l.value}]])}}),[["__cssModules",{$style:{"status-renderer":"_status-renderer_ui0ga_1","status-renderer__color-code":"_status-renderer__color-code_ui0ga_10","status-renderer__status-name":"_status-renderer__status-name_ui0ga_20"}}]]),xK=["width","height","viewBox"],FK=["d"],TK="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",PK=ct({__name:"RatingComponent",props:{params:{default:()=>({maxRating:5,readOnly:!1,disabled:!1})},modelValue:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","change"],setup(e,{emit:t}){const n=e,i=t,o=Y(n.modelValue??0),s=q(()=>{var b;return((b=n.params)==null?void 0:b.size)??40}),r=q(()=>{var b;return((b=n.params)==null?void 0:b.iconViewBox)??"0 0 24 24"}),a=q(()=>{var b;return((b=n.params)==null?void 0:b.iconPath)??TK}),l=q(()=>{var b;return((b=n.params)==null?void 0:b.wrapperTag)??"span"}),c=q(()=>{var b;return n.disabled||((b=n.params)==null?void 0:b.disabled)||!1}),u=q(()=>{var b;return n.readOnly||((b=n.params)==null?void 0:b.readOnly)||!1}),d=q(()=>!c.value&&!u.value),h=q(()=>c.value?"not-allowed":u.value?"default":"pointer");ut(()=>n.modelValue,b=>{typeof b=="number"&&b!==o.value&&(o.value=b)});const f=b=>{var S;return((S=n.params)==null?void 0:S.maxRating)-b+1<=o.value},g=b=>{d.value&&y(b)},m=b=>{d.value&&y(b)},y=b=>{var F,C;if(!d.value)return;const S=((F=n.params)==null?void 0:F.maxRating)-b+1;o.value=S,i("update:modelValue",S),i("update",S),i("change",S),(C=n.params)!=null&&C.onUpdate&&n.params.onUpdate(S)};return(b,S)=>(K(),Ce("div",{class:z(["rating-component",{"rating-component--disabled":c.value,"rating-component--readOnly":u.value}])},[(K(!0),Ce(Ot,null,Un(e.params.maxRating,F=>(K(),Xe(XN(l.value),{key:F,class:z(["rating-item",{filled:f(F),"rating-item--disabled":c.value,"rating-item--readOnly":u.value}]),style:gn({cursor:h.value,order:e.params.maxRating-F,height:s.value+"px",width:s.value+"px"}),"aria-checked":f(F),"aria-disabled":c.value,"aria-readOnly":u.value,tabindex:c.value?-1:0,onClick:on(C=>g(F),["prevent","stop"]),onKeyup:[AR(on(C=>m(F),["prevent"]),["enter"]),AR(on(C=>m(F),["prevent"]),["space"])]},{default:Ee(()=>[_t(b.$slots,"icon",{index:F,filled:f(F),size:s.value,iconViewBox:r.value,disabled:c.value,readOnly:u.value},()=>[(K(),Ce("svg",{class:"rating-icon",width:s.value,height:s.value,viewBox:r.value,"aria-hidden":"true",focusable:"false"},[we("path",{d:a.value},null,8,FK)],8,xK))]),_t(b.$slots,"overlay",{index:F,filled:f(F),disabled:c.value,readOnly:u.value})]),_:2},1064,["class","style","aria-checked","aria-disabled","aria-readOnly","tabindex","onClick","onKeyup"]))),128))],2))}}),t1=Ct(ct({__name:"PopupLayout",props:{popupName:{},showOverlay:{type:Boolean,default:!0},overlayOpacity:{default:.5},closeOnOverlayClick:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0}},emits:["shown","hidden"],setup(e,{expose:t,emit:n}){const i=e,{popupRef:o,show:s,hide:r,isVisible:a}=r5({useTrigger:!1,arrow:!1,centered:!0,showOverlay:i.showOverlay,overlayOpacity:i.overlayOpacity,closeOnOverlayClick:i.closeOnOverlayClick,appendTo(u){return document.body}}),l=u=>{i.closeOnEscape&&u.key==="Escape"&&a.value&&r()};Sn(()=>{document.addEventListener("keydown",l)}),qn(()=>{document.removeEventListener("keydown",l)}),t({show:s,hide:r,isVisible:a});const c=n;return ut(()=>a.value,u=>{c(u?"shown":"hidden")}),(u,d)=>{const h=df("tooltip");return K(),Ce("div",{ref_key:"popupRef",ref:o,class:z(u.$style.popupContainer)},[we("div",{class:z(u.$style.popupWrapper)},[we("div",{class:z(u.$style.header)},[we("span",{class:z(u.$style["header-title"])},bt(e.popupName),3),ot((K(),Xe(pt,{style:{position:"absolute",top:"0",right:"0"},variant:"text",onClick:U(r),"aria-label":"Close popup"},{default:Ee(()=>[ve(mt,{src:"Xmark"})]),_:1},8,["onClick"])),[[h,"Close"]])],2),we("div",{class:z(u.$style.body)},[_t(u.$slots,"default")],2),we("div",{class:z(u.$style.footer)},[_t(u.$slots,"footer")],2)],2)],2)}}}),[["__cssModules",{$style:{popupContainer:"_popupContainer_1cwaa_1",popupWrapper:"_popupWrapper_1cwaa_5",popupFadeIn:"_popupFadeIn_1cwaa_1",header:"_header_1cwaa_19","header-title":"_header-title_1cwaa_28",body:"_body_1cwaa_38",footer:"_footer_1cwaa_43"}}]]),IK={list_cursor:{error:"Failed to fetch data. Please reload table."},assignedUser:{error:"Failed to fetch assignees. Please reload table."},metricValues:{error:"Failed to fetch metric values. Please reload table."},assignableUser:{error:"Failed to fetch people. Please try again."},assignableStatus:{error:"Failed to fetch statuses. Please try again."},basicInfor:{error:"Failed to fetch data. Please try again."},item:{error:"Update failed. Please try again."},removeAssignee:{error:"Update failed. Please try again."},createNewScene:{error:"Creation failed. Please try again."},metricList:{error:"Failed to fetch metrics. Please try again."},multipleAssignableUser:{error:"Failed to fetch data. Please reload table."},getPermission:{error:"Failed to fetch permissions."},delete_rendition:{success:"Deletion successful.",error:"Deletion failed. Please try again."},delete_thumbnail:{success:"Deletion successful.",error:"Deletion failed. Please try again."},archive_item:{success:"Archive successful.",error:"Archive failed. Please try again."},unarchive_item:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},bulkDelete:{success:"Deletion successful.",error:"Deletion failed. Please try again."},bulkArchive:{success:"Archive successful.",error:"Archive failed. Please try again."},bulkDateUpdate:{error:"Failed to update items."},bulkAssignUpdate:{error:"Failed to update assignees."},bulkStatusUpdate:{error:"Failed to update items."},getUserPermission:{error:"Failed to fetch user permissions."},getEntityDetail:{error:"Failed to fetch entity details."},bulkUnarchive:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},downloadTemplate:{},importItems:{},exportItems:{},updateFromFile:{},getStatuses:{},me:{},workspaces:{}},Rd=Sc("toast",()=>{const e=Y([]),t=(o,s)=>{const r=IK[o];if(r){const a=r[s];if(a){n({id:o,type:s,message:a});return}}else n({id:o,type:s,message:o})},n=(o,s=5e3)=>{const r={...o,id:o.id??Date.now()+Math.random()};e.value.push(r),setTimeout(()=>{i(r.id)},s)};function i(o){e.value=e.value.filter(s=>s.id!==o)}return{notifications:e,addNotification:n,removeNotification:i,showMessage:t}}),AK=["innerHTML"],kK=Ct(ct({__name:"Snackbar",setup(e){const t=HB,n=Rd(),{removeNotification:i}=n,{notifications:o}=ys(n),s=c=>c.trim().startsWith("<svg"),r=Y("Copy to clipboard"),a=()=>{setTimeout(()=>{r.value="Copy to clipboard"},1e3)},l=c=>{navigator.clipboard.writeText(c).then(()=>{r.value="Copied!",a()},()=>{r.value="Copy failed",a()})};return(c,u)=>{const d=df("tooltip");return K(),Xe(EB,{name:"list",tag:"div",class:z(c.$style["notification-wrapper"])},{default:Ee(()=>[(K(!0),Ce(Ot,null,Un(U(o),h=>{var f;return ot((K(),Ce("div",{key:h.id,class:z([c.$style["notification-item"],c.$style[`notification--${h.type||"info"}`],!(h!=null&&h.actions)||((f=h==null?void 0:h.actions)==null?void 0:f.length)==0?c.$style["snackbar-type"]:""])},[we("p",{class:z(c.$style.snackbar__message)},[h.icon&&!s(h.icon)?(K(),Xe(mt,{key:0,src:h.icon,source:"remote"},null,8,["src"])):it("",!0),h.icon&&s(h.icon)?(K(),Ce("i",{key:1,class:z(c.$style["icon-draw"]),innerHTML:h.icon},null,10,AK)):it("",!0),ot((K(),Ce("span",{class:z(c.$style["error-message"])},[dt(bt(h.message),1)],2)),[[d,{content:h.message}]])],2),h.actions?(K(),Ce("div",{key:0,class:z(c.$style["actions-notification"])},[(K(!0),Ce(Ot,null,Un(h.actions,g=>(K(),Xe(pt,_n({key:g.label},{ref_for:!0},g,{onClick:g.action}),{prefix:Ee(()=>[g.btnIcon?(K(),Xe(mt,{key:0,src:g.btnIcon,source:"remote",color:"white"},null,8,["src"])):it("",!0)]),_:2},1040,["onClick"]))),128))],2)):it("",!0),h.type=="error"?ot((K(),Xe(pt,{key:1,variant:"tertiary",onClick:g=>l(h.message)},{prefix:Ee(()=>[ve(mt,{src:"Copy",source:"remote",color:"white"})]),_:1},8,["onClick"])),[[d,r.value]]):it("",!0),ve(pt,{variant:"tertiary",onClick:g=>U(i)(h.id),class:z(c.$style["close-btn"]),size:18},{default:Ee(()=>[ve(mt,{src:"Xmark",color:"var(--icon-color)"})]),_:1},8,["onClick","class"])],2)),[[U(t)]])}),128))]),_:1},8,["class"])}}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_1tunr_1","notification-item":"_notification-item_1tunr_16","notification--success":"_notification--success_1tunr_30","notification--error":"_notification--error_1tunr_33","close-btn":"_close-btn_1tunr_37","notification--info":"_notification--info_1tunr_40","notification--warning":"_notification--warning_1tunr_47","notification--interactive":"_notification--interactive_1tunr_54","snackbar-type":"_snackbar-type_1tunr_60",snackbar__message:"_snackbar__message_1tunr_68","error-message":"_error-message_1tunr_80","actions-notification":"_actions-notification_1tunr_89"}}]]);/*!
88
88
  * vue-draggable-next v2.3.0
89
89
  * (c) 2025 Anish George
90
90
  * @license MIT
@@ -93,7 +93,7 @@ This will fail in production.`);r=qa,r._s.has(e)||(o?UC(e,t,i,r):HP(e,i,r),M.env
93
93
  * @author RubaXa <trash@rubaxa.org>
94
94
  * @author owenm <owen23355@gmail.com>
95
95
  * @license MIT
96
- */function o1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function Cs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o1(Object(n),!0).forEach(function(i){VK(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o1(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Gp(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gp=function(t){return typeof t}:Gp=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gp(e)}function VK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rr(){return rr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},rr.apply(this,arguments)}function BK(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,s;for(s=0;s<i.length;s++)o=i[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function HK(e,t){if(e==null)return{};var n=BK(e,t),i,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)i=s[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var GK="1.14.0";function ar(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var lr=ar(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Dd=ar(/Edge/i),s1=ar(/firefox/i),_d=ar(/safari/i)&&!ar(/chrome/i)&&!ar(/android/i),r1=ar(/iP(ad|od|hone)/i),$K=ar(/chrome/i)&&ar(/android/i),a1={capture:!1,passive:!1};function Kt(e,t,n){e.addEventListener(t,n,!lr&&a1)}function Wt(e,t,n){e.removeEventListener(t,n,!lr&&a1)}function $p(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function WK(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ws(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&$p(e,t):$p(e,t))||i&&e===n)return e;if(e===n)break}while(e=WK(e))}return null}var l1=/\s+/g;function Ji(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(l1," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(l1," ")}}function Et(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function Rc(e,t){var n="";if(typeof e=="string")n=e;else do{var i=Et(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function c1(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,s=i.length;if(n)for(;o<s;o++)n(i[o],o);return i}return[]}function bs(){var e=document.scrollingElement;return e||document.documentElement}function jn(e,t,n,i,o){if(!(!e.getBoundingClientRect&&e!==window)){var s,r,a,l,c,u,d;if(e!==window&&e.parentNode&&e!==bs()?(s=e.getBoundingClientRect(),r=s.top,a=s.left,l=s.bottom,c=s.right,u=s.height,d=s.width):(r=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!lr))do if(o&&o.getBoundingClientRect&&(Et(o,"transform")!=="none"||n&&Et(o,"position")!=="static")){var h=o.getBoundingClientRect();r-=h.top+parseInt(Et(o,"border-top-width")),a-=h.left+parseInt(Et(o,"border-left-width")),l=r+s.height,c=a+s.width;break}while(o=o.parentNode);if(i&&e!==window){var f=Rc(o||e),g=f&&f.a,m=f&&f.d;f&&(r/=m,a/=g,d/=g,u/=m,l=r+u,c=a+d)}return{top:r,left:a,bottom:l,right:c,width:d,height:u}}}function u1(e,t,n){for(var i=Wr(e,!0),o=jn(e)[t];i;){var s=jn(i)[n],r=void 0;if(r=o>=s,!r)return i;if(i===bs())break;i=Wr(i,!1)}return!1}function Dc(e,t,n,i){for(var o=0,s=0,r=e.children;s<r.length;){if(r[s].style.display!=="none"&&r[s]!==Rt.ghost&&(i||r[s]!==Rt.dragged)&&ws(r[s],n.draggable,e,!1)){if(o===t)return r[s];o++}s++}return null}function ow(e,t){for(var n=e.lastElementChild;n&&(n===Rt.ghost||Et(n,"display")==="none"||t&&!$p(n,t));)n=n.previousElementSibling;return n||null}function So(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==Rt.clone&&(!t||$p(e,t))&&n++;return n}function d1(e){var t=0,n=0,i=bs();if(e)do{var o=Rc(e),s=o.a,r=o.d;t+=e.scrollLeft*s,n+=e.scrollTop*r}while(e!==i&&(e=e.parentNode));return[t,n]}function UK(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function Wr(e,t){if(!e||!e.getBoundingClientRect)return bs();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Et(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return bs();if(i||t)return n;i=!0}}while(n=n.parentNode);return bs()}function zK(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function sw(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var xd;function h1(e,t){return function(){if(!xd){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),xd=setTimeout(function(){xd=void 0},t)}}}function jK(){clearTimeout(xd),xd=void 0}function f1(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function p1(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var Qi="Sortable"+new Date().getTime();function KK(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(o){if(!(Et(o,"display")==="none"||o===Rt.ghost)){e.push({target:o,rect:jn(o)});var s=Cs({},e[e.length-1].rect);if(o.thisAnimationDuration){var r=Rc(o,!0);r&&(s.top-=r.f,s.left-=r.e)}o.fromRect=s}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(UK(e,{target:i}),1)},animateAll:function(i){var o=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var s=!1,r=0;e.forEach(function(a){var l=0,c=a.target,u=c.fromRect,d=jn(c),h=c.prevFromRect,f=c.prevToRect,g=a.rect,m=Rc(c,!0);m&&(d.top-=m.f,d.left-=m.e),c.toRect=d,c.thisAnimationDuration&&sw(h,d)&&!sw(u,d)&&(g.top-d.top)/(g.left-d.left)===(u.top-d.top)/(u.left-d.left)&&(l=YK(g,h,f,o.options)),sw(d,u)||(c.prevFromRect=u,c.prevToRect=d,l||(l=o.options.animation),o.animate(c,g,d,l)),l&&(s=!0,r=Math.max(r,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(t),s?t=setTimeout(function(){typeof i=="function"&&i()},r):typeof i=="function"&&i(),e=[]},animate:function(i,o,s,r){if(r){Et(i,"transition",""),Et(i,"transform","");var a=Rc(this.el),l=a&&a.a,c=a&&a.d,u=(o.left-s.left)/(l||1),d=(o.top-s.top)/(c||1);i.animatingX=!!u,i.animatingY=!!d,Et(i,"transform","translate3d("+u+"px,"+d+"px,0)"),this.forRepaintDummy=qK(i),Et(i,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Et(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){Et(i,"transition",""),Et(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},r)}}}}function qK(e){return e.offsetWidth}function YK(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var _c=[],rw={initializeByDefault:!0},Fd={mount:function(t){for(var n in rw)rw.hasOwnProperty(n)&&!(n in t)&&(t[n]=rw[n]);_c.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),_c.push(t)},pluginEvent:function(t,n,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var s=t+"Global";_c.forEach(function(r){n[r.pluginName]&&(n[r.pluginName][s]&&n[r.pluginName][s](Cs({sortable:n},i)),n.options[r.pluginName]&&n[r.pluginName][t]&&n[r.pluginName][t](Cs({sortable:n},i)))})},initializePlugins:function(t,n,i,o){_c.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var c=new a(t,n,t.options);c.sortable=t,c.options=t.options,t[l]=c,rr(i,c.defaults)}});for(var s in t.options)if(t.options.hasOwnProperty(s)){var r=this.modifyOption(t,s,t.options[s]);typeof r<"u"&&(t.options[s]=r)}},getEventProperties:function(t,n){var i={};return _c.forEach(function(o){typeof o.eventProperties=="function"&&rr(i,o.eventProperties.call(n[o.pluginName],t))}),i},modifyOption:function(t,n,i){var o;return _c.forEach(function(s){t[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[n]=="function"&&(o=s.optionListeners[n].call(t[s.pluginName],i))}),o}};function ZK(e){var t=e.sortable,n=e.rootEl,i=e.name,o=e.targetEl,s=e.cloneEl,r=e.toEl,a=e.fromEl,l=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,g=e.extraEventProperties;if(t=t||n&&n[Qi],!!t){var m,y=t.options,b="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!lr&&!Dd?m=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(i,!0,!0)),m.to=r||n,m.from=a||n,m.item=o||n,m.clone=s,m.oldIndex=l,m.newIndex=c,m.oldDraggableIndex=u,m.newDraggableIndex=d,m.originalEvent=h,m.pullMode=f?f.lastPutMode:void 0;var S=Cs(Cs({},g),Fd.getEventProperties(i,t));for(var F in S)m[F]=S[F];n&&n.dispatchEvent(m),y[b]&&y[b].call(t,m)}}var XK=["evt"],Ni=function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,s=HK(i,XK);Fd.pluginEvent.bind(Rt)(t,n,Cs({dragEl:Ye,parentEl:Tn,ghostEl:Pt,rootEl:vn,nextEl:Ja,lastDownEl:Wp,cloneEl:Pn,cloneHidden:Ur,dragStarted:Pd,putSortable:ni,activeSortable:Rt.active,originalEvent:o,oldIndex:xc,oldDraggableIndex:Td,newIndex:eo,newDraggableIndex:zr,hideGhostForTarget:b1,unhideGhostForTarget:S1,cloneNowHidden:function(){Ur=!0},cloneNowShown:function(){Ur=!1},dispatchSortableEvent:function(a){Fi({sortable:n,name:a,originalEvent:o})}},s))};function Fi(e){ZK(Cs({putSortable:ni,cloneEl:Pn,targetEl:Ye,rootEl:vn,oldIndex:xc,oldDraggableIndex:Td,newIndex:eo,newDraggableIndex:zr},e))}var Ye,Tn,Pt,vn,Ja,Wp,Pn,Ur,xc,eo,Td,zr,Up,ni,Fc=!1,zp=!1,jp=[],Qa,Yo,aw,lw,g1,m1,Pd,Tc,Id,Ad=!1,Kp=!1,qp,hi,cw=[],uw=!1,Yp=[],Zp=typeof document<"u",Xp=r1,v1=Dd||lr?"cssFloat":"float",JK=Zp&&!$K&&!r1&&"draggable"in document.createElement("div"),y1=function(){if(Zp){if(lr)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),C1=function(t,n){var i=Et(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),s=Dc(t,0,n),r=Dc(t,1,n),a=s&&Et(s),l=r&&Et(r),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+jn(s).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+jn(r).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||c>=o&&i[v1]==="none"||r&&i[v1]==="none"&&c+u>o)?"vertical":"horizontal"},QK=function(t,n,i){var o=i?t.left:t.top,s=i?t.right:t.bottom,r=i?t.width:t.height,a=i?n.left:n.top,l=i?n.right:n.bottom,c=i?n.width:n.height;return o===a||s===l||o+r/2===a+c/2},e7=function(t,n){var i;return jp.some(function(o){var s=o[Qi].options.emptyInsertThreshold;if(!(!s||ow(o))){var r=jn(o),a=t>=r.left-s&&t<=r.right+s,l=n>=r.top-s&&n<=r.bottom+s;if(a&&l)return i=o}}),i},w1=function(t){function n(s,r){return function(a,l,c,u){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(s==null&&(r||d))return!0;if(s==null||s===!1)return!1;if(r&&s==="clone")return s;if(typeof s=="function")return n(s(a,l,c,u),r)(a,l,c,u);var h=(r?a:l).options.group.name;return s===!0||typeof s=="string"&&s===h||s.join&&s.indexOf(h)>-1}}var i={},o=t.group;(!o||Gp(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=n(o.pull,!0),i.checkPut=n(o.put),i.revertClone=o.revertClone,t.group=i},b1=function(){!y1&&Pt&&Et(Pt,"display","none")},S1=function(){!y1&&Pt&&Et(Pt,"display","")};Zp&&document.addEventListener("click",function(e){if(zp)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),zp=!1,!1},!0);var el=function(t){if(Ye){t=t.touches?t.touches[0]:t;var n=e7(t.clientX,t.clientY);if(n){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[Qi]._onDragOver(i)}}},t7=function(t){Ye&&Ye.parentNode[Qi]._isOutsideThisEl(t.target)};function Rt(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=rr({},t),e[Qi]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return C1(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,a){r.setData("Text",a.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:Rt.supportPointer!==!1&&"PointerEvent"in window&&!_d,emptyInsertThreshold:5};Fd.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);w1(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:JK,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Kt(e,"pointerdown",this._onTapStart):(Kt(e,"mousedown",this._onTapStart),Kt(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Kt(e,"dragover",this),Kt(e,"dragenter",this)),jp.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),rr(this,KK())}Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Tc=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,Ye):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,o=this.options,s=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=o.filter;if(c7(i),!Ye&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||o.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&_d&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=ws(l,o.draggable,i,!1),!(l&&l.animated)&&Wp!==l)){if(xc=So(l),Td=So(l,o.draggable),typeof u=="function"){if(u.call(this,t,l,this)){Fi({sortable:n,rootEl:c,name:"filter",targetEl:l,toEl:i,fromEl:i}),Ni("filter",n,{evt:t}),s&&t.cancelable&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(d){if(d=ws(c,d.trim(),i,!1),d)return Fi({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:i,toEl:i}),Ni("filter",n,{evt:t}),!0}),u)){s&&t.cancelable&&t.preventDefault();return}o.handle&&!ws(c,o.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,n,i){var o=this,s=o.el,r=o.options,a=s.ownerDocument,l;if(i&&!Ye&&i.parentNode===s){var c=jn(i);if(vn=s,Ye=i,Tn=Ye.parentNode,Ja=Ye.nextSibling,Wp=i,Up=r.group,Rt.dragged=Ye,Qa={target:Ye,clientX:(n||t).clientX,clientY:(n||t).clientY},g1=Qa.clientX-c.left,m1=Qa.clientY-c.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Ye.style["will-change"]="all",l=function(){if(Ni("delayEnded",o,{evt:t}),Rt.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!s1&&o.nativeDraggable&&(Ye.draggable=!0),o._triggerDragStart(t,n),Fi({sortable:o,name:"choose",originalEvent:t}),Ji(Ye,r.chosenClass,!0)},r.ignore.split(",").forEach(function(u){c1(Ye,u.trim(),dw)}),Kt(a,"dragover",el),Kt(a,"mousemove",el),Kt(a,"touchmove",el),Kt(a,"mouseup",o._onDrop),Kt(a,"touchend",o._onDrop),Kt(a,"touchcancel",o._onDrop),s1&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ye.draggable=!0),Ni("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Dd||lr))){if(Rt.eventCanceled){this._onDrop();return}Kt(a,"mouseup",o._disableDelayedDrag),Kt(a,"touchend",o._disableDelayedDrag),Kt(a,"touchcancel",o._disableDelayedDrag),Kt(a,"mousemove",o._delayedDragTouchMoveHandler),Kt(a,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&Kt(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ye&&dw(Ye),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Wt(t,"mouseup",this._disableDelayedDrag),Wt(t,"touchend",this._disableDelayedDrag),Wt(t,"touchcancel",this._disableDelayedDrag),Wt(t,"mousemove",this._delayedDragTouchMoveHandler),Wt(t,"touchmove",this._delayedDragTouchMoveHandler),Wt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?Kt(document,"pointermove",this._onTouchMove):n?Kt(document,"touchmove",this._onTouchMove):Kt(document,"mousemove",this._onTouchMove):(Kt(Ye,"dragend",this),Kt(vn,"dragstart",this._onDragStart));try{document.selection?Qp(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Fc=!1,vn&&Ye){Ni("dragStarted",this,{evt:n}),this.nativeDraggable&&Kt(document,"dragover",t7);var i=this.options;!t&&Ji(Ye,i.dragClass,!1),Ji(Ye,i.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),Fi({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Yo){this._lastX=Yo.clientX,this._lastY=Yo.clientY,b1();for(var t=document.elementFromPoint(Yo.clientX,Yo.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Yo.clientX,Yo.clientY),t!==n);)n=t;if(Ye.parentNode[Qi]._isOutsideThisEl(t),n)do{if(n[Qi]){var i=void 0;if(i=n[Qi]._onDragOver({clientX:Yo.clientX,clientY:Yo.clientY,target:t,rootEl:n}),i&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);S1()}},_onTouchMove:function(t){if(Qa){var n=this.options,i=n.fallbackTolerance,o=n.fallbackOffset,s=t.touches?t.touches[0]:t,r=Pt&&Rc(Pt,!0),a=Pt&&r&&r.a,l=Pt&&r&&r.d,c=Xp&&hi&&d1(hi),u=(s.clientX-Qa.clientX+o.x)/(a||1)+(c?c[0]-cw[0]:0)/(a||1),d=(s.clientY-Qa.clientY+o.y)/(l||1)+(c?c[1]-cw[1]:0)/(l||1);if(!Rt.active&&!Fc){if(i&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(Pt){r?(r.e+=u-(aw||0),r.f+=d-(lw||0)):r={a:1,b:0,c:0,d:1,e:u,f:d};var h="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Et(Pt,"webkitTransform",h),Et(Pt,"mozTransform",h),Et(Pt,"msTransform",h),Et(Pt,"transform",h),aw=u,lw=d,Yo=s}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Pt){var t=this.options.fallbackOnBody?document.body:vn,n=jn(Ye,!0,Xp,!0,t),i=this.options;if(Xp){for(hi=t;Et(hi,"position")==="static"&&Et(hi,"transform")==="none"&&hi!==document;)hi=hi.parentNode;hi!==document.body&&hi!==document.documentElement?(hi===document&&(hi=bs()),n.top+=hi.scrollTop,n.left+=hi.scrollLeft):hi=bs(),cw=d1(hi)}Pt=Ye.cloneNode(!0),Ji(Pt,i.ghostClass,!1),Ji(Pt,i.fallbackClass,!0),Ji(Pt,i.dragClass,!0),Et(Pt,"transition",""),Et(Pt,"transform",""),Et(Pt,"box-sizing","border-box"),Et(Pt,"margin",0),Et(Pt,"top",n.top),Et(Pt,"left",n.left),Et(Pt,"width",n.width),Et(Pt,"height",n.height),Et(Pt,"opacity","0.8"),Et(Pt,"position",Xp?"absolute":"fixed"),Et(Pt,"zIndex","100000"),Et(Pt,"pointerEvents","none"),Rt.ghost=Pt,t.appendChild(Pt),Et(Pt,"transform-origin",g1/parseInt(Pt.style.width)*100+"% "+m1/parseInt(Pt.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,o=t.dataTransfer,s=i.options;if(Ni("dragStart",this,{evt:t}),Rt.eventCanceled){this._onDrop();return}Ni("setupClone",this),Rt.eventCanceled||(Pn=p1(Ye),Pn.draggable=!1,Pn.style["will-change"]="",this._hideClone(),Ji(Pn,this.options.chosenClass,!1),Rt.clone=Pn),i.cloneId=Qp(function(){Ni("clone",i),!Rt.eventCanceled&&(i.options.removeCloneOnHide||vn.insertBefore(Pn,Ye),i._hideClone(),Fi({sortable:i,name:"clone"}))}),!n&&Ji(Ye,s.dragClass,!0),n?(zp=!0,i._loopId=setInterval(i._emulateDragOver,50)):(Wt(document,"mouseup",i._onDrop),Wt(document,"touchend",i._onDrop),Wt(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",s.setData&&s.setData.call(i,o,Ye)),Kt(document,"drop",i),Et(Ye,"transform","translateZ(0)")),Fc=!0,i._dragStartId=Qp(i._dragStarted.bind(i,n,t)),Kt(document,"selectstart",i),Pd=!0,_d&&Et(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,i=t.target,o,s,r,a=this.options,l=a.group,c=Rt.active,u=Up===l,d=a.sort,h=ni||c,f,g=this,m=!1;if(uw)return;function y(Z,$){Ni(Z,g,Cs({evt:t,isOwner:u,axis:f?"vertical":"horizontal",revert:r,dragRect:o,targetRect:s,canSort:d,fromSortable:h,target:i,completed:S,onMove:function(ue,xe){return Jp(vn,n,Ye,o,ue,jn(ue),t,xe)},changed:F},$))}function b(){y("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function S(Z){return y("dragOverCompleted",{insertion:Z}),Z&&(u?c._hideClone():c._showClone(g),g!==h&&(Ji(Ye,ni?ni.options.ghostClass:c.options.ghostClass,!1),Ji(Ye,a.ghostClass,!0)),ni!==g&&g!==Rt.active?ni=g:g===Rt.active&&ni&&(ni=null),h===g&&(g._ignoreWhileAnimating=i),g.animateAll(function(){y("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(i===Ye&&!Ye.animated||i===n&&!i.animated)&&(Tc=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(Ye.parentNode[Qi]._isOutsideThisEl(t.target),!Z&&el(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function F(){eo=So(Ye),zr=So(Ye,a.draggable),Fi({sortable:g,name:"change",toEl:n,newIndex:eo,newDraggableIndex:zr,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=ws(i,a.draggable,n,!0),y("dragOver"),Rt.eventCanceled)return m;if(Ye.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return S(!1);if(zp=!1,c&&!a.disabled&&(u?d||(r=Tn!==vn):ni===this||(this.lastPutMode=Up.checkPull(this,c,Ye,t))&&l.checkPut(this,c,Ye,t))){if(f=this._getDirection(t,i)==="vertical",o=jn(Ye),y("dragOverValid"),Rt.eventCanceled)return m;if(r)return Tn=vn,b(),this._hideClone(),y("revert"),Rt.eventCanceled||(Ja?vn.insertBefore(Ye,Ja):vn.appendChild(Ye)),S(!0);var C=ow(n,a.draggable);if(!C||s7(t,f,this)&&!C.animated){if(C===Ye)return S(!1);if(C&&n===t.target&&(i=C),i&&(s=jn(i)),Jp(vn,n,Ye,o,i,s,t,!!i)!==!1)return b(),n.appendChild(Ye),Tn=n,F(),S(!0)}else if(C&&o7(t,f,this)){var R=Dc(n,0,a,!0);if(R===Ye)return S(!1);if(i=R,s=jn(i),Jp(vn,n,Ye,o,i,s,t,!1)!==!1)return b(),n.insertBefore(Ye,R),Tn=n,F(),S(!0)}else if(i.parentNode===n){s=jn(i);var E=0,x,k=Ye.parentNode!==n,O=!QK(Ye.animated&&Ye.toRect||o,i.animated&&i.toRect||s,f),A=f?"top":"left",D=u1(i,"top","top")||u1(Ye,"top","top"),P=D?D.scrollTop:void 0;Tc!==i&&(x=s[A],Ad=!1,Kp=!O&&a.invertSwap||k),E=r7(t,i,s,f,O?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Kp,Tc===i);var V;if(E!==0){var H=So(Ye);do H-=E,V=Tn.children[H];while(V&&(Et(V,"display")==="none"||V===Pt))}if(E===0||V===i)return S(!1);Tc=i,Id=E;var te=i.nextElementSibling,B=!1;B=E===1;var G=Jp(vn,n,Ye,o,i,s,t,B);if(G!==!1)return(G===1||G===-1)&&(B=G===1),uw=!0,setTimeout(i7,30),b(),B&&!te?n.appendChild(Ye):i.parentNode.insertBefore(Ye,B?te:i),D&&f1(D,0,P-D.scrollTop),Tn=Ye.parentNode,x!==void 0&&!Kp&&(qp=Math.abs(x-jn(i)[A])),F(),S(!0)}if(n.contains(Ye))return S(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Wt(document,"mousemove",this._onTouchMove),Wt(document,"touchmove",this._onTouchMove),Wt(document,"pointermove",this._onTouchMove),Wt(document,"dragover",el),Wt(document,"mousemove",el),Wt(document,"touchmove",el)},_offUpEvents:function(){var t=this.el.ownerDocument;Wt(t,"mouseup",this._onDrop),Wt(t,"touchend",this._onDrop),Wt(t,"pointerup",this._onDrop),Wt(t,"touchcancel",this._onDrop),Wt(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;if(eo=So(Ye),zr=So(Ye,i.draggable),Ni("drop",this,{evt:t}),Tn=Ye&&Ye.parentNode,eo=So(Ye),zr=So(Ye,i.draggable),Rt.eventCanceled){this._nulling();return}Fc=!1,Kp=!1,Ad=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),hw(this.cloneId),hw(this._dragStartId),this.nativeDraggable&&(Wt(document,"drop",this),Wt(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),_d&&Et(document.body,"user-select",""),Et(Ye,"transform",""),t&&(Pd&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Pt&&Pt.parentNode&&Pt.parentNode.removeChild(Pt),(vn===Tn||ni&&ni.lastPutMode!=="clone")&&Pn&&Pn.parentNode&&Pn.parentNode.removeChild(Pn),Ye&&(this.nativeDraggable&&Wt(Ye,"dragend",this),dw(Ye),Ye.style["will-change"]="",Pd&&!Fc&&Ji(Ye,ni?ni.options.ghostClass:this.options.ghostClass,!1),Ji(Ye,this.options.chosenClass,!1),Fi({sortable:this,name:"unchoose",toEl:Tn,newIndex:null,newDraggableIndex:null,originalEvent:t}),vn!==Tn?(eo>=0&&(Fi({rootEl:Tn,name:"add",toEl:Tn,fromEl:vn,originalEvent:t}),Fi({sortable:this,name:"remove",toEl:Tn,originalEvent:t}),Fi({rootEl:Tn,name:"sort",toEl:Tn,fromEl:vn,originalEvent:t}),Fi({sortable:this,name:"sort",toEl:Tn,originalEvent:t})),ni&&ni.save()):eo!==xc&&eo>=0&&(Fi({sortable:this,name:"update",toEl:Tn,originalEvent:t}),Fi({sortable:this,name:"sort",toEl:Tn,originalEvent:t})),Rt.active&&((eo==null||eo===-1)&&(eo=xc,zr=Td),Fi({sortable:this,name:"end",toEl:Tn,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Ni("nulling",this),vn=Ye=Tn=Pt=Ja=Pn=Wp=Ur=Qa=Yo=Pd=eo=zr=xc=Td=Tc=Id=ni=Up=Rt.dragged=Rt.ghost=Rt.clone=Rt.active=null,Yp.forEach(function(t){t.checked=!0}),Yp.length=aw=lw=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ye&&(this._onDragOver(t),n7(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,i=this.el.children,o=0,s=i.length,r=this.options;o<s;o++)n=i[o],ws(n,r.draggable,this.el,!1)&&t.push(n.getAttribute(r.dataIdAttr)||l7(n));return t},sort:function(t,n){var i={},o=this.el;this.toArray().forEach(function(s,r){var a=o.children[r];ws(a,this.options.draggable,o,!1)&&(i[s]=a)},this),n&&this.captureAnimationState(),t.forEach(function(s){i[s]&&(o.removeChild(i[s]),o.appendChild(i[s]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return ws(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var i=this.options;if(n===void 0)return i[t];var o=Fd.modifyOption(this,t,n);typeof o<"u"?i[t]=o:i[t]=n,t==="group"&&w1(i)},destroy:function(){Ni("destroy",this);var t=this.el;t[Qi]=null,Wt(t,"mousedown",this._onTapStart),Wt(t,"touchstart",this._onTapStart),Wt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Wt(t,"dragover",this),Wt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),jp.splice(jp.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Ur){if(Ni("hideClone",this),Rt.eventCanceled)return;Et(Pn,"display","none"),this.options.removeCloneOnHide&&Pn.parentNode&&Pn.parentNode.removeChild(Pn),Ur=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Ur){if(Ni("showClone",this),Rt.eventCanceled)return;Ye.parentNode==vn&&!this.options.group.revertClone?vn.insertBefore(Pn,Ye):Ja?vn.insertBefore(Pn,Ja):vn.appendChild(Pn),this.options.group.revertClone&&this.animate(Ye,Pn),Et(Pn,"display",""),Ur=!1}}};function n7(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Jp(e,t,n,i,o,s,r,a){var l,c=e[Qi],u=c.options.onMove,d;return window.CustomEvent&&!lr&&!Dd?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=i,l.related=o||t,l.relatedRect=s||jn(t),l.willInsertAfter=a,l.originalEvent=r,e.dispatchEvent(l),u&&(d=u.call(c,l,r)),d}function dw(e){e.draggable=!1}function i7(){uw=!1}function o7(e,t,n){var i=jn(Dc(n.el,0,n.options,!0)),o=10;return t?e.clientX<i.left-o||e.clientY<i.top&&e.clientX<i.right:e.clientY<i.top-o||e.clientY<i.bottom&&e.clientX<i.left}function s7(e,t,n){var i=jn(ow(n.el,n.options.draggable)),o=10;return t?e.clientX>i.right+o||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+o}function r7(e,t,n,i,o,s,r,a){var l=i?e.clientY:e.clientX,c=i?n.height:n.width,u=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!r){if(a&&qp<c*o){if(!Ad&&(Id===1?l>u+c*s/2:l<d-c*s/2)&&(Ad=!0),Ad)h=!0;else if(Id===1?l<u+qp:l>d-qp)return-Id}else if(l>u+c*(1-o)/2&&l<d-c*(1-o)/2)return a7(t)}return h=h||r,h&&(l<u+c*s/2||l>d-c*s/2)?l>u+c/2?1:-1:0}function a7(e){return So(Ye)<So(e)?1:-1}function l7(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function c7(e){Yp.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&Yp.push(i)}}function Qp(e){return setTimeout(e,0)}function hw(e){return clearTimeout(e)}Zp&&Kt(document,"touchmove",function(e){(Rt.active||Fc)&&e.cancelable&&e.preventDefault()}),Rt.utils={on:Kt,off:Wt,css:Et,find:c1,is:function(t,n){return!!ws(t,n,t,!1)},extend:zK,throttle:h1,closest:ws,toggleClass:Ji,clone:p1,index:So,nextTick:Qp,cancelNextTick:hw,detectDirection:C1,getChild:Dc},Rt.get=function(e){return e[Qi]},Rt.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(Rt.utils=Cs(Cs({},Rt.utils),i.utils)),Fd.mount(i)})},Rt.create=function(e,t){return new Rt(e,t)},Rt.version=GK;var $n=[],kd,fw,pw=!1,gw,mw,eg,Od;function u7(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var i=n.originalEvent;this.sortable.nativeDraggable?Kt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Kt(document,"pointermove",this._handleFallbackAutoScroll):i.touches?Kt(document,"touchmove",this._handleFallbackAutoScroll):Kt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var i=n.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?Wt(document,"dragover",this._handleAutoScroll):(Wt(document,"pointermove",this._handleFallbackAutoScroll),Wt(document,"touchmove",this._handleFallbackAutoScroll),Wt(document,"mousemove",this._handleFallbackAutoScroll)),E1(),tg(),jK()},nulling:function(){eg=fw=kd=pw=Od=gw=mw=null,$n.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,i){var o=this,s=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,a=document.elementFromPoint(s,r);if(eg=n,i||this.options.forceAutoScrollFallback||Dd||lr||_d){vw(n,this.options,a,i);var l=Wr(a,!0);pw&&(!Od||s!==gw||r!==mw)&&(Od&&E1(),Od=setInterval(function(){var c=Wr(document.elementFromPoint(s,r),!0);c!==l&&(l=c,tg()),vw(n,o.options,c,i)},10),gw=s,mw=r)}else{if(!this.options.bubbleScroll||Wr(a,!0)===bs()){tg();return}vw(n,this.options,Wr(a,!1),!1)}}},rr(e,{pluginName:"scroll",initializeByDefault:!0})}function tg(){$n.forEach(function(e){clearInterval(e.pid)}),$n=[]}function E1(){clearInterval(Od)}var vw=h1(function(e,t,n,i){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,r=t.scrollSensitivity,a=t.scrollSpeed,l=bs(),c=!1,u;fw!==n&&(fw=n,tg(),kd=t.scroll,u=t.scrollFn,kd===!0&&(kd=Wr(n,!0)));var d=0,h=kd;do{var f=h,g=jn(f),m=g.top,y=g.bottom,b=g.left,S=g.right,F=g.width,C=g.height,R=void 0,E=void 0,x=f.scrollWidth,k=f.scrollHeight,O=Et(f),A=f.scrollLeft,D=f.scrollTop;f===l?(R=F<x&&(O.overflowX==="auto"||O.overflowX==="scroll"||O.overflowX==="visible"),E=C<k&&(O.overflowY==="auto"||O.overflowY==="scroll"||O.overflowY==="visible")):(R=F<x&&(O.overflowX==="auto"||O.overflowX==="scroll"),E=C<k&&(O.overflowY==="auto"||O.overflowY==="scroll"));var P=R&&(Math.abs(S-o)<=r&&A+F<x)-(Math.abs(b-o)<=r&&!!A),V=E&&(Math.abs(y-s)<=r&&D+C<k)-(Math.abs(m-s)<=r&&!!D);if(!$n[d])for(var H=0;H<=d;H++)$n[H]||($n[H]={});($n[d].vx!=P||$n[d].vy!=V||$n[d].el!==f)&&($n[d].el=f,$n[d].vx=P,$n[d].vy=V,clearInterval($n[d].pid),(P!=0||V!=0)&&(c=!0,$n[d].pid=setInterval((function(){i&&this.layer===0&&Rt.active._onTouchMove(eg);var te=$n[this.layer].vy?$n[this.layer].vy*a:0,B=$n[this.layer].vx?$n[this.layer].vx*a:0;typeof u=="function"&&u.call(Rt.dragged.parentNode[Qi],B,te,e,eg,$n[this.layer].el)!=="continue"||f1($n[this.layer].el,B,te)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==l&&(h=Wr(h,!1)));pw=c}},30),R1=function(t){var n=t.originalEvent,i=t.putSortable,o=t.dragEl,s=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(n){var c=i||s;a();var u=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(u.clientX,u.clientY);l(),c&&!c.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function yw(){}yw.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var o=Dc(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:R1},rr(yw,{pluginName:"revertOnSpill"});function Cw(){}Cw.prototype={onSpill:function(t){var n=t.dragEl,i=t.putSortable,o=i||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:R1},rr(Cw,{pluginName:"removeOnSpill"}),Rt.mount(new u7),Rt.mount(Cw,yw);function d7(e,t){return Object.values(e).indexOf(t)}function h7(e,t,n,i){if(!e)return[];const o=Object.values(e),s=t.length-i;return[...t].map((a,l)=>l>=s?o.length:o.indexOf(a))}function f7(e){return["transition-group","TransitionGroup"].includes(e)}function D1(e){if(!e||e.length!==1)return!1;const[{type:t}]=e;return t?f7(t.name):!1}function p7(e,t){return t?{...t.props,...t.attrs}:e}const ww=["Start","Add","Remove","Update","End"],bw=["Choose","Unchoose","Sort","Filter","Clone"],g7=["Move",...ww,...bw].map(e=>"on"+e);let Sw=null;const m7=ct({name:"VueDraggableNext",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},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}},emits:["update:modelValue","move","change",...ww.map(e=>e.toLowerCase()),...bw.map(e=>e.toLowerCase())],setup(e,{emit:t,slots:n,attrs:i}){const o=Y(!1),s=Y(!1),r=Y(0),a=Y(0),l=Y([]),c=Y(null),u=Y(null),d=q(()=>e.list?e.list:e.modelValue),h=Di();function f(){return e.component?ZN(e.component):e.tag}function g(re){if(u.value)for(const Ie in re){const Me=n1(Ie);g7.indexOf(Me)===-1&&u.value.option(Me,re[Ie])}}function m(){var re;return((re=h==null?void 0:h.proxy)==null?void 0:re.$el.children)||[]}async function y(){var re;await Xt(),l.value=h7(m(),((re=h==null?void 0:h.proxy)==null?void 0:re.$el.children)||[],o.value,a.value)}function b(re){const Ie=d7(m()||[],re);if(Ie===-1)return null;const Me=d.value?d.value[Ie]:null;return{index:Ie,element:Me}}function S(re){Xt(()=>t("change",re))}function F(re){if(e.list){re(e.list);return}const Ie=[...e.modelValue||[]];re(Ie),t("update:modelValue",Ie)}function C(...re){F(Me=>Me.splice(...re))}function R(re,Ie){F(Je=>Je.splice(Ie,0,Je.splice(re,1)[0]))}function E(re){const Ie=l.value,Me=Ie.length;return re>Me-1?Me:Ie[re]}function x(){var Ie,Me;return n.default&&((Me=(Ie=n.default()[0])==null?void 0:Ie.component)==null?void 0:Me.proxy)||null}function k(re){if(!e.noTransitionOnDrag||!o.value)return;const Ie=m();Ie[re]&&(Ie[re].data=null);const Me=x();Me&&(Me.children=[],Me.kept=void 0)}function O(re){y(),c.value=b(re.item),c.value&&(re.item._underlying_vm_=e.clone(c.value.element),Sw=re.item)}function A(re){const Ie=re.item._underlying_vm_;if(Ie===void 0)return;iw(re.item);const Me=E(re.newIndex);C(Me,0,Ie),y(),S({added:{element:Ie,newIndex:Me}})}function D(re){var Me;if(i1((Me=h==null?void 0:h.proxy)==null?void 0:Me.$el,re.item,re.oldIndex),re.pullMode==="clone"){iw(re.clone);return}if(!c.value)return;const Ie=c.value.index;C(Ie,1),k(Ie),S({removed:{element:c.value.element,oldIndex:Ie}})}function P(re){var Je,gt;iw(re.item),i1(re.from,re.item,re.oldIndex);const Ie=(Je=c.value)==null?void 0:Je.index,Me=E(re.newIndex);R(Ie,Me),S({moved:{element:(gt=c.value)==null?void 0:gt.element,oldIndex:Ie,newIndex:Me}})}function V(re,Ie){Object.prototype.hasOwnProperty.call(re,Ie)&&(re[Ie]+=r.value)}function H(re){return re.__draggable_component__}function te({to:re,related:Ie}){const Me=H(re);if(!Me)return{component:Me};const Je=Me.realList,gt={list:Je,component:Me};if(re!==Ie&&Je&&Me.getUnderlyingVm){const Ft=Me.getUnderlyingVm(Ie);if(Ft)return Object.assign(Ft,gt)}return gt}function B(re,Ie){const Me=[...Ie.to.children].filter(He=>He.style.display!=="none");if(Me.length===0)return 0;const Je=Me.indexOf(Ie.related),gt=re.component.getVmIndex(Je);return Me.indexOf(Sw)!==-1||!Ie.willInsertAfter?gt:gt+1}const G=()=>{var gt,Ft;const re={};ww.forEach(He=>{re["on"+He]=$(He)}),bw.forEach(He=>{re["on"+He]=Z.bind(null,He)});const Ie=Object.keys(i).reduce((He,en)=>(He[n1(en)]=i[en],He),{}),Me=Object.assign({},Ie,re,{onMove:(He,en)=>ce(He,en)});"draggable"in Me||(Me.draggable=">*");const Je=((gt=h==null?void 0:h.proxy)==null?void 0:gt.$el.nodeType)===1?h.proxy.$el:((Ft=h==null?void 0:h.proxy)==null?void 0:Ft.$el.parentElement)||null;Je&&(u.value=new Rt(Je,Me),Je.__draggable_component__=h==null?void 0:h.proxy,y())};function Z(re,Ie){Xt(()=>t(re.toLowerCase(),Ie))}function $(re){return Ie=>{if(d.value!==null){const Me="onDrag"+re,Je=xe[Me];Je&&Je(Ie)}Z(re,Ie)}}function ce(re,Ie){const Me=e.move;if(!Me||!d.value)return!0;const Je=te(re),gt=c.value,Ft=B(Je,re);gt&&Object.assign(gt,{futureIndex:Ft});const He=Object.assign({},re,{relatedContext:Je,draggedContext:gt});return Me(He,Ie)}function ue(){y(),Sw=null}const xe={onDragStart:O,onDragAdd:A,onDragRemove:D,onDragUpdate:P,onDragMove:ce,onDragEnd:ue};return Sn(()=>{G()}),e.list!==null&&e.modelValue!==null&&MK.error("list props are mutually exclusive! Please set one."),{getTag:f,realList:d,visibleIndexes:l,noneFunctionalComponentMode:s,headerOffset:r,footerOffset:a,transitionMode:o,computeIndexes:y,updateOptions:g,getChildrenNodes:m,getUnderlyingVm:b,emitChanges:S,alterList:F,spliceList:C,updatePosition:R,getVmIndex:E,getComponent:x,resetTransitionData:k,onDragStart:O,onDragAdd:A,onDragRemove:D,onDragUpdate:P,updateProperty:V,onDragMove:ce,onDragEnd:ue,mounted:G,context:c,sortableInstance:u,getRelatedContextFromMoveEvent:te,getTargetedComponent:H,computeFutureIndex:B}},render(){const e=this.getTag(),t=p7(this.$attrs,this.componentData);if(typeof e=="string"){const i=this.$slots.default&&typeof this.$slots.default=="function"?this.$slots.default():null;return i?(this.transitionMode=D1(i),Ov(e,t,i)):Ov(e,t,[])}const n=this.$slots.default?{default:this.$slots.default}:{};if(this.$slots.default){const i=typeof this.$slots.default=="function"?this.$slots.default():null;this.transitionMode=D1(i||[])}return Ov(e,t,n)}}),v7=Ct(ct({__name:"DragDropList",props:{modelValue:{},groupName:{},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["changed"],setup(e,{emit:t}){const n=Y([]),i=e,o=t,s=Y({}),r=()=>{n.value=i.modelValue.map(l=>({id:l.field,name:l.headerName,...l}))||[],i.modelValue.forEach(l=>{s.value[l.field]={...l}})};ut(()=>i.modelValue,l=>{r()},{immediate:!0}),ut(n,l=>{if(l.length===i.modelValue.length&&!l.every((u,d)=>u.id===i.modelValue[d].field)){const u=l.map(d=>s.value[d.id]);o("changed",u)}});const a=l=>!i.readOnly;return(l,c)=>(K(),Xe(W(m7),{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=u=>n.value=u),tag:"transition-group",disabled:i.readOnly,onMove:a,"component-data":{tag:"div",type:"transition",name:"fade"},animation:300,easing:"cubic-bezier(0.4, 0, 0.2, 1)","ghost-class":"ghost","chosen-class":"chosen","drag-class":"drag"},{default:Ee(()=>[(K(!0),Ce(Ot,null,Un(n.value,u=>(K(),Ce("div",{key:u.id,class:"fade-item"},[_t(l.$slots,"item",{item:u},()=>[dt(bt(u.name),1)],!0)]))),128))]),_:3},8,["modelValue","disabled"]))}}),[["__scopeId","data-v-f4ff0810"]]),Ew=Ct(ct({__name:"DragDropItem",props:{item:{},disabled:{type:Boolean},readOnly:{type:Boolean},columnStates:{}},emits:["toggle-column"],setup(e,{emit:t}){const n=mn,i=e,o=Y(!1),s=Y(i.columnStates[String(i.item.field)]||!1),r=t,a=c=>{s.value=c},l=q(()=>{var c,u;return(u=(c=i.item)==null?void 0:c.field)==null?void 0:u.includes("metric")});return ut(()=>s.value,()=>{r("toggle-column",i.item.field,i.item.required)}),(c,u)=>(K(),Ce("div",{key:e.item.field,class:z([c.$style["column-config__item"],{[c.$style.disabled]:e.disabled||i.readOnly}])},[ve(nw,{id:`col-${e.item.field}`,"model-value":s.value,"onUpdate:modelValue":a,disabled:e.disabled},null,8,["id","model-value","disabled"]),ve(mt,{color:e.disabled?"var(--disabled-color)":"var(--primary-color)",source:"remote",src:"GripVertical",class:z(c.$style.handler)},null,8,["color","class"]),ot((K(),Ce("span",{class:z(c.$style["column-config__item-label"])},[dt(bt(e.item.headerName),1)],2)),[[W(n),{content:e.item.headerName}]]),l.value?ot((K(),Ce("div",{key:0,class:z(c.$style.badge),onHover:u[0]||(u[0]=d=>o.value=!0)},[...u[1]||(u[1]=[dt(" M ",-1)])],34)),[[W(n),"Metric"]]):it("",!0)],2))}}),[["__cssModules",{$style:{"column-config__item":"_column-config__item_qpc5s_1",disabled:"_disabled_qpc5s_13",readOnly:"_readOnly_qpc5s_17","column-config__item--pinned":"_column-config__item--pinned_qpc5s_20",handler:"_handler_qpc5s_27",badge:"_badge_qpc5s_31","column-config__item-label":"_column-config__item-label_qpc5s_45"}}]]),y7=Ct(ct({__name:"TableCustomization",props:{modelValue:{},readOnly:{type:Boolean},disabled:{type:Boolean},checkboxColumn:{}},emits:["update:modelValue","input"],setup(e,{emit:t}){const n=mn,i=e,o=t,s=Y(""),r=Y([]),a=Y({}),{triggerRef:l,popupRef:c,isVisible:u}=tr({placement:"bottom-end",trigger:"click"}),d=q(()=>r.value.filter(C=>C.pinned==="left"&&C.field&&C.headerName)),h=q(()=>r.value.filter(C=>C.pinned==="right"&&C.field||C.field==="blank")),f=q({get:()=>r.value.filter(C=>!C.pinned&&C.field&&C.field!=="blank"),set:C=>{r.value=[...d.value,...C,...h.value]}}),g=q(()=>{if(!s.value)return{};const C=s.value.toLowerCase();return[...r.value,...f.value].reduce((R,E)=>{var x;return(x=E.headerName)!=null&&x.toLowerCase().includes(C)&&E.field&&(R[E.field]=!0),R},{})}),m=q(()=>i.modelValue),y=()=>{const C={};r.value.forEach(R=>{R.field&&(C[R.field]=!R.hide)}),a.value=C},b=()=>{const C=r.value.map(R=>({...R,hide:R.field?!a.value[R.field]:!1}));o("update:modelValue",C),o("input",C)},S=C=>{const R=[...d.value,...C,...h.value];i.checkboxColumn&&R.unshift(i.checkboxColumn),r.value=R,b()},F=(C,R)=>{!R&&C&&(a.value[C]=!a.value[C],b())};return ut(m,C=>{C&&C.length>0&&(r.value=[...C],y())},{immediate:!0}),(C,R)=>(K(),Ce("div",{class:z(C.$style["table-customization"])},[we("div",{ref_key:"triggerRef",ref:l},[_t(C.$slots,"trigger",{},()=>[ot((K(),Xe(pt,{variant:["secondary"],disabled:i.disabled,actived:W(u)},{prefix:Ee(()=>[ve(mt,{src:"Gear"})]),default:Ee(()=>[R[1]||(R[1]=dt(" Customise ",-1))]),_:1},8,["disabled","actived"])),[[W(n),"Customise table columns"]])])],512),we("div",{ref_key:"popupRef",ref:c,class:z(C.$style["tippy-content-wrapper"])},[we("div",{class:z(C.$style["column-config"])},[ve(qC,{modelValue:s.value,"onUpdate:modelValue":R[0]||(R[0]=E=>s.value=E)},null,8,["modelValue"]),we("div",{class:z(C.$style["column-config__header"])},[...R[2]||(R[2]=[we("label",null,"Manage columns",-1)])],2),Object.entries(g.value).length===0&&s.value.length>0?(K(),Ce("div",{key:0,class:z(C.$style["no-columns"])},[...R[3]||(R[3]=[dt(" No results. ",-1),we("br",null,null,-1),dt(" Try another search. ",-1)])],2)):it("",!0),we("div",{class:z(C.$style["column-config__list"])},[d.value.length>0?(K(),Ce("div",{key:0,class:z(C.$style["column-config__pinned-section"])},[(K(!0),Ce(Ot,null,Un(d.value,E=>ot((K(),Xe(Ew,{key:E.field,item:E,disabled:!0,readOnly:!0,columnStates:a.value},null,8,["item","columnStates"])),[[us,g.value[E.field]||!s.value]])),128))],2)):it("",!0),ve(v7,{"model-value":f.value,"group-name":"columns",onChanged:S,disabled:i.disabled,readOnly:i.readOnly},{item:Ee(({item:E})=>[ot((K(),Xe(Ew,{key:E.id,item:E,columnStates:a.value,disabled:i.disabled,readOnly:i.readOnly,onToggleColumn:F},null,8,["item","columnStates","disabled","readOnly"])),[[us,g.value[E.field]||!s.value]])]),_:1},8,["model-value","disabled","readOnly"]),h.value.length>0?(K(),Ce("div",{key:1,class:z(C.$style["column-config__pinned-section"])},[(K(!0),Ce(Ot,null,Un(h.value.filter(E=>{var x;return E.headerName&&((x=E.headerName)==null?void 0:x.length)>0}),E=>ot((K(),Xe(Ew,{key:E.field,item:E,disabled:i.disabled,readOnly:i.readOnly,columnStates:a.value},null,8,["item","disabled","readOnly","columnStates"])),[[us,g.value[E.field]||!s.value]])),128))],2)):it("",!0)],2),we("div",{class:z(C.$style["column-config__footer"])},[ve(pt,{type:"button",variant:"secondary",disabled:!0},{default:Ee(()=>[...R[4]||(R[4]=[we("span",null,"Add Column",-1)])]),_:1})],2)],2)],2)],2))}}),[["__cssModules",{$style:{"table-customization":"_table-customization_z1p39_1","table-customization__trigger":"_table-customization__trigger_z1p39_7","column-config":"_column-config_z1p39_23","column-config__header":"_column-config__header_z1p39_33","icon-color":"_icon-color_z1p39_43","column-config__list":"_column-config__list_z1p39_46","column-config__section-label":"_column-config__section-label_z1p39_50","column-config__footer":"_column-config__footer_z1p39_59","column-config__add-button":"_column-config__add-button_z1p39_62","cs-icon":"_cs-icon_z1p39_80","no-columns":"_no-columns_z1p39_84"}}]]),C7={class:"wrapper-suffix"},w7=Ct(ct({__name:"StatusSelect",props:{modelValue:{},getStatusFunc:{type:Function},workspaceId:{},id:{}},emits:["updated","error","cancel","update:modelValue"],setup(e,{expose:t,emit:n}){const i=mn,o={PER_PAGE:20,INITIAL_PAGE:1},s=e,r=Y(s.modelValue),a=n,l=q(()=>f.value.find(D=>D.id===r.value)||null),c=D=>{r.value=D.id,a("update:modelValue",D.id)},u=q(()=>{if(!r.value)return{backgroundColor:"#A6A6A6",border:"1px solid #A6A6A6"};const D=f.value.find(V=>V.id===r.value),P=String((D==null?void 0:D.color)||"white");return{backgroundColor:P,border:my(P,"white")?"1px solid #ccc":"1px solid #fff"}}),d=Y(null),h=()=>{var D;(D=d.value)==null||D.focus()},f=Y([]),g=Y(!1),m=Y(!1),y=Y(null),b=Y(o.INITIAL_PAGE),S=Y(!0),F=Y(0),C=Y(""),R=q(()=>!!(s.id&&s.workspaceId)),E=D=>{const P=f.value.find(V=>V.id===D.value);P&&c(P)},x=D=>({label:D.name,value:D.id,selected:r.value===D.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:D,id:D.id,color:D.color}),k=async(D=o.INITIAL_PAGE,P="",V=!1)=>{var H;if(!R.value){console.error("Missing required props",s);return}V?m.value=!0:g.value=!0,y.value=null;try{const te={workspaceId:String(s.workspaceId),itemIds:s.id,page:D,perPage:o.PER_PAGE,name_like:P.trim()};if(s.getStatusFunc===void 0)throw new Error("API service getAssignableStatus is undefined");const B=await s.getStatusFunc(te);if(!B){V||(f.value=[]),S.value=!1;return}const G=B.data.map(x);f.value=V?[...f.value,...G]:G,F.value=((H=B.meta)==null?void 0:H.total)??B.data.length,S.value=f.value.length<F.value,b.value=D}catch(te){console.error("Error fetching statuses:",te),y.value="Failed to load statuses",V||(f.value=[]),S.value=!1,a("error",y.value)}finally{g.value=!1,m.value=!1}},O=async()=>{!S.value||m.value||await k(b.value+1,C.value,!0)};ut([()=>s.id,()=>s.workspaceId],()=>{k()},{deep:!0,immediate:!0});const A=async D=>{C.value=D,b.value=o.INITIAL_PAGE,await k(o.INITIAL_PAGE,D,!1)};return t({focus:h,clear:()=>{r.value=null,a("update:modelValue",null)}}),(D,P)=>(K(),Xe(KP,{onOpen:h,placement:"bottom-start","max-width":500},{trigger:Ee(({open:V})=>[ve(sr,{actived:V,class:z(D.$style["status-wrapper"])},{suffix:Ee(()=>[we("div",C7,[ve(mt,{src:"ChevronUp",source:"remote",class:z([[D.$style["dropdown-icon"]],{[D.$style["dropdown-icon-show"]]:!V}])},null,8,["class"])])]),default:Ee(()=>{var H;return[we("div",{class:z(D.$style.status)},[we("div",{class:z(D.$style["color-indicator"]),style:gn(u.value)},null,6),ot((K(),Ce("span",{style:{"max-width":"400px"},class:z({[D.$style.empty]:!l.value})},[dt(bt(l.value?l.value.label:"Select status"),1)],2)),[[W(i),{content:((H=l.value)==null?void 0:H.label)||void 0}]])],2)]}),_:2},1032,["actived","class"])]),content:Ee(({closeDropdown:V})=>{var H;return[ve(YC,{ref_key:"popupRef",ref:d,"selected-id":(H=l.value)==null?void 0:H.id,options:f.value,loading:g.value,"loading-more":m.value,"has-more":S.value,error:y.value,onSearch:A,onSelect:te=>{E(te),V()},onLoadMore:O,onCancel:P[0]||(P[0]=te=>a("cancel")),style:{width:"500px"}},null,8,["selected-id","options","loading","loading-more","has-more","error","onSelect"])]}),_:1}))}}),[["__cssModules",{$style:{"status-wrapper":"_status-wrapper_fb8p7_1",status:"_status_fb8p7_1","color-indicator":"_color-indicator_fb8p7_12",empty:"_empty_fb8p7_21","dropdown-icon":"_dropdown-icon_fb8p7_25","dropdown-icon-show":"_dropdown-icon-show_fb8p7_30",options:"_options_fb8p7_34"}}]]),b7=Ct(ct({name:"EmptyData",__name:"EmptyData",props:{isSearching:{type:Boolean},isFiltering:{type:Boolean}},setup(e){const t=e,n={noData:"No data available.",noSearchResults:"No results. Try another search.",noFilterResults:"No results. Try another filter."},i=q(()=>t.isSearching||t.isFiltering?"NoDataSearchFilter":"ClickToCreate"),o=q(()=>t.isSearching?n.noSearchResults:t.isFiltering?n.noFilterResults:n.noData);return(s,r)=>(K(),Ce("div",{class:z(s.$style["no-data-item-table"])},[we("div",{class:z(s.$style.visual)},[ve(Np,{source:"remote",src:i.value,ratio:"4/3",maxWidth:500,maxHeight:350},null,8,["src"])],2),we("div",{class:z(s.$style.description)},bt(o.value),3)],2))}}),[["__cssModules",{$style:{"no-data-item-table":"_no-data-item-table_oh0wi_1",visual:"_visual_oh0wi_12",description:"_description_oh0wi_19"}}]]),_1=Sc("sortStore",()=>{const e=Y({}),t={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"due_date",status:"template_flow_status",assignees:"assignee"},n={start_asc:{column:"start_date",direction:"asc"},start_desc:{column:"start_date",direction:"desc"},due_asc:{column:"due_date",direction:"asc"},due_desc:{column:"due_date",direction:"desc"}},i=q(()=>{const a=e.value;return Object.values(a).filter(c=>c.sort!=="none"&&!!c.sort).map(c=>{let u;switch(c.colId){case"dateRange":u=n[c.sort];break;default:if(c.colId.includes("metric")){const[d,h]=c.colId.split("_");u={column:d,direction:c.sort,type:h}}else u={column:t[c.colId]||c.colId,direction:c.sort};break}return u})}),o=(a,l)=>{e.value={[a]:{colId:a,sort:l}}},s=()=>{e.value={}},r=Y(!1);return{sortingAPIConfiguration:i,sorts:e,setSort:o,clearSorting:s,isSortingRunning:r}}),tl=ct({name:"HeaderSorting",__name:"HeaderWrapper",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=e,n=_1(),{sorts:i}=ys(n),o=q(()=>{var l,c;return((c=(l=t.params)==null?void 0:l.column)==null?void 0:c.getColId())||"template_col_id"}),s=l=>{o.value&&n.setSort(o.value,l)},r=q(()=>t.params.headerType||void 0),a=Y("none");return ut(()=>i.value,Wo(()=>{if(o.value){const l=i.value[o.value];a.value=l?l.sort:"none"}},200),{deep:!0,immediate:!0}),(l,c)=>o.value?(K(),Xe(SK,_n({key:0},t,{"header-type":r.value,modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=u=>a.value=u),onSortChanged:s}),null,16,["header-type","modelValue"])):it("",!0)}});function S7(){const e=Mo({isCreating:!1,name:"",error:void 0});return{newItemData:e,validateNewItem:()=>{const o=e.name.trim();o.length===0?e.error="Name cannot be empty":o.length>25?e.error="Name cannot exceed 25 characters":e.error=void 0},openNewItemForm:()=>{e.isCreating=!0,e.name="",e.error=void 0},closeNewItemForm:()=>{e.isCreating=!1},resetNewItemForm:()=>{e.name="",e.error=void 0}}}const E7=Ct(ct({__name:"CreateNewScene",emits:["create-new-item"],setup(e,{expose:t,emit:n}){const i=uE("target"),o=uE("newSceneInputRef");ZP(i,f=>r());const s=()=>{a.isCreating=!0},r=()=>{a.isCreating=!1,c()},{newItemData:a,validateNewItem:l,resetNewItemForm:c,closeNewItemForm:u}=S7(),d=n,h=f=>{d("create-new-item",f)};return ut(()=>a.isCreating,f=>{f&&Xt(()=>{o.value&&o.value.focus()})}),t({show:s,hide:r}),(f,g)=>ot((K(),Ce("div",{class:z(f.$style.newRow),ref_key:"target",ref:i},[ve(WP,{ref_key:"newSceneInputRef",ref:o,modelValue:W(a).name,"onUpdate:modelValue":g[0]||(g[0]=m=>W(a).name=m),onChange:W(l),onEnter:g[1]||(g[1]=m=>h(W(a).name)),placeholder:"Enter name",focused:!0,"max-length":25},{clear:Ee(()=>[W(a).name.length==0?(K(),Xe(mt,{key:0,src:"Pen",color:"#f7941d"})):it("",!0)]),_:1},8,["modelValue","onChange"]),ve(pt,{onClick:g[2]||(g[2]=m=>h(W(a).name)),disabled:!!W(a).error||!W(a).name.trim()},{prefix:Ee(()=>[ve(mt,{src:"Plus"})]),default:Ee(()=>[g[3]||(g[3]=dt(" Create ",-1))]),_:1},8,["disabled"]),ve(pt,{variant:["secondary","icon"],onClick:W(u)},{prefix:Ee(()=>[ve(mt,{src:"XMarkSolid"})]),_:1},8,["onClick"])],2)),[[us,W(a).isCreating]])}}),[["__cssModules",{$style:{newRow:"_newRow_1vpac_1","warning-text":"_warning-text_1vpac_20","has-error":"_has-error_1vpac_25"}}]]),R7=["innerHTML"],D7=["accept"],x1=Ct(ct({__name:"FileUploader",props:{modelValue:{},acceptTypes:{default:()=>["xlsx","xls","csv"]}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=Y(null),o=k=>`<svg xmlns="http://www.w3.org/2000/svg" width="49" height="49" viewBox="0 0 49 49" fill="none">
96
+ */function o1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function Cs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o1(Object(n),!0).forEach(function(i){VK(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o1(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Gp(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gp=function(t){return typeof t}:Gp=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gp(e)}function VK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rr(){return rr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},rr.apply(this,arguments)}function BK(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,s;for(s=0;s<i.length;s++)o=i[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function HK(e,t){if(e==null)return{};var n=BK(e,t),i,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)i=s[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var GK="1.14.0";function ar(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var lr=ar(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Dd=ar(/Edge/i),s1=ar(/firefox/i),_d=ar(/safari/i)&&!ar(/chrome/i)&&!ar(/android/i),r1=ar(/iP(ad|od|hone)/i),$K=ar(/chrome/i)&&ar(/android/i),a1={capture:!1,passive:!1};function Kt(e,t,n){e.addEventListener(t,n,!lr&&a1)}function Wt(e,t,n){e.removeEventListener(t,n,!lr&&a1)}function $p(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function WK(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ws(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&$p(e,t):$p(e,t))||i&&e===n)return e;if(e===n)break}while(e=WK(e))}return null}var l1=/\s+/g;function Ji(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(l1," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(l1," ")}}function Et(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function Rc(e,t){var n="";if(typeof e=="string")n=e;else do{var i=Et(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function c1(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,s=i.length;if(n)for(;o<s;o++)n(i[o],o);return i}return[]}function bs(){var e=document.scrollingElement;return e||document.documentElement}function jn(e,t,n,i,o){if(!(!e.getBoundingClientRect&&e!==window)){var s,r,a,l,c,u,d;if(e!==window&&e.parentNode&&e!==bs()?(s=e.getBoundingClientRect(),r=s.top,a=s.left,l=s.bottom,c=s.right,u=s.height,d=s.width):(r=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!lr))do if(o&&o.getBoundingClientRect&&(Et(o,"transform")!=="none"||n&&Et(o,"position")!=="static")){var h=o.getBoundingClientRect();r-=h.top+parseInt(Et(o,"border-top-width")),a-=h.left+parseInt(Et(o,"border-left-width")),l=r+s.height,c=a+s.width;break}while(o=o.parentNode);if(i&&e!==window){var f=Rc(o||e),g=f&&f.a,m=f&&f.d;f&&(r/=m,a/=g,d/=g,u/=m,l=r+u,c=a+d)}return{top:r,left:a,bottom:l,right:c,width:d,height:u}}}function u1(e,t,n){for(var i=Wr(e,!0),o=jn(e)[t];i;){var s=jn(i)[n],r=void 0;if(r=o>=s,!r)return i;if(i===bs())break;i=Wr(i,!1)}return!1}function Dc(e,t,n,i){for(var o=0,s=0,r=e.children;s<r.length;){if(r[s].style.display!=="none"&&r[s]!==Rt.ghost&&(i||r[s]!==Rt.dragged)&&ws(r[s],n.draggable,e,!1)){if(o===t)return r[s];o++}s++}return null}function ow(e,t){for(var n=e.lastElementChild;n&&(n===Rt.ghost||Et(n,"display")==="none"||t&&!$p(n,t));)n=n.previousElementSibling;return n||null}function So(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==Rt.clone&&(!t||$p(e,t))&&n++;return n}function d1(e){var t=0,n=0,i=bs();if(e)do{var o=Rc(e),s=o.a,r=o.d;t+=e.scrollLeft*s,n+=e.scrollTop*r}while(e!==i&&(e=e.parentNode));return[t,n]}function UK(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function Wr(e,t){if(!e||!e.getBoundingClientRect)return bs();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Et(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return bs();if(i||t)return n;i=!0}}while(n=n.parentNode);return bs()}function zK(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function sw(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var xd;function h1(e,t){return function(){if(!xd){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),xd=setTimeout(function(){xd=void 0},t)}}}function jK(){clearTimeout(xd),xd=void 0}function f1(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function p1(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var Qi="Sortable"+new Date().getTime();function KK(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(o){if(!(Et(o,"display")==="none"||o===Rt.ghost)){e.push({target:o,rect:jn(o)});var s=Cs({},e[e.length-1].rect);if(o.thisAnimationDuration){var r=Rc(o,!0);r&&(s.top-=r.f,s.left-=r.e)}o.fromRect=s}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(UK(e,{target:i}),1)},animateAll:function(i){var o=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var s=!1,r=0;e.forEach(function(a){var l=0,c=a.target,u=c.fromRect,d=jn(c),h=c.prevFromRect,f=c.prevToRect,g=a.rect,m=Rc(c,!0);m&&(d.top-=m.f,d.left-=m.e),c.toRect=d,c.thisAnimationDuration&&sw(h,d)&&!sw(u,d)&&(g.top-d.top)/(g.left-d.left)===(u.top-d.top)/(u.left-d.left)&&(l=YK(g,h,f,o.options)),sw(d,u)||(c.prevFromRect=u,c.prevToRect=d,l||(l=o.options.animation),o.animate(c,g,d,l)),l&&(s=!0,r=Math.max(r,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(t),s?t=setTimeout(function(){typeof i=="function"&&i()},r):typeof i=="function"&&i(),e=[]},animate:function(i,o,s,r){if(r){Et(i,"transition",""),Et(i,"transform","");var a=Rc(this.el),l=a&&a.a,c=a&&a.d,u=(o.left-s.left)/(l||1),d=(o.top-s.top)/(c||1);i.animatingX=!!u,i.animatingY=!!d,Et(i,"transform","translate3d("+u+"px,"+d+"px,0)"),this.forRepaintDummy=qK(i),Et(i,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Et(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){Et(i,"transition",""),Et(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},r)}}}}function qK(e){return e.offsetWidth}function YK(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var _c=[],rw={initializeByDefault:!0},Fd={mount:function(t){for(var n in rw)rw.hasOwnProperty(n)&&!(n in t)&&(t[n]=rw[n]);_c.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),_c.push(t)},pluginEvent:function(t,n,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var s=t+"Global";_c.forEach(function(r){n[r.pluginName]&&(n[r.pluginName][s]&&n[r.pluginName][s](Cs({sortable:n},i)),n.options[r.pluginName]&&n[r.pluginName][t]&&n[r.pluginName][t](Cs({sortable:n},i)))})},initializePlugins:function(t,n,i,o){_c.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var c=new a(t,n,t.options);c.sortable=t,c.options=t.options,t[l]=c,rr(i,c.defaults)}});for(var s in t.options)if(t.options.hasOwnProperty(s)){var r=this.modifyOption(t,s,t.options[s]);typeof r<"u"&&(t.options[s]=r)}},getEventProperties:function(t,n){var i={};return _c.forEach(function(o){typeof o.eventProperties=="function"&&rr(i,o.eventProperties.call(n[o.pluginName],t))}),i},modifyOption:function(t,n,i){var o;return _c.forEach(function(s){t[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[n]=="function"&&(o=s.optionListeners[n].call(t[s.pluginName],i))}),o}};function ZK(e){var t=e.sortable,n=e.rootEl,i=e.name,o=e.targetEl,s=e.cloneEl,r=e.toEl,a=e.fromEl,l=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,g=e.extraEventProperties;if(t=t||n&&n[Qi],!!t){var m,y=t.options,b="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!lr&&!Dd?m=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(i,!0,!0)),m.to=r||n,m.from=a||n,m.item=o||n,m.clone=s,m.oldIndex=l,m.newIndex=c,m.oldDraggableIndex=u,m.newDraggableIndex=d,m.originalEvent=h,m.pullMode=f?f.lastPutMode:void 0;var S=Cs(Cs({},g),Fd.getEventProperties(i,t));for(var F in S)m[F]=S[F];n&&n.dispatchEvent(m),y[b]&&y[b].call(t,m)}}var XK=["evt"],Ni=function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,s=HK(i,XK);Fd.pluginEvent.bind(Rt)(t,n,Cs({dragEl:Ye,parentEl:Tn,ghostEl:Pt,rootEl:vn,nextEl:Ja,lastDownEl:Wp,cloneEl:Pn,cloneHidden:Ur,dragStarted:Pd,putSortable:ni,activeSortable:Rt.active,originalEvent:o,oldIndex:xc,oldDraggableIndex:Td,newIndex:eo,newDraggableIndex:zr,hideGhostForTarget:b1,unhideGhostForTarget:S1,cloneNowHidden:function(){Ur=!0},cloneNowShown:function(){Ur=!1},dispatchSortableEvent:function(a){Fi({sortable:n,name:a,originalEvent:o})}},s))};function Fi(e){ZK(Cs({putSortable:ni,cloneEl:Pn,targetEl:Ye,rootEl:vn,oldIndex:xc,oldDraggableIndex:Td,newIndex:eo,newDraggableIndex:zr},e))}var Ye,Tn,Pt,vn,Ja,Wp,Pn,Ur,xc,eo,Td,zr,Up,ni,Fc=!1,zp=!1,jp=[],Qa,Yo,aw,lw,g1,m1,Pd,Tc,Id,Ad=!1,Kp=!1,qp,hi,cw=[],uw=!1,Yp=[],Zp=typeof document<"u",Xp=r1,v1=Dd||lr?"cssFloat":"float",JK=Zp&&!$K&&!r1&&"draggable"in document.createElement("div"),y1=function(){if(Zp){if(lr)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),C1=function(t,n){var i=Et(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),s=Dc(t,0,n),r=Dc(t,1,n),a=s&&Et(s),l=r&&Et(r),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+jn(s).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+jn(r).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||c>=o&&i[v1]==="none"||r&&i[v1]==="none"&&c+u>o)?"vertical":"horizontal"},QK=function(t,n,i){var o=i?t.left:t.top,s=i?t.right:t.bottom,r=i?t.width:t.height,a=i?n.left:n.top,l=i?n.right:n.bottom,c=i?n.width:n.height;return o===a||s===l||o+r/2===a+c/2},e7=function(t,n){var i;return jp.some(function(o){var s=o[Qi].options.emptyInsertThreshold;if(!(!s||ow(o))){var r=jn(o),a=t>=r.left-s&&t<=r.right+s,l=n>=r.top-s&&n<=r.bottom+s;if(a&&l)return i=o}}),i},w1=function(t){function n(s,r){return function(a,l,c,u){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(s==null&&(r||d))return!0;if(s==null||s===!1)return!1;if(r&&s==="clone")return s;if(typeof s=="function")return n(s(a,l,c,u),r)(a,l,c,u);var h=(r?a:l).options.group.name;return s===!0||typeof s=="string"&&s===h||s.join&&s.indexOf(h)>-1}}var i={},o=t.group;(!o||Gp(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=n(o.pull,!0),i.checkPut=n(o.put),i.revertClone=o.revertClone,t.group=i},b1=function(){!y1&&Pt&&Et(Pt,"display","none")},S1=function(){!y1&&Pt&&Et(Pt,"display","")};Zp&&document.addEventListener("click",function(e){if(zp)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),zp=!1,!1},!0);var el=function(t){if(Ye){t=t.touches?t.touches[0]:t;var n=e7(t.clientX,t.clientY);if(n){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[Qi]._onDragOver(i)}}},t7=function(t){Ye&&Ye.parentNode[Qi]._isOutsideThisEl(t.target)};function Rt(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=rr({},t),e[Qi]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return C1(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,a){r.setData("Text",a.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:Rt.supportPointer!==!1&&"PointerEvent"in window&&!_d,emptyInsertThreshold:5};Fd.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);w1(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:JK,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Kt(e,"pointerdown",this._onTapStart):(Kt(e,"mousedown",this._onTapStart),Kt(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Kt(e,"dragover",this),Kt(e,"dragenter",this)),jp.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),rr(this,KK())}Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Tc=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,Ye):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,o=this.options,s=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=o.filter;if(c7(i),!Ye&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||o.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&_d&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=ws(l,o.draggable,i,!1),!(l&&l.animated)&&Wp!==l)){if(xc=So(l),Td=So(l,o.draggable),typeof u=="function"){if(u.call(this,t,l,this)){Fi({sortable:n,rootEl:c,name:"filter",targetEl:l,toEl:i,fromEl:i}),Ni("filter",n,{evt:t}),s&&t.cancelable&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(d){if(d=ws(c,d.trim(),i,!1),d)return Fi({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:i,toEl:i}),Ni("filter",n,{evt:t}),!0}),u)){s&&t.cancelable&&t.preventDefault();return}o.handle&&!ws(c,o.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,n,i){var o=this,s=o.el,r=o.options,a=s.ownerDocument,l;if(i&&!Ye&&i.parentNode===s){var c=jn(i);if(vn=s,Ye=i,Tn=Ye.parentNode,Ja=Ye.nextSibling,Wp=i,Up=r.group,Rt.dragged=Ye,Qa={target:Ye,clientX:(n||t).clientX,clientY:(n||t).clientY},g1=Qa.clientX-c.left,m1=Qa.clientY-c.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Ye.style["will-change"]="all",l=function(){if(Ni("delayEnded",o,{evt:t}),Rt.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!s1&&o.nativeDraggable&&(Ye.draggable=!0),o._triggerDragStart(t,n),Fi({sortable:o,name:"choose",originalEvent:t}),Ji(Ye,r.chosenClass,!0)},r.ignore.split(",").forEach(function(u){c1(Ye,u.trim(),dw)}),Kt(a,"dragover",el),Kt(a,"mousemove",el),Kt(a,"touchmove",el),Kt(a,"mouseup",o._onDrop),Kt(a,"touchend",o._onDrop),Kt(a,"touchcancel",o._onDrop),s1&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ye.draggable=!0),Ni("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Dd||lr))){if(Rt.eventCanceled){this._onDrop();return}Kt(a,"mouseup",o._disableDelayedDrag),Kt(a,"touchend",o._disableDelayedDrag),Kt(a,"touchcancel",o._disableDelayedDrag),Kt(a,"mousemove",o._delayedDragTouchMoveHandler),Kt(a,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&Kt(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ye&&dw(Ye),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Wt(t,"mouseup",this._disableDelayedDrag),Wt(t,"touchend",this._disableDelayedDrag),Wt(t,"touchcancel",this._disableDelayedDrag),Wt(t,"mousemove",this._delayedDragTouchMoveHandler),Wt(t,"touchmove",this._delayedDragTouchMoveHandler),Wt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?Kt(document,"pointermove",this._onTouchMove):n?Kt(document,"touchmove",this._onTouchMove):Kt(document,"mousemove",this._onTouchMove):(Kt(Ye,"dragend",this),Kt(vn,"dragstart",this._onDragStart));try{document.selection?Qp(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Fc=!1,vn&&Ye){Ni("dragStarted",this,{evt:n}),this.nativeDraggable&&Kt(document,"dragover",t7);var i=this.options;!t&&Ji(Ye,i.dragClass,!1),Ji(Ye,i.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),Fi({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Yo){this._lastX=Yo.clientX,this._lastY=Yo.clientY,b1();for(var t=document.elementFromPoint(Yo.clientX,Yo.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Yo.clientX,Yo.clientY),t!==n);)n=t;if(Ye.parentNode[Qi]._isOutsideThisEl(t),n)do{if(n[Qi]){var i=void 0;if(i=n[Qi]._onDragOver({clientX:Yo.clientX,clientY:Yo.clientY,target:t,rootEl:n}),i&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);S1()}},_onTouchMove:function(t){if(Qa){var n=this.options,i=n.fallbackTolerance,o=n.fallbackOffset,s=t.touches?t.touches[0]:t,r=Pt&&Rc(Pt,!0),a=Pt&&r&&r.a,l=Pt&&r&&r.d,c=Xp&&hi&&d1(hi),u=(s.clientX-Qa.clientX+o.x)/(a||1)+(c?c[0]-cw[0]:0)/(a||1),d=(s.clientY-Qa.clientY+o.y)/(l||1)+(c?c[1]-cw[1]:0)/(l||1);if(!Rt.active&&!Fc){if(i&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(Pt){r?(r.e+=u-(aw||0),r.f+=d-(lw||0)):r={a:1,b:0,c:0,d:1,e:u,f:d};var h="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Et(Pt,"webkitTransform",h),Et(Pt,"mozTransform",h),Et(Pt,"msTransform",h),Et(Pt,"transform",h),aw=u,lw=d,Yo=s}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Pt){var t=this.options.fallbackOnBody?document.body:vn,n=jn(Ye,!0,Xp,!0,t),i=this.options;if(Xp){for(hi=t;Et(hi,"position")==="static"&&Et(hi,"transform")==="none"&&hi!==document;)hi=hi.parentNode;hi!==document.body&&hi!==document.documentElement?(hi===document&&(hi=bs()),n.top+=hi.scrollTop,n.left+=hi.scrollLeft):hi=bs(),cw=d1(hi)}Pt=Ye.cloneNode(!0),Ji(Pt,i.ghostClass,!1),Ji(Pt,i.fallbackClass,!0),Ji(Pt,i.dragClass,!0),Et(Pt,"transition",""),Et(Pt,"transform",""),Et(Pt,"box-sizing","border-box"),Et(Pt,"margin",0),Et(Pt,"top",n.top),Et(Pt,"left",n.left),Et(Pt,"width",n.width),Et(Pt,"height",n.height),Et(Pt,"opacity","0.8"),Et(Pt,"position",Xp?"absolute":"fixed"),Et(Pt,"zIndex","100000"),Et(Pt,"pointerEvents","none"),Rt.ghost=Pt,t.appendChild(Pt),Et(Pt,"transform-origin",g1/parseInt(Pt.style.width)*100+"% "+m1/parseInt(Pt.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,o=t.dataTransfer,s=i.options;if(Ni("dragStart",this,{evt:t}),Rt.eventCanceled){this._onDrop();return}Ni("setupClone",this),Rt.eventCanceled||(Pn=p1(Ye),Pn.draggable=!1,Pn.style["will-change"]="",this._hideClone(),Ji(Pn,this.options.chosenClass,!1),Rt.clone=Pn),i.cloneId=Qp(function(){Ni("clone",i),!Rt.eventCanceled&&(i.options.removeCloneOnHide||vn.insertBefore(Pn,Ye),i._hideClone(),Fi({sortable:i,name:"clone"}))}),!n&&Ji(Ye,s.dragClass,!0),n?(zp=!0,i._loopId=setInterval(i._emulateDragOver,50)):(Wt(document,"mouseup",i._onDrop),Wt(document,"touchend",i._onDrop),Wt(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",s.setData&&s.setData.call(i,o,Ye)),Kt(document,"drop",i),Et(Ye,"transform","translateZ(0)")),Fc=!0,i._dragStartId=Qp(i._dragStarted.bind(i,n,t)),Kt(document,"selectstart",i),Pd=!0,_d&&Et(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,i=t.target,o,s,r,a=this.options,l=a.group,c=Rt.active,u=Up===l,d=a.sort,h=ni||c,f,g=this,m=!1;if(uw)return;function y(Z,$){Ni(Z,g,Cs({evt:t,isOwner:u,axis:f?"vertical":"horizontal",revert:r,dragRect:o,targetRect:s,canSort:d,fromSortable:h,target:i,completed:S,onMove:function(ue,xe){return Jp(vn,n,Ye,o,ue,jn(ue),t,xe)},changed:F},$))}function b(){y("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function S(Z){return y("dragOverCompleted",{insertion:Z}),Z&&(u?c._hideClone():c._showClone(g),g!==h&&(Ji(Ye,ni?ni.options.ghostClass:c.options.ghostClass,!1),Ji(Ye,a.ghostClass,!0)),ni!==g&&g!==Rt.active?ni=g:g===Rt.active&&ni&&(ni=null),h===g&&(g._ignoreWhileAnimating=i),g.animateAll(function(){y("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(i===Ye&&!Ye.animated||i===n&&!i.animated)&&(Tc=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(Ye.parentNode[Qi]._isOutsideThisEl(t.target),!Z&&el(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function F(){eo=So(Ye),zr=So(Ye,a.draggable),Fi({sortable:g,name:"change",toEl:n,newIndex:eo,newDraggableIndex:zr,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=ws(i,a.draggable,n,!0),y("dragOver"),Rt.eventCanceled)return m;if(Ye.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return S(!1);if(zp=!1,c&&!a.disabled&&(u?d||(r=Tn!==vn):ni===this||(this.lastPutMode=Up.checkPull(this,c,Ye,t))&&l.checkPut(this,c,Ye,t))){if(f=this._getDirection(t,i)==="vertical",o=jn(Ye),y("dragOverValid"),Rt.eventCanceled)return m;if(r)return Tn=vn,b(),this._hideClone(),y("revert"),Rt.eventCanceled||(Ja?vn.insertBefore(Ye,Ja):vn.appendChild(Ye)),S(!0);var C=ow(n,a.draggable);if(!C||s7(t,f,this)&&!C.animated){if(C===Ye)return S(!1);if(C&&n===t.target&&(i=C),i&&(s=jn(i)),Jp(vn,n,Ye,o,i,s,t,!!i)!==!1)return b(),n.appendChild(Ye),Tn=n,F(),S(!0)}else if(C&&o7(t,f,this)){var R=Dc(n,0,a,!0);if(R===Ye)return S(!1);if(i=R,s=jn(i),Jp(vn,n,Ye,o,i,s,t,!1)!==!1)return b(),n.insertBefore(Ye,R),Tn=n,F(),S(!0)}else if(i.parentNode===n){s=jn(i);var E=0,x,k=Ye.parentNode!==n,O=!QK(Ye.animated&&Ye.toRect||o,i.animated&&i.toRect||s,f),A=f?"top":"left",D=u1(i,"top","top")||u1(Ye,"top","top"),P=D?D.scrollTop:void 0;Tc!==i&&(x=s[A],Ad=!1,Kp=!O&&a.invertSwap||k),E=r7(t,i,s,f,O?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Kp,Tc===i);var V;if(E!==0){var H=So(Ye);do H-=E,V=Tn.children[H];while(V&&(Et(V,"display")==="none"||V===Pt))}if(E===0||V===i)return S(!1);Tc=i,Id=E;var te=i.nextElementSibling,B=!1;B=E===1;var G=Jp(vn,n,Ye,o,i,s,t,B);if(G!==!1)return(G===1||G===-1)&&(B=G===1),uw=!0,setTimeout(i7,30),b(),B&&!te?n.appendChild(Ye):i.parentNode.insertBefore(Ye,B?te:i),D&&f1(D,0,P-D.scrollTop),Tn=Ye.parentNode,x!==void 0&&!Kp&&(qp=Math.abs(x-jn(i)[A])),F(),S(!0)}if(n.contains(Ye))return S(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Wt(document,"mousemove",this._onTouchMove),Wt(document,"touchmove",this._onTouchMove),Wt(document,"pointermove",this._onTouchMove),Wt(document,"dragover",el),Wt(document,"mousemove",el),Wt(document,"touchmove",el)},_offUpEvents:function(){var t=this.el.ownerDocument;Wt(t,"mouseup",this._onDrop),Wt(t,"touchend",this._onDrop),Wt(t,"pointerup",this._onDrop),Wt(t,"touchcancel",this._onDrop),Wt(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;if(eo=So(Ye),zr=So(Ye,i.draggable),Ni("drop",this,{evt:t}),Tn=Ye&&Ye.parentNode,eo=So(Ye),zr=So(Ye,i.draggable),Rt.eventCanceled){this._nulling();return}Fc=!1,Kp=!1,Ad=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),hw(this.cloneId),hw(this._dragStartId),this.nativeDraggable&&(Wt(document,"drop",this),Wt(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),_d&&Et(document.body,"user-select",""),Et(Ye,"transform",""),t&&(Pd&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Pt&&Pt.parentNode&&Pt.parentNode.removeChild(Pt),(vn===Tn||ni&&ni.lastPutMode!=="clone")&&Pn&&Pn.parentNode&&Pn.parentNode.removeChild(Pn),Ye&&(this.nativeDraggable&&Wt(Ye,"dragend",this),dw(Ye),Ye.style["will-change"]="",Pd&&!Fc&&Ji(Ye,ni?ni.options.ghostClass:this.options.ghostClass,!1),Ji(Ye,this.options.chosenClass,!1),Fi({sortable:this,name:"unchoose",toEl:Tn,newIndex:null,newDraggableIndex:null,originalEvent:t}),vn!==Tn?(eo>=0&&(Fi({rootEl:Tn,name:"add",toEl:Tn,fromEl:vn,originalEvent:t}),Fi({sortable:this,name:"remove",toEl:Tn,originalEvent:t}),Fi({rootEl:Tn,name:"sort",toEl:Tn,fromEl:vn,originalEvent:t}),Fi({sortable:this,name:"sort",toEl:Tn,originalEvent:t})),ni&&ni.save()):eo!==xc&&eo>=0&&(Fi({sortable:this,name:"update",toEl:Tn,originalEvent:t}),Fi({sortable:this,name:"sort",toEl:Tn,originalEvent:t})),Rt.active&&((eo==null||eo===-1)&&(eo=xc,zr=Td),Fi({sortable:this,name:"end",toEl:Tn,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Ni("nulling",this),vn=Ye=Tn=Pt=Ja=Pn=Wp=Ur=Qa=Yo=Pd=eo=zr=xc=Td=Tc=Id=ni=Up=Rt.dragged=Rt.ghost=Rt.clone=Rt.active=null,Yp.forEach(function(t){t.checked=!0}),Yp.length=aw=lw=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ye&&(this._onDragOver(t),n7(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,i=this.el.children,o=0,s=i.length,r=this.options;o<s;o++)n=i[o],ws(n,r.draggable,this.el,!1)&&t.push(n.getAttribute(r.dataIdAttr)||l7(n));return t},sort:function(t,n){var i={},o=this.el;this.toArray().forEach(function(s,r){var a=o.children[r];ws(a,this.options.draggable,o,!1)&&(i[s]=a)},this),n&&this.captureAnimationState(),t.forEach(function(s){i[s]&&(o.removeChild(i[s]),o.appendChild(i[s]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return ws(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var i=this.options;if(n===void 0)return i[t];var o=Fd.modifyOption(this,t,n);typeof o<"u"?i[t]=o:i[t]=n,t==="group"&&w1(i)},destroy:function(){Ni("destroy",this);var t=this.el;t[Qi]=null,Wt(t,"mousedown",this._onTapStart),Wt(t,"touchstart",this._onTapStart),Wt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Wt(t,"dragover",this),Wt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),jp.splice(jp.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Ur){if(Ni("hideClone",this),Rt.eventCanceled)return;Et(Pn,"display","none"),this.options.removeCloneOnHide&&Pn.parentNode&&Pn.parentNode.removeChild(Pn),Ur=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Ur){if(Ni("showClone",this),Rt.eventCanceled)return;Ye.parentNode==vn&&!this.options.group.revertClone?vn.insertBefore(Pn,Ye):Ja?vn.insertBefore(Pn,Ja):vn.appendChild(Pn),this.options.group.revertClone&&this.animate(Ye,Pn),Et(Pn,"display",""),Ur=!1}}};function n7(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Jp(e,t,n,i,o,s,r,a){var l,c=e[Qi],u=c.options.onMove,d;return window.CustomEvent&&!lr&&!Dd?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=i,l.related=o||t,l.relatedRect=s||jn(t),l.willInsertAfter=a,l.originalEvent=r,e.dispatchEvent(l),u&&(d=u.call(c,l,r)),d}function dw(e){e.draggable=!1}function i7(){uw=!1}function o7(e,t,n){var i=jn(Dc(n.el,0,n.options,!0)),o=10;return t?e.clientX<i.left-o||e.clientY<i.top&&e.clientX<i.right:e.clientY<i.top-o||e.clientY<i.bottom&&e.clientX<i.left}function s7(e,t,n){var i=jn(ow(n.el,n.options.draggable)),o=10;return t?e.clientX>i.right+o||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+o}function r7(e,t,n,i,o,s,r,a){var l=i?e.clientY:e.clientX,c=i?n.height:n.width,u=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!r){if(a&&qp<c*o){if(!Ad&&(Id===1?l>u+c*s/2:l<d-c*s/2)&&(Ad=!0),Ad)h=!0;else if(Id===1?l<u+qp:l>d-qp)return-Id}else if(l>u+c*(1-o)/2&&l<d-c*(1-o)/2)return a7(t)}return h=h||r,h&&(l<u+c*s/2||l>d-c*s/2)?l>u+c/2?1:-1:0}function a7(e){return So(Ye)<So(e)?1:-1}function l7(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function c7(e){Yp.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&Yp.push(i)}}function Qp(e){return setTimeout(e,0)}function hw(e){return clearTimeout(e)}Zp&&Kt(document,"touchmove",function(e){(Rt.active||Fc)&&e.cancelable&&e.preventDefault()}),Rt.utils={on:Kt,off:Wt,css:Et,find:c1,is:function(t,n){return!!ws(t,n,t,!1)},extend:zK,throttle:h1,closest:ws,toggleClass:Ji,clone:p1,index:So,nextTick:Qp,cancelNextTick:hw,detectDirection:C1,getChild:Dc},Rt.get=function(e){return e[Qi]},Rt.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(Rt.utils=Cs(Cs({},Rt.utils),i.utils)),Fd.mount(i)})},Rt.create=function(e,t){return new Rt(e,t)},Rt.version=GK;var $n=[],kd,fw,pw=!1,gw,mw,eg,Od;function u7(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var i=n.originalEvent;this.sortable.nativeDraggable?Kt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Kt(document,"pointermove",this._handleFallbackAutoScroll):i.touches?Kt(document,"touchmove",this._handleFallbackAutoScroll):Kt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var i=n.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?Wt(document,"dragover",this._handleAutoScroll):(Wt(document,"pointermove",this._handleFallbackAutoScroll),Wt(document,"touchmove",this._handleFallbackAutoScroll),Wt(document,"mousemove",this._handleFallbackAutoScroll)),E1(),tg(),jK()},nulling:function(){eg=fw=kd=pw=Od=gw=mw=null,$n.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,i){var o=this,s=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,a=document.elementFromPoint(s,r);if(eg=n,i||this.options.forceAutoScrollFallback||Dd||lr||_d){vw(n,this.options,a,i);var l=Wr(a,!0);pw&&(!Od||s!==gw||r!==mw)&&(Od&&E1(),Od=setInterval(function(){var c=Wr(document.elementFromPoint(s,r),!0);c!==l&&(l=c,tg()),vw(n,o.options,c,i)},10),gw=s,mw=r)}else{if(!this.options.bubbleScroll||Wr(a,!0)===bs()){tg();return}vw(n,this.options,Wr(a,!1),!1)}}},rr(e,{pluginName:"scroll",initializeByDefault:!0})}function tg(){$n.forEach(function(e){clearInterval(e.pid)}),$n=[]}function E1(){clearInterval(Od)}var vw=h1(function(e,t,n,i){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,r=t.scrollSensitivity,a=t.scrollSpeed,l=bs(),c=!1,u;fw!==n&&(fw=n,tg(),kd=t.scroll,u=t.scrollFn,kd===!0&&(kd=Wr(n,!0)));var d=0,h=kd;do{var f=h,g=jn(f),m=g.top,y=g.bottom,b=g.left,S=g.right,F=g.width,C=g.height,R=void 0,E=void 0,x=f.scrollWidth,k=f.scrollHeight,O=Et(f),A=f.scrollLeft,D=f.scrollTop;f===l?(R=F<x&&(O.overflowX==="auto"||O.overflowX==="scroll"||O.overflowX==="visible"),E=C<k&&(O.overflowY==="auto"||O.overflowY==="scroll"||O.overflowY==="visible")):(R=F<x&&(O.overflowX==="auto"||O.overflowX==="scroll"),E=C<k&&(O.overflowY==="auto"||O.overflowY==="scroll"));var P=R&&(Math.abs(S-o)<=r&&A+F<x)-(Math.abs(b-o)<=r&&!!A),V=E&&(Math.abs(y-s)<=r&&D+C<k)-(Math.abs(m-s)<=r&&!!D);if(!$n[d])for(var H=0;H<=d;H++)$n[H]||($n[H]={});($n[d].vx!=P||$n[d].vy!=V||$n[d].el!==f)&&($n[d].el=f,$n[d].vx=P,$n[d].vy=V,clearInterval($n[d].pid),(P!=0||V!=0)&&(c=!0,$n[d].pid=setInterval((function(){i&&this.layer===0&&Rt.active._onTouchMove(eg);var te=$n[this.layer].vy?$n[this.layer].vy*a:0,B=$n[this.layer].vx?$n[this.layer].vx*a:0;typeof u=="function"&&u.call(Rt.dragged.parentNode[Qi],B,te,e,eg,$n[this.layer].el)!=="continue"||f1($n[this.layer].el,B,te)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==l&&(h=Wr(h,!1)));pw=c}},30),R1=function(t){var n=t.originalEvent,i=t.putSortable,o=t.dragEl,s=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(n){var c=i||s;a();var u=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(u.clientX,u.clientY);l(),c&&!c.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function yw(){}yw.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var o=Dc(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:R1},rr(yw,{pluginName:"revertOnSpill"});function Cw(){}Cw.prototype={onSpill:function(t){var n=t.dragEl,i=t.putSortable,o=i||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:R1},rr(Cw,{pluginName:"removeOnSpill"}),Rt.mount(new u7),Rt.mount(Cw,yw);function d7(e,t){return Object.values(e).indexOf(t)}function h7(e,t,n,i){if(!e)return[];const o=Object.values(e),s=t.length-i;return[...t].map((a,l)=>l>=s?o.length:o.indexOf(a))}function f7(e){return["transition-group","TransitionGroup"].includes(e)}function D1(e){if(!e||e.length!==1)return!1;const[{type:t}]=e;return t?f7(t.name):!1}function p7(e,t){return t?{...t.props,...t.attrs}:e}const ww=["Start","Add","Remove","Update","End"],bw=["Choose","Unchoose","Sort","Filter","Clone"],g7=["Move",...ww,...bw].map(e=>"on"+e);let Sw=null;const m7=ct({name:"VueDraggableNext",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},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}},emits:["update:modelValue","move","change",...ww.map(e=>e.toLowerCase()),...bw.map(e=>e.toLowerCase())],setup(e,{emit:t,slots:n,attrs:i}){const o=Y(!1),s=Y(!1),r=Y(0),a=Y(0),l=Y([]),c=Y(null),u=Y(null),d=q(()=>e.list?e.list:e.modelValue),h=Di();function f(){return e.component?ZN(e.component):e.tag}function g(re){if(u.value)for(const Ie in re){const Me=n1(Ie);g7.indexOf(Me)===-1&&u.value.option(Me,re[Ie])}}function m(){var re;return((re=h==null?void 0:h.proxy)==null?void 0:re.$el.children)||[]}async function y(){var re;await Xt(),l.value=h7(m(),((re=h==null?void 0:h.proxy)==null?void 0:re.$el.children)||[],o.value,a.value)}function b(re){const Ie=d7(m()||[],re);if(Ie===-1)return null;const Me=d.value?d.value[Ie]:null;return{index:Ie,element:Me}}function S(re){Xt(()=>t("change",re))}function F(re){if(e.list){re(e.list);return}const Ie=[...e.modelValue||[]];re(Ie),t("update:modelValue",Ie)}function C(...re){F(Me=>Me.splice(...re))}function R(re,Ie){F(Je=>Je.splice(Ie,0,Je.splice(re,1)[0]))}function E(re){const Ie=l.value,Me=Ie.length;return re>Me-1?Me:Ie[re]}function x(){var Ie,Me;return n.default&&((Me=(Ie=n.default()[0])==null?void 0:Ie.component)==null?void 0:Me.proxy)||null}function k(re){if(!e.noTransitionOnDrag||!o.value)return;const Ie=m();Ie[re]&&(Ie[re].data=null);const Me=x();Me&&(Me.children=[],Me.kept=void 0)}function O(re){y(),c.value=b(re.item),c.value&&(re.item._underlying_vm_=e.clone(c.value.element),Sw=re.item)}function A(re){const Ie=re.item._underlying_vm_;if(Ie===void 0)return;iw(re.item);const Me=E(re.newIndex);C(Me,0,Ie),y(),S({added:{element:Ie,newIndex:Me}})}function D(re){var Me;if(i1((Me=h==null?void 0:h.proxy)==null?void 0:Me.$el,re.item,re.oldIndex),re.pullMode==="clone"){iw(re.clone);return}if(!c.value)return;const Ie=c.value.index;C(Ie,1),k(Ie),S({removed:{element:c.value.element,oldIndex:Ie}})}function P(re){var Je,gt;iw(re.item),i1(re.from,re.item,re.oldIndex);const Ie=(Je=c.value)==null?void 0:Je.index,Me=E(re.newIndex);R(Ie,Me),S({moved:{element:(gt=c.value)==null?void 0:gt.element,oldIndex:Ie,newIndex:Me}})}function V(re,Ie){Object.prototype.hasOwnProperty.call(re,Ie)&&(re[Ie]+=r.value)}function H(re){return re.__draggable_component__}function te({to:re,related:Ie}){const Me=H(re);if(!Me)return{component:Me};const Je=Me.realList,gt={list:Je,component:Me};if(re!==Ie&&Je&&Me.getUnderlyingVm){const Ft=Me.getUnderlyingVm(Ie);if(Ft)return Object.assign(Ft,gt)}return gt}function B(re,Ie){const Me=[...Ie.to.children].filter(He=>He.style.display!=="none");if(Me.length===0)return 0;const Je=Me.indexOf(Ie.related),gt=re.component.getVmIndex(Je);return Me.indexOf(Sw)!==-1||!Ie.willInsertAfter?gt:gt+1}const G=()=>{var gt,Ft;const re={};ww.forEach(He=>{re["on"+He]=$(He)}),bw.forEach(He=>{re["on"+He]=Z.bind(null,He)});const Ie=Object.keys(i).reduce((He,en)=>(He[n1(en)]=i[en],He),{}),Me=Object.assign({},Ie,re,{onMove:(He,en)=>ce(He,en)});"draggable"in Me||(Me.draggable=">*");const Je=((gt=h==null?void 0:h.proxy)==null?void 0:gt.$el.nodeType)===1?h.proxy.$el:((Ft=h==null?void 0:h.proxy)==null?void 0:Ft.$el.parentElement)||null;Je&&(u.value=new Rt(Je,Me),Je.__draggable_component__=h==null?void 0:h.proxy,y())};function Z(re,Ie){Xt(()=>t(re.toLowerCase(),Ie))}function $(re){return Ie=>{if(d.value!==null){const Me="onDrag"+re,Je=xe[Me];Je&&Je(Ie)}Z(re,Ie)}}function ce(re,Ie){const Me=e.move;if(!Me||!d.value)return!0;const Je=te(re),gt=c.value,Ft=B(Je,re);gt&&Object.assign(gt,{futureIndex:Ft});const He=Object.assign({},re,{relatedContext:Je,draggedContext:gt});return Me(He,Ie)}function ue(){y(),Sw=null}const xe={onDragStart:O,onDragAdd:A,onDragRemove:D,onDragUpdate:P,onDragMove:ce,onDragEnd:ue};return Sn(()=>{G()}),e.list!==null&&e.modelValue!==null&&MK.error("list props are mutually exclusive! Please set one."),{getTag:f,realList:d,visibleIndexes:l,noneFunctionalComponentMode:s,headerOffset:r,footerOffset:a,transitionMode:o,computeIndexes:y,updateOptions:g,getChildrenNodes:m,getUnderlyingVm:b,emitChanges:S,alterList:F,spliceList:C,updatePosition:R,getVmIndex:E,getComponent:x,resetTransitionData:k,onDragStart:O,onDragAdd:A,onDragRemove:D,onDragUpdate:P,updateProperty:V,onDragMove:ce,onDragEnd:ue,mounted:G,context:c,sortableInstance:u,getRelatedContextFromMoveEvent:te,getTargetedComponent:H,computeFutureIndex:B}},render(){const e=this.getTag(),t=p7(this.$attrs,this.componentData);if(typeof e=="string"){const i=this.$slots.default&&typeof this.$slots.default=="function"?this.$slots.default():null;return i?(this.transitionMode=D1(i),Ov(e,t,i)):Ov(e,t,[])}const n=this.$slots.default?{default:this.$slots.default}:{};if(this.$slots.default){const i=typeof this.$slots.default=="function"?this.$slots.default():null;this.transitionMode=D1(i||[])}return Ov(e,t,n)}}),v7=Ct(ct({__name:"DragDropList",props:{modelValue:{},groupName:{},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["changed"],setup(e,{emit:t}){const n=Y([]),i=e,o=t,s=Y({}),r=()=>{n.value=i.modelValue.map(l=>({id:l.field,name:l.headerName,...l}))||[],i.modelValue.forEach(l=>{s.value[l.field]={...l}})};ut(()=>i.modelValue,l=>{r()},{immediate:!0}),ut(n,l=>{if(l.length===i.modelValue.length&&!l.every((u,d)=>u.id===i.modelValue[d].field)){const u=l.map(d=>s.value[d.id]);o("changed",u)}});const a=l=>!i.readOnly;return(l,c)=>(K(),Xe(U(m7),{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=u=>n.value=u),tag:"transition-group",disabled:i.readOnly,onMove:a,"component-data":{tag:"div",type:"transition",name:"fade"},animation:300,easing:"cubic-bezier(0.4, 0, 0.2, 1)","ghost-class":"ghost","chosen-class":"chosen","drag-class":"drag"},{default:Ee(()=>[(K(!0),Ce(Ot,null,Un(n.value,u=>(K(),Ce("div",{key:u.id,class:"fade-item"},[_t(l.$slots,"item",{item:u},()=>[dt(bt(u.name),1)],!0)]))),128))]),_:3},8,["modelValue","disabled"]))}}),[["__scopeId","data-v-f4ff0810"]]),Ew=Ct(ct({__name:"DragDropItem",props:{item:{},disabled:{type:Boolean},readOnly:{type:Boolean},columnStates:{}},emits:["toggle-column"],setup(e,{emit:t}){const n=mn,i=e,o=Y(!1),s=Y(i.columnStates[String(i.item.field)]||!1),r=t,a=c=>{s.value=c},l=q(()=>{var c,u;return(u=(c=i.item)==null?void 0:c.field)==null?void 0:u.includes("metric")});return ut(()=>s.value,()=>{r("toggle-column",i.item.field,i.item.required)}),(c,u)=>(K(),Ce("div",{key:e.item.field,class:z([c.$style["column-config__item"],{[c.$style.disabled]:e.disabled||i.readOnly}])},[ve(nw,{id:`col-${e.item.field}`,"model-value":s.value,"onUpdate:modelValue":a,disabled:e.disabled},null,8,["id","model-value","disabled"]),ve(mt,{color:e.disabled?"var(--disabled-color)":"var(--primary-color)",source:"remote",src:"GripVertical",class:z(c.$style.handler)},null,8,["color","class"]),ot((K(),Ce("span",{class:z(c.$style["column-config__item-label"])},[dt(bt(e.item.headerName),1)],2)),[[U(n),{content:e.item.headerName}]]),l.value?ot((K(),Ce("div",{key:0,class:z(c.$style.badge),onHover:u[0]||(u[0]=d=>o.value=!0)},[...u[1]||(u[1]=[dt(" M ",-1)])],34)),[[U(n),"Metric"]]):it("",!0)],2))}}),[["__cssModules",{$style:{"column-config__item":"_column-config__item_qpc5s_1",disabled:"_disabled_qpc5s_13",readOnly:"_readOnly_qpc5s_17","column-config__item--pinned":"_column-config__item--pinned_qpc5s_20",handler:"_handler_qpc5s_27",badge:"_badge_qpc5s_31","column-config__item-label":"_column-config__item-label_qpc5s_45"}}]]),y7=Ct(ct({__name:"TableCustomization",props:{modelValue:{},readOnly:{type:Boolean},disabled:{type:Boolean},checkboxColumn:{}},emits:["update:modelValue","input"],setup(e,{emit:t}){const n=mn,i=e,o=t,s=Y(""),r=Y([]),a=Y({}),{triggerRef:l,popupRef:c,isVisible:u}=tr({placement:"bottom-end",trigger:"click"}),d=q(()=>r.value.filter(C=>C.pinned==="left"&&C.field&&C.headerName)),h=q(()=>r.value.filter(C=>C.pinned==="right"&&C.field||C.field==="blank")),f=q({get:()=>r.value.filter(C=>!C.pinned&&C.field&&C.field!=="blank"),set:C=>{r.value=[...d.value,...C,...h.value]}}),g=q(()=>{if(!s.value)return{};const C=s.value.toLowerCase();return[...r.value,...f.value].reduce((R,E)=>{var x;return(x=E.headerName)!=null&&x.toLowerCase().includes(C)&&E.field&&(R[E.field]=!0),R},{})}),m=q(()=>i.modelValue),y=()=>{const C={};r.value.forEach(R=>{R.field&&(C[R.field]=!R.hide)}),a.value=C},b=()=>{const C=r.value.map(R=>({...R,hide:R.field?!a.value[R.field]:!1}));o("update:modelValue",C),o("input",C)},S=C=>{const R=[...d.value,...C,...h.value];i.checkboxColumn&&R.unshift(i.checkboxColumn),r.value=R,b()},F=(C,R)=>{!R&&C&&(a.value[C]=!a.value[C],b())};return ut(m,C=>{C&&C.length>0&&(r.value=[...C],y())},{immediate:!0}),(C,R)=>(K(),Ce("div",{class:z(C.$style["table-customization"])},[we("div",{ref_key:"triggerRef",ref:l},[_t(C.$slots,"trigger",{},()=>[ot((K(),Xe(pt,{variant:["secondary"],disabled:i.disabled,actived:U(u)},{prefix:Ee(()=>[ve(mt,{src:"Gear"})]),default:Ee(()=>[R[1]||(R[1]=dt(" Customise ",-1))]),_:1},8,["disabled","actived"])),[[U(n),"Customise table columns"]])])],512),we("div",{ref_key:"popupRef",ref:c,class:z(C.$style["tippy-content-wrapper"])},[we("div",{class:z(C.$style["column-config"])},[ve(qC,{modelValue:s.value,"onUpdate:modelValue":R[0]||(R[0]=E=>s.value=E)},null,8,["modelValue"]),we("div",{class:z(C.$style["column-config__header"])},[...R[2]||(R[2]=[we("label",null,"Manage columns",-1)])],2),Object.entries(g.value).length===0&&s.value.length>0?(K(),Ce("div",{key:0,class:z(C.$style["no-columns"])},[...R[3]||(R[3]=[dt(" No results. ",-1),we("br",null,null,-1),dt(" Try another search. ",-1)])],2)):it("",!0),we("div",{class:z(C.$style["column-config__list"])},[d.value.length>0?(K(),Ce("div",{key:0,class:z(C.$style["column-config__pinned-section"])},[(K(!0),Ce(Ot,null,Un(d.value,E=>ot((K(),Xe(Ew,{key:E.field,item:E,disabled:!0,readOnly:!0,columnStates:a.value},null,8,["item","columnStates"])),[[us,g.value[E.field]||!s.value]])),128))],2)):it("",!0),ve(v7,{"model-value":f.value,"group-name":"columns",onChanged:S,disabled:i.disabled,readOnly:i.readOnly},{item:Ee(({item:E})=>[ot((K(),Xe(Ew,{key:E.id,item:E,columnStates:a.value,disabled:i.disabled,readOnly:i.readOnly,onToggleColumn:F},null,8,["item","columnStates","disabled","readOnly"])),[[us,g.value[E.field]||!s.value]])]),_:1},8,["model-value","disabled","readOnly"]),h.value.length>0?(K(),Ce("div",{key:1,class:z(C.$style["column-config__pinned-section"])},[(K(!0),Ce(Ot,null,Un(h.value.filter(E=>{var x;return E.headerName&&((x=E.headerName)==null?void 0:x.length)>0}),E=>ot((K(),Xe(Ew,{key:E.field,item:E,disabled:i.disabled,readOnly:i.readOnly,columnStates:a.value},null,8,["item","disabled","readOnly","columnStates"])),[[us,g.value[E.field]||!s.value]])),128))],2)):it("",!0)],2),we("div",{class:z(C.$style["column-config__footer"])},[ve(pt,{type:"button",variant:"secondary",disabled:!0},{default:Ee(()=>[...R[4]||(R[4]=[we("span",null,"Add Column",-1)])]),_:1})],2)],2)],2)],2))}}),[["__cssModules",{$style:{"table-customization":"_table-customization_z1p39_1","table-customization__trigger":"_table-customization__trigger_z1p39_7","column-config":"_column-config_z1p39_23","column-config__header":"_column-config__header_z1p39_33","icon-color":"_icon-color_z1p39_43","column-config__list":"_column-config__list_z1p39_46","column-config__section-label":"_column-config__section-label_z1p39_50","column-config__footer":"_column-config__footer_z1p39_59","column-config__add-button":"_column-config__add-button_z1p39_62","cs-icon":"_cs-icon_z1p39_80","no-columns":"_no-columns_z1p39_84"}}]]),C7={class:"wrapper-suffix"},w7=Ct(ct({__name:"StatusSelect",props:{modelValue:{},getStatusFunc:{type:Function},workspaceId:{},id:{}},emits:["updated","error","cancel","update:modelValue"],setup(e,{expose:t,emit:n}){const i=mn,o={PER_PAGE:20,INITIAL_PAGE:1},s=e,r=Y(s.modelValue),a=n,l=q(()=>f.value.find(D=>D.id===r.value)||null),c=D=>{r.value=D.id,a("update:modelValue",D.id)},u=q(()=>{if(!r.value)return{backgroundColor:"#A6A6A6",border:"1px solid #A6A6A6"};const D=f.value.find(V=>V.id===r.value),P=String((D==null?void 0:D.color)||"white");return{backgroundColor:P,border:my(P,"white")?"1px solid #ccc":"1px solid #fff"}}),d=Y(null),h=()=>{var D;(D=d.value)==null||D.focus()},f=Y([]),g=Y(!1),m=Y(!1),y=Y(null),b=Y(o.INITIAL_PAGE),S=Y(!0),F=Y(0),C=Y(""),R=q(()=>!!(s.id&&s.workspaceId)),E=D=>{const P=f.value.find(V=>V.id===D.value);P&&c(P)},x=D=>({label:D.name,value:D.id,selected:r.value===D.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:D,id:D.id,color:D.color}),k=async(D=o.INITIAL_PAGE,P="",V=!1)=>{var H;if(!R.value){console.error("Missing required props",s);return}V?m.value=!0:g.value=!0,y.value=null;try{const te={workspaceId:String(s.workspaceId),itemIds:s.id,page:D,perPage:o.PER_PAGE,name_like:P.trim()};if(s.getStatusFunc===void 0)throw new Error("API service getAssignableStatus is undefined");const B=await s.getStatusFunc(te);if(!B){V||(f.value=[]),S.value=!1;return}const G=B.data.map(x);f.value=V?[...f.value,...G]:G,F.value=((H=B.meta)==null?void 0:H.total)??B.data.length,S.value=f.value.length<F.value,b.value=D}catch(te){console.error("Error fetching statuses:",te),y.value="Failed to load statuses",V||(f.value=[]),S.value=!1,a("error",y.value)}finally{g.value=!1,m.value=!1}},O=async()=>{!S.value||m.value||await k(b.value+1,C.value,!0)};ut([()=>s.id,()=>s.workspaceId],()=>{k()},{deep:!0,immediate:!0});const A=async D=>{C.value=D,b.value=o.INITIAL_PAGE,await k(o.INITIAL_PAGE,D,!1)};return t({focus:h,clear:()=>{r.value=null,a("update:modelValue",null)}}),(D,P)=>(K(),Xe(KP,{onOpen:h,placement:"bottom-start","max-width":500},{trigger:Ee(({open:V})=>[ve(sr,{actived:V,class:z(D.$style["status-wrapper"])},{suffix:Ee(()=>[we("div",C7,[ve(mt,{src:"ChevronUp",source:"remote",class:z([[D.$style["dropdown-icon"]],{[D.$style["dropdown-icon-show"]]:!V}])},null,8,["class"])])]),default:Ee(()=>{var H;return[we("div",{class:z(D.$style.status)},[we("div",{class:z(D.$style["color-indicator"]),style:gn(u.value)},null,6),ot((K(),Ce("span",{style:{"max-width":"400px"},class:z({[D.$style.empty]:!l.value})},[dt(bt(l.value?l.value.label:"Select status"),1)],2)),[[U(i),{content:((H=l.value)==null?void 0:H.label)||void 0}]])],2)]}),_:2},1032,["actived","class"])]),content:Ee(({closeDropdown:V})=>{var H;return[ve(YC,{ref_key:"popupRef",ref:d,"selected-id":(H=l.value)==null?void 0:H.id,options:f.value,loading:g.value,"loading-more":m.value,"has-more":S.value,error:y.value,onSearch:A,onSelect:te=>{E(te),V()},onLoadMore:O,onCancel:P[0]||(P[0]=te=>a("cancel")),style:{width:"500px"}},null,8,["selected-id","options","loading","loading-more","has-more","error","onSelect"])]}),_:1}))}}),[["__cssModules",{$style:{"status-wrapper":"_status-wrapper_fb8p7_1",status:"_status_fb8p7_1","color-indicator":"_color-indicator_fb8p7_12",empty:"_empty_fb8p7_21","dropdown-icon":"_dropdown-icon_fb8p7_25","dropdown-icon-show":"_dropdown-icon-show_fb8p7_30",options:"_options_fb8p7_34"}}]]),b7=Ct(ct({name:"EmptyData",__name:"EmptyData",props:{isSearching:{type:Boolean},isFiltering:{type:Boolean}},setup(e){const t=e,n={noData:"No data available.",noSearchResults:"No results. Try another search.",noFilterResults:"No results. Try another filter."},i=q(()=>t.isSearching||t.isFiltering?"NoDataSearchFilter":"ClickToCreate"),o=q(()=>t.isSearching?n.noSearchResults:t.isFiltering?n.noFilterResults:n.noData);return(s,r)=>(K(),Ce("div",{class:z(s.$style["no-data-item-table"])},[we("div",{class:z(s.$style.visual)},[ve(Np,{source:"remote",src:i.value,ratio:"4/3",maxWidth:500,maxHeight:350},null,8,["src"])],2),we("div",{class:z(s.$style.description)},bt(o.value),3)],2))}}),[["__cssModules",{$style:{"no-data-item-table":"_no-data-item-table_oh0wi_1",visual:"_visual_oh0wi_12",description:"_description_oh0wi_19"}}]]),_1=Sc("sortStore",()=>{const e=Y({}),t={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"due_date",status:"template_flow_status",assignees:"assignee"},n={start_asc:{column:"start_date",direction:"asc"},start_desc:{column:"start_date",direction:"desc"},due_asc:{column:"due_date",direction:"asc"},due_desc:{column:"due_date",direction:"desc"}},i=q(()=>{const a=e.value;return Object.values(a).filter(c=>c.sort!=="none"&&!!c.sort).map(c=>{let u;switch(c.colId){case"dateRange":u=n[c.sort];break;default:if(c.colId.includes("metric")){const[d,h]=c.colId.split("_");u={column:d,direction:c.sort,type:h}}else u={column:t[c.colId]||c.colId,direction:c.sort};break}return u})}),o=(a,l)=>{e.value={[a]:{colId:a,sort:l}}},s=()=>{e.value={}},r=Y(!1);return{sortingAPIConfiguration:i,sorts:e,setSort:o,clearSorting:s,isSortingRunning:r}}),tl=ct({name:"HeaderSorting",__name:"HeaderWrapper",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=e,n=_1(),{sorts:i}=ys(n),o=q(()=>{var l,c;return((c=(l=t.params)==null?void 0:l.column)==null?void 0:c.getColId())||"template_col_id"}),s=l=>{o.value&&n.setSort(o.value,l)},r=q(()=>t.params.headerType||void 0),a=Y("none");return ut(()=>i.value,Wo(()=>{if(o.value){const l=i.value[o.value];a.value=l?l.sort:"none"}},200),{deep:!0,immediate:!0}),(l,c)=>o.value?(K(),Xe(SK,_n({key:0},t,{"header-type":r.value,modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=u=>a.value=u),onSortChanged:s}),null,16,["header-type","modelValue"])):it("",!0)}});function S7(){const e=Mo({isCreating:!1,name:"",error:void 0});return{newItemData:e,validateNewItem:()=>{const o=e.name.trim();o.length===0?e.error="Name cannot be empty":o.length>25?e.error="Name cannot exceed 25 characters":e.error=void 0},openNewItemForm:()=>{e.isCreating=!0,e.name="",e.error=void 0},closeNewItemForm:()=>{e.isCreating=!1},resetNewItemForm:()=>{e.name="",e.error=void 0}}}const E7=Ct(ct({__name:"CreateNewScene",emits:["create-new-item"],setup(e,{expose:t,emit:n}){const i=uE("target"),o=uE("newSceneInputRef");ZP(i,f=>r());const s=()=>{a.isCreating=!0},r=()=>{a.isCreating=!1,c()},{newItemData:a,validateNewItem:l,resetNewItemForm:c,closeNewItemForm:u}=S7(),d=n,h=f=>{d("create-new-item",f)};return ut(()=>a.isCreating,f=>{f&&Xt(()=>{o.value&&o.value.focus()})}),t({show:s,hide:r}),(f,g)=>ot((K(),Ce("div",{class:z(f.$style.newRow),ref_key:"target",ref:i},[ve(WP,{ref_key:"newSceneInputRef",ref:o,modelValue:U(a).name,"onUpdate:modelValue":g[0]||(g[0]=m=>U(a).name=m),onChange:U(l),onEnter:g[1]||(g[1]=m=>h(U(a).name)),placeholder:"Enter name",focused:!0,"max-length":25},{clear:Ee(()=>[U(a).name.length==0?(K(),Xe(mt,{key:0,src:"Pen",color:"#f7941d"})):it("",!0)]),_:1},8,["modelValue","onChange"]),ve(pt,{onClick:g[2]||(g[2]=m=>h(U(a).name)),disabled:!!U(a).error||!U(a).name.trim()},{prefix:Ee(()=>[ve(mt,{src:"Plus"})]),default:Ee(()=>[g[3]||(g[3]=dt(" Create ",-1))]),_:1},8,["disabled"]),ve(pt,{variant:["secondary","icon"],onClick:U(u)},{prefix:Ee(()=>[ve(mt,{src:"XMarkSolid"})]),_:1},8,["onClick"])],2)),[[us,U(a).isCreating]])}}),[["__cssModules",{$style:{newRow:"_newRow_1vpac_1","warning-text":"_warning-text_1vpac_20","has-error":"_has-error_1vpac_25"}}]]),R7=["innerHTML"],D7=["accept"],x1=Ct(ct({__name:"FileUploader",props:{modelValue:{},acceptTypes:{default:()=>["xlsx","xls","csv"]}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=Y(null),o=k=>`<svg xmlns="http://www.w3.org/2000/svg" width="49" height="49" viewBox="0 0 49 49" fill="none">
97
97
  <g clip-path="url(#clip0)">
98
98
  <path d="M9.86719 3.56641C9.86719 2.05448 11.1053 0.816406 12.6172 0.816406H33.5136L45.3672 12.67V45.5664C45.3672 47.0783 44.1291 48.3164 42.6172 48.3164H12.6172C11.1053 48.3164 9.86719 47.0783 9.86719 45.5664V3.56641Z" stroke="#232323" stroke-width="0.5"/>
99
99
  <path d="M36.6172 12.5664H45.6172L33.6172 0.566406V9.56641C33.6172 11.2164 34.9672 12.5664 36.6172 12.5664Z" fill="#A6A6A6"/>
@@ -105,8 +105,8 @@ This will fail in production.`);r=qa,r._s.has(e)||(o?UC(e,t,i,r):HP(e,i,r),M.env
105
105
  <rect width="48" height="48" fill="white" transform="translate(0.617188 0.566406)"/>
106
106
  </clipPath>
107
107
  </defs>
108
- </svg>`,s=Rd(),{showMessage:r}=s,a=Y(!1),l=Y(!1),c=e,u=Y({file:null,format:null,isValid:void 0}),d=q(()=>{var k;return((k=c.acceptTypes)==null?void 0:k.map(O=>`.${O}`).join(","))||".xlsx,.xls,.csv"}),h=q(()=>u.value.format?o(u.value.format):""),f=q(()=>{var k;if(!u.value.isValid)return`Invalid file type. Please upload a ${(k=c.acceptTypes)==null?void 0:k.join(", ")} file.`}),g=q(()=>!!u.value.file),m=()=>{var k;(k=i.value)==null||k.click()},y=q(()=>u.value.file?u.value.file.name:""),b=k=>{var D;const O=c.acceptTypes||["xlsx","xls","csv"],A=(D=k.name.split(".").pop())==null?void 0:D.toLowerCase();return A?O.includes(A):!1},S=k=>{var A,D;const O=b(k);k&&O?(u.value.isValid=O,a.value=!O,u.value.file=k,u.value.format=((A=k.name.split(".").pop())==null?void 0:A.toLowerCase())||null):r(`Invalid file type. Please upload a ${(D=c.acceptTypes)==null?void 0:D.join(", ")} file.`,"error")},F=k=>{const O=k.target;if(O.files&&O.files[0]){const A=O.files[0];S(A)}},C=()=>{l.value=!0},R=()=>{l.value=!1},E=k=>{if(l.value=!1,k.dataTransfer&&k.dataTransfer.files&&k.dataTransfer.files[0]){const O=k.dataTransfer.files[0];S(O)}},x=n;return ut(u,k=>{x("update:modelValue",k)},{deep:!0}),t({internalValue:u,clear:()=>{i.value&&(i.value.value=""),u.value={file:null,format:null},a.value=!1}}),(k,O)=>{const A=df("tooltip");return K(),Ce("div",{class:z([k.$style["drop-area"],{[k.$style["is-dragging"]]:l.value,[k.$style.error]:a.value}]),onDragenter:on(C,["prevent"]),onDragover:on(C,["prevent"]),onDragleave:on(R,["prevent"]),onDrop:on(E,["prevent"]),onClick:m},[g.value?it("",!0):(K(),Ce("div",{key:0,class:z(k.$style["drop-area-content"])},[ve(mt,{src:"Upload",size:"24",color:"#3C9BFA"}),we("span",null,[ve(pt,{variant:["tertiary","text"],class:z(k.$style["upload-btn"])},{default:Ee(()=>[...O[0]||(O[0]=[dt(" Click to upload ",-1)])]),_:1},8,["class"]),O[1]||(O[1]=dt(" or drag and drop files here ",-1))])],2)),g.value?ot((K(),Ce("div",{key:1,class:z(k.$style["drop-area-file"])},[we("div",{innerHTML:h.value},null,8,R7),ot((K(),Ce("span",{class:z(k.$style["file-name"])},[dt(bt(y.value),1)],2)),[[A,{content:y.value}]])],2)),[[A,f.value]]):it("",!0),we("input",{ref_key:"fileInput",ref:i,type:"file",style:{display:"none"},accept:d.value,onChange:F},null,40,D7)],34)}}}),[["__cssModules",{$style:{"upload-btn":"_upload-btn_1ybeg_1","drop-area":"_drop-area_1ybeg_8","is-dragging":"_is-dragging_1ybeg_18",error:"_error_1ybeg_22","drop-area-content":"_drop-area-content_1ybeg_26","drop-area-file":"_drop-area-file_1ybeg_34","file-name":"_file-name_1ybeg_42","clear-button":"_clear-button_1ybeg_51"}}]]),F1=Sc("userStore",()=>{const e=Y(null),t=Y(null);return{user:e,setUser:o=>{e.value=o},setUserRoleId:o=>{t.value=o},workspaceUserRoleId:t}}),_7={width:"14",height:"12",viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x7=["fill"],F7=Ct(ct({__name:"FilterBox",emits:["update:assignees"],setup(e,{emit:t}){const{hide:n,isVisible:i,triggerRef:o,popupRef:s}=tr({offset:[0,0]}),r=t,a=F1(),{workspaceUserRoleId:l}=ys(a),c=q(()=>l.value||""),u=Y(!1);ut(u,h=>{h?r("update:assignees",[c.value]):r("update:assignees",[]),n()});const d=q(()=>u.value?"#000":"#3C9BFA");return(h,f)=>(K(),Ce("div",null,[ve(pt,{variant:"secondary",ref_key:"triggerRef",ref:o,actived:W(i),style:gn({border:u.value?"2px solid var(--primary-color)":"",backgroundColor:u.value?" #F0F7FF ":""})},{prefix:Ee(()=>[(K(),Ce("svg",_7,[we("path",{d:"M0.0998533 0.587105C0.269063 0.228176 0.627991 0 1.02538 0H12.1009C12.4983 0 12.8572 0.228176 13.0264 0.587105C13.1956 0.946034 13.1443 1.36906 12.8931 1.67671L8.20395 7.40675V10.6653C8.20395 10.9755 8.02961 11.2601 7.75016 11.3986C7.47071 11.537 7.13998 11.5088 6.8913 11.3216L5.25048 10.091C5.04281 9.9372 4.92232 9.69364 4.92232 9.4347V7.40675L0.230606 1.67415C-0.0180804 1.36906 -0.0719197 0.94347 0.0998533 0.587105Z",fill:d.value},null,8,x7)]))]),default:Ee(()=>[f[1]||(f[1]=dt(" Filter ",-1))]),_:1},8,["actived","style"]),we("div",{ref_key:"popupRef",ref:s},[we("div",{class:z(h.$style.row)},[ve(nw,{size:"small",label:"Show Archived Items",modelValue:u.value,"onUpdate:modelValue":f[0]||(f[0]=g=>u.value=g)},null,8,["modelValue"]),f[2]||(f[2]=dt(" Assigned to me ",-1))],2)],512)]))}}),[["__cssModules",{$style:{row:"_row_1akrr_1"}}]]),T7=ct({__name:"RatingRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean}},setup(e){const t=Go,n=e,i=q(()=>{var c,u;return{value:o.value,metricConfig:(u=(c=n.params)==null?void 0:c.colDef)==null?void 0:u.context,error:n.error,hovered:!1,readOnly:n.disabled,disabled:n.readOnly}}),o=Y(Number(n.value)),{componentState:s,ICON_SIZE:r,ratingParams:a,standardNameforIcon:l}=QP(i);return(c,u)=>W(s).isRating&&W(a).maxRating?ot((K(),Xe(PK,{key:0,modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=d=>o.value=d),params:W(a),readOnly:!0,disabled:n.disabled},{icon:Ee(()=>[ve(mt,{source:"rating",src:W(l)()||"Star",size:W(r)},null,8,["src","size"])]),_:1},8,["modelValue","params","disabled"])),[[W(t),{isLoading:W(s).isLoading,fullwidth:!0}]]):it("",!0)}}),P7={style:{color:"#ff5200"}},T1=Ct(ct({__name:"ImportVisual",props:{state:{},errorMessage:{},overwrite:{type:Boolean}},setup(e){return(t,n)=>(K(),Ce("div",{class:z(t.$style["inform-layout"])},[e.state==="importing"?(K(),Ce("div",{key:0,class:z(t.$style["import-error"]),style:{width:"500px"}},[ve(W(Np),{src:"UploadInProgress","max-height":180,"max-width":180})],2)):e.state==="error"?(K(),Ce("div",{key:1,class:z(t.$style["import-error"]),style:{width:"500px"}},[ve(W(Np),{src:"Unsuccessful1","max-height":180,"max-width":180}),we("span",{class:z(t.$style["step-title"])}," File doesn’t meet requirements. Check file and try again. ",2),we("div",P7,[we("span",{class:z(t.$style["step-description"])},"Error code",2),we("span",{class:z(t.$style["step-description"])},bt(e.errorMessage),3)])],2)):e.state==="success"?(K(),Ce(Ot,{key:2},[ve(W(Np),{src:"Successful1","max-height":180,"max-width":180}),we("span",{class:z(t.$style["step-title"])},bt(e.overwrite?`Existing data will be overwritten in the background.
109
- Refresh to see updates.`:"Work will be created in background. Refresh to see updates."),3)],64)):it("",!0)],2))}}),[["__cssModules",{$style:{"inform-layout":"_inform-layout_1og33_1","import-error":"_import-error_1og33_11","step-title":"_step-title_1og33_22","step-description":"_step-description_1og33_27"}}]]),P1=Ct(ct({__name:"DateRule",setup(e){const n=(()=>{const o=(h,f,g,m)=>{const y=document.createElement("span");return y.textContent=h,y.style.fontWeight=f,y.style.fontSize=g,y.style.color=m,y},s=document.createElement("div");s.style.display="flex",s.style.flexDirection="column";const r=document.createElement("div"),a=document.createElement("div"),l=o("Valid formats:","normal","14px","#02C39A"),c=o("Invalid formats:","normal","14px","#FF5200"),u=o(" 2025.12.31, 2025-12-31, 2025/12/31 ","normal","14px",""),d=o(" 12.31.2025, 2025.31.12","normal","14px","");return r.appendChild(l),r.appendChild(u),a.appendChild(c),a.appendChild(d),s.appendChild(r),s.appendChild(a),s.outerHTML})(),i=mn;return(o,s)=>(K(),Ce("div",{class:z(o.$style["date-format-guide"])},[we("span",{class:z(o.$style["step-title-2"])},[s[0]||(s[0]=dt(" Date format guide ",-1)),ot(ve(W(mt),{src:"InfoCircle",color:"#A6A6A6"},null,512),[[W(i),{content:W(n)}]])],2),we("div",{class:z(o.$style["date-rule-section"])},[s[3]||(s[3]=we("span",null,"Enter dates in one of these formats:",-1)),we("ul",{class:z(o.$style["step-description"])},[we("li",{class:z(o.$style["date-rule"])},[...s[1]||(s[1]=[we("b",null,"DD MM YYYY",-1),dt(" (Day-Month-Year) ",-1)])],2),we("li",{class:z(o.$style["date-rule"])},[...s[2]||(s[2]=[we("b",null,"YYYY MM DD",-1),dt(" (Year-Month-Day) ",-1)])],2)],2)],2)],2))}}),[["__cssModules",{$style:{"date-format-guide":"_date-format-guide_ef59d_1","step-title-2":"_step-title-2_ef59d_13","date-rule-section":"_date-rule-section_ef59d_25","step-description":"_step-description_ef59d_29","date-rule":"_date-rule_ef59d_25"}}]]),I7={key:1},A7=Ct(ct({__name:"PopupCreateScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const i=Y(null),o=e,s=()=>{i.value&&i.value.show()},r=Y(""),a=Y("idle"),l=q(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Create new work"})[a.value]),c=Y(null),u=Y({file:null,format:null}),{apiServices:d}=vo(!1,o),h=async A=>{var P,V;if(((P=d==null?void 0:d.value)==null?void 0:P.getStatuses)===void 0){console.error("API services not available",(V=d==null?void 0:d.value)==null?void 0:V.getStatuses);return}return await d.value.getStatuses(o.workspaceId,o.entityId,A)},f=Y(!1),g=async()=>{f.value=!0;const A=o.workspaceId,D=o.entityId;if(!A||!D||!d.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await d.value.downloadTemplate(A,D))throw new Error("No response from downloadTemplate API")}catch(P){console.error("Error downloading template:",P)}f.value=!1},m=async A=>{var V,H,te;const D=new FormData,P=((V=A.name.split(".").pop())==null?void 0:V.toString())||"";if(D.append("file",A),D.append("format",P),D.append("template_flow_status_id",R.value||""),!d.value||!o.workspaceId||!o.entityId){console.error("API services not available");return}try{const B=await d.value.addNewSceneViaImportFile(o.workspaceId,o.entityId,D);y()}catch(B){throw console.error("Error uploading file:",B),b(((te=(H=B.response)==null?void 0:H.data)==null?void 0:te.message)||"An unknown error occurred during file upload."),B}},y=()=>{a.value="success"},b=A=>{r.value=A,a.value="error"},S=n,F=()=>{S("import-success"),O()},C=async()=>{if(!u.value||!u.value.file){console.error("No file to upload");return}a.value="importing",await m(u.value.file)};t({open:s});const R=Y(null),E=q(()=>!u.value.file||!u.value.format||!u.value.isValid||!R.value),x=Y(null),k=()=>{var A,D;(A=c.value)==null||A.clear(),r.value="",u.value={file:null,format:null},R.value=null,(D=x==null?void 0:x.value)==null||D.clear(),a.value="idle"},O=()=>{var A;k(),(A=i.value)==null||A.hide()};return(A,D)=>(K(),Xe(W(t1),{"popup-name":l.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:i,onHidden:k},_u({default:Ee(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(K(),Xe(T1,{key:0,state:a.value,"error-message":r.value},null,8,["state","error-message"])):(K(),Ce("div",I7,[we("div",{class:z(A.$style["step-section"])},[we("span",{class:z(A.$style["step-title"])},"Step 1: Download sample file",2),we("span",{class:z(A.$style["step-description"])}," Get a sample file with all columns ready for editing. ",2),ve(W(pt),{class:z(A.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:f.value,onHandleClick:g},{prefix:Ee(()=>[ve(W(mt),{src:"Download"})]),default:Ee(()=>[D[2]||(D[2]=dt(" Download sample file ",-1))]),_:1},8,["class","disabled"])],2),we("div",{class:z(A.$style["step-section"])},[we("span",{class:z(A.$style["step-title"])},"Step 2: Upload your file (.xlsx, .xls, .csv)",2),ve(W(x1),{modelValue:u.value,"onUpdate:modelValue":D[0]||(D[0]=P=>u.value=P),ref_key:"filUploaderRef",ref:c},null,8,["modelValue"])],2),we("div",{class:z(A.$style["step-section"])},[we("span",{class:z(A.$style["step-title"])},"Step 3: Select status",2),we("span",{class:z(A.$style["step-description"])},"Choose a status for the new work.",2),ve(W(w7),{ref_key:"statusRef",ref:x,modelValue:R.value,"onUpdate:modelValue":D[1]||(D[1]=P=>R.value=P),"get-status-func":h,"workspace-id":o.workspaceId,id:o.entityId},null,8,["modelValue","workspace-id","id"])],2),we("div",{class:z(A.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ve(P1)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:Ee(()=>[ve(W(pt),{style:{flex:"1"},variant:"secondary",onClick:O},{default:Ee(()=>[...D[3]||(D[3]=[dt(" Cancel ",-1)])]),_:1}),ve(W(pt),{disabled:E.value,style:{flex:"1"},variant:"primary",onClick:C},{default:Ee(()=>[...D[4]||(D[4]=[dt(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:Ee(()=>[ve(W(pt),{style:{flex:"1"},variant:"primary",onClick:F},{default:Ee(()=>[...D[5]||(D[5]=[dt(" Close ",-1)])]),_:1})]),key:"1"}:a.value=="error"?{name:"footer",fn:Ee(()=>[ve(W(pt),{style:{flex:"1"},variant:"primary",onClick:k},{default:Ee(()=>[...D[6]||(D[6]=[dt(" Try Again ",-1)])]),_:1})]),key:"2"}:void 0]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_jt1wo_1","step-title":"_step-title_jt1wo_11","step-title-2":"_step-title-2_jt1wo_17","step-description":"_step-description_jt1wo_23","date-format-guide":"_date-format-guide_jt1wo_28","import-error":"_import-error_jt1wo_39","drop-area":"_drop-area_jt1wo_49","is-dragging":"_is-dragging_jt1wo_49","drop-area-content":"_drop-area-content_jt1wo_52",browse:"_browse_jt1wo_61","download-sample-btn":"_download-sample-btn_jt1wo_65"}}]]),I1={id:void 0,assignees:gK,status:_K,dateRange:mK,isStarted:Xa,isCompleted:Xa,lastUpdated:Xa,completedOn:Xa,isDeleted:Xa,isArchived:Xa,isProcessing:Xa,name:XP,options:B8,metric:e1,__checkboxSelection:void 0},k7={id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1},O7={id:void 0,assignees:UP,status:qP,dateRange:vK,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:XP,options:JP,metric:void 0,__checkboxSelection:void 0},M7={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50]},L7={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized"}},N7=e=>{if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return},A1=e=>{var t;if(((t=e==null?void 0:e.auth_permission)==null?void 0:t.permission)==2)return N7(e)};function k1(e){var r,a,l,c;const t=(r=e.colDef)==null?void 0:r.field,n=e.data,i=n==null?void 0:n.permissions;if(!n)return{disabled:!1,readOnly:!1,type:void 0};if(t==="options")return{disabled:!1,readOnly:!1,type:void 0};if(t!=null&&t.includes("metric"))return{disabled:!1,readOnly:((l=(a=e.colDef)==null?void 0:a.context.auth_permission)==null?void 0:l.permission)===2,type:A1((c=e.colDef)==null?void 0:c.context)};if(!i)return{disabled:!1,readOnly:!1,type:void 0};const s={assignees:i.has_update_assignee_permission||0,completedOn:0,name:0,permissions:0,status:i.has_edit_template_flow_status_permission||0,dateRange:i.has_edit_date_permission||0,isStarted:0,isDeleted:0,isArchived:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1}[t]??0;return{disabled:s===-1,readOnly:s!==1,type:void 0}}function V7(e){return"stopEditing"in e}const B7=ct({name:"AgGridVue3CellWrapper",props:{component:{type:Object,required:!0},params:{type:Object,required:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},value:{type:null,default:void 0},data:{type:Object,default:void 0},id:{type:[String,Number],default:void 0},tooltip:{type:[String,Number],default:void 0},isNoData:{type:Boolean,default:!1},workspaceId:{type:String,default:void 0},entityId:{type:String,default:void 0},axiosService:{type:Object,default:void 0},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1},sortType:{type:String,default:"default"},maxRating:{type:Number,default:5}},setup(e){var n;const t=((n=e.component)==null?void 0:n.default)||e.component;return t||console.error("[Vue3CellWrapper] Invalid component provided:",e.component),()=>ve(t,{...e})}}),H7=()=>`${Math.max(50,Math.round(V3(0,100)))}%`,G7=8;function O1(e){return class{constructor(){bn(this,"container");bn(this,"vNode",null);bn(this,"componentInstance",null);bn(this,"params");bn(this,"isEditor",!1);bn(this,"_destroyed",!1)}init(n){var c,u,d,h;if(!n){console.error("[Vue3CellWrapper] Missing context information: workspaceId or entityId. Cannot initialize wrapper.");return}const i=performance.now(),o=n.context.apiClass;this.params=n,this.isEditor=V7(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper",`${e.name||"unknown-component"}`),this.container.style.setProperty("--loading-overlay-width",H7()),this.container.style.width="100%",this.container.style.height="100%";const s=Object.freeze(n),r=n,a={component:e,params:s,disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(c=n==null?void 0:n.data)==null?void 0:c.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:o,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isFiltering:r.isFiltering??!1,isNoData:r.isNoData??!1};this.vNode=ve(B7,a),MR(this.vNode,this.container);const l=performance.now()-i;l>G7&&console.warn(`[Vue3CellWrapper] Slow render detected (${l.toFixed(1)}ms) for component "${(u=n.colDef)==null?void 0:u.field}" and field "${(d=n.data)==null?void 0:d.id}"`),this.componentInstance=(h=this.vNode.component)==null?void 0:h.proxy,this.componentInstance||console.warn("[Vue3CellWrapper] Component instance not available after render")}getGui(){return this.container}refresh(n){return!1}getValue(){var n,i,o;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((o=(i=this.componentInstance).getValue)==null?void 0:o.call(i))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(){var n;return this.isEditor?(n=this.componentInstance)!=null&&n.isPopup?this.componentInstance.isPopup():!0:!1}getPopupPosition(){var i,o,s;return this.isEditor?(i=this.componentInstance)!=null&&i.getPopupPosition?this.componentInstance.getPopupPosition():((s=(o=this.params)==null?void 0:o.colDef)==null?void 0:s.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!this._destroyed&&(this._destroyed=!0,!!this.container))try{const n=this.componentInstance;if(n){try{typeof n.$destroy=="function"&&n.$destroy()}catch(o){console.warn("[Vue3CellWrapper] Error during $destroy:",o)}try{typeof n.destroy=="function"&&n.destroy()}catch(o){console.warn("[Vue3CellWrapper] Error during destroy():",o)}}(typeof queueMicrotask=="function"?queueMicrotask:o=>Promise.resolve().then(o))(()=>{try{MR(null,this.container)}catch(o){console.warn("[Vue3CellWrapper] Error during unmount:",o)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function Md(e){return O1(e)}function M1(e){return O1(e)}class Ld{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t){var r,a;const n=t.data||((r=t.node)==null?void 0:r.data),i=(a=t.colDef)==null?void 0:a.field,o=i&&n?n[i]:void 0,s=k1(t);return{...t,value:o,disabled:s==null?void 0:s.disabled,readOnly:s==null?void 0:s.readOnly,type:s==null?void 0:s.type}}static isFrameworkComponent(t){return!!t&&(typeof t=="object"||typeof t=="function")}static resolveRendererComponent(t,n){let i;return t.includes("metric")&&I1.metric?A1(n)==="rating"?i=T7:i=e1:i=I1[t]??QC,i}static resolveEditorComponent(t,n){return t.includes("metric"),O7[t]??QC}static canEditField(t,n){const i=k1(n),o=k7[t]??!1;return!(i!=null&&i.disabled)&&!(i!=null&&i.readOnly)&&o}static resolveSize(t){const[n=200,i=300]=M7[t]??[];return{minWidth:n,maxWidth:i}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellRenderer:n,wrapVueCellEditor:i}=this.getWrappers(),o=String(t.field??""),s=this.resolveSize(o),r=L7[o]??{},a={headerName:t.headerName,...s,...t,cellEditorSelector:l=>{if(!this.canEditField(o,l))return;const c=this.resolveEditorComponent(o,t.context);return{component:this.isFrameworkComponent(c)?i(c):c,params:this.buildCommonCellParams(l)}},singleClickEdit:!0,cellEditorPopup:!0,cellEditorPopupPosition:"under",editable:l=>this.canEditField(o,l),cellRendererSelector:l=>({component:Md(this.resolveRendererComponent(o,t.context)),params:t.cellRendererParams??this.buildCommonCellParams}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...r};return console.log("Generated ColDef:",a),a}}bn(Ld,"wrappers",null);var nl=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const i=t?this.allAsyncListeners:this.allSyncListeners;let o=i.get(e);return!o&&n&&(o=new Set,i.set(e,o)),o}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const i=this.getListeners(e,n,!1);i&&(i.delete(t),i.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:i}=this,o=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},s=this.getListeners(n,t,!1);if(((s==null?void 0:s.size)??0)>0){const a=new Set(s);for(const l of a)s!=null&&s.has(l)&&o(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)o(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function cr(e){return e==null||e===""?null:e}function Ke(e){return e!=null&&e!==""}function hn(e){return!Ke(e)}function Rw(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Nd(e,t){const n=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return n===i}function $7(e,t,n=!1){const i=e==null,o=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),i&&o)return 0;if(i)return-1;if(o)return 1;function s(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return s(e,t);try{return e.localeCompare(t)}catch{return s(e,t)}}var W7=/[&<>"']/g,U7={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Pc(e){return(e==null?void 0:e.toString().toString())??null}function Vd(e){var t;return((t=Pc(e))==null?void 0:t.replace(W7,n=>U7[n]))??null}function Ss(e){return e.eRootDiv.getRootNode()}function yn(e){return Ss(e).activeElement}function Zn(e){const{gos:t,eRootDiv:n}=e;let i=null;const o=t.get("getDocument");return o&&Ke(o)?i=o():n&&(i=n.ownerDocument),i&&Ke(i)?i:document}function L1(e){const t=yn(e);return t===null||t===Zn(e).body}function N1(e){return Zn(e).defaultView||window}function Dw(e){let t=null,n=null;try{t=Zn(e).fullscreenElement}catch{}finally{t||(t=Ss(e));const i=t.querySelector("body");i?n=i:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function z7(e){const t=Dw(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function j7(e){const t=Dw(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Zo(e,t,n){n==null||typeof n=="string"&&n==""?V1(e,t):Eo(e,t,n)}function Eo(e,t,n){e.setAttribute(B1(t),n.toString())}function V1(e,t){e.removeAttribute(B1(t))}function B1(e){return`aria-${e}`}function jr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function K7(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function q7(e){return e.getAttribute("aria-label")}function Ic(e,t){Zo(e,"label",t)}function Bd(e,t){Zo(e,"labelledby",t)}function H1(e,t){Zo(e,"live",t)}function Y7(e,t){Zo(e,"atomic",t)}function Z7(e,t){Zo(e,"relevant",t)}function X7(e,t){Zo(e,"invalid",t)}function J7(e,t){Zo(e,"disabled",t)}function G1(e,t){Zo(e,"hidden",t)}function _w(e,t){Eo(e,"expanded",t)}function Q7(e,t){Eo(e,"setsize",t)}function e9(e,t){Eo(e,"posinset",t)}function t9(e,t){Eo(e,"multiselectable",t)}function n9(e,t){Eo(e,"rowcount",t)}function ng(e,t){Eo(e,"rowindex",t)}function i9(e,t){Eo(e,"rowspan",t)}function o9(e,t){Eo(e,"colcount",t)}function $1(e,t){Eo(e,"colindex",t)}function s9(e,t){Eo(e,"colspan",t)}function r9(e,t){Eo(e,"sort",t)}function a9(e){V1(e,"sort")}function W1(e,t){Zo(e,"selected",t)}function l9(e,t){Zo(e,"controls",t)}function c9(e,t){l9(e,t.id),Bd(t,e.id)}function U1(e,t){Zo(e,"owns",t)}function ig(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var u9="[tabindex], input, select, button, textarea, [href]",z1="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Hd(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(z1)?!1:Es(e)}function fn(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-hidden",!t),i||G1(e,!t)}function d9(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-invisible",!t),i||G1(e,!t)}function Gd(e,t){const n="disabled",i=t?s=>s.setAttribute(n,""):s=>s.removeAttribute(n);i(e);const o=e.querySelectorAll("input")??[];for(const s of o)i(s)}function il(e,t,n){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++i>n)break}else if(e===n)break}return!1}function ol(e){const{height:t,width:n,borderTopWidth:i,borderRightWidth:o,borderBottomWidth:s,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:u,marginTop:d,marginRight:h,marginBottom:f,marginLeft:g,boxSizing:m}=window.getComputedStyle(e),y=Number.parseFloat;return{height:y(t||"0"),width:y(n||"0"),borderTopWidth:y(i||"0"),borderRightWidth:y(o||"0"),borderBottomWidth:y(s||"0"),borderLeftWidth:y(r||"0"),paddingTop:y(a||"0"),paddingRight:y(l||"0"),paddingBottom:y(c||"0"),paddingLeft:y(u||"0"),marginTop:y(d||"0"),marginRight:y(h||"0"),marginBottom:y(f||"0"),marginLeft:y(g||"0"),boxSizing:m}}function xw(e){const t=ol(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function $d(e){const t=ol(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function j1(e){const{height:t,marginBottom:n,marginTop:i}=ol(e);return Math.floor(t+n+i)}function og(e){const{width:t,marginLeft:n,marginRight:i}=ol(e);return Math.floor(t+n+i)}function K1(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:i,borderRightWidth:o,borderBottomWidth:s}=ol(e);return{top:t.top+(n||0),left:t.left+(i||0),right:t.right+(o||0),bottom:t.bottom+(s||0)}}function sg(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function rg(e,t,n){n&&(t*=-1),e.scrollLeft=t}function ii(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Xo(e){e!=null&&e.parentNode&&e.remove()}function q1(e){return!!e.offsetParent}function Es(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!q1(e)||window.getComputedStyle(e).visibility!=="visible")}function Fw(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Y1(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function Z1(e,t){for(let n=0;n<t.length;n++){const i=t[n],o=e.children[n];o!==i&&e.insertBefore(i,o)}}function h9(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Wd(e,t){if(t)for(const n of Object.keys(t)){const i=t[n];if(!(n!=null&&n.length)||i==null)continue;const o=h9(n),s=i.toString(),r=s.replace(/\s*!important/g,""),a=r.length!=s.length?"important":void 0;e.style.setProperty(o,r,a)}}function ag(e){return()=>{const t=e();return t?Tw(t)||X1(t):!0}}function Tw(e){return e.clientWidth<e.scrollWidth}function X1(e){return e.clientHeight<e.scrollHeight}function lg(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Rs(e,t)}function Rs(e,t){t=Pw(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Ud(e,t){t=Pw(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Pw(e){return typeof e=="number"?`${e}px`:e}function Iw(e){return e instanceof Node||e instanceof HTMLElement}function to(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Kr(e,t,n){const o=N1(e).ResizeObserver,s=o?new o(n):null;return s==null||s.observe(t),()=>s==null?void 0:s.disconnect()}function ur(e,t){const n=N1(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var J1="data-ref",Aw;function Q1(){return Aw??(Aw=document.createTextNode(" ")),Aw.cloneNode()}function zd(e){const{attrs:t,children:n,cls:i,ref:o,role:s,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),o&&a.setAttribute(J1,o),s&&a.setAttribute("role",s),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const c of n)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(Q1()),l=!1),a.append(zd(c)),a.appendChild(Q1())))}return a}var f9=["touchstart","touchend","touchmove","touchcancel","scroll"],p9=["wheel"],kw={},eI=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof kw[n]=="boolean")return kw[n];const i=document.createElement(e[n]||"div");return n="on"+n,kw[n]=n in i}})();function g9(e,t){return!t||!e?!1:v9(t).indexOf(e)>=0}function m9(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function v9(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():m9(t)}function y9(e,t,n){const i=C9(t);let o;i!=null&&(o={passive:i}),e.addEventListener(t,n,o)}var C9=e=>{const t=f9.includes(e),n=p9.includes(e);if(t)return!0;if(n)return!1};function tI(e,t,n){if(n===0)return!1;const i=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(i,o)<=n}var jd=(e,t)=>{const n=e.identifier;for(let i=0,o=t.length;i<o;++i){const s=t[i];if(s.identifier===n)return s}return null};function Kd(e,t){return e.gos.isElementInThisInstance(t.target)}function w9(e,t,n){const o=e.getBoundingClientRect().height,s=z7(n)-2,r=j7(n)-2;if(!e.offsetParent)return;const l=K1(e.offsetParent),{clientY:c,clientX:u}=t;let d=c-l.top-o/2,h=u-l.left-10;const f=Zn(n),g=f.defaultView||window,m=g.pageYOffset||f.documentElement.scrollTop,y=g.pageXOffset||f.documentElement.scrollLeft;s>0&&h+e.clientWidth>s+y&&(h=s+y-e.clientWidth),h<0&&(h=0),r>0&&d+e.clientHeight>r+m&&(d=r+m-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var cg=(e,...t)=>{for(const n of t){const[i,o,s,r]=n;i.addEventListener(o,s,r),e.push(n)}},Ow=e=>{if(e){for(const[t,n,i,o]of e)t.removeEventListener(n,i,o);e.length=0}},qr=e=>{e.cancelable&&e.preventDefault()};function b9(e,t){return t}function nI(e){return(e==null?void 0:e.getLocaleTextFunc())??b9}function S9(e,t,n,i){const o=t[n];return e.getLocaleTextFunc()(n,typeof o=="function"?o(i):o,i)}function E9(e){return(t,n,i)=>e({key:t,defaultValue:n,variableValues:i})}function R9(e){return(t,n,i)=>{let o=e==null?void 0:e[t];if(o&&(i!=null&&i.length)){let s=0;for(;!(s>=i.length||o.indexOf("${variable}")===-1);)o=o.replace("${variable}",i[s++])}return o??n}}var Ds=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new nl),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var i;(i=this.localEventService)==null||i.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const i of Object.keys(t)){const o=t[i];o&&n.push(this._setupListener(e,i,o))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let i;if(D9(e))e.__addEventListener(t,n),i=()=>(e.__removeEventListener(t,n),null);else{const o=_9(e);e instanceof HTMLElement?y9(e,t,n):o?e.addListener(t,n):e.addEventListener(t,n),i=o?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const i=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,i=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=o.changeSet.id}const s={type:"propertyChanged",changeSet:o.changeSet,source:o.source};t(s)};for(const o of e)this.setupPropertyListener(o,i)}getLocaleTextFunc(){return nI(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function D9(e){return e.__addEventListener!==void 0}function _9(e){return e.eventServiceType==="global"}var be=class extends Ds{},iI={};function Mw(e,t){iI[t]||(e(),iI[t]=!0)}var x9={pending:!1,funcs:[]},F9={pending:!1,funcs:[]};function Lw(e,t="setTimeout",n){const i=t==="raf"?F9:x9;if(i.funcs.push(e),i.pending)return;i.pending=!0;const o=()=>{const s=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of s)r()};t==="raf"?ur(n,o):window.setTimeout(o,0)}function oi(e,t,n){let i;return function(...o){const s=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(s,o)},n)}}function oI(e,t){let n=0;return function(...i){const o=this,s=Date.now();s-n<t||(n=s,e.apply(o,i))}}function T9(e,t,n,i=100){const o=Date.now();let s=null,r=!1;const a=()=>{s!=null&&(window.clearInterval(s),s=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-o>i;(t()||c)&&(n(),r=!0,a())};l(),r||(s=window.setInterval(l,10))}var sI=new Set(["__proto__","constructor","prototype"]);function P9(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(i=>!sI.has(i)))t(n,e[n])}}function Ti(e,t,n=!0,i=!1){Ke(t)&&P9(t,(o,s)=>{let r=e[o];r!==s&&(i&&r==null&&s!=null&&typeof s=="object"&&s.constructor===Object&&(r={},e[o]=r),rI(s)&&rI(r)&&!Array.isArray(r)?Ti(r,s,n,i):(n||s!==void 0)&&(e[o]=s))})}function rI(e){return typeof e=="object"&&e!==null}var Nw=class Dr{static applyGlobalGridOptions(t){if(!Dr.gridOptions)return{...t};let n={};return Ti(n,Dr.gridOptions,!0,!0),Dr.mergeStrategy==="deep"?Ti(n,t,!0,!0):n={...n,...t},Dr.gridOptions.context&&(n.context=Dr.gridOptions.context),t.context&&(Dr.mergeStrategy==="deep"&&n.context&&Ti(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Dr.mergeStrategy==="deep"){const i=I9(t);if(i&&typeof i=="object"&&typeof n=="object")return Dr.applyGlobalGridOptions({[t]:n})[t]}return n}};Nw.gridOptions=void 0,Nw.mergeStrategy="shallow";var Vw=Nw;function I9(e){var t;return(t=Vw.gridOptions)==null?void 0:t[e]}var A9={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},aI="https://www.ag-grid.com";function Yr(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function qd(e,...t){Mw(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Ac(e,...t){Mw(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var lI=new Set,ug={},kc={},dg,cI=!1,uI=!1,k9=!1;function O9(e){const[t,n]=e.version.split(".")||[],[i,o]=dg.split(".")||[];return t===i&&n===o}function M9(e){var i;dg||(dg=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;e.version?O9(e)||Ac(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${dg}.`)):Ac(t(`'${e.moduleName}' is incompatible.`));const n=(i=e.validate)==null?void 0:i.call(e);n&&!n.isValid&&Ac(`${n.message}`)}function Yd(e,t,n=!1){n||(cI=!0),M9(e);const i=e.rowModels??["all"];lI.add(e);let o;t!==void 0?(uI=!0,kc[t]===void 0&&(kc[t]={}),o=kc[t]):o=ug;for(const s of i)o[s]===void 0&&(o[s]={}),o[s][e.moduleName]=e;if(e.dependsOn)for(const s of e.dependsOn)Yd(s,t,n)}function L9(e){delete kc[e]}function Bw(e,t,n){const i=o=>{var s,r,a;return!!((s=ug[o])!=null&&s[e])||!!((a=(r=kc[t])==null?void 0:r[o])!=null&&a[e])};return i(n)||i("all")}function Hw(){return uI}function N9(e,t){const n=kc[e]??{};return[...Object.values(ug.all??{}),...Object.values(n.all??{}),...Object.values(ug[t]??{}),...Object.values(n[t]??{})]}function V9(){return new Set(lI)}function B9(){return cI}function H9(){return k9}var G9=class{static register(e){Yd(e,void 0)}static registerModules(e){for(const t of e)Yd(t,void 0)}},ze="34.3.1",dI=2e3,hI=100,fI="_version_",hg=null,Oc=`${aI}/javascript-data-grid`;function $9(e){hg=e}function W9(e){Oc=e}function pI(e,t,n){return(hg==null?void 0:hg(e,t))??[K9(e,t,n)]}function Gw(e,t,n,i,o){e(`${i?"warning":"error"} #${t}`,...pI(t,n,o))}function U9(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function z9(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=U9(e)),t}function fg(e){return e===void 0?"undefined":e===null?"null":e}function $w(e,t){return`${e}?${t.toString()}`}function j9(e,t,n){const i=Array.from(t.entries()).sort((s,r)=>r[1].length-s[1].length);let o=$w(e,t);for(const[s,r]of i){if(s===fI)continue;const a=o.length-n;if(a<=0)break;const l="...",c=a+l.length,u=r.length-c>hI?r.slice(0,r.length-c)+l:r.slice(0,hI)+l;t.set(s,u),o=$w(e,t)}return o}function gI(e,t){const n=new URLSearchParams;if(n.append(fI,ze),t)for(const s of Object.keys(t))n.append(s,z9(t[s]));const i=`${Oc}/errors/${e}`,o=$w(i,n);return o.length<=dI?o:j9(i,n,dI)}var K9=(e,t,n)=>{const i=gI(e,t);return`${`${n?n+`
108
+ </svg>`,s=Rd(),{showMessage:r}=s,a=Y(!1),l=Y(!1),c=e,u=Y({file:null,format:null,isValid:void 0}),d=q(()=>{var k;return((k=c.acceptTypes)==null?void 0:k.map(O=>`.${O}`).join(","))||".xlsx,.xls,.csv"}),h=q(()=>u.value.format?o(u.value.format):""),f=q(()=>{var k;if(!u.value.isValid)return`Invalid file type. Please upload a ${(k=c.acceptTypes)==null?void 0:k.join(", ")} file.`}),g=q(()=>!!u.value.file),m=()=>{var k;(k=i.value)==null||k.click()},y=q(()=>u.value.file?u.value.file.name:""),b=k=>{var D;const O=c.acceptTypes||["xlsx","xls","csv"],A=(D=k.name.split(".").pop())==null?void 0:D.toLowerCase();return A?O.includes(A):!1},S=k=>{var A,D;const O=b(k);k&&O?(u.value.isValid=O,a.value=!O,u.value.file=k,u.value.format=((A=k.name.split(".").pop())==null?void 0:A.toLowerCase())||null):r(`Invalid file type. Please upload a ${(D=c.acceptTypes)==null?void 0:D.join(", ")} file.`,"error")},F=k=>{const O=k.target;if(O.files&&O.files[0]){const A=O.files[0];S(A)}},C=()=>{l.value=!0},R=()=>{l.value=!1},E=k=>{if(l.value=!1,k.dataTransfer&&k.dataTransfer.files&&k.dataTransfer.files[0]){const O=k.dataTransfer.files[0];S(O)}},x=n;return ut(u,k=>{x("update:modelValue",k)},{deep:!0}),t({internalValue:u,clear:()=>{i.value&&(i.value.value=""),u.value={file:null,format:null},a.value=!1}}),(k,O)=>{const A=df("tooltip");return K(),Ce("div",{class:z([k.$style["drop-area"],{[k.$style["is-dragging"]]:l.value,[k.$style.error]:a.value}]),onDragenter:on(C,["prevent"]),onDragover:on(C,["prevent"]),onDragleave:on(R,["prevent"]),onDrop:on(E,["prevent"]),onClick:m},[g.value?it("",!0):(K(),Ce("div",{key:0,class:z(k.$style["drop-area-content"])},[ve(mt,{src:"Upload",size:"24",color:"#3C9BFA"}),we("span",null,[ve(pt,{variant:["tertiary","text"],class:z(k.$style["upload-btn"])},{default:Ee(()=>[...O[0]||(O[0]=[dt(" Click to upload ",-1)])]),_:1},8,["class"]),O[1]||(O[1]=dt(" or drag and drop files here ",-1))])],2)),g.value?ot((K(),Ce("div",{key:1,class:z(k.$style["drop-area-file"])},[we("div",{innerHTML:h.value},null,8,R7),ot((K(),Ce("span",{class:z(k.$style["file-name"])},[dt(bt(y.value),1)],2)),[[A,{content:y.value}]])],2)),[[A,f.value]]):it("",!0),we("input",{ref_key:"fileInput",ref:i,type:"file",style:{display:"none"},accept:d.value,onChange:F},null,40,D7)],34)}}}),[["__cssModules",{$style:{"upload-btn":"_upload-btn_1ybeg_1","drop-area":"_drop-area_1ybeg_8","is-dragging":"_is-dragging_1ybeg_18",error:"_error_1ybeg_22","drop-area-content":"_drop-area-content_1ybeg_26","drop-area-file":"_drop-area-file_1ybeg_34","file-name":"_file-name_1ybeg_42","clear-button":"_clear-button_1ybeg_51"}}]]),F1=Sc("userStore",()=>{const e=Y(null),t=Y(null);return{user:e,setUser:o=>{e.value=o},setUserRoleId:o=>{t.value=o},workspaceUserRoleId:t}}),_7={width:"14",height:"12",viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x7=["fill"],F7=Ct(ct({__name:"FilterBox",emits:["update:assignees"],setup(e,{emit:t}){const{hide:n,isVisible:i,triggerRef:o,popupRef:s}=tr({offset:[0,0]}),r=t,a=F1(),{workspaceUserRoleId:l}=ys(a),c=q(()=>l.value||""),u=Y(!1);ut(u,h=>{h?r("update:assignees",[c.value]):r("update:assignees",[]),n()});const d=q(()=>u.value?"#000":"#3C9BFA");return(h,f)=>(K(),Ce("div",null,[ve(pt,{variant:"secondary",ref_key:"triggerRef",ref:o,actived:U(i),style:gn({border:u.value?"2px solid var(--primary-color)":"",backgroundColor:u.value?" #F0F7FF ":""})},{prefix:Ee(()=>[(K(),Ce("svg",_7,[we("path",{d:"M0.0998533 0.587105C0.269063 0.228176 0.627991 0 1.02538 0H12.1009C12.4983 0 12.8572 0.228176 13.0264 0.587105C13.1956 0.946034 13.1443 1.36906 12.8931 1.67671L8.20395 7.40675V10.6653C8.20395 10.9755 8.02961 11.2601 7.75016 11.3986C7.47071 11.537 7.13998 11.5088 6.8913 11.3216L5.25048 10.091C5.04281 9.9372 4.92232 9.69364 4.92232 9.4347V7.40675L0.230606 1.67415C-0.0180804 1.36906 -0.0719197 0.94347 0.0998533 0.587105Z",fill:d.value},null,8,x7)]))]),default:Ee(()=>[f[1]||(f[1]=dt(" Filter ",-1))]),_:1},8,["actived","style"]),we("div",{ref_key:"popupRef",ref:s},[we("div",{class:z(h.$style.row)},[ve(nw,{size:"small",label:"Show Archived Items",modelValue:u.value,"onUpdate:modelValue":f[0]||(f[0]=g=>u.value=g)},null,8,["modelValue"]),f[2]||(f[2]=dt(" Assigned to me ",-1))],2)],512)]))}}),[["__cssModules",{$style:{row:"_row_1akrr_1"}}]]),T7=ct({__name:"RatingRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean}},setup(e){const t=Go,n=e,i=q(()=>{var c,u;return{value:o.value,metricConfig:(u=(c=n.params)==null?void 0:c.colDef)==null?void 0:u.context,error:n.error,hovered:!1,readOnly:n.disabled,disabled:n.readOnly}}),o=Y(Number(n.value)),{componentState:s,ICON_SIZE:r,ratingParams:a,standardNameforIcon:l}=QP(i);return(c,u)=>U(s).isRating&&U(a).maxRating?ot((K(),Xe(PK,{key:0,modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=d=>o.value=d),params:U(a),readOnly:!0,disabled:n.disabled},{icon:Ee(()=>[ve(mt,{source:"rating",src:U(l)()||"Star",size:U(r)},null,8,["src","size"])]),_:1},8,["modelValue","params","disabled"])),[[U(t),{isLoading:U(s).isLoading,fullwidth:!0}]]):it("",!0)}}),P7={style:{color:"#ff5200"}},T1=Ct(ct({__name:"ImportVisual",props:{state:{},errorMessage:{},overwrite:{type:Boolean}},setup(e){return(t,n)=>(K(),Ce("div",{class:z(t.$style["inform-layout"])},[e.state==="importing"?(K(),Ce("div",{key:0,class:z(t.$style["import-error"]),style:{width:"500px"}},[ve(U(Np),{src:"UploadInProgress","max-height":180,"max-width":180})],2)):e.state==="error"?(K(),Ce("div",{key:1,class:z(t.$style["import-error"]),style:{width:"500px"}},[ve(U(Np),{src:"Unsuccessful1","max-height":180,"max-width":180}),we("span",{class:z(t.$style["step-title"])}," File doesn’t meet requirements. Check file and try again. ",2),we("div",P7,[we("span",{class:z(t.$style["step-description"])},"Error code",2),we("span",{class:z(t.$style["step-description"])},bt(e.errorMessage),3)])],2)):e.state==="success"?(K(),Ce(Ot,{key:2},[ve(U(Np),{src:"Successful1","max-height":180,"max-width":180}),we("span",{class:z(t.$style["step-title"])},bt(e.overwrite?`Existing data will be overwritten in the background.
109
+ Refresh to see updates.`:"Work will be created in background. Refresh to see updates."),3)],64)):it("",!0)],2))}}),[["__cssModules",{$style:{"inform-layout":"_inform-layout_1og33_1","import-error":"_import-error_1og33_11","step-title":"_step-title_1og33_22","step-description":"_step-description_1og33_27"}}]]),P1=Ct(ct({__name:"DateRule",setup(e){const n=(()=>{const o=(h,f,g,m)=>{const y=document.createElement("span");return y.textContent=h,y.style.fontWeight=f,y.style.fontSize=g,y.style.color=m,y},s=document.createElement("div");s.style.display="flex",s.style.flexDirection="column";const r=document.createElement("div"),a=document.createElement("div"),l=o("Valid formats:","normal","14px","#02C39A"),c=o("Invalid formats:","normal","14px","#FF5200"),u=o(" 2025.12.31, 2025-12-31, 2025/12/31 ","normal","14px",""),d=o(" 12.31.2025, 2025.31.12","normal","14px","");return r.appendChild(l),r.appendChild(u),a.appendChild(c),a.appendChild(d),s.appendChild(r),s.appendChild(a),s.outerHTML})(),i=mn;return(o,s)=>(K(),Ce("div",{class:z(o.$style["date-format-guide"])},[we("span",{class:z(o.$style["step-title-2"])},[s[0]||(s[0]=dt(" Date format guide ",-1)),ot(ve(U(mt),{src:"InfoCircle",color:"#A6A6A6"},null,512),[[U(i),{content:U(n)}]])],2),we("div",{class:z(o.$style["date-rule-section"])},[s[3]||(s[3]=we("span",null,"Enter dates in one of these formats:",-1)),we("ul",{class:z(o.$style["step-description"])},[we("li",{class:z(o.$style["date-rule"])},[...s[1]||(s[1]=[we("b",null,"DD MM YYYY",-1),dt(" (Day-Month-Year) ",-1)])],2),we("li",{class:z(o.$style["date-rule"])},[...s[2]||(s[2]=[we("b",null,"YYYY MM DD",-1),dt(" (Year-Month-Day) ",-1)])],2)],2)],2)],2))}}),[["__cssModules",{$style:{"date-format-guide":"_date-format-guide_ef59d_1","step-title-2":"_step-title-2_ef59d_13","date-rule-section":"_date-rule-section_ef59d_25","step-description":"_step-description_ef59d_29","date-rule":"_date-rule_ef59d_25"}}]]),I7={key:1},A7=Ct(ct({__name:"PopupCreateScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const i=Y(null),o=e,s=()=>{i.value&&i.value.show()},r=Y(""),a=Y("idle"),l=q(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Create new work"})[a.value]),c=Y(null),u=Y({file:null,format:null}),{apiServices:d}=vo(!1,o),h=async A=>{var P,V;if(((P=d==null?void 0:d.value)==null?void 0:P.getStatuses)===void 0){console.error("API services not available",(V=d==null?void 0:d.value)==null?void 0:V.getStatuses);return}return await d.value.getStatuses(o.workspaceId,o.entityId,A)},f=Y(!1),g=async()=>{f.value=!0;const A=o.workspaceId,D=o.entityId;if(!A||!D||!d.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await d.value.downloadTemplate(A,D))throw new Error("No response from downloadTemplate API")}catch(P){console.error("Error downloading template:",P)}f.value=!1},m=async A=>{var V,H,te;const D=new FormData,P=((V=A.name.split(".").pop())==null?void 0:V.toString())||"";if(D.append("file",A),D.append("format",P),D.append("template_flow_status_id",R.value||""),!d.value||!o.workspaceId||!o.entityId){console.error("API services not available");return}try{const B=await d.value.addNewSceneViaImportFile(o.workspaceId,o.entityId,D);y()}catch(B){throw console.error("Error uploading file:",B),b(((te=(H=B.response)==null?void 0:H.data)==null?void 0:te.message)||"An unknown error occurred during file upload."),B}},y=()=>{a.value="success"},b=A=>{r.value=A,a.value="error"},S=n,F=()=>{S("import-success"),O()},C=async()=>{if(!u.value||!u.value.file){console.error("No file to upload");return}a.value="importing",await m(u.value.file)};t({open:s});const R=Y(null),E=q(()=>!u.value.file||!u.value.format||!u.value.isValid||!R.value),x=Y(null),k=()=>{var A,D;(A=c.value)==null||A.clear(),r.value="",u.value={file:null,format:null},R.value=null,(D=x==null?void 0:x.value)==null||D.clear(),a.value="idle"},O=()=>{var A;k(),(A=i.value)==null||A.hide()};return(A,D)=>(K(),Xe(U(t1),{"popup-name":l.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:i,onHidden:k},_u({default:Ee(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(K(),Xe(T1,{key:0,state:a.value,"error-message":r.value},null,8,["state","error-message"])):(K(),Ce("div",I7,[we("div",{class:z(A.$style["step-section"])},[we("span",{class:z(A.$style["step-title"])},"Step 1: Download sample file",2),we("span",{class:z(A.$style["step-description"])}," Get a sample file with all columns ready for editing. ",2),ve(U(pt),{class:z(A.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:f.value,onHandleClick:g},{prefix:Ee(()=>[ve(U(mt),{src:"Download"})]),default:Ee(()=>[D[2]||(D[2]=dt(" Download sample file ",-1))]),_:1},8,["class","disabled"])],2),we("div",{class:z(A.$style["step-section"])},[we("span",{class:z(A.$style["step-title"])},"Step 2: Upload your file (.xlsx, .xls, .csv)",2),ve(U(x1),{modelValue:u.value,"onUpdate:modelValue":D[0]||(D[0]=P=>u.value=P),ref_key:"filUploaderRef",ref:c},null,8,["modelValue"])],2),we("div",{class:z(A.$style["step-section"])},[we("span",{class:z(A.$style["step-title"])},"Step 3: Select status",2),we("span",{class:z(A.$style["step-description"])},"Choose a status for the new work.",2),ve(U(w7),{ref_key:"statusRef",ref:x,modelValue:R.value,"onUpdate:modelValue":D[1]||(D[1]=P=>R.value=P),"get-status-func":h,"workspace-id":o.workspaceId,id:o.entityId},null,8,["modelValue","workspace-id","id"])],2),we("div",{class:z(A.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ve(P1)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:Ee(()=>[ve(U(pt),{style:{flex:"1"},variant:"secondary",onClick:O},{default:Ee(()=>[...D[3]||(D[3]=[dt(" Cancel ",-1)])]),_:1}),ve(U(pt),{disabled:E.value,style:{flex:"1"},variant:"primary",onClick:C},{default:Ee(()=>[...D[4]||(D[4]=[dt(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:Ee(()=>[ve(U(pt),{style:{flex:"1"},variant:"primary",onClick:F},{default:Ee(()=>[...D[5]||(D[5]=[dt(" Close ",-1)])]),_:1})]),key:"1"}:a.value=="error"?{name:"footer",fn:Ee(()=>[ve(U(pt),{style:{flex:"1"},variant:"primary",onClick:k},{default:Ee(()=>[...D[6]||(D[6]=[dt(" Try Again ",-1)])]),_:1})]),key:"2"}:void 0]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_jt1wo_1","step-title":"_step-title_jt1wo_11","step-title-2":"_step-title-2_jt1wo_17","step-description":"_step-description_jt1wo_23","date-format-guide":"_date-format-guide_jt1wo_28","import-error":"_import-error_jt1wo_39","drop-area":"_drop-area_jt1wo_49","is-dragging":"_is-dragging_jt1wo_49","drop-area-content":"_drop-area-content_jt1wo_52",browse:"_browse_jt1wo_61","download-sample-btn":"_download-sample-btn_jt1wo_65"}}]]),I1={id:void 0,assignees:gK,status:_K,dateRange:mK,isStarted:Xa,isCompleted:Xa,lastUpdated:Xa,completedOn:Xa,isDeleted:Xa,isArchived:Xa,isProcessing:Xa,name:XP,options:B8,metric:e1,__checkboxSelection:void 0},k7={id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1},O7={id:void 0,assignees:UP,status:qP,dateRange:vK,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:XP,options:JP,metric:void 0,__checkboxSelection:void 0},M7={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50]},L7={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized"}},N7=e=>{if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return},A1=e=>{var t;if(((t=e==null?void 0:e.auth_permission)==null?void 0:t.permission)==2)return N7(e)};function k1(e){var r,a,l,c;const t=(r=e.colDef)==null?void 0:r.field,n=e.data,i=n==null?void 0:n.permissions;if(!n)return{disabled:!1,readOnly:!1,type:void 0};if(t==="options")return{disabled:!1,readOnly:!1,type:void 0};if(t!=null&&t.includes("metric"))return{disabled:!1,readOnly:((l=(a=e.colDef)==null?void 0:a.context.auth_permission)==null?void 0:l.permission)===2,type:A1((c=e.colDef)==null?void 0:c.context)};if(!i)return{disabled:!1,readOnly:!1,type:void 0};const s={assignees:i.has_update_assignee_permission||0,completedOn:0,name:0,permissions:0,status:i.has_edit_template_flow_status_permission||0,dateRange:i.has_edit_date_permission||0,isStarted:0,isDeleted:0,isArchived:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1}[t]??0;return{disabled:s===-1,readOnly:s!==1,type:void 0}}function V7(e){return"stopEditing"in e}const B7=ct({name:"AgGridVue3CellWrapper",props:{component:{type:Object,required:!0},params:{type:Object,required:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},value:{type:null,default:void 0},data:{type:Object,default:void 0},id:{type:[String,Number],default:void 0},tooltip:{type:[String,Number],default:void 0},isNoData:{type:Boolean,default:!1},workspaceId:{type:String,default:void 0},entityId:{type:String,default:void 0},axiosService:{type:Object,default:void 0},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1},sortType:{type:String,default:"default"},maxRating:{type:Number,default:5}},setup(e){var n;const t=((n=e.component)==null?void 0:n.default)||e.component;return t||console.error("[Vue3CellWrapper] Invalid component provided:",e.component),()=>ve(t,{...e})}}),H7=()=>`${Math.max(50,Math.round(V3(0,100)))}%`,G7=8;function O1(e){return class{constructor(){bn(this,"container");bn(this,"vNode",null);bn(this,"componentInstance",null);bn(this,"params");bn(this,"isEditor",!1);bn(this,"_destroyed",!1)}init(n){var c,u,d,h;if(!n){console.error("[Vue3CellWrapper] Missing context information: workspaceId or entityId. Cannot initialize wrapper.");return}const i=performance.now(),o=n.context.apiClass;this.params=n,this.isEditor=V7(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper",`${e.name||"unknown-component"}`),this.container.style.setProperty("--loading-overlay-width",H7()),this.container.style.width="100%",this.container.style.height="100%";const s=Object.freeze(n),r=n,a={component:e,params:s,disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(c=n==null?void 0:n.data)==null?void 0:c.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:o,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isFiltering:r.isFiltering??!1,isNoData:r.isNoData??!1};this.vNode=ve(B7,a),MR(this.vNode,this.container);const l=performance.now()-i;l>G7&&console.warn(`[Vue3CellWrapper] Slow render detected (${l.toFixed(1)}ms) for component "${(u=n.colDef)==null?void 0:u.field}" and field "${(d=n.data)==null?void 0:d.id}"`),this.componentInstance=(h=this.vNode.component)==null?void 0:h.proxy,this.componentInstance||console.warn("[Vue3CellWrapper] Component instance not available after render")}getGui(){return this.container}refresh(n){return!1}getValue(){var n,i,o;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((o=(i=this.componentInstance).getValue)==null?void 0:o.call(i))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(){var n;return this.isEditor?(n=this.componentInstance)!=null&&n.isPopup?this.componentInstance.isPopup():!0:!1}getPopupPosition(){var i,o,s;return this.isEditor?(i=this.componentInstance)!=null&&i.getPopupPosition?this.componentInstance.getPopupPosition():((s=(o=this.params)==null?void 0:o.colDef)==null?void 0:s.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!this._destroyed&&(this._destroyed=!0,!!this.container))try{const n=this.componentInstance;if(n){try{typeof n.$destroy=="function"&&n.$destroy()}catch(o){console.warn("[Vue3CellWrapper] Error during $destroy:",o)}try{typeof n.destroy=="function"&&n.destroy()}catch(o){console.warn("[Vue3CellWrapper] Error during destroy():",o)}}(typeof queueMicrotask=="function"?queueMicrotask:o=>Promise.resolve().then(o))(()=>{try{MR(null,this.container)}catch(o){console.warn("[Vue3CellWrapper] Error during unmount:",o)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function Md(e){return O1(e)}function M1(e){return O1(e)}class Ld{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t){var r,a;const n=t.data||((r=t.node)==null?void 0:r.data),i=(a=t.colDef)==null?void 0:a.field,o=i&&n?n[i]:void 0,s=k1(t);return{...t,value:o,disabled:s==null?void 0:s.disabled,readOnly:s==null?void 0:s.readOnly,type:s==null?void 0:s.type}}static isFrameworkComponent(t){return!!t&&(typeof t=="object"||typeof t=="function")}static resolveRendererComponent(t,n){let i;return t.includes("metric")&&I1.metric?A1(n)==="rating"?i=T7:i=e1:i=I1[t]??QC,i}static resolveEditorComponent(t,n){return t.includes("metric"),O7[t]??QC}static canEditField(t,n){const i=k1(n),o=k7[t]??!1;return!(i!=null&&i.disabled)&&!(i!=null&&i.readOnly)&&o}static resolveSize(t){const[n=200,i=300]=M7[t]??[];return{minWidth:n,maxWidth:i}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellRenderer:n,wrapVueCellEditor:i}=this.getWrappers(),o=String(t.field??""),s=this.resolveSize(o),r=L7[o]??{},a={headerName:t.headerName,...s,...t,cellEditorSelector:l=>{if(!this.canEditField(o,l))return;const c=this.resolveEditorComponent(o,t.context);return{component:this.isFrameworkComponent(c)?i(c):c,params:this.buildCommonCellParams(l)}},singleClickEdit:!0,cellEditorPopup:!0,cellEditorPopupPosition:"under",editable:l=>this.canEditField(o,l),cellRendererSelector:l=>({component:Md(this.resolveRendererComponent(o,t.context)),params:t.cellRendererParams??this.buildCommonCellParams}),headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...r};return console.log("Generated ColDef:",a),a}}bn(Ld,"wrappers",null);var nl=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const i=t?this.allAsyncListeners:this.allSyncListeners;let o=i.get(e);return!o&&n&&(o=new Set,i.set(e,o)),o}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const i=this.getListeners(e,n,!1);i&&(i.delete(t),i.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:i}=this,o=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},s=this.getListeners(n,t,!1);if(((s==null?void 0:s.size)??0)>0){const a=new Set(s);for(const l of a)s!=null&&s.has(l)&&o(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)o(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function cr(e){return e==null||e===""?null:e}function Ke(e){return e!=null&&e!==""}function hn(e){return!Ke(e)}function Rw(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Nd(e,t){const n=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return n===i}function $7(e,t,n=!1){const i=e==null,o=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),i&&o)return 0;if(i)return-1;if(o)return 1;function s(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return s(e,t);try{return e.localeCompare(t)}catch{return s(e,t)}}var W7=/[&<>"']/g,U7={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Pc(e){return(e==null?void 0:e.toString().toString())??null}function Vd(e){var t;return((t=Pc(e))==null?void 0:t.replace(W7,n=>U7[n]))??null}function Ss(e){return e.eRootDiv.getRootNode()}function yn(e){return Ss(e).activeElement}function Zn(e){const{gos:t,eRootDiv:n}=e;let i=null;const o=t.get("getDocument");return o&&Ke(o)?i=o():n&&(i=n.ownerDocument),i&&Ke(i)?i:document}function L1(e){const t=yn(e);return t===null||t===Zn(e).body}function N1(e){return Zn(e).defaultView||window}function Dw(e){let t=null,n=null;try{t=Zn(e).fullscreenElement}catch{}finally{t||(t=Ss(e));const i=t.querySelector("body");i?n=i:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function z7(e){const t=Dw(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function j7(e){const t=Dw(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Zo(e,t,n){n==null||typeof n=="string"&&n==""?V1(e,t):Eo(e,t,n)}function Eo(e,t,n){e.setAttribute(B1(t),n.toString())}function V1(e,t){e.removeAttribute(B1(t))}function B1(e){return`aria-${e}`}function jr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function K7(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function q7(e){return e.getAttribute("aria-label")}function Ic(e,t){Zo(e,"label",t)}function Bd(e,t){Zo(e,"labelledby",t)}function H1(e,t){Zo(e,"live",t)}function Y7(e,t){Zo(e,"atomic",t)}function Z7(e,t){Zo(e,"relevant",t)}function X7(e,t){Zo(e,"invalid",t)}function J7(e,t){Zo(e,"disabled",t)}function G1(e,t){Zo(e,"hidden",t)}function _w(e,t){Eo(e,"expanded",t)}function Q7(e,t){Eo(e,"setsize",t)}function e9(e,t){Eo(e,"posinset",t)}function t9(e,t){Eo(e,"multiselectable",t)}function n9(e,t){Eo(e,"rowcount",t)}function ng(e,t){Eo(e,"rowindex",t)}function i9(e,t){Eo(e,"rowspan",t)}function o9(e,t){Eo(e,"colcount",t)}function $1(e,t){Eo(e,"colindex",t)}function s9(e,t){Eo(e,"colspan",t)}function r9(e,t){Eo(e,"sort",t)}function a9(e){V1(e,"sort")}function W1(e,t){Zo(e,"selected",t)}function l9(e,t){Zo(e,"controls",t)}function c9(e,t){l9(e,t.id),Bd(t,e.id)}function U1(e,t){Zo(e,"owns",t)}function ig(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var u9="[tabindex], input, select, button, textarea, [href]",z1="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Hd(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(z1)?!1:Es(e)}function fn(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-hidden",!t),i||G1(e,!t)}function d9(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-invisible",!t),i||G1(e,!t)}function Gd(e,t){const n="disabled",i=t?s=>s.setAttribute(n,""):s=>s.removeAttribute(n);i(e);const o=e.querySelectorAll("input")??[];for(const s of o)i(s)}function il(e,t,n){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++i>n)break}else if(e===n)break}return!1}function ol(e){const{height:t,width:n,borderTopWidth:i,borderRightWidth:o,borderBottomWidth:s,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:u,marginTop:d,marginRight:h,marginBottom:f,marginLeft:g,boxSizing:m}=window.getComputedStyle(e),y=Number.parseFloat;return{height:y(t||"0"),width:y(n||"0"),borderTopWidth:y(i||"0"),borderRightWidth:y(o||"0"),borderBottomWidth:y(s||"0"),borderLeftWidth:y(r||"0"),paddingTop:y(a||"0"),paddingRight:y(l||"0"),paddingBottom:y(c||"0"),paddingLeft:y(u||"0"),marginTop:y(d||"0"),marginRight:y(h||"0"),marginBottom:y(f||"0"),marginLeft:y(g||"0"),boxSizing:m}}function xw(e){const t=ol(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function $d(e){const t=ol(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function j1(e){const{height:t,marginBottom:n,marginTop:i}=ol(e);return Math.floor(t+n+i)}function og(e){const{width:t,marginLeft:n,marginRight:i}=ol(e);return Math.floor(t+n+i)}function K1(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:i,borderRightWidth:o,borderBottomWidth:s}=ol(e);return{top:t.top+(n||0),left:t.left+(i||0),right:t.right+(o||0),bottom:t.bottom+(s||0)}}function sg(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function rg(e,t,n){n&&(t*=-1),e.scrollLeft=t}function ii(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Xo(e){e!=null&&e.parentNode&&e.remove()}function q1(e){return!!e.offsetParent}function Es(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!q1(e)||window.getComputedStyle(e).visibility!=="visible")}function Fw(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Y1(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function Z1(e,t){for(let n=0;n<t.length;n++){const i=t[n],o=e.children[n];o!==i&&e.insertBefore(i,o)}}function h9(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Wd(e,t){if(t)for(const n of Object.keys(t)){const i=t[n];if(!(n!=null&&n.length)||i==null)continue;const o=h9(n),s=i.toString(),r=s.replace(/\s*!important/g,""),a=r.length!=s.length?"important":void 0;e.style.setProperty(o,r,a)}}function ag(e){return()=>{const t=e();return t?Tw(t)||X1(t):!0}}function Tw(e){return e.clientWidth<e.scrollWidth}function X1(e){return e.clientHeight<e.scrollHeight}function lg(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Rs(e,t)}function Rs(e,t){t=Pw(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Ud(e,t){t=Pw(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Pw(e){return typeof e=="number"?`${e}px`:e}function Iw(e){return e instanceof Node||e instanceof HTMLElement}function to(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Kr(e,t,n){const o=N1(e).ResizeObserver,s=o?new o(n):null;return s==null||s.observe(t),()=>s==null?void 0:s.disconnect()}function ur(e,t){const n=N1(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var J1="data-ref",Aw;function Q1(){return Aw??(Aw=document.createTextNode(" ")),Aw.cloneNode()}function zd(e){const{attrs:t,children:n,cls:i,ref:o,role:s,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),o&&a.setAttribute(J1,o),s&&a.setAttribute("role",s),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const c of n)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(Q1()),l=!1),a.append(zd(c)),a.appendChild(Q1())))}return a}var f9=["touchstart","touchend","touchmove","touchcancel","scroll"],p9=["wheel"],kw={},eI=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof kw[n]=="boolean")return kw[n];const i=document.createElement(e[n]||"div");return n="on"+n,kw[n]=n in i}})();function g9(e,t){return!t||!e?!1:v9(t).indexOf(e)>=0}function m9(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function v9(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():m9(t)}function y9(e,t,n){const i=C9(t);let o;i!=null&&(o={passive:i}),e.addEventListener(t,n,o)}var C9=e=>{const t=f9.includes(e),n=p9.includes(e);if(t)return!0;if(n)return!1};function tI(e,t,n){if(n===0)return!1;const i=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(i,o)<=n}var jd=(e,t)=>{const n=e.identifier;for(let i=0,o=t.length;i<o;++i){const s=t[i];if(s.identifier===n)return s}return null};function Kd(e,t){return e.gos.isElementInThisInstance(t.target)}function w9(e,t,n){const o=e.getBoundingClientRect().height,s=z7(n)-2,r=j7(n)-2;if(!e.offsetParent)return;const l=K1(e.offsetParent),{clientY:c,clientX:u}=t;let d=c-l.top-o/2,h=u-l.left-10;const f=Zn(n),g=f.defaultView||window,m=g.pageYOffset||f.documentElement.scrollTop,y=g.pageXOffset||f.documentElement.scrollLeft;s>0&&h+e.clientWidth>s+y&&(h=s+y-e.clientWidth),h<0&&(h=0),r>0&&d+e.clientHeight>r+m&&(d=r+m-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var cg=(e,...t)=>{for(const n of t){const[i,o,s,r]=n;i.addEventListener(o,s,r),e.push(n)}},Ow=e=>{if(e){for(const[t,n,i,o]of e)t.removeEventListener(n,i,o);e.length=0}},qr=e=>{e.cancelable&&e.preventDefault()};function b9(e,t){return t}function nI(e){return(e==null?void 0:e.getLocaleTextFunc())??b9}function S9(e,t,n,i){const o=t[n];return e.getLocaleTextFunc()(n,typeof o=="function"?o(i):o,i)}function E9(e){return(t,n,i)=>e({key:t,defaultValue:n,variableValues:i})}function R9(e){return(t,n,i)=>{let o=e==null?void 0:e[t];if(o&&(i!=null&&i.length)){let s=0;for(;!(s>=i.length||o.indexOf("${variable}")===-1);)o=o.replace("${variable}",i[s++])}return o??n}}var Ds=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new nl),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var i;(i=this.localEventService)==null||i.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const i of Object.keys(t)){const o=t[i];o&&n.push(this._setupListener(e,i,o))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let i;if(D9(e))e.__addEventListener(t,n),i=()=>(e.__removeEventListener(t,n),null);else{const o=_9(e);e instanceof HTMLElement?y9(e,t,n):o?e.addListener(t,n):e.addEventListener(t,n),i=o?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const i=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,i=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=o.changeSet.id}const s={type:"propertyChanged",changeSet:o.changeSet,source:o.source};t(s)};for(const o of e)this.setupPropertyListener(o,i)}getLocaleTextFunc(){return nI(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function D9(e){return e.__addEventListener!==void 0}function _9(e){return e.eventServiceType==="global"}var be=class extends Ds{},iI={};function Mw(e,t){iI[t]||(e(),iI[t]=!0)}var x9={pending:!1,funcs:[]},F9={pending:!1,funcs:[]};function Lw(e,t="setTimeout",n){const i=t==="raf"?F9:x9;if(i.funcs.push(e),i.pending)return;i.pending=!0;const o=()=>{const s=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of s)r()};t==="raf"?ur(n,o):window.setTimeout(o,0)}function oi(e,t,n){let i;return function(...o){const s=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(s,o)},n)}}function oI(e,t){let n=0;return function(...i){const o=this,s=Date.now();s-n<t||(n=s,e.apply(o,i))}}function T9(e,t,n,i=100){const o=Date.now();let s=null,r=!1;const a=()=>{s!=null&&(window.clearInterval(s),s=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-o>i;(t()||c)&&(n(),r=!0,a())};l(),r||(s=window.setInterval(l,10))}var sI=new Set(["__proto__","constructor","prototype"]);function P9(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(i=>!sI.has(i)))t(n,e[n])}}function Ti(e,t,n=!0,i=!1){Ke(t)&&P9(t,(o,s)=>{let r=e[o];r!==s&&(i&&r==null&&s!=null&&typeof s=="object"&&s.constructor===Object&&(r={},e[o]=r),rI(s)&&rI(r)&&!Array.isArray(r)?Ti(r,s,n,i):(n||s!==void 0)&&(e[o]=s))})}function rI(e){return typeof e=="object"&&e!==null}var Nw=class Dr{static applyGlobalGridOptions(t){if(!Dr.gridOptions)return{...t};let n={};return Ti(n,Dr.gridOptions,!0,!0),Dr.mergeStrategy==="deep"?Ti(n,t,!0,!0):n={...n,...t},Dr.gridOptions.context&&(n.context=Dr.gridOptions.context),t.context&&(Dr.mergeStrategy==="deep"&&n.context&&Ti(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Dr.mergeStrategy==="deep"){const i=I9(t);if(i&&typeof i=="object"&&typeof n=="object")return Dr.applyGlobalGridOptions({[t]:n})[t]}return n}};Nw.gridOptions=void 0,Nw.mergeStrategy="shallow";var Vw=Nw;function I9(e){var t;return(t=Vw.gridOptions)==null?void 0:t[e]}var A9={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},aI="https://www.ag-grid.com";function Yr(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function qd(e,...t){Mw(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Ac(e,...t){Mw(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var lI=new Set,ug={},kc={},dg,cI=!1,uI=!1,k9=!1;function O9(e){const[t,n]=e.version.split(".")||[],[i,o]=dg.split(".")||[];return t===i&&n===o}function M9(e){var i;dg||(dg=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;e.version?O9(e)||Ac(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${dg}.`)):Ac(t(`'${e.moduleName}' is incompatible.`));const n=(i=e.validate)==null?void 0:i.call(e);n&&!n.isValid&&Ac(`${n.message}`)}function Yd(e,t,n=!1){n||(cI=!0),M9(e);const i=e.rowModels??["all"];lI.add(e);let o;t!==void 0?(uI=!0,kc[t]===void 0&&(kc[t]={}),o=kc[t]):o=ug;for(const s of i)o[s]===void 0&&(o[s]={}),o[s][e.moduleName]=e;if(e.dependsOn)for(const s of e.dependsOn)Yd(s,t,n)}function L9(e){delete kc[e]}function Bw(e,t,n){const i=o=>{var s,r,a;return!!((s=ug[o])!=null&&s[e])||!!((a=(r=kc[t])==null?void 0:r[o])!=null&&a[e])};return i(n)||i("all")}function Hw(){return uI}function N9(e,t){const n=kc[e]??{};return[...Object.values(ug.all??{}),...Object.values(n.all??{}),...Object.values(ug[t]??{}),...Object.values(n[t]??{})]}function V9(){return new Set(lI)}function B9(){return cI}function H9(){return k9}var G9=class{static register(e){Yd(e,void 0)}static registerModules(e){for(const t of e)Yd(t,void 0)}},ze="34.3.1",dI=2e3,hI=100,fI="_version_",hg=null,Oc=`${aI}/javascript-data-grid`;function $9(e){hg=e}function W9(e){Oc=e}function pI(e,t,n){return(hg==null?void 0:hg(e,t))??[K9(e,t,n)]}function Gw(e,t,n,i,o){e(`${i?"warning":"error"} #${t}`,...pI(t,n,o))}function U9(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function z9(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=U9(e)),t}function fg(e){return e===void 0?"undefined":e===null?"null":e}function $w(e,t){return`${e}?${t.toString()}`}function j9(e,t,n){const i=Array.from(t.entries()).sort((s,r)=>r[1].length-s[1].length);let o=$w(e,t);for(const[s,r]of i){if(s===fI)continue;const a=o.length-n;if(a<=0)break;const l="...",c=a+l.length,u=r.length-c>hI?r.slice(0,r.length-c)+l:r.slice(0,hI)+l;t.set(s,u),o=$w(e,t)}return o}function gI(e,t){const n=new URLSearchParams;if(n.append(fI,ze),t)for(const s of Object.keys(t))n.append(s,z9(t[s]));const i=`${Oc}/errors/${e}`,o=$w(i,n);return o.length<=dI?o:j9(i,n,dI)}var K9=(e,t,n)=>{const i=gI(e,t);return`${`${n?n+`
110
110
  `:""}Visit ${i}`}${n?"":`
111
111
  Alternatively register the ValidationModule to see the full message in the console.`}`};function Oe(...e){Gw(qd,e[0],e[1],!0)}function Qt(...e){Gw(Ac,e[0],e[1],!1)}function Zd(e,t,n){Gw(Ac,e,t,!1,n)}function q9(e,t){const n=t[0];return`error #${n} `+pI(n,t[1],e).join(" ")}function _s(...e){return q9(void 0,e)}function mI(e,t){return e.get("rowModelType")===t}function In(e,t){return mI(e,"clientSide")}function Mc(e,t){return mI(e,"serverSide")}function si(e,t){return e.get("domLayout")===t}function sl(e){return mg(e)!==void 0}function vI(e){return typeof e.get("getRowHeight")=="function"}function Y9(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function Zr(e,t,n=!1,i){const{gos:o,environment:s}=e;if(i==null&&(i=s.getDefaultRowHeight()),vI(o)){if(n)return{height:i,estimated:!0};const l={node:t,data:t.data},c=o.getCallback("getRowHeight")(l);if(Ww(c))return c===0&&Oe(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&o.get("masterDetail"))return Z9(o);const r=o.get("rowHeight");return{height:r&&Ww(r)?r:i,estimated:!1}}function Z9(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Ww(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function rl(e){const{environment:t,gos:n}=e,i=n.get("rowHeight");if(!i||hn(i))return t.getDefaultRowHeight();const o=t.refreshRowHeightVariable();return o!==-1?o:(Oe(24),t.getDefaultRowHeight())}function Ww(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function yI(e,t,n){const i=t[e.getDomDataKey()];return i?i[n]:void 0}function al(e,t,n,i){const o=e.getDomDataKey();let s=t[o];hn(s)&&(s={},t[o]=s),s[n]=i}function Lc(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function CI(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||si(e,"print"))}function xs(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function Uw(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function wI(e){return e.get("grandTotalRow")}function bI(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function SI(e,t,n){return!!t.group&&!t.footer&&bI(e,n)}function Nc(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let i=t(n);return typeof i!="string"&&(Mw(()=>Oe(25,{id:i}),"getRowIdString"),i=String(i)),i}}function X9(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function J9(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Vc(e){return(e==null?void 0:e.checkboxes)??!0}function pg(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function gg(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function zw(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function Q9(e){return typeof e.get("rowSelection")!="string"}function dr(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function EI(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const n=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return n&&i?!1:n?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function eq(e){const t=EI(e);return t===!0||t==="enableSelection"}function tq(e){const t=EI(e);return t===!0||t==="enableDeselection"}function jw(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function mg(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Xd(e){return mg(e)==="multiRow"}function nq(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function vg(e){const t=e.get("rowSelection");if(typeof t=="string"){const n=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return n&&i?"filteredDescendants":n?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function RI(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function iq(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function Jd(e){const t=vg(e);return t==="descendants"||t==="filteredDescendants"}function DI(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function oq(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function no(e){return e.get("columnMenu")==="legacy"}function sq(e){return!no(e)}function rq(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function vt(e,t){return e.addCommon(t)}function _I({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var aq={resizable:!0,sortable:!0},lq=0;function xI(){return lq++}function Xr(e){return e instanceof ll}var ll=class extends be{constructor(e,t,n,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=i,this.isColumn=!0,this.instanceId=xI(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new nl,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Vd(n)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:n,colFlex:i}}=this;t==null||t.initCol(this);const o=e.hide;o!==void 0?this.visible=!o:this.visible=!e.initialHide,n==null||n.initCol(this),i==null||i.initCol(this)}setColDef(e,t,n){var o;const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((o=this.beans.rowSpanSvc)==null||o.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",n)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:n}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=Ke(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=Ke(n)&&n.includes(".")&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:n=>{const i=e.recreateColDef(this.colDef);this.setColDef(i,i,n.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const n=e.width,i=e.initialWidth;return n!=null?t=n:i!=null?t=i:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){var i,o,s;this.frameworkEventListenerService=(o=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:o.call(i,this.frameworkEventListenerService,this.colEventSvc);const n=((s=this.frameworkEventListenerService)==null?void 0:s.wrap(e,t))??t;this.colEventSvc.addEventListener(e,n)}removeEventListener(e,t){var i;const n=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,n)}createColumnFunctionCallbackParams(e){return vt(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??aq[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const n=this.createColumnFunctionCallbackParams(e);return t(n)}return!1}createColumnEvent(e,t){return vt(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return hn(this.sort)}isSorting(){return Ke(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){var e;return Oe(261),!!((e=this.beans.colHover)!=null&&e.isHovered(this))}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const n=e===!0;this.visible!==n&&(this.visible=n,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e!=null&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!(e!=null&&e.isPadding()))return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let n=!0;for(;e;){if(!e.isPadding()){n=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:n}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return vt(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(hn(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(hn(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}setActualWidth(e,t,n=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,n){const i=this.createColumnEvent(e,t);n&&Ti(i,n),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function fi(e){return e instanceof yg}var yg=class extends be{constructor(e,t,n,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=n,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=xI(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&e.openByDefault)}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)Xr(t)?e(t):fi(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)Xr(t)?e.push(t):fi(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,n=!1;const i=this.findChildrenRemovingPadding();for(let s=0,r=i.length;s<r;s++){const a=i[s];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,n=!0):l==="closed"?(t=!0,n=!0):(e=!0,t=!0)}const o=e&&t&&n;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=n=>{for(const i of n)fi(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},cq={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function FI(e,t,n){const i={},o=e.gos;return Object.assign(i,o.get("defaultColGroupDef")),Object.assign(i,t),o.validateColDef(i,n),i}var uq=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Rw(e);let n=0;for(;;){let i=e??t;if(i?n!==0&&(i+="_"+n):i=n,!this.existingKeys[i]){const o=String(i);return e&&n>0&&Oe(273,{providedId:e,usedId:o}),this.existingKeys[o]=!0,o}n++}}};function nn(e){if(e!=null&&e.length)return e[e.length-1]}function Jr(e,t,n){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const i=e.length;if(i!==t.length)return!1;for(let o=0;o<i;o++)if(e[o]!==t[o]&&!(n!=null&&n(e[o],t[o])))return!1;return!0}function Qd(e,t){if(e)for(const n of e)t(n)}function Jo(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function TI(e,t,n){for(let i=0;i<t.length;i++)Jo(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(n,0,t[i])}var Cg="ag-Grid-AutoColumn",PI="ag-Grid-SelectionColumn",II="ag-Grid-RowNumbersColumn";function AI(e){const t=[],n=i=>{for(let o=0;o<i.length;o++){const s=i[o];Xr(s)?t.push(s):fi(s)&&n(s.getChildren())}};return n(e),t}function hr(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function wg(e,t,n){const i={};if(!t)return;gr(null,t,s=>{i[s.getInstanceId()]=s}),n&&gr(null,n,s=>{i[s.getInstanceId()]=null});const o=Object.values(i).filter(s=>s!=null);e.context.destroyBeans(o)}function Kw(e){return e.getId().startsWith(Cg)}function fr(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(PI))??!1}function pr(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(II))??!1}function dq(e){return fr(e)||pr(e)}function bg(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function hq(e,t){return Jr(e,t,(n,i)=>n.getColId()===i.getColId())}function fq(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function Bc(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function eh(e,t){const n=e===t,i=e.getColDef()===t,o=e.getColId()==t;return n||i||o}var pq=(e,t)=>(n,i)=>{const o={value1:void 0,value2:void 0};let s=!1;return e&&(e[n]!==void 0&&(o.value1=e[n],s=!0),Ke(i)&&e[i]!==void 0&&(o.value2=e[i],s=!0)),!s&&t&&(t[n]!==void 0&&(o.value1=t[n]),Ke(i)&&t[i]!==void 0&&(o.value2=t[i])),o},gq=(e,t)=>{fi(e)&&e.setupExpandable(),e.originalParent=t};function mq(e,t=null,n,i,o){const s=new uq,{existingCols:r,existingGroups:a,existingColKeys:l}=vq(i);s.addExistingKeys(l);const c=kI(e,t,0,n,r,s,a,o),{colGroupSvc:u}=e,d=(u==null?void 0:u.findMaxDepth(c,0))??0,h=u?u.balanceColumnTree(c,0,d,s):c;return gr(null,h,gq),{columnTree:h,treeDepth:d}}function vq(e){const t=[],n=[],i=[];return e&&gr(null,e,o=>{if(fi(o)){const s=o;n.push(s)}else{const s=o;i.push(s.getId()),t.push(s)}}),{existingCols:t,existingGroups:n,existingColKeys:i}}function kI(e,t,n,i,o,s,r,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let u=0;u<c.length;u++){const d=t[u];l&&Eq(d)?c[u]=l.createProvidedColumnGroup(i,d,n,o,s,r,a):c[u]=yq(e,i,d,o,s,a)}return c}function yq(e,t,n,i,o,s){var l;const r=wq(n,i);r&&(i==null||i.splice(r.idx,1));let a=r==null?void 0:r.column;if(a){const c=qw(e,n,a.getColId());a.setColDef(c,n,s),Cq(e,a,c,s)}else{const c=o.getUniqueKey(n.colId,n.field),u=qw(e,n,c);a=new ll(u,n,c,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function OI(e,t,n,i,o,s,r,a){const{sortSvc:l,pinnedCols:c,colFlex:u}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,i,a),o!==void 0&&l.setColSortIndex(t,o)),s!==void 0&&(c==null||c.setColPinned(t,s)),r!==void 0&&(u==null||u.setColFlex(t,r))}function Cq(e,t,n,i){OI(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,i);const o=t.getFlex();if(!(o!=null&&o>0))if(n.width!=null)t.setActualWidth(n.width,i);else{const s=t.getActualWidth();t.setActualWidth(s,i)}}function wq(e,t){if(t)for(let n=0;n<t.length;n++){const i=t[n].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[n].getId()===e.colId)return{idx:n,column:t[n]};continue}if(e.field!=null){if(i.field===e.field)return{idx:n,column:t[n]};continue}if(i===e)return{idx:n,column:t[n]}}}function qw(e,t,n,i){const{gos:o,dataTypeSvc:s}=e,r={},a=o.get("defaultColDef");Ti(r,a,!1,!0);const l=bq(e,r,t,n);l&&Sq(e,l,r);const c=r.cellDataType;Ti(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const u=o.get("autoGroupColumnDef"),d=xs(o);return t.rowGroup&&u&&d&&Ti(r,{sort:u.sort,initialSort:u.initialSort},!1,!0),s&&(s.postProcess(r),s.validateColDef(r)),o.validateColDef(r,n,i),r}function bq(e,t,n,i){var r;const o=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,n,i),s=n.type??o??t.type;return t.type=s,s?bg(s):void 0}function Sq(e,t,n){if(!t.length)return;const i=Object.assign({},cq),o=e.gos.get("columnTypes")||{};for(const s of Object.keys(o)){const r=o[s];s in i?Oe(34,{key:s}):(r.type&&Oe(35),i[s]=r)}for(const s of t){const r=i[s.trim()];r?Ti(n,r,!1,!0):Oe(36,{t:s})}}function Eq(e){return e.children!==void 0}function gr(e,t,n){if(t)for(let i=0;i<t.length;i++){const o=t[i];fi(o)&&gr(o,o.getChildren(),n),n(o,e)}}function MI(e,t){const n=[],i=[],o=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?o.push(r):a==="left"||a===!0?n.push(r):i.push(r)}),t.get("enableRtl")?[...o,...i,...n]:[...n,...i,...o]}function LI(e,t){let n=!0;return gr(null,t,i=>{if(!fi(i))return;const o=i,s=o.getColGroupDef();if(!(s==null?void 0:s.marryChildren))return;const a=[];for(const h of o.getLeafColumns()){const f=e.indexOf(h);a.push(f)}const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),u=l-c,d=o.getLeafColumns().length-1;u>d&&(n=!1)}),n}function NI(e,t){if(!e||e.length==0)return;const n=t(e[0]);for(let i=1;i<e.length;i++)if(n!==t(e[i]))return;return n}function VI(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,o=NI(t,s=>s.getPinned());e.dispatchEvent({type:"columnPinned",pinned:o??null,columns:t,column:i,source:n})}function Rq(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,o=NI(t,s=>s.isVisible());e.dispatchEvent({type:"columnVisible",visible:o,columns:t,column:i,source:n})}function Dq(e,t,n,i){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:i})}function Hc(e,t,n,i,o=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:o,finished:n,source:i})}function Qo(e,t,n){var R;const{colModel:i,rowGroupColsSvc:o,pivotColsSvc:s,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:u,environment:d,valueColsSvc:h,eventSvc:f,gos:g}=e,m=i.getColDefCols()??[],y=a==null?void 0:a.getColumns();if(!m.length&&!(y!=null&&y.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return Oe(32),!1;const b=(E,x,k,O,A)=>{if(!E)return;const D=pq(x,t.defaultState),P=D("flex").value1;if(OI(e,E,D("hide").value1,D("sort").value1,D("sortIndex").value1,D("pinned").value1,P,n),P==null){const V=D("width").value1;if(V!=null){const H=E.getColDef().minWidth??d.getDefaultColumnMinWidth();H!=null&&V>=H&&E.setActualWidth(V,n)}}A||!E.isPrimary()||(h==null||h.syncColumnWithState(E,n,D),o==null||o.syncColumnWithState(E,n,D,k),s==null||s.syncColumnWithState(E,n,D,O))},S=(E,x,k)=>{var ue,xe;const O=BI(e,n),A=x.slice(),D={},P={},V=[],H=[],te=[];let B=0;const G=(o==null?void 0:o.columns.slice())??[],Z=(s==null?void 0:s.columns.slice())??[];for(const re of E){const Ie=re.colId;if(Ie.startsWith(Cg)){V.push(re),te.push(re);continue}if(fr(Ie)){H.push(re),te.push(re);continue}const Je=k(Ie);Je?(b(Je,re,D,P,!1),Jo(A,Je)):(te.push(re),B+=1)}const $=re=>b(re,null,D,P,!1);A.forEach($),o==null||o.sortColumns(GI.bind(o,D,G)),s==null||s.sortColumns(GI.bind(s,P,Z)),i.refreshCols(!1,n);const ce=(re,Ie,Me=[])=>{for(const Je of Ie){const gt=re(Je.colId);Jo(Me,gt),b(gt,Je,null,null,!0)}Me.forEach($)};return ce(re=>(r==null?void 0:r.getColumn(re))??null,V,(ue=r==null?void 0:r.getColumns())==null?void 0:ue.slice()),ce(re=>(a==null?void 0:a.getColumn(re))??null,H,(xe=a==null?void 0:a.getColumns())==null?void 0:xe.slice()),xq(t,i,g),c.refresh(n),f.dispatchEvent({type:"columnEverythingChanged",source:n}),O(),{unmatchedAndAutoStates:te,unmatchedCount:B}};l==null||l.start();let{unmatchedAndAutoStates:F,unmatchedCount:C}=S(t.state||[],m,E=>i.getColDefCol(E));if(F.length>0||Ke(t.defaultState)){const E=((R=u==null?void 0:u.getPivotResultCols())==null?void 0:R.list)??[];C=S(F,E,x=>(u==null?void 0:u.getPivotResultCol(x))??null).unmatchedCount}return l==null||l.finish(),C===0}function _q(e,t){var S,F;const{colModel:n,autoColSvc:i,selectionColSvc:o,eventSvc:s,gos:r}=e,a=n.getColDefCols();if(!(a!=null&&a.length))return;const l=n.getColDefColTree(),c=AI(l),u=[];let d=1e3,h=1e3;const f=C=>{const R=HI(C);hn(R.rowGroupIndex)&&R.rowGroup&&(R.rowGroupIndex=d++),hn(R.pivotIndex)&&R.pivot&&(R.pivotIndex=h++),u.push(R)};(S=i==null?void 0:i.getColumns())==null||S.forEach(f),(F=o==null?void 0:o.getColumns())==null||F.forEach(f),c==null||c.forEach(f),Qo(e,{state:u},t);const g=(i==null?void 0:i.getColumns())??[],b=[...(o==null?void 0:o.getColumns())??[],...g,...a].map(C=>({colId:C.colId}));Qo(e,{state:b,applyOrder:!0},t),s.dispatchEvent(vt(r,{type:"columnsReset",source:t}))}function BI(e,t){const{rowGroupColsSvc:n,pivotColsSvc:i,valueColsSvc:o,colModel:s,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(i==null?void 0:i.columns.slice())??[],valueColumns:(o==null?void 0:o.columns.slice())??[]},c=Sg(e),u={};for(const d of c)u[d.colId]=d;return()=>{const d=(E,x,k,O)=>{const A=x.map(O),D=k.map(O);if(Jr(A,D))return;const V=new Set(x);for(const te of k)V.delete(te)||V.add(te);const H=[...V];a.dispatchEvent({type:E,columns:H,column:H.length===1?H[0]:null,source:t})},h=E=>{const x=[];return s.forAllCols(k=>{const O=u[k.getColId()];O&&E(O,k)&&x.push(k)}),x},f=E=>E.getColId();d("columnRowGroupChanged",l.rowGroupColumns,(n==null?void 0:n.columns)??[],f),d("columnPivotChanged",l.pivotColumns,(i==null?void 0:i.columns)??[],f);const m=h((E,x)=>{const k=E.aggFunc!=null,O=k!=x.isValueActive(),A=k&&E.aggFunc!=x.getAggFunc();return O||A});m.length>0&&Dq(a,"columnValueChanged",m,t),Hc(a,h((E,x)=>E.width!=x.getActualWidth()),!0,t),VI(a,h((E,x)=>E.pinned!=x.getPinned()),t),Rq(a,h((E,x)=>E.hide==x.isVisible()),t);const C=h((E,x)=>E.sort!=x.getSort()||E.sortIndex!=x.getSortIndex());C.length>0&&(r==null||r.dispatchSortChangedEvents(t,C));const R=Sg(e);Tq(c,R,t,s,a)}}function Sg(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:i}=e,o=t.getColDefCols();if(hn(o)||!t.isAlive())return[];const s=n==null?void 0:n.columns,r=i==null?void 0:i.columns,a=[],l=u=>{const d=u.isRowGroupActive()&&s?s.indexOf(u):null,h=u.isPivotActive()&&r?r.indexOf(u):null,f=u.isValueActive()?u.getAggFunc():null,g=u.getSort()!=null?u.getSort():null,m=u.getSortIndex()!=null?u.getSortIndex():null;a.push({colId:u.getColId(),width:u.getActualWidth(),hide:!u.isVisible(),pinned:u.getPinned(),sort:g,sortIndex:m,aggFunc:f,rowGroup:u.isRowGroupActive(),rowGroupIndex:d,pivot:u.isPivotActive(),pivotIndex:h,flex:u.getFlex()??null})};t.forAllCols(u=>l(u));const c=new Map(t.getCols().map((u,d)=>[u.getColId(),d]));return a.sort((u,d)=>{const h=c.has(u.colId)?c.get(u.colId):-1,f=c.has(d.colId)?c.get(d.colId):-1;return h-f}),a}function HI(e){const t=(g,m)=>g??m??null,n=e.getColDef(),i=t(n.sort,n.initialSort),o=t(n.sortIndex,n.initialSortIndex),s=t(n.hide,n.initialHide),r=t(n.pinned,n.initialPinned),a=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex);let c=t(n.rowGroupIndex,n.initialRowGroupIndex),u=t(n.rowGroup,n.initialRowGroup);c==null&&!u&&(c=null,u=null);let d=t(n.pivotIndex,n.initialPivotIndex),h=t(n.pivot,n.initialPivot);d==null&&!h&&(d=null,h=null);const f=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:o,hide:s,pinned:r,width:a,flex:l,rowGroup:u,rowGroupIndex:c,pivot:h,pivotIndex:d,aggFunc:f}}function xq(e,t,n){if(!e.applyOrder||!e.state)return;const i=[];for(const o of e.state)o.colId!=null&&i.push(o.colId);Fq(t.cols,i,t,n)}function Fq(e,t,n,i){if(e==null)return;let o=[];const s={};for(const a of t){if(s[a])continue;const l=e.map[a];l&&(o.push(l),s[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(s[l]!=null)continue;l.startsWith(Cg)?o.splice(r++,0,a):o.push(a)}if(o=MI(o,i),!LI(o,n.getColTree())){Oe(39);return}e.list=o}function Tq(e,t,n,i,o){const s={};for(const u of t)s[u.colId]=u;const r={};for(const u of e)s[u.colId]&&(r[u.colId]=!0);const a=e.filter(u=>r[u.colId]),l=t.filter(u=>r[u.colId]),c=[];l.forEach((u,d)=>{const h=a==null?void 0:a[d];if(h&&h.colId!==u.colId){const f=i.getCol(h.colId);f&&c.push(f)}}),c.length&&o.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:n})}var GI=(e,t,n,i)=>{const o=e[n.getId()],s=e[i.getId()],r=o!=null,a=s!=null;if(r&&a)return o-s;if(r)return-1;if(a)return 1;const l=t.indexOf(n),c=t.indexOf(i),u=l>=0,d=c>=0;return u&&d?l-c:u?-1:1},Pq=class extends be{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(Bc(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Bc(e.source)))}createColsFromColDefs(e){var S,F,C;const{beans:t}=this,{valueCache:n,colAutosize:i,rowGroupColsSvc:o,pivotColsSvc:s,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,u=this.colDefs?BI(t,e):void 0;n==null||n.expire();const d=(S=this.colDefCols)==null?void 0:S.list,h=(F=this.colDefCols)==null?void 0:F.tree,f=mq(t,this.colDefs,!0,h,e);wg(t,(C=this.colDefCols)==null?void 0:C.tree,f.columnTree);const g=f.columnTree,m=f.treeDepth,y=AI(g),b={};for(const R of y)b[R.getId()]=R;this.colDefCols={tree:g,treeDepth:m,list:y,map:b},this.createColumnsForService([c],this.colDefCols,e),o==null||o.extractCols(e,d),s==null||s.extractCols(e,d),r==null||r.extractCols(e,d),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),u&&(this.changeEventsDispatching=!0,u(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e,t){var y;if(!this.colDefCols)return;const n=(y=this.cols)==null?void 0:y.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:o,rowNumbersSvc:s,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:u,colViewport:d,eventSvc:h}=this.beans,f=this.selectCols(a,this.colDefCols);this.createColumnsForService([i,o,s],f,t);const g=Y9(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(f),this.positionLockedCols(f),l==null||l.refresh(),r==null||r.refreshCols(),this.setColSpanActive(),c==null||c.setAutoHeightActive(f),u.clear(),d.clear(),!Jr(n,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,n){for(const i of e)i&&(i.createColumns(t,o=>{this.lastOrder=o(this.lastOrder),this.lastPivotOrder=o(this.lastPivotOrder)},n),i.addColumns(t))}selectCols(e,t){const n=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=n!=null;const{map:i,list:o,tree:s,treeDepth:r}=n??t;return this.cols={list:o.slice(),map:{...i},tree:s.slice(),treeDepth:r},n&&(n.list.some(l=>{var c;return((c=this.cols)==null?void 0:c.map[l.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:n}=this.beans,i=this.isPivotMode()&&!this.showingPivotResult,o=t==null?void 0:t.isSelectionColumnEnabled(),s=n.get("rowNumbers"),r=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const c=Kw(l);if(i){const u=r==null?void 0:r.includes(l);return c||u||o&&fr(l)||s&&pr(l)}else return c||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Qo(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},n)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const n=t.filter(d=>e.map[d.getId()]!=null);if(n.length===0)return;if(n.length===e.list.length){e.list=n;return}const i=d=>{const h=d.getOriginalParent();return h?h.getChildren().length>1?!0:i(h):!1};if(!n.some(d=>i(d))){const d=new Set(n);for(const h of e.list)d.has(h)||n.push(h);e.list=n;return}const o=new Map;for(let d=0;d<n.length;d++){const h=n[d];o.set(h,d)}const s=e.list.filter(d=>!o.has(d));if(s.length===0){e.list=n;return}const r=(d,h)=>{const f=h?h.getOriginalParent():d.getOriginalParent();if(!f)return null;let g=null,m=null;for(const y of f.getChildren())if(!(y===h||y===d)){if(y instanceof ll){const b=o.get(y);if(b==null)continue;(g==null||g<b)&&(g=b,m=y);continue}y.forEachLeafColumn(b=>{const S=o.get(b);S!=null&&(g==null||g<S)&&(g=S,m=b)})}return m??r(d,f)},a=[],l=new Map;for(const d of s){const h=r(d,null);if(h==null){a.push(d);continue}const f=l.get(h);f===void 0?l.set(h,d):Array.isArray(f)?f.push(d):l.set(h,[f,d])}const c=new Array(e.list.length);let u=c.length-1;for(let d=a.length-1;d>=0;d--)c[u--]=a[d];for(let d=n.length-1;d>=0;d--){const h=n[d],f=l.get(h);if(f)if(Array.isArray(f))for(let g=f.length-1;g>=0;g--){const m=f[g];c[u--]=m}else c[u--]=f;c[u--]=h}e.list=c}positionLockedCols(e){e.list=MI(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(e){var t,n;return this.colDefCols&&((n=this.beans.colDefFactory)==null?void 0:n.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((t=this.cols)==null?void 0:t.list)??[],e))}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:n,eventSvc:i}=this.beans;n.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var n;if(!this.cols)return;(n=this.beans.autoColSvc)==null||n.updateColumns(e);const t=Bc(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;wg(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}forAllCols(e){var s,r,a,l,c;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:i,groupHierarchyColSvc:o}=this.beans;Qd((s=this.colDefCols)==null?void 0:s.list,e),Qd((r=n==null?void 0:n.columns)==null?void 0:r.list,e),Qd((a=i==null?void 0:i.columns)==null?void 0:a.list,e),Qd((l=o==null?void 0:o.columns)==null?void 0:l.list,e),Qd((c=t==null?void 0:t.getPivotResultCols())==null?void 0:c.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t;return((t=this.cols)==null?void 0:t.map[e])??null}getColFromCollection(e,t){if(t==null)return null;const{map:n,list:i}=t;if(typeof e=="string"&&n[e])return n[e];for(let a=0;a<i.length;a++)if(eh(i[a],e))return i[a];const{autoColSvc:o,selectionColSvc:s,groupHierarchyColSvc:r}=this.beans;return(o==null?void 0:o.getColumn(e))??(s==null?void 0:s.getColumn(e))??(r==null?void 0:r.getColumn(e))??null}},$I=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let n;return typeof t!="number"?n=0:n=t+1,this.existingIds[e]=n,n}};function th(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var je=null;function WI(e){return typeof(e==null?void 0:e.getGui)=="function"}var UI=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.indexOf(" ")>=0){const o=(e||"").split(" ");if(o.length>1){for(const s of o)this.toggleCss(s,t);return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},Iq=0,nh=class extends Ds{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Iq++,this.cssManager=new UI(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(n=>[n.selector,n])),e&&this.setTemplate(e)}preConstruct(){var t,n;this.wireTemplate(this.getGui());const e="component-"+((n=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:n.name);for(const i of this.css??[])this.beans.environment.addGlobalCSS(i,e)}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(J1):null}applyElementsToComponent(e,t,n,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const o=this[t];if(o===je)this[t]=i??e;else{const s=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!s)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${o}`)}}}createChildComponentsFromTags(e,t){const n=[];for(const i of e.childNodes??[])n.push(i);for(const i of n){if(!(i instanceof HTMLElement))continue;const o=this.createComponentFromElement(i,s=>{const r=s.getGui();if(r)for(const a of i.attributes??[])r.setAttribute(a.name,a.value)},t);if(o){if(o.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const s=Array.prototype.slice.call(i.children);o.addItems(s)}this.swapComponentForNode(o,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)}}createComponentFromElement(e,t,n){const i=e.nodeName,o=this.getDataRefAttribute(e),s=i.indexOf("AG-")===0,r=s?this.componentSelectors.get(i):null;let a=null;if(r){const l=n&&o?n[o]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(s)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,o,n,a),a}swapComponentForNode(e,t,n){const i=e.getGui();t.replaceChild(i,n),t.insertBefore(document.createComment(n.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const n of e)n.setAttribute("tabindex",t.toString())}setTemplate(e,t,n){let i;typeof e=="string"||e==null?i=Fw(e):i=zd(e),this.setTemplateFromElement(i,t,n)}setTemplateFromElement(e,t,n,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let o=0;o<t.length;o++){const s=t[o];this.componentSelectors.set(s.selector,s)}this.wireTemplate(e,n)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let n=t;return e==null?null:(n||(n=this.eGui),Iw(e)?{element:e,parent:n}:{element:e.getGui(),parent:n})}prependChild(e,t){const{element:n,parent:i}=this.getContainerAndElement(e,t)||{};!n||!i||i.insertAdjacentElement("afterbegin",n)}appendChild(e,t){const{element:n,parent:i}=this.getContainerAndElement(e,t)||{};!n||!i||i.appendChild(n)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:n}=t;d9(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;fn(this.eGui,e,{skipAriaHidden:n});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,n){this.eGui.addEventListener(e,t,n),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},qt=class extends nh{};function zI(e){return typeof e=="object"&&!!e.component}function Aq(e,t){return new Rn(n=>{n(window.setInterval(e,t))})}var Rn=class Lh{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(n=>this.onDone(n),n=>this.onReject(n))}static all(t){return t.length?new Lh(n=>{let i=t.length;const o=new Array(i);t.forEach((s,r)=>{s.then(a=>{o[r]=a,i--,i===0&&n(o)})})}):Lh.resolve()}static resolve(t=null){return new Lh(n=>n(t))}then(t){return new Lh(n=>{this.status===1?n(t(this.resolution)):this.waiters.push(i=>n(t(i)))})}onDone(t){this.status=1,this.resolution=t;for(const n of this.waiters)n(t)}onReject(t){}};function kq(e){return e?e.prototype&&"getGui"in e.prototype:!1}function jI(e,t,n,i){const{name:o}=n;let s,r,a,l,c,u;if(t){const d=t,h=d[o+"Selector"],f=h?h(i):null,g=m=>{typeof m=="string"?s=m:m!=null&&m!==!0&&(e.isFrameworkComponent(m)?a=m:r=m)};f?(g(f.component),l=f.params,c=f.popup,u=f.popupPosition):g(d[o])}return{compName:s,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:u}}var Oq=class extends be{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,n,i=!1){return this.getCompDetails(this.gridOptions,e,t,n,i)}getCompDetails(e,t,n,i,o=!1){var F;const{name:s,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:u,popupFromSelector:d,popupPositionFromSelector:h}=jI(this.beans.frameworkOverrides,e,t,i),f,g;const m=C=>{const R=this.registry.getUserComponent(s,C);R&&(l=R.componentFromFramework?void 0:R.component,c=R.componentFromFramework?R.component:void 0,f=R.params,g=R.processParams)};if(a!=null&&m(a),l==null&&c==null&&n!=null&&m(n),l&&r&&!kq(l)&&(l=(F=this.agCompUtils)==null?void 0:F.adaptFunction(t,l)),!l&&!c){const{validation:C}=this.beans;o&&(a!==n||!n)?a?C!=null&&C.isProvidedUserComp(a)||Qt(50,{compName:a}):n?C||Qt(260,{...this.gos.getModuleErrorParams(),propName:s,compName:n}):Qt(216,{name:s}):n&&!C&&Qt(146,{comp:n});return}const y=this.mergeParams(e,t,i,u,f,g),b=l==null,S=l??c;return{componentFromFramework:b,componentClass:S,params:y,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(S,b,y,t)}}newAgStackInstance(e,t,n,i){var a;const o=!t;let s;o?s=new e:s=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(s);const r=(a=s.init)==null?void 0:a.call(s,n);return r==null?Rn.resolve(s):r.then(()=>s)}mergeParams(e,t,n,i=null,o,s){const r={...n,...o},a=e,l=a==null?void 0:a[t.name+"Params"];if(typeof l=="function"){const c=l(n);Ti(r,c)}else typeof l=="object"&&Ti(r,l);return Ti(r,i),s?s(r):r}},Mq={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},Lq={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Nq={name:"headerComponent",optionalMethods:["refresh"]},Vq={name:"innerHeaderComponent"},Bq={name:"innerHeaderGroupComponent"},Hq={name:"headerGroupComponent"},Gq={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},$q={name:"loadingCellRenderer",cellRenderer:!0},Wq={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},Uq={name:"loadingOverlayComponent",optionalMethods:["refresh"]},zq={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},jq={name:"tooltipComponent"},Yw={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Kq={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},qq={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Yq={name:"loadingCellRenderer",cellRenderer:!0},Zq={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Xq={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Jq(e,t){return e.getCompDetailsFromGridOptions(Lq,"agDragAndDropImage",t,!0)}function Qq(e,t,n){return e.getCompDetails(t,Nq,"agColumnHeader",n)}function eY(e,t,n){return e.getCompDetails(t,Vq,void 0,n)}function tY(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,Hq,"agColumnGroupHeader",t)}function nY(e,t,n){return e.getCompDetails(t,Bq,void 0,n)}function iY(e,t){return e.getCompDetailsFromGridOptions(qq,void 0,t,!0)}function oY(e,t){return e.getCompDetailsFromGridOptions(Yq,"agLoadingCellRenderer",t,!0)}function sY(e,t){return e.getCompDetailsFromGridOptions(Zq,"agGroupRowRenderer",t,!0)}function rY(e,t){return e.getCompDetailsFromGridOptions(Xq,"agDetailCellRenderer",t,!0)}function KI(e,t,n){return e.getCompDetails(t,Gq,void 0,n)}function qI(e,t,n){return e.getCompDetails(t,$q,"agSkeletonCellRenderer",n,!0)}function YI(e,t,n){return e.getCompDetails(t,Wq,"agCellEditor",n,!0)}function aY(e,t,n,i){const o=t.filter;return zI(o)&&(t={filter:o.component,filterParams:t.filterParams}),e.getCompDetails(t,Yw,i,n,!0)}function lY(e,t,n){return e.getCompDetails(t,Mq,"agDateInput",n,!0)}function cY(e,t){return e.getCompDetailsFromGridOptions(Uq,"agLoadingOverlay",t,!0)}function uY(e,t){return e.getCompDetailsFromGridOptions(zq,"agNoRowsOverlay",t,!0)}function dY(e,t){return e.getCompDetails(t.colDef,jq,"agTooltipComponent",t,!0)}function hY(e,t,n,i){return e.getCompDetails(t,Kq,i,n)}function ZI(e,t){return jI(e,t,Yw)}function Zw(e,t,n){return e.mergeParams(t,Yw,n)}function ih(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function fY(e){return typeof e=="object"&&!!e.getComp}var de={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},Xw=class extends nh{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;(e==null?void 0:e.isAlive())&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Jw,Qw,eb,tb,nb,ib,ob;function Qr(){return Jw===void 0&&(Jw=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Jw}function XI(){return Qw===void 0&&(Qw=/(firefox)/i.test(navigator.userAgent)),Qw}function JI(){return eb===void 0&&(eb=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),eb}function cl(){return tb===void 0&&(tb=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),tb}function sb(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!XI())?null:t.toString()}function pY(){if(ob!==void 0)return ob;if(!document.body)return-1;let e=1e6;const t=XI()?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){const i=e*2;if(n.style.height=i+"px",i>t||n.clientHeight!==i)break;e=i}return n.remove(),ob=e,e}function gY(){return ib==null&&QI(),ib}function QI(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let n=t.offsetWidth-t.clientWidth;n===0&&t.clientWidth===0&&(n=null),t.parentNode&&t.remove(),n!=null&&(ib=n,nb=n===0)}function eA(){return nb==null&&QI(),nb}var rb="T",mY=new RegExp(`[${rb} ]`),vY=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${rb}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Fs(e,t){return e.toString().padStart(t,"0")}function io(e,t=!0,n=rb){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(o=>Fs(o,2)).join("-");return t&&(i+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(o=>Fs(o,2)).join(":")),i}function Eg(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Fs(e.getDate(),2),Fs(e.getHours(),2),`:${Fs(e.getMinutes(),2)}`,`:${Fs(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Fs(e.getDate(),2)].map(String):null}var ab=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},tA=["January","February","March","April","May","June","July","August","September","October","November","December"],lb=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function cb(e,t){if(t==null)return io(e,!1);const n=Fs(e.getFullYear(),4),i={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>tA[e.getMonth()],MMM:()=>tA[e.getMonth()].slice(0,3),MM:()=>Fs(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${ab(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${ab(e.getDate())}`,DD:()=>Fs(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>lb[e.getDay()],ddd:()=>lb[e.getDay()].slice(0,3),dd:()=>lb[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${ab(e.getDay())}`,d:()=>`${e.getDay()}`},o=new RegExp(Object.keys(i).join("|"),"g");return t.replace(o,s=>s in i?i[s]():s)}function Rg(e,t=!1){return!!Vi(e,t)}function yY(e){return Rg(e,!0)}function Vi(e,t=!1,n){if(!e||!n&&!vY.test(e))return null;const[i,o]=e.split(mY);if(!i)return null;const s=i.split("-").map(f=>Number.parseInt(f,10));if(s.filter(f=>!isNaN(f)).length!==3)return null;const[r,a,l]=s,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!o&&t)return null;if(!o||o==="00:00:00")return c;const[u,d,h]=o.split(":").map(f=>Number.parseInt(f,10));if(u>=0&&u<24)c.setHours(u);else if(t)return null;if(d>=0&&d<60)c.setMinutes(d);else if(t)return null;if(h>=0&&h<60)c.setSeconds(h);else if(t)return null;return c}function ub(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:i,filterByPercentageOfBestMatch:o}=e;let s=(n??[]).map((l,c)=>({value:l,relevance:CY(t,l),idx:c}));if(s.sort((l,c)=>l.relevance-c.relevance),i&&(s=s.filter(l=>l.relevance<Math.max(l.value.length,t.length))),s.length>0&&o&&o>0){const c=s[0].relevance*o;s=s.filter(u=>c-u.relevance<0)}const r=[],a=[];for(const l of s)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function CY(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],i=[];const o=e.length,s=t.length;for(let a=0;a<=s;a++)n[a]=a;let r=0;for(let a=1;a<=o;a++){i[0]=a;for(let l=1;l<=s;l++){const c=e[a-1],u=t[l-1];if(c.toLocaleLowerCase()===u.toLocaleLowerCase())++r,c===u&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<o/2-10&&++r,i[l]=n[l-1];else{const d=i[l-1],h=n[l],f=n[l-1];i[l]=1+Math.min(d,h,f)}}[n,i]=[i,n]}return n[s]/(r+1)}function nA(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var db=!1,Dg=0;function wY(e){Dg>0||(e.addEventListener("keydown",_g),e.addEventListener("mousedown",_g))}function bY(e){Dg>0||(e.removeEventListener("keydown",_g),e.removeEventListener("mousedown",_g))}function _g(e){const t=db,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(db=n)}function SY(e){const t=Zn(e);return wY(t),Dg++,()=>{Dg--,bY(t)}}function EY(){return db}function Gc(e,t,n=!1){const i=u9;let o=z1;t&&(o+=", "+t),n&&(o+=', [tabindex="-1"]');const s=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>Es(l)),r=Array.prototype.slice.apply(e.querySelectorAll(o));return r.length?((l,c)=>l.filter(u=>c.indexOf(u)===-1))(s,r):s}function ul(e,t=!1,n=!1,i=!1){const o=Gc(e,i?".ag-tab-guard":null,n),s=t?nn(o):o[0];return s?(s.focus({preventScroll:!0}),!0):!1}function dl(e,t,n,i){const o=Gc(t,n?':not([tabindex="-1"])':null),s=yn(e);let r;n?r=o.findIndex(l=>l.contains(s)):r=o.indexOf(s);const a=r+(i?-1:1);return a<0||a>=o.length?null:o[a]}function iA(e,t=5){let n=0;for(;e&&sb(e)===null&&++n<=t;)e=e.parentElement;return sb(e)===null?null:e}var RY=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",DY=class extends nh{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(RY)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:i,disabled:o}=this.config;o!=null&&this.setDisabled(o),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),n!=null&&this.setLabelWidth(n),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;ii(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(fn(t,!1),jr(t,"presentation")):(fn(t,!0),jr(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const n=this.getGui().classList;return n.toggle("ag-label-align-left",e==="left"),n.toggle("ag-label-align-right",e==="right"),n.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(lg(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Gd(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},oA=class extends DY{constructor(e,t,n,i){super(e,t,n),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:n}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),n!=null&&this.onValueChange(n),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),n=this.getLabel();n==null||n==""||q7(e)!==null?Bd(e,""):Bd(e,t??"")}setAriaLabel(e){return Ic(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Rs(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function _Y(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var hl=class extends oA{constructor(e,t,n="text",i="input"){super(e,(e==null?void 0:e.template)??_Y(i),[],t),this.inputType=n,this.displayFieldTag=i,this.eLabel=je,this.eWrapper=je,this.eInput=je}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:n,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),n.classList.add(`${i}-input`),this.addCss("ag-input-field"),n.id=n.id||`ag-${this.getCompId()}-input`;const{inputName:o,inputWidth:s}=this.config;o!=null&&this.setInputName(o),s!=null&&this.setInputWidth(s),this.addInputListeners(),this.activateTabIndex([n])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,to(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return lg(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return to(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Ic(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Gd(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)to(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";to(this.eInput,"autocomplete",t)}return this}},hb=class extends hl{constructor(e,t="ag-checkbox",n="checkbox"){super(e,t,n),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const n=this.eInput;n.checked=e,n.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,n){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:n});const i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},fb={selector:"AG-CHECKBOX",component:hb},xY=class extends hb{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},fl=class extends hl{constructor(e,t="ag-text-field",n="text"){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const n=this.eInput;return n.value!==e&&(n.value=Ke(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{nA(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{var o;const i=(o=n.clipboardData)==null?void 0:o.getData("text");i!=null&&i.split("").some(s=>!e.test(s))&&n.preventDefault()}})}},xg={selector:"AG-INPUT-TEXT-FIELD",component:fl},FY=class extends hl{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},TY={selector:"AG-INPUT-TEXT-AREA",component:FY},pb=class extends fl{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const s=Number.parseFloat(e.value),r=isNaN(s)?"":this.normalizeValue(s.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:i,step:o}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof i=="number"&&this.setMax(i),typeof o=="number"&&this.setStep(o)}onWheel(e){yn(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const o=Number.parseFloat(e).toFixed(n);return Number.parseFloat(o).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=n)return e;if(n>0)return`${i[0]}.${i[1].slice(0,n)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,to(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,to(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,to(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if(Ke(n)){let i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return e(n);if(!i){n=this.adjustPrecision(n);const o=this.normalizeValue(n);i=n!=o}if(i)return t(n)}return e(n)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},PY={selector:"AG-INPUT-NUMBER-FIELD",component:pb},IY=class extends fl{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Qr();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){yn(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?io(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,to(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?io(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,to(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,to(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return Vi(this.getValue())??void 0}setDate(e,t){this.setValue(io(e??null,this.includeTime),t)}},sA={selector:"AG-INPUT-DATE-FIELD",component:IY},AY=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",kY="ag-active-item",OY=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),MY=class extends nh{constructor(e,t,n){super(OY(e,t)),this.label=t,this.value=n,this.eText=je}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(kY,e),W1(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();e9(n,e),Q7(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>Tw(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},LY=class extends nh{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(AY)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case de.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case de.DOWN:case de.UP:e.preventDefault(),this.navigate(t);break;case de.PAGE_DOWN:case de.PAGE_UP:case de.PAGE_HOME:case de.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:n}=e,i=n??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();ii(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(i=>i.value===e);if(n!==-1){const i=this.options[n];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.listItems[n]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!Es(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:i,clientHeight:o}=n,{offsetTop:s,offsetHeight:r}=t;(s+r>i+o||s<i)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){var e,t;(t=(e=this.highlightedItem)==null?void 0:e.tooltipFeature)==null||t.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){var e;(e=this.highlightedItem)==null||e.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const n=new MY(this.cssIdentifier,t,e);n.setParentComponent(this);const i=this.createManagedBean(n);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===de.DOWN;let n;const{listItems:i,highlightedItem:o}=this;if(!o)n=t?i[0]:nn(i);else{let r=i.indexOf(o)+(t?1:-1);r=Math.min(Math.max(r,0),i.length-1),n=i[r]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const i=t.indexOf(n),o=this.options.length-1,s=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/s);let a=-1;e===de.PAGE_HOME?a=0:e===de.PAGE_END?a=o:e===de.PAGE_DOWN?a=Math.min(i+r,o):e===de.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){jr(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,i)=>{n.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},NY=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",VY={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},BY=class extends oA{constructor(e){if(super(e,(e==null?void 0:e.template)||VY,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=je,this.eWrapper=je,this.eDisplayField=je,this.eIcon=je,this.registerCSS(NY),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:n,variableWidth:i,minPickerWidth:o,maxPickerWidth:s}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,n!=null&&this.setPickerMaxHeight(n),o!=null&&this.setPickerMinWidth(o),s!=null&&this.setPickerMaxWidth(s)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:n,inputWidth:i}=this.config;if(n){const o=this.beans.iconSvc.createIconNoSpan(n);o&&this.eIcon.appendChild(o)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),_w(e,!1),this.ariaRole&&jr(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case de.UP:case de.DOWN:case de.ENTER:case de.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case de.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:i,modalPicker:o=!0},maxPickerHeight:s,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:u}=this,d={modal:o,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=L1(c);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,i),anchorToElement:u};e.style.position="absolute";const h=c.popupSvc,f=h.addPopup(d);l?(r&&(e.style.minWidth=r),e.style.width=Pw(og(u)),a&&(e.style.maxWidth=a)):lg(e,a??og(u));const g=s??`${xw(h.getPopupParent())}px`;return e.style.setProperty("max-height",g),this.alignPickerToComponent(),f.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:i},eWrapper:o,pickerComponent:s}=this,r=i.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:o,ePopup:s.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();_w(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return lg(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},HY=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}",gb=class extends BY{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(HY)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:ag(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new LY("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),c9(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i==null||i.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){var e;(e=this.listComponent)==null||e.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){var n;const{key:t}=e;switch(t===de.TAB&&this.hidePicker(),t){case de.ENTER:case de.UP:case de.DOWN:case de.PAGE_UP:case de.PAGE_DOWN:case de.PAGE_HOME:case de.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case de.ESCAPE:super.onKeyDown(e);break;case de.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,n){const{listComponent:i,config:{placeholder:o},eDisplayField:s,tooltipFeature:r}=this;if(this.value===e||!i)return this;if(n||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&o&&(l=o),s.textContent=l,r==null||r.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},GY={selector:"AG-SELECT",component:gb},$Y=':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',mb=typeof window!="object"||!((zM=(UM=window==null?void 0:window.document)==null?void 0:UM.fonts)!=null&&zM.forEach),$c=(e,t,n,i,o,s)=>{if(mb)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let r=Wc.map.get(t);if(r||(r=[],Wc.map.set(t,r)),r.some(u=>u.css===e))return;const a=document.createElement("style");s&&a.setAttribute("nonce",s),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:o};let c;for(const u of r){if(u.priority>o)break;c=u}if(c){c.el.insertAdjacentElement("afterend",a);const u=r.indexOf(c);r.splice(u+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},rA=(e,t,n,i)=>{$c($Y,e,"shared",t,0,n),i==null||i.forEach((o,s)=>o.forEach(r=>$c(r,e,s,t,0,n)))},WY=e=>{Wc.grids.add(e)},UY=e=>{if(Wc.grids.delete(e),Wc.grids.size===0){Wc.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},aA,Wc=(aA=typeof window=="object"?window:{}).agStyleInjectionState??(aA.agStyleInjectionState={map:new WeakMap,grids:new Set}),Ts=e=>new lA(e),ea="$default",zY=0,lA=class{constructor({feature:e,params:t,modeParams:n={},css:i,cssImports:o}){this.feature=e,this.css=i,this.cssImports=o,this.modeParams={[ea]:{...n[ea]??{},...t??{}},...n}}use(e,t,n){let i=this._inject;if(i==null){let{css:o}=this;if(o){const s=`ag-theme-${this.feature??"part"}-${++zY}`;typeof o=="function"&&(o=o()),o=`:where(.${s}) {
112
112
  ${o}
@@ -185,8 +185,8 @@ If you are trying to annotate ${i} with application data, use the '${i}.context'
185
185
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(o=>i.set(o)),i}static accessor(t){const i=(this[SM]=this[SM]={accessors:{}}).accessors,o=this.prototype;function s(r){const a=Rh(r);i[a]||(lde(o,r),i[a]=!0)}return pe.isArray(t)?t.forEach(s):s(t),this}};$i.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),pe.reduceDescriptors($i.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}}),pe.freezeMethods($i);function NS(e,t){const n=this||Eh,i=t||n,o=$i.from(i.headers);let s=i.data;return pe.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function EM(e){return!!(e&&e.__CANCEL__)}function ru(e,t,n){It.call(this,e??"canceled",It.ERR_CANCELED,t,n),this.name="CanceledError"}pe.inherits(ru,It,{__CANCEL__:!0});function RM(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new It("Request failed with status code "+n.status,[It.ERR_BAD_REQUEST,It.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function cde(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ude(e,t){e=e||10;const n=new Array(e),i=new Array(e);let o=0,s=0,r;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=i[s];r||(r=c),n[o]=l,i[o]=c;let d=s,h=0;for(;d!==o;)h+=n[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-r<t)return;const f=u&&c-u;return f?Math.round(h*1e3/f):void 0}}function dde(e,t){let n=0,i=1e3/t,o,s;const r=(c,u=Date.now())=>{n=u,o=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=i?r(c,u):(o=c,s||(s=setTimeout(()=>{s=null,r(o)},i-d)))},()=>o&&r(o)]}const fm=(e,t,n=3)=>{let i=0;const o=ude(50,250);return dde(s=>{const r=s.loaded,a=s.lengthComputable?s.total:void 0,l=r-i,c=o(l),u=r<=a;i=r;const d={loaded:r,total:a,progress:a?r/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-r)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},DM=(e,t)=>{const n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},_M=e=>(...t)=>pe.asap(()=>e(...t)),hde=gi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,gi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(gi.origin),gi.navigator&&/(msie|trident)/i.test(gi.navigator.userAgent)):()=>!0,fde=gi.hasStandardBrowserEnv?{write(e,t,n,i,o,s,r){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];pe.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),pe.isString(i)&&a.push(`path=${i}`),pe.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),pe.isString(r)&&a.push(`SameSite=${r}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function pde(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gde(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function xM(e,t,n){let i=!pde(t);return e&&(i||n==!1)?gde(e,t):t}const FM=e=>e instanceof $i?{...e}:e;function bl(e,t){t=t||{};const n={};function i(c,u,d,h){return pe.isPlainObject(c)&&pe.isPlainObject(u)?pe.merge.call({caseless:h},c,u):pe.isPlainObject(u)?pe.merge({},u):pe.isArray(u)?u.slice():u}function o(c,u,d,h){if(pe.isUndefined(u)){if(!pe.isUndefined(c))return i(void 0,c,d,h)}else return i(c,u,d,h)}function s(c,u){if(!pe.isUndefined(u))return i(void 0,u)}function r(c,u){if(pe.isUndefined(u)){if(!pe.isUndefined(c))return i(void 0,c)}else return i(void 0,u)}function a(c,u,d){if(d in t)return i(c,u);if(d in e)return i(void 0,c)}const l={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(c,u,d)=>o(FM(c),FM(u),d,!0)};return pe.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||o,h=d(e[u],t[u],u);pe.isUndefined(h)&&d!==a||(n[u]=h)}),n}const TM=e=>{const t=bl({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:r,auth:a}=t;if(t.headers=r=$i.from(r),t.url=yM(xM(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&r.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),pe.isFormData(n)){if(gi.hasStandardBrowserEnv||gi.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if(pe.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&r.set(u,d)})}}if(gi.hasStandardBrowserEnv&&(i&&pe.isFunction(i)&&(i=i(t)),i||i!==!1&&hde(t.url))){const l=o&&s&&fde.read(s);l&&r.set(o,l)}return t},mde=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,i){const o=TM(e);let s=o.data;const r=$i.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=o,u,d,h,f,g;function m(){f&&f(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function b(){if(!y)return;const F=$i.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:F,config:e,request:y};RM(function(x){n(x),m()},function(x){i(x),m()},R),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(i(new It("Request aborted",It.ECONNABORTED,e,y)),y=null)},y.onerror=function(C){const R=C&&C.message?C.message:"Network Error",E=new It(R,It.ERR_NETWORK,e,y);E.event=C||null,i(E),y=null},y.ontimeout=function(){let C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||wM;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),i(new It(C,R.clarifyTimeoutError?It.ETIMEDOUT:It.ECONNABORTED,e,y)),y=null},s===void 0&&r.setContentType(null),"setRequestHeader"in y&&pe.forEach(r.toJSON(),function(C,R){y.setRequestHeader(R,C)}),pe.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),a&&a!=="json"&&(y.responseType=o.responseType),c&&([h,g]=fm(c,!0),y.addEventListener("progress",h)),l&&y.upload&&([d,f]=fm(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",f)),(o.cancelToken||o.signal)&&(u=F=>{y&&(i(!F||F.type?new ru(null,e,y):F),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const S=cde(o.url);if(S&&gi.protocols.indexOf(S)===-1){i(new It("Unsupported protocol "+S+":",It.ERR_BAD_REQUEST,e));return}y.send(s||null)})},vde=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let i=new AbortController,o;const s=function(c){if(!o){o=!0,a();const u=c instanceof Error?c:this.reason;i.abort(u instanceof It?u:new ru(u instanceof Error?u.message:u))}};let r=t&&setTimeout(()=>{r=null,s(new It(`timeout ${t} of ms exceeded`,It.ETIMEDOUT))},t);const a=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=i;return l.unsubscribe=()=>pe.asap(a),l}},yde=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let i=0,o;for(;i<n;)o=i+t,yield e.slice(i,o),i=o},Cde=async function*(e,t){for await(const n of wde(e))yield*yde(n,t)},wde=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:i}=await t.read();if(n)break;yield i}}finally{await t.cancel()}},PM=(e,t,n,i)=>{const o=Cde(e,t);let s=0,r,a=l=>{r||(r=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let h=s+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},IM=64*1024,{isFunction:pm}=pe,bde=(({Request:e,Response:t})=>({Request:e,Response:t}))(pe.global),{ReadableStream:AM,TextEncoder:kM}=pe.global,OM=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Sde=e=>{e=pe.merge.call({skipUndefined:!0},bde,e);const{fetch:t,Request:n,Response:i}=e,o=t?pm(t):typeof fetch=="function",s=pm(n),r=pm(i);if(!o)return!1;const a=o&&pm(AM),l=o&&(typeof kM=="function"?(g=>m=>g.encode(m))(new kM):async g=>new Uint8Array(await new n(g).arrayBuffer())),c=s&&a&&OM(()=>{let g=!1;const m=new n(gi.origin,{body:new AM,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!m}),u=r&&a&&OM(()=>pe.isReadableStream(new i("").body)),d={stream:u&&(g=>g.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!d[g]&&(d[g]=(m,y)=>{let b=m&&m[g];if(b)return b.call(m);throw new It(`Response type '${g}' is not supported`,It.ERR_NOT_SUPPORT,y)})});const h=async g=>{if(g==null)return 0;if(pe.isBlob(g))return g.size;if(pe.isSpecCompliantForm(g))return(await new n(gi.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(pe.isArrayBufferView(g)||pe.isArrayBuffer(g))return g.byteLength;if(pe.isURLSearchParams(g)&&(g=g+""),pe.isString(g))return(await l(g)).byteLength},f=async(g,m)=>{const y=pe.toFiniteNumber(g.getContentLength());return y??h(m)};return async g=>{let{url:m,method:y,data:b,signal:S,cancelToken:F,timeout:C,onDownloadProgress:R,onUploadProgress:E,responseType:x,headers:k,withCredentials:O="same-origin",fetchOptions:A}=TM(g),D=t||fetch;x=x?(x+"").toLowerCase():"text";let P=vde([S,F&&F.toAbortSignal()],C),V=null;const H=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let te;try{if(E&&c&&y!=="get"&&y!=="head"&&(te=await f(k,b))!==0){let ue=new n(m,{method:"POST",body:b,duplex:"half"}),xe;if(pe.isFormData(b)&&(xe=ue.headers.get("content-type"))&&k.setContentType(xe),ue.body){const[re,Ie]=DM(te,fm(_M(E)));b=PM(ue.body,IM,re,Ie)}}pe.isString(O)||(O=O?"include":"omit");const B=s&&"credentials"in n.prototype,G={...A,signal:P,method:y.toUpperCase(),headers:k.normalize().toJSON(),body:b,duplex:"half",credentials:B?O:void 0};V=s&&new n(m,G);let Z=await(s?D(V,A):D(m,G));const $=u&&(x==="stream"||x==="response");if(u&&(R||$&&H)){const ue={};["status","statusText","headers"].forEach(Me=>{ue[Me]=Z[Me]});const xe=pe.toFiniteNumber(Z.headers.get("content-length")),[re,Ie]=R&&DM(xe,fm(_M(R),!0))||[];Z=new i(PM(Z.body,IM,re,()=>{Ie&&Ie(),H&&H()}),ue)}x=x||"text";let ce=await d[pe.findKey(d,x)||"text"](Z,g);return!$&&H&&H(),await new Promise((ue,xe)=>{RM(ue,xe,{data:ce,headers:$i.from(Z.headers),status:Z.status,statusText:Z.statusText,config:g,request:V})})}catch(B){throw H&&H(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new It("Network Error",It.ERR_NETWORK,g,V),{cause:B.cause||B}):It.from(B,B&&B.code,g,V)}}},Ede=new Map,MM=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:o}=t,s=[i,o,n];let r=s.length,a=r,l,c,u=Ede;for(;a--;)l=s[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:Sde(t)),u=c;return c};MM();const VS={http:zue,xhr:mde,fetch:{get:MM}};pe.forEach(VS,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const LM=e=>`- ${e}`,Rde=e=>pe.isFunction(e)||e===null||e===!1;function Dde(e,t){e=pe.isArray(e)?e:[e];const{length:n}=e;let i,o;const s={};for(let r=0;r<n;r++){i=e[r];let a;if(o=i,!Rde(i)&&(o=VS[(a=String(i)).toLowerCase()],o===void 0))throw new It(`Unknown adapter '${a}'`);if(o&&(pe.isFunction(o)||(o=o.get(t))))break;s[a||"#"+r]=o}if(!o){const r=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?r.length>1?`since :
186
186
  `+r.map(LM).join(`
187
187
  `):" "+LM(r[0]):"as no adapter specified";throw new It("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const NM={getAdapter:Dde,adapters:VS};function BS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ru(null,e)}function VM(e){return BS(e),e.headers=$i.from(e.headers),e.data=NS.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),NM.getAdapter(e.adapter||Eh.adapter,e)(e).then(function(i){return BS(e),i.data=NS.call(e,e.transformResponse,i),i.headers=$i.from(i.headers),i},function(i){return EM(i)||(BS(e),i&&i.response&&(i.response.data=NS.call(e,e.transformResponse,i.response),i.response.headers=$i.from(i.response.headers))),Promise.reject(i)})}const BM="1.13.2",gm={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{gm[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const HM={};gm.transitional=function(t,n,i){function o(s,r){return"[Axios v"+BM+"] Transitional option '"+s+"'"+r+(i?". "+i:"")}return(s,r,a)=>{if(t===!1)throw new It(o(r," has been removed"+(n?" in "+n:"")),It.ERR_DEPRECATED);return n&&!HM[r]&&(HM[r]=!0,console.warn(o(r," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,r,a):!0}},gm.spelling=function(t){return(n,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function _de(e,t,n){if(typeof e!="object")throw new It("options must be an object",It.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let o=i.length;for(;o-- >0;){const s=i[o],r=t[s];if(r){const a=e[s],l=a===void 0||r(a,s,e);if(l!==!0)throw new It("option "+s+" must be "+l,It.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new It("Unknown option "+s,It.ERR_BAD_OPTION)}}const mm={assertOptions:_de,validators:gm},Ms=mm.validators;let Sl=class{constructor(t){this.defaults=t||{},this.interceptors={request:new CM,response:new CM}}async request(t,n){try{return await this._request(t,n)}catch(i){if(i instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{i.stack?s&&!String(i.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(i.stack+=`
188
- `+s):i.stack=s}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=bl(this.defaults,n);const{transitional:i,paramsSerializer:o,headers:s}=n;i!==void 0&&mm.assertOptions(i,{silentJSONParsing:Ms.transitional(Ms.boolean),forcedJSONParsing:Ms.transitional(Ms.boolean),clarifyTimeoutError:Ms.transitional(Ms.boolean)},!1),o!=null&&(pe.isFunction(o)?n.paramsSerializer={serialize:o}:mm.assertOptions(o,{encode:Ms.function,serialize:Ms.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),mm.assertOptions(n,{baseUrl:Ms.spelling("baseURL"),withXsrfToken:Ms.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r=s&&pe.merge(s.common,s[n.method]);s&&pe.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=$i.concat(r,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const g=[VM.bind(this),void 0];for(g.unshift(...a),g.push(...c),h=g.length,u=Promise.resolve(n);d<h;)u=u.then(g[d++],g[d++]);return u}h=a.length;let f=n;for(;d<h;){const g=a[d++],m=a[d++];try{f=g(f)}catch(y){m.call(this,y);break}}try{u=VM.call(this,f)}catch(g){return Promise.reject(g)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=bl(this.defaults,t);const n=xM(t.baseURL,t.url,t.allowAbsoluteUrls);return yM(n,t.params,t.paramsSerializer)}};pe.forEach(["delete","get","head","options"],function(t){Sl.prototype[t]=function(n,i){return this.request(bl(i||{},{method:t,url:n,data:(i||{}).data}))}}),pe.forEach(["post","put","patch"],function(t){function n(i){return function(s,r,a){return this.request(bl(a||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}Sl.prototype[t]=n(),Sl.prototype[t+"Form"]=n(!0)});let xde=class SL{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const i=this;this.promise.then(o=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](o);i._listeners=null}),this.promise.then=o=>{let s;const r=new Promise(a=>{i.subscribe(a),s=a}).then(o);return r.cancel=function(){i.unsubscribe(s)},r},t(function(s,r,a){i.reason||(i.reason=new ru(s,r,a),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=i=>{t.abort(i)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new SL(function(o){t=o}),cancel:t}}};function Fde(e){return function(n){return e.apply(null,n)}}function Tde(e){return pe.isObject(e)&&e.isAxiosError===!0}const HS={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(HS).forEach(([e,t])=>{HS[t]=e});function GM(e){const t=new Sl(e),n=iM(Sl.prototype.request,t);return pe.extend(n,Sl.prototype,t,{allOwnKeys:!0}),pe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return GM(bl(e,o))},n}const On=GM(Eh);On.Axios=Sl,On.CanceledError=ru,On.CancelToken=xde,On.isCancel=EM,On.VERSION=BM,On.toFormData=dm,On.AxiosError=It,On.Cancel=On.CanceledError,On.all=function(t){return Promise.all(t)},On.spread=Fde,On.isAxiosError=Tde,On.mergeConfig=bl,On.AxiosHeaders=$i,On.formToJSON=e=>bM(pe.isHTMLForm(e)?new FormData(e):e),On.getAdapter=NM.getAdapter,On.HttpStatusCode=HS,On.default=On;const{Axios:rve,AxiosError:ave,CanceledError:lve,isCancel:cve,CancelToken:uve,VERSION:dve,all:hve,Cancel:fve,isAxiosError:Pde,spread:pve,toFormData:gve,AxiosHeaders:mve,HttpStatusCode:vve,formToJSON:yve,getAdapter:Cve,mergeConfig:wve}=On,Ide=e=>{const n=`; ${document.cookie}`.split(`; ${e}=`);if(n.length===2){const i=n.pop();return(i==null?void 0:i.split(";").shift())??null}return null},Ade=6e4,kde=(()=>{const e=On.create({timeout:Ade,headers:{"Content-Type":"application/json"}});return e.interceptors.request.use(t=>{const n=Ide("account.token");return n&&t.headers&&(t.headers.Authorization=`Bearer ${n}`),t.headers&&(t.headers["Access-Control-Allow-Origin"]="*",t.headers["Access-Control-Allow-Headers"]="*",t.headers["Accept-Language"]="*"),t},t=>Promise.reject(t)),e.interceptors.response.use(t=>t,async t=>{var i;const n=t.config;return((i=t.response)==null?void 0:i.status)===401&&!n._retry&&(n._retry=!0),Promise.reject(t)}),e})();class Dh extends Error{constructor(t,n,i,o,s){super(t),this.name="ApiError",this.statusCode=n,this.code=i,this.details=o,this.type=s,Object.setPrototypeOf(this,Dh.prototype)}}const _h=e=>{var t,n;if(Pde(e)){const i=(t=e.response)==null?void 0:t.status,o=(n=e.response)==null?void 0:n.data,s=(o==null?void 0:o.message)||e.message||"An unexpected error occurred",r=(o==null?void 0:o.code)||e.code,a=(o==null?void 0:o.details)||o;let l="UNKNOWN";return!i||e.code==="ERR_NETWORK"||e.code==="ECONNABORTED"?l=e.code==="ECONNABORTED"?"TIMEOUT":"NETWORK":i>=500?l="SERVER":i===Ec.UNAUTHORIZED||i===Ec.FORBIDDEN?l="AUTH":i===Ec.UNPROCESSABLE_ENTITY||i===Ec.BAD_REQUEST?l="VALIDATION":i>=Ec.BAD_REQUEST&&(l="CLIENT"),new Dh(s,i,r,a,l)}return e instanceof Error?new Dh(e.message,void 0,void 0,void 0,"UNKNOWN"):new Dh("An unknown error occurred",void 0,void 0,void 0,"UNKNOWN")};class Ode{constructor(){this.axios=kde}buildUrl(t=""){const n=t.replace(/^\//,"");return!n.startsWith("http://")&&!n.startsWith("https://")?`/${n}`:n??""}buildQueryParams(t){const n=new URLSearchParams;Object.entries(t).forEach(([o,s])=>{s!=null&&s!==""&&(Array.isArray(s)?s.forEach(r=>n.append(o,String(r))):typeof s=="object"?n.append(o,JSON.stringify(s)):n.append(o,String(s)))});const i=n.toString();return i?`?${i}`:""}async get(t="",n,i){try{const o=this.buildUrl(t),s=n?this.buildQueryParams(n):"";return(await this.axios.get(`${o}${s}`,i)).data}catch(o){throw _h(o)}}async post(t="",n,i,o){try{const s=this.buildUrl(t),r=n?this.buildQueryParams(n):"";return(await this.axios.post(`${s}${r}`,i,o)).data}catch(s){throw _h(s)}}async put(t="",n,i){try{const o=this.buildUrl(t);return(await this.axios.put(o,n,i)).data}catch(o){throw _h(o)}}async patch(t="",n,i){try{const o=this.buildUrl(t);return(await this.axios.patch(o,n,i)).data}catch(o){throw _h(o)}}async delete(t="",n,i){try{const o=this.buildUrl(t);return(await this.axios.delete(o,{data:n,...i})).data}catch(o){throw _h(o)}}}const Mde=({domainApi:e,wsCode:t,entityId:n})=>({list_cursor:{url:`${e}/v1/workspace/${t}/item/2`,method:"post",code:"list_cursor"},assignedUser:{url:`${e}/v1/workspace/${t}/item/2/assigned-users`,method:"post",code:"assignedUser"},metricValues:{url:`${e}/v1/workspace/${t}/item/2/metrics`,method:"post",code:"metricValues"},multipleAssignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"multipleAssignableUser"},assignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"assignableUser"},assignableStatus:{url:`${e}/v1/workspace/${t}/item/2/assignable-statuses`,method:"post",code:"assignableStatus"},delete_rendition:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-rendition`,method:"delete",code:"delete_rendition"},delete_thumbnail:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-thumbnail`,method:"delete",code:"delete_thumbnail"},archive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"archive_item"},unarchive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"unarchive_item"},removeAssignee:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-assignee`,method:"delete",code:"removeAssignee"},basicInfor:{url:`${e}/v1/workspace/${t}/tile/people/ws-user-roles/{userId}/basic-info`,method:"get",code:"basicInfor"},bulkDelete:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete`,method:"delete",code:"bulkDelete"},bulkArchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkArchive"},bulkDateUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-date-update`,method:"put",code:"bulkDateUpdate"},bulkAssignUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-assignee-update`,method:"put",code:"bulkAssignUpdate"},bulkStatusUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-status-update`,method:"put",code:"bulkStatusUpdate"},getPermission:{url:`${e}/v1/workspace/${t}/item/2/permissions`,method:"post",code:"getPermission"},getUserPermission:{url:`${e}/v1/workspace/${t}/permissions`,method:"get",code:"getUserPermission"},bulkUnarchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkUnarchive"},downloadTemplate:{url:`${e}/workspace/${t}/entities/${n}/items/export-format?format=xlsx`,method:"get",code:"downloadTemplate"},importItems:{url:`${e}/workspace/${t}/entities/${n}/items/import`,method:"post",code:"importItems"},exportItems:{url:`${e}/workspace/${t}/entities/${n}/items/export?format=xlsx`,method:"get",code:"exportItems"},updateFromFile:{url:`${e}/workspace/${t}/entities/${n}/items/update-from-file`,method:"post",code:"updateFromFile"},getStatuses:{url:`${e}/workspace/${t}/entities/${n}/template_flow_statuses`,method:"get",code:"getStatuses"},metricList:{url:`${e}/workspace/${t}/entities/${n}/metric`,method:"get",code:"metricList"},getEntityDetail:{url:`${e}/workspace/${t}/entities/${n}?include_permission=1`,method:"get",code:"getEntityDetail"},item:{url:`${e}/workspace/${t}/items/{itemId}`,method:"put",code:"item"},createNewScene:{url:`${e}/workspace/${t}/items`,method:"post",code:"createNewScene"},me:{url:`${e}/v1/me`,method:"get",code:"me"},workspaces:{url:`${e}/v1/workspaces`,method:"get",code:"workspaces"}}),Lde=(e,t)=>{const n=new Blob([e]),i=globalThis.URL.createObjectURL(n),o=document.createElement("a");o.href=i,o.download=t,document.body.appendChild(o),o.click(),o.remove(),globalThis.URL.revokeObjectURL(i)};class $M extends Ode{constructor(t,{domainApi:n,wsCode:i,entityId:o}){super(),this.events=Object.create(null);const s=Mde({domainApi:n,wsCode:i,entityId:o}),r={};Object.entries(s).forEach(([a,l])=>{const c=a;t[c]?r[c]=t[c]:(console.warn(`API config for ${c} is missing, using base config.`),r[c]=l)}),this.apiConfig=r}on(t,n){var i;((i=this.events)[t]??(i[t]=[])).push(n)}off(t,n){const i=this.events[t];i&&(this.events[t]=i.filter(o=>o!==n))}emit(t,...n){const i=this.events[t];i!=null&&i.length&&i.forEach(o=>{try{o(...n)}catch(s){console.error(`Error in event listener for ${t}:`,s)}})}buildHeaders(t){return typeof FormData<"u"&&t instanceof FormData?{"Content-Type":"multipart/form-data"}:{}}async _requestHandler({method:t,path:n,params:i,payload:o,code:s,responseType:r}){var c,u;const a=this.buildHeaders(o);let l;try{if(l=await this.axios.request({method:t,url:n,params:i,data:o,headers:a,responseType:r}),(((c=l.headers)==null?void 0:c["content-type"])||"").includes("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")){const h=((u=l.headers)==null?void 0:u["content-disposition"])||"",f=h.includes("filename=")?h.split("filename=")[1]:"exported_items.xlsx";Lde(l.data,f)}if(l.status>=400&&l.status<=500)throw new Error(`Client error (${l.status}): ${l.statusText}`);return this.emit("call-api",{apiCode:s,path:n,params:i,payload:o,res:l,success:!0}),l.data}catch(d){throw console.error("API Request Error:",d),this.emit("call-api",{path:n,params:i,payload:o,error:d,success:!1,apiCode:s,res:d==null?void 0:d.response}),d}}generateUrl(t,n){let i=t;return Object.entries(n).forEach(([o,s])=>{i=i.replace(`{${o}}`,String(s))}),i}async request(t,n,i={}){const{url:o,code:s,method:r}=this.apiConfig[t],a=this.generateUrl(o,n);return this._requestHandler({method:r,path:a,params:i.params,payload:i.payload,code:s,responseType:i.responseType})}async getAllItem_cursor(t){var s,r;const n=t.workspaceId,i={entity_ids:((s=t.entityIds)==null?void 0:s.join(","))||"",cursor:t.cursor||void 0,per_page:t.pageSize||t.perPage||20,offset:t.offset||void 0,name_or_code_like:t.search||t.q,include_signature:1,include:"last_updated_by,property",include_permission:"{include_permission}",assignee_ina:((r=t.assignees)==null?void 0:r.join(","))||void 0},o=t.sortBy;return this.request("list_cursor",{workspaceId:n},{params:i,payload:{sort_by:o}})}async getAssignedUser(t){const n={item_ids:t.item_ids||[],metric_ids:t.metric_ids||[]},i={per_page:t.per_page};return this.request("assignedUser",{workspaceId:t.workspaceId},{params:i,payload:n})}async getMetricList({workspaceId:t,entityId:n}){return this.request("metricList",{workspaceId:t,entityId:n},{params:{status_ed:1,include:"metric_type",include_permission:1,per_page:20}})}async getMetricValues({workspaceId:t,item_ids:n,per_page:i,metric_ids:o}){const s={item_ids:n,metric_ids:o};return this.request("metricValues",{workspaceId:t},{params:{per_page:i,include_permission:0},payload:s})}async multipleAssignableUser(t){const n=t.workspaceId,i=t.itemIds,o={page:t.page||1,per_page:t.perPage,display_name_like:t.q||"",item_ids:i||[]};return this.request("multipleAssignableUser",{workspaceId:n},{payload:o})}async getAssignableStatus(t){const n=t.workspaceId,i={item_ids:t.itemIds||[],page:t.page||1,per_page:t.perPage||10,name_like:t.name_like||""};return this.request("assignableStatus",{workspaceId:n||""},{payload:i})}async updateSceneName({workspaceId:t,entityId:n,itemId:i,name:o}){const s={id:i,entity_id:n,name:o,include:"item_user_roles"};return this.request("item",{workspaceId:t,itemId:i},{payload:s})}async deleteScene(t,n,i){const o={item_ids:[i]};return this.request("bulkDelete",{workspaceId:t,entityId:n},{payload:o})}async deleteThumbnail(t,n){const i={item_ids:n};return this.request("delete_thumbnail",{workspaceId:t},{payload:i})}async deleteRendition(t,n,i=!1){const o={item_ids:n,delete_all:i?1:void 0};return this.request("delete_rendition",{workspaceId:t},{payload:o})}async archiveScene(t,n,i){const o={item_ids:i,status:0};return this.request("archive_item",{workspaceId:t,entityId:n},{payload:o})}async changeDate({workspaceId:t,itemIds:n,startDate:i,dueDate:o}){const s={item_ids:n,start_date:i,due_date:o};return this.request("bulkDateUpdate",{workspaceId:t},{payload:s})}async updateAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("bulkAssignUpdate",{workspaceId:t},{payload:o})}async removeAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("removeAssignee",{workspaceId:t},{payload:o})}async replaceAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("bulkAssignUpdate",{workspaceId:t},{params:{replace:1},payload:o})}async addAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("bulkAssignUpdate",{workspaceId:t},{payload:o})}async unAssignAll(t,n,i){const o={item_ids:i,ws_user_role_ids:[]};return this.request("removeAssignee",{workspaceId:t,entityId:n},{payload:o})}async createNewScene({workspaceId:t,entityId:n,name:i}){const o={entity_id:n,name:i};return this.request("createNewScene",{workspaceId:t},{payload:o})}async updateItemStatus({workspaceId:t,itemIds:n,statusId:i}){const o={item_ids:n,template_flow_status_id:i};return this.request("bulkStatusUpdate",{workspaceId:t},{payload:o})}async getUserInformation(t,n){return this.request("basicInfor",{workspaceId:t,userId:n})}async bulkDeleteItems(t,n){const i={item_ids:n};return this.request("bulkDelete",{workspaceId:t},{payload:i})}async bulkUnarchiveItems(t,n){const i={item_ids:n,status:1};return this.request("bulkUnarchive",{workspaceId:t},{payload:i})}async bulkArchiveItems(t,n){const i={item_ids:n,status:0};return this.request("bulkArchive",{workspaceId:t},{payload:i})}async getPermissionForItems({workspaceId:t,itemIds:n}){const i={item_ids:n};return this.request("getPermission",{workspaceId:t},{payload:i,params:{per_page:500}})}async unarchiveScene(t,n,i){const o={item_ids:i,status:1};return this.request("unarchive_item",{workspaceId:t,entityId:n},{payload:o})}async getUserPermission(t){return this.request("getUserPermission",{workspaceId:t})}async getEntityDetail(t,n){return this.request("getEntityDetail",{workspaceId:t,entityId:n})}async downloadTemplate(t,n){return this.request("downloadTemplate",{workspaceId:t,entityId:n},{responseType:"blob"})}async downloadExportedItemsFile(t,n){return this.request("exportItems",{workspaceId:t,exportId:n},{responseType:"blob"})}async getStatuses(t,n,i){return this.request("getStatuses",{workspaceId:t,entityId:n},{params:i})}async addNewSceneViaImportFile(t,n,i){return this.request("importItems",{workspaceId:t,entityId:n},{payload:i})}async overwriteScenesViaImportFile(t,n,i){return this.request("updateFromFile",{workspaceId:t,entityId:n},{payload:i})}async getMe(){return this.request("me",{})}async getWorkspaces(t){const n={page:1,per_page:1,"ws_user_role>status_eq":1,include:"owner",include_ws:t};return this.request("workspaces",{},{params:n})}}const Nde=e=>{const{showMessage:t}=Rd(),n=Di(),i={domainApi:"https://api.dev.arbocollab.com/api",wsCode:sessionStorage.getItem("ws.code")||"w:yngazem",entityId:e.value.entityId},o=n==null?void 0:n.appContext.config.globalProperties.apiConfig,s=new $M(o,i);s.on("call-api",A=>{var D,P;A.success?t(A.apiCode,"success"):t(((P=(D=A.res)==null?void 0:D.data)==null?void 0:P.message)||A.apiCode,"error")});const r=Mo({}),a=Y([]),l=Y(!1),c=Y(null),u=Y(null),d=Y(1),h=Y(20),{setCachedUsers:f}=i5(),g=A=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",status_eq:1,include_permission:"{include_permission}",include_permission_names:!0,q:A}),m=500,y=async(A,D,P)=>{if(!A.length)return[];const V=rU(A,D);return(await Promise.all(V.map(P))).flat()},b=async A=>{try{return(await s.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:A})).data.map(P=>[P.id,P.permission])}catch(D){return console.error("Failed to fetch item permissions chunk:",D),[]}},S=async(A,D)=>{try{const P=await s.getMetricValues({workspaceId:e.value.workspaceId,item_ids:A,per_page:A.length*D.length,metric_ids:D}),V=P.data.map(te=>{const B=new Map(te.item_metrics.map(Z=>[Z.metric_id,Z.value])),G=Object.fromEntries(D.map(Z=>[Z,B.get(Z)??null]));return[te.id,G]}),H=new Set(P.data.map(te=>te.id));for(const te of A)if(!H.has(te)){const B=Object.fromEntries(D.map(G=>[G,null]));V.push([te,B])}return V}catch(P){return console.error("Failed to fetch a chunk of metric values:",P),[]}},F=async A=>{try{const D=await s.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:A,per_page:A.length}),P=D.data.flatMap(V=>V.assignees);return f(P),D.data.map(V=>[V.id,V.assignees])}catch(D){return console.error("Failed to fetch a chunk of assigned users:",D),[]}},C=async A=>{if(!A.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const D=await y(A,m,b);return Object.fromEntries(D)}catch(D){return console.error("Failed to fetch item permissions:",D),{}}},R=async(A,D)=>{if(!A.length||!D.length)return{};try{const P=await Promise.all(D.map(async H=>await y(A,m,te=>S(te,[H])))),V={};for(const H of P.flat()){const[te,B]=H;V[te]||(V[te]={}),Object.assign(V[te],B)}return V}catch(P){return console.error("Failed to fetch metric values:",P),{}}},E=async A=>{if(!A.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const D=await y(A,m,F);return Object.fromEntries(D)}catch(D){return console.error("Failed to fetch assigned users:",D),{}}};return{items:a,loading:l,error:c,pagination:u,currentPage:d,pageSize:h,cusorMap:r,fetchItems:async A=>{const{cursor:D,offset:P,size:V,searchQuery:H}=A;let te=[];l.value=!0,c.value=null;try{const B=await s.getAllItem_cursor({cursor:D||void 0,offset:P||void 0,pageSize:V||h.value,...g(H),sortBy:A.sort_by,assignees:A.assignees});return a.value=B.data,u.value=B.meta,d.value=B.meta.current_page||0,te=B.data.map(G=>G.id),B}catch(B){throw c.value=B,console.error("Failed to fetch items (cursor):",B),B}finally{const B=async()=>{try{const[G,Z,$]=await Promise.all([E(te),R(te,e.value.metricIds),C(te)]);e.value.updateItemData({assignees:G,metricValues:Z,permission:$},te)}catch(G){console.error("Post-fetch processing failed:",G)}};l.value=!1,setTimeout(B)}},getAssignableStatus:async A=>{try{return await s.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:A})}catch(D){throw console.error("Failed to fetch assignable status:",D),D}},getMetricList:async A=>{try{return await s.getMetricList({workspaceId:e.value.workspaceId,entityId:A})}catch(D){throw console.error("Failed to fetch metric list:",D),D}},getMetricValues:R,getAssignedUsers:E}};function Vde(e){return{updateRowData:(i,o)=>{const s=Array.from(o).map(u=>{var d,h,f;return{id:u,assignees:((d=i.assignees)==null?void 0:d[u])||[],permissions:((h=i.permission)==null?void 0:h[u])||null,metricValues:((f=i.metricValues)==null?void 0:f[u])||null}});if(!e.value)return;const r=[],a=new Map,c=e.value.getColumnDefs().map(u=>{if(u.field&&u.field.startsWith("metric_")&&(u.hide===!1||u.hide===void 0))return u.field}).filter(Boolean);s.forEach(u=>{var h;const d=(h=e.value)==null?void 0:h.getRowNode(u.id);if(d){r.push(d);const f=u.assignees?U6(u.assignees.map(AF)):null;if(d.data.assignees=f,d.data.permissions=u.permissions||null,c.forEach(g=>{d.data[g]=d.data[g]??null}),u.metricValues){const g=u.metricValues;Object.keys(g).forEach(m=>{d.data[`metric_${m}`]=g[m]||null,a.set(`metric_${m}`,!0)})}}}),e.value.refreshCells({rowNodes:r,columns:["assignees",...Array.from(a.keys()),"name","dateRange","status"],force:!0})},setMetricValues:(i,o,s)=>{const r=e.value;if(!r)return;const a=new Map(Array.from(o).map(c=>[c,new Map(s.map(u=>[u,null]))]));Object.entries(i).forEach(([c,u])=>{Object.entries(u).forEach(([d,h])=>{var f;(f=a.get(c))==null||f.set(d,h)})});const l=Array.from(a.entries()).map(([c,u])=>{const d=r.getRowNode(c);return d&&d.data?(u.forEach((h,f)=>{const g=`metric_${f}`;d.data[g]=h}),d):null});l.length>0&&r.refreshCells({rowNodes:l,columns:Array.from(s).map(c=>`metric_${c}`),force:!0})}}}function Bde(e,t,n){return{async getRows(i){try{const o=Math.floor(i.startRow/t)+1,{rows:s,total:r}=await e({page:o,pageSize:t,filterText:n(),sort_by:i.sortModel});let a=-1;Number.isFinite(r)?a=r:s.length<t&&(a=i.startRow+s.length),i.context={pageSize:t,text:n()},i.successCallback(s,a)}catch(o){console.error("Datasource fetch error:",o),i.failCallback()}}}}function Hde(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:i,gridApi:o,columnDefs:s,fetcher:r}=e,a=Y(!0),l=()=>{n.value=!n.value,o.value&&setTimeout(()=>{var g;(g=o.value)==null||g.sizeColumnsToFit()},300)},c=g=>{if(a.value=!1,o.value=g,!g)return null;const{sizeColumnsToFit:m,addEventListener:y,setGridOption:b}=g;if(m==null||m(),!r)return console.error("Fetcher function is undefined"),null;const S=Bde(r,e.perPage,()=>i.value);return b==null||b("datasource",S),y==null||y("selectionChanged",()=>{t.value=g.getSelectedRows()}),y==null||y("columnMoved",()=>{var E;const F=(E=g.getColumnState())==null?void 0:E.map(x=>x.colId),C=s.value.reduce((x,k)=>(k.field&&x&&(x[k.field]=k),x),{}),R=F.map(x=>C[x]).filter(Boolean);s.value=R}),g||null},u=g=>{var m,y;if((m=o.value)==null||m.hideOverlay(),g!==void 0&&(i.value=g),(y=o.value)==null||y.deselectAll(),t.value=[],a.value=!0,!o.value||!r){console.error("Grid API or fetcher is not available"),a.value=!1;return}o.value.purgeInfiniteCache(),o.value.ensureIndexVisible(0,"top"),setTimeout(()=>{a.value=!1},300)},d=()=>{var g;(g=o.value)==null||g.deselectAll(),t.value=[]},h=g=>{s.value=g},f=Wo(g=>{u(g)},wp);return{isLoading:a,toggleSidebar:l,onGridReady:c,onSearch:f,handleUnSelect:d,updateTableConfig:h}}const Gde={key:1},$de=Ct(ct({__name:"PopupOverwriteScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const i=Y(null),o=e,s=()=>{i.value&&i.value.show()},r=Y(""),a=Y("idle"),l=Y({file:null,format:null}),{apiServices:c}=vo(!1,{}),u=Y(!1),d=async()=>{u.value=!0;const x=o.workspaceId,k=o.entityId;if(!x||!k||!c.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await c.value.downloadExportedItemsFile(x,k))throw new Error("No response from downloadTemplate API")}catch(O){console.error("Error downloading template:",O)}u.value=!1},h=n,f=()=>{h("import-success"),S()},g=async x=>{var A,D,P;const k=new FormData,O=((A=x.name.split(".").pop())==null?void 0:A.toString())||"";if(k.append("file",x),k.append("format",O),!c.value){console.error("API services not available");return}try{const V=await c.value.overwriteScenesViaImportFile(o.workspaceId,o.entityId,k);m()}catch(V){throw console.error("Error uploading file:",V),y(((P=(D=V.response)==null?void 0:D.data)==null?void 0:P.message)||"An unknown error occurred during file upload."),V}},m=()=>{a.value="success"},y=x=>{r.value=x,a.value="error"},b=async()=>{!l.value||!l.value.file||await g(l.value.file)},S=()=>{var x;E(),(x=i.value)==null||x.hide()};t({close:S,open:s});const F=q(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Update existing work"})[a.value]),C=q(()=>l.value.file?!1:(console.error("No file selected"),!0)),R=Y(null),E=()=>{var x;(x=R.value)==null||x.clear(),r.value="",l.value={file:null,format:null},a.value="idle"};return(x,k)=>(K(),Xe(W(t1),{"popup-name":F.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:i,onHidden:E},_u({default:Ee(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(K(),Xe(T1,{key:0,state:a.value,"error-message":r.value,overwrite:!0},null,8,["state","error-message"])):(K(),Ce("div",Gde,[we("div",{class:z(x.$style["step-section"])},[we("span",{class:z(x.$style["step-title"])},"Step 1: Download current data",2),we("span",{class:z(x.$style["step-description"])},[...k[1]||(k[1]=[dt(" Download a file with all existing work and details. Edit it, then upload in Step 2. ",-1),we("br",null,null,-1),we("i",null,"Note: Empty cells and unchanged values will be skipped.",-1)])],2),ve(W(pt),{class:z(x.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:u.value,onHandleClick:d},{prefix:Ee(()=>[ve(W(mt),{src:"Download"})]),default:Ee(()=>[k[2]||(k[2]=dt(" Download file ",-1))]),_:1},8,["class","disabled"])],2),we("div",{class:z(x.$style["step-section"])},[we("span",{class:z(x.$style["step-title"])},"Step 2: Upload updated file (.xlsx, .xls, .csv)",2),ve(W(x1),{modelValue:l.value,"onUpdate:modelValue":k[0]||(k[0]=O=>l.value=O),ref_key:"filUploaderRef",ref:R},null,8,["modelValue"])],2),we("div",{class:z(x.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ve(P1)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:Ee(()=>[ve(W(pt),{style:{flex:"1"},variant:"secondary",onClick:S},{default:Ee(()=>[...k[3]||(k[3]=[dt(" Cancel ",-1)])]),_:1}),ve(W(pt),{disabled:C.value,style:{flex:"1"},variant:"primary",onClick:b},{default:Ee(()=>[...k[4]||(k[4]=[dt(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:Ee(()=>[ve(W(pt),{style:{flex:"1"},variant:"primary",onClick:f},{default:Ee(()=>[...k[5]||(k[5]=[dt(" Close ",-1)])]),_:1})]),key:"1"}:{name:"footer",fn:Ee(()=>[ve(W(pt),{style:{flex:"1"},variant:"primary",onClick:E},{default:Ee(()=>[...k[6]||(k[6]=[dt(" Try Again ",-1)])]),_:1})]),key:"2"}]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_13ctn_1","step-title":"_step-title_13ctn_11","step-title-2":"_step-title-2_13ctn_17","step-description":"_step-description_13ctn_23","date-format-guide":"_date-format-guide_13ctn_28","import-error":"_import-error_13ctn_39","drop-area":"_drop-area_13ctn_49","is-dragging":"_is-dragging_13ctn_49","drop-area-content":"_drop-area-content_13ctn_52",browse:"_browse_13ctn_61","download-sample-btn":"_download-sample-btn_13ctn_65"}}]]),Wde=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
188
+ `+s):i.stack=s}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=bl(this.defaults,n);const{transitional:i,paramsSerializer:o,headers:s}=n;i!==void 0&&mm.assertOptions(i,{silentJSONParsing:Ms.transitional(Ms.boolean),forcedJSONParsing:Ms.transitional(Ms.boolean),clarifyTimeoutError:Ms.transitional(Ms.boolean)},!1),o!=null&&(pe.isFunction(o)?n.paramsSerializer={serialize:o}:mm.assertOptions(o,{encode:Ms.function,serialize:Ms.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),mm.assertOptions(n,{baseUrl:Ms.spelling("baseURL"),withXsrfToken:Ms.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r=s&&pe.merge(s.common,s[n.method]);s&&pe.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=$i.concat(r,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const g=[VM.bind(this),void 0];for(g.unshift(...a),g.push(...c),h=g.length,u=Promise.resolve(n);d<h;)u=u.then(g[d++],g[d++]);return u}h=a.length;let f=n;for(;d<h;){const g=a[d++],m=a[d++];try{f=g(f)}catch(y){m.call(this,y);break}}try{u=VM.call(this,f)}catch(g){return Promise.reject(g)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=bl(this.defaults,t);const n=xM(t.baseURL,t.url,t.allowAbsoluteUrls);return yM(n,t.params,t.paramsSerializer)}};pe.forEach(["delete","get","head","options"],function(t){Sl.prototype[t]=function(n,i){return this.request(bl(i||{},{method:t,url:n,data:(i||{}).data}))}}),pe.forEach(["post","put","patch"],function(t){function n(i){return function(s,r,a){return this.request(bl(a||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}Sl.prototype[t]=n(),Sl.prototype[t+"Form"]=n(!0)});let xde=class SL{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const i=this;this.promise.then(o=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](o);i._listeners=null}),this.promise.then=o=>{let s;const r=new Promise(a=>{i.subscribe(a),s=a}).then(o);return r.cancel=function(){i.unsubscribe(s)},r},t(function(s,r,a){i.reason||(i.reason=new ru(s,r,a),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=i=>{t.abort(i)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new SL(function(o){t=o}),cancel:t}}};function Fde(e){return function(n){return e.apply(null,n)}}function Tde(e){return pe.isObject(e)&&e.isAxiosError===!0}const HS={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(HS).forEach(([e,t])=>{HS[t]=e});function GM(e){const t=new Sl(e),n=iM(Sl.prototype.request,t);return pe.extend(n,Sl.prototype,t,{allOwnKeys:!0}),pe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return GM(bl(e,o))},n}const On=GM(Eh);On.Axios=Sl,On.CanceledError=ru,On.CancelToken=xde,On.isCancel=EM,On.VERSION=BM,On.toFormData=dm,On.AxiosError=It,On.Cancel=On.CanceledError,On.all=function(t){return Promise.all(t)},On.spread=Fde,On.isAxiosError=Tde,On.mergeConfig=bl,On.AxiosHeaders=$i,On.formToJSON=e=>bM(pe.isHTMLForm(e)?new FormData(e):e),On.getAdapter=NM.getAdapter,On.HttpStatusCode=HS,On.default=On;const{Axios:rve,AxiosError:ave,CanceledError:lve,isCancel:cve,CancelToken:uve,VERSION:dve,all:hve,Cancel:fve,isAxiosError:Pde,spread:pve,toFormData:gve,AxiosHeaders:mve,HttpStatusCode:vve,formToJSON:yve,getAdapter:Cve,mergeConfig:wve}=On,Ide=e=>{const n=`; ${document.cookie}`.split(`; ${e}=`);if(n.length===2){const i=n.pop();return(i==null?void 0:i.split(";").shift())??null}return null},Ade=6e4,kde=(()=>{const e=On.create({timeout:Ade,headers:{"Content-Type":"application/json"}});return e.interceptors.request.use(t=>{const n=Ide("account.token");return n&&t.headers&&(t.headers.Authorization=`Bearer ${n}`),t.headers&&(t.headers["Access-Control-Allow-Origin"]="*",t.headers["Access-Control-Allow-Headers"]="*",t.headers["Accept-Language"]="*"),t},t=>Promise.reject(t)),e.interceptors.response.use(t=>t,async t=>{var i;const n=t.config;return((i=t.response)==null?void 0:i.status)===401&&!n._retry&&(n._retry=!0),Promise.reject(t)}),e})();class Dh extends Error{constructor(t,n,i,o,s){super(t),this.name="ApiError",this.statusCode=n,this.code=i,this.details=o,this.type=s,Object.setPrototypeOf(this,Dh.prototype)}}const _h=e=>{var t,n;if(Pde(e)){const i=(t=e.response)==null?void 0:t.status,o=(n=e.response)==null?void 0:n.data,s=(o==null?void 0:o.message)||e.message||"An unexpected error occurred",r=(o==null?void 0:o.code)||e.code,a=(o==null?void 0:o.details)||o;let l="UNKNOWN";return!i||e.code==="ERR_NETWORK"||e.code==="ECONNABORTED"?l=e.code==="ECONNABORTED"?"TIMEOUT":"NETWORK":i>=500?l="SERVER":i===Ec.UNAUTHORIZED||i===Ec.FORBIDDEN?l="AUTH":i===Ec.UNPROCESSABLE_ENTITY||i===Ec.BAD_REQUEST?l="VALIDATION":i>=Ec.BAD_REQUEST&&(l="CLIENT"),new Dh(s,i,r,a,l)}return e instanceof Error?new Dh(e.message,void 0,void 0,void 0,"UNKNOWN"):new Dh("An unknown error occurred",void 0,void 0,void 0,"UNKNOWN")};class Ode{constructor(){this.axios=kde}buildUrl(t=""){const n=t.replace(/^\//,"");return!n.startsWith("http://")&&!n.startsWith("https://")?`/${n}`:n??""}buildQueryParams(t){const n=new URLSearchParams;Object.entries(t).forEach(([o,s])=>{s!=null&&s!==""&&(Array.isArray(s)?s.forEach(r=>n.append(o,String(r))):typeof s=="object"?n.append(o,JSON.stringify(s)):n.append(o,String(s)))});const i=n.toString();return i?`?${i}`:""}async get(t="",n,i){try{const o=this.buildUrl(t),s=n?this.buildQueryParams(n):"";return(await this.axios.get(`${o}${s}`,i)).data}catch(o){throw _h(o)}}async post(t="",n,i,o){try{const s=this.buildUrl(t),r=n?this.buildQueryParams(n):"";return(await this.axios.post(`${s}${r}`,i,o)).data}catch(s){throw _h(s)}}async put(t="",n,i){try{const o=this.buildUrl(t);return(await this.axios.put(o,n,i)).data}catch(o){throw _h(o)}}async patch(t="",n,i){try{const o=this.buildUrl(t);return(await this.axios.patch(o,n,i)).data}catch(o){throw _h(o)}}async delete(t="",n,i){try{const o=this.buildUrl(t);return(await this.axios.delete(o,{data:n,...i})).data}catch(o){throw _h(o)}}}const Mde=({domainApi:e,wsCode:t,entityId:n})=>({list_cursor:{url:`${e}/v1/workspace/${t}/item/2`,method:"post",code:"list_cursor"},assignedUser:{url:`${e}/v1/workspace/${t}/item/2/assigned-users`,method:"post",code:"assignedUser"},metricValues:{url:`${e}/v1/workspace/${t}/item/2/metrics`,method:"post",code:"metricValues"},multipleAssignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"multipleAssignableUser"},assignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"assignableUser"},assignableStatus:{url:`${e}/v1/workspace/${t}/item/2/assignable-statuses`,method:"post",code:"assignableStatus"},delete_rendition:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-rendition`,method:"delete",code:"delete_rendition"},delete_thumbnail:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-thumbnail`,method:"delete",code:"delete_thumbnail"},archive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"archive_item"},unarchive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"unarchive_item"},removeAssignee:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-assignee`,method:"delete",code:"removeAssignee"},basicInfor:{url:`${e}/v1/workspace/${t}/tile/people/ws-user-roles/{userId}/basic-info`,method:"get",code:"basicInfor"},bulkDelete:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete`,method:"delete",code:"bulkDelete"},bulkArchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkArchive"},bulkDateUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-date-update`,method:"put",code:"bulkDateUpdate"},bulkAssignUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-assignee-update`,method:"put",code:"bulkAssignUpdate"},bulkStatusUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-status-update`,method:"put",code:"bulkStatusUpdate"},getPermission:{url:`${e}/v1/workspace/${t}/item/2/permissions`,method:"post",code:"getPermission"},getUserPermission:{url:`${e}/v1/workspace/${t}/permissions`,method:"get",code:"getUserPermission"},bulkUnarchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkUnarchive"},downloadTemplate:{url:`${e}/workspace/${t}/entities/${n}/items/export-format?format=xlsx`,method:"get",code:"downloadTemplate"},importItems:{url:`${e}/workspace/${t}/entities/${n}/items/import`,method:"post",code:"importItems"},exportItems:{url:`${e}/workspace/${t}/entities/${n}/items/export?format=xlsx`,method:"get",code:"exportItems"},updateFromFile:{url:`${e}/workspace/${t}/entities/${n}/items/update-from-file`,method:"post",code:"updateFromFile"},getStatuses:{url:`${e}/workspace/${t}/entities/${n}/template_flow_statuses`,method:"get",code:"getStatuses"},metricList:{url:`${e}/workspace/${t}/entities/${n}/metric`,method:"get",code:"metricList"},getEntityDetail:{url:`${e}/workspace/${t}/entities/${n}?include_permission=1`,method:"get",code:"getEntityDetail"},item:{url:`${e}/workspace/${t}/items/{itemId}`,method:"put",code:"item"},createNewScene:{url:`${e}/workspace/${t}/items`,method:"post",code:"createNewScene"},me:{url:`${e}/v1/me`,method:"get",code:"me"},workspaces:{url:`${e}/v1/workspaces`,method:"get",code:"workspaces"}}),Lde=(e,t)=>{const n=new Blob([e]),i=globalThis.URL.createObjectURL(n),o=document.createElement("a");o.href=i,o.download=t,document.body.appendChild(o),o.click(),o.remove(),globalThis.URL.revokeObjectURL(i)};class $M extends Ode{constructor(t,{domainApi:n,wsCode:i,entityId:o}){super(),this.events=Object.create(null);const s=Mde({domainApi:n,wsCode:i,entityId:o}),r={};Object.entries(s).forEach(([a,l])=>{const c=a;t[c]?r[c]=t[c]:(console.warn(`API config for ${c} is missing, using base config.`),r[c]=l)}),this.apiConfig=r}on(t,n){var i;((i=this.events)[t]??(i[t]=[])).push(n)}off(t,n){const i=this.events[t];i&&(this.events[t]=i.filter(o=>o!==n))}emit(t,...n){const i=this.events[t];i!=null&&i.length&&i.forEach(o=>{try{o(...n)}catch(s){console.error(`Error in event listener for ${t}:`,s)}})}buildHeaders(t){return typeof FormData<"u"&&t instanceof FormData?{"Content-Type":"multipart/form-data"}:{}}async _requestHandler({method:t,path:n,params:i,payload:o,code:s,responseType:r}){var c,u;const a=this.buildHeaders(o);let l;try{if(l=await this.axios.request({method:t,url:n,params:i,data:o,headers:a,responseType:r}),(((c=l.headers)==null?void 0:c["content-type"])||"").includes("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")){const h=((u=l.headers)==null?void 0:u["content-disposition"])||"",f=h.includes("filename=")?h.split("filename=")[1]:"exported_items.xlsx";Lde(l.data,f)}if(l.status>=400&&l.status<=500)throw new Error(`Client error (${l.status}): ${l.statusText}`);return this.emit("call-api",{apiCode:s,path:n,params:i,payload:o,res:l,success:!0}),l.data}catch(d){throw console.error("API Request Error:",d),this.emit("call-api",{path:n,params:i,payload:o,error:d,success:!1,apiCode:s,res:d==null?void 0:d.response}),d}}generateUrl(t,n){let i=t;return Object.entries(n).forEach(([o,s])=>{i=i.replace(`{${o}}`,String(s))}),i}async request(t,n,i={}){const{url:o,code:s,method:r}=this.apiConfig[t],a=this.generateUrl(o,n);return this._requestHandler({method:r,path:a,params:i.params,payload:i.payload,code:s,responseType:i.responseType})}async getAllItem_cursor(t){var s,r;const n=t.workspaceId,i={entity_ids:((s=t.entityIds)==null?void 0:s.join(","))||"",cursor:t.cursor||void 0,per_page:t.pageSize||t.perPage||20,offset:t.offset||void 0,name_or_code_like:t.search||t.q,include_signature:1,include:"last_updated_by,property",include_permission:"{include_permission}",assignee_ina:((r=t.assignees)==null?void 0:r.join(","))||void 0},o=t.sortBy;return this.request("list_cursor",{workspaceId:n},{params:i,payload:{sort_by:o}})}async getAssignedUser(t){const n={item_ids:t.item_ids||[],metric_ids:t.metric_ids||[]},i={per_page:t.per_page};return this.request("assignedUser",{workspaceId:t.workspaceId},{params:i,payload:n})}async getMetricList({workspaceId:t,entityId:n}){return this.request("metricList",{workspaceId:t,entityId:n},{params:{status_ed:1,include:"metric_type",include_permission:1,per_page:20}})}async getMetricValues({workspaceId:t,item_ids:n,per_page:i,metric_ids:o}){const s={item_ids:n,metric_ids:o};return this.request("metricValues",{workspaceId:t},{params:{per_page:i,include_permission:0},payload:s})}async multipleAssignableUser(t){const n=t.workspaceId,i=t.itemIds,o={page:t.page||1,per_page:t.perPage,display_name_like:t.q||"",item_ids:i||[]};return this.request("multipleAssignableUser",{workspaceId:n},{payload:o})}async getAssignableStatus(t){const n=t.workspaceId,i={item_ids:t.itemIds||[],page:t.page||1,per_page:t.perPage||10,name_like:t.name_like||""};return this.request("assignableStatus",{workspaceId:n||""},{payload:i})}async updateSceneName({workspaceId:t,entityId:n,itemId:i,name:o}){const s={id:i,entity_id:n,name:o,include:"item_user_roles"};return this.request("item",{workspaceId:t,itemId:i},{payload:s})}async deleteScene(t,n,i){const o={item_ids:[i]};return this.request("bulkDelete",{workspaceId:t,entityId:n},{payload:o})}async deleteThumbnail(t,n){const i={item_ids:n};return this.request("delete_thumbnail",{workspaceId:t},{payload:i})}async deleteRendition(t,n,i=!1){const o={item_ids:n,delete_all:i?1:void 0};return this.request("delete_rendition",{workspaceId:t},{payload:o})}async archiveScene(t,n,i){const o={item_ids:i,status:0};return this.request("archive_item",{workspaceId:t,entityId:n},{payload:o})}async changeDate({workspaceId:t,itemIds:n,startDate:i,dueDate:o}){const s={item_ids:n,start_date:i,due_date:o};return this.request("bulkDateUpdate",{workspaceId:t},{payload:s})}async updateAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("bulkAssignUpdate",{workspaceId:t},{payload:o})}async removeAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("removeAssignee",{workspaceId:t},{payload:o})}async replaceAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("bulkAssignUpdate",{workspaceId:t},{params:{replace:1},payload:o})}async addAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("bulkAssignUpdate",{workspaceId:t},{payload:o})}async unAssignAll(t,n,i){const o={item_ids:i,ws_user_role_ids:[]};return this.request("removeAssignee",{workspaceId:t,entityId:n},{payload:o})}async createNewScene({workspaceId:t,entityId:n,name:i}){const o={entity_id:n,name:i};return this.request("createNewScene",{workspaceId:t},{payload:o})}async updateItemStatus({workspaceId:t,itemIds:n,statusId:i}){const o={item_ids:n,template_flow_status_id:i};return this.request("bulkStatusUpdate",{workspaceId:t},{payload:o})}async getUserInformation(t,n){return this.request("basicInfor",{workspaceId:t,userId:n})}async bulkDeleteItems(t,n){const i={item_ids:n};return this.request("bulkDelete",{workspaceId:t},{payload:i})}async bulkUnarchiveItems(t,n){const i={item_ids:n,status:1};return this.request("bulkUnarchive",{workspaceId:t},{payload:i})}async bulkArchiveItems(t,n){const i={item_ids:n,status:0};return this.request("bulkArchive",{workspaceId:t},{payload:i})}async getPermissionForItems({workspaceId:t,itemIds:n}){const i={item_ids:n};return this.request("getPermission",{workspaceId:t},{payload:i,params:{per_page:500}})}async unarchiveScene(t,n,i){const o={item_ids:i,status:1};return this.request("unarchive_item",{workspaceId:t,entityId:n},{payload:o})}async getUserPermission(t){return this.request("getUserPermission",{workspaceId:t})}async getEntityDetail(t,n){return this.request("getEntityDetail",{workspaceId:t,entityId:n})}async downloadTemplate(t,n){return this.request("downloadTemplate",{workspaceId:t,entityId:n},{responseType:"blob"})}async downloadExportedItemsFile(t,n){return this.request("exportItems",{workspaceId:t,exportId:n},{responseType:"blob"})}async getStatuses(t,n,i){return this.request("getStatuses",{workspaceId:t,entityId:n},{params:i})}async addNewSceneViaImportFile(t,n,i){return this.request("importItems",{workspaceId:t,entityId:n},{payload:i})}async overwriteScenesViaImportFile(t,n,i){return this.request("updateFromFile",{workspaceId:t,entityId:n},{payload:i})}async getMe(){return this.request("me",{})}async getWorkspaces(t){const n={page:1,per_page:1,"ws_user_role>status_eq":1,include:"owner",include_ws:t};return this.request("workspaces",{},{params:n})}}const Nde=e=>{const{showMessage:t}=Rd(),n=Di(),i={domainApi:"https://api.dev.arbocollab.com/api",wsCode:sessionStorage.getItem("ws.code")||"w:yngazem",entityId:e.value.entityId},o=n==null?void 0:n.appContext.config.globalProperties.apiConfig,s=new $M(o,i);s.on("call-api",A=>{var D,P;A.success?t(A.apiCode,"success"):t(((P=(D=A.res)==null?void 0:D.data)==null?void 0:P.message)||A.apiCode,"error")});const r=Mo({}),a=Y([]),l=Y(!1),c=Y(null),u=Y(null),d=Y(1),h=Y(20),{setCachedUsers:f}=i5(),g=A=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",status_eq:1,include_permission:"{include_permission}",include_permission_names:!0,q:A}),m=500,y=async(A,D,P)=>{if(!A.length)return[];const V=rU(A,D);return(await Promise.all(V.map(P))).flat()},b=async A=>{try{return(await s.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:A})).data.map(P=>[P.id,P.permission])}catch(D){return console.error("Failed to fetch item permissions chunk:",D),[]}},S=async(A,D)=>{try{const P=await s.getMetricValues({workspaceId:e.value.workspaceId,item_ids:A,per_page:A.length*D.length,metric_ids:D}),V=P.data.map(te=>{const B=new Map(te.item_metrics.map(Z=>[Z.metric_id,Z.value])),G=Object.fromEntries(D.map(Z=>[Z,B.get(Z)??null]));return[te.id,G]}),H=new Set(P.data.map(te=>te.id));for(const te of A)if(!H.has(te)){const B=Object.fromEntries(D.map(G=>[G,null]));V.push([te,B])}return V}catch(P){return console.error("Failed to fetch a chunk of metric values:",P),[]}},F=async A=>{try{const D=await s.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:A,per_page:A.length}),P=D.data.flatMap(V=>V.assignees);return f(P),D.data.map(V=>[V.id,V.assignees])}catch(D){return console.error("Failed to fetch a chunk of assigned users:",D),[]}},C=async A=>{if(!A.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const D=await y(A,m,b);return Object.fromEntries(D)}catch(D){return console.error("Failed to fetch item permissions:",D),{}}},R=async(A,D)=>{if(!A.length||!D.length)return{};try{const P=await Promise.all(D.map(async H=>await y(A,m,te=>S(te,[H])))),V={};for(const H of P.flat()){const[te,B]=H;V[te]||(V[te]={}),Object.assign(V[te],B)}return V}catch(P){return console.error("Failed to fetch metric values:",P),{}}},E=async A=>{if(!A.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const D=await y(A,m,F);return Object.fromEntries(D)}catch(D){return console.error("Failed to fetch assigned users:",D),{}}};return{items:a,loading:l,error:c,pagination:u,currentPage:d,pageSize:h,cusorMap:r,fetchItems:async A=>{const{cursor:D,offset:P,size:V,searchQuery:H}=A;let te=[];l.value=!0,c.value=null;try{const B=await s.getAllItem_cursor({cursor:D||void 0,offset:P||void 0,pageSize:V||h.value,...g(H),sortBy:A.sort_by,assignees:A.assignees});return a.value=B.data,u.value=B.meta,d.value=B.meta.current_page||0,te=B.data.map(G=>G.id),B}catch(B){throw c.value=B,console.error("Failed to fetch items (cursor):",B),B}finally{const B=async()=>{try{const[G,Z,$]=await Promise.all([E(te),R(te,e.value.metricIds),C(te)]);e.value.updateItemData({assignees:G,metricValues:Z,permission:$},te)}catch(G){console.error("Post-fetch processing failed:",G)}};l.value=!1,setTimeout(B)}},getAssignableStatus:async A=>{try{return await s.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:A})}catch(D){throw console.error("Failed to fetch assignable status:",D),D}},getMetricList:async A=>{try{return await s.getMetricList({workspaceId:e.value.workspaceId,entityId:A})}catch(D){throw console.error("Failed to fetch metric list:",D),D}},getMetricValues:R,getAssignedUsers:E}};function Vde(e){return{updateRowData:(i,o)=>{const s=Array.from(o).map(u=>{var d,h,f;return{id:u,assignees:((d=i.assignees)==null?void 0:d[u])||[],permissions:((h=i.permission)==null?void 0:h[u])||null,metricValues:((f=i.metricValues)==null?void 0:f[u])||null}});if(!e.value)return;const r=[],a=new Map,c=e.value.getColumnDefs().map(u=>{if(u.field&&u.field.startsWith("metric_")&&(u.hide===!1||u.hide===void 0))return u.field}).filter(Boolean);s.forEach(u=>{var h;const d=(h=e.value)==null?void 0:h.getRowNode(u.id);if(d){r.push(d);const f=u.assignees?U6(u.assignees.map(AF)):null;if(d.data.assignees=f,d.data.permissions=u.permissions||null,c.forEach(g=>{d.data[g]=d.data[g]??null}),u.metricValues){const g=u.metricValues;Object.keys(g).forEach(m=>{d.data[`metric_${m}`]=g[m]||null,a.set(`metric_${m}`,!0)})}}}),e.value.refreshCells({rowNodes:r,columns:["assignees",...Array.from(a.keys()),"name","dateRange","status"],force:!0})},setMetricValues:(i,o,s)=>{const r=e.value;if(!r)return;const a=new Map(Array.from(o).map(c=>[c,new Map(s.map(u=>[u,null]))]));Object.entries(i).forEach(([c,u])=>{Object.entries(u).forEach(([d,h])=>{var f;(f=a.get(c))==null||f.set(d,h)})});const l=Array.from(a.entries()).map(([c,u])=>{const d=r.getRowNode(c);return d&&d.data?(u.forEach((h,f)=>{const g=`metric_${f}`;d.data[g]=h}),d):null});l.length>0&&r.refreshCells({rowNodes:l,columns:Array.from(s).map(c=>`metric_${c}`),force:!0})}}}function Bde(e,t,n,i){return{async getRows(o){try{i(!0);const s=Math.floor(o.startRow/t)+1,{rows:r,total:a}=await e({page:s,pageSize:t,filterText:n(),sort_by:o.sortModel});let l=-1;Number.isFinite(a)?l=a:r.length<t&&(l=o.startRow+r.length),o.context={pageSize:t,text:n()},o.successCallback(r,l),i(!1)}catch(s){console.error("Datasource fetch error:",s),o.failCallback()}}}}function Hde(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:i,gridApi:o,columnDefs:s,fetcher:r}=e,a=Y(!0),l=()=>{n.value=!n.value,o.value&&setTimeout(()=>{var g;(g=o.value)==null||g.sizeColumnsToFit()},300)},c=g=>{if(a.value=!1,o.value=g,!g)return null;const{sizeColumnsToFit:m,addEventListener:y,setGridOption:b}=g;if(m==null||m(),!r)return console.error("Fetcher function is undefined"),null;const S=Bde(r,e.perPage,()=>i.value,F=>{a.value=F});return b==null||b("datasource",S),y==null||y("selectionChanged",()=>{t.value=g.getSelectedRows()}),y==null||y("columnMoved",()=>{var E;const F=(E=g.getColumnState())==null?void 0:E.map(x=>x.colId),C=s.value.reduce((x,k)=>(k.field&&x&&(x[k.field]=k),x),{}),R=F.map(x=>C[x]).filter(Boolean);s.value=R}),g||null},u=g=>{var m,y;if((m=o.value)==null||m.hideOverlay(),g!==void 0&&(i.value=g),(y=o.value)==null||y.deselectAll(),t.value=[],a.value=!0,!o.value||!r){console.error("Grid API or fetcher is not available"),a.value=!1;return}o.value.purgeInfiniteCache(),o.value.ensureIndexVisible(0,"top"),setTimeout(()=>{a.value=!1},300)},d=()=>{var g;(g=o.value)==null||g.deselectAll(),t.value=[]},h=g=>{s.value=g},f=Wo(g=>{u(g)},wp);return{isLoading:a,toggleSidebar:l,onGridReady:c,onSearch:f,handleUnSelect:d,updateTableConfig:h}}const Gde={key:1},$de=Ct(ct({__name:"PopupOverwriteScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const i=Y(null),o=e,s=()=>{i.value&&i.value.show()},r=Y(""),a=Y("idle"),l=Y({file:null,format:null}),{apiServices:c}=vo(!1,{}),u=Y(!1),d=async()=>{u.value=!0;const x=o.workspaceId,k=o.entityId;if(!x||!k||!c.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await c.value.downloadExportedItemsFile(x,k))throw new Error("No response from downloadTemplate API")}catch(O){console.error("Error downloading template:",O)}u.value=!1},h=n,f=()=>{h("import-success"),S()},g=async x=>{var A,D,P;const k=new FormData,O=((A=x.name.split(".").pop())==null?void 0:A.toString())||"";if(k.append("file",x),k.append("format",O),!c.value){console.error("API services not available");return}try{const V=await c.value.overwriteScenesViaImportFile(o.workspaceId,o.entityId,k);m()}catch(V){throw console.error("Error uploading file:",V),y(((P=(D=V.response)==null?void 0:D.data)==null?void 0:P.message)||"An unknown error occurred during file upload."),V}},m=()=>{a.value="success"},y=x=>{r.value=x,a.value="error"},b=async()=>{!l.value||!l.value.file||await g(l.value.file)},S=()=>{var x;E(),(x=i.value)==null||x.hide()};t({close:S,open:s});const F=q(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Update existing work"})[a.value]),C=q(()=>l.value.file?!1:(console.error("No file selected"),!0)),R=Y(null),E=()=>{var x;(x=R.value)==null||x.clear(),r.value="",l.value={file:null,format:null},a.value="idle"};return(x,k)=>(K(),Xe(U(t1),{"popup-name":F.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:i,onHidden:E},_u({default:Ee(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(K(),Xe(T1,{key:0,state:a.value,"error-message":r.value,overwrite:!0},null,8,["state","error-message"])):(K(),Ce("div",Gde,[we("div",{class:z(x.$style["step-section"])},[we("span",{class:z(x.$style["step-title"])},"Step 1: Download current data",2),we("span",{class:z(x.$style["step-description"])},[...k[1]||(k[1]=[dt(" Download a file with all existing work and details. Edit it, then upload in Step 2. ",-1),we("br",null,null,-1),we("i",null,"Note: Empty cells and unchanged values will be skipped.",-1)])],2),ve(U(pt),{class:z(x.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:u.value,onHandleClick:d},{prefix:Ee(()=>[ve(U(mt),{src:"Download"})]),default:Ee(()=>[k[2]||(k[2]=dt(" Download file ",-1))]),_:1},8,["class","disabled"])],2),we("div",{class:z(x.$style["step-section"])},[we("span",{class:z(x.$style["step-title"])},"Step 2: Upload updated file (.xlsx, .xls, .csv)",2),ve(U(x1),{modelValue:l.value,"onUpdate:modelValue":k[0]||(k[0]=O=>l.value=O),ref_key:"filUploaderRef",ref:R},null,8,["modelValue"])],2),we("div",{class:z(x.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ve(P1)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:Ee(()=>[ve(U(pt),{style:{flex:"1"},variant:"secondary",onClick:S},{default:Ee(()=>[...k[3]||(k[3]=[dt(" Cancel ",-1)])]),_:1}),ve(U(pt),{disabled:C.value,style:{flex:"1"},variant:"primary",onClick:b},{default:Ee(()=>[...k[4]||(k[4]=[dt(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:Ee(()=>[ve(U(pt),{style:{flex:"1"},variant:"primary",onClick:f},{default:Ee(()=>[...k[5]||(k[5]=[dt(" Close ",-1)])]),_:1})]),key:"1"}:{name:"footer",fn:Ee(()=>[ve(U(pt),{style:{flex:"1"},variant:"primary",onClick:E},{default:Ee(()=>[...k[6]||(k[6]=[dt(" Try Again ",-1)])]),_:1})]),key:"2"}]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_13ctn_1","step-title":"_step-title_13ctn_11","step-title-2":"_step-title-2_13ctn_17","step-description":"_step-description_13ctn_23","date-format-guide":"_date-format-guide_13ctn_28","import-error":"_import-error_13ctn_39","drop-area":"_drop-area_13ctn_49","is-dragging":"_is-dragging_13ctn_49","drop-area-content":"_drop-area-content_13ctn_52",browse:"_browse_13ctn_61","download-sample-btn":"_download-sample-btn_13ctn_65"}}]]),Wde=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
189
189
  <rect width="32" height="32" rx="4" fill="#CCF3EB"/>
190
190
  <path d="M11 9C9.89688 9 9 9.89688 9 11V21C9 22.1031 9.89688 23 11 23H21C22.1031 23 23 22.1031 23 21V11C23 9.89688 22.1031 9 21 9H11ZM19.5312 14.5312L15.5312 18.5312C15.2375 18.825 14.7625 18.825 14.4719 18.5312L12.4719 16.5312C12.1781 16.2375 12.1781 15.7625 12.4719 15.4719C12.7656 15.1813 13.2406 15.1781 13.5312 15.4719L15 16.9406L18.4688 13.4688C18.7625 13.175 19.2375 13.175 19.5281 13.4688C19.8187 13.7625 19.8219 14.2375 19.5281 14.5281L19.5312 14.5312Z" fill="#00A18D"/>
191
191
  </svg>
192
- `,Ude=Ct(ct({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=zC(),{setUserPermissions:i,setEntityPermissions:o}=n,{entityPermissions:s}=ys(n),{addNotification:r}=Rd(),a=Y(null),l={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},c=q(()=>{var Se;const le=((Se=s.value)==null?void 0:Se.has_create_item_permission)===1;return[{label:"Create manually",value:"new_scene",icon:"Plus",type:"icon",id:"create_new_scene",hide:!le},{label:"Import from CSV or Excel",value:"import_scenes",icon:"FileImport",type:"icon",hide:!le,id:"import_scenes_option"},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",icon:"FilePen",type:"icon",hide:!le,id:"overwrite_scenes_option"}]}),u=e;Ld.initialize({wrapVueCellRenderer:Md,wrapVueCellEditor:M1});const d=Y(null),h=Y([]),f=ZC(),{rowCount:g}=ys(f),m=Y(!1),y=Y(""),b=Y(),S=Y(""),F=Y(!1),C=Y(new Set),R=Y(new Map),{apiServices:E}=vo(!1,u),{columnDefs:x,checkboxColumn:k,saveColumnConfig:O}=rue(b,u.entityId),{updateRowData:A,setMetricValues:D}=Vde(d),P=q(()=>({isSearching:y.value.length>0,isFiltering:Je.value.length>0})),V=q(hC),H=q(()=>x.value.filter(le=>{var Se;return((Se=le.field)==null?void 0:Se.startsWith("metric_"))&&!le.hide}).map(le=>{var Se;return((Se=le.field)==null?void 0:Se.replace("metric_",""))||""}));Ta("timezone",V);const te=q(()=>({autoFetch:!1,workspaceId:u.workspaceId,entityId:u.entityId,metricIds:H.value,updateItemData:A})),{fetchItems:B,getMetricList:G,cusorMap:Z,getMetricValues:$}=Nde(te),ce=q(()=>{if(!d.value)return!1;const le=d.value.getSelectedRows().length;return le>0&&le>=g.value.total}),ue=q(()=>{var le;return((le=a.value)==null?void 0:le.name)||"Items"}),xe=(le,Se)=>{var nt,Pe,Mn;g.value.total=le.meta.total??0,(nt=le.meta.next)!=null&&nt.cursor&&(Z[Se+1]=le.meta.next.cursor),S.value=le.meta["X-Tsr-content-sha256"]||"",le.meta.total===0?(Pe=d.value)==null||Pe.showNoRowsOverlay():(Mn=d.value)==null||Mn.hideOverlay()},re=_1(),{sortingAPIConfiguration:Ie,isSortingRunning:Me}=ys(re),Je=Y([]),gt=async({page:le,pageSize:Se,filterText:nt})=>{var br;(br=d.value)==null||br.hideOverlay();const Pe=Z[le],Mn=!Pe&&le>1?(le-1)*Se:void 0,Po=Ie.value;Po.length>0&&(Me.value=!0);try{const mi=await B({cursor:Pe,size:Se,searchQuery:nt,offset:Mn,sort_by:Po,assignees:Je.value});if(!mi)return{rows:[],total:0};const ca=(Ls=>{const ns=Ls.data.map(Pi=>OF(Pi,V.value));return ns.forEach(Pi=>{C.value.add(String(Pi.id)),R.value.set(String(Pi.id),{})}),ns})(mi);return xe(mi,le),{rows:ca,total:g.value.total}}catch(mi){return console.error("Failed to fetch items:",mi),{rows:[],total:0}}finally{Me.value=!1}},{isLoading:Ft,toggleSidebar:He,onGridReady:en,handleUnSelect:tn,onSearch:At}=Hde({selectRowData:Y([]),isSidebarOpen:m,quickFilterText:y,gridApi:d,columnDefs:x,perPage:l.ROWS_PER_PAGE,fetcher:gt}),N=q(()=>({blockLoadDebounceMillis:1e3,columnDefs:x.value,rowModelType:"infinite",cacheBlockSize:l.ROWS_PER_PAGE,infiniteInitialRowCount:20,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,headerCheckbox:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},suppressHeaderFocus:!1,pagination:!1,rowHeight:l.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!1,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:l.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:X,noRowsOverlayComponent:Md(b7),noRowsOverlayComponentParams:()=>P.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:le=>le.data.id,getRowClass:le=>{if(!le.data)return["row-empty"];const Se=["row-highlight"];return le.data.id||Se.push("row-inactive"),le.data.isDeleted&&Se.push("row-deleted"),le.data.isArchived&&Se.push("row-archived"),Se},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:u.workspaceId,entityId:u.entityId,apiServices:E.value,sorting:Me.value}}));function X(){if(!d.value)return;const le=d.value.getCacheBlockState();if(!le)return;const Se=Object.values(le).reduce((nt,Pe)=>(Pe==null?void 0:Pe.pageStatus)==="loaded"?nt+(Pe.endRow-Pe.startRow):nt,0);g.value.loaded=Math.min(Se,g.value.total)}ut(()=>Ie,()=>{d.value&&(S.value="",C.value.clear(),d.value.deselectAll(),Object.keys(Z).forEach(le=>delete Z[Number(le)]),d.value.purgeInfiniteCache(),d.value.ensureIndexVisible(0),d.value.refreshCells({force:!0}))},{deep:!0});const fe=Y(),ke=Y(),De=()=>{var le;(le=ke.value)==null||le.open()},Fe=()=>{var le;(le=fe.value)==null||le.open()},Ve=()=>{d.value&&(S.value="",C.value.clear(),Object.keys(Z).forEach(le=>delete Z[Number(le)]),d.value.deselectAll(),d.value.ensureIndexVisible(0,"top"),d.value.purgeInfiniteCache(),d.value.refreshInfiniteCache())},Ne=q(()=>sessionStorage.getItem("ITEM_TABLE_APP_VERSION")||""),Ae=Y();function Te(le){var Se;le==="new_scene"?(Se=Ae.value)==null||Se.show():le==="import_scenes"?Fe():le==="overwrite_scenes"&&De()}const at=le=>{h.value=le.api.getSelectedRows().map(Se=>Se.id)},We=le=>{const Se=en(le);return Se&&(Se.addEventListener("modelUpdated",X),Se.addEventListener("bodyScroll",()=>Se.stopEditing())),Se==null||Se.sizeColumnsToFit(),Se},lt=(le,Se)=>{if(!d.value)return;const nt=d.value.getRowNode(le);nt?(d.value.ensureIndexVisible(Number(nt.rowIndex),"middle"),d.value.flashCells({rowNodes:[nt],flashDuration:3e3,fadeDuration:1e3})):d.value.ensureIndexVisible(g.value.total-1,"bottom")},ht=async le=>{var nt;let Se;if(!(!E.value||!le.trim())){Ft.value=!0;try{Se=await E.value.createNewScene({workspaceId:u.workspaceId,entityId:u.entityId,name:le}),g.value.total<50&&await Ve()}catch(Pe){console.error("Error creating new scene:",Pe)}finally{Ft.value=!1,Se!=null&&Se.id&&r({id:String(Se==null?void 0:Se.id),message:`${le} created successfully`,actions:[{label:"View",variant:"secondary",action:()=>{lt(String(Se==null?void 0:Se.id))}},{label:"Scene Hub",variant:"primary",action:()=>{const Pe=fo({type:"scene_hub",config:{ws_code:u.workspaceId,baseDomain:sessionStorage.getItem("URL_BASE")||"app.arbocollab.com",scene_id:String(Se==null?void 0:Se.id)}}).url;window.open(Pe,"_blank")},btnIcon:"CustomSceneHub"}],icon:Wde,type:"interactive"}),(nt=Ae.value)==null||nt.hide()}}},xt=le=>le.metric_type.code==="number"?"number":"default",Mt=async()=>{if(u.entityId)try{const le=await G(u.entityId);b.value=le.data.map(Se=>({...Se,sortType:xt(Se)}))}catch(le){console.error("Failed to initialize metric list:",le),b.value=[]}},Bt=async()=>{if(E.value)try{const le=await E.value.getUserPermission(u.workspaceId);i(le)}catch(le){console.error("Failed to fetch user permissions:",le)}},Dn=async()=>{if(E.value)try{const le=await E.value.getEntityDetail(u.workspaceId,u.entityId);o(le.permission),a.value=le}catch(le){console.error("Failed to fetch entity details:",le)}},sn=F1(),{setUser:Kn}=sn,Jn=async()=>{if(E.value)try{const le=await E.value.getMe();return Kn(le),le}catch(le){console.error("Failed to fetch user details:",le)}},ye=async()=>{var le;if(E.value)try{const Se=await E.value.getWorkspaces(u.workspaceId),nt=(le=Se.data[0])==null?void 0:le.ws_user_role_id;return nt&&sn.setUserRoleId(nt),Se}catch(Se){console.error("Failed to fetch workspace details:",Se)}};ut(()=>[u.entityId,u.workspaceId],async([le,Se])=>{!le||!Se||(Jn(),ye(),Mt(),Bt(),Dn())},{immediate:!0,deep:!0}),ut(H,(le,Se)=>{const nt=le.filter(Pe=>!(Se!=null&&Se.includes(Pe)));nt.length>0&&$(Array.from(C.value),nt).then(Pe=>{D(Pe,C.value,nt)})},{immediate:!0,deep:!0}),ut(S,(le,Se)=>{F.value=!!(Se&&le&&Se!==le)}),t({refreshTable:Ve});const Re=le=>{Je.value=le,Ve()};return(le,Se)=>(K(),Xe(W(yK),{"is-sidebar-open":m.value,onCloseSidebar:W(He),onSidebarClear:W(He),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:W(He)},{"header-left":Ee(()=>[we("h1",{class:z(le.$style.tableTitle)},"Scenes",2),we("div",{class:z(le.$style["beta-tag"])},"Beta",2),ve(W(tw),{variant:["primary"],options:c.value,onSelect:Te,onHandleClick:Se[1]||(Se[1]=nt=>Te("new_scene")),id:"create_scene_dropdown"},{prefix:Ee(()=>[ve(W(pt),{id:"create_new_scene",variant:["primary"],onClick:Se[0]||(Se[0]=nt=>Te("new_scene")),label:"New"})]),_:1},8,["options"]),we("span",null,bt(Ne.value),1)]),"header-actions":Ee(()=>[dt(" loading: "+bt(W(Ft))+"| ",1),ve(W(F7),{"onUpdate:assignees":Re}),ve(W(qC),{modelValue:y.value,"onUpdate:modelValue":Se[2]||(Se[2]=nt=>y.value=nt),onSearch:W(At),class:z(le.$style.itemSearchBox),onClear:Se[3]||(Se[3]=nt=>W(At)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),ve(W(GP),{status:W(Ft)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":F.value},{default:Ee(()=>[ve(W(pt),{variant:"secondary",disabled:W(Ft),onClick:Ve},{prefix:Ee(()=>[ve(W(mt),{src:"ArrowsRotate"})]),default:Ee(()=>[Se[4]||(Se[4]=dt(" Refresh ",-1))]),_:1},8,["disabled"])]),_:1},8,["status","show-badge"]),ve(W(y7),{"model-value":W(x),"onUpdate:modelValue":W(O),checkboxColumn:W(k),id:"table_customization"},null,8,["model-value","onUpdate:modelValue","checkboxColumn"])]),grid:Ee(({availableHeight:nt})=>[ve(W(Qce),_n({id:"item_table_main",ref:"agGrid"},N.value,{height:nt+"px",isSorting:W(Me),onOnGridReady:We,onSelectionChanged:at}),null,16,["height","isSorting"])]),footer:Ee(()=>[we("div",{class:z(le.$style.tableFooter),id:"table_footer"},[we("span",null,[Se[5]||(Se[5]=dt(" Showing ",-1)),we("b",null,bt(W(g).loaded)+" of "+bt(W(g).total),1)])],2)]),"new-row":Ee(()=>[ve(W(E7),{onCreateNewItem:ht,ref_key:"createNewSceneRef",ref:Ae},null,512)]),"bulk-update-actions":Ee(()=>{var nt;return[!m.value&&h.value.length>0?(K(),Xe(W(sK),{key:0,selectRowData:((nt=d.value)==null?void 0:nt.getSelectedRows())||[],"workspace-id":u.workspaceId,"entity-id":u.entityId,"grid-api":d.value,onUnselect:W(tn),"take-name":ue.value,"selected-all":ce.value},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","take-name","selected-all"])):it("",!0)]}),snackbar:Ee(()=>[ve(W(kK))]),popup:Ee(()=>[ve(A7,{ref_key:"popupCreateSceneRef",ref:fe,"workspace-id":u.workspaceId,"entity-id":u.entityId,onImportSuccess:Ve},null,8,["workspace-id","entity-id"]),ve($de,{ref_key:"popupOverwriteScenesRef",ref:ke,"workspace-id":u.workspaceId,"entity-id":u.entityId,onImportSuccess:Ve},null,8,["workspace-id","entity-id"])]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1lefh_1",tableFooter:"_tableFooter_1lefh_7",footerStart:"_footerStart_1lefh_17",newRow:"_newRow_1lefh_25","warning-text":"_warning-text_1lefh_44","has-error":"_has-error_1lefh_49",itemSearchBox:"_itemSearchBox_1lefh_53","beta-tag":"_beta-tag_1lefh_57"}}]]),WM="0.0.47",zde={key:0},jde=Ct(ct({__name:"app",setup(e){const t=q(()=>n.id.length===0||n.workspaceId.length===0),n=Mo({id:"",workspaceId:"",apiConfig:{}}),i=Rd(),{showMessage:o}=i,s=c=>{var u,d;c.success?o(c.apiCode,"success"):o(((d=(u=c.res)==null?void 0:u.data)==null?void 0:d.message)||c.apiCode,"error")},r=Y(null);fv(()=>{var c,u,d;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",WM);try{if(r.value=Di(),!r.value)throw new Error("Current instance is null");n.id=((c=r.value)==null?void 0:c.appContext.config.globalProperties.id)||"",n.workspaceId=((u=r.value)==null?void 0:u.appContext.config.globalProperties.workspaceId)||sessionStorage.getItem("ws.code")||"";const h={domainApi:"https://api.dev.arbocollab.com/api",wsCode:sessionStorage.getItem("ws.code")||"w:yngazem",entityId:n.id};n.apiConfig=((d=r.value)==null?void 0:d.appContext.config.globalProperties.apiConfig)||{};const f=new $M(n.apiConfig,h);f.on("call-api",s),r.value.appContext.config.globalProperties.apiServices=f}catch(h){console.error("Error getting current instance:",h)}}),qn(()=>{r.value.appContext.config.globalProperties.apiServices.off("call-api",s)});const a=q(()=>n.id),l=q(()=>n.workspaceId);return Ta("workspaceId",l),Ta("entityId",a),(c,u)=>(K(),Ce("div",{class:z(c.$style.dashboardPluginWrapper)},[t.value?(K(),Ce("span",zde," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):a.value?(K(),Xe(W(Ude),{key:1,entityId:a.value,workspaceId:l.value},null,8,["entityId","workspaceId"])):it("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),GS=async(e={},t={})=>{const n=LR(jde),i=F8();n.use(i);const o=["apiConfig","workspaceId","id"],s={};return Object.entries(e).forEach(([r,a])=>{a!==void 0&&(n.config.globalProperties[r]=a,s[r]=a,o.includes(r)&&typeof a=="string"?sessionStorage.setItem(r,a):console.error(`[Config Error] Key "${r}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=s,Object.values(t).forEach(r=>{r&&typeof r.install=="function"&&n.use(r)}),n.config.errorHandler=(r,a,l)=>{console.error("[Vue Error]",r),l&&console.error("[Info]",l)},console.log(`%cArbo Dashboard Plugin v${WM}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),n.provide("switchInstance",n.config.globalProperties.$switchInstance),n};typeof window<"u"&&(window.arboDashboard=GS),cn.default=GS,cn.initDashboard=GS,Object.defineProperties(cn,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
192
+ `,Ude=Ct(ct({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=zC(),{setUserPermissions:i,setEntityPermissions:o}=n,{entityPermissions:s}=ys(n),{addNotification:r}=Rd(),a=Y(null),l={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},c=q(()=>{var Se;const le=((Se=s.value)==null?void 0:Se.has_create_item_permission)===1;return[{label:"Create manually",value:"new_scene",icon:"Plus",type:"icon",id:"create_new_scene",hide:!le},{label:"Import from CSV or Excel",value:"import_scenes",icon:"FileImport",type:"icon",hide:!le,id:"import_scenes_option"},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",icon:"FilePen",type:"icon",hide:!le,id:"overwrite_scenes_option"}]}),u=e;Ld.initialize({wrapVueCellRenderer:Md,wrapVueCellEditor:M1});const d=Y(null),h=Y([]),f=ZC(),{rowCount:g}=ys(f),m=Y(!1),y=Y(""),b=Y(),S=Y(""),F=Y(!1),C=Y(new Set),R=Y(new Map),{apiServices:E}=vo(!1,u),{columnDefs:x,checkboxColumn:k,saveColumnConfig:O}=rue(b,u.entityId),{updateRowData:A,setMetricValues:D}=Vde(d),P=q(()=>({isSearching:y.value.length>0,isFiltering:Je.value.length>0})),V=q(hC),H=q(()=>x.value.filter(le=>{var Se;return((Se=le.field)==null?void 0:Se.startsWith("metric_"))&&!le.hide}).map(le=>{var Se;return((Se=le.field)==null?void 0:Se.replace("metric_",""))||""}));Ta("timezone",V);const te=q(()=>({autoFetch:!1,workspaceId:u.workspaceId,entityId:u.entityId,metricIds:H.value,updateItemData:A})),{fetchItems:B,getMetricList:G,cusorMap:Z,getMetricValues:$}=Nde(te),ce=q(()=>{if(!d.value)return!1;const le=d.value.getSelectedRows().length;return le>0&&le>=g.value.total}),ue=q(()=>{var le;return((le=a.value)==null?void 0:le.name)||"Items"}),xe=(le,Se)=>{var nt,Pe,Mn;g.value.total=le.meta.total??0,(nt=le.meta.next)!=null&&nt.cursor&&(Z[Se+1]=le.meta.next.cursor),S.value=le.meta["X-Tsr-signature"]||"",le.meta.total===0?(Pe=d.value)==null||Pe.showNoRowsOverlay():(Mn=d.value)==null||Mn.hideOverlay()},re=_1(),{sortingAPIConfiguration:Ie,isSortingRunning:Me}=ys(re),Je=Y([]),gt=async({page:le,pageSize:Se,filterText:nt})=>{var br;(br=d.value)==null||br.hideOverlay();const Pe=Z[le],Mn=!Pe&&le>1?(le-1)*Se:void 0,Po=Ie.value;Po.length>0&&(Me.value=!0);try{const mi=await B({cursor:Pe,size:Se,searchQuery:nt,offset:Mn,sort_by:Po,assignees:Je.value});if(!mi)return{rows:[],total:0};const ca=(Ls=>{const ns=Ls.data.map(Pi=>OF(Pi,V.value));return ns.forEach(Pi=>{C.value.add(String(Pi.id)),R.value.set(String(Pi.id),{})}),ns})(mi);return xe(mi,le),{rows:ca,total:g.value.total}}catch(mi){return console.error("Failed to fetch items:",mi),{rows:[],total:0}}finally{Me.value=!1}},{isLoading:Ft,toggleSidebar:He,onGridReady:en,handleUnSelect:tn,onSearch:At}=Hde({selectRowData:Y([]),isSidebarOpen:m,quickFilterText:y,gridApi:d,columnDefs:x,perPage:l.ROWS_PER_PAGE,fetcher:gt}),N=q(()=>({blockLoadDebounceMillis:1e3,columnDefs:x.value,rowModelType:"infinite",cacheBlockSize:l.ROWS_PER_PAGE,infiniteInitialRowCount:20,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,headerCheckbox:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},suppressHeaderFocus:!1,pagination:!1,rowHeight:l.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!1,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:l.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:X,noRowsOverlayComponent:Md(b7),noRowsOverlayComponentParams:()=>P.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:le=>le.data.id,getRowClass:le=>{if(!le.data)return["row-empty"];const Se=["row-highlight"];return le.data.id||Se.push("row-inactive"),le.data.isDeleted&&Se.push("row-deleted"),le.data.isArchived&&Se.push("row-archived"),Se},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:u.workspaceId,entityId:u.entityId,apiServices:E.value,sorting:Me.value}}));function X(){if(!d.value)return;const le=d.value.getCacheBlockState();if(!le)return;const Se=Object.values(le).reduce((nt,Pe)=>(Pe==null?void 0:Pe.pageStatus)==="loaded"?nt+(Pe.endRow-Pe.startRow):nt,0);g.value.loaded=Math.min(Se,g.value.total)}ut(()=>Ie,()=>{d.value&&(S.value="",C.value.clear(),d.value.deselectAll(),Object.keys(Z).forEach(le=>delete Z[Number(le)]),d.value.purgeInfiniteCache(),d.value.ensureIndexVisible(0),d.value.refreshCells({force:!0}))},{deep:!0});const fe=Y(),ke=Y(),De=()=>{var le;(le=ke.value)==null||le.open()},Fe=()=>{var le;(le=fe.value)==null||le.open()},Ve=()=>{d.value&&(S.value="",C.value.clear(),Object.keys(Z).forEach(le=>delete Z[Number(le)]),d.value.deselectAll(),d.value.ensureIndexVisible(0,"top"),d.value.purgeInfiniteCache(),d.value.refreshInfiniteCache())},Ne=q(()=>sessionStorage.getItem("ITEM_TABLE_APP_VERSION")||""),Ae=Y();function Te(le){var Se;le==="new_scene"?(Se=Ae.value)==null||Se.show():le==="import_scenes"?Fe():le==="overwrite_scenes"&&De()}const at=le=>{h.value=le.api.getSelectedRows().map(Se=>Se.id)},We=le=>{const Se=en(le);return Se&&(Se.addEventListener("modelUpdated",X),Se.addEventListener("bodyScroll",()=>Se.stopEditing())),Se==null||Se.sizeColumnsToFit(),Se},lt=(le,Se)=>{if(!d.value)return;const nt=d.value.getRowNode(le);nt?(d.value.ensureIndexVisible(Number(nt.rowIndex),"middle"),d.value.flashCells({rowNodes:[nt],flashDuration:3e3,fadeDuration:1e3})):d.value.ensureIndexVisible(g.value.total-1,"bottom")},ht=async le=>{var nt;let Se;if(!(!E.value||!le.trim())){Ft.value=!0;try{Se=await E.value.createNewScene({workspaceId:u.workspaceId,entityId:u.entityId,name:le}),g.value.total<50&&await Ve()}catch(Pe){console.error("Error creating new scene:",Pe)}finally{Ft.value=!1,Se!=null&&Se.id&&r({id:String(Se==null?void 0:Se.id),message:`${le} created successfully`,actions:[{label:"View",variant:"secondary",action:()=>{lt(String(Se==null?void 0:Se.id))}},{label:"Scene Hub",variant:"primary",action:()=>{const Pe=fo({type:"scene_hub",config:{ws_code:u.workspaceId,baseDomain:sessionStorage.getItem("URL_BASE")||"app.arbocollab.com",scene_id:String(Se==null?void 0:Se.id)}}).url;window.open(Pe,"_blank")},btnIcon:"CustomSceneHub"}],icon:Wde,type:"interactive"}),(nt=Ae.value)==null||nt.hide()}}},xt=le=>le.metric_type.code==="number"?"number":"default",Mt=async()=>{if(u.entityId)try{const le=await G(u.entityId);b.value=le.data.map(Se=>({...Se,sortType:xt(Se)}))}catch(le){console.error("Failed to initialize metric list:",le),b.value=[]}},Bt=async()=>{if(E.value)try{const le=await E.value.getUserPermission(u.workspaceId);i(le)}catch(le){console.error("Failed to fetch user permissions:",le)}},Dn=async()=>{if(E.value)try{const le=await E.value.getEntityDetail(u.workspaceId,u.entityId);o(le.permission),a.value=le}catch(le){console.error("Failed to fetch entity details:",le)}},sn=F1(),{setUser:Kn}=sn,Jn=async()=>{if(E.value)try{const le=await E.value.getMe();return Kn(le),le}catch(le){console.error("Failed to fetch user details:",le)}},ye=async()=>{var le;if(E.value)try{const Se=await E.value.getWorkspaces(u.workspaceId),nt=(le=Se.data[0])==null?void 0:le.ws_user_role_id;return nt&&sn.setUserRoleId(nt),Se}catch(Se){console.error("Failed to fetch workspace details:",Se)}};ut(()=>[u.entityId,u.workspaceId],async([le,Se])=>{!le||!Se||(Jn(),ye(),Mt(),Bt(),Dn())},{immediate:!0,deep:!0}),ut(H,(le,Se)=>{const nt=le.filter(Pe=>!(Se!=null&&Se.includes(Pe)));nt.length>0&&$(Array.from(C.value),nt).then(Pe=>{D(Pe,C.value,nt)})},{immediate:!0,deep:!0}),ut(S,(le,Se)=>{F.value=!!(Se&&le&&Se!==le)}),t({refreshTable:Ve});const Re=le=>{Je.value=le,Ve()};return(le,Se)=>(K(),Xe(U(yK),{"is-sidebar-open":m.value,onCloseSidebar:U(He),onSidebarClear:U(He),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:U(He)},{"header-left":Ee(()=>[we("h1",{class:z(le.$style.tableTitle)},"Scenes",2),we("div",{class:z(le.$style["beta-tag"])},"Beta",2),ve(U(tw),{variant:["primary"],options:c.value,onSelect:Te,onHandleClick:Se[1]||(Se[1]=nt=>Te("new_scene")),id:"create_scene_dropdown"},{prefix:Ee(()=>[ve(U(pt),{id:"create_new_scene",variant:["primary"],onClick:Se[0]||(Se[0]=nt=>Te("new_scene")),label:"New"})]),_:1},8,["options"]),we("span",null,bt(Ne.value),1)]),"header-actions":Ee(()=>[ve(U(F7),{"onUpdate:assignees":Re}),ve(U(qC),{modelValue:y.value,"onUpdate:modelValue":Se[2]||(Se[2]=nt=>y.value=nt),onSearch:U(At),class:z(le.$style.itemSearchBox),onClear:Se[3]||(Se[3]=nt=>U(At)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),ve(U(GP),{status:U(Ft)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":F.value},{default:Ee(()=>[ve(U(pt),{variant:"secondary",disabled:U(Ft),onClick:Ve},{prefix:Ee(()=>[ve(U(mt),{src:"ArrowsRotate"})]),default:Ee(()=>[Se[4]||(Se[4]=dt(" Refresh ",-1))]),_:1},8,["disabled"])]),_:1},8,["status","show-badge"]),ve(U(y7),{"model-value":U(x),"onUpdate:modelValue":U(O),checkboxColumn:U(k),id:"table_customization"},null,8,["model-value","onUpdate:modelValue","checkboxColumn"])]),grid:Ee(({availableHeight:nt})=>[ve(U(Qce),_n({id:"item_table_main",ref:"agGrid"},N.value,{height:nt+"px",isSorting:U(Me),onOnGridReady:We,onSelectionChanged:at}),null,16,["height","isSorting"])]),footer:Ee(()=>[we("div",{class:z(le.$style.tableFooter),id:"table_footer"},[we("span",null,[Se[5]||(Se[5]=dt(" Showing ",-1)),we("b",null,bt(U(g).loaded)+" of "+bt(U(g).total),1)])],2)]),"new-row":Ee(()=>[ve(U(E7),{onCreateNewItem:ht,ref_key:"createNewSceneRef",ref:Ae},null,512)]),"bulk-update-actions":Ee(()=>{var nt;return[!m.value&&h.value.length>0?(K(),Xe(U(sK),{key:0,selectRowData:((nt=d.value)==null?void 0:nt.getSelectedRows())||[],"workspace-id":u.workspaceId,"entity-id":u.entityId,"grid-api":d.value,onUnselect:U(tn),"take-name":ue.value,"selected-all":ce.value},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","take-name","selected-all"])):it("",!0)]}),snackbar:Ee(()=>[ve(U(kK))]),popup:Ee(()=>[ve(A7,{ref_key:"popupCreateSceneRef",ref:fe,"workspace-id":u.workspaceId,"entity-id":u.entityId,onImportSuccess:Ve},null,8,["workspace-id","entity-id"]),ve($de,{ref_key:"popupOverwriteScenesRef",ref:ke,"workspace-id":u.workspaceId,"entity-id":u.entityId,onImportSuccess:Ve},null,8,["workspace-id","entity-id"])]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1lefh_1",tableFooter:"_tableFooter_1lefh_7",footerStart:"_footerStart_1lefh_17",newRow:"_newRow_1lefh_25","warning-text":"_warning-text_1lefh_44","has-error":"_has-error_1lefh_49",itemSearchBox:"_itemSearchBox_1lefh_53","beta-tag":"_beta-tag_1lefh_57"}}]]),WM="0.0.48",zde={key:0},jde=Ct(ct({__name:"app",setup(e){const t=q(()=>n.id.length===0||n.workspaceId.length===0),n=Mo({id:"",workspaceId:"",apiConfig:{}}),i=Rd(),{showMessage:o}=i,s=c=>{var u,d;c.success?o(c.apiCode,"success"):o(((d=(u=c.res)==null?void 0:u.data)==null?void 0:d.message)||c.apiCode,"error")},r=Y(null);fv(()=>{var c,u,d;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",WM);try{if(r.value=Di(),!r.value)throw new Error("Current instance is null");n.id=((c=r.value)==null?void 0:c.appContext.config.globalProperties.id)||"",n.workspaceId=((u=r.value)==null?void 0:u.appContext.config.globalProperties.workspaceId)||sessionStorage.getItem("ws.code")||"";const h={domainApi:"https://api.dev.arbocollab.com/api",wsCode:sessionStorage.getItem("ws.code")||"w:yngazem",entityId:n.id};n.apiConfig=((d=r.value)==null?void 0:d.appContext.config.globalProperties.apiConfig)||{};const f=new $M(n.apiConfig,h);f.on("call-api",s),r.value.appContext.config.globalProperties.apiServices=f}catch(h){console.error("Error getting current instance:",h)}}),qn(()=>{r.value.appContext.config.globalProperties.apiServices.off("call-api",s)});const a=q(()=>n.id),l=q(()=>n.workspaceId);return Ta("workspaceId",l),Ta("entityId",a),(c,u)=>(K(),Ce("div",{class:z(c.$style.dashboardPluginWrapper)},[t.value?(K(),Ce("span",zde," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):a.value?(K(),Xe(U(Ude),{key:1,entityId:a.value,workspaceId:l.value},null,8,["entityId","workspaceId"])):it("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),GS=async(e={},t={})=>{const n=LR(jde),i=F8();n.use(i);const o=["apiConfig","workspaceId","id"],s={};return Object.entries(e).forEach(([r,a])=>{a!==void 0&&(n.config.globalProperties[r]=a,s[r]=a,o.includes(r)&&typeof a=="string"?sessionStorage.setItem(r,a):console.error(`[Config Error] Key "${r}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=s,Object.values(t).forEach(r=>{r&&typeof r.install=="function"&&n.use(r)}),n.config.errorHandler=(r,a,l)=>{console.error("[Vue Error]",r),l&&console.error("[Info]",l)},console.log(`%cArbo Dashboard Plugin v${WM}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),n.provide("switchInstance",n.config.globalProperties.$switchInstance),n};typeof window<"u"&&(window.arboDashboard=GS),cn.default=GS,cn.initDashboard=GS,Object.defineProperties(cn,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});