@arbocollab/arbo-plugin-item-table 0.0.1-alpha.10

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.
@@ -0,0 +1,173 @@
1
+ (function(tn,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(tn=typeof globalThis<"u"?globalThis:tn||self,A(tn.arboDashBoard={}))})(this,function(tn){"use strict";var hue=Object.defineProperty;var fue=(tn,A,hi)=>A in tn?hue(tn,A,{enumerable:!0,configurable:!0,writable:!0,value:hi}):tn[A]=hi;var ln=(tn,A,hi)=>fue(tn,typeof A!="symbol"?A+"":A,hi);var Dk,Fk;var A={env:{}};/**
2
+ * @vue/shared v3.5.25
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/function hi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ot=A.env.NODE_ENV!=="production"?Object.freeze({}):{},Ua=A.env.NODE_ENV!=="production"?Object.freeze([]):[],Tn=()=>{},bb=()=>!1,Su=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Vd=e=>e.startsWith("onUpdate:"),nn=Object.assign,Cg=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},sO=Object.prototype.hasOwnProperty,Lt=(e,t)=>sO.call(e,t),rt=Array.isArray,Lr=e=>Bd(e)==="[object Map]",Sb=e=>Bd(e)==="[object Set]",ft=e=>typeof e=="function",Jt=e=>typeof e=="string",ho=e=>typeof e=="symbol",Bt=e=>e!==null&&typeof e=="object",yg=e=>(Bt(e)||ft(e))&&ft(e.then)&&ft(e.catch),Eb=Object.prototype.toString,Bd=e=>Eb.call(e),wg=e=>Bd(e).slice(8,-1),Rb=e=>Bd(e)==="[object Object]",Hd=e=>Jt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Eu=hi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),oO=hi("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Gd=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},rO=/-\w/g,zn=Gd(e=>e.replace(rO,t=>t.slice(1).toUpperCase())),aO=/\B([A-Z])/g,xs=Gd(e=>e.replace(aO,"-$1").toLowerCase()),Nr=Gd(e=>e.charAt(0).toUpperCase()+e.slice(1)),Vr=Gd(e=>e?`on${Nr(e)}`:""),fi=(e,t)=>!Object.is(e,t),ja=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},$d=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},bg=e=>{const t=parseFloat(e);return isNaN(t)?e:t},lO=e=>{const t=Jt(e)?Number(e):NaN;return isNaN(t)?e:t};let Db;const Ru=()=>Db||(Db=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function hn(e){if(rt(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],s=Jt(i)?hO(i):hn(i);if(s)for(const o in s)t[o]=s[o]}return t}else if(Jt(e)||Bt(e))return e}const uO=/;(?![^(]*\))/g,cO=/:([^]+)/,dO=/\/\*[^]*?\*\//g;function hO(e){const t={};return e.replace(dO,"").split(uO).forEach(n=>{if(n){const i=n.split(cO);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function z(e){let t="";if(Jt(e))t=e;else if(rt(e))for(let n=0;n<e.length;n++){const i=z(e[n]);i&&(t+=i+" ")}else if(Bt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Wd(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Jt(t)&&(e.class=z(t)),n&&(e.style=hn(n)),e}const fO="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",pO="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",gO="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",mO=hi(fO),vO=hi(pO),CO=hi(gO),yO=hi("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Fb(e){return!!e||e===""}const Tb=e=>!!(e&&e.__v_isRef===!0),yt=e=>Jt(e)?e:e==null?"":rt(e)||Bt(e)&&(e.toString===Eb||!ft(e.toString))?Tb(e)?yt(e.value):JSON.stringify(e,xb,2):String(e),xb=(e,t)=>Tb(t)?xb(e,t.value):Lr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,s],o)=>(n[Sg(i,o)+" =>"]=s,n),{})}:Sb(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Sg(n))}:ho(t)?Sg(t):Bt(t)&&!rt(t)&&!Rb(t)?String(t):t,Sg=(e,t="")=>{var n;return ho(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function wO(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:((typeof e!="number"||!Number.isFinite(e))&&A.env.NODE_ENV!=="production"&&console.warn("[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",e),String(e))}/**
6
+ * @vue/reactivity v3.5.25
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/function Ei(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let Un;class _b{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Un,!t&&Un&&(this.index=(Un.scopes||(Un.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=Un;try{return Un=this,t()}finally{Un=n}}else A.env.NODE_ENV!=="production"&&Ei("cannot run an inactive effect scope.")}on(){++this._on===1&&(this.prevScope=Un,Un=this)}off(){this._on>0&&--this._on===0&&(Un=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 s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Pb(e){return new _b(e)}function Ab(){return Un}function bO(e,t=!1){Un?Un.cleanups.push(e):A.env.NODE_ENV!=="production"&&!t&&Ei("onScopeDispose() is called when there is no active effect scope to be associated with.")}let zt;const Eg=new WeakSet;class Ib{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,Un&&Un.active&&Un.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Eg.has(this)&&(Eg.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ob(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Bb(this),Mb(this);const t=zt,n=as;zt=this,as=!0;try{return this.fn()}finally{A.env.NODE_ENV!=="production"&&zt!==this&&Ei("Active effect was not restored correctly - this is likely a Vue internal bug."),Lb(this),zt=t,as=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Tg(t);this.deps=this.depsTail=void 0,Bb(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Eg.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Fg(this)&&this.run()}get dirty(){return Fg(this)}}let kb=0,Du,Fu;function Ob(e,t=!1){if(e.flags|=8,t){e.next=Fu,Fu=e;return}e.next=Du,Du=e}function Rg(){kb++}function Dg(){if(--kb>0)return;if(Fu){let t=Fu;for(Fu=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Du;){let t=Du;for(Du=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 Mb(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Lb(e){let t,n=e.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),Tg(i),SO(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}e.deps=t,e.depsTail=n}function Fg(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Nb(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Nb(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Tu)||(e.globalVersion=Tu,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Fg(e))))return;e.flags|=2;const t=e.dep,n=zt,i=as;zt=e,as=!0;try{Mb(e);const s=e.fn(e._value);(t.version===0||fi(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{zt=n,as=i,Lb(e),e.flags&=-3}}function Tg(e,t=!1){const{dep:n,prevSub:i,nextSub:s}=e;if(i&&(i.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=i,e.nextSub=void 0),A.env.NODE_ENV!=="production"&&n.subsHead===e&&(n.subsHead=s),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)Tg(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function SO(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let as=!0;const Vb=[];function ls(){Vb.push(as),as=!1}function us(){const e=Vb.pop();as=e===void 0?!0:e}function Bb(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=zt;zt=void 0;try{t()}finally{zt=n}}}let Tu=0;class EO{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 zd{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,A.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!zt||!as||zt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==zt)n=this.activeLink=new EO(zt,this),zt.deps?(n.prevDep=zt.depsTail,zt.depsTail.nextDep=n,zt.depsTail=n):zt.deps=zt.depsTail=n,Hb(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=zt.depsTail,n.nextDep=void 0,zt.depsTail.nextDep=n,zt.depsTail=n,zt.deps===n&&(zt.deps=i)}return A.env.NODE_ENV!=="production"&&zt.onTrack&&zt.onTrack(nn({effect:zt},t)),n}trigger(t){this.version++,Tu++,this.notify(t)}notify(t){Rg();try{if(A.env.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(nn({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Dg()}}}function Hb(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)Hb(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),A.env.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const Ud=new WeakMap,Br=Symbol(A.env.NODE_ENV!=="production"?"Object iterate":""),xg=Symbol(A.env.NODE_ENV!=="production"?"Map keys iterate":""),xu=Symbol(A.env.NODE_ENV!=="production"?"Array iterate":"");function An(e,t,n){if(as&&zt){let i=Ud.get(e);i||Ud.set(e,i=new Map);let s=i.get(n);s||(i.set(n,s=new zd),s.map=i,s.key=n),A.env.NODE_ENV!=="production"?s.track({target:e,type:t,key:n}):s.track()}}function _s(e,t,n,i,s,o){const r=Ud.get(e);if(!r){Tu++;return}const a=l=>{l&&(A.env.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:i,oldValue:s,oldTarget:o}):l.trigger())};if(Rg(),t==="clear")r.forEach(a);else{const l=rt(e),u=l&&Hd(n);if(l&&n==="length"){const c=Number(i);r.forEach((d,h)=>{(h==="length"||h===xu||!ho(h)&&h>=c)&&a(d)})}else switch((n!==void 0||r.has(void 0))&&a(r.get(n)),u&&a(r.get(xu)),t){case"add":l?u&&a(r.get("length")):(a(r.get(Br)),Lr(e)&&a(r.get(xg)));break;case"delete":l||(a(r.get(Br)),Lr(e)&&a(r.get(xg)));break;case"set":Lr(e)&&a(r.get(Br));break}}Dg()}function RO(e,t){const n=Ud.get(e);return n&&n.get(t)}function Ka(e){const t=mt(e);return t===e?t:(An(t,"iterate",xu),jn(e)?t:t.map(ds))}function jd(e){return An(e=mt(e),"iterate",xu),e}function Yo(e,t){return cs(e)?Hi(e)?Ya(ds(t)):Ya(t):ds(t)}const DO={__proto__:null,[Symbol.iterator](){return _g(this,Symbol.iterator,e=>Yo(this,e))},concat(...e){return Ka(this).concat(...e.map(t=>rt(t)?Ka(t):t))},entries(){return _g(this,"entries",e=>(e[1]=Yo(this,e[1]),e))},every(e,t){return fo(this,"every",e,t,void 0,arguments)},filter(e,t){return fo(this,"filter",e,t,n=>n.map(i=>Yo(this,i)),arguments)},find(e,t){return fo(this,"find",e,t,n=>Yo(this,n),arguments)},findIndex(e,t){return fo(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return fo(this,"findLast",e,t,n=>Yo(this,n),arguments)},findLastIndex(e,t){return fo(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return fo(this,"forEach",e,t,void 0,arguments)},includes(...e){return Pg(this,"includes",e)},indexOf(...e){return Pg(this,"indexOf",e)},join(e){return Ka(this).join(e)},lastIndexOf(...e){return Pg(this,"lastIndexOf",e)},map(e,t){return fo(this,"map",e,t,void 0,arguments)},pop(){return _u(this,"pop")},push(...e){return _u(this,"push",e)},reduce(e,...t){return Gb(this,"reduce",e,t)},reduceRight(e,...t){return Gb(this,"reduceRight",e,t)},shift(){return _u(this,"shift")},some(e,t){return fo(this,"some",e,t,void 0,arguments)},splice(...e){return _u(this,"splice",e)},toReversed(){return Ka(this).toReversed()},toSorted(e){return Ka(this).toSorted(e)},toSpliced(...e){return Ka(this).toSpliced(...e)},unshift(...e){return _u(this,"unshift",e)},values(){return _g(this,"values",e=>Yo(this,e))}};function _g(e,t,n){const i=jd(e),s=i[t]();return i!==e&&!jn(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const FO=Array.prototype;function fo(e,t,n,i,s,o){const r=jd(e),a=r!==e&&!jn(e),l=r[t];if(l!==FO[t]){const d=l.apply(e,o);return a?ds(d):d}let u=n;r!==e&&(a?u=function(d,h){return n.call(this,Yo(e,d),h,e)}:n.length>2&&(u=function(d,h){return n.call(this,d,h,e)}));const c=l.call(r,u,i);return a&&s?s(c):c}function Gb(e,t,n,i){const s=jd(e);let o=n;return s!==e&&(jn(e)?n.length>3&&(o=function(r,a,l){return n.call(this,r,a,l,e)}):o=function(r,a,l){return n.call(this,r,Yo(e,a),l,e)}),s[t](o,...i)}function Pg(e,t,n){const i=mt(e);An(i,"iterate",xu);const s=i[t](...n);return(s===-1||s===!1)&&qa(n[0])?(n[0]=mt(n[0]),i[t](...n)):s}function _u(e,t,n=[]){ls(),Rg();const i=mt(e)[t].apply(e,n);return Dg(),us(),i}const TO=hi("__proto__,__v_isRef,__isVue"),$b=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ho));function xO(e){ho(e)||(e=String(e));const t=mt(this);return An(t,"has",e),t.hasOwnProperty(e)}class Wb{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return i===(s?o?Zb:Yb:o?qb:Kb).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const r=rt(t);if(!s){let l;if(r&&(l=DO[n]))return l;if(n==="hasOwnProperty")return xO}const a=Reflect.get(t,n,Ht(t)?t:i);if((ho(n)?$b.has(n):TO(n))||(s||An(t,"get",n),o))return a;if(Ht(a)){const l=r&&Hd(n)?a:a.value;return s&&Bt(l)?Ig(l):l}return Bt(a)?s?Ig(a):Ps(a):a}}class zb extends Wb{constructor(t=!1){super(!1,t)}set(t,n,i,s){let o=t[n];const r=rt(t)&&Hd(n);if(!this._isShallow){const u=cs(o);if(!jn(i)&&!cs(i)&&(o=mt(o),i=mt(i)),!r&&Ht(o)&&!Ht(i))return u?(A.env.NODE_ENV!=="production"&&Ei(`Set operation on key "${String(n)}" failed: target is readonly.`,t[n]),!0):(o.value=i,!0)}const a=r?Number(n)<t.length:Lt(t,n),l=Reflect.set(t,n,i,Ht(t)?t:s);return t===mt(s)&&(a?fi(i,o)&&_s(t,"set",n,i,o):_s(t,"add",n,i)),l}deleteProperty(t,n){const i=Lt(t,n),s=t[n],o=Reflect.deleteProperty(t,n);return o&&i&&_s(t,"delete",n,void 0,s),o}has(t,n){const i=Reflect.has(t,n);return(!ho(n)||!$b.has(n))&&An(t,"has",n),i}ownKeys(t){return An(t,"iterate",rt(t)?"length":Br),Reflect.ownKeys(t)}}class Ub extends Wb{constructor(t=!1){super(!0,t)}set(t,n){return A.env.NODE_ENV!=="production"&&Ei(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return A.env.NODE_ENV!=="production"&&Ei(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const _O=new zb,PO=new Ub,AO=new zb(!0),IO=new Ub(!0),Ag=e=>e,Kd=e=>Reflect.getPrototypeOf(e);function kO(e,t,n){return function(...i){const s=this.__v_raw,o=mt(s),r=Lr(o),a=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,u=s[e](...i),c=n?Ag:t?Ya:ds;return!t&&An(o,"iterate",l?xg:Br),{next(){const{value:d,done:h}=u.next();return h?{value:d,done:h}:{value:a?[c(d[0]),c(d[1])]:c(d),done:h}},[Symbol.iterator](){return this}}}}function qd(e){return function(...t){if(A.env.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";Ei(`${Nr(e)} operation ${n}failed: target is readonly.`,mt(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function OO(e,t){const n={get(s){const o=this.__v_raw,r=mt(o),a=mt(s);e||(fi(s,a)&&An(r,"get",s),An(r,"get",a));const{has:l}=Kd(r),u=t?Ag:e?Ya:ds;if(l.call(r,s))return u(o.get(s));if(l.call(r,a))return u(o.get(a));o!==r&&o.get(s)},get size(){const s=this.__v_raw;return!e&&An(mt(s),"iterate",Br),s.size},has(s){const o=this.__v_raw,r=mt(o),a=mt(s);return e||(fi(s,a)&&An(r,"has",s),An(r,"has",a)),s===a?o.has(s):o.has(s)||o.has(a)},forEach(s,o){const r=this,a=r.__v_raw,l=mt(a),u=t?Ag:e?Ya:ds;return!e&&An(l,"iterate",Br),a.forEach((c,d)=>s.call(o,u(c),u(d),r))}};return nn(n,e?{add:qd("add"),set:qd("set"),delete:qd("delete"),clear:qd("clear")}:{add(s){!t&&!jn(s)&&!cs(s)&&(s=mt(s));const o=mt(this);return Kd(o).has.call(o,s)||(o.add(s),_s(o,"add",s,s)),this},set(s,o){!t&&!jn(o)&&!cs(o)&&(o=mt(o));const r=mt(this),{has:a,get:l}=Kd(r);let u=a.call(r,s);u?A.env.NODE_ENV!=="production"&&jb(r,a,s):(s=mt(s),u=a.call(r,s));const c=l.call(r,s);return r.set(s,o),u?fi(o,c)&&_s(r,"set",s,o,c):_s(r,"add",s,o),this},delete(s){const o=mt(this),{has:r,get:a}=Kd(o);let l=r.call(o,s);l?A.env.NODE_ENV!=="production"&&jb(o,r,s):(s=mt(s),l=r.call(o,s));const u=a?a.call(o,s):void 0,c=o.delete(s);return l&&_s(o,"delete",s,void 0,u),c},clear(){const s=mt(this),o=s.size!==0,r=A.env.NODE_ENV!=="production"?Lr(s)?new Map(s):new Set(s):void 0,a=s.clear();return o&&_s(s,"clear",void 0,void 0,r),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=kO(s,e,t)}),n}function Yd(e,t){const n=OO(e,t);return(i,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?i:Reflect.get(Lt(n,s)&&s in i?n:i,s,o)}const MO={get:Yd(!1,!1)},LO={get:Yd(!1,!0)},NO={get:Yd(!0,!1)},VO={get:Yd(!0,!0)};function jb(e,t,n){const i=mt(n);if(i!==n&&t.call(e,i)){const s=wg(e);Ei(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="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 Kb=new WeakMap,qb=new WeakMap,Yb=new WeakMap,Zb=new WeakMap;function BO(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function HO(e){return e.__v_skip||!Object.isExtensible(e)?0:BO(wg(e))}function Ps(e){return cs(e)?e:Zd(e,!1,_O,MO,Kb)}function GO(e){return Zd(e,!1,AO,LO,qb)}function Ig(e){return Zd(e,!0,PO,NO,Yb)}function As(e){return Zd(e,!0,IO,VO,Zb)}function Zd(e,t,n,i,s){if(!Bt(e))return A.env.NODE_ENV!=="production"&&Ei(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=HO(e);if(o===0)return e;const r=s.get(e);if(r)return r;const a=new Proxy(e,o===2?i:n);return s.set(e,a),a}function Hi(e){return cs(e)?Hi(e.__v_raw):!!(e&&e.__v_isReactive)}function cs(e){return!!(e&&e.__v_isReadonly)}function jn(e){return!!(e&&e.__v_isShallow)}function qa(e){return e?!!e.__v_raw:!1}function mt(e){const t=e&&e.__v_raw;return t?mt(t):e}function Zo(e){return!Lt(e,"__v_skip")&&Object.isExtensible(e)&&$d(e,"__v_skip",!0),e}const ds=e=>Bt(e)?Ps(e):e,Ya=e=>Bt(e)?Ig(e):e;function Ht(e){return e?e.__v_isRef===!0:!1}function oe(e){return Jb(e,!1)}function $O(e){return Jb(e,!0)}function Jb(e,t){return Ht(e)?e:new WO(e,t)}class WO{constructor(t,n){this.dep=new zd,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:mt(t),this._value=n?t:ds(t),this.__v_isShallow=n}get value(){return A.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||jn(t)||cs(t);t=i?t:mt(t),fi(t,n)&&(this._rawValue=t,this._value=i?t:ds(t),A.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function Z(e){return Ht(e)?e.value:e}function Hr(e){return ft(e)?e():Z(e)}const zO={get:(e,t,n)=>t==="__v_raw"?e:Z(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const s=e[t];return Ht(s)&&!Ht(n)?(s.value=n,!0):Reflect.set(e,t,n,i)}};function Xb(e){return Hi(e)?e:new Proxy(e,zO)}class UO{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new zd,{get:i,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function jO(e){return new UO(e)}function kg(e){A.env.NODE_ENV!=="production"&&!qa(e)&&Ei("toRefs() expects a reactive object but received a plain one.");const t=rt(e)?new Array(e.length):{};for(const n in e)t[n]=Qb(e,n);return t}class KO{constructor(t,n,i){this._object=t,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._raw=mt(t);let s=!0,o=t;if(!rt(t)||!Hd(String(n)))do s=!qa(o)||jn(o);while(s&&(o=o.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=Z(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ht(this._raw[this._key])){const n=this._object[this._key];if(Ht(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return RO(this._raw,this._key)}}class qO{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 po(e,t,n){return Ht(e)?e:ft(e)?new qO(e):Bt(e)&&arguments.length>1?Qb(e,t,n):oe(e)}function Qb(e,t,n){return new KO(e,t,n)}class YO{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new zd(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Tu-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&zt!==this)return Ob(this,!0),!0;A.env.NODE_ENV}get value(){const t=A.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Nb(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):A.env.NODE_ENV!=="production"&&Ei("Write operation failed: computed value is readonly")}}function ZO(e,t,n=!1){let i,s;ft(e)?i=e:(i=e.get,s=e.set);const o=new YO(i,s,n);return A.env.NODE_ENV,o}const Jd={},Xd=new WeakMap;let Gr;function JO(e,t=!1,n=Gr){if(n){let i=Xd.get(n);i||Xd.set(n,i=[]),i.push(e)}else A.env.NODE_ENV!=="production"&&!t&&Ei("onWatcherCleanup() was called when there was no active watcher to associate with.")}function XO(e,t,n=Ot){const{immediate:i,deep:s,once:o,scheduler:r,augmentJob:a,call:l}=n,u=b=>{(n.onWarn||Ei)("Invalid watch source: ",b,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=b=>s?b:jn(b)||s===!1||s===0?go(b,1):go(b);let d,h,p,g,C=!1,v=!1;if(Ht(e)?(h=()=>e.value,C=jn(e)):Hi(e)?(h=()=>c(e),C=!0):rt(e)?(v=!0,C=e.some(b=>Hi(b)||jn(b)),h=()=>e.map(b=>{if(Ht(b))return b.value;if(Hi(b))return c(b);if(ft(b))return l?l(b,2):b();A.env.NODE_ENV!=="production"&&u(b)})):ft(e)?t?h=l?()=>l(e,2):e:h=()=>{if(p){ls();try{p()}finally{us()}}const b=Gr;Gr=d;try{return l?l(e,3,[g]):e(g)}finally{Gr=b}}:(h=Tn,A.env.NODE_ENV!=="production"&&u(e)),t&&s){const b=h,F=s===!0?1/0:s;h=()=>go(b(),F)}const S=Ab(),R=()=>{d.stop(),S&&S.active&&Cg(S.effects,d)};if(o&&t){const b=t;t=(...F)=>{b(...F),R()}}let E=v?new Array(e.length).fill(Jd):Jd;const y=b=>{if(!(!(d.flags&1)||!d.dirty&&!b))if(t){const F=d.run();if(s||C||(v?F.some((x,V)=>fi(x,E[V])):fi(F,E))){p&&p();const x=Gr;Gr=d;try{const V=[F,E===Jd?void 0:v&&E[0]===Jd?[]:E,g];E=F,l?l(t,3,V):t(...V)}finally{Gr=x}}}else d.run()};return a&&a(y),d=new Ib(h),d.scheduler=r?()=>r(y,!1):y,g=b=>JO(b,!1,d),p=d.onStop=()=>{const b=Xd.get(d);if(b){if(l)l(b,4);else for(const F of b)F();Xd.delete(d)}},A.env.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?i?y(!0):E=d.run():r?r(y.bind(null,!0),!0):d.run(),R.pause=d.pause.bind(d),R.resume=d.resume.bind(d),R.stop=R,R}function go(e,t=1/0,n){if(t<=0||!Bt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ht(e))go(e.value,t,n);else if(rt(e))for(let i=0;i<e.length;i++)go(e[i],t,n);else if(Sb(e)||Lr(e))e.forEach(i=>{go(i,t,n)});else if(Rb(e)){for(const i in e)go(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&go(e[i],t,n)}return e}/**
10
+ * @vue/runtime-core v3.5.25
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/const $r=[];function Qd(e){$r.push(e)}function eh(){$r.pop()}let Og=!1;function Oe(e,...t){if(Og)return;Og=!0,ls();const n=$r.length?$r[$r.length-1].component:null,i=n&&n.appContext.config.warnHandler,s=QO();if(i)Za(i,n,11,[e+t.map(o=>{var r,a;return(a=(r=o.toString)==null?void 0:r.call(o))!=null?a:JSON.stringify(o)}).join(""),n&&n.proxy,s.map(({vnode:o})=>`at <${ju(n,o.type)}>`).join(`
14
+ `),s]);else{const o=[`[Vue warn]: ${e}`,...t];s.length&&o.push(`
15
+ `,...eM(s)),console.warn(...o)}us(),Og=!1}function QO(){let e=$r[$r.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const i=e.component&&e.component.parent;e=i&&i.vnode}return t}function eM(e){const t=[];return e.forEach((n,i)=>{t.push(...i===0?[]:[`
16
+ `],...tM(n))}),t}function tM({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",i=e.component?e.component.parent==null:!1,s=` at <${ju(e.component,e.type,i)}`,o=">"+n;return e.props?[s,...nM(e.props),o]:[s+o]}function nM(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(i=>{t.push(...eS(i,e[i]))}),n.length>3&&t.push(" ..."),t}function eS(e,t,n){return Jt(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Ht(t)?(t=eS(e,mt(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):ft(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=mt(t),n?t:[`${e}=`,t])}function iM(e,t){A.env.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?Oe(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&Oe(`${t} is NaN - the duration expression might be incorrect.`))}const Mg={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Za(e,t,n,i){try{return i?e(...i):e()}catch(s){Pu(s,t,n)}}function hs(e,t,n,i){if(ft(e)){const s=Za(e,t,n,i);return s&&yg(s)&&s.catch(o=>{Pu(o,t,n)}),s}if(rt(e)){const s=[];for(let o=0;o<e.length;o++)s.push(hs(e[o],t,n,i));return s}else A.env.NODE_ENV!=="production"&&Oe(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function Pu(e,t,n,i=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||Ot;if(t){let a=t.parent;const l=t.proxy,u=A.env.NODE_ENV!=="production"?Mg[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(o){ls(),Za(o,null,10,[e,l,u]),us();return}}sM(e,n,s,i,r)}function sM(e,t,n,i=!0,s=!1){if(A.env.NODE_ENV!=="production"){const o=Mg[t];if(n&&Qd(n),Oe(`Unhandled error${o?` during execution of ${o}`:""}`),n&&eh(),i)throw e;console.error(e)}else{if(s)throw e;console.error(e)}}const oi=[];let Is=-1;const Ja=[];let Jo=null,Xa=0;const tS=Promise.resolve();let th=null;const oM=100;function In(e){const t=th||tS;return e?t.then(this?e.bind(this):e):t}function rM(e){let t=Is+1,n=oi.length;for(;t<n;){const i=t+n>>>1,s=oi[i],o=Au(s);o<e||o===e&&s.flags&2?t=i+1:n=i}return t}function nh(e){if(!(e.flags&1)){const t=Au(e),n=oi[oi.length-1];!n||!(e.flags&2)&&t>=Au(n)?oi.push(e):oi.splice(rM(t),0,e),e.flags|=1,nS()}}function nS(){th||(th=tS.then(oS))}function Lg(e){rt(e)?Ja.push(...e):Jo&&e.id===-1?Jo.splice(Xa+1,0,e):e.flags&1||(Ja.push(e),e.flags|=1),nS()}function iS(e,t,n=Is+1){for(A.env.NODE_ENV!=="production"&&(t=t||new Map);n<oi.length;n++){const i=oi[n];if(i&&i.flags&2){if(e&&i.id!==e.uid||A.env.NODE_ENV!=="production"&&Ng(t,i))continue;oi.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function sS(e){if(Ja.length){const t=[...new Set(Ja)].sort((n,i)=>Au(n)-Au(i));if(Ja.length=0,Jo){Jo.push(...t);return}for(Jo=t,A.env.NODE_ENV!=="production"&&(e=e||new Map),Xa=0;Xa<Jo.length;Xa++){const n=Jo[Xa];A.env.NODE_ENV!=="production"&&Ng(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Jo=null,Xa=0}}const Au=e=>e.id==null?e.flags&2?-1:1/0:e.id;function oS(e){A.env.NODE_ENV!=="production"&&(e=e||new Map);const t=A.env.NODE_ENV!=="production"?n=>Ng(e,n):Tn;try{for(Is=0;Is<oi.length;Is++){const n=oi[Is];if(n&&!(n.flags&8)){if(A.env.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Za(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;Is<oi.length;Is++){const n=oi[Is];n&&(n.flags&=-2)}Is=-1,oi.length=0,sS(e),th=null,(oi.length||Ja.length)&&oS(e)}}function Ng(e,t){const n=e.get(t)||0;if(n>oM){const i=t.i,s=i&&cm(i.type);return Pu(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,n+1),!1}let ks=!1;const ih=new Map;A.env.NODE_ENV!=="production"&&(Ru().__VUE_HMR_RUNTIME__={createRecord:Vg(rS),rerender:Vg(uM),reload:Vg(cM)});const Wr=new Map;function aM(e){const t=e.type.__hmrId;let n=Wr.get(t);n||(rS(t,e.type),n=Wr.get(t)),n.instances.add(e)}function lM(e){Wr.get(e.type.__hmrId).instances.delete(e)}function rS(e,t){return Wr.has(e)?!1:(Wr.set(e,{initialDef:sh(t),instances:new Set}),!0)}function sh(e){return d0(e)?e.__vccOpts:e}function uM(e,t){const n=Wr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(i=>{t&&(i.render=t,sh(i.type).render=t),i.renderCache=[],ks=!0,i.job.flags&8||i.update(),ks=!1}))}function cM(e,t){const n=Wr.get(e);if(!n)return;t=sh(t),aS(n.initialDef,t);const i=[...n.instances];for(let s=0;s<i.length;s++){const o=i[s],r=sh(o.type);let a=ih.get(r);a||(r!==n.initialDef&&aS(r,t),ih.set(r,a=new Set)),a.add(o),o.appContext.propsCache.delete(o.type),o.appContext.emitsCache.delete(o.type),o.appContext.optionsCache.delete(o.type),o.ceReload?(a.add(o),o.ceReload(t.styles),a.delete(o)):o.parent?nh(()=>{o.job.flags&8||(ks=!0,o.parent.update(),ks=!1,a.delete(o))}):o.appContext.reload?o.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),o.root.ce&&o!==o.root&&o.root.ce._removeChildStyle(r)}Lg(()=>{ih.clear()})}function aS(e,t){nn(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Vg(e){return(t,n)=>{try{return e(t,n)}catch(i){console.error(i),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let fs,Iu=[],Bg=!1;function ku(e,...t){fs?fs.emit(e,...t):Bg||Iu.push({event:e,args:t})}function Hg(e,t){var n,i;fs=e,fs?(fs.enabled=!0,Iu.forEach(({event:s,args:o})=>fs.emit(s,...o)),Iu=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{Hg(o,t)}),setTimeout(()=>{fs||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Bg=!0,Iu=[])},3e3)):(Bg=!0,Iu=[])}function dM(e,t){ku("app:init",e,t,{Fragment:At,Text:nl,Comment:ai,Static:Bu})}function hM(e){ku("app:unmount",e)}const fM=Gg("component:added"),lS=Gg("component:updated"),pM=Gg("component:removed"),gM=e=>{fs&&typeof fs.cleanupBuffer=="function"&&!fs.cleanupBuffer(e)&&pM(e)};function Gg(e){return t=>{ku(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const mM=uS("perf:start"),vM=uS("perf:end");function uS(e){return(t,n,i)=>{ku(e,t.appContext.app,t.uid,t,n,i)}}function CM(e,t,n){ku("component:emit",e.appContext.app,e,t,n)}let xn=null,cS=null;function oh(e){const t=xn;return xn=e,cS=e&&e.type.__scopeId||null,t}function De(e,t=xn,n){if(!t||e._n)return e;const i=(...s)=>{i._d&&e0(-1);const o=oh(t);let r;try{r=e(...s)}finally{oh(o),i._d&&e0(1)}return A.env.NODE_ENV!=="production"&&lS(t),r};return i._n=!0,i._c=!0,i._d=!0,i}function dS(e){oO(e)&&Oe("Do not use built-in directive ids as custom directive id: "+e)}function ut(e,t){if(xn===null)return A.env.NODE_ENV!=="production"&&Oe("withDirectives can only be used inside render functions."),e;const n=Ch(xn),i=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[o,r,a,l=Ot]=t[s];o&&(ft(o)&&(o={mounted:o,updated:o}),o.deep&&go(r),i.push({dir:o,instance:n,value:r,oldValue:void 0,arg:a,modifiers:l}))}return e}function zr(e,t,n,i){const s=e.dirs,o=t&&t.dirs;for(let r=0;r<s.length;r++){const a=s[r];o&&(a.oldValue=o[r].value);let l=a.dir[i];l&&(ls(),hs(l,n,8,[e.el,a,e,t]),us())}}const yM=Symbol("_vte"),wM=e=>e.__isTeleport,Ur=Symbol("_leaveCb"),rh=Symbol("_enterCb");function bM(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Kn(()=>{e.isMounted=!0}),pi(()=>{e.isUnmounting=!0}),e}const Gi=[Function,Array],SM={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Gi,onEnter:Gi,onAfterEnter:Gi,onEnterCancelled:Gi,onBeforeLeave:Gi,onLeave:Gi,onAfterLeave:Gi,onLeaveCancelled:Gi,onBeforeAppear:Gi,onAppear:Gi,onAfterAppear:Gi,onAppearCancelled:Gi};function EM(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function $g(e,t,n,i,s){const{appear:o,mode:r,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:h,onLeave:p,onAfterLeave:g,onLeaveCancelled:C,onBeforeAppear:v,onAppear:S,onAfterAppear:R,onAppearCancelled:E}=t,y=String(e.key),b=EM(n,e),F=(I,M)=>{I&&hs(I,i,9,M)},x=(I,M)=>{const P=M[1];F(I,M),rt(I)?I.every(N=>N.length<=1)&&P():I.length<=1&&P()},V={mode:r,persisted:a,beforeEnter(I){let M=l;if(!n.isMounted)if(o)M=v||l;else return;I[Ur]&&I[Ur](!0);const P=b[y];P&&il(e,P)&&P.el[Ur]&&P.el[Ur](),F(M,[I])},enter(I){let M=u,P=c,N=d;if(!n.isMounted)if(o)M=S||u,P=R||c,N=E||d;else return;let ie=!1;const ve=I[rh]=Be=>{ie||(ie=!0,Be?F(N,[I]):F(P,[I]),V.delayedLeave&&V.delayedLeave(),I[rh]=void 0)};M?x(M,[I,ve]):ve()},leave(I,M){const P=String(e.key);if(I[rh]&&I[rh](!0),n.isUnmounting)return M();F(h,[I]);let N=!1;const ie=I[Ur]=ve=>{N||(N=!0,M(),ve?F(C,[I]):F(g,[I]),I[Ur]=void 0,b[P]===e&&delete b[P])};b[P]=e,p?x(p,[I,ie]):ie()},clone(I){return $g(I,t,n,i)}};return V}function Ou(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ou(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function hS(e,t=!1,n){let i=[],s=0;for(let o=0;o<e.length;o++){let r=e[o];const a=n==null?r.key:String(n)+String(r.key!=null?r.key:o);r.type===At?(r.patchFlag&128&&s++,i=i.concat(hS(r.children,t,a))):(t||r.type!==ai)&&i.push(a!=null?Co(r,{key:a}):r)}if(s>1)for(let o=0;o<i.length;o++)i[o].patchFlag=-2;return i}function ct(e,t){return ft(e)?nn({name:e.name},t,{setup:e}):e}function fS(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const pS=new WeakSet,ah=new WeakMap;function Mu(e,t,n,i,s=!1){if(rt(e)){e.forEach((C,v)=>Mu(C,t&&(rt(t)?t[v]:t),n,i,s));return}if(Qa(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Mu(e,t,n,i.component.subTree);return}const o=i.shapeFlag&4?Ch(i.component):i.el,r=s?null:o,{i:a,r:l}=e;if(A.env.NODE_ENV!=="production"&&!a){Oe("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const u=t&&t.r,c=a.refs===Ot?a.refs={}:a.refs,d=a.setupState,h=mt(d),p=d===Ot?bb:C=>A.env.NODE_ENV!=="production"&&(Lt(h,C)&&!Ht(h[C])&&Oe(`Template ref "${C}" used on a non-ref value. It will not work in the production build.`),pS.has(h[C]))?!1:Lt(h,C),g=C=>A.env.NODE_ENV==="production"||!pS.has(C);if(u!=null&&u!==l){if(gS(t),Jt(u))c[u]=null,p(u)&&(d[u]=null);else if(Ht(u)){g(u)&&(u.value=null);const C=t;C.k&&(c[C.k]=null)}}if(ft(l))Za(l,a,12,[r,c]);else{const C=Jt(l),v=Ht(l);if(C||v){const S=()=>{if(e.f){const R=C?p(l)?d[l]:c[l]:g(l)||!e.k?l.value:c[e.k];if(s)rt(R)&&Cg(R,o);else if(rt(R))R.includes(o)||R.push(o);else if(C)c[l]=[o],p(l)&&(d[l]=c[l]);else{const E=[o];g(l)&&(l.value=E),e.k&&(c[e.k]=E)}}else C?(c[l]=r,p(l)&&(d[l]=r)):v?(g(l)&&(l.value=r),e.k&&(c[e.k]=r)):A.env.NODE_ENV!=="production"&&Oe("Invalid template ref type:",l,`(${typeof l})`)};if(r){const R=()=>{S(),ah.delete(e)};R.id=-1,ah.set(e,R),Di(R,n)}else gS(e),S()}else A.env.NODE_ENV!=="production"&&Oe("Invalid template ref type:",l,`(${typeof l})`)}}function gS(e){const t=ah.get(e);t&&(t.flags|=8,ah.delete(e))}Ru().requestIdleCallback,Ru().cancelIdleCallback;const Qa=e=>!!e.type.__asyncLoader,Wg=e=>e.type.__isKeepAlive;function RM(e,t){mS(e,"a",t)}function DM(e,t){mS(e,"da",t)}function mS(e,t,n=_n){const i=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(lh(t,i,n),n){let s=n.parent;for(;s&&s.parent;)Wg(s.parent.vnode)&&FM(i,t,n,s),s=s.parent}}function FM(e,t,n,i){const s=lh(t,e,i,!0);Lu(()=>{Cg(i[t],s)},n)}function lh(e,t,n=_n,i=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{ls();const a=zu(n),l=hs(t,n,e,r);return a(),us(),l});return i?s.unshift(o):s.push(o),o}else if(A.env.NODE_ENV!=="production"){const s=Vr(Mg[e].replace(/ hook$/,""));Oe(`${s} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const mo=e=>(t,n=_n)=>{(!Uu||e==="sp")&&lh(e,(...i)=>t(...i),n)},zg=mo("bm"),Kn=mo("m"),vS=mo("bu"),CS=mo("u"),pi=mo("bum"),Lu=mo("um"),TM=mo("sp"),xM=mo("rtg"),_M=mo("rtc");function PM(e,t=_n){lh("ec",e,t)}const uh="components",AM="directives";function Ug(e,t){return jg(uh,e,!0,t)||e}const yS=Symbol.for("v-ndc");function IM(e){return Jt(e)?jg(uh,e,!1)||e:e||yS}function wS(e){return jg(AM,e)}function jg(e,t,n=!0,i=!1){const s=xn||_n;if(s){const o=s.type;if(e===uh){const a=cm(o,!1);if(a&&(a===t||a===zn(t)||a===Nr(zn(t))))return o}const r=bS(s[e]||o[e],t)||bS(s.appContext[e],t);if(!r&&i)return o;if(A.env.NODE_ENV!=="production"&&n&&!r){const a=e===uh?`
17
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`:"";Oe(`Failed to resolve ${e.slice(0,-1)}: ${t}${a}`)}return r}else A.env.NODE_ENV!=="production"&&Oe(`resolve${Nr(e.slice(0,-1))} can only be used in render() or setup().`)}function bS(e,t){return e&&(e[t]||e[zn(t)]||e[Nr(zn(t))])}function yn(e,t,n,i){let s;const o=n,r=rt(e);if(r||Jt(e)){const a=r&&Hi(e);let l=!1,u=!1;a&&(l=!jn(e),u=cs(e),e=jd(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?Ya(ds(e[c])):ds(e[c]):e[c],c,void 0,o)}else if(typeof e=="number"){A.env.NODE_ENV!=="production"&&!Number.isInteger(e)&&Oe(`The v-for range expect an integer value but got ${e}.`),s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,o)}else if(Bt(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,o));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];s[l]=t(e[c],c,l,o)}}else s=[];return s}function SS(e,t){for(let n=0;n<t.length;n++){const i=t[n];if(rt(i))for(let s=0;s<i.length;s++)e[i[s].name]=i[s].fn;else i&&(e[i.name]=i.key?(...s)=>{const o=i.fn(...s);return o&&(o.key=i.key),o}:i.fn)}return e}function vt(e,t,n={},i,s){if(xn.ce||xn.parent&&Qa(xn.parent)&&xn.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),j(),Xe(At,null,[ye("slot",n,i&&i())],u?-2:64)}let o=e[t];A.env.NODE_ENV!=="production"&&o&&o.length>1&&(Oe("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),o=()=>[]),o&&o._c&&(o._d=!1),j();const r=o&&ES(o(n)),a=n.key||r&&r.key,l=Xe(At,{key:(a&&!ho(a)?a:`_${t}`)+(!r&&i?"_fb":"")},r||(i?i():[]),r&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function ES(e){return e.some(t=>$u(t)?!(t.type===ai||t.type===At&&!ES(t.children)):!0)?e:null}const Kg=e=>e?r0(e)?Ch(e):Kg(e.parent):null,jr=nn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>A.env.NODE_ENV!=="production"?As(e.props):e.props,$attrs:e=>A.env.NODE_ENV!=="production"?As(e.attrs):e.attrs,$slots:e=>A.env.NODE_ENV!=="production"?As(e.slots):e.slots,$refs:e=>A.env.NODE_ENV!=="production"?As(e.refs):e.refs,$parent:e=>Kg(e.parent),$root:e=>Kg(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>_S(e),$forceUpdate:e=>e.f||(e.f=()=>{nh(e.update)}),$nextTick:e=>e.n||(e.n=In.bind(e.proxy)),$watch:e=>qM.bind(e)}),qg=e=>e==="_"||e==="$",Yg=(e,t)=>e!==Ot&&!e.__isScriptSetup&&Lt(e,t),RS={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:s,props:o,accessCache:r,type:a,appContext:l}=e;if(A.env.NODE_ENV!=="production"&&t==="__isVue")return!0;if(t[0]!=="$"){const h=r[t];if(h!==void 0)switch(h){case 1:return i[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(Yg(i,t))return r[t]=1,i[t];if(s!==Ot&&Lt(s,t))return r[t]=2,s[t];if(Lt(o,t))return r[t]=3,o[t];if(n!==Ot&&Lt(n,t))return r[t]=4,n[t];Zg&&(r[t]=0)}}const u=jr[t];let c,d;if(u)return t==="$attrs"?(An(e.attrs,"get",""),A.env.NODE_ENV!=="production"&&fh()):A.env.NODE_ENV!=="production"&&t==="$slots"&&An(e,"get",t),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(n!==Ot&&Lt(n,t))return r[t]=4,n[t];if(d=l.config.globalProperties,Lt(d,t))return d[t];A.env.NODE_ENV!=="production"&&xn&&(!Jt(t)||t.indexOf("__v")!==0)&&(s!==Ot&&qg(t[0])&&Lt(s,t)?Oe(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===xn&&Oe(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:i,setupState:s,ctx:o}=e;return Yg(s,t)?(s[t]=n,!0):A.env.NODE_ENV!=="production"&&s.__isScriptSetup&&Lt(s,t)?(Oe(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):i!==Ot&&Lt(i,t)?(i[t]=n,!0):Lt(e.props,t)?(A.env.NODE_ENV!=="production"&&Oe(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(A.env.NODE_ENV!=="production"&&Oe(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(A.env.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(o,t,{enumerable:!0,configurable:!0,value:n}):o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:s,props:o,type:r}},a){let l;return!!(n[a]||e!==Ot&&a[0]!=="$"&&Lt(e,a)||Yg(t,a)||Lt(o,a)||Lt(i,a)||Lt(jr,a)||Lt(s.config.globalProperties,a)||(l=r.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Lt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};A.env.NODE_ENV!=="production"&&(RS.ownKeys=e=>(Oe("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function kM(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(jr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>jr[n](e),set:Tn})}),t}function OM(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(i=>{Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>e.props[i],set:Tn})})}function MM(e){const{ctx:t,setupState:n}=e;Object.keys(mt(n)).forEach(i=>{if(!n.__isScriptSetup){if(qg(i[0])){Oe(`setup() return property ${JSON.stringify(i)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>n[i],set:Tn})}})}function DS(){return LM("useSlots").slots}function LM(e){const t=Ti();return A.env.NODE_ENV!=="production"&&!t&&Oe(`${e}() called without active instance.`),t.setupContext||(t.setupContext=c0(t))}function ch(e){return rt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function FS(e,t){return!e||!t?e||t:rt(e)&&rt(t)?e.concat(t):nn({},ch(e),ch(t))}function NM(){const e=Object.create(null);return(t,n)=>{e[n]?Oe(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let Zg=!0;function VM(e){const t=_S(e),n=e.proxy,i=e.ctx;Zg=!1,t.beforeCreate&&TS(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:r,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:h,beforeUpdate:p,updated:g,activated:C,deactivated:v,beforeDestroy:S,beforeUnmount:R,destroyed:E,unmounted:y,render:b,renderTracked:F,renderTriggered:x,errorCaptured:V,serverPrefetch:I,expose:M,inheritAttrs:P,components:N,directives:ie,filters:ve}=t,Be=A.env.NODE_ENV!=="production"?NM():null;if(A.env.NODE_ENV!=="production"){const[U]=e.propsOptions;if(U)for(const L in U)Be("Props",L)}if(u&&BM(u,i,Be),r)for(const U in r){const L=r[U];ft(L)?(A.env.NODE_ENV!=="production"?Object.defineProperty(i,U,{value:L.bind(n),configurable:!0,enumerable:!0,writable:!0}):i[U]=L.bind(n),A.env.NODE_ENV!=="production"&&Be("Methods",U)):A.env.NODE_ENV!=="production"&&Oe(`Method "${U}" has type "${typeof L}" in the component definition. Did you reference the function correctly?`)}if(s){A.env.NODE_ENV!=="production"&&!ft(s)&&Oe("The data option must be a function. Plain object usage is no longer supported.");const U=s.call(n,n);if(A.env.NODE_ENV!=="production"&&yg(U)&&Oe("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Bt(U))A.env.NODE_ENV!=="production"&&Oe("data() should return an object.");else if(e.data=Ps(U),A.env.NODE_ENV!=="production")for(const L in U)Be("Data",L),qg(L[0])||Object.defineProperty(i,L,{configurable:!0,enumerable:!0,get:()=>U[L],set:Tn})}if(Zg=!0,o)for(const U in o){const L=o[U],$=ft(L)?L.bind(n,n):ft(L.get)?L.get.bind(n,n):Tn;A.env.NODE_ENV!=="production"&&$===Tn&&Oe(`Computed property "${U}" has no getter.`);const re=!ft(L)&&ft(L.set)?L.set.bind(n):A.env.NODE_ENV!=="production"?()=>{Oe(`Write operation failed: computed property "${U}" is readonly.`)}:Tn,Ae=G({get:$,set:re});Object.defineProperty(i,U,{enumerable:!0,configurable:!0,get:()=>Ae.value,set:Ie=>Ae.value=Ie}),A.env.NODE_ENV!=="production"&&Be("Computed",U)}if(a)for(const U in a)xS(a[U],i,n,U);if(l){const U=ft(l)?l.call(n):l;Reflect.ownKeys(U).forEach(L=>{qr(L,U[L])})}c&&TS(c,e,"c");function ee(U,L){rt(L)?L.forEach($=>U($.bind(n))):L&&U(L.bind(n))}if(ee(zg,d),ee(Kn,h),ee(vS,p),ee(CS,g),ee(RM,C),ee(DM,v),ee(PM,V),ee(_M,F),ee(xM,x),ee(pi,R),ee(Lu,y),ee(TM,I),rt(M))if(M.length){const U=e.exposed||(e.exposed={});M.forEach(L=>{Object.defineProperty(U,L,{get:()=>n[L],set:$=>n[L]=$,enumerable:!0})})}else e.exposed||(e.exposed={});b&&e.render===Tn&&(e.render=b),P!=null&&(e.inheritAttrs=P),N&&(e.components=N),ie&&(e.directives=ie),I&&fS(e)}function BM(e,t,n=Tn){rt(e)&&(e=Jg(e));for(const i in e){const s=e[i];let o;Bt(s)?"default"in s?o=Ri(s.from||i,s.default,!0):o=Ri(s.from||i):o=Ri(s),Ht(o)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[i]=o,A.env.NODE_ENV!=="production"&&n("Inject",i)}}function TS(e,t,n){hs(rt(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function xS(e,t,n,i){let s=i.includes(".")?kS(n,i):()=>n[i];if(Jt(e)){const o=t[e];ft(o)?wt(s,o):A.env.NODE_ENV!=="production"&&Oe(`Invalid watch handler specified by key "${e}"`,o)}else if(ft(e))wt(s,e.bind(n));else if(Bt(e))if(rt(e))e.forEach(o=>xS(o,t,n,i));else{const o=ft(e.handler)?e.handler.bind(n):t[e.handler];ft(o)?wt(s,o,e):A.env.NODE_ENV!=="production"&&Oe(`Invalid watch handler specified by key "${e.handler}"`,o)}else A.env.NODE_ENV!=="production"&&Oe(`Invalid watch option: "${i}"`,e)}function _S(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,a=o.get(t);let l;return a?l=a:!s.length&&!n&&!i?l=t:(l={},s.length&&s.forEach(u=>dh(l,u,r,!0)),dh(l,t,r)),Bt(t)&&o.set(t,l),l}function dh(e,t,n,i=!1){const{mixins:s,extends:o}=t;o&&dh(e,o,n,!0),s&&s.forEach(r=>dh(e,r,n,!0));for(const r in t)if(i&&r==="expose")A.env.NODE_ENV!=="production"&&Oe('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=HM[r]||n&&n[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const HM={data:PS,props:AS,emits:AS,methods:Nu,computed:Nu,beforeCreate:ri,created:ri,beforeMount:ri,mounted:ri,beforeUpdate:ri,updated:ri,beforeDestroy:ri,beforeUnmount:ri,destroyed:ri,unmounted:ri,activated:ri,deactivated:ri,errorCaptured:ri,serverPrefetch:ri,components:Nu,directives:Nu,watch:$M,provide:PS,inject:GM};function PS(e,t){return t?e?function(){return nn(ft(e)?e.call(this,this):e,ft(t)?t.call(this,this):t)}:t:e}function GM(e,t){return Nu(Jg(e),Jg(t))}function Jg(e){if(rt(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ri(e,t){return e?[...new Set([].concat(e,t))]:t}function Nu(e,t){return e?nn(Object.create(null),e,t):t}function AS(e,t){return e?rt(e)&&rt(t)?[...new Set([...e,...t])]:nn(Object.create(null),ch(e),ch(t??{})):t}function $M(e,t){if(!e)return t;if(!t)return e;const n=nn(Object.create(null),e);for(const i in t)n[i]=ri(e[i],t[i]);return n}function IS(){return{app:null,config:{isNativeTag:bb,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let WM=0;function zM(e,t){return function(i,s=null){ft(i)||(i=nn({},i)),s!=null&&!Bt(s)&&(A.env.NODE_ENV!=="production"&&Oe("root props passed to app.mount() must be an object."),s=null);const o=IS(),r=new WeakSet,a=[];let l=!1;const u=o.app={_uid:WM++,_component:i,_props:s,_container:null,_context:o,_instance:null,version:h0,get config(){return o.config},set config(c){A.env.NODE_ENV!=="production"&&Oe("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return r.has(c)?A.env.NODE_ENV!=="production"&&Oe("Plugin has already been applied to target app."):c&&ft(c.install)?(r.add(c),c.install(u,...d)):ft(c)?(r.add(c),c(u,...d)):A.env.NODE_ENV!=="production"&&Oe('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return o.mixins.includes(c)?A.env.NODE_ENV!=="production"&&Oe("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):o.mixins.push(c),u},component(c,d){return A.env.NODE_ENV!=="production"&&um(c,o.config),d?(A.env.NODE_ENV!=="production"&&o.components[c]&&Oe(`Component "${c}" has already been registered in target app.`),o.components[c]=d,u):o.components[c]},directive(c,d){return A.env.NODE_ENV!=="production"&&dS(c),d?(A.env.NODE_ENV!=="production"&&o.directives[c]&&Oe(`Directive "${c}" has already been registered in target app.`),o.directives[c]=d,u):o.directives[c]},mount(c,d,h){if(l)A.env.NODE_ENV!=="production"&&Oe("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{A.env.NODE_ENV!=="production"&&c.__vue_app__&&Oe("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const p=u._ceVNode||ye(i,s);return p.appContext=o,h===!0?h="svg":h===!1&&(h=void 0),A.env.NODE_ENV!=="production"&&(o.reload=()=>{const g=Co(p);g.el=null,e(g,c,h)}),e(p,c,h),l=!0,u._container=c,c.__vue_app__=u,A.env.NODE_ENV!=="production"&&(u._instance=p.component,dM(u,h0)),Ch(p.component)}},onUnmount(c){A.env.NODE_ENV!=="production"&&typeof c!="function"&&Oe(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(hs(a,u._instance,16),e(null,u._container),A.env.NODE_ENV!=="production"&&(u._instance=null,hM(u)),delete u._container.__vue_app__):A.env.NODE_ENV!=="production"&&Oe("Cannot unmount an app that is not mounted.")},provide(c,d){return A.env.NODE_ENV!=="production"&&c in o.provides&&(Lt(o.provides,c)?Oe(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`):Oe(`App already provides property with key "${String(c)}" inherited from its parent element. It will be overwritten with the new value.`)),o.provides[c]=d,u},runWithContext(c){const d=Kr;Kr=u;try{return c()}finally{Kr=d}}};return u}}let Kr=null;function qr(e,t){if(A.env.NODE_ENV!=="production"&&(!_n||_n.isMounted)&&Oe("provide() can only be used inside setup()."),_n){let n=_n.provides;const i=_n.parent&&_n.parent.provides;i===n&&(n=_n.provides=Object.create(i)),n[e]=t}}function Ri(e,t,n=!1){const i=Ti();if(i||Kr){let s=Kr?Kr._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&ft(t)?t.call(i&&i.proxy):t;A.env.NODE_ENV!=="production"&&Oe(`injection "${String(e)}" not found.`)}else A.env.NODE_ENV!=="production"&&Oe("inject() can only be used inside setup() or functional components.")}function Xg(){return!!(Ti()||Kr)}const UM=Symbol.for("v-scx"),jM=()=>{{const e=Ri(UM);return e||A.env.NODE_ENV!=="production"&&Oe("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function KM(e,t){return Qg(e,null,A.env.NODE_ENV!=="production"?nn({},t,{flush:"sync"}):{flush:"sync"})}function wt(e,t,n){return A.env.NODE_ENV!=="production"&&!ft(t)&&Oe("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Qg(e,t,n)}function Qg(e,t,n=Ot){const{immediate:i,deep:s,flush:o,once:r}=n;A.env.NODE_ENV!=="production"&&!t&&(i!==void 0&&Oe('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&Oe('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&Oe('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=nn({},n);A.env.NODE_ENV!=="production"&&(a.onWarn=Oe);const l=t&&i||!t&&o!=="post";let u;if(Uu){if(o==="sync"){const p=jM();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=Tn,p.resume=Tn,p.pause=Tn,p}}const c=_n;a.call=(p,g,C)=>hs(p,c,g,C);let d=!1;o==="post"?a.scheduler=p=>{Di(p,c&&c.suspense)}:o!=="sync"&&(d=!0,a.scheduler=(p,g)=>{g?p():nh(p)}),a.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const h=XO(e,t,a);return Uu&&(u?u.push(h):l&&h()),h}function qM(e,t,n){const i=this.proxy,s=Jt(e)?e.includes(".")?kS(i,e):()=>i[e]:e.bind(i,i);let o;ft(t)?o=t:(o=t.handler,n=t);const r=zu(this),a=Qg(s,o.bind(i),n);return r(),a}function kS(e,t){const n=t.split(".");return()=>{let i=e;for(let s=0;s<n.length&&i;s++)i=i[n[s]];return i}}function YM(e,t,n=Ot){const i=Ti();if(A.env.NODE_ENV!=="production"&&!i)return Oe("useModel() called without active instance."),oe();const s=zn(t);if(A.env.NODE_ENV!=="production"&&!i.propsOptions[0][s])return Oe(`useModel() called with prop "${t}" which is not declared.`),oe();const o=xs(t),r=OS(e,s),a=jO((l,u)=>{let c,d=Ot,h;return KM(()=>{const p=e[s];fi(c,p)&&(c=p,u())}),{get(){return l(),n.get?n.get(c):c},set(p){const g=n.set?n.set(p):p;if(!fi(g,c)&&!(d!==Ot&&fi(p,d)))return;const C=i.vnode.props;C&&(t in C||s in C||o in C)&&(`onUpdate:${t}`in C||`onUpdate:${s}`in C||`onUpdate:${o}`in C)||(c=p,u()),i.emit(`update:${t}`,g),fi(p,g)&&fi(p,d)&&!fi(g,h)&&u(),d=p,h=g}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?r||Ot:a,done:!1}:{done:!0}}}},a}const OS=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${zn(t)}Modifiers`]||e[`${xs(t)}Modifiers`];function ZM(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||Ot;if(A.env.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(Vr(zn(t))in d))&&Oe(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Vr(zn(t))}" prop.`);else{const h=c[t];ft(h)&&(h(...n)||Oe(`Invalid event arguments: event validation failed for event "${t}".`))}}let s=n;const o=t.startsWith("update:"),r=o&&OS(i,t.slice(7));if(r&&(r.trim&&(s=n.map(c=>Jt(c)?c.trim():c)),r.number&&(s=n.map(bg))),A.env.NODE_ENV!=="production"&&CM(e,t,s),A.env.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&i[Vr(c)]&&Oe(`Event "${c}" is emitted in component ${ju(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${xs(t)}" instead of "${t}".`)}let a,l=i[a=Vr(t)]||i[a=Vr(zn(t))];!l&&o&&(l=i[a=Vr(xs(t))]),l&&hs(l,e,6,s);const u=i[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,hs(u,e,6,s)}}const JM=new WeakMap;function MS(e,t,n=!1){const i=n?JM:t.emitsCache,s=i.get(e);if(s!==void 0)return s;const o=e.emits;let r={},a=!1;if(!ft(e)){const l=u=>{const c=MS(u,t,!0);c&&(a=!0,nn(r,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(Bt(e)&&i.set(e,null),null):(rt(o)?o.forEach(l=>r[l]=null):nn(r,o),Bt(e)&&i.set(e,r),r)}function hh(e,t){return!e||!Su(t)?!1:(t=t.slice(2).replace(/Once$/,""),Lt(e,t[0].toLowerCase()+t.slice(1))||Lt(e,xs(t))||Lt(e,t))}let em=!1;function fh(){em=!0}function LS(e){const{type:t,vnode:n,proxy:i,withProxy:s,propsOptions:[o],slots:r,attrs:a,emit:l,render:u,renderCache:c,props:d,data:h,setupState:p,ctx:g,inheritAttrs:C}=e,v=oh(e);let S,R;A.env.NODE_ENV!=="production"&&(em=!1);try{if(n.shapeFlag&4){const b=s||i,F=A.env.NODE_ENV!=="production"&&p.__isScriptSetup?new Proxy(b,{get(x,V,I){return Oe(`Property '${String(V)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(x,V,I)}}):b;S=ps(u.call(F,b,c,A.env.NODE_ENV!=="production"?As(d):d,p,h,g)),R=a}else{const b=t;A.env.NODE_ENV!=="production"&&a===d&&fh(),S=ps(b.length>1?b(A.env.NODE_ENV!=="production"?As(d):d,A.env.NODE_ENV!=="production"?{get attrs(){return fh(),As(a)},slots:r,emit:l}:{attrs:a,slots:r,emit:l}):b(A.env.NODE_ENV!=="production"?As(d):d,null)),R=t.props?a:XM(a)}}catch(b){Hu.length=0,Pu(b,e,1),S=ye(ai)}let E=S,y;if(A.env.NODE_ENV!=="production"&&S.patchFlag>0&&S.patchFlag&2048&&([E,y]=NS(S)),R&&C!==!1){const b=Object.keys(R),{shapeFlag:F}=E;if(b.length){if(F&7)o&&b.some(Vd)&&(R=QM(R,o)),E=Co(E,R,!1,!0);else if(A.env.NODE_ENV!=="production"&&!em&&E.type!==ai){const x=Object.keys(a),V=[],I=[];for(let M=0,P=x.length;M<P;M++){const N=x[M];Su(N)?Vd(N)||V.push(N[2].toLowerCase()+N.slice(3)):I.push(N)}I.length&&Oe(`Extraneous non-props attributes (${I.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`),V.length&&Oe(`Extraneous non-emits event listeners (${V.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(A.env.NODE_ENV!=="production"&&!VS(E)&&Oe("Runtime directive used on component with non-element root node. The directives will not function as intended."),E=Co(E,null,!1,!0),E.dirs=E.dirs?E.dirs.concat(n.dirs):n.dirs),n.transition&&(A.env.NODE_ENV!=="production"&&!VS(E)&&Oe("Component inside <Transition> renders non-element root node that cannot be animated."),Ou(E,n.transition)),A.env.NODE_ENV!=="production"&&y?y(E):S=E,oh(v),S}const NS=e=>{const t=e.children,n=e.dynamicChildren,i=tm(t,!1);if(i){if(A.env.NODE_ENV!=="production"&&i.patchFlag>0&&i.patchFlag&2048)return NS(i)}else return[e,void 0];const s=t.indexOf(i),o=n?n.indexOf(i):-1,r=a=>{t[s]=a,n&&(o>-1?n[o]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[ps(i),r]};function tm(e,t=!0){let n;for(let i=0;i<e.length;i++){const s=e[i];if($u(s)){if(s.type!==ai||s.children==="v-if"){if(n)return;if(n=s,A.env.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return tm(n.children)}}else return}return n}const XM=e=>{let t;for(const n in e)(n==="class"||n==="style"||Su(n))&&((t||(t={}))[n]=e[n]);return t},QM=(e,t)=>{const n={};for(const i in e)(!Vd(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n},VS=e=>e.shapeFlag&7||e.type===ai;function eL(e,t,n){const{props:i,children:s,component:o}=e,{props:r,children:a,patchFlag:l}=t,u=o.emitsOptions;if(A.env.NODE_ENV!=="production"&&(s||a)&&ks||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?BS(i,r,u):!!r;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const h=c[d];if(r[h]!==i[h]&&!hh(u,h))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:i===r?!1:i?r?BS(i,r,u):!0:!!r;return!1}function BS(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let s=0;s<i.length;s++){const o=i[s];if(t[o]!==e[o]&&!hh(n,o))return!0}return!1}function tL({vnode:e,parent:t},n){for(;t;){const i=t.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.el=e.el),i===e)(e=t.vnode).el=n,t=t.parent;else break}}const HS={},GS=()=>Object.create(HS),$S=e=>Object.getPrototypeOf(e)===HS;function nL(e,t,n,i=!1){const s={},o=GS();e.propsDefaults=Object.create(null),WS(e,t,s,o);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);A.env.NODE_ENV!=="production"&&jS(t||{},s,e),n?e.props=i?s:GO(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function iL(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function sL(e,t,n,i){const{props:s,attrs:o,vnode:{patchFlag:r}}=e,a=mt(s),[l]=e.propsOptions;let u=!1;if(!(A.env.NODE_ENV!=="production"&&iL(e))&&(i||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let h=c[d];if(hh(e.emitsOptions,h))continue;const p=t[h];if(l)if(Lt(o,h))p!==o[h]&&(o[h]=p,u=!0);else{const g=zn(h);s[g]=nm(l,a,g,p,e,!1)}else p!==o[h]&&(o[h]=p,u=!0)}}}else{WS(e,t,s,o)&&(u=!0);let c;for(const d in a)(!t||!Lt(t,d)&&((c=xs(d))===d||!Lt(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=nm(l,a,d,void 0,e,!0)):delete s[d]);if(o!==a)for(const d in o)(!t||!Lt(t,d))&&(delete o[d],u=!0)}u&&_s(e.attrs,"set",""),A.env.NODE_ENV!=="production"&&jS(t||{},s,e)}function WS(e,t,n,i){const[s,o]=e.propsOptions;let r=!1,a;if(t)for(let l in t){if(Eu(l))continue;const u=t[l];let c;s&&Lt(s,c=zn(l))?!o||!o.includes(c)?n[c]=u:(a||(a={}))[c]=u:hh(e.emitsOptions,l)||(!(l in i)||u!==i[l])&&(i[l]=u,r=!0)}if(o){const l=mt(n),u=a||Ot;for(let c=0;c<o.length;c++){const d=o[c];n[d]=nm(s,l,d,u[d],e,!Lt(u,d))}}return r}function nm(e,t,n,i,s,o){const r=e[n];if(r!=null){const a=Lt(r,"default");if(a&&i===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&ft(l)){const{propsDefaults:u}=s;if(n in u)i=u[n];else{const c=zu(s);i=u[n]=l.call(null,t),c()}}else i=l;s.ce&&s.ce._setProp(n,i)}r[0]&&(o&&!a?i=!1:r[1]&&(i===""||i===xs(n))&&(i=!0))}return i}const oL=new WeakMap;function zS(e,t,n=!1){const i=n?oL:t.propsCache,s=i.get(e);if(s)return s;const o=e.props,r={},a=[];let l=!1;if(!ft(e)){const c=d=>{l=!0;const[h,p]=zS(d,t,!0);nn(r,h),p&&a.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!l)return Bt(e)&&i.set(e,Ua),Ua;if(rt(o))for(let c=0;c<o.length;c++){A.env.NODE_ENV!=="production"&&!Jt(o[c])&&Oe("props must be strings when using array syntax.",o[c]);const d=zn(o[c]);US(d)&&(r[d]=Ot)}else if(o){A.env.NODE_ENV!=="production"&&!Bt(o)&&Oe("invalid props options",o);for(const c in o){const d=zn(c);if(US(d)){const h=o[c],p=r[d]=rt(h)||ft(h)?{type:h}:nn({},h),g=p.type;let C=!1,v=!0;if(rt(g))for(let S=0;S<g.length;++S){const R=g[S],E=ft(R)&&R.name;if(E==="Boolean"){C=!0;break}else E==="String"&&(v=!1)}else C=ft(g)&&g.name==="Boolean";p[0]=C,p[1]=v,(C||Lt(p,"default"))&&a.push(d)}}}const u=[r,a];return Bt(e)&&i.set(e,u),u}function US(e){return e[0]!=="$"&&!Eu(e)?!0:(A.env.NODE_ENV!=="production"&&Oe(`Invalid prop name: "${e}" is a reserved property.`),!1)}function rL(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function jS(e,t,n){const i=mt(t),s=n.propsOptions[0],o=Object.keys(e).map(r=>zn(r));for(const r in s){let a=s[r];a!=null&&aL(r,i[r],a,A.env.NODE_ENV!=="production"?As(i):i,!o.includes(r))}}function aL(e,t,n,i,s){const{type:o,required:r,validator:a,skipCheck:l}=n;if(r&&s){Oe('Missing required prop: "'+e+'"');return}if(!(t==null&&!r)){if(o!=null&&o!==!0&&!l){let u=!1;const c=rt(o)?o:[o],d=[];for(let h=0;h<c.length&&!u;h++){const{valid:p,expectedType:g}=uL(t,c[h]);d.push(g||""),u=p}if(!u){Oe(cL(e,t,d));return}}a&&!a(t,i)&&Oe('Invalid prop: custom validator check failed for prop "'+e+'".')}}const lL=hi("String,Number,Boolean,Function,Symbol,BigInt");function uL(e,t){let n;const i=rL(t);if(i==="null")n=e===null;else if(lL(i)){const s=typeof e;n=s===i.toLowerCase(),!n&&s==="object"&&(n=e instanceof t)}else i==="Object"?n=Bt(e):i==="Array"?n=rt(e):n=e instanceof t;return{valid:n,expectedType:i}}function cL(e,t,n){if(n.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let i=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(Nr).join(" | ")}`;const s=n[0],o=wg(t),r=KS(t,s),a=KS(t,o);return n.length===1&&qS(s)&&!dL(s,o)&&(i+=` with value ${r}`),i+=`, got ${o} `,qS(o)&&(i+=`with value ${a}.`),i}function KS(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function qS(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function dL(...e){return e.some(t=>t.toLowerCase()==="boolean")}const im=e=>e==="_"||e==="_ctx"||e==="$stable",sm=e=>rt(e)?e.map(ps):[ps(e)],hL=(e,t,n)=>{if(t._n)return t;const i=De((...s)=>(A.env.NODE_ENV!=="production"&&_n&&!(n===null&&xn)&&!(n&&n.root!==_n.root)&&Oe(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),sm(t(...s))),n);return i._c=!1,i},YS=(e,t,n)=>{const i=e._ctx;for(const s in e){if(im(s))continue;const o=e[s];if(ft(o))t[s]=hL(s,o,i);else if(o!=null){A.env.NODE_ENV!=="production"&&Oe(`Non-function value encountered for slot "${s}". Prefer function slots for better performance.`);const r=sm(o);t[s]=()=>r}}},ZS=(e,t)=>{A.env.NODE_ENV!=="production"&&!Wg(e.vnode)&&Oe("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=sm(t);e.slots.default=()=>n},om=(e,t,n)=>{for(const i in t)(n||!im(i))&&(e[i]=t[i])},fL=(e,t,n)=>{const i=e.slots=GS();if(e.vnode.shapeFlag&32){const s=t._;s?(om(i,t,n),n&&$d(i,"_",s,!0)):YS(t,i)}else t&&ZS(e,t)},pL=(e,t,n)=>{const{vnode:i,slots:s}=e;let o=!0,r=Ot;if(i.shapeFlag&32){const a=t._;a?A.env.NODE_ENV!=="production"&&ks?(om(s,t,n),_s(e,"set","$slots")):n&&a===1?o=!1:om(s,t,n):(o=!t.$stable,YS(t,s)),r=t}else t&&(ZS(e,t),r={default:1});if(o)for(const a in s)!im(a)&&r[a]==null&&delete s[a]};let Vu,vo;function el(e,t){e.appContext.config.performance&&ph()&&vo.mark(`vue-${t}-${e.uid}`),A.env.NODE_ENV!=="production"&&mM(e,t,ph()?vo.now():Date.now())}function tl(e,t){if(e.appContext.config.performance&&ph()){const n=`vue-${t}-${e.uid}`,i=n+":end",s=`<${ju(e,e.type)}> ${t}`;vo.mark(i),vo.measure(s,n,i),vo.clearMeasures(s),vo.clearMarks(n),vo.clearMarks(i)}A.env.NODE_ENV!=="production"&&vM(e,t,ph()?vo.now():Date.now())}function ph(){return Vu!==void 0||(typeof window<"u"&&window.performance?(Vu=!0,vo=window.performance):Vu=!1),Vu}function gL(){const e=[];if(A.env.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
18
+
19
+ For more details, see https://link.vuejs.org/feature-flags.`)}}const Di=wL;function mL(e){return vL(e)}function vL(e,t){gL();const n=Ru();n.__VUE__=!0,A.env.NODE_ENV!=="production"&&Hg(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:i,remove:s,patchProp:o,createElement:r,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:h,setScopeId:p=Tn,insertStaticContent:g}=e,C=(O,W,ue,Fe=null,we=null,Ee=null,ke=void 0,Pe=null,Te=A.env.NODE_ENV!=="production"&&ks?!1:!!W.dynamicChildren)=>{if(O===W)return;O&&!il(O,W)&&(Fe=qt(O),Ve(O,we,Ee,!0),O=null),W.patchFlag===-2&&(Te=!1,W.dynamicChildren=null);const{type:Re,ref:st,shapeFlag:He}=W;switch(Re){case nl:v(O,W,ue,Fe);break;case ai:S(O,W,ue,Fe);break;case Bu:O==null?R(W,ue,Fe,ke):A.env.NODE_ENV!=="production"&&E(O,W,ue,ke);break;case At:ie(O,W,ue,Fe,we,Ee,ke,Pe,Te);break;default:He&1?F(O,W,ue,Fe,we,Ee,ke,Pe,Te):He&6?ve(O,W,ue,Fe,we,Ee,ke,Pe,Te):He&64||He&128?Re.process(O,W,ue,Fe,we,Ee,ke,Pe,Te,Wt):A.env.NODE_ENV!=="production"&&Oe("Invalid VNode type:",Re,`(${typeof Re})`)}st!=null&&we?Mu(st,O&&O.ref,Ee,W||O,!W):st==null&&O&&O.ref!=null&&Mu(O.ref,null,Ee,O,!0)},v=(O,W,ue,Fe)=>{if(O==null)i(W.el=a(W.children),ue,Fe);else{const we=W.el=O.el;W.children!==O.children&&u(we,W.children)}},S=(O,W,ue,Fe)=>{O==null?i(W.el=l(W.children||""),ue,Fe):W.el=O.el},R=(O,W,ue,Fe)=>{[O.el,O.anchor]=g(O.children,W,ue,Fe,O.el,O.anchor)},E=(O,W,ue,Fe)=>{if(W.children!==O.children){const we=h(O.anchor);b(O),[W.el,W.anchor]=g(W.children,ue,we,Fe)}else W.el=O.el,W.anchor=O.anchor},y=({el:O,anchor:W},ue,Fe)=>{let we;for(;O&&O!==W;)we=h(O),i(O,ue,Fe),O=we;i(W,ue,Fe)},b=({el:O,anchor:W})=>{let ue;for(;O&&O!==W;)ue=h(O),s(O),O=ue;s(W)},F=(O,W,ue,Fe,we,Ee,ke,Pe,Te)=>{if(W.type==="svg"?ke="svg":W.type==="math"&&(ke="mathml"),O==null)x(W,ue,Fe,we,Ee,ke,Pe,Te);else{const Re=O.el&&O.el._isVueCE?O.el:null;try{Re&&Re._beginPatch(),M(O,W,we,Ee,ke,Pe,Te)}finally{Re&&Re._endPatch()}}},x=(O,W,ue,Fe,we,Ee,ke,Pe)=>{let Te,Re;const{props:st,shapeFlag:He,transition:pe,dirs:le}=O;if(Te=O.el=r(O.type,Ee,st&&st.is,st),He&8?c(Te,O.children):He&16&&I(O.children,Te,null,Fe,we,rm(O,Ee),ke,Pe),le&&zr(O,null,Fe,"created"),V(Te,O,O.scopeId,ke,Fe),st){for(const Qe in st)Qe!=="value"&&!Eu(Qe)&&o(Te,Qe,null,st[Qe],Ee,Fe);"value"in st&&o(Te,"value",null,st.value,Ee),(Re=st.onVnodeBeforeMount)&&Os(Re,Fe,O)}A.env.NODE_ENV!=="production"&&($d(Te,"__vnode",O,!0),$d(Te,"__vueParentComponent",Fe,!0)),le&&zr(O,null,Fe,"beforeMount");const Ke=CL(we,pe);Ke&&pe.beforeEnter(Te),i(Te,W,ue),((Re=st&&st.onVnodeMounted)||Ke||le)&&Di(()=>{Re&&Os(Re,Fe,O),Ke&&pe.enter(Te),le&&zr(O,null,Fe,"mounted")},we)},V=(O,W,ue,Fe,we)=>{if(ue&&p(O,ue),Fe)for(let Ee=0;Ee<Fe.length;Ee++)p(O,Fe[Ee]);if(we){let Ee=we.subTree;if(A.env.NODE_ENV!=="production"&&Ee.patchFlag>0&&Ee.patchFlag&2048&&(Ee=tm(Ee.children)||Ee),W===Ee||QS(Ee.type)&&(Ee.ssContent===W||Ee.ssFallback===W)){const ke=we.vnode;V(O,ke,ke.scopeId,ke.slotScopeIds,we.parent)}}},I=(O,W,ue,Fe,we,Ee,ke,Pe,Te=0)=>{for(let Re=Te;Re<O.length;Re++){const st=O[Re]=Pe?Xo(O[Re]):ps(O[Re]);C(null,st,W,ue,Fe,we,Ee,ke,Pe)}},M=(O,W,ue,Fe,we,Ee,ke)=>{const Pe=W.el=O.el;A.env.NODE_ENV!=="production"&&(Pe.__vnode=W);let{patchFlag:Te,dynamicChildren:Re,dirs:st}=W;Te|=O.patchFlag&16;const He=O.props||Ot,pe=W.props||Ot;let le;if(ue&&Yr(ue,!1),(le=pe.onVnodeBeforeUpdate)&&Os(le,ue,W,O),st&&zr(W,O,ue,"beforeUpdate"),ue&&Yr(ue,!0),A.env.NODE_ENV!=="production"&&ks&&(Te=0,ke=!1,Re=null),(He.innerHTML&&pe.innerHTML==null||He.textContent&&pe.textContent==null)&&c(Pe,""),Re?(P(O.dynamicChildren,Re,Pe,ue,Fe,rm(W,we),Ee),A.env.NODE_ENV!=="production"&&gh(O,W)):ke||$(O,W,Pe,null,ue,Fe,rm(W,we),Ee,!1),Te>0){if(Te&16)N(Pe,He,pe,ue,we);else if(Te&2&&He.class!==pe.class&&o(Pe,"class",null,pe.class,we),Te&4&&o(Pe,"style",He.style,pe.style,we),Te&8){const Ke=W.dynamicProps;for(let Qe=0;Qe<Ke.length;Qe++){const Ft=Ke[Qe],en=He[Ft],Yt=pe[Ft];(Yt!==en||Ft==="value")&&o(Pe,Ft,en,Yt,we,ue)}}Te&1&&O.children!==W.children&&c(Pe,W.children)}else!ke&&Re==null&&N(Pe,He,pe,ue,we);((le=pe.onVnodeUpdated)||st)&&Di(()=>{le&&Os(le,ue,W,O),st&&zr(W,O,ue,"updated")},Fe)},P=(O,W,ue,Fe,we,Ee,ke)=>{for(let Pe=0;Pe<W.length;Pe++){const Te=O[Pe],Re=W[Pe],st=Te.el&&(Te.type===At||!il(Te,Re)||Te.shapeFlag&198)?d(Te.el):ue;C(Te,Re,st,null,Fe,we,Ee,ke,!0)}},N=(O,W,ue,Fe,we)=>{if(W!==ue){if(W!==Ot)for(const Ee in W)!Eu(Ee)&&!(Ee in ue)&&o(O,Ee,W[Ee],null,we,Fe);for(const Ee in ue){if(Eu(Ee))continue;const ke=ue[Ee],Pe=W[Ee];ke!==Pe&&Ee!=="value"&&o(O,Ee,Pe,ke,we,Fe)}"value"in ue&&o(O,"value",W.value,ue.value,we)}},ie=(O,W,ue,Fe,we,Ee,ke,Pe,Te)=>{const Re=W.el=O?O.el:a(""),st=W.anchor=O?O.anchor:a("");let{patchFlag:He,dynamicChildren:pe,slotScopeIds:le}=W;A.env.NODE_ENV!=="production"&&(ks||He&2048)&&(He=0,Te=!1,pe=null),le&&(Pe=Pe?Pe.concat(le):le),O==null?(i(Re,ue,Fe),i(st,ue,Fe),I(W.children||[],ue,st,we,Ee,ke,Pe,Te)):He>0&&He&64&&pe&&O.dynamicChildren?(P(O.dynamicChildren,pe,ue,we,Ee,ke,Pe),A.env.NODE_ENV!=="production"?gh(O,W):(W.key!=null||we&&W===we.subTree)&&gh(O,W,!0)):$(O,W,ue,st,we,Ee,ke,Pe,Te)},ve=(O,W,ue,Fe,we,Ee,ke,Pe,Te)=>{W.slotScopeIds=Pe,O==null?W.shapeFlag&512?we.ctx.activate(W,ue,Fe,ke,Te):Be(W,ue,Fe,we,Ee,ke,Te):ee(O,W,Te)},Be=(O,W,ue,Fe,we,Ee,ke)=>{const Pe=O.component=DL(O,Fe,we);if(A.env.NODE_ENV!=="production"&&Pe.type.__hmrId&&aM(Pe),A.env.NODE_ENV!=="production"&&(Qd(O),el(Pe,"mount")),Wg(O)&&(Pe.ctx.renderer=Wt),A.env.NODE_ENV!=="production"&&el(Pe,"init"),TL(Pe,!1,ke),A.env.NODE_ENV!=="production"&&tl(Pe,"init"),A.env.NODE_ENV!=="production"&&ks&&(O.el=null),Pe.asyncDep){if(we&&we.registerDep(Pe,U,ke),!O.el){const Te=Pe.subTree=ye(ai);S(null,Te,W,ue),O.placeholder=Te.el}}else U(Pe,O,W,ue,we,Ee,ke);A.env.NODE_ENV!=="production"&&(eh(),tl(Pe,"mount"))},ee=(O,W,ue)=>{const Fe=W.component=O.component;if(eL(O,W,ue))if(Fe.asyncDep&&!Fe.asyncResolved){A.env.NODE_ENV!=="production"&&Qd(W),L(Fe,W,ue),A.env.NODE_ENV!=="production"&&eh();return}else Fe.next=W,Fe.update();else W.el=O.el,Fe.vnode=W},U=(O,W,ue,Fe,we,Ee,ke)=>{const Pe=()=>{if(O.isMounted){let{next:He,bu:pe,u:le,parent:Ke,vnode:Qe}=O;{const ei=JS(O);if(ei){He&&(He.el=Qe.el,L(O,He,ke)),ei.asyncDep.then(()=>{O.isUnmounted||Pe()});return}}let Ft=He,en;A.env.NODE_ENV!=="production"&&Qd(He||O.vnode),Yr(O,!1),He?(He.el=Qe.el,L(O,He,ke)):He=Qe,pe&&ja(pe),(en=He.props&&He.props.onVnodeBeforeUpdate)&&Os(en,Ke,He,Qe),Yr(O,!0),A.env.NODE_ENV!=="production"&&el(O,"render");const Yt=LS(O);A.env.NODE_ENV!=="production"&&tl(O,"render");const On=O.subTree;O.subTree=Yt,A.env.NODE_ENV!=="production"&&el(O,"patch"),C(On,Yt,d(On.el),qt(On),O,we,Ee),A.env.NODE_ENV!=="production"&&tl(O,"patch"),He.el=Yt.el,Ft===null&&tL(O,Yt.el),le&&Di(le,we),(en=He.props&&He.props.onVnodeUpdated)&&Di(()=>Os(en,Ke,He,Qe),we),A.env.NODE_ENV!=="production"&&lS(O),A.env.NODE_ENV!=="production"&&eh()}else{let He;const{el:pe,props:le}=W,{bm:Ke,m:Qe,parent:Ft,root:en,type:Yt}=O,On=Qa(W);Yr(O,!1),Ke&&ja(Ke),!On&&(He=le&&le.onVnodeBeforeMount)&&Os(He,Ft,W),Yr(O,!0);{en.ce&&en.ce._def.shadowRoot!==!1&&en.ce._injectChildStyle(Yt),A.env.NODE_ENV!=="production"&&el(O,"render");const ei=O.subTree=LS(O);A.env.NODE_ENV!=="production"&&tl(O,"render"),A.env.NODE_ENV!=="production"&&el(O,"patch"),C(null,ei,ue,Fe,O,we,Ee),A.env.NODE_ENV!=="production"&&tl(O,"patch"),W.el=ei.el}if(Qe&&Di(Qe,we),!On&&(He=le&&le.onVnodeMounted)){const ei=W;Di(()=>Os(He,Ft,ei),we)}(W.shapeFlag&256||Ft&&Qa(Ft.vnode)&&Ft.vnode.shapeFlag&256)&&O.a&&Di(O.a,we),O.isMounted=!0,A.env.NODE_ENV!=="production"&&fM(O),W=ue=Fe=null}};O.scope.on();const Te=O.effect=new Ib(Pe);O.scope.off();const Re=O.update=Te.run.bind(Te),st=O.job=Te.runIfDirty.bind(Te);st.i=O,st.id=O.uid,Te.scheduler=()=>nh(st),Yr(O,!0),A.env.NODE_ENV!=="production"&&(Te.onTrack=O.rtc?He=>ja(O.rtc,He):void 0,Te.onTrigger=O.rtg?He=>ja(O.rtg,He):void 0),Re()},L=(O,W,ue)=>{W.component=O;const Fe=O.vnode.props;O.vnode=W,O.next=null,sL(O,W.props,Fe,ue),pL(O,W.children,ue),ls(),iS(O),us()},$=(O,W,ue,Fe,we,Ee,ke,Pe,Te=!1)=>{const Re=O&&O.children,st=O?O.shapeFlag:0,He=W.children,{patchFlag:pe,shapeFlag:le}=W;if(pe>0){if(pe&128){Ae(Re,He,ue,Fe,we,Ee,ke,Pe,Te);return}else if(pe&256){re(Re,He,ue,Fe,we,Ee,ke,Pe,Te);return}}le&8?(st&16&&xt(Re,we,Ee),He!==Re&&c(ue,He)):st&16?le&16?Ae(Re,He,ue,Fe,we,Ee,ke,Pe,Te):xt(Re,we,Ee,!0):(st&8&&c(ue,""),le&16&&I(He,ue,Fe,we,Ee,ke,Pe,Te))},re=(O,W,ue,Fe,we,Ee,ke,Pe,Te)=>{O=O||Ua,W=W||Ua;const Re=O.length,st=W.length,He=Math.min(Re,st);let pe;for(pe=0;pe<He;pe++){const le=W[pe]=Te?Xo(W[pe]):ps(W[pe]);C(O[pe],le,ue,null,we,Ee,ke,Pe,Te)}Re>st?xt(O,we,Ee,!0,!1,He):I(W,ue,Fe,we,Ee,ke,Pe,Te,He)},Ae=(O,W,ue,Fe,we,Ee,ke,Pe,Te)=>{let Re=0;const st=W.length;let He=O.length-1,pe=st-1;for(;Re<=He&&Re<=pe;){const le=O[Re],Ke=W[Re]=Te?Xo(W[Re]):ps(W[Re]);if(il(le,Ke))C(le,Ke,ue,null,we,Ee,ke,Pe,Te);else break;Re++}for(;Re<=He&&Re<=pe;){const le=O[He],Ke=W[pe]=Te?Xo(W[pe]):ps(W[pe]);if(il(le,Ke))C(le,Ke,ue,null,we,Ee,ke,Pe,Te);else break;He--,pe--}if(Re>He){if(Re<=pe){const le=pe+1,Ke=le<st?W[le].el:Fe;for(;Re<=pe;)C(null,W[Re]=Te?Xo(W[Re]):ps(W[Re]),ue,Ke,we,Ee,ke,Pe,Te),Re++}}else if(Re>pe)for(;Re<=He;)Ve(O[Re],we,Ee,!0),Re++;else{const le=Re,Ke=Re,Qe=new Map;for(Re=Ke;Re<=pe;Re++){const et=W[Re]=Te?Xo(W[Re]):ps(W[Re]);et.key!=null&&(A.env.NODE_ENV!=="production"&&Qe.has(et.key)&&Oe("Duplicate keys found during update:",JSON.stringify(et.key),"Make sure keys are unique."),Qe.set(et.key,Re))}let Ft,en=0;const Yt=pe-Ke+1;let On=!1,ei=0;const fe=new Array(Yt);for(Re=0;Re<Yt;Re++)fe[Re]=0;for(Re=le;Re<=He;Re++){const et=O[Re];if(en>=Yt){Ve(et,we,Ee,!0);continue}let Ct;if(et.key!=null)Ct=Qe.get(et.key);else for(Ft=Ke;Ft<=pe;Ft++)if(fe[Ft-Ke]===0&&il(et,W[Ft])){Ct=Ft;break}Ct===void 0?Ve(et,we,Ee,!0):(fe[Ct-Ke]=Re+1,Ct>=ei?ei=Ct:On=!0,C(et,W[Ct],ue,null,we,Ee,ke,Pe,Te),en++)}const be=On?yL(fe):Ua;for(Ft=be.length-1,Re=Yt-1;Re>=0;Re--){const et=Ke+Re,Ct=W[et],Pt=W[et+1],Me=et+1<st?Pt.el||Pt.placeholder:Fe;fe[Re]===0?C(null,Ct,ue,Me,we,Ee,ke,Pe,Te):On&&(Ft<0||Re!==be[Ft]?Ie(Ct,ue,Me,2):Ft--)}}},Ie=(O,W,ue,Fe,we=null)=>{const{el:Ee,type:ke,transition:Pe,children:Te,shapeFlag:Re}=O;if(Re&6){Ie(O.component.subTree,W,ue,Fe);return}if(Re&128){O.suspense.move(W,ue,Fe);return}if(Re&64){ke.move(O,W,ue,Wt);return}if(ke===At){i(Ee,W,ue);for(let He=0;He<Te.length;He++)Ie(Te[He],W,ue,Fe);i(O.anchor,W,ue);return}if(ke===Bu){y(O,W,ue);return}if(Fe!==2&&Re&1&&Pe)if(Fe===0)Pe.beforeEnter(Ee),i(Ee,W,ue),Di(()=>Pe.enter(Ee),we);else{const{leave:He,delayLeave:pe,afterLeave:le}=Pe,Ke=()=>{O.ctx.isUnmounted?s(Ee):i(Ee,W,ue)},Qe=()=>{Ee._isLeaving&&Ee[Ur](!0),He(Ee,()=>{Ke(),le&&le()})};pe?pe(Ee,Ke,Qe):Qe()}else i(Ee,W,ue)},Ve=(O,W,ue,Fe=!1,we=!1)=>{const{type:Ee,props:ke,ref:Pe,children:Te,dynamicChildren:Re,shapeFlag:st,patchFlag:He,dirs:pe,cacheIndex:le}=O;if(He===-2&&(we=!1),Pe!=null&&(ls(),Mu(Pe,null,ue,O,!0),us()),le!=null&&(W.renderCache[le]=void 0),st&256){W.ctx.deactivate(O);return}const Ke=st&1&&pe,Qe=!Qa(O);let Ft;if(Qe&&(Ft=ke&&ke.onVnodeBeforeUnmount)&&Os(Ft,W,O),st&6)ht(O.component,ue,Fe);else{if(st&128){O.suspense.unmount(ue,Fe);return}Ke&&zr(O,null,W,"beforeUnmount"),st&64?O.type.remove(O,W,ue,Wt,Fe):Re&&!Re.hasOnce&&(Ee!==At||He>0&&He&64)?xt(Re,W,ue,!1,!0):(Ee===At&&He&384||!we&&st&16)&&xt(Te,W,ue),Fe&&ot(O)}(Qe&&(Ft=ke&&ke.onVnodeUnmounted)||Ke)&&Di(()=>{Ft&&Os(Ft,W,O),Ke&&zr(O,null,W,"unmounted")},ue)},ot=O=>{const{type:W,el:ue,anchor:Fe,transition:we}=O;if(W===At){A.env.NODE_ENV!=="production"&&O.patchFlag>0&&O.patchFlag&2048&&we&&!we.persisted?O.children.forEach(ke=>{ke.type===ai?s(ke.el):ot(ke)}):tt(ue,Fe);return}if(W===Bu){b(O);return}const Ee=()=>{s(ue),we&&!we.persisted&&we.afterLeave&&we.afterLeave()};if(O.shapeFlag&1&&we&&!we.persisted){const{leave:ke,delayLeave:Pe}=we,Te=()=>ke(ue,Ee);Pe?Pe(O.el,Ee,Te):Te()}else Ee()},tt=(O,W)=>{let ue;for(;O!==W;)ue=h(O),s(O),O=ue;s(W)},ht=(O,W,ue)=>{A.env.NODE_ENV!=="production"&&O.type.__hmrId&&lM(O);const{bum:Fe,scope:we,job:Ee,subTree:ke,um:Pe,m:Te,a:Re}=O;XS(Te),XS(Re),Fe&&ja(Fe),we.stop(),Ee&&(Ee.flags|=8,Ve(ke,O,W,ue)),Pe&&Di(Pe,W),Di(()=>{O.isUnmounted=!0},W),A.env.NODE_ENV!=="production"&&gM(O)},xt=(O,W,ue,Fe=!1,we=!1,Ee=0)=>{for(let ke=Ee;ke<O.length;ke++)Ve(O[ke],W,ue,Fe,we)},qt=O=>{if(O.shapeFlag&6)return qt(O.component.subTree);if(O.shapeFlag&128)return O.suspense.next();const W=h(O.anchor||O.el),ue=W&&W[yM];return ue?h(ue):W};let Je=!1;const Cn=(O,W,ue)=>{O==null?W._vnode&&Ve(W._vnode,null,null,!0):C(W._vnode||null,O,W,null,null,null,ue),W._vnode=O,Je||(Je=!0,iS(),sS(),Je=!1)},Wt={p:C,um:Ve,m:Ie,r:ot,mt:Be,mc:I,pc:$,pbc:P,n:qt,o:e};return{render:Cn,hydrate:void 0,createApp:zM(Cn)}}function rm({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Yr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function CL(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function gh(e,t,n=!1){const i=e.children,s=t.children;if(rt(i)&&rt(s))for(let o=0;o<i.length;o++){const r=i[o];let a=s[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[o]=Xo(s[o]),a.el=r.el),!n&&a.patchFlag!==-2&&gh(r,a)),a.type===nl&&a.patchFlag!==-1&&(a.el=r.el),a.type===ai&&!a.el&&(a.el=r.el),A.env.NODE_ENV!=="production"&&a.el&&(a.el.__vnode=a)}}function yL(e){const t=e.slice(),n=[0];let i,s,o,r,a;const l=e.length;for(i=0;i<l;i++){const u=e[i];if(u!==0){if(s=n[n.length-1],e[s]<u){t[i]=s,n.push(i);continue}for(o=0,r=n.length-1;o<r;)a=o+r>>1,e[n[a]]<u?o=a+1:r=a;u<e[n[o]]&&(o>0&&(t[i]=n[o-1]),n[o]=i)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=t[r];return n}function JS(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:JS(t)}function XS(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const QS=e=>e.__isSuspense;function wL(e,t){t&&t.pendingBranch?rt(e)?t.effects.push(...e):t.effects.push(e):Lg(e)}const At=Symbol.for("v-fgt"),nl=Symbol.for("v-txt"),ai=Symbol.for("v-cmt"),Bu=Symbol.for("v-stc"),Hu=[];let Fi=null;function j(e=!1){Hu.push(Fi=e?null:[])}function bL(){Hu.pop(),Fi=Hu[Hu.length-1]||null}let Gu=1;function e0(e,t=!1){Gu+=e,e<0&&Fi&&t&&(Fi.hasOnce=!0)}function t0(e){return e.dynamicChildren=Gu>0?Fi||Ua:null,bL(),Gu>0&&Fi&&Fi.push(e),e}function Ce(e,t,n,i,s,o){return t0(me(e,t,n,i,s,o,!0))}function Xe(e,t,n,i,s){return t0(ye(e,t,n,i,s,!0))}function $u(e){return e?e.__v_isVNode===!0:!1}function il(e,t){if(A.env.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=ih.get(t.type);if(n&&n.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const SL=(...e)=>i0(...e),n0=({key:e})=>e??null,mh=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Jt(e)||Ht(e)||ft(e)?{i:xn,r:e,k:t,f:!!n}:e:null);function me(e,t=null,n=null,i=0,s=null,o=e===At?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&n0(t),ref:t&&mh(t),scopeId:cS,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:xn};return a?(am(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=Jt(n)?8:16),A.env.NODE_ENV!=="production"&&l.key!==l.key&&Oe("VNode created with invalid key (NaN). VNode type:",l.type),Gu>0&&!r&&Fi&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Fi.push(l),l}const ye=A.env.NODE_ENV!=="production"?SL:i0;function i0(e,t=null,n=null,i=0,s=null,o=!1){if((!e||e===yS)&&(A.env.NODE_ENV!=="production"&&!e&&Oe(`Invalid vnode type when creating vnode: ${e}.`),e=ai),$u(e)){const a=Co(e,t,!0);return n&&am(a,n),Gu>0&&!o&&Fi&&(a.shapeFlag&6?Fi[Fi.indexOf(e)]=a:Fi.push(a)),a.patchFlag=-2,a}if(d0(e)&&(e=e.__vccOpts),t){t=Wu(t);let{class:a,style:l}=t;a&&!Jt(a)&&(t.class=z(a)),Bt(l)&&(qa(l)&&!rt(l)&&(l=nn({},l)),t.style=hn(l))}const r=Jt(e)?1:QS(e)?128:wM(e)?64:Bt(e)?4:ft(e)?2:0;return A.env.NODE_ENV!=="production"&&r&4&&qa(e)&&(e=mt(e),Oe("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
20
+ Component that was made reactive: `,e)),me(e,t,n,i,s,r,o,!0)}function Wu(e){return e?qa(e)||$S(e)?nn({},e):e:null}function Co(e,t,n=!1,i=!1){const{props:s,ref:o,patchFlag:r,children:a,transition:l}=e,u=t?fn(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&n0(u),ref:t&&t.ref?n&&o?rt(o)?o.concat(mh(t)):[o,mh(t)]:mh(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:A.env.NODE_ENV!=="production"&&r===-1&&rt(a)?a.map(s0):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==At?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Co(e.ssContent),ssFallback:e.ssFallback&&Co(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&i&&Ou(c,l.clone(c)),c}function s0(e){const t=Co(e);return rt(e.children)&&(t.children=e.children.map(s0)),t}function bt(e=" ",t=0){return ye(nl,null,e,t)}function at(e="",t=!1){return t?(j(),Xe(ai,null,e)):ye(ai,null,e)}function ps(e){return e==null||typeof e=="boolean"?ye(ai):rt(e)?ye(At,null,e.slice()):$u(e)?Xo(e):ye(nl,null,String(e))}function Xo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Co(e)}function am(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(rt(t))n=16;else if(typeof t=="object")if(i&65){const s=t.default;s&&(s._c&&(s._d=!1),am(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!$S(t)?t._ctx=xn:s===3&&xn&&(xn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ft(t)?(t={default:t,_ctx:xn},n=32):(t=String(t),i&64?(n=16,t=[bt(t)]):n=8);e.children=t,e.shapeFlag|=n}function fn(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const s in i)if(s==="class")t.class!==i.class&&(t.class=z([t.class,i.class]));else if(s==="style")t.style=hn([t.style,i.style]);else if(Su(s)){const o=t[s],r=i[s];r&&o!==r&&!(rt(o)&&o.includes(r))&&(t[s]=o?[].concat(o,r):r)}else s!==""&&(t[s]=i[s])}return t}function Os(e,t,n,i=null){hs(e,t,7,[n,i])}const EL=IS();let RL=0;function DL(e,t,n){const i=e.type,s=(t?t.appContext:e.appContext)||EL,o={uid:RL++,vnode:e,type:i,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new _b(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:zS(i,s),emitsOptions:MS(i,s),emit:null,emitted:null,propsDefaults:Ot,inheritAttrs:i.inheritAttrs,ctx:Ot,data:Ot,props:Ot,attrs:Ot,slots:Ot,refs:Ot,setupState:Ot,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return A.env.NODE_ENV!=="production"?o.ctx=kM(o):o.ctx={_:o},o.root=t?t.root:o,o.emit=ZM.bind(null,o),e.ce&&e.ce(o),o}let _n=null;const Ti=()=>_n||xn;let vh,lm;{const e=Ru(),t=(n,i)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(i),o=>{s.length>1?s.forEach(r=>r(o)):s[0](o)}};vh=t("__VUE_INSTANCE_SETTERS__",n=>_n=n),lm=t("__VUE_SSR_SETTERS__",n=>Uu=n)}const zu=e=>{const t=_n;return vh(e),e.scope.on(),()=>{e.scope.off(),vh(t)}},o0=()=>{_n&&_n.scope.off(),vh(null)},FL=hi("slot,component");function um(e,{isNativeTag:t}){(FL(e)||t(e))&&Oe("Do not use built-in or reserved HTML elements as component id: "+e)}function r0(e){return e.vnode.shapeFlag&4}let Uu=!1;function TL(e,t=!1,n=!1){t&&lm(t);const{props:i,children:s}=e.vnode,o=r0(e);nL(e,i,o,t),fL(e,s,n||t);const r=o?xL(e,t):void 0;return t&&lm(!1),r}function xL(e,t){const n=e.type;if(A.env.NODE_ENV!=="production"){if(n.name&&um(n.name,e.appContext.config),n.components){const s=Object.keys(n.components);for(let o=0;o<s.length;o++)um(s[o],e.appContext.config)}if(n.directives){const s=Object.keys(n.directives);for(let o=0;o<s.length;o++)dS(s[o])}n.compilerOptions&&_L()&&Oe('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,RS),A.env.NODE_ENV!=="production"&&OM(e);const{setup:i}=n;if(i){ls();const s=e.setupContext=i.length>1?c0(e):null,o=zu(e),r=Za(i,e,0,[A.env.NODE_ENV!=="production"?As(e.props):e.props,s]),a=yg(r);if(us(),o(),(a||e.sp)&&!Qa(e)&&fS(e),a){if(r.then(o0,o0),t)return r.then(l=>{a0(e,l,t)}).catch(l=>{Pu(l,e,0)});if(e.asyncDep=r,A.env.NODE_ENV!=="production"&&!e.suspense){const l=ju(e,n);Oe(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else a0(e,r,t)}else l0(e,t)}function a0(e,t,n){ft(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Bt(t)?(A.env.NODE_ENV!=="production"&&$u(t)&&Oe("setup() should not return VNodes directly - return a render function instead."),A.env.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Xb(t),A.env.NODE_ENV!=="production"&&MM(e)):A.env.NODE_ENV!=="production"&&t!==void 0&&Oe(`setup() should return an object. Received: ${t===null?"null":typeof t}`),l0(e,n)}const _L=()=>!0;function l0(e,t,n){const i=e.type;e.render||(e.render=i.render||Tn);{const s=zu(e);ls();try{VM(e)}finally{us(),s()}}A.env.NODE_ENV!=="production"&&!i.render&&e.render===Tn&&!t&&(i.template?Oe('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):Oe("Component is missing template or render function: ",i))}const u0=A.env.NODE_ENV!=="production"?{get(e,t){return fh(),An(e,"get",""),e[t]},set(){return Oe("setupContext.attrs is readonly."),!1},deleteProperty(){return Oe("setupContext.attrs is readonly."),!1}}:{get(e,t){return An(e,"get",""),e[t]}};function PL(e){return new Proxy(e.slots,{get(t,n){return An(e,"get","$slots"),t[n]}})}function c0(e){const t=n=>{if(A.env.NODE_ENV!=="production"&&(e.exposed&&Oe("expose() should be called only once per setup()."),n!=null)){let i=typeof n;i==="object"&&(rt(n)?i="array":Ht(n)&&(i="ref")),i!=="object"&&Oe(`expose() should be passed a plain object, received ${i}.`)}e.exposed=n||{}};if(A.env.NODE_ENV!=="production"){let n,i;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,u0))},get slots(){return i||(i=PL(e))},get emit(){return(s,...o)=>e.emit(s,...o)},expose:t})}else return{attrs:new Proxy(e.attrs,u0),slots:e.slots,emit:e.emit,expose:t}}function Ch(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Xb(Zo(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in jr)return jr[n](e)},has(t,n){return n in t||n in jr}})):e.proxy}const AL=/(?:^|[-_])\w/g,IL=e=>e.replace(AL,t=>t.toUpperCase()).replace(/[-_]/g,"");function cm(e,t=!0){return ft(e)?e.displayName||e.name:e.name||t&&e.__name}function ju(e,t,n=!1){let i=cm(t);if(!i&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(i=s[1])}if(!i&&e){const s=o=>{for(const r in o)if(o[r]===t)return r};i=s(e.components)||e.parent&&s(e.parent.type.components)||s(e.appContext.components)}return i?IL(i):n?"App":"Anonymous"}function d0(e){return ft(e)&&"__vccOpts"in e}const G=(e,t)=>{const n=ZO(e,t,Uu);if(A.env.NODE_ENV!=="production"){const i=Ti();i&&i.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function kL(){if(A.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},i={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(d){if(!Bt(d))return null;if(d.__isVue)return["div",e,"VueInstance"];if(Ht(d)){ls();const h=d.value;return us(),["div",{},["span",e,c(d)],"<",a(h),">"]}else{if(Hi(d))return["div",{},["span",e,jn(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${cs(d)?" (readonly)":""}`];if(cs(d))return["div",{},["span",e,jn(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]}return null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...o(d.$)]}};function o(d){const h=[];d.type.props&&d.props&&h.push(r("props",mt(d.props))),d.setupState!==Ot&&h.push(r("setup",d.setupState)),d.data!==Ot&&h.push(r("data",mt(d.data)));const p=l(d,"computed");p&&h.push(r("computed",p));const g=l(d,"inject");return g&&h.push(r("injected",g)),h.push(["div",{},["span",{style:i.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),h}function r(d,h){return h=nn({},h),Object.keys(h).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(h).map(p=>["div",{},["span",i,p+": "],a(h[p],!1)])]]:["span",{}]}function a(d,h=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",i,d]:Bt(d)?["object",{object:h?mt(d):d}]:["span",n,String(d)]}function l(d,h){const p=d.type;if(ft(p))return;const g={};for(const C in d.ctx)u(p,C,h)&&(g[C]=d.ctx[C]);return g}function u(d,h,p){const g=d[p];if(rt(g)&&g.includes(h)||Bt(g)&&h in g||d.extends&&u(d.extends,h,p)||d.mixins&&d.mixins.some(C=>u(C,h,p)))return!0}function c(d){return jn(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}const h0="3.5.25",gi=A.env.NODE_ENV!=="production"?Oe:Tn;A.env.NODE_ENV,A.env.NODE_ENV;/**
21
+ * @vue/runtime-dom v3.5.25
22
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
23
+ * @license MIT
24
+ **/let dm;const f0=typeof window<"u"&&window.trustedTypes;if(f0)try{dm=f0.createPolicy("vue",{createHTML:e=>e})}catch(e){A.env.NODE_ENV!=="production"&&gi(`Error creating trusted types policy: ${e}`)}const p0=dm?e=>dm.createHTML(e):e=>e,OL="http://www.w3.org/2000/svg",ML="http://www.w3.org/1998/Math/MathML",yo=typeof document<"u"?document:null,g0=yo&&yo.createElement("template"),LL={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const s=t==="svg"?yo.createElementNS(OL,e):t==="mathml"?yo.createElementNS(ML,e):n?yo.createElement(e,{is:n}):yo.createElement(e);return e==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:e=>yo.createTextNode(e),createComment:e=>yo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>yo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,s,o){const r=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{g0.innerHTML=p0(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const a=g0.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qo="transition",Ku="animation",sl=Symbol("_vtc"),m0={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},NL=nn({},SM,m0),Zr=(e,t=[])=>{rt(e)?e.forEach(n=>n(...t)):e&&e(...t)},v0=e=>e?rt(e)?e.some(t=>t.length>1):e.length>1:!1;function VL(e){const t={};for(const N in e)N in m0||(t[N]=e[N]);if(e.css===!1)return t;const{name:n="v",type:i,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=r,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,g=BL(s),C=g&&g[0],v=g&&g[1],{onBeforeEnter:S,onEnter:R,onEnterCancelled:E,onLeave:y,onLeaveCancelled:b,onBeforeAppear:F=S,onAppear:x=R,onAppearCancelled:V=E}=t,I=(N,ie,ve,Be)=>{N._enterCancelled=Be,er(N,ie?c:a),er(N,ie?u:r),ve&&ve()},M=(N,ie)=>{N._isLeaving=!1,er(N,d),er(N,p),er(N,h),ie&&ie()},P=N=>(ie,ve)=>{const Be=N?x:R,ee=()=>I(ie,N,ve);Zr(Be,[ie,ee]),C0(()=>{er(ie,N?l:o),Ms(ie,N?c:a),v0(Be)||y0(ie,i,C,ee)})};return nn(t,{onBeforeEnter(N){Zr(S,[N]),Ms(N,o),Ms(N,r)},onBeforeAppear(N){Zr(F,[N]),Ms(N,l),Ms(N,u)},onEnter:P(!1),onAppear:P(!0),onLeave(N,ie){N._isLeaving=!0;const ve=()=>M(N,ie);Ms(N,d),N._enterCancelled?(Ms(N,h),fm(N)):(fm(N),Ms(N,h)),C0(()=>{N._isLeaving&&(er(N,d),Ms(N,p),v0(y)||y0(N,i,v,ve))}),Zr(y,[N,ve])},onEnterCancelled(N){I(N,!1,void 0,!0),Zr(E,[N])},onAppearCancelled(N){I(N,!0,void 0,!0),Zr(V,[N])},onLeaveCancelled(N){M(N),Zr(b,[N])}})}function BL(e){if(e==null)return null;if(Bt(e))return[hm(e.enter),hm(e.leave)];{const t=hm(e);return[t,t]}}function hm(e){const t=lO(e);return A.env.NODE_ENV!=="production"&&iM(t,"<transition> explicit duration"),t}function Ms(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[sl]||(e[sl]=new Set)).add(t)}function er(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const n=e[sl];n&&(n.delete(t),n.size||(e[sl]=void 0))}function C0(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let HL=0;function y0(e,t,n,i){const s=e._endId=++HL,o=()=>{s===e._endId&&i()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=w0(e,t);if(!r)return i();const u=r+"end";let c=0;const d=()=>{e.removeEventListener(u,h),o()},h=p=>{p.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,h)}function w0(e,t){const n=window.getComputedStyle(e),i=g=>(n[g]||"").split(", "),s=i(`${Qo}Delay`),o=i(`${Qo}Duration`),r=b0(s,o),a=i(`${Ku}Delay`),l=i(`${Ku}Duration`),u=b0(a,l);let c=null,d=0,h=0;t===Qo?r>0&&(c=Qo,d=r,h=o.length):t===Ku?u>0&&(c=Ku,d=u,h=l.length):(d=Math.max(r,u),c=d>0?r>u?Qo:Ku:null,h=c?c===Qo?o.length:l.length:0);const p=c===Qo&&/\b(?:transform|all)(?:,|$)/.test(i(`${Qo}Property`).toString());return{type:c,timeout:d,propCount:h,hasTransform:p}}function b0(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>S0(n)+S0(e[i])))}function S0(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function fm(e){return(e?e.ownerDocument:document).body.offsetHeight}function GL(e,t,n){const i=e[sl];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const yh=Symbol("_vod"),E0=Symbol("_vsh"),Jr={name:"show",beforeMount(e,{value:t},{transition:n}){e[yh]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):qu(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),qu(e,!0),i.enter(e)):i.leave(e,()=>{qu(e,!1)}):qu(e,t))},beforeUnmount(e,{value:t}){qu(e,t)}};function qu(e,t){e.style.display=t?e[yh]:"none",e[E0]=!t}const R0=Symbol(A.env.NODE_ENV!=="production"?"CSS_VAR_TEXT":"");function $L(e){const t=Ti();if(!t){A.env.NODE_ENV!=="production"&&gi("useCssVars is called without current active component instance.");return}const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>wh(o,s))};A.env.NODE_ENV!=="production"&&(t.getCssVars=()=>e(t.proxy));const i=()=>{const s=e(t.proxy);t.ce?wh(t.ce,s):pm(t.subTree,s),n(s)};vS(()=>{Lg(i)}),Kn(()=>{wt(i,Tn,{flush:"post"});const s=new MutationObserver(i);s.observe(t.subTree.el.parentNode,{childList:!0}),Lu(()=>s.disconnect())})}function pm(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{pm(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)wh(e.el,t);else if(e.type===At)e.children.forEach(n=>pm(n,t));else if(e.type===Bu){let{el:n,anchor:i}=e;for(;n&&(wh(n,t),n!==i);)n=n.nextSibling}}function wh(e,t){if(e.nodeType===1){const n=e.style;let i="";for(const s in t){const o=wO(t[s]);n.setProperty(`--${s}`,o),i+=`--${s}: ${o};`}n[R0]=i}}const WL=/(?:^|;)\s*display\s*:/;function zL(e,t,n){const i=e.style,s=Jt(n);let o=!1;if(n&&!s){if(t)if(Jt(t))for(const r of t.split(";")){const a=r.slice(0,r.indexOf(":")).trim();n[a]==null&&bh(i,a,"")}else for(const r in t)n[r]==null&&bh(i,r,"");for(const r in n)r==="display"&&(o=!0),bh(i,r,n[r])}else if(s){if(t!==n){const r=i[R0];r&&(n+=";"+r),i.cssText=n,o=WL.test(n)}}else t&&e.removeAttribute("style");yh in e&&(e[yh]=o?i.display:"",e[E0]&&(i.display="none"))}const UL=/[^\\];\s*$/,D0=/\s*!important$/;function bh(e,t,n){if(rt(n))n.forEach(i=>bh(e,t,i));else if(n==null&&(n=""),A.env.NODE_ENV!=="production"&&UL.test(n)&&gi(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const i=jL(e,t);D0.test(n)?e.setProperty(xs(i),n.replace(D0,""),"important"):e[i]=n}}const F0=["Webkit","Moz","ms"],gm={};function jL(e,t){const n=gm[t];if(n)return n;let i=zn(t);if(i!=="filter"&&i in e)return gm[t]=i;i=Nr(i);for(let s=0;s<F0.length;s++){const o=F0[s]+i;if(o in e)return gm[t]=o}return t}const T0="http://www.w3.org/1999/xlink";function x0(e,t,n,i,s,o=yO(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(T0,t.slice(6,t.length)):e.setAttributeNS(T0,t,n):n==null||o&&!Fb(n)?e.removeAttribute(t):e.setAttribute(t,o?"":ho(n)?String(n):n)}function _0(e,t,n,i,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?p0(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Fb(n):n==null&&a==="string"?(n="",r=!0):a==="number"&&(n=0,r=!0)}try{e[t]=n}catch(a){A.env.NODE_ENV!=="production"&&!r&&gi(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,a)}r&&e.removeAttribute(s||t)}function ol(e,t,n,i){e.addEventListener(t,n,i)}function KL(e,t,n,i){e.removeEventListener(t,n,i)}const P0=Symbol("_vei");function qL(e,t,n,i,s=null){const o=e[P0]||(e[P0]={}),r=o[t];if(i&&r)r.value=A.env.NODE_ENV!=="production"?I0(i,t):i;else{const[a,l]=YL(t);if(i){const u=o[t]=XL(A.env.NODE_ENV!=="production"?I0(i,t):i,s);ol(e,a,u,l)}else r&&(KL(e,a,r,l),o[t]=void 0)}}const A0=/(?:Once|Passive|Capture)$/;function YL(e){let t;if(A0.test(e)){t={};let i;for(;i=e.match(A0);)e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):xs(e.slice(2)),t]}let mm=0;const ZL=Promise.resolve(),JL=()=>mm||(ZL.then(()=>mm=0),mm=Date.now());function XL(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;hs(QL(i,n.value),t,5,[i])};return n.value=e,n.attached=JL(),n}function I0(e,t){return ft(e)||rt(e)?e:(gi(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
25
+ Expected function or array of functions, received type ${typeof e}.`),Tn)}function QL(e,t){if(rt(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(i=>s=>!s._stopped&&i&&i(s))}else return t}const k0=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,eN=(e,t,n,i,s,o)=>{const r=s==="svg";t==="class"?GL(e,i,r):t==="style"?zL(e,n,i):Su(t)?Vd(t)||qL(e,t,n,i,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):tN(e,t,i,r))?(_0(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&x0(e,t,i,r,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Jt(i))?_0(e,zn(t),i,o,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),x0(e,t,i,r))};function tN(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&k0(t)&&ft(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return k0(t)&&Jt(n)?!1:t in e}function Sh(e="$style"){{const t=Ti();if(!t)return A.env.NODE_ENV!=="production"&&gi("useCssModule must be called inside setup()"),Ot;const n=t.type.__cssModules;if(!n)return A.env.NODE_ENV!=="production"&&gi("Current instance does not have CSS modules injected."),Ot;const i=n[e];return i||(A.env.NODE_ENV!=="production"&&gi(`Current instance does not have CSS module named "${e}".`),Ot)}}const O0=new WeakMap,M0=new WeakMap,Eh=Symbol("_moveCb"),L0=Symbol("_enterCb"),nN=(e=>(delete e.props.mode,e))({name:"TransitionGroup",props:nn({},NL,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ti(),i=bM();let s,o;return CS(()=>{if(!s.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!rN(s[0].el,n.vnode.el,r)){s=[];return}s.forEach(iN),s.forEach(sN);const a=s.filter(oN);fm(n.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Ms(u,r),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Eh]=h=>{h&&h.target!==u||(!h||h.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[Eh]=null,er(u,r))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const r=mt(e),a=VL(r);let l=r.tag||At;if(s=[],o)for(let u=0;u<o.length;u++){const c=o[u];c.el&&c.el instanceof Element&&(s.push(c),Ou(c,$g(c,a,i,n)),O0.set(c,{left:c.el.offsetLeft,top:c.el.offsetTop}))}o=t.default?hS(t.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null?Ou(c,$g(c,a,i,n)):A.env.NODE_ENV!=="production"&&c.type!==nl&&gi("<TransitionGroup> children must be keyed.")}return ye(l,null,o)}}});function iN(e){const t=e.el;t[Eh]&&t[Eh](),t[L0]&&t[L0]()}function sN(e){M0.set(e,{left:e.el.offsetLeft,top:e.el.offsetTop})}function oN(e){const t=O0.get(e),n=M0.get(e),i=t.left-n.left,s=t.top-n.top;if(i||s){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${i}px,${s}px)`,o.transitionDuration="0s",e}}function rN(e,t,n){const i=e.cloneNode(),s=e[sl];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&i.classList.add(a)),i.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(i);const{hasTransform:r}=w0(i);return o.removeChild(i),r}const N0=e=>{const t=e.props["onUpdate:modelValue"]||!1;return rt(t)?n=>ja(t,n):t};function aN(e){e.target.composing=!0}function V0(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const vm=Symbol("_assign");function B0(e,t,n){return t&&(e=e.trim()),n&&(e=bg(e)),e}const H0={created(e,{modifiers:{lazy:t,trim:n,number:i}},s){e[vm]=N0(s);const o=i||s.props&&s.props.type==="number";ol(e,t?"change":"input",r=>{r.target.composing||e[vm](B0(e.value,n,o))}),(n||o)&&ol(e,"change",()=>{e.value=B0(e.value,n,o)}),t||(ol(e,"compositionstart",aN),ol(e,"compositionend",V0),ol(e,"change",V0))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:s,number:o}},r){if(e[vm]=N0(r),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?bg(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(i&&t===n||s&&e.value.trim()===l)||(e.value=l))}},lN=["ctrl","shift","alt","meta"],uN={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>lN.some(n=>e[`${n}Key`]&&!t.includes(n))},Ut=(e,t)=>{const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=(s,...o)=>{for(let r=0;r<t.length;r++){const a=uN[t[r]];if(a&&a(s,t))return}return e(s,...o)})},cN={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},G0=(e,t)=>{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=s=>{if(!("key"in s))return;const o=xs(s.key);if(t.some(r=>r===o||cN[r]===o))return e(s)})},dN=nn({patchProp:eN},LL);let $0;function W0(){return $0||($0=mL(dN))}const z0=(...e)=>{W0().render(...e)},U0=(...e)=>{const t=W0().createApp(...e);A.env.NODE_ENV!=="production"&&(fN(t),pN(t));const{mount:n}=t;return t.mount=i=>{const s=gN(i);if(!s)return;const o=t._component;!ft(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,hN(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t};function hN(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function fN(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>mO(t)||vO(t)||CO(t),writable:!1})}function pN(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){gi("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,i='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return gi(i),n},set(){gi(i)}})}}function gN(e){if(Jt(e)){const t=document.querySelector(e);return A.env.NODE_ENV!=="production"&&!t&&gi(`Failed to mount app: mount target selector "${e}" returned null.`),t}return A.env.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&gi('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}/**
26
+ * vue v3.5.25
27
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
28
+ * @license MIT
29
+ **/function mN(){kL()}A.env.NODE_ENV!=="production"&&mN();function j0(e){if(!e||typeof e!="string")return null;const t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);return t?{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10),a:t[4]!==void 0?parseFloat(t[4]):1}:null}function Cm(e){const t=[e.r,e.g,e.b].map(n=>(n/=255,n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)));return t[0]*.2126+t[1]*.7152+t[2]*.0722}function vN(e,t){const n=Cm(e),i=Cm(t),s=Math.max(n,i),o=Math.min(n,i);return(s+.05)/(o+.05)}function CN(e){return Cm(e)>.5?"#000000":"#FFFFFF"}const K0=e=>{const n=window.getComputedStyle(e),i=n.backgroundColor,s=n.color,o=j0(i),r=j0(s);if(!o||!r||o.a===0)return;vN(o,r)<4.5&&(e.style.color=CN(o))},yN={mounted(e){In(()=>{K0(e)})},updated(e){In(()=>{K0(e)})}},q0=(e,t)=>{const n=e.parentElement;n&&requestAnimationFrame(()=>{n.style.setProperty("--loading-overlay-width",t.fullwidth?"100%":`${Math.max(50,Math.round(Math.random()*100))}%`),n.style.setProperty("--loading","flex")})},Y0=e=>{const t=e.parentElement;t&&requestAnimationFrame(()=>{t.style.setProperty("--loading","none")})},ym=e=>typeof e=="boolean"?{isLoading:e}:e,wo={mounted(e,t){const n=ym(t.value);n.isLoading&&q0(e,n)},updated(e,t){if(t.value===t.oldValue)return;const n=ym(t.value),i=ym(t.oldValue??!1);n.isLoading!==i.isLoading&&(n.isLoading?q0(e,n):Y0(e))},beforeUnmount(e){Y0(e)}};var mi="top",$i="bottom",Wi="right",vi="left",wm="auto",Yu=[mi,$i,Wi,vi],rl="start",Zu="end",wN="clippingParents",Z0="viewport",Ju="popper",bN="reference",J0=Yu.reduce(function(e,t){return e.concat([t+"-"+rl,t+"-"+Zu])},[]),X0=[].concat(Yu,[wm]).reduce(function(e,t){return e.concat([t,t+"-"+rl,t+"-"+Zu])},[]),SN="beforeRead",EN="read",RN="afterRead",DN="beforeMain",FN="main",TN="afterMain",xN="beforeWrite",_N="write",PN="afterWrite",AN=[SN,EN,RN,DN,FN,TN,xN,_N,PN];function Ls(e){return e?(e.nodeName||"").toLowerCase():null}function xi(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xr(e){var t=xi(e).Element;return e instanceof t||e instanceof Element}function zi(e){var t=xi(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function bm(e){if(typeof ShadowRoot>"u")return!1;var t=xi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function IN(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},s=t.attributes[n]||{},o=t.elements[n];!zi(o)||!Ls(o)||(Object.assign(o.style,i),Object.keys(s).forEach(function(r){var a=s[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function kN(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(i){var s=t.elements[i],o=t.attributes[i]||{},r=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:n[i]),a=r.reduce(function(l,u){return l[u]="",l},{});!zi(s)||!Ls(s)||(Object.assign(s.style,a),Object.keys(o).forEach(function(l){s.removeAttribute(l)}))})}}const Q0={name:"applyStyles",enabled:!0,phase:"write",fn:IN,effect:kN,requires:["computeStyles"]};function Ns(e){return e.split("-")[0]}var Qr=Math.max,Rh=Math.min,al=Math.round;function Sm(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function eE(){return!/^((?!chrome|android).)*safari/i.test(Sm())}function ll(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var i=e.getBoundingClientRect(),s=1,o=1;t&&zi(e)&&(s=e.offsetWidth>0&&al(i.width)/e.offsetWidth||1,o=e.offsetHeight>0&&al(i.height)/e.offsetHeight||1);var r=Xr(e)?xi(e):window,a=r.visualViewport,l=!eE()&&n,u=(i.left+(l&&a?a.offsetLeft:0))/s,c=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/s,h=i.height/o;return{width:d,height:h,top:c,right:u+d,bottom:c+h,left:u,x:u,y:c}}function Em(e){var t=ll(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function tE(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&bm(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function bo(e){return xi(e).getComputedStyle(e)}function ON(e){return["table","td","th"].indexOf(Ls(e))>=0}function tr(e){return((Xr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Dh(e){return Ls(e)==="html"?e:e.assignedSlot||e.parentNode||(bm(e)?e.host:null)||tr(e)}function nE(e){return!zi(e)||bo(e).position==="fixed"?null:e.offsetParent}function MN(e){var t=/firefox/i.test(Sm()),n=/Trident/i.test(Sm());if(n&&zi(e)){var i=bo(e);if(i.position==="fixed")return null}var s=Dh(e);for(bm(s)&&(s=s.host);zi(s)&&["html","body"].indexOf(Ls(s))<0;){var o=bo(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function Xu(e){for(var t=xi(e),n=nE(e);n&&ON(n)&&bo(n).position==="static";)n=nE(n);return n&&(Ls(n)==="html"||Ls(n)==="body"&&bo(n).position==="static")?t:n||MN(e)||t}function Rm(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Qu(e,t,n){return Qr(e,Rh(t,n))}function LN(e,t,n){var i=Qu(e,t,n);return i>n?n:i}function iE(){return{top:0,right:0,bottom:0,left:0}}function sE(e){return Object.assign({},iE(),e)}function oE(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var NN=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,sE(typeof t!="number"?t:oE(t,Yu))};function VN(e){var t,n=e.state,i=e.name,s=e.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=Ns(n.placement),l=Rm(a),u=[vi,Wi].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!r)){var d=NN(s.padding,n),h=Em(o),p=l==="y"?mi:vi,g=l==="y"?$i:Wi,C=n.rects.reference[c]+n.rects.reference[l]-r[l]-n.rects.popper[c],v=r[l]-n.rects.reference[l],S=Xu(o),R=S?l==="y"?S.clientHeight||0:S.clientWidth||0:0,E=C/2-v/2,y=d[p],b=R-h[c]-d[g],F=R/2-h[c]/2+E,x=Qu(y,F,b),V=l;n.modifiersData[i]=(t={},t[V]=x,t.centerOffset=x-F,t)}}function BN(e){var t=e.state,n=e.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||tE(t.elements.popper,s)&&(t.elements.arrow=s))}const HN={name:"arrow",enabled:!0,phase:"main",fn:VN,effect:BN,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ul(e){return e.split("-")[1]}var GN={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $N(e,t){var n=e.x,i=e.y,s=t.devicePixelRatio||1;return{x:al(n*s)/s||0,y:al(i*s)/s||0}}function rE(e){var t,n=e.popper,i=e.popperRect,s=e.placement,o=e.variation,r=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,h=r.x,p=h===void 0?0:h,g=r.y,C=g===void 0?0:g,v=typeof c=="function"?c({x:p,y:C}):{x:p,y:C};p=v.x,C=v.y;var S=r.hasOwnProperty("x"),R=r.hasOwnProperty("y"),E=vi,y=mi,b=window;if(u){var F=Xu(n),x="clientHeight",V="clientWidth";if(F===xi(n)&&(F=tr(n),bo(F).position!=="static"&&a==="absolute"&&(x="scrollHeight",V="scrollWidth")),F=F,s===mi||(s===vi||s===Wi)&&o===Zu){y=$i;var I=d&&F===b&&b.visualViewport?b.visualViewport.height:F[x];C-=I-i.height,C*=l?1:-1}if(s===vi||(s===mi||s===$i)&&o===Zu){E=Wi;var M=d&&F===b&&b.visualViewport?b.visualViewport.width:F[V];p-=M-i.width,p*=l?1:-1}}var P=Object.assign({position:a},u&&GN),N=c===!0?$N({x:p,y:C},xi(n)):{x:p,y:C};if(p=N.x,C=N.y,l){var ie;return Object.assign({},P,(ie={},ie[y]=R?"0":"",ie[E]=S?"0":"",ie.transform=(b.devicePixelRatio||1)<=1?"translate("+p+"px, "+C+"px)":"translate3d("+p+"px, "+C+"px, 0)",ie))}return Object.assign({},P,(t={},t[y]=R?C+"px":"",t[E]=S?p+"px":"",t.transform="",t))}function WN(e){var t=e.state,n=e.options,i=n.gpuAcceleration,s=i===void 0?!0:i,o=n.adaptive,r=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:Ns(t.placement),variation:ul(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,rE(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,rE(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const zN={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:WN,data:{}};var Fh={passive:!0};function UN(e){var t=e.state,n=e.instance,i=e.options,s=i.scroll,o=s===void 0?!0:s,r=i.resize,a=r===void 0?!0:r,l=xi(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,Fh)}),a&&l.addEventListener("resize",n.update,Fh),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Fh)}),a&&l.removeEventListener("resize",n.update,Fh)}}const jN={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:UN,data:{}};var KN={left:"right",right:"left",bottom:"top",top:"bottom"};function Th(e){return e.replace(/left|right|bottom|top/g,function(t){return KN[t]})}var qN={start:"end",end:"start"};function aE(e){return e.replace(/start|end/g,function(t){return qN[t]})}function Dm(e){var t=xi(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Fm(e){return ll(tr(e)).left+Dm(e).scrollLeft}function YN(e,t){var n=xi(e),i=tr(e),s=n.visualViewport,o=i.clientWidth,r=i.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var u=eE();(u||!u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Fm(e),y:l}}function ZN(e){var t,n=tr(e),i=Dm(e),s=(t=e.ownerDocument)==null?void 0:t.body,o=Qr(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Qr(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+Fm(e),l=-i.scrollTop;return bo(s||n).direction==="rtl"&&(a+=Qr(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Tm(e){var t=bo(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function lE(e){return["html","body","#document"].indexOf(Ls(e))>=0?e.ownerDocument.body:zi(e)&&Tm(e)?e:lE(Dh(e))}function ec(e,t){var n;t===void 0&&(t=[]);var i=lE(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=xi(i),r=s?[o].concat(o.visualViewport||[],Tm(i)?i:[]):i,a=t.concat(r);return s?a:a.concat(ec(Dh(r)))}function xm(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function JN(e,t){var n=ll(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function uE(e,t,n){return t===Z0?xm(YN(e,n)):Xr(t)?JN(t,n):xm(ZN(tr(e)))}function XN(e){var t=ec(Dh(e)),n=["absolute","fixed"].indexOf(bo(e).position)>=0,i=n&&zi(e)?Xu(e):e;return Xr(i)?t.filter(function(s){return Xr(s)&&tE(s,i)&&Ls(s)!=="body"}):[]}function QN(e,t,n,i){var s=t==="clippingParents"?XN(e):[].concat(t),o=[].concat(s,[n]),r=o[0],a=o.reduce(function(l,u){var c=uE(e,u,i);return l.top=Qr(c.top,l.top),l.right=Rh(c.right,l.right),l.bottom=Rh(c.bottom,l.bottom),l.left=Qr(c.left,l.left),l},uE(e,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function cE(e){var t=e.reference,n=e.element,i=e.placement,s=i?Ns(i):null,o=i?ul(i):null,r=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(s){case mi:l={x:r,y:t.y-n.height};break;case $i:l={x:r,y:t.y+t.height};break;case Wi:l={x:t.x+t.width,y:a};break;case vi:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var u=s?Rm(s):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case rl:l[u]=l[u]-(t[c]/2-n[c]/2);break;case Zu:l[u]=l[u]+(t[c]/2-n[c]/2);break}}return l}function tc(e,t){t===void 0&&(t={});var n=t,i=n.placement,s=i===void 0?e.placement:i,o=n.strategy,r=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?wN:a,u=n.rootBoundary,c=u===void 0?Z0:u,d=n.elementContext,h=d===void 0?Ju:d,p=n.altBoundary,g=p===void 0?!1:p,C=n.padding,v=C===void 0?0:C,S=sE(typeof v!="number"?v:oE(v,Yu)),R=h===Ju?bN:Ju,E=e.rects.popper,y=e.elements[g?R:h],b=QN(Xr(y)?y:y.contextElement||tr(e.elements.popper),l,c,r),F=ll(e.elements.reference),x=cE({reference:F,element:E,placement:s}),V=xm(Object.assign({},E,x)),I=h===Ju?V:F,M={top:b.top-I.top+S.top,bottom:I.bottom-b.bottom+S.bottom,left:b.left-I.left+S.left,right:I.right-b.right+S.right},P=e.modifiersData.offset;if(h===Ju&&P){var N=P[s];Object.keys(M).forEach(function(ie){var ve=[Wi,$i].indexOf(ie)>=0?1:-1,Be=[mi,$i].indexOf(ie)>=0?"y":"x";M[ie]+=N[Be]*ve})}return M}function eV(e,t){t===void 0&&(t={});var n=t,i=n.placement,s=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?X0:l,c=ul(i),d=c?a?J0:J0.filter(function(g){return ul(g)===c}):Yu,h=d.filter(function(g){return u.indexOf(g)>=0});h.length===0&&(h=d);var p=h.reduce(function(g,C){return g[C]=tc(e,{placement:C,boundary:s,rootBoundary:o,padding:r})[Ns(C)],g},{});return Object.keys(p).sort(function(g,C){return p[g]-p[C]})}function tV(e){if(Ns(e)===wm)return[];var t=Th(e);return[aE(e),t,aE(t)]}function nV(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var s=n.mainAxis,o=s===void 0?!0:s,r=n.altAxis,a=r===void 0?!0:r,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,g=p===void 0?!0:p,C=n.allowedAutoPlacements,v=t.options.placement,S=Ns(v),R=S===v,E=l||(R||!g?[Th(v)]:tV(v)),y=[v].concat(E).reduce(function(ot,tt){return ot.concat(Ns(tt)===wm?eV(t,{placement:tt,boundary:c,rootBoundary:d,padding:u,flipVariations:g,allowedAutoPlacements:C}):tt)},[]),b=t.rects.reference,F=t.rects.popper,x=new Map,V=!0,I=y[0],M=0;M<y.length;M++){var P=y[M],N=Ns(P),ie=ul(P)===rl,ve=[mi,$i].indexOf(N)>=0,Be=ve?"width":"height",ee=tc(t,{placement:P,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),U=ve?ie?Wi:vi:ie?$i:mi;b[Be]>F[Be]&&(U=Th(U));var L=Th(U),$=[];if(o&&$.push(ee[N]<=0),a&&$.push(ee[U]<=0,ee[L]<=0),$.every(function(ot){return ot})){I=P,V=!1;break}x.set(P,$)}if(V)for(var re=g?3:1,Ae=function(tt){var ht=y.find(function(xt){var qt=x.get(xt);if(qt)return qt.slice(0,tt).every(function(Je){return Je})});if(ht)return I=ht,"break"},Ie=re;Ie>0;Ie--){var Ve=Ae(Ie);if(Ve==="break")break}t.placement!==I&&(t.modifiersData[i]._skip=!0,t.placement=I,t.reset=!0)}}const iV={name:"flip",enabled:!0,phase:"main",fn:nV,requiresIfExists:["offset"],data:{_skip:!1}};function dE(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function hE(e){return[mi,Wi,$i,vi].some(function(t){return e[t]>=0})}function sV(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,r=tc(t,{elementContext:"reference"}),a=tc(t,{altBoundary:!0}),l=dE(r,i),u=dE(a,s,o),c=hE(l),d=hE(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const oV={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sV};function rV(e,t,n){var i=Ns(e),s=[vi,mi].indexOf(i)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[vi,Wi].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function aV(e){var t=e.state,n=e.options,i=e.name,s=n.offset,o=s===void 0?[0,0]:s,r=X0.reduce(function(c,d){return c[d]=rV(d,t.rects,o),c},{}),a=r[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[i]=r}const lV={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:aV};function uV(e){var t=e.state,n=e.name;t.modifiersData[n]=cE({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const cV={name:"popperOffsets",enabled:!0,phase:"read",fn:uV,data:{}};function dV(e){return e==="x"?"y":"x"}function hV(e){var t=e.state,n=e.options,i=e.name,s=n.mainAxis,o=s===void 0?!0:s,r=n.altAxis,a=r===void 0?!1:r,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,h=n.tether,p=h===void 0?!0:h,g=n.tetherOffset,C=g===void 0?0:g,v=tc(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),S=Ns(t.placement),R=ul(t.placement),E=!R,y=Rm(S),b=dV(y),F=t.modifiersData.popperOffsets,x=t.rects.reference,V=t.rects.popper,I=typeof C=="function"?C(Object.assign({},t.rects,{placement:t.placement})):C,M=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(F){if(o){var ie,ve=y==="y"?mi:vi,Be=y==="y"?$i:Wi,ee=y==="y"?"height":"width",U=F[y],L=U+v[ve],$=U-v[Be],re=p?-V[ee]/2:0,Ae=R===rl?x[ee]:V[ee],Ie=R===rl?-V[ee]:-x[ee],Ve=t.elements.arrow,ot=p&&Ve?Em(Ve):{width:0,height:0},tt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:iE(),ht=tt[ve],xt=tt[Be],qt=Qu(0,x[ee],ot[ee]),Je=E?x[ee]/2-re-qt-ht-M.mainAxis:Ae-qt-ht-M.mainAxis,Cn=E?-x[ee]/2+re+qt+xt+M.mainAxis:Ie+qt+xt+M.mainAxis,Wt=t.elements.arrow&&Xu(t.elements.arrow),_t=Wt?y==="y"?Wt.clientTop||0:Wt.clientLeft||0:0,O=(ie=P==null?void 0:P[y])!=null?ie:0,W=U+Je-O-_t,ue=U+Cn-O,Fe=Qu(p?Rh(L,W):L,U,p?Qr($,ue):$);F[y]=Fe,N[y]=Fe-U}if(a){var we,Ee=y==="x"?mi:vi,ke=y==="x"?$i:Wi,Pe=F[b],Te=b==="y"?"height":"width",Re=Pe+v[Ee],st=Pe-v[ke],He=[mi,vi].indexOf(S)!==-1,pe=(we=P==null?void 0:P[b])!=null?we:0,le=He?Re:Pe-x[Te]-V[Te]-pe+M.altAxis,Ke=He?Pe+x[Te]+V[Te]-pe-M.altAxis:st,Qe=p&&He?LN(le,Pe,Ke):Qu(p?le:Re,Pe,p?Ke:st);F[b]=Qe,N[b]=Qe-Pe}t.modifiersData[i]=N}}const fV={name:"preventOverflow",enabled:!0,phase:"main",fn:hV,requiresIfExists:["offset"]};function pV(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function gV(e){return e===xi(e)||!zi(e)?Dm(e):pV(e)}function mV(e){var t=e.getBoundingClientRect(),n=al(t.width)/e.offsetWidth||1,i=al(t.height)/e.offsetHeight||1;return n!==1||i!==1}function vV(e,t,n){n===void 0&&(n=!1);var i=zi(t),s=zi(t)&&mV(t),o=tr(t),r=ll(e,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((Ls(t)!=="body"||Tm(o))&&(a=gV(t)),zi(t)?(l=ll(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Fm(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function CV(e){var t=new Map,n=new Set,i=[];e.forEach(function(o){t.set(o.name,o)});function s(o){n.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&s(l)}}),i.push(o)}return e.forEach(function(o){n.has(o.name)||s(o)}),i}function yV(e){var t=CV(e);return AN.reduce(function(n,i){return n.concat(t.filter(function(s){return s.phase===i}))},[])}function wV(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function bV(e){var t=e.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var fE={placement:"bottom",modifiers:[],strategy:"absolute"};function pE(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function SV(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,s=t.defaultOptions,o=s===void 0?fE:s;return function(a,l,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},fE,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],h=!1,p={state:c,setOptions:function(S){var R=typeof S=="function"?S(c.options):S;C(),c.options=Object.assign({},o,c.options,R),c.scrollParents={reference:Xr(a)?ec(a):a.contextElement?ec(a.contextElement):[],popper:ec(l)};var E=yV(bV([].concat(i,c.options.modifiers)));return c.orderedModifiers=E.filter(function(y){return y.enabled}),g(),p.update()},forceUpdate:function(){if(!h){var S=c.elements,R=S.reference,E=S.popper;if(pE(R,E)){c.rects={reference:vV(R,Xu(E),c.options.strategy==="fixed"),popper:Em(E)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(M){return c.modifiersData[M.name]=Object.assign({},M.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===!0){c.reset=!1,y=-1;continue}var b=c.orderedModifiers[y],F=b.fn,x=b.options,V=x===void 0?{}:x,I=b.name;typeof F=="function"&&(c=F({state:c,options:V,name:I,instance:p})||c)}}}},update:wV(function(){return new Promise(function(v){p.forceUpdate(),v(c)})}),destroy:function(){C(),h=!0}};if(!pE(a,l))return p;p.setOptions(u).then(function(v){!h&&u.onFirstUpdate&&u.onFirstUpdate(v)});function g(){c.orderedModifiers.forEach(function(v){var S=v.name,R=v.options,E=R===void 0?{}:R,y=v.effect;if(typeof y=="function"){var b=y({state:c,name:S,instance:p,options:E}),F=function(){};d.push(b||F)}})}function C(){d.forEach(function(v){return v()}),d=[]}return p}}var EV=[jN,cV,zN,Q0,lV,iV,fV,HN,oV],RV=SV({defaultModifiers:EV}),DV="tippy-box",gE="tippy-content",FV="tippy-backdrop",mE="tippy-arrow",vE="tippy-svg-arrow",ea={passive:!0,capture:!0},CE=function(){return document.body};function TV(e,t){return{}.hasOwnProperty.call(e,t)}function _m(e,t,n){if(Array.isArray(e)){var i=e[t];return i??(Array.isArray(n)?n[t]:n)}return e}function Pm(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function yE(e,t){return typeof e=="function"?e.apply(void 0,t):e}function wE(e,t){if(t===0)return e;var n;return function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)}}function xV(e,t){var n=Object.assign({},e);return t.forEach(function(i){delete n[i]}),n}function _V(e){return e.split(/\s+/).filter(Boolean)}function cl(e){return[].concat(e)}function bE(e,t){e.indexOf(t)===-1&&e.push(t)}function PV(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function AV(e){return e.split("-")[0]}function xh(e){return[].slice.call(e)}function SE(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function nc(){return document.createElement("div")}function ic(e){return["Element","Fragment"].some(function(t){return Pm(e,t)})}function IV(e){return Pm(e,"NodeList")}function kV(e){return Pm(e,"MouseEvent")}function OV(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function MV(e){return ic(e)?[e]:IV(e)?xh(e):Array.isArray(e)?e:xh(document.querySelectorAll(e))}function Am(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function EE(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function LV(e){var t,n=cl(e),i=n[0];return i!=null&&(t=i.ownerDocument)!=null&&t.body?i.ownerDocument:document}function NV(e,t){var n=t.clientX,i=t.clientY;return e.every(function(s){var o=s.popperRect,r=s.popperState,a=s.props,l=a.interactiveBorder,u=AV(r.placement),c=r.modifiersData.offset;if(!c)return!0;var d=u==="bottom"?c.top.y:0,h=u==="top"?c.bottom.y:0,p=u==="right"?c.left.x:0,g=u==="left"?c.right.x:0,C=o.top-i+d>l,v=i-o.bottom-h>l,S=o.left-n+p>l,R=n-o.right-g>l;return C||v||S||R})}function Im(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(s){e[i](s,n)})}function RE(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=n.getRootNode==null||(i=n.getRootNode())==null?void 0:i.host}return!1}var Vs={isTouch:!1},DE=0;function VV(){Vs.isTouch||(Vs.isTouch=!0,window.performance&&document.addEventListener("mousemove",FE))}function FE(){var e=performance.now();e-DE<20&&(Vs.isTouch=!1,document.removeEventListener("mousemove",FE)),DE=e}function BV(){var e=document.activeElement;if(OV(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function HV(){document.addEventListener("touchstart",VV,ea),window.addEventListener("blur",BV)}var GV=typeof window<"u"&&typeof document<"u",$V=GV?!!window.msCrypto:!1;function dl(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function TE(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function WV(e){return TE(`
30
+ %ctippy.js
31
+
32
+ %c`+TE(e)+`
33
+
34
+ %c👷‍ This is a development-only message. It will be removed in production.
35
+ `)}function xE(e){return[WV(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var sc;A.env.NODE_ENV!=="production"&&zV();function zV(){sc=new Set}function So(e,t){if(e&&!sc.has(t)){var n;sc.add(t),(n=console).warn.apply(n,xE(t))}}function km(e,t){if(e&&!sc.has(t)){var n;sc.add(t),(n=console).error.apply(n,xE(t))}}function UV(e){var t=!e,n=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;km(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),km(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var _E={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},jV={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},_i=Object.assign({appendTo:CE,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},_E,jV),KV=Object.keys(_i),qV=function(t){A.env.NODE_ENV!=="production"&&IE(t,[]);var n=Object.keys(t);n.forEach(function(i){_i[i]=t[i]})};function PE(e){var t=e.plugins||[],n=t.reduce(function(i,s){var o=s.name,r=s.defaultValue;if(o){var a;i[o]=e[o]!==void 0?e[o]:(a=_i[o])!=null?a:r}return i},{});return Object.assign({},e,n)}function YV(e,t){var n=t?Object.keys(PE(Object.assign({},_i,{plugins:t}))):KV,i=n.reduce(function(s,o){var r=(e.getAttribute("data-tippy-"+o)||"").trim();if(!r)return s;if(o==="content")s[o]=r;else try{s[o]=JSON.parse(r)}catch{s[o]=r}return s},{});return i}function AE(e,t){var n=Object.assign({},t,{content:yE(t.content,[e])},t.ignoreAttributes?{}:YV(e,t.plugins));return n.aria=Object.assign({},_i.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}function IE(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=Object.keys(e);n.forEach(function(i){var s=xV(_i,Object.keys(_E)),o=!TV(s,i);o&&(o=t.filter(function(r){return r.name===i}).length===0),So(o,["`"+i+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
36
+
37
+ `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
38
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var ZV=function(){return"innerHTML"};function Om(e,t){e[ZV()]=t}function kE(e){var t=nc();return e===!0?t.className=mE:(t.className=vE,ic(e)?t.appendChild(e):Om(t,e)),t}function OE(e,t){ic(t.content)?(Om(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Om(e,t.content):e.textContent=t.content)}function Mm(e){var t=e.firstElementChild,n=xh(t.children);return{box:t,content:n.find(function(i){return i.classList.contains(gE)}),arrow:n.find(function(i){return i.classList.contains(mE)||i.classList.contains(vE)}),backdrop:n.find(function(i){return i.classList.contains(FV)})}}function ME(e){var t=nc(),n=nc();n.className=DV,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=nc();i.className=gE,i.setAttribute("data-state","hidden"),OE(i,e.props),t.appendChild(n),n.appendChild(i),s(e.props,e.props);function s(o,r){var a=Mm(t),l=a.box,u=a.content,c=a.arrow;r.theme?l.setAttribute("data-theme",r.theme):l.removeAttribute("data-theme"),typeof r.animation=="string"?l.setAttribute("data-animation",r.animation):l.removeAttribute("data-animation"),r.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof r.maxWidth=="number"?r.maxWidth+"px":r.maxWidth,r.role?l.setAttribute("role",r.role):l.removeAttribute("role"),(o.content!==r.content||o.allowHTML!==r.allowHTML)&&OE(u,e.props),r.arrow?c?o.arrow!==r.arrow&&(l.removeChild(c),l.appendChild(kE(r.arrow))):l.appendChild(kE(r.arrow)):c&&l.removeChild(c)}return{popper:t,onUpdate:s}}ME.$$tippy=!0;var JV=1,_h=[],Lm=[];function XV(e,t){var n=AE(e,Object.assign({},_i,PE(SE(t)))),i,s,o,r=!1,a=!1,l=!1,u=!1,c,d,h,p=[],g=wE(W,n.interactiveDebounce),C,v=JV++,S=null,R=PV(n.plugins),E={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:v,reference:e,popper:nc(),popperInstance:S,props:n,state:E,plugins:R,clearDelayTimeouts:le,setProps:Ke,setContent:Qe,show:Ft,hide:en,hideWithInteractivity:Yt,enable:He,disable:pe,unmount:On,destroy:ei};if(!n.render)return A.env.NODE_ENV!=="production"&&km(!0,"render() function has not been supplied."),y;var b=n.render(y),F=b.popper,x=b.onUpdate;F.setAttribute("data-tippy-root",""),F.id="tippy-"+y.id,y.popper=F,e._tippy=y,F._tippy=y;var V=R.map(function(fe){return fe.fn(y)}),I=e.hasAttribute("aria-expanded");return Wt(),re(),U(),L("onCreate",[y]),n.showOnCreate&&Re(),F.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),F.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&ve().addEventListener("mousemove",g)}),y;function M(){var fe=y.props.touch;return Array.isArray(fe)?fe:[fe,0]}function P(){return M()[0]==="hold"}function N(){var fe;return!!((fe=y.props.render)!=null&&fe.$$tippy)}function ie(){return C||e}function ve(){var fe=ie().parentNode;return fe?LV(fe):document}function Be(){return Mm(F)}function ee(fe){return y.state.isMounted&&!y.state.isVisible||Vs.isTouch||c&&c.type==="focus"?0:_m(y.props.delay,fe?0:1,_i.delay)}function U(fe){fe===void 0&&(fe=!1),F.style.pointerEvents=y.props.interactive&&!fe?"":"none",F.style.zIndex=""+y.props.zIndex}function L(fe,be,et){if(et===void 0&&(et=!0),V.forEach(function(Pt){Pt[fe]&&Pt[fe].apply(Pt,be)}),et){var Ct;(Ct=y.props)[fe].apply(Ct,be)}}function $(){var fe=y.props.aria;if(fe.content){var be="aria-"+fe.content,et=F.id,Ct=cl(y.props.triggerTarget||e);Ct.forEach(function(Pt){var Me=Pt.getAttribute(be);if(y.state.isVisible)Pt.setAttribute(be,Me?Me+" "+et:et);else{var ti=Me&&Me.replace(et,"").trim();ti?Pt.setAttribute(be,ti):Pt.removeAttribute(be)}})}}function re(){if(!(I||!y.props.aria.expanded)){var fe=cl(y.props.triggerTarget||e);fe.forEach(function(be){y.props.interactive?be.setAttribute("aria-expanded",y.state.isVisible&&be===ie()?"true":"false"):be.removeAttribute("aria-expanded")})}}function Ae(){ve().removeEventListener("mousemove",g),_h=_h.filter(function(fe){return fe!==g})}function Ie(fe){if(!(Vs.isTouch&&(l||fe.type==="mousedown"))){var be=fe.composedPath&&fe.composedPath()[0]||fe.target;if(!(y.props.interactive&&RE(F,be))){if(cl(y.props.triggerTarget||e).some(function(et){return RE(et,be)})){if(Vs.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else L("onClickOutside",[y,fe]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),a=!0,setTimeout(function(){a=!1}),y.state.isMounted||ht())}}}function Ve(){l=!0}function ot(){l=!1}function tt(){var fe=ve();fe.addEventListener("mousedown",Ie,!0),fe.addEventListener("touchend",Ie,ea),fe.addEventListener("touchstart",ot,ea),fe.addEventListener("touchmove",Ve,ea)}function ht(){var fe=ve();fe.removeEventListener("mousedown",Ie,!0),fe.removeEventListener("touchend",Ie,ea),fe.removeEventListener("touchstart",ot,ea),fe.removeEventListener("touchmove",Ve,ea)}function xt(fe,be){Je(fe,function(){!y.state.isVisible&&F.parentNode&&F.parentNode.contains(F)&&be()})}function qt(fe,be){Je(fe,be)}function Je(fe,be){var et=Be().box;function Ct(Pt){Pt.target===et&&(Im(et,"remove",Ct),be())}if(fe===0)return be();Im(et,"remove",d),Im(et,"add",Ct),d=Ct}function Cn(fe,be,et){et===void 0&&(et=!1);var Ct=cl(y.props.triggerTarget||e);Ct.forEach(function(Pt){Pt.addEventListener(fe,be,et),p.push({node:Pt,eventType:fe,handler:be,options:et})})}function Wt(){P()&&(Cn("touchstart",O,{passive:!0}),Cn("touchend",ue,{passive:!0})),_V(y.props.trigger).forEach(function(fe){if(fe!=="manual")switch(Cn(fe,O),fe){case"mouseenter":Cn("mouseleave",ue);break;case"focus":Cn($V?"focusout":"blur",Fe);break;case"focusin":Cn("focusout",Fe);break}})}function _t(){p.forEach(function(fe){var be=fe.node,et=fe.eventType,Ct=fe.handler,Pt=fe.options;be.removeEventListener(et,Ct,Pt)}),p=[]}function O(fe){var be,et=!1;if(!(!y.state.isEnabled||we(fe)||a)){var Ct=((be=c)==null?void 0:be.type)==="focus";c=fe,C=fe.currentTarget,re(),!y.state.isVisible&&kV(fe)&&_h.forEach(function(Pt){return Pt(fe)}),fe.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||r)&&y.props.hideOnClick!==!1&&y.state.isVisible?et=!0:Re(fe),fe.type==="click"&&(r=!et),et&&!Ct&&st(fe)}}function W(fe){var be=fe.target,et=ie().contains(be)||F.contains(be);if(!(fe.type==="mousemove"&&et)){var Ct=Te().concat(F).map(function(Pt){var Me,ti=Pt._tippy,zo=(Me=ti.popperInstance)==null?void 0:Me.state;return zo?{popperRect:Pt.getBoundingClientRect(),popperState:zo,props:n}:null}).filter(Boolean);NV(Ct,fe)&&(Ae(),st(fe))}}function ue(fe){var be=we(fe)||y.props.trigger.indexOf("click")>=0&&r;if(!be){if(y.props.interactive){y.hideWithInteractivity(fe);return}st(fe)}}function Fe(fe){y.props.trigger.indexOf("focusin")<0&&fe.target!==ie()||y.props.interactive&&fe.relatedTarget&&F.contains(fe.relatedTarget)||st(fe)}function we(fe){return Vs.isTouch?P()!==fe.type.indexOf("touch")>=0:!1}function Ee(){ke();var fe=y.props,be=fe.popperOptions,et=fe.placement,Ct=fe.offset,Pt=fe.getReferenceClientRect,Me=fe.moveTransition,ti=N()?Mm(F).arrow:null,zo=Pt?{getBoundingClientRect:Pt,contextElement:Pt.contextElement||ie()}:e,gu={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(mu){var Tr=mu.state;if(N()){var xr=Be(),lo=xr.box;["placement","reference-hidden","escaped"].forEach(function(_r){_r==="placement"?lo.setAttribute("data-placement",Tr.placement):Tr.attributes.popper["data-popper-"+_r]?lo.setAttribute("data-"+_r,""):lo.removeAttribute("data-"+_r)}),Tr.attributes.popper={}}}},ao=[{name:"offset",options:{offset:Ct}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Me}},gu];N()&&ti&&ao.push({name:"arrow",options:{element:ti,padding:3}}),ao.push.apply(ao,(be==null?void 0:be.modifiers)||[]),y.popperInstance=RV(zo,F,Object.assign({},be,{placement:et,onFirstUpdate:h,modifiers:ao}))}function ke(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Pe(){var fe=y.props.appendTo,be,et=ie();y.props.interactive&&fe===CE||fe==="parent"?be=et.parentNode:be=yE(fe,[et]),be.contains(F)||be.appendChild(F),y.state.isMounted=!0,Ee(),A.env.NODE_ENV!=="production"&&So(y.props.interactive&&fe===_i.appendTo&&et.nextElementSibling!==F,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
39
+
40
+ `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
41
+
42
+ `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
43
+
44
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Te(){return xh(F.querySelectorAll("[data-tippy-root]"))}function Re(fe){y.clearDelayTimeouts(),fe&&L("onTrigger",[y,fe]),tt();var be=ee(!0),et=M(),Ct=et[0],Pt=et[1];Vs.isTouch&&Ct==="hold"&&Pt&&(be=Pt),be?i=setTimeout(function(){y.show()},be):y.show()}function st(fe){if(y.clearDelayTimeouts(),L("onUntrigger",[y,fe]),!y.state.isVisible){ht();return}if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(fe.type)>=0&&r)){var be=ee(!1);be?s=setTimeout(function(){y.state.isVisible&&y.hide()},be):o=requestAnimationFrame(function(){y.hide()})}}function He(){y.state.isEnabled=!0}function pe(){y.hide(),y.state.isEnabled=!1}function le(){clearTimeout(i),clearTimeout(s),cancelAnimationFrame(o)}function Ke(fe){if(A.env.NODE_ENV!=="production"&&So(y.state.isDestroyed,dl("setProps")),!y.state.isDestroyed){L("onBeforeUpdate",[y,fe]),_t();var be=y.props,et=AE(e,Object.assign({},be,SE(fe),{ignoreAttributes:!0}));y.props=et,Wt(),be.interactiveDebounce!==et.interactiveDebounce&&(Ae(),g=wE(W,et.interactiveDebounce)),be.triggerTarget&&!et.triggerTarget?cl(be.triggerTarget).forEach(function(Ct){Ct.removeAttribute("aria-expanded")}):et.triggerTarget&&e.removeAttribute("aria-expanded"),re(),U(),x&&x(be,et),y.popperInstance&&(Ee(),Te().forEach(function(Ct){requestAnimationFrame(Ct._tippy.popperInstance.forceUpdate)})),L("onAfterUpdate",[y,fe])}}function Qe(fe){y.setProps({content:fe})}function Ft(){A.env.NODE_ENV!=="production"&&So(y.state.isDestroyed,dl("show"));var fe=y.state.isVisible,be=y.state.isDestroyed,et=!y.state.isEnabled,Ct=Vs.isTouch&&!y.props.touch,Pt=_m(y.props.duration,0,_i.duration);if(!(fe||be||et||Ct)&&!ie().hasAttribute("disabled")&&(L("onShow",[y],!1),y.props.onShow(y)!==!1)){if(y.state.isVisible=!0,N()&&(F.style.visibility="visible"),U(),tt(),y.state.isMounted||(F.style.transition="none"),N()){var Me=Be(),ti=Me.box,zo=Me.content;Am([ti,zo],0)}h=function(){var ao;if(!(!y.state.isVisible||u)){if(u=!0,F.offsetHeight,F.style.transition=y.props.moveTransition,N()&&y.props.animation){var Va=Be(),mu=Va.box,Tr=Va.content;Am([mu,Tr],Pt),EE([mu,Tr],"visible")}$(),re(),bE(Lm,y),(ao=y.popperInstance)==null||ao.forceUpdate(),L("onMount",[y]),y.props.animation&&N()&&qt(Pt,function(){y.state.isShown=!0,L("onShown",[y])})}},Pe()}}function en(){A.env.NODE_ENV!=="production"&&So(y.state.isDestroyed,dl("hide"));var fe=!y.state.isVisible,be=y.state.isDestroyed,et=!y.state.isEnabled,Ct=_m(y.props.duration,1,_i.duration);if(!(fe||be||et)&&(L("onHide",[y],!1),y.props.onHide(y)!==!1)){if(y.state.isVisible=!1,y.state.isShown=!1,u=!1,r=!1,N()&&(F.style.visibility="hidden"),Ae(),ht(),U(!0),N()){var Pt=Be(),Me=Pt.box,ti=Pt.content;y.props.animation&&(Am([Me,ti],Ct),EE([Me,ti],"hidden"))}$(),re(),y.props.animation?N()&&xt(Ct,y.unmount):y.unmount()}}function Yt(fe){A.env.NODE_ENV!=="production"&&So(y.state.isDestroyed,dl("hideWithInteractivity")),ve().addEventListener("mousemove",g),bE(_h,g),g(fe)}function On(){A.env.NODE_ENV!=="production"&&So(y.state.isDestroyed,dl("unmount")),y.state.isVisible&&y.hide(),y.state.isMounted&&(ke(),Te().forEach(function(fe){fe._tippy.unmount()}),F.parentNode&&F.parentNode.removeChild(F),Lm=Lm.filter(function(fe){return fe!==y}),y.state.isMounted=!1,L("onHidden",[y]))}function ei(){A.env.NODE_ENV!=="production"&&So(y.state.isDestroyed,dl("destroy")),!y.state.isDestroyed&&(y.clearDelayTimeouts(),y.unmount(),_t(),delete e._tippy,y.state.isDestroyed=!0,L("onDestroy",[y]))}}function nr(e,t){t===void 0&&(t={});var n=_i.plugins.concat(t.plugins||[]);A.env.NODE_ENV!=="production"&&(UV(e),IE(t,n)),HV();var i=Object.assign({},t,{plugins:n}),s=MV(e);if(A.env.NODE_ENV!=="production"){var o=ic(i.content),r=s.length>1;So(o&&r,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
45
+
46
+ `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
47
+
48
+ `,`1) content: element.innerHTML
49
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var a=s.reduce(function(l,u){var c=u&&XV(u,i);return c&&l.push(c),l},[]);return ic(e)?a[0]:a}nr.defaultProps=_i,nr.setDefaultProps=qV,nr.currentInput=Vs,Object.assign({},Q0,{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)}}),nr.setDefaultProps({render:ME});const LE={arrow:!0,allowHTML:!0,interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,theme:"light"},NE={...LE,maxWidth:"none"};function VE(e,t){const n=nr(e,{...LE,...t});return Array.isArray(n)?n[0]:n}function Ph(e){if(e)try{e.destroy()}catch(t){console.warn("Error destroying tippy instance:",t)}}function QV(e,t){if(!t)return;(Array.isArray(t)?t:[t]).forEach(i=>{i!=null&&i.trim()&&e.classList.add(i.trim())})}function Nm(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 Ah={placement:"top",trigger:"mouseenter focus",hideOnClick:!0,delay:[1e3,0],theme:"arbo",contentClass:"extra-padding",bypassOverflowCheck:!0,content:""},BE=(e,t)=>{if(!t||!e.popper)return;const n=e.popper.querySelector(".tippy-content");n&&QV(n,t)},HE=(e,t,n)=>typeof n=="string"?!0:t===!0||Nm(e),GE=(e,t)=>{let n={...Ah};typeof t=="string"?n.content=String(t):n={...Ah,...t};const i=Nm(e),s=typeof n=="object"?n.bypassOverflowCheck:!1;return i&&!s&&(n.delay=[1e3,100]),VE(e,{...NE,appendTo:e.ownerDocument.body,content:n.content,placement:n.placement,trigger:n.trigger,hideOnClick:n.hideOnClick,delay:n.delay,theme:n.theme||"arbo",onShow(o){BE(o,n.contentClass)}})},eB=(e,t)=>{let n={...Ah};typeof t=="string"?n.content=String(t):n={...Ah,...t};const i=Nm(e),s=typeof n=="object"?n.bypassOverflowCheck:!1;i&&!s&&(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(o){BE(o,n.contentClass)}}):e._tooltipInstance=GE(e,n)},wn={mounted(e,t){e.classList.add("arbo-tooltip-wrapper");const n=t.value;(typeof n=="string"?n:n!=null&&n.content)&&In(()=>{HE(e,typeof n=="object"?n.bypassOverflowCheck:void 0,n)&&(e._tooltipInstance=GE(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 u=c=>{};e.addEventListener(l,u)})})},updated(e,t){In(()=>{const n=t.value;if(!HE(e,typeof n=="object"?n.bypassOverflowCheck:void 0,n)){Ph(e._tooltipInstance),delete e._tooltipInstance;return}t.value!==t.oldValue&&(typeof n=="string"?n:n!=null&&n.content)&&eB(e,n)})},beforeUnmount(e){Ph(e._tooltipInstance),delete e._tooltipInstance},unmounted(e){Ph(e._tooltipInstance),delete e._tooltipInstance}};function tB(e,t,n){const i=document.createElement("div");i.className=n;const s=U0(e,t);return s.mount(i),{container:i,app:s}}function Ih(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 nB(e,t){e._vueApp=t}const iB=e=>{const{container:t,app:n}=tB(B3,{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 nB(t,n),t},$E=e=>{e._userProfileContainer&&(Ih(e._userProfileContainer),delete e._userProfileContainer),e._userProfileInstance&&(Ph(e._userProfileInstance),delete e._userProfileInstance),e.style.cursor="",e.classList.remove("user-profile-trigger")},WE={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=VE(e,{...NE,delay:[1e3,0],content:n.user.name||"User",placement:n.placement||"bottom-start",trigger:"mouseenter focus",onShow(s){e._userProfileContainer&&Ih(e._userProfileContainer);const o=iB(n);e._userProfileContainer=o,s.setContent(o)},onHidden(){setTimeout(()=>{e._userProfileContainer&&(Ih(e._userProfileContainer),e._userProfileContainer=void 0)},200)},onDestroy(){e._userProfileContainer&&(Ih(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){$E(e)},unmounted(e){$E(e)}},sB=["type","disabled","aria-readonly"],oB={key:0},rB=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}},emits:["handleClick"],setup(e,{emit:t}){const n=wn,i=e,s=t,o=["primary","secondary","tertiary","text","menu-item"],r=G(()=>Array.isArray(i.variant)?i.variant:[i.variant]),a=Sh(),l=G(()=>{const C=[a.customButton],v=r.value.find(S=>o.includes(S))||"primary";return C.push(a[`is-${v}`]),r.value.includes("danger")&&C.push(a["is-danger"]),r.value.includes("icon")&&C.push(a["is-icon"]),i.readOnly&&C.push(a["is-readonly"]),i.rounded&&C.push(a["is-rounded"]),i.border&&C.push(a["has-border"]),i.highlightOnHover&&C.push(a["highlight-on-hover"]),p.value&&C.push(a["has-prefix"]),g.value&&C.push(a["has-suffix"]),i.actived&&C.push(a["is-active"]),i.disabled&&C.push(a.disabled),typeof i.size=="string"&&C.push(a[`size-${i.size}`]),C}),u=G(()=>i.readOnly===!0),c=G(()=>typeof i.size=="number"?{"--button-size":`${i.size}px`}:{}),d=C=>{var v;i.disabled||i.readOnly||(s("handleClick",C),(v=i.action)==null||v.call(i))},h=DS(),p=G(()=>!!h.prefix),g=G(()=>!!h.suffix);return(C,v)=>(j(),Ce("button",{class:z(l.value),type:i.type,disabled:i.disabled,"aria-readonly":u.value,style:hn(c.value),onClick:d},[vt(C.$slots,"prefix"),vt(C.$slots,"default",{},()=>[e.label?ut((j(),Ce("span",oB,[bt(yt(e.label),1)])),[[Z(n),{content:e.label}]]):at("",!0)]),vt(C.$slots,"suffix")],14,sB))}}),aB={customButton:"_customButton_zrfrx_1","size-extra-small":"_size-extra-small_zrfrx_21","size-small":"_size-small_zrfrx_26","size-medium":"_size-medium_zrfrx_31","size-large":"_size-large_zrfrx_36","size-default":"_size-default_zrfrx_41","is-primary":"_is-primary_zrfrx_44","is-active":"_is-active_zrfrx_51","is-danger":"_is-danger_zrfrx_54","is-secondary":"_is-secondary_zrfrx_63","is-tertiary":"_is-tertiary_zrfrx_87","is-text":"_is-text_zrfrx_106","is-menu-item":"_is-menu-item_zrfrx_122","is-icon":"_is-icon_zrfrx_154","is-readonly":"_is-readonly_zrfrx_172","is-rounded":"_is-rounded_zrfrx_176","has-border":"_has-border_zrfrx_179","highlight-on-hover":"_highlight-on-hover_zrfrx_182","icon-wrapper":"_icon-wrapper_zrfrx_182"},Et=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},gt=Et(rB,[["__cssModules",{$style:aB}]]);/*!
50
+ * Compressor.js v1.2.1
51
+ * https://fengyuanchen.github.io/compressorjs
52
+ *
53
+ * Copyright 2018-present Chen Fengyuan
54
+ * Released under the MIT license
55
+ *
56
+ * Date: 2023-02-28T14:09:41.732Z
57
+ */function zE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function kh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zE(Object(n),!0).forEach(function(i){cB(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zE(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function lB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UE(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,jE(i.key),i)}}function uB(e,t,n){return t&&UE(e.prototype,t),n&&UE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cB(e,t,n){return t=jE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oh(){return Oh=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},Oh.apply(this,arguments)}function dB(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 jE(e){var t=dB(e,"string");return typeof t=="symbol"?t:String(t)}var KE={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}}(),s=i&&t.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),o=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,r=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,a=(i||o)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(l){var u,c,d,h,p,g,C,v,S;if(u=l.match(r),!u)throw new Error("invalid data URI");for(c=u[2]?u[1]:"text/plain"+(u[3]||";charset=US-ASCII"),d=!!u[4],h=l.slice(u[0].length),d?p=atob(h):p=decodeURIComponent(h),g=new ArrayBuffer(p.length),C=new Uint8Array(g),v=0;v<p.length;v+=1)C[v]=p.charCodeAt(v);return i?new Blob([s?C:g],{type:c}):(S=new o,S.append(g),S.getBlob(c))};t.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(l,u,c){var d=this;setTimeout(function(){c&&n.toDataURL&&a?l(a(d.toDataURL(u,c))):l(d.mozGetAsFile("blob",u))})}:n.toDataURL&&a&&(n.msToBlob?n.toBlob=function(l,u,c){var d=this;setTimeout(function(){(u&&u!=="image/png"||c)&&n.toDataURL&&a?l(a(d.toDataURL(u,c))):l(d.msToBlob(u))})}:n.toBlob=function(l,u,c){var d=this;setTimeout(function(){l(a(d.toDataURL(u,c)))})})),e.exports?e.exports=a:t.dataURLtoBlob=a}(window)})(KE);var qE=KE.exports,hB=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},YE={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},fB=typeof window<"u"&&typeof window.document<"u",ir=fB?window:{},Mh=function(t){return t>0&&t<1/0},pB=Array.prototype.slice;function Vm(e){return Array.from?Array.from(e):pB.call(e)}var gB=/^image\/.+$/;function Bm(e){return gB.test(e)}function mB(e){var t=Bm(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var ZE=String.fromCharCode;function vB(e,t,n){var i="",s;for(n+=t,s=t;s<n;s+=1)i+=ZE(e.getUint8(s));return i}var CB=ir.btoa;function JE(e,t){for(var n=[],i=8192,s=new Uint8Array(e);s.length>0;)n.push(ZE.apply(null,Vm(s.subarray(0,i)))),s=s.subarray(i);return"data:".concat(t,";base64,").concat(CB(n.join("")))}function yB(e){var t=new DataView(e),n;try{var i,s,o;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){s=a;break}a+=1}if(s){var l=s+4,u=s+10;if(vB(t,l,4)==="Exif"){var c=t.getUint16(u);if(i=c===18761,(i||c===19789)&&t.getUint16(u+2,i)===42){var d=t.getUint32(u+4,i);d>=8&&(o=u+d)}}}if(o){var h=t.getUint16(o,i),p,g;for(g=0;g<h;g+=1)if(p=o+g*12+2,t.getUint16(p,i)===274){p+=8,n=t.getUint16(p,i),t.setUint16(p,1,i);break}}}catch{n=1}return n}function wB(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 bB=/\.\d*(?:0|9){12}\d*$/;function XE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return bB.test(e)?Math.round(e*t)/t:e}function oc(e){var t=e.aspectRatio,n=e.height,i=e.width,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",o=Mh(i),r=Mh(n);if(o&&r){var a=n*t;(s==="contain"||s==="none")&&a>i||s==="cover"&&a<i?n=i/t:i=n*t}else o?n=i/t:r&&(i=n*t);return{width:i,height:n}}function SB(e){for(var t=Vm(new Uint8Array(e)),n=t.length,i=[],s=0;s+3<n;){var o=t[s],r=t[s+1];if(o===255&&r===218)break;if(o===255&&r===216)s+=2;else{var a=t[s+2]*256+t[s+3],l=s+a+2,u=t.slice(s,l);i.push(u),s=l}}return i.reduce(function(c,d){return d[0]===255&&d[1]===225?c.concat(d):c},[])}function EB(e,t){var n=Vm(new Uint8Array(e));if(n[2]!==255||n[3]!==224)return e;var i=n[4]*256+n[5],s=[255,216].concat(t,n.slice(4+i));return new Uint8Array(s)}var RB=ir.ArrayBuffer,Hm=ir.FileReader,ta=ir.URL||ir.webkitURL,DB=/\.\w+$/,FB=ir.Compressor,TB=function(){function e(t,n){lB(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=kh(kh({},YE),n),this.aborted=!1,this.result=null,this.init()}return uB(e,[{key:"init",value:function(){var n=this,i=this.file,s=this.options;if(!hB(i)){this.fail(new Error("The first argument must be a File or Blob object."));return}var o=i.type;if(!Bm(o)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!ta||!Hm){this.fail(new Error("The current browser does not support image compression."));return}RB||(s.checkOrientation=!1,s.retainExif=!1);var r=o==="image/jpeg",a=r&&s.checkOrientation,l=r&&s.retainExif;if(ta&&!a&&!l)this.load({url:ta.createObjectURL(i)});else{var u=new Hm;this.reader=u,u.onload=function(c){var d=c.target,h=d.result,p={},g=1;a&&(g=yB(h),g>1&&Oh(p,wB(g))),l&&(n.exif=SB(h)),a||l?!ta||g>1?p.url=JE(h,o):p.url=ta.createObjectURL(i):p.url=h,n.load(p)},u.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},u.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},u.onloadend=function(){n.reader=null},a||l?u.readAsArrayBuffer(i):u.readAsDataURL(i)}}},{key:"load",value:function(n){var i=this,s=this.file,o=this.image;o.onload=function(){i.draw(kh(kh({},n),{},{naturalWidth:o.naturalWidth,naturalHeight:o.naturalHeight}))},o.onabort=function(){i.fail(new Error("Aborted to load the image."))},o.onerror=function(){i.fail(new Error("Failed to load the image."))},ir.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ir.navigator.userAgent)&&(o.crossOrigin="anonymous"),o.alt=s.name,o.src=n.url}},{key:"draw",value:function(n){var i=this,s=n.naturalWidth,o=n.naturalHeight,r=n.rotate,a=r===void 0?0:r,l=n.scaleX,u=l===void 0?1:l,c=n.scaleY,d=c===void 0?1:c,h=this.file,p=this.image,g=this.options,C=document.createElement("canvas"),v=C.getContext("2d"),S=Math.abs(a)%180===90,R=(g.resize==="contain"||g.resize==="cover")&&Mh(g.width)&&Mh(g.height),E=Math.max(g.maxWidth,0)||1/0,y=Math.max(g.maxHeight,0)||1/0,b=Math.max(g.minWidth,0)||0,F=Math.max(g.minHeight,0)||0,x=s/o,V=g.width,I=g.height;if(S){var M=[y,E];E=M[0],y=M[1];var P=[F,b];b=P[0],F=P[1];var N=[I,V];V=N[0],I=N[1]}R&&(x=V/I);var ie=oc({aspectRatio:x,width:E,height:y},"contain");E=ie.width,y=ie.height;var ve=oc({aspectRatio:x,width:b,height:F},"cover");if(b=ve.width,F=ve.height,R){var Be=oc({aspectRatio:x,width:V,height:I},g.resize);V=Be.width,I=Be.height}else{var ee=oc({aspectRatio:x,width:V,height:I}),U=ee.width;V=U===void 0?s:U;var L=ee.height;I=L===void 0?o:L}V=Math.floor(XE(Math.min(Math.max(V,b),E))),I=Math.floor(XE(Math.min(Math.max(I,F),y)));var $=-V/2,re=-I/2,Ae=V,Ie=I,Ve=[];if(R){var ot=0,tt=0,ht=s,xt=o,qt=oc({aspectRatio:x,width:s,height:o},{contain:"cover",cover:"contain"}[g.resize]);ht=qt.width,xt=qt.height,ot=(s-ht)/2,tt=(o-xt)/2,Ve.push(ot,tt,ht,xt)}if(Ve.push($,re,Ae,Ie),S){var Je=[I,V];V=Je[0],I=Je[1]}C.width=V,C.height=I,Bm(g.mimeType)||(g.mimeType=h.type);var Cn="transparent";h.size>g.convertSize&&g.convertTypes.indexOf(g.mimeType)>=0&&(g.mimeType="image/jpeg");var Wt=g.mimeType==="image/jpeg";if(Wt&&(Cn="#fff"),v.fillStyle=Cn,v.fillRect(0,0,V,I),g.beforeDraw&&g.beforeDraw.call(this,v,C),!this.aborted&&(v.save(),v.translate(V/2,I/2),v.rotate(a*Math.PI/180),v.scale(u,d),v.drawImage.apply(v,[p].concat(Ve)),v.restore(),g.drew&&g.drew.call(this,v,C),!this.aborted)){var _t=function(W){if(!i.aborted){var ue=function(ke){return i.done({naturalWidth:s,naturalHeight:o,result:ke})};if(W&&Wt&&g.retainExif&&i.exif&&i.exif.length>0){var Fe=function(ke){return ue(qE(JE(EB(ke,i.exif),g.mimeType)))};if(W.arrayBuffer)W.arrayBuffer().then(Fe).catch(function(){i.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var we=new Hm;i.reader=we,we.onload=function(Ee){var ke=Ee.target;Fe(ke.result)},we.onabort=function(){i.fail(new Error("Aborted to read the compressed image with FileReader."))},we.onerror=function(){i.fail(new Error("Failed to read the compressed image with FileReader."))},we.onloadend=function(){i.reader=null},we.readAsArrayBuffer(W)}}else ue(W)}};C.toBlob?C.toBlob(_t,g.mimeType,g.quality):_t(qE(C.toDataURL(g.mimeType,g.quality)))}}},{key:"done",value:function(n){var i=n.naturalWidth,s=n.naturalHeight,o=n.result,r=this.file,a=this.image,l=this.options;if(ta&&a.src.indexOf("blob:")===0&&ta.revokeObjectURL(a.src),o)if(l.strict&&!l.retainExif&&o.size>r.size&&l.mimeType===r.type&&!(l.width>i||l.height>s||l.minWidth>i||l.minHeight>s||l.maxWidth<i||l.maxHeight<s))o=r;else{var u=new Date;o.lastModified=u.getTime(),o.lastModifiedDate=u,o.name=r.name,o.name&&o.type!==r.type&&(o.name=o.name.replace(DB,mB(o.type)))}else o=r;this.result=o,l.success&&l.success.call(this,o)}},{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=FB,e}},{key:"setDefaults",value:function(n){Oh(YE,n)}}]),e}(),QE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xB(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eR={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(QE,function(){var n=function(f,m){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,D){w.__proto__=D}||function(w,D){for(var T in D)Object.prototype.hasOwnProperty.call(D,T)&&(w[T]=D[T])})(f,m)},i=function(){return(i=Object.assign||function(f){for(var m,w=1,D=arguments.length;w<D;w++)for(var T in m=arguments[w])Object.prototype.hasOwnProperty.call(m,T)&&(f[T]=m[T]);return f}).apply(this,arguments)};function s(f,m,w){for(var D,T=0,_=m.length;T<_;T++)!D&&T in m||((D=D||Array.prototype.slice.call(m,0,T))[T]=m[T]);return f.concat(D||Array.prototype.slice.call(m))}var o=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:QE,r=Object.keys,a=Array.isArray;function l(f,m){return typeof m!="object"||r(m).forEach(function(w){f[w]=m[w]}),f}typeof Promise>"u"||o.Promise||(o.Promise=Promise);var u=Object.getPrototypeOf,c={}.hasOwnProperty;function d(f,m){return c.call(f,m)}function h(f,m){typeof m=="function"&&(m=m(u(f))),(typeof Reflect>"u"?r:Reflect.ownKeys)(m).forEach(function(w){g(f,w,m[w])})}var p=Object.defineProperty;function g(f,m,w,D){p(f,m,l(w&&d(w,"get")&&typeof w.get=="function"?{get:w.get,set:w.set,configurable:!0}:{value:w,configurable:!0,writable:!0},D))}function C(f){return{from:function(m){return f.prototype=Object.create(m.prototype),g(f.prototype,"constructor",f),{extend:h.bind(null,f.prototype)}}}}var v=Object.getOwnPropertyDescriptor,S=[].slice;function R(f,m,w){return S.call(f,m,w)}function E(f,m){return m(f)}function y(f){if(!f)throw new Error("Assertion Failed")}function b(f){o.setImmediate?setImmediate(f):setTimeout(f,0)}function F(f,m){if(typeof m=="string"&&d(f,m))return f[m];if(!m)return f;if(typeof m!="string"){for(var w=[],D=0,T=m.length;D<T;++D){var _=F(f,m[D]);w.push(_)}return w}var k=m.indexOf(".");if(k!==-1){var B=f[m.substr(0,k)];return B==null?void 0:F(B,m.substr(k+1))}}function x(f,m,w){if(f&&m!==void 0&&!("isFrozen"in Object&&Object.isFrozen(f)))if(typeof m!="string"&&"length"in m){y(typeof w!="string"&&"length"in w);for(var D=0,T=m.length;D<T;++D)x(f,m[D],w[D])}else{var _,k,B=m.indexOf(".");B!==-1?(_=m.substr(0,B),(k=m.substr(B+1))===""?w===void 0?a(f)&&!isNaN(parseInt(_))?f.splice(_,1):delete f[_]:f[_]=w:x(B=!(B=f[_])||!d(f,_)?f[_]={}:B,k,w)):w===void 0?a(f)&&!isNaN(parseInt(m))?f.splice(m,1):delete f[m]:f[m]=w}}function V(f){var m,w={};for(m in f)d(f,m)&&(w[m]=f[m]);return w}var I=[].concat;function M(f){return I.apply([],f)}var jo="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(M([8,16,32,64].map(function(f){return["Int","Uint","Float"].map(function(m){return m+f+"Array"})}))).filter(function(f){return o[f]}),P=new Set(jo.map(function(f){return o[f]})),N=null;function ie(f){return N=new WeakMap,f=function m(w){if(!w||typeof w!="object")return w;var D=N.get(w);if(D)return D;if(a(w)){D=[],N.set(w,D);for(var T=0,_=w.length;T<_;++T)D.push(m(w[T]))}else if(P.has(w.constructor))D=w;else{var k,B=u(w);for(k in D=B===Object.prototype?{}:Object.create(B),N.set(w,D),w)d(w,k)&&(D[k]=m(w[k]))}return D}(f),N=null,f}var ve={}.toString;function Be(f){return ve.call(f).slice(8,-1)}var ee=typeof Symbol<"u"?Symbol.iterator:"@@iterator",U=typeof ee=="symbol"?function(f){var m;return f!=null&&(m=f[ee])&&m.apply(f)}:function(){return null};function L(f,m){return m=f.indexOf(m),0<=m&&f.splice(m,1),0<=m}var $={};function re(f){var m,w,D,T;if(arguments.length===1){if(a(f))return f.slice();if(this===$&&typeof f=="string")return[f];if(T=U(f)){for(w=[];!(D=T.next()).done;)w.push(D.value);return w}if(f==null)return[f];if(typeof(m=f.length)!="number")return[f];for(w=new Array(m);m--;)w[m]=f[m];return w}for(m=arguments.length,w=new Array(m);m--;)w[m]=arguments[m];return w}var Ae=typeof Symbol<"u"?function(f){return f[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},pe=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],rs=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(pe),Ie={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 Ve(f,m){this.name=f,this.message=m}function ot(f,m){return f+". Errors: "+Object.keys(m).map(function(w){return m[w].toString()}).filter(function(w,D,T){return T.indexOf(w)===D}).join(`
58
+ `)}function tt(f,m,w,D){this.failures=m,this.failedKeys=D,this.successCount=w,this.message=ot(f,m)}function ht(f,m){this.name="BulkError",this.failures=Object.keys(m).map(function(w){return m[w]}),this.failuresByPos=m,this.message=ot(f,this.failures)}C(Ve).from(Error).extend({toString:function(){return this.name+": "+this.message}}),C(tt).from(Ve),C(ht).from(Ve);var xt=rs.reduce(function(f,m){return f[m]=m+"Error",f},{}),qt=Ve,Je=rs.reduce(function(f,m){var w=m+"Error";function D(T,_){this.name=w,T?typeof T=="string"?(this.message="".concat(T).concat(_?`
59
+ `+_:""),this.inner=_||null):typeof T=="object"&&(this.message="".concat(T.name," ").concat(T.message),this.inner=T):(this.message=Ie[m]||w,this.inner=null)}return C(D).from(qt),f[m]=D,f},{});Je.Syntax=SyntaxError,Je.Type=TypeError,Je.Range=RangeError;var Cn=pe.reduce(function(f,m){return f[m+"Error"]=Je[m],f},{}),Wt=rs.reduce(function(f,m){return["Syntax","Type","Range"].indexOf(m)===-1&&(f[m+"Error"]=Je[m]),f},{});function _t(){}function O(f){return f}function W(f,m){return f==null||f===O?m:function(w){return m(f(w))}}function ue(f,m){return function(){f.apply(this,arguments),m.apply(this,arguments)}}function Fe(f,m){return f===_t?m:function(){var w=f.apply(this,arguments);w!==void 0&&(arguments[0]=w);var D=this.onsuccess,T=this.onerror;this.onsuccess=null,this.onerror=null;var _=m.apply(this,arguments);return D&&(this.onsuccess=this.onsuccess?ue(D,this.onsuccess):D),T&&(this.onerror=this.onerror?ue(T,this.onerror):T),_!==void 0?_:w}}function we(f,m){return f===_t?m:function(){f.apply(this,arguments);var w=this.onsuccess,D=this.onerror;this.onsuccess=this.onerror=null,m.apply(this,arguments),w&&(this.onsuccess=this.onsuccess?ue(w,this.onsuccess):w),D&&(this.onerror=this.onerror?ue(D,this.onerror):D)}}function Ee(f,m){return f===_t?m:function(w){var D=f.apply(this,arguments);l(w,D);var T=this.onsuccess,_=this.onerror;return this.onsuccess=null,this.onerror=null,w=m.apply(this,arguments),T&&(this.onsuccess=this.onsuccess?ue(T,this.onsuccess):T),_&&(this.onerror=this.onerror?ue(_,this.onerror):_),D===void 0?w===void 0?void 0:w:l(D,w)}}function ke(f,m){return f===_t?m:function(){return m.apply(this,arguments)!==!1&&f.apply(this,arguments)}}function Pe(f,m){return f===_t?m:function(){var w=f.apply(this,arguments);if(w&&typeof w.then=="function"){for(var D=this,T=arguments.length,_=new Array(T);T--;)_[T]=arguments[T];return w.then(function(){return m.apply(D,_)})}return m.apply(this,arguments)}}Wt.ModifyError=tt,Wt.DexieError=Ve,Wt.BulkError=ht;var Te=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Re(f){Te=f}var st={},He=100,jo=typeof Promise>"u"?[]:function(){var f=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[f,u(f),f];var m=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[m,u(m),f]}(),pe=jo[0],rs=jo[1],jo=jo[2],rs=rs&&rs.then,le=pe&&pe.constructor,Ke=!!jo,Qe=function(f,m){et.push([f,m]),en&&(queueMicrotask(Tr),en=!1)},Ft=!0,en=!0,Yt=[],On=[],ei=O,fe={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:_t,pgp:!1,env:{},finalize:_t},be=fe,et=[],Ct=0,Pt=[];function Me(f){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var m=this._PSD=be;if(typeof f!="function"){if(f!==st)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&gu(this,this._value))}this._state=null,this._value=null,++m.ref,function w(D,T){try{T(function(_){if(D._state===null){if(_===D)throw new TypeError("A promise cannot be resolved with itself.");var k=D._lib&&xr();_&&typeof _.then=="function"?w(D,function(B,K){_ instanceof Me?_._then(B,K):_.then(B,K)}):(D._state=!0,D._value=_,ao(D)),k&&lo()}},gu.bind(null,D))}catch(_){gu(D,_)}}(this,f)}var ti={get:function(){var f=be,m=Xp;function w(D,T){var _=this,k=!f.global&&(f!==be||m!==Xp),B=k&&!Ar(),K=new Me(function(Y,Q){Va(_,new zo(xk(D,f,k,B),xk(T,f,k,B),Y,Q,f))});return this._consoleTask&&(K._consoleTask=this._consoleTask),K}return w.prototype=st,w},set:function(f){g(this,"then",f&&f.prototype===st?ti:{get:function(){return f},set:ti.set})}};function zo(f,m,w,D,T){this.onFulfilled=typeof f=="function"?f:null,this.onRejected=typeof m=="function"?m:null,this.resolve=w,this.reject=D,this.psd=T}function gu(f,m){var w,D;On.push(m),f._state===null&&(w=f._lib&&xr(),m=ei(m),f._state=!1,f._value=m,D=f,Yt.some(function(T){return T._value===D._value})||Yt.push(D),ao(f),w&&lo())}function ao(f){var m=f._listeners;f._listeners=[];for(var w=0,D=m.length;w<D;++w)Va(f,m[w]);var T=f._PSD;--T.ref||T.finalize(),Ct===0&&(++Ct,Qe(function(){--Ct==0&&_r()},[]))}function Va(f,m){if(f._state!==null){var w=f._state?m.onFulfilled:m.onRejected;if(w===null)return(f._state?m.resolve:m.reject)(f._value);++m.psd.ref,++Ct,Qe(mu,[w,f,m])}else f._listeners.push(m)}function mu(f,m,w){try{var D,T=m._value;!m._state&&On.length&&(On=[]),D=Te&&m._consoleTask?m._consoleTask.run(function(){return f(T)}):f(T),m._state||On.indexOf(T)!==-1||function(_){for(var k=Yt.length;k;)if(Yt[--k]._value===_._value)return Yt.splice(k,1)}(m),w.resolve(D)}catch(_){w.reject(_)}finally{--Ct==0&&_r(),--w.psd.ref||w.psd.finalize()}}function Tr(){Ba(fe,function(){xr()&&lo()})}function xr(){var f=Ft;return en=Ft=!1,f}function lo(){var f,m,w;do for(;0<et.length;)for(f=et,et=[],w=f.length,m=0;m<w;++m){var D=f[m];D[0].apply(null,D[1])}while(0<et.length);en=Ft=!0}function _r(){var f=Yt;Yt=[],f.forEach(function(D){D._PSD.onunhandled.call(null,D._value,D)});for(var m=Pt.slice(0),w=m.length;w;)m[--w]()}function Yp(f){return new Me(st,!1,f)}function dn(f,m){var w=be;return function(){var D=xr(),T=be;try{return Ir(w,!0),f.apply(this,arguments)}catch(_){m&&m(_)}finally{Ir(T,!1),D&&lo()}}}h(Me.prototype,{then:ti,_then:function(f,m){Va(this,new zo(null,null,f,m,be))},catch:function(f){if(arguments.length===1)return this.then(null,f);var m=f,w=arguments[1];return typeof m=="function"?this.then(null,function(D){return(D instanceof m?w:Yp)(D)}):this.then(null,function(D){return(D&&D.name===m?w:Yp)(D)})},finally:function(f){return this.then(function(m){return Me.resolve(f()).then(function(){return m})},function(m){return Me.resolve(f()).then(function(){return Yp(m)})})},timeout:function(f,m){var w=this;return f<1/0?new Me(function(D,T){var _=setTimeout(function(){return T(new Je.Timeout(m))},f);w.then(D,T).finally(clearTimeout.bind(null,_))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&g(Me.prototype,Symbol.toStringTag,"Dexie.Promise"),fe.env=Tk(),h(Me,{all:function(){var f=re.apply(null,arguments).map(Qp);return new Me(function(m,w){f.length===0&&m([]);var D=f.length;f.forEach(function(T,_){return Me.resolve(T).then(function(k){f[_]=k,--D||m(f)},w)})})},resolve:function(f){return f instanceof Me?f:f&&typeof f.then=="function"?new Me(function(m,w){f.then(m,w)}):new Me(st,!0,f)},reject:Yp,race:function(){var f=re.apply(null,arguments).map(Qp);return new Me(function(m,w){f.map(function(D){return Me.resolve(D).then(m,w)})})},PSD:{get:function(){return be},set:function(f){return be=f}},totalEchoes:{get:function(){return Xp}},newPSD:Pr,usePSD:Ba,scheduler:{get:function(){return Qe},set:function(f){Qe=f}},rejectionMapper:{get:function(){return ei},set:function(f){ei=f}},follow:function(f,m){return new Me(function(w,D){return Pr(function(T,_){var k=be;k.unhandleds=[],k.onunhandled=_,k.finalize=ue(function(){var B,K=this;B=function(){K.unhandleds.length===0?T():_(K.unhandleds[0])},Pt.push(function Y(){B(),Pt.splice(Pt.indexOf(Y),1)}),++Ct,Qe(function(){--Ct==0&&_r()},[])},k.finalize),f()},m,w,D)})}}),le&&(le.allSettled&&g(Me,"allSettled",function(){var f=re.apply(null,arguments).map(Qp);return new Me(function(m){f.length===0&&m([]);var w=f.length,D=new Array(w);f.forEach(function(T,_){return Me.resolve(T).then(function(k){return D[_]={status:"fulfilled",value:k}},function(k){return D[_]={status:"rejected",reason:k}}).then(function(){return--w||m(D)})})})}),le.any&&typeof AggregateError<"u"&&g(Me,"any",function(){var f=re.apply(null,arguments).map(Qp);return new Me(function(m,w){f.length===0&&w(new AggregateError([]));var D=f.length,T=new Array(D);f.forEach(function(_,k){return Me.resolve(_).then(function(B){return m(B)},function(B){T[k]=B,--D||w(new AggregateError(T))})})})}),le.withResolvers&&(Me.withResolvers=le.withResolvers));var Vn={awaits:0,echoes:0,id:0},Wle=0,Zp=[],Jp=0,Xp=0,zle=0;function Pr(f,m,w,D){var T=be,_=Object.create(T);return _.parent=T,_.ref=0,_.global=!1,_.id=++zle,fe.env,_.env=Ke?{Promise:Me,PromiseProp:{value:Me,configurable:!0,writable:!0},all:Me.all,race:Me.race,allSettled:Me.allSettled,any:Me.any,resolve:Me.resolve,reject:Me.reject}:{},m&&l(_,m),++T.ref,_.finalize=function(){--this.parent.ref||this.parent.finalize()},D=Ba(_,f,w,D),_.ref===0&&_.finalize(),D}function vu(){return Vn.id||(Vn.id=++Wle),++Vn.awaits,Vn.echoes+=He,Vn.id}function Ar(){return!!Vn.awaits&&(--Vn.awaits==0&&(Vn.id=0),Vn.echoes=Vn.awaits*He,!0)}function Qp(f){return Vn.echoes&&f&&f.constructor===le?(vu(),f.then(function(m){return Ar(),m},function(m){return Ar(),Dn(m)})):f}function Ule(){var f=Zp[Zp.length-1];Zp.pop(),Ir(f,!1)}function Ir(f,m){var w,D=be;(m?!Vn.echoes||Jp++&&f===be:!Jp||--Jp&&f===be)||queueMicrotask(m?(function(T){++Xp,Vn.echoes&&--Vn.echoes!=0||(Vn.echoes=Vn.awaits=Vn.id=0),Zp.push(be),Ir(T,!0)}).bind(null,f):Ule),f!==be&&(be=f,D===fe&&(fe.env=Tk()),Ke&&(w=fe.env.Promise,m=f.env,(D.global||f.global)&&(Object.defineProperty(o,"Promise",m.PromiseProp),w.all=m.all,w.race=m.race,w.resolve=m.resolve,w.reject=m.reject,m.allSettled&&(w.allSettled=m.allSettled),m.any&&(w.any=m.any))))}function Tk(){var f=o.Promise;return Ke?{Promise:f,PromiseProp:Object.getOwnPropertyDescriptor(o,"Promise"),all:f.all,race:f.race,allSettled:f.allSettled,any:f.any,resolve:f.resolve,reject:f.reject}:{}}function Ba(f,m,w,D,T){var _=be;try{return Ir(f,!0),m(w,D,T)}finally{Ir(_,!1)}}function xk(f,m,w,D){return typeof f!="function"?f:function(){var T=be;w&&vu(),Ir(m,!0);try{return f.apply(this,arguments)}finally{Ir(T,!1),D&&queueMicrotask(Ar)}}}function Kw(f){Promise===le&&Vn.echoes===0?Jp===0?f():enqueueNativeMicroTask(f):setTimeout(f,0)}(""+rs).indexOf("[native code]")===-1&&(vu=Ar=_t);var Dn=Me.reject,Ha="￿",Uo="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",_k="String expected.",Cu=[],eg="__dbnames",qw="readonly",Yw="readwrite";function Ga(f,m){return f?m?function(){return f.apply(this,arguments)&&m.apply(this,arguments)}:f:m}var Pk={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function tg(f){return typeof f!="string"||/\./.test(f)?function(m){return m}:function(m){return m[f]===void 0&&f in m&&delete(m=ie(m))[f],m}}function Ak(){throw Je.Type()}function Mt(f,m){try{var w=Ik(f),D=Ik(m);if(w!==D)return w==="Array"?1:D==="Array"?-1:w==="binary"?1:D==="binary"?-1:w==="string"?1:D==="string"?-1:w==="Date"?1:D!=="Date"?NaN:-1;switch(w){case"number":case"Date":case"string":return m<f?1:f<m?-1:0;case"binary":return function(T,_){for(var k=T.length,B=_.length,K=k<B?k:B,Y=0;Y<K;++Y)if(T[Y]!==_[Y])return T[Y]<_[Y]?-1:1;return k===B?0:k<B?-1:1}(kk(f),kk(m));case"Array":return function(T,_){for(var k=T.length,B=_.length,K=k<B?k:B,Y=0;Y<K;++Y){var Q=Mt(T[Y],_[Y]);if(Q!==0)return Q}return k===B?0:k<B?-1:1}(f,m)}}catch{}return NaN}function Ik(f){var m=typeof f;return m!="object"?m:ArrayBuffer.isView(f)?"binary":(f=Be(f),f==="ArrayBuffer"?"binary":f)}function kk(f){return f instanceof Uint8Array?f:ArrayBuffer.isView(f)?new Uint8Array(f.buffer,f.byteOffset,f.byteLength):new Uint8Array(f)}var Ok=(an.prototype._trans=function(f,m,w){var D=this._tx||be.trans,T=this.name,_=Te&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(f==="readonly"?"read":"write"," ").concat(this.name));function k(Y,Q,H){if(!H.schema[T])throw new Je.NotFound("Table "+T+" not part of transaction");return m(H.idbtrans,H)}var B=xr();try{var K=D&&D.db._novip===this.db._novip?D===be.trans?D._promise(f,k,w):Pr(function(){return D._promise(f,k,w)},{trans:D,transless:be.transless||be}):function Y(Q,H,ne,q){if(Q.idbdb&&(Q._state.openComplete||be.letThrough||Q._vip)){var X=Q._createTransaction(H,ne,Q._dbSchema);try{X.create(),Q._state.PR1398_maxLoop=3}catch(te){return te.name===xt.InvalidState&&Q.isOpen()&&0<--Q._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),Q.close({disableAutoOpen:!1}),Q.open().then(function(){return Y(Q,H,ne,q)})):Dn(te)}return X._promise(H,function(te,J){return Pr(function(){return be.trans=X,q(te,J,X)})}).then(function(te){if(H==="readwrite")try{X.idbtrans.commit()}catch{}return H==="readonly"?te:X._completion.then(function(){return te})})}if(Q._state.openComplete)return Dn(new Je.DatabaseClosed(Q._state.dbOpenError));if(!Q._state.isBeingOpened){if(!Q._state.autoOpen)return Dn(new Je.DatabaseClosed);Q.open().catch(_t)}return Q._state.dbReadyPromise.then(function(){return Y(Q,H,ne,q)})}(this.db,f,[this.name],k);return _&&(K._consoleTask=_,K=K.catch(function(Y){return console.trace(Y),Dn(Y)})),K}finally{B&&lo()}},an.prototype.get=function(f,m){var w=this;return f&&f.constructor===Object?this.where(f).first(m):f==null?Dn(new Je.Type("Invalid argument to Table.get()")):this._trans("readonly",function(D){return w.core.get({trans:D,key:f}).then(function(T){return w.hook.reading.fire(T)})}).then(m)},an.prototype.where=function(f){if(typeof f=="string")return new this.db.WhereClause(this,f);if(a(f))return new this.db.WhereClause(this,"[".concat(f.join("+"),"]"));var m=r(f);if(m.length===1)return this.where(m[0]).equals(f[m[0]]);var w=this.schema.indexes.concat(this.schema.primKey).filter(function(B){if(B.compound&&m.every(function(Y){return 0<=B.keyPath.indexOf(Y)})){for(var K=0;K<m.length;++K)if(m.indexOf(B.keyPath[K])===-1)return!1;return!0}return!1}).sort(function(B,K){return B.keyPath.length-K.keyPath.length})[0];if(w&&this.db._maxKey!==Ha){var _=w.keyPath.slice(0,m.length);return this.where(_).equals(_.map(function(K){return f[K]}))}!w&&Te&&console.warn("The query ".concat(JSON.stringify(f)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(m.join("+"),"]"));var D=this.schema.idxByName;function T(B,K){return Mt(B,K)===0}var k=m.reduce(function(H,K){var Y=H[0],Q=H[1],H=D[K],ne=f[K];return[Y||H,Y||!H?Ga(Q,H&&H.multi?function(q){return q=F(q,K),a(q)&&q.some(function(X){return T(ne,X)})}:function(q){return T(ne,F(q,K))}):Q]},[null,null]),_=k[0],k=k[1];return _?this.where(_.name).equals(f[_.keyPath]).filter(k):w?this.filter(k):this.where(m).equals("")},an.prototype.filter=function(f){return this.toCollection().and(f)},an.prototype.count=function(f){return this.toCollection().count(f)},an.prototype.offset=function(f){return this.toCollection().offset(f)},an.prototype.limit=function(f){return this.toCollection().limit(f)},an.prototype.each=function(f){return this.toCollection().each(f)},an.prototype.toArray=function(f){return this.toCollection().toArray(f)},an.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},an.prototype.orderBy=function(f){return new this.db.Collection(new this.db.WhereClause(this,a(f)?"[".concat(f.join("+"),"]"):f))},an.prototype.reverse=function(){return this.toCollection().reverse()},an.prototype.mapToClass=function(f){var m,w=this.db,D=this.name;function T(){return m!==null&&m.apply(this,arguments)||this}(this.schema.mappedClass=f).prototype instanceof Ak&&(function(K,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Class extends value "+String(Y)+" is not a constructor or null");function Q(){this.constructor=K}n(K,Y),K.prototype=Y===null?Object.create(Y):(Q.prototype=Y.prototype,new Q)}(T,m=f),Object.defineProperty(T.prototype,"db",{get:function(){return w},enumerable:!1,configurable:!0}),T.prototype.table=function(){return D},f=T);for(var _=new Set,k=f.prototype;k;k=u(k))Object.getOwnPropertyNames(k).forEach(function(K){return _.add(K)});function B(K){if(!K)return K;var Y,Q=Object.create(f.prototype);for(Y in K)if(!_.has(Y))try{Q[Y]=K[Y]}catch{}return Q}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=B,this.hook("reading",B),f},an.prototype.defineClass=function(){return this.mapToClass(function(f){l(this,f)})},an.prototype.add=function(f,m){var w=this,D=this.schema.primKey,T=D.auto,_=D.keyPath,k=f;return _&&T&&(k=tg(_)(f)),this._trans("readwrite",function(B){return w.core.mutate({trans:B,type:"add",keys:m!=null?[m]:null,values:[k]})}).then(function(B){return B.numFailures?Me.reject(B.failures[0]):B.lastResult}).then(function(B){if(_)try{x(f,_,B)}catch{}return B})},an.prototype.update=function(f,m){return typeof f!="object"||a(f)?this.where(":id").equals(f).modify(m):(f=F(f,this.schema.primKey.keyPath),f===void 0?Dn(new Je.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(f).modify(m))},an.prototype.put=function(f,m){var w=this,D=this.schema.primKey,T=D.auto,_=D.keyPath,k=f;return _&&T&&(k=tg(_)(f)),this._trans("readwrite",function(B){return w.core.mutate({trans:B,type:"put",values:[k],keys:m!=null?[m]:null})}).then(function(B){return B.numFailures?Me.reject(B.failures[0]):B.lastResult}).then(function(B){if(_)try{x(f,_,B)}catch{}return B})},an.prototype.delete=function(f){var m=this;return this._trans("readwrite",function(w){return m.core.mutate({trans:w,type:"delete",keys:[f]})}).then(function(w){return w.numFailures?Me.reject(w.failures[0]):void 0})},an.prototype.clear=function(){var f=this;return this._trans("readwrite",function(m){return f.core.mutate({trans:m,type:"deleteRange",range:Pk})}).then(function(m){return m.numFailures?Me.reject(m.failures[0]):void 0})},an.prototype.bulkGet=function(f){var m=this;return this._trans("readonly",function(w){return m.core.getMany({keys:f,trans:w}).then(function(D){return D.map(function(T){return m.hook.reading.fire(T)})})})},an.prototype.bulkAdd=function(f,m,w){var D=this,T=Array.isArray(m)?m:void 0,_=(w=w||(T?void 0:m))?w.allKeys:void 0;return this._trans("readwrite",function(k){var Y=D.schema.primKey,B=Y.auto,Y=Y.keyPath;if(Y&&T)throw new Je.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(T&&T.length!==f.length)throw new Je.InvalidArgument("Arguments objects and keys must have the same length");var K=f.length,Y=Y&&B?f.map(tg(Y)):f;return D.core.mutate({trans:k,type:"add",keys:T,values:Y,wantResults:_}).then(function(X){var H=X.numFailures,ne=X.results,q=X.lastResult,X=X.failures;if(H===0)return _?ne:q;throw new ht("".concat(D.name,".bulkAdd(): ").concat(H," of ").concat(K," operations failed"),X)})})},an.prototype.bulkPut=function(f,m,w){var D=this,T=Array.isArray(m)?m:void 0,_=(w=w||(T?void 0:m))?w.allKeys:void 0;return this._trans("readwrite",function(k){var Y=D.schema.primKey,B=Y.auto,Y=Y.keyPath;if(Y&&T)throw new Je.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(T&&T.length!==f.length)throw new Je.InvalidArgument("Arguments objects and keys must have the same length");var K=f.length,Y=Y&&B?f.map(tg(Y)):f;return D.core.mutate({trans:k,type:"put",keys:T,values:Y,wantResults:_}).then(function(X){var H=X.numFailures,ne=X.results,q=X.lastResult,X=X.failures;if(H===0)return _?ne:q;throw new ht("".concat(D.name,".bulkPut(): ").concat(H," of ").concat(K," operations failed"),X)})})},an.prototype.bulkUpdate=function(f){var m=this,w=this.core,D=f.map(function(k){return k.key}),T=f.map(function(k){return k.changes}),_=[];return this._trans("readwrite",function(k){return w.getMany({trans:k,keys:D,cache:"clone"}).then(function(B){var K=[],Y=[];f.forEach(function(H,ne){var q=H.key,X=H.changes,te=B[ne];if(te){for(var J=0,ae=Object.keys(X);J<ae.length;J++){var de=ae[J],he=X[de];if(de===m.schema.primKey.keyPath){if(Mt(he,q)!==0)throw new Je.Constraint("Cannot update primary key in bulkUpdate()")}else x(te,de,he)}_.push(ne),K.push(q),Y.push(te)}});var Q=K.length;return w.mutate({trans:k,type:"put",keys:K,values:Y,updates:{keys:D,changeSpecs:T}}).then(function(H){var ne=H.numFailures,q=H.failures;if(ne===0)return Q;for(var X=0,te=Object.keys(q);X<te.length;X++){var J,ae=te[X],de=_[Number(ae)];de!=null&&(J=q[ae],delete q[ae],q[de]=J)}throw new ht("".concat(m.name,".bulkUpdate(): ").concat(ne," of ").concat(Q," operations failed"),q)})})})},an.prototype.bulkDelete=function(f){var m=this,w=f.length;return this._trans("readwrite",function(D){return m.core.mutate({trans:D,type:"delete",keys:f})}).then(function(k){var T=k.numFailures,_=k.lastResult,k=k.failures;if(T===0)return _;throw new ht("".concat(m.name,".bulkDelete(): ").concat(T," of ").concat(w," operations failed"),k)})},an);function an(){}function xd(f){function m(k,B){if(B){for(var K=arguments.length,Y=new Array(K-1);--K;)Y[K-1]=arguments[K];return w[k].subscribe.apply(null,Y),f}if(typeof k=="string")return w[k]}var w={};m.addEventType=_;for(var D=1,T=arguments.length;D<T;++D)_(arguments[D]);return m;function _(k,B,K){if(typeof k!="object"){var Y;B=B||ke;var Q={subscribers:[],fire:K=K||_t,subscribe:function(H){Q.subscribers.indexOf(H)===-1&&(Q.subscribers.push(H),Q.fire=B(Q.fire,H))},unsubscribe:function(H){Q.subscribers=Q.subscribers.filter(function(ne){return ne!==H}),Q.fire=Q.subscribers.reduce(B,K)}};return w[k]=m[k]=Q}r(Y=k).forEach(function(H){var ne=Y[H];if(a(ne))_(H,Y[H][0],Y[H][1]);else{if(ne!=="asap")throw new Je.InvalidArgument("Invalid event config");var q=_(H,O,function(){for(var X=arguments.length,te=new Array(X);X--;)te[X]=arguments[X];q.subscribers.forEach(function(J){b(function(){J.apply(null,te)})})})}})}}function _d(f,m){return C(m).from({prototype:f}),m}function yu(f,m){return!(f.filter||f.algorithm||f.or)&&(m?f.justLimit:!f.replayFilter)}function Zw(f,m){f.filter=Ga(f.filter,m)}function Jw(f,m,w){var D=f.replayFilter;f.replayFilter=D?function(){return Ga(D(),m())}:m,f.justLimit=w&&!D}function ng(f,m){if(f.isPrimKey)return m.primaryKey;var w=m.getIndexByKeyPath(f.index);if(!w)throw new Je.Schema("KeyPath "+f.index+" on object store "+m.name+" is not indexed");return w}function Mk(f,m,w){var D=ng(f,m.schema);return m.openCursor({trans:w,values:!f.keysOnly,reverse:f.dir==="prev",unique:!!f.unique,query:{index:D,range:f.range}})}function ig(f,m,w,D){var T=f.replayFilter?Ga(f.filter,f.replayFilter()):f.filter;if(f.or){var _={},k=function(B,K,Y){var Q,H;T&&!T(K,Y,function(ne){return K.stop(ne)},function(ne){return K.fail(ne)})||((H=""+(Q=K.primaryKey))=="[object ArrayBuffer]"&&(H=""+new Uint8Array(Q)),d(_,H)||(_[H]=!0,m(B,K,Y)))};return Promise.all([f.or._iterate(k,w),Lk(Mk(f,D,w),f.algorithm,k,!f.keysOnly&&f.valueMapper)])}return Lk(Mk(f,D,w),Ga(f.algorithm,T),m,!f.keysOnly&&f.valueMapper)}function Lk(f,m,w,D){var T=dn(D?function(_,k,B){return w(D(_),k,B)}:w);return f.then(function(_){if(_)return _.start(function(){var k=function(){return _.continue()};m&&!m(_,function(B){return k=B},function(B){_.stop(B),k=_t},function(B){_.fail(B),k=_t})||T(_.value,_,function(B){return k=B}),k()})})}var jo=Symbol(),Pd=(Nk.prototype.execute=function(f){if(this.add!==void 0){var m=this.add;if(a(m))return s(s([],a(f)?f:[],!0),m).sort();if(typeof m=="number")return(Number(f)||0)+m;if(typeof m=="bigint")try{return BigInt(f)+m}catch{return BigInt(0)+m}throw new TypeError("Invalid term ".concat(m))}if(this.remove!==void 0){var w=this.remove;if(a(w))return a(f)?f.filter(function(D){return!w.includes(D)}).sort():[];if(typeof w=="number")return Number(f)-w;if(typeof w=="bigint")try{return BigInt(f)-w}catch{return BigInt(0)-w}throw new TypeError("Invalid subtrahend ".concat(w))}return m=(m=this.replacePrefix)===null||m===void 0?void 0:m[0],m&&typeof f=="string"&&f.startsWith(m)?this.replacePrefix[1]+f.substring(m.length):f},Nk);function Nk(f){Object.assign(this,f)}var jle=(Vt.prototype._read=function(f,m){var w=this._ctx;return w.error?w.table._trans(null,Dn.bind(null,w.error)):w.table._trans("readonly",f).then(m)},Vt.prototype._write=function(f){var m=this._ctx;return m.error?m.table._trans(null,Dn.bind(null,m.error)):m.table._trans("readwrite",f,"locked")},Vt.prototype._addAlgorithm=function(f){var m=this._ctx;m.algorithm=Ga(m.algorithm,f)},Vt.prototype._iterate=function(f,m){return ig(this._ctx,f,m,this._ctx.table.core)},Vt.prototype.clone=function(f){var m=Object.create(this.constructor.prototype),w=Object.create(this._ctx);return f&&l(w,f),m._ctx=w,m},Vt.prototype.raw=function(){return this._ctx.valueMapper=null,this},Vt.prototype.each=function(f){var m=this._ctx;return this._read(function(w){return ig(m,f,w,m.table.core)})},Vt.prototype.count=function(f){var m=this;return this._read(function(w){var D=m._ctx,T=D.table.core;if(yu(D,!0))return T.count({trans:w,query:{index:ng(D,T.schema),range:D.range}}).then(function(k){return Math.min(k,D.limit)});var _=0;return ig(D,function(){return++_,!1},w,T).then(function(){return _})}).then(f)},Vt.prototype.sortBy=function(f,m){var w=f.split(".").reverse(),D=w[0],T=w.length-1;function _(K,Y){return Y?_(K[w[Y]],Y-1):K[D]}var k=this._ctx.dir==="next"?1:-1;function B(K,Y){return Mt(_(K,T),_(Y,T))*k}return this.toArray(function(K){return K.sort(B)}).then(m)},Vt.prototype.toArray=function(f){var m=this;return this._read(function(w){var D=m._ctx;if(D.dir==="next"&&yu(D,!0)&&0<D.limit){var T=D.valueMapper,_=ng(D,D.table.core.schema);return D.table.core.query({trans:w,limit:D.limit,values:!0,query:{index:_,range:D.range}}).then(function(B){return B=B.result,T?B.map(T):B})}var k=[];return ig(D,function(B){return k.push(B)},w,D.table.core).then(function(){return k})},f)},Vt.prototype.offset=function(f){var m=this._ctx;return f<=0||(m.offset+=f,yu(m)?Jw(m,function(){var w=f;return function(D,T){return w===0||(w===1?--w:T(function(){D.advance(w),w=0}),!1)}}):Jw(m,function(){var w=f;return function(){return--w<0}})),this},Vt.prototype.limit=function(f){return this._ctx.limit=Math.min(this._ctx.limit,f),Jw(this._ctx,function(){var m=f;return function(w,D,T){return--m<=0&&D(T),0<=m}},!0),this},Vt.prototype.until=function(f,m){return Zw(this._ctx,function(w,D,T){return!f(w.value)||(D(T),m)}),this},Vt.prototype.first=function(f){return this.limit(1).toArray(function(m){return m[0]}).then(f)},Vt.prototype.last=function(f){return this.reverse().first(f)},Vt.prototype.filter=function(f){var m;return Zw(this._ctx,function(w){return f(w.value)}),(m=this._ctx).isMatch=Ga(m.isMatch,f),this},Vt.prototype.and=function(f){return this.filter(f)},Vt.prototype.or=function(f){return new this.db.WhereClause(this._ctx.table,f,this)},Vt.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Vt.prototype.desc=function(){return this.reverse()},Vt.prototype.eachKey=function(f){var m=this._ctx;return m.keysOnly=!m.isMatch,this.each(function(w,D){f(D.key,D)})},Vt.prototype.eachUniqueKey=function(f){return this._ctx.unique="unique",this.eachKey(f)},Vt.prototype.eachPrimaryKey=function(f){var m=this._ctx;return m.keysOnly=!m.isMatch,this.each(function(w,D){f(D.primaryKey,D)})},Vt.prototype.keys=function(f){var m=this._ctx;m.keysOnly=!m.isMatch;var w=[];return this.each(function(D,T){w.push(T.key)}).then(function(){return w}).then(f)},Vt.prototype.primaryKeys=function(f){var m=this._ctx;if(m.dir==="next"&&yu(m,!0)&&0<m.limit)return this._read(function(D){var T=ng(m,m.table.core.schema);return m.table.core.query({trans:D,values:!1,limit:m.limit,query:{index:T,range:m.range}})}).then(function(D){return D.result}).then(f);m.keysOnly=!m.isMatch;var w=[];return this.each(function(D,T){w.push(T.primaryKey)}).then(function(){return w}).then(f)},Vt.prototype.uniqueKeys=function(f){return this._ctx.unique="unique",this.keys(f)},Vt.prototype.firstKey=function(f){return this.limit(1).keys(function(m){return m[0]}).then(f)},Vt.prototype.lastKey=function(f){return this.reverse().firstKey(f)},Vt.prototype.distinct=function(){var f=this._ctx,f=f.index&&f.table.schema.idxByName[f.index];if(!f||!f.multi)return this;var m={};return Zw(this._ctx,function(T){var D=T.primaryKey.toString(),T=d(m,D);return m[D]=!0,!T}),this},Vt.prototype.modify=function(f){var m=this,w=this._ctx;return this._write(function(D){var T,_,k;k=typeof f=="function"?f:(T=r(f),_=T.length,function(J){for(var ae=!1,de=0;de<_;++de){var he=T[de],Se=f[he],Le=F(J,he);Se instanceof Pd?(x(J,he,Se.execute(Le)),ae=!0):Le!==Se&&(x(J,he,Se),ae=!0)}return ae});var B=w.table.core,H=B.schema.primaryKey,K=H.outbound,Y=H.extractKey,Q=200,H=m.db._options.modifyChunkSize;H&&(Q=typeof H=="object"?H[B.name]||H["*"]||200:H);function ne(J,he){var de=he.failures,he=he.numFailures;X+=J-he;for(var Se=0,Le=r(de);Se<Le.length;Se++){var je=Le[Se];q.push(de[je])}}var q=[],X=0,te=[];return m.clone().primaryKeys().then(function(J){function ae(he){var Se=Math.min(Q,J.length-he);return B.getMany({trans:D,keys:J.slice(he,he+Se),cache:"immutable"}).then(function(Le){for(var je=[],Ne=[],Ge=K?[]:null,Ye=[],Ue=0;Ue<Se;++Ue){var nt=Le[Ue],Tt={value:ie(nt),primKey:J[he+Ue]};k.call(Tt,Tt.value,Tt)!==!1&&(Tt.value==null?Ye.push(J[he+Ue]):K||Mt(Y(nt),Y(Tt.value))===0?(Ne.push(Tt.value),K&&Ge.push(J[he+Ue])):(Ye.push(J[he+Ue]),je.push(Tt.value)))}return Promise.resolve(0<je.length&&B.mutate({trans:D,type:"add",values:je}).then(function(It){for(var kt in It.failures)Ye.splice(parseInt(kt),1);ne(je.length,It)})).then(function(){return(0<Ne.length||de&&typeof f=="object")&&B.mutate({trans:D,type:"put",keys:Ge,values:Ne,criteria:de,changeSpec:typeof f!="function"&&f,isAdditionalChunk:0<he}).then(function(It){return ne(Ne.length,It)})}).then(function(){return(0<Ye.length||de&&f===Xw)&&B.mutate({trans:D,type:"delete",keys:Ye,criteria:de,isAdditionalChunk:0<he}).then(function(It){return ne(Ye.length,It)})}).then(function(){return J.length>he+Se&&ae(he+Q)})})}var de=yu(w)&&w.limit===1/0&&(typeof f!="function"||f===Xw)&&{index:w.index,range:w.range};return ae(0).then(function(){if(0<q.length)throw new tt("Error modifying one or more objects",q,X,te);return J.length})})})},Vt.prototype.delete=function(){var f=this._ctx,m=f.range;return yu(f)&&(f.isPrimKey||m.type===3)?this._write(function(w){var D=f.table.core.schema.primaryKey,T=m;return f.table.core.count({trans:w,query:{index:D,range:T}}).then(function(_){return f.table.core.mutate({trans:w,type:"deleteRange",range:T}).then(function(k){var B=k.failures;if(k.lastResult,k.results,k=k.numFailures,k)throw new tt("Could not delete some values",Object.keys(B).map(function(K){return B[K]}),_-k);return _-k})})}):this.modify(Xw)},Vt);function Vt(){}var Xw=function(f,m){return m.value=null};function Kle(f,m){return f<m?-1:f===m?0:1}function qle(f,m){return m<f?-1:f===m?0:1}function Vi(f,m,w){return f=f instanceof Bk?new f.Collection(f):f,f._ctx.error=new(w||TypeError)(m),f}function wu(f){return new f.Collection(f,function(){return Vk("")}).limit(0)}function sg(f,m,w,D){var T,_,k,B,K,Y,Q,H=w.length;if(!w.every(function(X){return typeof X=="string"}))return Vi(f,_k);function ne(X){T=X==="next"?function(J){return J.toUpperCase()}:function(J){return J.toLowerCase()},_=X==="next"?function(J){return J.toLowerCase()}:function(J){return J.toUpperCase()},k=X==="next"?Kle:qle;var te=w.map(function(J){return{lower:_(J),upper:T(J)}}).sort(function(J,ae){return k(J.lower,ae.lower)});B=te.map(function(J){return J.upper}),K=te.map(function(J){return J.lower}),Q=(Y=X)==="next"?"":D}ne("next"),f=new f.Collection(f,function(){return kr(B[0],K[H-1]+D)}),f._ondirectionchange=function(X){ne(X)};var q=0;return f._addAlgorithm(function(X,te,J){var ae=X.key;if(typeof ae!="string")return!1;var de=_(ae);if(m(de,K,q))return!0;for(var he=null,Se=q;Se<H;++Se){var Le=function(je,Ne,Ge,Ye,Ue,nt){for(var Tt=Math.min(je.length,Ye.length),It=-1,kt=0;kt<Tt;++kt){var Bi=Ne[kt];if(Bi!==Ye[kt])return Ue(je[kt],Ge[kt])<0?je.substr(0,kt)+Ge[kt]+Ge.substr(kt+1):Ue(je[kt],Ye[kt])<0?je.substr(0,kt)+Ye[kt]+Ge.substr(kt+1):0<=It?je.substr(0,It)+Ne[It]+Ge.substr(It+1):null;Ue(je[kt],Bi)<0&&(It=kt)}return Tt<Ye.length&&nt==="next"?je+Ge.substr(je.length):Tt<je.length&&nt==="prev"?je.substr(0,Ge.length):It<0?null:je.substr(0,It)+Ye[It]+Ge.substr(It+1)}(ae,de,B[Se],K[Se],k,Y);Le===null&&he===null?q=Se+1:(he===null||0<k(he,Le))&&(he=Le)}return te(he!==null?function(){X.continue(he+Q)}:J),!1}),f}function kr(f,m,w,D){return{type:2,lower:f,upper:m,lowerOpen:w,upperOpen:D}}function Vk(f){return{type:1,lower:f,upper:f}}var Bk=(Object.defineProperty(Bn.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Bn.prototype.between=function(f,m,w,D){w=w!==!1,D=D===!0;try{return 0<this._cmp(f,m)||this._cmp(f,m)===0&&(w||D)&&(!w||!D)?wu(this):new this.Collection(this,function(){return kr(f,m,!w,!D)})}catch{return Vi(this,Uo)}},Bn.prototype.equals=function(f){return f==null?Vi(this,Uo):new this.Collection(this,function(){return Vk(f)})},Bn.prototype.above=function(f){return f==null?Vi(this,Uo):new this.Collection(this,function(){return kr(f,void 0,!0)})},Bn.prototype.aboveOrEqual=function(f){return f==null?Vi(this,Uo):new this.Collection(this,function(){return kr(f,void 0,!1)})},Bn.prototype.below=function(f){return f==null?Vi(this,Uo):new this.Collection(this,function(){return kr(void 0,f,!1,!0)})},Bn.prototype.belowOrEqual=function(f){return f==null?Vi(this,Uo):new this.Collection(this,function(){return kr(void 0,f)})},Bn.prototype.startsWith=function(f){return typeof f!="string"?Vi(this,_k):this.between(f,f+Ha,!0,!0)},Bn.prototype.startsWithIgnoreCase=function(f){return f===""?this.startsWith(f):sg(this,function(m,w){return m.indexOf(w[0])===0},[f],Ha)},Bn.prototype.equalsIgnoreCase=function(f){return sg(this,function(m,w){return m===w[0]},[f],"")},Bn.prototype.anyOfIgnoreCase=function(){var f=re.apply($,arguments);return f.length===0?wu(this):sg(this,function(m,w){return w.indexOf(m)!==-1},f,"")},Bn.prototype.startsWithAnyOfIgnoreCase=function(){var f=re.apply($,arguments);return f.length===0?wu(this):sg(this,function(m,w){return w.some(function(D){return m.indexOf(D)===0})},f,Ha)},Bn.prototype.anyOf=function(){var f=this,m=re.apply($,arguments),w=this._cmp;try{m.sort(w)}catch{return Vi(this,Uo)}if(m.length===0)return wu(this);var D=new this.Collection(this,function(){return kr(m[0],m[m.length-1])});D._ondirectionchange=function(_){w=_==="next"?f._ascending:f._descending,m.sort(w)};var T=0;return D._addAlgorithm(function(_,k,B){for(var K=_.key;0<w(K,m[T]);)if(++T===m.length)return k(B),!1;return w(K,m[T])===0||(k(function(){_.continue(m[T])}),!1)}),D},Bn.prototype.notEqual=function(f){return this.inAnyRange([[-1/0,f],[f,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Bn.prototype.noneOf=function(){var f=re.apply($,arguments);if(f.length===0)return new this.Collection(this);try{f.sort(this._ascending)}catch{return Vi(this,Uo)}var m=f.reduce(function(w,D){return w?w.concat([[w[w.length-1][1],D]]):[[-1/0,D]]},null);return m.push([f[f.length-1],this.db._maxKey]),this.inAnyRange(m,{includeLowers:!1,includeUppers:!1})},Bn.prototype.inAnyRange=function(ae,m){var w=this,D=this._cmp,T=this._ascending,_=this._descending,k=this._min,B=this._max;if(ae.length===0)return wu(this);if(!ae.every(function(de){return de[0]!==void 0&&de[1]!==void 0&&T(de[0],de[1])<=0}))return Vi(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Je.InvalidArgument);var K=!m||m.includeLowers!==!1,Y=m&&m.includeUppers===!0,Q,H=T;function ne(de,he){return H(de[0],he[0])}try{(Q=ae.reduce(function(de,he){for(var Se=0,Le=de.length;Se<Le;++Se){var je=de[Se];if(D(he[0],je[1])<0&&0<D(he[1],je[0])){je[0]=k(je[0],he[0]),je[1]=B(je[1],he[1]);break}}return Se===Le&&de.push(he),de},[])).sort(ne)}catch{return Vi(this,Uo)}var q=0,X=Y?function(de){return 0<T(de,Q[q][1])}:function(de){return 0<=T(de,Q[q][1])},te=K?function(de){return 0<_(de,Q[q][0])}:function(de){return 0<=_(de,Q[q][0])},J=X,ae=new this.Collection(this,function(){return kr(Q[0][0],Q[Q.length-1][1],!K,!Y)});return ae._ondirectionchange=function(de){H=de==="next"?(J=X,T):(J=te,_),Q.sort(ne)},ae._addAlgorithm(function(de,he,Se){for(var Le,je=de.key;J(je);)if(++q===Q.length)return he(Se),!1;return!X(Le=je)&&!te(Le)||(w._cmp(je,Q[q][1])===0||w._cmp(je,Q[q][0])===0||he(function(){H===T?de.continue(Q[q][0]):de.continue(Q[q][1])}),!1)}),ae},Bn.prototype.startsWithAnyOf=function(){var f=re.apply($,arguments);return f.every(function(m){return typeof m=="string"})?f.length===0?wu(this):this.inAnyRange(f.map(function(m){return[m,m+Ha]})):Vi(this,"startsWithAnyOf() only works with strings")},Bn);function Bn(){}function uo(f){return dn(function(m){return Ad(m),f(m.target.error),!1})}function Ad(f){f.stopPropagation&&f.stopPropagation(),f.preventDefault&&f.preventDefault()}var Id="storagemutated",Qw="x-storagemutated-1",Or=xd(null,Id),Yle=(co.prototype._lock=function(){return y(!be.global),++this._reculock,this._reculock!==1||be.global||(be.lockOwnerFor=this),this},co.prototype._unlock=function(){if(y(!be.global),--this._reculock==0)for(be.global||(be.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var f=this._blockedFuncs.shift();try{Ba(f[1],f[0])}catch{}}return this},co.prototype._locked=function(){return this._reculock&&be.lockOwnerFor!==this},co.prototype.create=function(f){var m=this;if(!this.mode)return this;var w=this.db.idbdb,D=this.db._state.dbOpenError;if(y(!this.idbtrans),!f&&!w)switch(D&&D.name){case"DatabaseClosedError":throw new Je.DatabaseClosed(D);case"MissingAPIError":throw new Je.MissingAPI(D.message,D);default:throw new Je.OpenFailed(D)}if(!this.active)throw new Je.TransactionInactive;return y(this._completion._state===null),(f=this.idbtrans=f||(this.db.core||w).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=dn(function(T){Ad(T),m._reject(f.error)}),f.onabort=dn(function(T){Ad(T),m.active&&m._reject(new Je.Abort(f.error)),m.active=!1,m.on("abort").fire(T)}),f.oncomplete=dn(function(){m.active=!1,m._resolve(),"mutatedParts"in f&&Or.storagemutated.fire(f.mutatedParts)}),this},co.prototype._promise=function(f,m,w){var D=this;if(f==="readwrite"&&this.mode!=="readwrite")return Dn(new Je.ReadOnly("Transaction is readonly"));if(!this.active)return Dn(new Je.TransactionInactive);if(this._locked())return new Me(function(_,k){D._blockedFuncs.push([function(){D._promise(f,m,w).then(_,k)},be])});if(w)return Pr(function(){var _=new Me(function(k,B){D._lock();var K=m(k,B,D);K&&K.then&&K.then(k,B)});return _.finally(function(){return D._unlock()}),_._lib=!0,_});var T=new Me(function(_,k){var B=m(_,k,D);B&&B.then&&B.then(_,k)});return T._lib=!0,T},co.prototype._root=function(){return this.parent?this.parent._root():this},co.prototype.waitFor=function(f){var m,w=this._root(),D=Me.resolve(f);w._waitingFor?w._waitingFor=w._waitingFor.then(function(){return D}):(w._waitingFor=D,w._waitingQueue=[],m=w.idbtrans.objectStore(w.storeNames[0]),function _(){for(++w._spinCount;w._waitingQueue.length;)w._waitingQueue.shift()();w._waitingFor&&(m.get(-1/0).onsuccess=_)}());var T=w._waitingFor;return new Me(function(_,k){D.then(function(B){return w._waitingQueue.push(dn(_.bind(null,B)))},function(B){return w._waitingQueue.push(dn(k.bind(null,B)))}).finally(function(){w._waitingFor===T&&(w._waitingFor=null)})})},co.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Je.Abort))},co.prototype.table=function(f){var m=this._memoizedTables||(this._memoizedTables={});if(d(m,f))return m[f];var w=this.schema[f];if(!w)throw new Je.NotFound("Table "+f+" not part of transaction");return w=new this.db.Table(f,w,this),w.core=this.db.core.table(f),m[f]=w},co);function co(){}function eb(f,m,w,D,T,_,k){return{name:f,keyPath:m,unique:w,multi:D,auto:T,compound:_,src:(w&&!k?"&":"")+(D?"*":"")+(T?"++":"")+Hk(m)}}function Hk(f){return typeof f=="string"?f:f?"["+[].join.call(f,"+")+"]":""}function tb(f,m,w){return{name:f,primKey:m,indexes:w,mappedClass:null,idxByName:(D=function(T){return[T.name,T]},w.reduce(function(T,_,k){return k=D(_,k),k&&(T[k[0]]=k[1]),T},{}))};var D}var kd=function(f){try{return f.only([[]]),kd=function(){return[[]]},[[]]}catch{return kd=function(){return Ha},Ha}};function nb(f){return f==null?function(){}:typeof f=="string"?(m=f).split(".").length===1?function(w){return w[m]}:function(w){return F(w,m)}:function(w){return F(w,f)};var m}function Gk(f){return[].slice.call(f)}var Zle=0;function Od(f){return f==null?":id":typeof f=="string"?f:"[".concat(f.join("+"),"]")}function Jle(f,m,K){function D(J){if(J.type===3)return null;if(J.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var q=J.lower,X=J.upper,te=J.lowerOpen,J=J.upperOpen;return q===void 0?X===void 0?null:m.upperBound(X,!!J):X===void 0?m.lowerBound(q,!!te):m.bound(q,X,!!te,!!J)}function T(ne){var q,X=ne.name;return{name:X,schema:ne,mutate:function(te){var J=te.trans,ae=te.type,de=te.keys,he=te.values,Se=te.range;return new Promise(function(Le,je){Le=dn(Le);var Ne=J.objectStore(X),Ge=Ne.keyPath==null,Ye=ae==="put"||ae==="add";if(!Ye&&ae!=="delete"&&ae!=="deleteRange")throw new Error("Invalid operation type: "+ae);var Ue,nt=(de||he||{length:1}).length;if(de&&he&&de.length!==he.length)throw new Error("Given keys array must have same length as given values array.");if(nt===0)return Le({numFailures:0,failures:{},results:[],lastResult:void 0});function Tt(di){++Bi,Ad(di)}var It=[],kt=[],Bi=0;if(ae==="deleteRange"){if(Se.type===4)return Le({numFailures:Bi,failures:kt,results:[],lastResult:void 0});Se.type===3?It.push(Ue=Ne.clear()):It.push(Ue=Ne.delete(D(Se)))}else{var Ge=Ye?Ge?[he,de]:[he,null]:[de,null],Rt=Ge[0],ii=Ge[1];if(Ye)for(var si=0;si<nt;++si)It.push(Ue=ii&&ii[si]!==void 0?Ne[ae](Rt[si],ii[si]):Ne[ae](Rt[si])),Ue.onerror=Tt;else for(si=0;si<nt;++si)It.push(Ue=Ne[ae](Rt[si])),Ue.onerror=Tt}function vg(di){di=di.target.result,It.forEach(function(za,wb){return za.error!=null&&(kt[wb]=za.error)}),Le({numFailures:Bi,failures:kt,results:ae==="delete"?de:It.map(function(za){return za.result}),lastResult:di})}Ue.onerror=function(di){Tt(di),vg(di)},Ue.onsuccess=vg})},getMany:function(te){var J=te.trans,ae=te.keys;return new Promise(function(de,he){de=dn(de);for(var Se,Le=J.objectStore(X),je=ae.length,Ne=new Array(je),Ge=0,Ye=0,Ue=function(It){It=It.target,Ne[It._pos]=It.result,++Ye===Ge&&de(Ne)},nt=uo(he),Tt=0;Tt<je;++Tt)ae[Tt]!=null&&((Se=Le.get(ae[Tt]))._pos=Tt,Se.onsuccess=Ue,Se.onerror=nt,++Ge);Ge===0&&de(Ne)})},get:function(te){var J=te.trans,ae=te.key;return new Promise(function(de,he){de=dn(de);var Se=J.objectStore(X).get(ae);Se.onsuccess=function(Le){return de(Le.target.result)},Se.onerror=uo(he)})},query:(q=Y,function(te){return new Promise(function(J,ae){J=dn(J);var de,he,Se,Ge=te.trans,Le=te.values,je=te.limit,Ue=te.query,Ne=je===1/0?void 0:je,Ye=Ue.index,Ue=Ue.range,Ge=Ge.objectStore(X),Ye=Ye.isPrimaryKey?Ge:Ge.index(Ye.name),Ue=D(Ue);if(je===0)return J({result:[]});q?((Ne=Le?Ye.getAll(Ue,Ne):Ye.getAllKeys(Ue,Ne)).onsuccess=function(nt){return J({result:nt.target.result})},Ne.onerror=uo(ae)):(de=0,he=!Le&&"openKeyCursor"in Ye?Ye.openKeyCursor(Ue):Ye.openCursor(Ue),Se=[],he.onsuccess=function(nt){var Tt=he.result;return Tt?(Se.push(Le?Tt.value:Tt.primaryKey),++de===je?J({result:Se}):void Tt.continue()):J({result:Se})},he.onerror=uo(ae))})}),openCursor:function(te){var J=te.trans,ae=te.values,de=te.query,he=te.reverse,Se=te.unique;return new Promise(function(Le,je){Le=dn(Le);var Ye=de.index,Ne=de.range,Ge=J.objectStore(X),Ge=Ye.isPrimaryKey?Ge:Ge.index(Ye.name),Ye=he?Se?"prevunique":"prev":Se?"nextunique":"next",Ue=!ae&&"openKeyCursor"in Ge?Ge.openKeyCursor(D(Ne),Ye):Ge.openCursor(D(Ne),Ye);Ue.onerror=uo(je),Ue.onsuccess=dn(function(nt){var Tt,It,kt,Bi,Rt=Ue.result;Rt?(Rt.___id=++Zle,Rt.done=!1,Tt=Rt.continue.bind(Rt),It=(It=Rt.continuePrimaryKey)&&It.bind(Rt),kt=Rt.advance.bind(Rt),Bi=function(){throw new Error("Cursor not stopped")},Rt.trans=J,Rt.stop=Rt.continue=Rt.continuePrimaryKey=Rt.advance=function(){throw new Error("Cursor not started")},Rt.fail=dn(je),Rt.next=function(){var ii=this,si=1;return this.start(function(){return si--?ii.continue():ii.stop()}).then(function(){return ii})},Rt.start=function(ii){function si(){if(Ue.result)try{ii()}catch(di){Rt.fail(di)}else Rt.done=!0,Rt.start=function(){throw new Error("Cursor behind last entry")},Rt.stop()}var vg=new Promise(function(di,za){di=dn(di),Ue.onerror=uo(za),Rt.fail=za,Rt.stop=function(wb){Rt.stop=Rt.continue=Rt.continuePrimaryKey=Rt.advance=Bi,di(wb)}});return Ue.onsuccess=dn(function(di){Ue.onsuccess=si,si()}),Rt.continue=Tt,Rt.continuePrimaryKey=It,Rt.advance=kt,si(),vg},Le(Rt)):Le(null)},je)})},count:function(te){var J=te.query,ae=te.trans,de=J.index,he=J.range;return new Promise(function(Se,Le){var je=ae.objectStore(X),Ne=de.isPrimaryKey?je:je.index(de.name),je=D(he),Ne=je?Ne.count(je):Ne.count();Ne.onsuccess=dn(function(Ge){return Se(Ge.target.result)}),Ne.onerror=uo(Le)})}}}var _,k,B,Q=(k=K,B=Gk((_=f).objectStoreNames),{schema:{name:_.name,tables:B.map(function(ne){return k.objectStore(ne)}).map(function(ne){var q=ne.keyPath,J=ne.autoIncrement,X=a(q),te={},J={name:ne.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:q==null,compound:X,keyPath:q,autoIncrement:J,unique:!0,extractKey:nb(q)},indexes:Gk(ne.indexNames).map(function(ae){return ne.index(ae)}).map(function(Se){var de=Se.name,he=Se.unique,Le=Se.multiEntry,Se=Se.keyPath,Le={name:de,compound:a(Se),keyPath:Se,unique:he,multiEntry:Le,extractKey:nb(Se)};return te[Od(Se)]=Le}),getIndexByKeyPath:function(ae){return te[Od(ae)]}};return te[":id"]=J.primaryKey,q!=null&&(te[Od(q)]=J.primaryKey),J})},hasGetAll:0<B.length&&"getAll"in k.objectStore(B[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),K=Q.schema,Y=Q.hasGetAll,Q=K.tables.map(T),H={};return Q.forEach(function(ne){return H[ne.name]=ne}),{stack:"dbcore",transaction:f.transaction.bind(f),table:function(ne){if(!H[ne])throw new Error("Table '".concat(ne,"' not found"));return H[ne]},MIN_KEY:-1/0,MAX_KEY:kd(m),schema:K}}function Xle(f,m,w,D){var T=w.IDBKeyRange;return w.indexedDB,{dbcore:(D=Jle(m,T,D),f.dbcore.reduce(function(_,k){return k=k.create,i(i({},_),k(_))},D))}}function og(f,D){var w=D.db,D=Xle(f._middlewares,w,f._deps,D);f.core=D.dbcore,f.tables.forEach(function(T){var _=T.name;f.core.schema.tables.some(function(k){return k.name===_})&&(T.core=f.core.table(_),f[_]instanceof f.Table&&(f[_].core=T.core))})}function rg(f,m,w,D){w.forEach(function(T){var _=D[T];m.forEach(function(k){var B=function K(Y,Q){return v(Y,Q)||(Y=u(Y))&&K(Y,Q)}(k,T);(!B||"value"in B&&B.value===void 0)&&(k===f.Transaction.prototype||k instanceof f.Transaction?g(k,T,{get:function(){return this.table(T)},set:function(K){p(this,T,{value:K,writable:!0,configurable:!0,enumerable:!0})}}):k[T]=new f.Table(T,_))})})}function ib(f,m){m.forEach(function(w){for(var D in w)w[D]instanceof f.Table&&delete w[D]})}function Qle(f,m){return f._cfg.version-m._cfg.version}function eue(f,m,w,D){var T=f._dbSchema;w.objectStoreNames.contains("$meta")&&!T.$meta&&(T.$meta=tb("$meta",Wk("")[0],[]),f._storeNames.push("$meta"));var _=f._createTransaction("readwrite",f._storeNames,T);_.create(w),_._completion.catch(D);var k=_._reject.bind(_),B=be.transless||be;Pr(function(){return be.trans=_,be.transless=B,m!==0?(og(f,w),Y=m,((K=_).storeNames.includes("$meta")?K.table("$meta").get("version").then(function(Q){return Q??Y}):Me.resolve(Y)).then(function(Q){return ne=Q,q=_,X=w,te=[],Q=(H=f)._versions,J=H._dbSchema=lg(0,H.idbdb,X),(Q=Q.filter(function(ae){return ae._cfg.version>=ne})).length!==0?(Q.forEach(function(ae){te.push(function(){var de=J,he=ae._cfg.dbschema;ug(H,de,X),ug(H,he,X),J=H._dbSchema=he;var Se=sb(de,he);Se.add.forEach(function(Ye){ob(X,Ye[0],Ye[1].primKey,Ye[1].indexes)}),Se.change.forEach(function(Ye){if(Ye.recreate)throw new Je.Upgrade("Not yet support for changing primary key");var Ue=X.objectStore(Ye.name);Ye.add.forEach(function(nt){return ag(Ue,nt)}),Ye.change.forEach(function(nt){Ue.deleteIndex(nt.name),ag(Ue,nt)}),Ye.del.forEach(function(nt){return Ue.deleteIndex(nt)})});var Le=ae._cfg.contentUpgrade;if(Le&&ae._cfg.version>ne){og(H,X),q._memoizedTables={};var je=V(he);Se.del.forEach(function(Ye){je[Ye]=de[Ye]}),ib(H,[H.Transaction.prototype]),rg(H,[H.Transaction.prototype],r(je),je),q.schema=je;var Ne,Ge=Ae(Le);return Ge&&vu(),Se=Me.follow(function(){var Ye;(Ne=Le(q))&&Ge&&(Ye=Ar.bind(null,null),Ne.then(Ye,Ye))}),Ne&&typeof Ne.then=="function"?Me.resolve(Ne):Se.then(function(){return Ne})}}),te.push(function(de){var he,Se,Le=ae._cfg.dbschema;he=Le,Se=de,[].slice.call(Se.db.objectStoreNames).forEach(function(je){return he[je]==null&&Se.db.deleteObjectStore(je)}),ib(H,[H.Transaction.prototype]),rg(H,[H.Transaction.prototype],H._storeNames,H._dbSchema),q.schema=H._dbSchema}),te.push(function(de){H.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(H.idbdb.version/10)===ae._cfg.version?(H.idbdb.deleteObjectStore("$meta"),delete H._dbSchema.$meta,H._storeNames=H._storeNames.filter(function(he){return he!=="$meta"})):de.objectStore("$meta").put(ae._cfg.version,"version"))})}),function ae(){return te.length?Me.resolve(te.shift()(q.idbtrans)).then(ae):Me.resolve()}().then(function(){$k(J,X)})):Me.resolve();var H,ne,q,X,te,J}).catch(k)):(r(T).forEach(function(Q){ob(w,Q,T[Q].primKey,T[Q].indexes)}),og(f,w),void Me.follow(function(){return f.on.populate.fire(_)}).catch(k));var K,Y})}function tue(f,m){$k(f._dbSchema,m),m.db.version%10!=0||m.objectStoreNames.contains("$meta")||m.db.createObjectStore("$meta").add(Math.ceil(m.db.version/10-1),"version");var w=lg(0,f.idbdb,m);ug(f,f._dbSchema,m);for(var D=0,T=sb(w,f._dbSchema).change;D<T.length;D++){var _=function(k){if(k.change.length||k.recreate)return console.warn("Unable to patch indexes of table ".concat(k.name," because it has changes on the type of index or primary key.")),{value:void 0};var B=m.objectStore(k.name);k.add.forEach(function(K){Te&&console.debug("Dexie upgrade patch: Creating missing index ".concat(k.name,".").concat(K.src)),ag(B,K)})}(T[D]);if(typeof _=="object")return _.value}}function sb(f,m){var w,D={del:[],add:[],change:[]};for(w in f)m[w]||D.del.push(w);for(w in m){var T=f[w],_=m[w];if(T){var k={name:w,def:_,recreate:!1,del:[],add:[],change:[]};if(""+(T.primKey.keyPath||"")!=""+(_.primKey.keyPath||"")||T.primKey.auto!==_.primKey.auto)k.recreate=!0,D.change.push(k);else{var B=T.idxByName,K=_.idxByName,Y=void 0;for(Y in B)K[Y]||k.del.push(Y);for(Y in K){var Q=B[Y],H=K[Y];Q?Q.src!==H.src&&k.change.push(H):k.add.push(H)}(0<k.del.length||0<k.add.length||0<k.change.length)&&D.change.push(k)}}else D.add.push([w,_])}return D}function ob(f,m,w,D){var T=f.db.createObjectStore(m,w.keyPath?{keyPath:w.keyPath,autoIncrement:w.auto}:{autoIncrement:w.auto});return D.forEach(function(_){return ag(T,_)}),T}function $k(f,m){r(f).forEach(function(w){m.db.objectStoreNames.contains(w)||(Te&&console.debug("Dexie: Creating missing table",w),ob(m,w,f[w].primKey,f[w].indexes))})}function ag(f,m){f.createIndex(m.name,m.keyPath,{unique:m.unique,multiEntry:m.multi})}function lg(f,m,w){var D={};return R(m.objectStoreNames,0).forEach(function(T){for(var _=w.objectStore(T),k=eb(Hk(Y=_.keyPath),Y||"",!0,!1,!!_.autoIncrement,Y&&typeof Y!="string",!0),B=[],K=0;K<_.indexNames.length;++K){var Q=_.index(_.indexNames[K]),Y=Q.keyPath,Q=eb(Q.name,Y,!!Q.unique,!!Q.multiEntry,!1,Y&&typeof Y!="string",!1);B.push(Q)}D[T]=tb(T,k,B)}),D}function ug(f,m,w){for(var D=w.db.objectStoreNames,T=0;T<D.length;++T){var _=D[T],k=w.objectStore(_);f._hasGetAll="getAll"in k;for(var B=0;B<k.indexNames.length;++B){var K=k.indexNames[B],Y=k.index(K).keyPath,Q=typeof Y=="string"?Y:"["+R(Y).join("+")+"]";!m[_]||(Y=m[_].idxByName[Q])&&(Y.name=K,delete m[_].idxByName[Q],m[_].idxByName[K]=Y)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&o.WorkerGlobalScope&&o instanceof o.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(f._hasGetAll=!1)}function Wk(f){return f.split(",").map(function(m,w){var D=(m=m.trim()).replace(/([&*]|\+\+)/g,""),T=/^\[/.test(D)?D.match(/^\[(.*)\]$/)[1].split("+"):D;return eb(D,T||null,/\&/.test(m),/\*/.test(m),/\+\+/.test(m),a(T),w===0)})}var nue=(cg.prototype._parseStoresSpec=function(f,m){r(f).forEach(function(w){if(f[w]!==null){var D=Wk(f[w]),T=D.shift();if(T.unique=!0,T.multi)throw new Je.Schema("Primary key cannot be multi-valued");D.forEach(function(_){if(_.auto)throw new Je.Schema("Only primary key can be marked as autoIncrement (++)");if(!_.keyPath)throw new Je.Schema("Index must have a name and cannot be an empty string")}),m[w]=tb(w,T,D)}})},cg.prototype.stores=function(w){var m=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,w):w;var w=m._versions,D={},T={};return w.forEach(function(_){l(D,_._cfg.storesSource),T=_._cfg.dbschema={},_._parseStoresSpec(D,T)}),m._dbSchema=T,ib(m,[m._allTables,m,m.Transaction.prototype]),rg(m,[m._allTables,m,m.Transaction.prototype,this._cfg.tables],r(T),T),m._storeNames=r(T),this},cg.prototype.upgrade=function(f){return this._cfg.contentUpgrade=Pe(this._cfg.contentUpgrade||_t,f),this},cg);function cg(){}function rb(f,m){var w=f._dbNamesDB;return w||(w=f._dbNamesDB=new Ko(eg,{addons:[],indexedDB:f,IDBKeyRange:m})).version(1).stores({dbnames:"name"}),w.table("dbnames")}function ab(f){return f&&typeof f.databases=="function"}function lb(f){return Pr(function(){return be.letThrough=!0,f()})}function ub(f){return!("from"in f)}var ni=function(f,m){if(!this){var w=new ni;return f&&"d"in f&&l(w,f),w}l(this,arguments.length?{d:1,from:f,to:1<arguments.length?m:f}:{d:0})};function Md(f,m,w){var D=Mt(m,w);if(!isNaN(D)){if(0<D)throw RangeError();if(ub(f))return l(f,{from:m,to:w,d:1});var T=f.l,D=f.r;if(Mt(w,f.from)<0)return T?Md(T,m,w):f.l={from:m,to:w,d:1,l:null,r:null},Uk(f);if(0<Mt(m,f.to))return D?Md(D,m,w):f.r={from:m,to:w,d:1,l:null,r:null},Uk(f);Mt(m,f.from)<0&&(f.from=m,f.l=null,f.d=D?D.d+1:1),0<Mt(w,f.to)&&(f.to=w,f.r=null,f.d=f.l?f.l.d+1:1),w=!f.r,T&&!f.l&&Ld(f,T),D&&w&&Ld(f,D)}}function Ld(f,m){ub(m)||function w(D,K){var _=K.from,k=K.to,B=K.l,K=K.r;Md(D,_,k),B&&w(D,B),K&&w(D,K)}(f,m)}function zk(f,m){var w=dg(m),D=w.next();if(D.done)return!1;for(var T=D.value,_=dg(f),k=_.next(T.from),B=k.value;!D.done&&!k.done;){if(Mt(B.from,T.to)<=0&&0<=Mt(B.to,T.from))return!0;Mt(T.from,B.from)<0?T=(D=w.next(B.from)).value:B=(k=_.next(T.from)).value}return!1}function dg(f){var m=ub(f)?null:{s:0,n:f};return{next:function(w){for(var D=0<arguments.length;m;)switch(m.s){case 0:if(m.s=1,D)for(;m.n.l&&Mt(w,m.n.from)<0;)m={up:m,n:m.n.l,s:1};else for(;m.n.l;)m={up:m,n:m.n.l,s:1};case 1:if(m.s=2,!D||Mt(w,m.n.to)<=0)return{value:m.n,done:!1};case 2:if(m.n.r){m.s=3,m={up:m,n:m.n.r,s:0};continue}case 3:m=m.up}return{done:!0}}}}function Uk(f){var m,w,D=(((m=f.r)===null||m===void 0?void 0:m.d)||0)-(((w=f.l)===null||w===void 0?void 0:w.d)||0),T=1<D?"r":D<-1?"l":"";T&&(m=T=="r"?"l":"r",w=i({},f),D=f[T],f.from=D.from,f.to=D.to,f[T]=D[T],w[T]=D[m],(f[m]=w).d=jk(w)),f.d=jk(f)}function jk(w){var m=w.r,w=w.l;return(m?w?Math.max(m.d,w.d):m.d:w?w.d:0)+1}function hg(f,m){return r(m).forEach(function(w){f[w]?Ld(f[w],m[w]):f[w]=function D(T){var _,k,B={};for(_ in T)d(T,_)&&(k=T[_],B[_]=!k||typeof k!="object"||P.has(k.constructor)?k:D(k));return B}(m[w])}),f}function cb(f,m){return f.all||m.all||Object.keys(f).some(function(w){return m[w]&&zk(m[w],f[w])})}h(ni.prototype,((rs={add:function(f){return Ld(this,f),this},addKey:function(f){return Md(this,f,f),this},addKeys:function(f){var m=this;return f.forEach(function(w){return Md(m,w,w)}),this},hasKey:function(f){var m=dg(this).next(f).value;return m&&Mt(m.from,f)<=0&&0<=Mt(m.to,f)}})[ee]=function(){return dg(this)},rs));var $a={},db={},hb=!1;function fg(f){hg(db,f),hb||(hb=!0,setTimeout(function(){hb=!1,fb(db,!(db={}))},0))}function fb(f,m){m===void 0&&(m=!1);var w=new Set;if(f.all)for(var D=0,T=Object.values($a);D<T.length;D++)Kk(k=T[D],f,w,m);else for(var _ in f){var k,B=/^idb\:\/\/(.*)\/(.*)\//.exec(_);B&&(_=B[1],B=B[2],(k=$a["idb://".concat(_,"/").concat(B)])&&Kk(k,f,w,m))}w.forEach(function(K){return K()})}function Kk(f,m,w,D){for(var T=[],_=0,k=Object.entries(f.queries.query);_<k.length;_++){for(var B=k[_],K=B[0],Y=[],Q=0,H=B[1];Q<H.length;Q++){var ne=H[Q];cb(m,ne.obsSet)?ne.subscribers.forEach(function(J){return w.add(J)}):D&&Y.push(ne)}D&&T.push([K,Y])}if(D)for(var q=0,X=T;q<X.length;q++){var te=X[q],K=te[0],Y=te[1];f.queries.query[K]=Y}}function iue(f){var m=f._state,w=f._deps.indexedDB;if(m.isBeingOpened||f.idbdb)return m.dbReadyPromise.then(function(){return m.dbOpenError?Dn(m.dbOpenError):f});m.isBeingOpened=!0,m.dbOpenError=null,m.openComplete=!1;var D=m.openCanceller,T=Math.round(10*f.verno),_=!1;function k(){if(m.openCanceller!==D)throw new Je.DatabaseClosed("db.open() was cancelled")}function B(){return new Me(function(ne,q){if(k(),!w)throw new Je.MissingAPI;var X=f.name,te=m.autoSchema||!T?w.open(X):w.open(X,T);if(!te)throw new Je.MissingAPI;te.onerror=uo(q),te.onblocked=dn(f._fireOnBlocked),te.onupgradeneeded=dn(function(J){var ae;Q=te.transaction,m.autoSchema&&!f._options.allowEmptyDB?(te.onerror=Ad,Q.abort(),te.result.close(),(ae=w.deleteDatabase(X)).onsuccess=ae.onerror=dn(function(){q(new Je.NoSuchDatabase("Database ".concat(X," doesnt exist")))})):(Q.onerror=uo(q),J=J.oldVersion>Math.pow(2,62)?0:J.oldVersion,H=J<1,f.idbdb=te.result,_&&tue(f,Q),eue(f,J/10,Q,q))},q),te.onsuccess=dn(function(){Q=null;var J,ae,de,he,Se,Le=f.idbdb=te.result,je=R(Le.objectStoreNames);if(0<je.length)try{var Ne=Le.transaction((he=je).length===1?he[0]:he,"readonly");if(m.autoSchema)ae=Le,de=Ne,(J=f).verno=ae.version/10,de=J._dbSchema=lg(0,ae,de),J._storeNames=R(ae.objectStoreNames,0),rg(J,[J._allTables],r(de),de);else if(ug(f,f._dbSchema,Ne),((Se=sb(lg(0,(Se=f).idbdb,Ne),Se._dbSchema)).add.length||Se.change.some(function(Ge){return Ge.add.length||Ge.change.length}))&&!_)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."),Le.close(),T=Le.version+1,_=!0,ne(B());og(f,Ne)}catch{}Cu.push(f),Le.onversionchange=dn(function(Ge){m.vcFired=!0,f.on("versionchange").fire(Ge)}),Le.onclose=dn(function(Ge){f.on("close").fire(Ge)}),H&&(Se=f._deps,Ne=X,Le=Se.indexedDB,Se=Se.IDBKeyRange,ab(Le)||Ne===eg||rb(Le,Se).put({name:Ne}).catch(_t)),ne()},q)}).catch(function(ne){switch(ne==null?void 0:ne.name){case"UnknownError":if(0<m.PR1398_maxLoop)return m.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),B();break;case"VersionError":if(0<T)return T=0,B()}return Me.reject(ne)})}var K,Y=m.dbReadyResolve,Q=null,H=!1;return Me.race([D,(typeof navigator>"u"?Me.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(ne){function q(){return indexedDB.databases().finally(ne)}K=setInterval(q,100),q()}).finally(function(){return clearInterval(K)}):Promise.resolve()).then(B)]).then(function(){return k(),m.onReadyBeingFired=[],Me.resolve(lb(function(){return f.on.ready.fire(f.vip)})).then(function ne(){if(0<m.onReadyBeingFired.length){var q=m.onReadyBeingFired.reduce(Pe,_t);return m.onReadyBeingFired=[],Me.resolve(lb(function(){return q(f.vip)})).then(ne)}})}).finally(function(){m.openCanceller===D&&(m.onReadyBeingFired=null,m.isBeingOpened=!1)}).catch(function(ne){m.dbOpenError=ne;try{Q&&Q.abort()}catch{}return D===m.openCanceller&&f._close(),Dn(ne)}).finally(function(){m.openComplete=!0,Y()}).then(function(){var ne;return H&&(ne={},f.tables.forEach(function(q){q.schema.indexes.forEach(function(X){X.name&&(ne["idb://".concat(f.name,"/").concat(q.name,"/").concat(X.name)]=new ni(-1/0,[[[]]]))}),ne["idb://".concat(f.name,"/").concat(q.name,"/")]=ne["idb://".concat(f.name,"/").concat(q.name,"/:dels")]=new ni(-1/0,[[[]]])}),Or(Id).fire(ne),fb(ne,!0)),f})}function pb(f){function m(_){return f.next(_)}var w=T(m),D=T(function(_){return f.throw(_)});function T(_){return function(K){var B=_(K),K=B.value;return B.done?K:K&&typeof K.then=="function"?K.then(w,D):a(K)?Promise.all(K).then(w,D):w(K)}}return T(m)()}function pg(f,m,w){for(var D=a(f)?f.slice():[f],T=0;T<w;++T)D.push(m);return D}var sue={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(f){return i(i({},f),{table:function(m){var w=f.table(m),D=w.schema,T={},_=[];function k(H,ne,q){var X=Od(H),te=T[X]=T[X]||[],J=H==null?0:typeof H=="string"?1:H.length,ae=0<ne,ae=i(i({},q),{name:ae?"".concat(X,"(virtual-from:").concat(q.name,")"):q.name,lowLevelIndex:q,isVirtual:ae,keyTail:ne,keyLength:J,extractKey:nb(H),unique:!ae&&q.unique});return te.push(ae),ae.isPrimaryKey||_.push(ae),1<J&&k(J===2?H[0]:H.slice(0,J-1),ne+1,q),te.sort(function(de,he){return de.keyTail-he.keyTail}),ae}m=k(D.primaryKey.keyPath,0,D.primaryKey),T[":id"]=[m];for(var B=0,K=D.indexes;B<K.length;B++){var Y=K[B];k(Y.keyPath,0,Y)}function Q(H){var ne,q=H.query.index;return q.isVirtual?i(i({},H),{query:{index:q.lowLevelIndex,range:(ne=H.query.range,q=q.keyTail,{type:ne.type===1?2:ne.type,lower:pg(ne.lower,ne.lowerOpen?f.MAX_KEY:f.MIN_KEY,q),lowerOpen:!0,upper:pg(ne.upper,ne.upperOpen?f.MIN_KEY:f.MAX_KEY,q),upperOpen:!0})}}):H}return i(i({},w),{schema:i(i({},D),{primaryKey:m,indexes:_,getIndexByKeyPath:function(H){return(H=T[Od(H)])&&H[0]}}),count:function(H){return w.count(Q(H))},query:function(H){return w.query(Q(H))},openCursor:function(H){var ne=H.query.index,q=ne.keyTail,X=ne.isVirtual,te=ne.keyLength;return X?w.openCursor(Q(H)).then(function(ae){return ae&&J(ae)}):w.openCursor(H);function J(ae){return Object.create(ae,{continue:{value:function(de){de!=null?ae.continue(pg(de,H.reverse?f.MAX_KEY:f.MIN_KEY,q)):H.unique?ae.continue(ae.key.slice(0,te).concat(H.reverse?f.MIN_KEY:f.MAX_KEY,q)):ae.continue()}},continuePrimaryKey:{value:function(de,he){ae.continuePrimaryKey(pg(de,f.MAX_KEY,q),he)}},primaryKey:{get:function(){return ae.primaryKey}},key:{get:function(){var de=ae.key;return te===1?de[0]:de.slice(0,te)}},value:{get:function(){return ae.value}}})}}})}})}};function gb(f,m,w,D){return w=w||{},D=D||"",r(f).forEach(function(T){var _,k,B;d(m,T)?(_=f[T],k=m[T],typeof _=="object"&&typeof k=="object"&&_&&k?(B=Be(_))!==Be(k)?w[D+T]=m[T]:B==="Object"?gb(_,k,w,D+T+"."):_!==k&&(w[D+T]=m[T]):_!==k&&(w[D+T]=m[T])):w[D+T]=void 0}),r(m).forEach(function(T){d(f,T)||(w[D+T]=m[T])}),w}function mb(f,m){return m.type==="delete"?m.keys:m.keys||m.values.map(f.extractKey)}var oue={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(f){return i(i({},f),{table:function(m){var w=f.table(m),D=w.schema.primaryKey;return i(i({},w),{mutate:function(T){var _=be.trans,k=_.table(m).hook,B=k.deleting,K=k.creating,Y=k.updating;switch(T.type){case"add":if(K.fire===_t)break;return _._promise("readwrite",function(){return Q(T)},!0);case"put":if(K.fire===_t&&Y.fire===_t)break;return _._promise("readwrite",function(){return Q(T)},!0);case"delete":if(B.fire===_t)break;return _._promise("readwrite",function(){return Q(T)},!0);case"deleteRange":if(B.fire===_t)break;return _._promise("readwrite",function(){return function H(ne,q,X){return w.query({trans:ne,values:!1,query:{index:D,range:q},limit:X}).then(function(te){var J=te.result;return Q({type:"delete",keys:J,trans:ne}).then(function(ae){return 0<ae.numFailures?Promise.reject(ae.failures[0]):J.length<X?{failures:[],numFailures:0,lastResult:void 0}:H(ne,i(i({},q),{lower:J[J.length-1],lowerOpen:!0}),X)})})}(T.trans,T.range,1e4)},!0)}return w.mutate(T);function Q(H){var ne,q,X,te=be.trans,J=H.keys||mb(D,H);if(!J)throw new Error("Keys missing");return(H=H.type==="add"||H.type==="put"?i(i({},H),{keys:J}):i({},H)).type!=="delete"&&(H.values=s([],H.values)),H.keys&&(H.keys=s([],H.keys)),ne=w,X=J,((q=H).type==="add"?Promise.resolve([]):ne.getMany({trans:q.trans,keys:X,cache:"immutable"})).then(function(ae){var de=J.map(function(he,Se){var Le,je,Ne,Ge=ae[Se],Ye={onerror:null,onsuccess:null};return H.type==="delete"?B.fire.call(Ye,he,Ge,te):H.type==="add"||Ge===void 0?(Le=K.fire.call(Ye,he,H.values[Se],te),he==null&&Le!=null&&(H.keys[Se]=he=Le,D.outbound||x(H.values[Se],D.keyPath,he))):(Le=gb(Ge,H.values[Se]),(je=Y.fire.call(Ye,Le,he,Ge,te))&&(Ne=H.values[Se],Object.keys(je).forEach(function(Ue){d(Ne,Ue)?Ne[Ue]=je[Ue]:x(Ne,Ue,je[Ue])}))),Ye});return w.mutate(H).then(function(he){for(var Se=he.failures,Le=he.results,je=he.numFailures,he=he.lastResult,Ne=0;Ne<J.length;++Ne){var Ge=(Le||J)[Ne],Ye=de[Ne];Ge==null?Ye.onerror&&Ye.onerror(Se[Ne]):Ye.onsuccess&&Ye.onsuccess(H.type==="put"&&ae[Ne]?H.values[Ne]:Ge)}return{failures:Se,results:Le,numFailures:je,lastResult:he}}).catch(function(he){return de.forEach(function(Se){return Se.onerror&&Se.onerror(he)}),Promise.reject(he)})})}}})}})}};function qk(f,m,w){try{if(!m||m.keys.length<f.length)return null;for(var D=[],T=0,_=0;T<m.keys.length&&_<f.length;++T)Mt(m.keys[T],f[_])===0&&(D.push(w?ie(m.values[T]):m.values[T]),++_);return D.length===f.length?D:null}catch{return null}}var rue={stack:"dbcore",level:-1,create:function(f){return{table:function(m){var w=f.table(m);return i(i({},w),{getMany:function(D){if(!D.cache)return w.getMany(D);var T=qk(D.keys,D.trans._cache,D.cache==="clone");return T?Me.resolve(T):w.getMany(D).then(function(_){return D.trans._cache={keys:D.keys,values:D.cache==="clone"?ie(_):_},_})},mutate:function(D){return D.type!=="add"&&(D.trans._cache=null),w.mutate(D)}})}}}};function Yk(f,m){return f.trans.mode==="readonly"&&!!f.subscr&&!f.trans.explicit&&f.trans.db._options.cache!=="disabled"&&!m.schema.primaryKey.outbound}function Zk(f,m){switch(f){case"query":return m.values&&!m.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var aue={stack:"dbcore",level:0,name:"Observability",create:function(f){var m=f.schema.name,w=new ni(f.MIN_KEY,f.MAX_KEY);return i(i({},f),{transaction:function(D,T,_){if(be.subscr&&T!=="readonly")throw new Je.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(be.querier));return f.transaction(D,T,_)},table:function(D){var T=f.table(D),_=T.schema,k=_.primaryKey,H=_.indexes,B=k.extractKey,K=k.outbound,Y=k.autoIncrement&&H.filter(function(q){return q.compound&&q.keyPath.includes(k.keyPath)}),Q=i(i({},T),{mutate:function(q){function X(Ue){return Ue="idb://".concat(m,"/").concat(D,"/").concat(Ue),he[Ue]||(he[Ue]=new ni)}var te,J,ae,de=q.trans,he=q.mutatedParts||(q.mutatedParts={}),Se=X(""),Le=X(":dels"),je=q.type,Ye=q.type==="deleteRange"?[q.range]:q.type==="delete"?[q.keys]:q.values.length<50?[mb(k,q).filter(function(Ue){return Ue}),q.values]:[],Ne=Ye[0],Ge=Ye[1],Ye=q.trans._cache;return a(Ne)?(Se.addKeys(Ne),(Ye=je==="delete"||Ne.length===Ge.length?qk(Ne,Ye):null)||Le.addKeys(Ne),(Ye||Ge)&&(te=X,J=Ye,ae=Ge,_.indexes.forEach(function(Ue){var nt=te(Ue.name||"");function Tt(kt){return kt!=null?Ue.extractKey(kt):null}function It(kt){return Ue.multiEntry&&a(kt)?kt.forEach(function(Bi){return nt.addKey(Bi)}):nt.addKey(kt)}(J||ae).forEach(function(kt,ii){var Rt=J&&Tt(J[ii]),ii=ae&&Tt(ae[ii]);Mt(Rt,ii)!==0&&(Rt!=null&&It(Rt),ii!=null&&It(ii))})}))):Ne?(Ge={from:(Ge=Ne.lower)!==null&&Ge!==void 0?Ge:f.MIN_KEY,to:(Ge=Ne.upper)!==null&&Ge!==void 0?Ge:f.MAX_KEY},Le.add(Ge),Se.add(Ge)):(Se.add(w),Le.add(w),_.indexes.forEach(function(Ue){return X(Ue.name).add(w)})),T.mutate(q).then(function(Ue){return!Ne||q.type!=="add"&&q.type!=="put"||(Se.addKeys(Ue.results),Y&&Y.forEach(function(nt){for(var Tt=q.values.map(function(Rt){return nt.extractKey(Rt)}),It=nt.keyPath.findIndex(function(Rt){return Rt===k.keyPath}),kt=0,Bi=Ue.results.length;kt<Bi;++kt)Tt[kt][It]=Ue.results[kt];X(nt.name).addKeys(Tt)})),de.mutatedParts=hg(de.mutatedParts||{},he),Ue})}}),H=function(X){var te=X.query,X=te.index,te=te.range;return[X,new ni((X=te.lower)!==null&&X!==void 0?X:f.MIN_KEY,(te=te.upper)!==null&&te!==void 0?te:f.MAX_KEY)]},ne={get:function(q){return[k,new ni(q.key)]},getMany:function(q){return[k,new ni().addKeys(q.keys)]},count:H,query:H,openCursor:H};return r(ne).forEach(function(q){Q[q]=function(X){var te=be.subscr,J=!!te,ae=Yk(be,T)&&Zk(q,X)?X.obsSet={}:te;if(J){var de=function(Ge){return Ge="idb://".concat(m,"/").concat(D,"/").concat(Ge),ae[Ge]||(ae[Ge]=new ni)},he=de(""),Se=de(":dels"),te=ne[q](X),J=te[0],te=te[1];if((q==="query"&&J.isPrimaryKey&&!X.values?Se:de(J.name||"")).add(te),!J.isPrimaryKey){if(q!=="count"){var Le=q==="query"&&K&&X.values&&T.query(i(i({},X),{values:!1}));return T[q].apply(this,arguments).then(function(Ge){if(q==="query"){if(K&&X.values)return Le.then(function(Tt){return Tt=Tt.result,he.addKeys(Tt),Ge});var Ye=X.values?Ge.result.map(B):Ge.result;(X.values?he:Se).addKeys(Ye)}else if(q==="openCursor"){var Ue=Ge,nt=X.values;return Ue&&Object.create(Ue,{key:{get:function(){return Se.addKey(Ue.primaryKey),Ue.key}},primaryKey:{get:function(){var Tt=Ue.primaryKey;return Se.addKey(Tt),Tt}},value:{get:function(){return nt&&he.addKey(Ue.primaryKey),Ue.value}}})}return Ge})}Se.add(w)}}return T[q].apply(this,arguments)}}),Q}})}};function Jk(f,m,w){if(w.numFailures===0)return m;if(m.type==="deleteRange")return null;var D=m.keys?m.keys.length:"values"in m&&m.values?m.values.length:1;return w.numFailures===D?null:(m=i({},m),a(m.keys)&&(m.keys=m.keys.filter(function(T,_){return!(_ in w.failures)})),"values"in m&&a(m.values)&&(m.values=m.values.filter(function(T,_){return!(_ in w.failures)})),m)}function vb(f,m){return w=f,((D=m).lower===void 0||(D.lowerOpen?0<Mt(w,D.lower):0<=Mt(w,D.lower)))&&(f=f,(m=m).upper===void 0||(m.upperOpen?Mt(f,m.upper)<0:Mt(f,m.upper)<=0));var w,D}function Xk(f,m,ne,D,T,_){if(!ne||ne.length===0)return f;var k=m.query.index,B=k.multiEntry,K=m.query.range,Y=D.schema.primaryKey.extractKey,Q=k.extractKey,H=(k.lowLevelIndex||k).extractKey,ne=ne.reduce(function(q,X){var te=q,J=[];if(X.type==="add"||X.type==="put")for(var ae=new ni,de=X.values.length-1;0<=de;--de){var he,Se=X.values[de],Le=Y(Se);ae.hasKey(Le)||(he=Q(Se),(B&&a(he)?he.some(function(Ue){return vb(Ue,K)}):vb(he,K))&&(ae.addKey(Le),J.push(Se)))}switch(X.type){case"add":var je=new ni().addKeys(m.values?q.map(function(nt){return Y(nt)}):q),te=q.concat(m.values?J.filter(function(nt){return nt=Y(nt),!je.hasKey(nt)&&(je.addKey(nt),!0)}):J.map(function(nt){return Y(nt)}).filter(function(nt){return!je.hasKey(nt)&&(je.addKey(nt),!0)}));break;case"put":var Ne=new ni().addKeys(X.values.map(function(nt){return Y(nt)}));te=q.filter(function(nt){return!Ne.hasKey(m.values?Y(nt):nt)}).concat(m.values?J:J.map(function(nt){return Y(nt)}));break;case"delete":var Ge=new ni().addKeys(X.keys);te=q.filter(function(nt){return!Ge.hasKey(m.values?Y(nt):nt)});break;case"deleteRange":var Ye=X.range;te=q.filter(function(nt){return!vb(Y(nt),Ye)})}return te},f);return ne===f?f:(ne.sort(function(q,X){return Mt(H(q),H(X))||Mt(Y(q),Y(X))}),m.limit&&m.limit<1/0&&(ne.length>m.limit?ne.length=m.limit:f.length===m.limit&&ne.length<m.limit&&(T.dirty=!0)),_?Object.freeze(ne):ne)}function Qk(f,m){return Mt(f.lower,m.lower)===0&&Mt(f.upper,m.upper)===0&&!!f.lowerOpen==!!m.lowerOpen&&!!f.upperOpen==!!m.upperOpen}function lue(f,m){return function(w,D,T,_){if(w===void 0)return D!==void 0?-1:0;if(D===void 0)return 1;if((D=Mt(w,D))===0){if(T&&_)return 0;if(T)return 1;if(_)return-1}return D}(f.lower,m.lower,f.lowerOpen,m.lowerOpen)<=0&&0<=function(w,D,T,_){if(w===void 0)return D!==void 0?1:0;if(D===void 0)return-1;if((D=Mt(w,D))===0){if(T&&_)return 0;if(T)return-1;if(_)return 1}return D}(f.upper,m.upper,f.upperOpen,m.upperOpen)}function uue(f,m,w,D){f.subscribers.add(w),D.addEventListener("abort",function(){var T,_;f.subscribers.delete(w),f.subscribers.size===0&&(T=f,_=m,setTimeout(function(){T.subscribers.size===0&&L(_,T)},3e3))})}var cue={stack:"dbcore",level:0,name:"Cache",create:function(f){var m=f.schema.name;return i(i({},f),{transaction:function(w,D,T){var _,k,B=f.transaction(w,D,T);return D==="readwrite"&&(k=(_=new AbortController).signal,T=function(K){return function(){if(_.abort(),D==="readwrite"){for(var Y=new Set,Q=0,H=w;Q<H.length;Q++){var ne=H[Q],q=$a["idb://".concat(m,"/").concat(ne)];if(q){var X=f.table(ne),te=q.optimisticOps.filter(function(nt){return nt.trans===B});if(B._explicit&&K&&B.mutatedParts)for(var J=0,ae=Object.values(q.queries.query);J<ae.length;J++)for(var de=0,he=(je=ae[J]).slice();de<he.length;de++)cb((Ne=he[de]).obsSet,B.mutatedParts)&&(L(je,Ne),Ne.subscribers.forEach(function(nt){return Y.add(nt)}));else if(0<te.length){q.optimisticOps=q.optimisticOps.filter(function(nt){return nt.trans!==B});for(var Se=0,Le=Object.values(q.queries.query);Se<Le.length;Se++)for(var je,Ne,Ge,Ye=0,Ue=(je=Le[Se]).slice();Ye<Ue.length;Ye++)(Ne=Ue[Ye]).res!=null&&B.mutatedParts&&(K&&!Ne.dirty?(Ge=Object.isFrozen(Ne.res),Ge=Xk(Ne.res,Ne.req,te,X,Ne,Ge),Ne.dirty?(L(je,Ne),Ne.subscribers.forEach(function(nt){return Y.add(nt)})):Ge!==Ne.res&&(Ne.res=Ge,Ne.promise=Me.resolve({result:Ge}))):(Ne.dirty&&L(je,Ne),Ne.subscribers.forEach(function(nt){return Y.add(nt)})))}}}Y.forEach(function(nt){return nt()})}}},B.addEventListener("abort",T(!1),{signal:k}),B.addEventListener("error",T(!1),{signal:k}),B.addEventListener("complete",T(!0),{signal:k})),B},table:function(w){var D=f.table(w),T=D.schema.primaryKey;return i(i({},D),{mutate:function(_){var k=be.trans;if(T.outbound||k.db._options.cache==="disabled"||k.explicit||k.idbtrans.mode!=="readwrite")return D.mutate(_);var B=$a["idb://".concat(m,"/").concat(w)];return B?(k=D.mutate(_),_.type!=="add"&&_.type!=="put"||!(50<=_.values.length||mb(T,_).some(function(K){return K==null}))?(B.optimisticOps.push(_),_.mutatedParts&&fg(_.mutatedParts),k.then(function(K){0<K.numFailures&&(L(B.optimisticOps,_),(K=Jk(0,_,K))&&B.optimisticOps.push(K),_.mutatedParts&&fg(_.mutatedParts))}),k.catch(function(){L(B.optimisticOps,_),_.mutatedParts&&fg(_.mutatedParts)})):k.then(function(K){var Y=Jk(0,i(i({},_),{values:_.values.map(function(Q,H){var ne;return K.failures[H]?Q:(Q=(ne=T.keyPath)!==null&&ne!==void 0&&ne.includes(".")?ie(Q):i({},Q),x(Q,T.keyPath,K.results[H]),Q)})}),K);B.optimisticOps.push(Y),queueMicrotask(function(){return _.mutatedParts&&fg(_.mutatedParts)})}),k):D.mutate(_)},query:function(_){if(!Yk(be,D)||!Zk("query",_))return D.query(_);var k=((Y=be.trans)===null||Y===void 0?void 0:Y.db._options.cache)==="immutable",H=be,B=H.requery,K=H.signal,Y=function(X,te,J,ae){var de=$a["idb://".concat(X,"/").concat(te)];if(!de)return[];if(!(te=de.queries[J]))return[null,!1,de,null];var he=te[(ae.query?ae.query.index.name:null)||""];if(!he)return[null,!1,de,null];switch(J){case"query":var Se=he.find(function(Le){return Le.req.limit===ae.limit&&Le.req.values===ae.values&&Qk(Le.req.query.range,ae.query.range)});return Se?[Se,!0,de,he]:[he.find(function(Le){return("limit"in Le.req?Le.req.limit:1/0)>=ae.limit&&(!ae.values||Le.req.values)&&lue(Le.req.query.range,ae.query.range)}),!1,de,he];case"count":return Se=he.find(function(Le){return Qk(Le.req.query.range,ae.query.range)}),[Se,!!Se,de,he]}}(m,w,"query",_),Q=Y[0],H=Y[1],ne=Y[2],q=Y[3];return Q&&H?Q.obsSet=_.obsSet:(H=D.query(_).then(function(X){var te=X.result;if(Q&&(Q.res=te),k){for(var J=0,ae=te.length;J<ae;++J)Object.freeze(te[J]);Object.freeze(te)}else X.result=ie(te);return X}).catch(function(X){return q&&Q&&L(q,Q),Promise.reject(X)}),Q={obsSet:_.obsSet,promise:H,subscribers:new Set,type:"query",req:_,dirty:!1},q?q.push(Q):(q=[Q],(ne=ne||($a["idb://".concat(m,"/").concat(w)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[_.query.index.name||""]=q)),uue(Q,q,B,K),Q.promise.then(function(X){return{result:Xk(X.result,_,ne==null?void 0:ne.optimisticOps,D,Q,k)}})}})}})}};function gg(f,m){return new Proxy(f,{get:function(w,D,T){return D==="db"?m:Reflect.get(w,D,T)}})}var Ko=(Fn.prototype.version=function(f){if(isNaN(f)||f<.1)throw new Je.Type("Given version is not a positive number");if(f=Math.round(10*f)/10,this.idbdb||this._state.isBeingOpened)throw new Je.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,f);var m=this._versions,w=m.filter(function(D){return D._cfg.version===f})[0];return w||(w=new this.Version(f),m.push(w),m.sort(Qle),w.stores({}),this._state.autoSchema=!1,w)},Fn.prototype._whenReady=function(f){var m=this;return this.idbdb&&(this._state.openComplete||be.letThrough||this._vip)?f():new Me(function(w,D){if(m._state.openComplete)return D(new Je.DatabaseClosed(m._state.dbOpenError));if(!m._state.isBeingOpened){if(!m._state.autoOpen)return void D(new Je.DatabaseClosed);m.open().catch(_t)}m._state.dbReadyPromise.then(w,D)}).then(f)},Fn.prototype.use=function(f){var m=f.stack,w=f.create,D=f.level,T=f.name;return T&&this.unuse({stack:m,name:T}),f=this._middlewares[m]||(this._middlewares[m]=[]),f.push({stack:m,create:w,level:D??10,name:T}),f.sort(function(_,k){return _.level-k.level}),this},Fn.prototype.unuse=function(f){var m=f.stack,w=f.name,D=f.create;return m&&this._middlewares[m]&&(this._middlewares[m]=this._middlewares[m].filter(function(T){return D?T.create!==D:!!w&&T.name!==w})),this},Fn.prototype.open=function(){var f=this;return Ba(fe,function(){return iue(f)})},Fn.prototype._close=function(){var f=this._state,m=Cu.indexOf(this);if(0<=m&&Cu.splice(m,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}f.isBeingOpened||(f.dbReadyPromise=new Me(function(w){f.dbReadyResolve=w}),f.openCanceller=new Me(function(w,D){f.cancelOpen=D}))},Fn.prototype.close=function(w){var m=(w===void 0?{disableAutoOpen:!0}:w).disableAutoOpen,w=this._state;m?(w.isBeingOpened&&w.cancelOpen(new Je.DatabaseClosed),this._close(),w.autoOpen=!1,w.dbOpenError=new Je.DatabaseClosed):(this._close(),w.autoOpen=this._options.autoOpen||w.isBeingOpened,w.openComplete=!1,w.dbOpenError=null)},Fn.prototype.delete=function(f){var m=this;f===void 0&&(f={disableAutoOpen:!0});var w=0<arguments.length&&typeof arguments[0]!="object",D=this._state;return new Me(function(T,_){function k(){m.close(f);var B=m._deps.indexedDB.deleteDatabase(m.name);B.onsuccess=dn(function(){var K,Y,Q;K=m._deps,Y=m.name,Q=K.indexedDB,K=K.IDBKeyRange,ab(Q)||Y===eg||rb(Q,K).delete(Y).catch(_t),T()}),B.onerror=uo(_),B.onblocked=m._fireOnBlocked}if(w)throw new Je.InvalidArgument("Invalid closeOptions argument to db.delete()");D.isBeingOpened?D.dbReadyPromise.then(k):k()})},Fn.prototype.backendDB=function(){return this.idbdb},Fn.prototype.isOpen=function(){return this.idbdb!==null},Fn.prototype.hasBeenClosed=function(){var f=this._state.dbOpenError;return f&&f.name==="DatabaseClosed"},Fn.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Fn.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Fn.prototype,"tables",{get:function(){var f=this;return r(this._allTables).map(function(m){return f._allTables[m]})},enumerable:!1,configurable:!0}),Fn.prototype.transaction=function(){var f=(function(m,w,D){var T=arguments.length;if(T<2)throw new Je.InvalidArgument("Too few arguments");for(var _=new Array(T-1);--T;)_[T-1]=arguments[T];return D=_.pop(),[m,M(_),D]}).apply(this,arguments);return this._transaction.apply(this,f)},Fn.prototype._transaction=function(f,m,w){var D=this,T=be.trans;T&&T.db===this&&f.indexOf("!")===-1||(T=null);var _,k,B=f.indexOf("?")!==-1;f=f.replace("!","").replace("?","");try{if(k=m.map(function(Y){if(Y=Y instanceof D.Table?Y.name:Y,typeof Y!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return Y}),f=="r"||f===qw)_=qw;else{if(f!="rw"&&f!=Yw)throw new Je.InvalidArgument("Invalid transaction mode: "+f);_=Yw}if(T){if(T.mode===qw&&_===Yw){if(!B)throw new Je.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");T=null}T&&k.forEach(function(Y){if(T&&T.storeNames.indexOf(Y)===-1){if(!B)throw new Je.SubTransaction("Table "+Y+" not included in parent transaction.");T=null}}),B&&T&&!T.active&&(T=null)}}catch(Y){return T?T._promise(null,function(Q,H){H(Y)}):Dn(Y)}var K=(function Y(Q,H,ne,q,X){return Me.resolve().then(function(){var te=be.transless||be,J=Q._createTransaction(H,ne,Q._dbSchema,q);if(J.explicit=!0,te={trans:J,transless:te},q)J.idbtrans=q.idbtrans;else try{J.create(),J.idbtrans._explicit=!0,Q._state.PR1398_maxLoop=3}catch(he){return he.name===xt.InvalidState&&Q.isOpen()&&0<--Q._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),Q.close({disableAutoOpen:!1}),Q.open().then(function(){return Y(Q,H,ne,null,X)})):Dn(he)}var ae,de=Ae(X);return de&&vu(),te=Me.follow(function(){var he;(ae=X.call(J,J))&&(de?(he=Ar.bind(null,null),ae.then(he,he)):typeof ae.next=="function"&&typeof ae.throw=="function"&&(ae=pb(ae)))},te),(ae&&typeof ae.then=="function"?Me.resolve(ae).then(function(he){return J.active?he:Dn(new Je.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):te.then(function(){return ae})).then(function(he){return q&&J._resolve(),J._completion.then(function(){return he})}).catch(function(he){return J._reject(he),Dn(he)})})}).bind(null,this,_,k,T,w);return T?T._promise(_,K,"lock"):be.trans?Ba(be.transless,function(){return D._whenReady(K)}):this._whenReady(K)},Fn.prototype.table=function(f){if(!d(this._allTables,f))throw new Je.InvalidTable("Table ".concat(f," does not exist"));return this._allTables[f]},Fn);function Fn(f,m){var w=this;this._middlewares={},this.verno=0;var D=Fn.dependencies;this._options=m=i({addons:Fn.addons,autoOpen:!0,indexedDB:D.indexedDB,IDBKeyRange:D.IDBKeyRange,cache:"cloned"},m),this._deps={indexedDB:m.indexedDB,IDBKeyRange:m.IDBKeyRange},D=m.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var T,_,k,B,K,Y={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:_t,dbReadyPromise:null,cancelOpen:_t,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:m.autoOpen};Y.dbReadyPromise=new Me(function(H){Y.dbReadyResolve=H}),Y.openCanceller=new Me(function(H,ne){Y.cancelOpen=ne}),this._state=Y,this.name=f,this.on=xd(this,"populate","blocked","versionchange","close",{ready:[Pe,_t]}),this.on.ready.subscribe=E(this.on.ready.subscribe,function(H){return function(ne,q){Fn.vip(function(){var X,te=w._state;te.openComplete?(te.dbOpenError||Me.resolve().then(ne),q&&H(ne)):te.onReadyBeingFired?(te.onReadyBeingFired.push(ne),q&&H(ne)):(H(ne),X=w,q||H(function J(){X.on.ready.unsubscribe(ne),X.on.ready.unsubscribe(J)}))})}}),this.Collection=(T=this,_d(jle.prototype,function(ae,J){this.db=T;var q=Pk,X=null;if(J)try{q=J()}catch(de){X=de}var te=ae._ctx,J=te.table,ae=J.hook.reading.fire;this._ctx={table:J,index:te.index,isPrimKey:!te.index||J.schema.primKey.keyPath&&te.index===J.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:X,or:te.or,valueMapper:ae!==O?ae:null}})),this.Table=(_=this,_d(Ok.prototype,function(H,ne,q){this.db=_,this._tx=q,this.name=H,this.schema=ne,this.hook=_._allTables[H]?_._allTables[H].hook:xd(null,{creating:[Fe,_t],reading:[W,O],updating:[Ee,_t],deleting:[we,_t]})})),this.Transaction=(k=this,_d(Yle.prototype,function(H,ne,q,X,te){var J=this;this.db=k,this.mode=H,this.storeNames=ne,this.schema=q,this.chromeTransactionDurability=X,this.idbtrans=null,this.on=xd(this,"complete","error","abort"),this.parent=te||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 Me(function(ae,de){J._resolve=ae,J._reject=de}),this._completion.then(function(){J.active=!1,J.on.complete.fire()},function(ae){var de=J.active;return J.active=!1,J.on.error.fire(ae),J.parent?J.parent._reject(ae):de&&J.idbtrans&&J.idbtrans.abort(),Dn(ae)})})),this.Version=(B=this,_d(nue.prototype,function(H){this.db=B,this._cfg={version:H,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(K=this,_d(Bk.prototype,function(H,ne,q){if(this.db=K,this._ctx={table:H,index:ne===":id"?null:ne,or:q},this._cmp=this._ascending=Mt,this._descending=function(X,te){return Mt(te,X)},this._max=function(X,te){return 0<Mt(X,te)?X:te},this._min=function(X,te){return Mt(X,te)<0?X:te},this._IDBKeyRange=K._deps.IDBKeyRange,!this._IDBKeyRange)throw new Je.MissingAPI})),this.on("versionchange",function(H){0<H.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(H){!H.newVersion||H.newVersion<H.oldVersion?console.warn("Dexie.delete('".concat(w.name,"') was blocked")):console.warn("Upgrade '".concat(w.name,"' blocked by other connection holding version ").concat(H.oldVersion/10))}),this._maxKey=kd(m.IDBKeyRange),this._createTransaction=function(H,ne,q,X){return new w.Transaction(H,ne,q,w._options.chromeTransactionDurability,X)},this._fireOnBlocked=function(H){w.on("blocked").fire(H),Cu.filter(function(ne){return ne.name===w.name&&ne!==w&&!ne._state.vcFired}).map(function(ne){return ne.on("versionchange").fire(H)})},this.use(rue),this.use(cue),this.use(aue),this.use(sue),this.use(oue);var Q=new Proxy(this,{get:function(H,ne,q){if(ne==="_vip")return!0;if(ne==="table")return function(te){return gg(w.table(te),Q)};var X=Reflect.get(H,ne,q);return X instanceof Ok?gg(X,Q):ne==="tables"?X.map(function(te){return gg(te,Q)}):ne==="_createTransaction"?function(){return gg(X.apply(this,arguments),Q)}:X}});this.vip=Q,D.forEach(function(H){return H(w)})}var mg,rs=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",due=(Cb.prototype.subscribe=function(f,m,w){return this._subscribe(f&&typeof f!="function"?f:{next:f,error:m,complete:w})},Cb.prototype[rs]=function(){return this},Cb);function Cb(f){this._subscribe=f}try{mg={indexedDB:o.indexedDB||o.mozIndexedDB||o.webkitIndexedDB||o.msIndexedDB,IDBKeyRange:o.IDBKeyRange||o.webkitIDBKeyRange}}catch{mg={indexedDB:null,IDBKeyRange:null}}function eO(f){var m,w=!1,D=new due(function(T){var _=Ae(f),k,B=!1,K={},Y={},Q={get closed(){return B},unsubscribe:function(){B||(B=!0,k&&k.abort(),H&&Or.storagemutated.unsubscribe(q))}};T.start&&T.start(Q);var H=!1,ne=function(){return Kw(X)},q=function(te){hg(K,te),cb(Y,K)&&ne()},X=function(){var te,J,ae;!B&&mg.indexedDB&&(K={},te={},k&&k.abort(),k=new AbortController,ae=function(de){var he=xr();try{_&&vu();var Se=Pr(f,de);return Se=_?Se.finally(Ar):Se}finally{he&&lo()}}(J={subscr:te,signal:k.signal,requery:ne,querier:f,trans:null}),Promise.resolve(ae).then(function(de){w=!0,m=de,B||J.signal.aborted||(K={},function(he){for(var Se in he)if(d(he,Se))return;return 1}(Y=te)||H||(Or(Id,q),H=!0),Kw(function(){return!B&&T.next&&T.next(de)}))},function(de){w=!1,["DatabaseClosedError","AbortError"].includes(de==null?void 0:de.name)||B||Kw(function(){B||T.error&&T.error(de)})}))};return setTimeout(ne,0),Q});return D.hasValue=function(){return w},D.getValue=function(){return m},D}var Wa=Ko;function yb(f){var m=Mr;try{Mr=!0,Or.storagemutated.fire(f),fb(f,!0)}finally{Mr=m}}h(Wa,i(i({},Wt),{delete:function(f){return new Wa(f,{addons:[]}).delete()},exists:function(f){return new Wa(f,{addons:[]}).open().then(function(m){return m.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(f){try{return m=Wa.dependencies,w=m.indexedDB,m=m.IDBKeyRange,(ab(w)?Promise.resolve(w.databases()).then(function(D){return D.map(function(T){return T.name}).filter(function(T){return T!==eg})}):rb(w,m).toCollection().primaryKeys()).then(f)}catch{return Dn(new Je.MissingAPI)}var m,w},defineClass:function(){return function(f){l(this,f)}},ignoreTransaction:function(f){return be.trans?Ba(be.transless,f):f()},vip:lb,async:function(f){return function(){try{var m=pb(f.apply(this,arguments));return m&&typeof m.then=="function"?m:Me.resolve(m)}catch(w){return Dn(w)}}},spawn:function(f,m,w){try{var D=pb(f.apply(w,m||[]));return D&&typeof D.then=="function"?D:Me.resolve(D)}catch(T){return Dn(T)}},currentTransaction:{get:function(){return be.trans||null}},waitFor:function(f,m){return m=Me.resolve(typeof f=="function"?Wa.ignoreTransaction(f):f).timeout(m||6e4),be.trans?be.trans.waitFor(m):m},Promise:Me,debug:{get:function(){return Te},set:function(f){Re(f)}},derive:C,extend:l,props:h,override:E,Events:xd,on:Or,liveQuery:eO,extendObservabilitySet:hg,getByKeyPath:F,setByKeyPath:x,delByKeyPath:function(f,m){typeof m=="string"?x(f,m,void 0):"length"in m&&[].map.call(m,function(w){x(f,w,void 0)})},shallowClone:V,deepClone:ie,getObjectDiff:gb,cmp:Mt,asap:b,minKey:-1/0,addons:[],connections:Cu,errnames:xt,dependencies:mg,cache:$a,semVer:"4.0.10",version:"4.0.10".split(".").map(function(f){return parseInt(f)}).reduce(function(f,m,w){return f+m/Math.pow(10,2*w)})})),Wa.maxKey=kd(Wa.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Or(Id,function(f){Mr||(f=new CustomEvent(Qw,{detail:f}),Mr=!0,dispatchEvent(f),Mr=!1)}),addEventListener(Qw,function(f){f=f.detail,Mr||yb(f)}));var bu,Mr=!1,tO=function(){};return typeof BroadcastChannel<"u"&&((tO=function(){(bu=new BroadcastChannel(Qw)).onmessage=function(f){return f.data&&yb(f.data)}})(),typeof bu.unref=="function"&&bu.unref(),Or(Id,function(f){Mr||bu.postMessage(f)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(f){if(!Ko.disableBfCache&&f.persisted){Te&&console.debug("Dexie: handling persisted pagehide"),bu!=null&&bu.close();for(var m=0,w=Cu;m<w.length;m++)w[m].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(f){!Ko.disableBfCache&&f.persisted&&(Te&&console.debug("Dexie: handling persisted pageshow"),tO(),yb({all:new ni(-1/0,[[]])}))})),Me.rejectionMapper=function(f,m){return!f||f instanceof Ve||f instanceof TypeError||f instanceof SyntaxError||!f.name||!Cn[f.name]?f:(m=new Cn[f.name](m||f.message,f),"stack"in f&&g(m,"stack",{get:function(){return this.inner.stack}}),m)},Re(Te),i(Ko,Object.freeze({__proto__:null,Dexie:Ko,liveQuery:eO,Entity:Ak,cmp:Mt,PropModSymbol:jo,PropModification:Pd,replacePrefix:function(f,m){return new Pd({replacePrefix:[f,m]})},add:function(f){return new Pd({add:f})},remove:function(f){return new Pd({remove:f})},default:Ko,RangeSet:ni,mergeRanges:Ld,rangesOverlap:zk}),{default:Ko}),Ko})})(eR);var _B=eR.exports;const Gm=xB(_B),tR=Symbol.for("Dexie"),rc=globalThis[tR]||(globalThis[tR]=Gm);if(Gm.semVer!==rc.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${Gm.semVer} and ${rc.semVer}`);const{liveQuery:yue,mergeRanges:wue,rangesOverlap:bue,RangeSet:Sue,cmp:Eue,Entity:Rue,PropModSymbol:Due,PropModification:Fue,replacePrefix:Tue,add:xue,remove:_ue}=rc;class nR extends rc{constructor(n){super(n);ln(this,"icons");ln(this,"visuals");ln(this,"users");ln(this,"columns");ln(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 Lh=new Map,PB=async e=>{if(!Lh.has(e)){const t=new nR(e);try{await t.open(),Lh.set(e,t)}catch(n){console.error("Failed to open database, attempting to delete and recreate:",n);try{await rc.delete(e);const i=new nR(e);await i.open(),Lh.set(e,i)}catch(i){throw console.error("Failed to delete and recreate database:",i),i}}}return Lh.get(e)},ac=({dbName:e,storeName:t})=>{const n=async()=>(await PB(e)).getTable(t);return{getCachedValue:async u=>{try{const c=await n();if(!c){console.error(`Store is undefined for key: ${u}`);return}const d=await c.get(u);return d==null?void 0:d.value}catch(c){console.error("Failed to get cached value:",c);return}},setCachedValue:async(u,c)=>{try{const d=await n();if(!d){console.error(`Store is undefined, cannot cache key: ${u}`);return}await d.put({key:u,value:c,timestamp:Date.now()})}catch(d){console.error("Failed to cache value:",d)}},deleteCachedValue:async u=>{try{const c=await n();if(!c){console.error(`Store is undefined, cannot delete key: ${u}`);return}await c.delete(u)}catch(c){console.error("Failed to delete cached value:",c)}},clearCache:async()=>{try{const u=await n();if(!u){console.error("Store is undefined, cannot clear cache");return}await u.clear()}catch(u){console.error("Failed to clear cache:",u)}},getAllKeys:async()=>{try{const u=await n();return u?(await u.toArray()).map(d=>d.key):(console.error("Store is undefined, cannot get all keys"),[])}catch(u){return console.error("Failed to get all keys:",u),[]}},getCachedValueWithTimestamp:async u=>{try{const c=await n();if(!c){console.error(`Store is undefined for key: ${u}`);return}return await c.get(u)}catch(c){console.error("Failed to get cached value with timestamp:",c);return}}}},AB="AvatarCache",IB="images",kB=()=>{const{getCachedValue:e,setCachedValue:t}=ac({dbName:AB,storeName:IB}),n=async o=>{const r=await e(o);return!r||!(r instanceof Blob)?null:URL.createObjectURL(r)},i=o=>new Promise((r,a)=>{new TB(o,{width:96,height:96,quality:1,success(l){r(l)},error(l){console.error(l.message),a(l)}})});return{getCachedImage:n,setCachedImage:async(o,r)=>{const a=await i(r);await t(o,a)}}},lc=new Map,Bs=new Map,hl=new Map,OB=5*60*1e3,iR=100;function MB(){const e=Date.now(),t=[];hl.forEach((n,i)=>{e-n>OB&&t.push(i)}),t.forEach(n=>{lc.delete(n),hl.delete(n),Bs.delete(n)})}function LB(){if(hl.size<=iR)return;const e=Array.from(hl.entries()).sort((n,i)=>n[1]-i[1]);e.slice(0,e.length-iR).forEach(([n])=>{lc.delete(n),hl.delete(n),Bs.delete(n)})}const NB=(e,t)=>{const n=Bs.get(e);return n==null||n.forEach(i=>i(t)),Bs.delete(e),t};async function VB({userId:e,avatarUrl:t,cacheInterface:n,onLoadingChange:i}){const s=await n.getCachedImage(e),o=lc.has(e),r=Bs.has(e);if(s)return NB(e,s);if(MB(),o)return new Promise(u=>{r||Bs.set(e,[]),Bs.get(e).push(u)});const a=(async()=>{let u=null,c=null;try{const d=Math.random()*300;await new Promise(p=>setTimeout(p,d)),i==null||i(!0);const h=await fetch(t,{cache:"no-cache"});if(!h.ok)throw new Error("Failed to fetch image");return u=await h.blob(),await n.setCachedImage(e,u),c=URL.createObjectURL(u),c}catch(d){throw console.error("Error loading avatar image:",d),d}finally{u=null,i==null||i(!1),hl.set(e,Date.now()),setTimeout(()=>{lc.delete(e),LB()},100)}})();lc.set(e,a);const l=await a;return Bs.has(e)&&(Bs.get(e).forEach(c=>c(l)),Bs.delete(e)),l}function Hn(e,t){BB(e)&&(e="100%");const n=HB(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 Nh(e){return Math.min(1,Math.max(0,e))}function BB(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function HB(e){return typeof e=="string"&&e.indexOf("%")!==-1}function sR(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Vh(e){return Number(e)<=1?`${Number(e)*100}%`:e}function na(e){return e.length===1?"0"+e:String(e)}function GB(e,t,n){return{r:Hn(e,255)*255,g:Hn(t,255)*255,b:Hn(n,255)*255}}function oR(e,t,n){e=Hn(e,255),t=Hn(t,255),n=Hn(n,255);const i=Math.max(e,t,n),s=Math.min(e,t,n);let o=0,r=0;const a=(i+s)/2;if(i===s)r=0,o=0;else{const l=i-s;switch(r=a>.5?l/(2-i-s):l/(i+s),i){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4;break}o/=6}return{h:o,s:r,l:a}}function $m(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 $B(e,t,n){let i,s,o;if(e=Hn(e,360),t=Hn(t,100),n=Hn(n,100),t===0)s=n,o=n,i=n;else{const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=$m(a,r,e+1/3),s=$m(a,r,e),o=$m(a,r,e-1/3)}return{r:i*255,g:s*255,b:o*255}}function rR(e,t,n){e=Hn(e,255),t=Hn(t,255),n=Hn(n,255);const i=Math.max(e,t,n),s=Math.min(e,t,n);let o=0;const r=i,a=i-s,l=i===0?0:a/i;if(i===s)o=0;else{switch(i){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4;break}o/=6}return{h:o,s:l,v:r}}function WB(e,t,n){e=Hn(e,360)*6,t=Hn(t,100),n=Hn(n,100);const i=Math.floor(e),s=e-i,o=n*(1-t),r=n*(1-s*t),a=n*(1-(1-s)*t),l=i%6,u=[n,r,o,o,a,n][l],c=[a,n,n,r,o,o][l],d=[o,o,a,n,n,r][l];return{r:u*255,g:c*255,b:d*255}}function aR(e,t,n,i){const s=[na(Math.round(e).toString(16)),na(Math.round(t).toString(16)),na(Math.round(n).toString(16))];return i&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function zB(e,t,n,i,s){const o=[na(Math.round(e).toString(16)),na(Math.round(t).toString(16)),na(Math.round(n).toString(16)),na(jB(i))];return s&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function UB(e,t,n,i){const s=e/100,o=t/100,r=n/100,a=i/100,l=255*(1-s)*(1-a),u=255*(1-o)*(1-a),c=255*(1-r)*(1-a);return{r:l,g:u,b:c}}function lR(e,t,n){let i=1-e/255,s=1-t/255,o=1-n/255,r=Math.min(i,s,o);return r===1?(i=0,s=0,o=0):(i=(i-r)/(1-r)*100,s=(s-r)/(1-r)*100,o=(o-r)/(1-r)*100),r*=100,{c:Math.round(i),m:Math.round(s),y:Math.round(o),k:Math.round(r)}}function jB(e){return Math.round(parseFloat(e)*255).toString(16)}function uR(e){return Pi(e)/255}function Pi(e){return parseInt(e,16)}function KB(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}const Wm={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 qB(e){let t={r:0,g:0,b:0},n=1,i=null,s=null,o=null,r=!1,a=!1;return typeof e=="string"&&(e=YB(e)),typeof e=="object"&&(Ai(e.r)&&Ai(e.g)&&Ai(e.b)?(t=GB(e.r,e.g,e.b),r=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ai(e.h)&&Ai(e.s)&&Ai(e.v)?(i=Vh(e.s),s=Vh(e.v),t=WB(e.h,i,s),r=!0,a="hsv"):Ai(e.h)&&Ai(e.s)&&Ai(e.l)?(i=Vh(e.s),o=Vh(e.l),t=$B(e.h,i,o),r=!0,a="hsl"):Ai(e.c)&&Ai(e.m)&&Ai(e.y)&&Ai(e.k)&&(t=UB(e.c,e.m,e.y,e.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=sR(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 sr="(?:"+"[-\\+]?\\d*\\.\\d+%?"+")|(?:"+"[-\\+]?\\d+%?"+")",zm="[\\s|\\(]+("+sr+")[,|\\s]+("+sr+")[,|\\s]+("+sr+")\\s*\\)?",Bh="[\\s|\\(]+("+sr+")[,|\\s]+("+sr+")[,|\\s]+("+sr+")[,|\\s]+("+sr+")\\s*\\)?",Ui={CSS_UNIT:new RegExp(sr),rgb:new RegExp("rgb"+zm),rgba:new RegExp("rgba"+Bh),hsl:new RegExp("hsl"+zm),hsla:new RegExp("hsla"+Bh),hsv:new RegExp("hsv"+zm),hsva:new RegExp("hsva"+Bh),cmyk:new RegExp("cmyk"+Bh),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 YB(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(Wm[e])e=Wm[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=Ui.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Ui.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ui.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Ui.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ui.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Ui.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ui.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=Ui.hex8.exec(e),n?{r:Pi(n[1]),g:Pi(n[2]),b:Pi(n[3]),a:uR(n[4]),format:t?"name":"hex8"}:(n=Ui.hex6.exec(e),n?{r:Pi(n[1]),g:Pi(n[2]),b:Pi(n[3]),format:t?"name":"hex"}:(n=Ui.hex4.exec(e),n?{r:Pi(n[1]+n[1]),g:Pi(n[2]+n[2]),b:Pi(n[3]+n[3]),a:uR(n[4]+n[4]),format:t?"name":"hex8"}:(n=Ui.hex3.exec(e),n?{r:Pi(n[1]+n[1]),g:Pi(n[2]+n[2]),b:Pi(n[3]+n[3]),format:t?"name":"hex"}:!1))))))))))}function Ai(e){return typeof e=="number"?!Number.isNaN(e):Ui.CSS_UNIT.test(e)}class pn{constructor(t="",n={}){if(t instanceof pn)return t;typeof t=="number"&&(t=KB(t)),this.originalInput=t;const i=qB(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,s;const o=t.r/255,r=t.g/255,a=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*i+.0722*s}getAlpha(){return this.a}setAlpha(t){return this.a=sR(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=rR(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=rR(this.r,this.g,this.b),n=Math.round(t.h*360),i=Math.round(t.s*100),s=Math.round(t.v*100);return this.a===1?`hsv(${n}, ${i}%, ${s}%)`:`hsva(${n}, ${i}%, ${s}%, ${this.roundA})`}toHsl(){const t=oR(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=oR(this.r,this.g,this.b),n=Math.round(t.h*360),i=Math.round(t.s*100),s=Math.round(t.l*100);return this.a===1?`hsl(${n}, ${i}%, ${s}%)`:`hsla(${n}, ${i}%, ${s}%, ${this.roundA})`}toHex(t=!1){return aR(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return zB(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(Hn(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(Hn(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{...lR(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:n,y:i,k:s}=lR(this.r,this.g,this.b);return`cmyk(${t}, ${n}, ${i}, ${s})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const t="#"+aR(this.r,this.g,this.b,!1);for(const[n,i]of Object.entries(Wm))if(t===i)return n;return!1}toString(t){const n=!!t;t=t??this.format;let i=!1;const s=this.a<1&&this.a>=0;return!n&&s&&(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 pn(this.toString())}lighten(t=10){const n=this.toHsl();return n.l+=t/100,n.l=Nh(n.l),new pn(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 pn(n)}darken(t=10){const n=this.toHsl();return n.l-=t/100,n.l=Nh(n.l),new pn(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=Nh(n.s),new pn(n)}saturate(t=10){const n=this.toHsl();return n.s+=t/100,n.s=Nh(n.s),new pn(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 pn(n)}mix(t,n=50){const i=this.toRgb(),s=new pn(t).toRgb(),o=n/100,r={r:(s.r-i.r)*o+i.r,g:(s.g-i.g)*o+i.g,b:(s.b-i.b)*o+i.b,a:(s.a-i.a)*o+i.a};return new pn(r)}analogous(t=6,n=30){const i=this.toHsl(),s=360/n,o=[this];for(i.h=(i.h-(s*t>>1)+720)%360;--t;)i.h=(i.h+s)%360,o.push(new pn(i));return o}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new pn(t)}monochromatic(t=6){const n=this.toHsv(),{h:i}=n,{s}=n;let{v:o}=n;const r=[],a=1/t;for(;t--;)r.push(new pn({h:i,s,v:o})),o=(o+a)%1;return r}splitcomplement(){const t=this.toHsl(),{h:n}=t;return[this,new pn({h:(n+72)%360,s:t.s,l:t.l}),new pn({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){const n=this.toRgb(),i=new pn(t).toRgb(),s=n.a+i.a*(1-n.a);return new pn({r:(n.r*n.a+i.r*i.a*(1-n.a))/s,g:(n.g*n.a+i.g*i.a*(1-n.a))/s,b:(n.b*n.a+i.b*i.a*(1-n.a))/s,a:s})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const n=this.toHsl(),{h:i}=n,s=[this],o=360/t;for(let r=1;r<t;r++)s.push(new pn({h:(i+r*o)%360,s:n.s,l:n.l}));return s}equals(t){const n=new pn(t);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function Um(e){return new pn(e||"").isValid}function jm(e,t){const{c1:n,c2:i}={c1:new pn(e),c2:new pn(t)};return n.equals(i)}const ZB=(e,t=3,n=1e3)=>{const i=oe(0),s=oe(!1),o=oe(!1),r=async()=>{try{await e()}catch(a){if(i.value<t)return i.value++,o.value=!0,await new Promise(l=>setTimeout(l,n)),r();throw s.value=!0,a}};return{retry:r,currentAttempt:i,errorRetry:s,isRetrying:o}},JB=["src","alt"],uc=Et(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=G(()=>({name:t.name||"",id:t.id||"",profile_image:t.profile_image||null,color:t.color||{bgColor:"#CCCCCC",textColor:"#FFFFFF"},initial:t.initial})),{getCachedImage:i,setCachedImage:s}=kB(),o=oe(""),r=oe(!1),a=oe(null),l=G(()=>{if(!t.isUseShortLabel)return"";const{initial:y,name:b}=n.value;if(typeof y=="string"&&y.trim())return y.trim();if(!b||typeof b!="string"||!b.trim())return"";const F=b.trim().split(/\s+/).filter(Boolean);return F.length===1?F[0].slice(0,2).toUpperCase():(F[0][0]+F[1][0]).toUpperCase()}),u=G(()=>n.value.profile_image?"image":(t.isUseShortLabel,"text")),c=G(()=>{var F;const b=((F=n.value.color)==null?void 0:F.bgColor)||"#CCCCCC";return Um(b)?b:"#CCCCCC"}),d=G(()=>{var F;const b=((F=n.value.color)==null?void 0:F.textColor)||"#FFFFFF";return Um(b)?b:"#FFFFFF"}),h=async()=>{if(a.value&&a.value.abort(),o.value&&o.value.startsWith("blob:")&&URL.revokeObjectURL(o.value),!n.value.id||!n.value.profile_image){o.value="";return}a.value=new AbortController;const y=a.value;try{const b=await VB({userId:n.value.id,avatarUrl:n.value.profile_image,cacheInterface:{getCachedImage:i,setCachedImage:s},onLoadingChange:F=>{y.signal.aborted||(r.value=F)}});if(y.signal.aborted||(o.value=b),b.length===0)throw console.warn("Loaded avatar image is empty, displaying initials instead."),E(),new Error("Empty image source")}catch(b){y.signal.aborted||(console.error("Failed to load avatar:",b),o.value="")}},{retry:p,errorRetry:g,isRetrying:C}=ZB(h,3,2e3),v=G(()=>({width:t.size+"px",height:t.size+"px","--font-size":t.size/1.75+"px","--avatar-size":t.size+"px","--avatar-bg":c.value,"--avatar-border":t.isMe?"var(--primary-color)":"#dcdcdc","--text-color":d.value})),S=wt(()=>n.value.id,p,{immediate:!0});pi(()=>{S(),a.value&&(a.value.abort(),a.value=null),o.value&&o.value.startsWith("blob:")&&URL.revokeObjectURL(o.value),o.value="",r.value=!1});const R=oe(!1),E=()=>{console.trace("forceDisplayInitial called"),o.value="",R.value=!0};return(y,b)=>(j(),Ce("div",{class:z([y.$style["avatar-wrapper"],{[y.$style.me]:e.isMe,[y.$style.loading]:r.value,[y.$style.disabled]:e.disabled,[y.$style.readOnly]:t.readOnly}]),style:hn(v.value)},[r.value||Z(C)?(j(),Ce("div",{key:0,class:z(y.$style["skeleton-loader"])},null,2)):(j(),Ce(At,{key:1},[u.value==="text"||Z(g)||R.value?(j(),Ce("div",{key:0,class:z(y.$style["short-label"])},yt(l.value),3)):o.value.length>0||n.value.profile_image?(j(),Ce("img",{key:1,src:o.value||n.value.profile_image||"",alt:n.value.name||"Avatar",loading:"lazy"},null,8,JB)):at("",!0)],64))],6))}}),[["__cssModules",{$style:{"avatar-wrapper":"_avatar-wrapper_uhpcu_1",me:"_me_uhpcu_14","short-label":"_short-label_uhpcu_17",action:"_action_uhpcu_35","skeleton-loader":"_skeleton-loader_uhpcu_53",shimmer:"_shimmer_uhpcu_1",loading:"_loading_uhpcu_61",disabled:"_disabled_uhpcu_64",readOnly:"_readOnly_uhpcu_67"}}]]),XB=["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"],QB=["UploadInProgress"],Hh={},cR=(e,t,n,i)=>{const s=oe(""),o=oe(""),r=oe(!0),a=G(()=>`${t}:${e.value.name}`),l=v=>URL.createObjectURL(v),u=v=>{URL.revokeObjectURL(v)},c=v=>new Blob([v],{type:"image/svg+xml"}),d=async v=>await v.text(),h=async(v,S)=>{const R=await i(a.value);if(R&&R instanceof Blob&&R.size>0||R&&typeof R=="string")return R;if(S in Hh)return await Hh[S];const E=(async()=>{try{const y=await fetch(v,{cache:"no-cache"});if(!y.ok)throw new Error("Failed to fetch visual");const b=y.headers.get("Content-Type")||"";let F;if(b.includes("svg")||b.includes("xml")){const x=await y.text();if(x.trim()){if(F=c(x),!F.size)throw new Error("Empty image blob")}else throw new Error("Empty SVG content")}else if(b.match(/image\/(jpeg|jpg|png|gif|webp)/)){if(F=await y.blob(),!F.size)throw new Error("Empty image blob")}else throw new Error(`Unsupported content type: ${b}`);return await n(a.value,F),F}catch(y){return console.error("Error fetching visual:",y),new Blob}})();return Hh[S]=E,E.finally(()=>{delete Hh[S]}),await E},p=async v=>{r.value=!0;try{const S=sessionStorage.getItem("ASSET_URL")||"https://arbodev.s3.ap-south-1.amazonaws.com",R={icon:`${S}/icon/tess/TESSRAPP_Icon_${v}`,visual:`${S}/icon/visual/TESSRAPP_Visual_${v}`,ratting:`${S}/icon/tess/rating/TESSRAPP_Icon_${v}_Outline`,flag:`${S}/icon/flags/4x3/${v}`},E=XB.includes(v)?"png":QB.includes(v)?"gif":"svg",y=`${R[t]}.${E}`,b=await h(y,a.value);typeof b!="string"&&b.size>0&&((b.type.includes("svg")||b.type.includes("xml"))&&(o.value=await d(b)),s.value=l(b))}catch(S){console.error("Error fetching remote visual:",S)}finally{r.value=!1}},g=async()=>{s.value="",o.value="",e.value.name&&(r.value=!0,await p(e.value.name),r.value=!1)},C=G(()=>o.value?o.value:"");return Lu(()=>{s.value&&u(s.value)}),wt(()=>e,v=>{g()},{deep:!0,immediate:!0}),{svgContent:C,url:s,loading:r}},e2=["innerHTML"],t2="IconCache",n2="icons",lt=Et(ct({__name:"Icon",props:{src:{},source:{default:"remote"},size:{default:24},color:{default:"currentColor"}},setup(e){$L(a=>({v6fec6c12:a.size+"px"}));const t=e,{getCachedValue:n,setCachedValue:i}=ac({dbName:t2,storeName:n2}),s=G(()=>t.source==="rating"?"ratting":"icon"),o=G(()=>({name:t.src,size:Number(t.size),color:t.color})),{svgContent:r}=cR(o,s.value,i,n);return(a,l)=>(j(),Ce("div",{class:z(a.$style.iconWrapper),innerHTML:Z(r),style:hn({color:e.color,"--size":e.size+"px"})},null,14,e2))}}),[["__cssModules",{$style:{iconWrapper:"_iconWrapper_1n0y9_1"}}]]),i2={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"},gs=({type:e,config:t})=>{const n=[];try{const i=i2[e];if(!i)throw new Error(`Link template for link type "${e}" not found`);const s=i.replace(/{(.*?)}/g,(o,r)=>{const a=t[String(r)];if(a!==void 0)return a;n.push(r)});return n.length>0?{url:s,hasError:!0,error:`Missing required keys: ${n.join(", ")}`,missingKeys:n}:{url:s,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 dR=typeof global=="object"&&global&&global.Object===Object&&global,s2=typeof self=="object"&&self&&self.Object===Object&&self,ms=dR||s2||Function("return this")(),ji=ms.Symbol,hR=Object.prototype,o2=hR.hasOwnProperty,r2=hR.toString,cc=ji?ji.toStringTag:void 0;function a2(e){var t=o2.call(e,cc),n=e[cc];try{e[cc]=void 0;var i=!0}catch{}var s=r2.call(e);return i&&(t?e[cc]=n:delete e[cc]),s}var l2=Object.prototype,u2=l2.toString;function c2(e){return u2.call(e)}var d2="[object Null]",h2="[object Undefined]",fR=ji?ji.toStringTag:void 0;function fl(e){return e==null?e===void 0?h2:d2:fR&&fR in Object(e)?a2(e):c2(e)}function Eo(e){return e!=null&&typeof e=="object"}var f2="[object Symbol]";function Gh(e){return typeof e=="symbol"||Eo(e)&&fl(e)==f2}function p2(e,t){for(var n=-1,i=e==null?0:e.length,s=Array(i);++n<i;)s[n]=t(e[n],n,e);return s}var Ki=Array.isArray,pR=ji?ji.prototype:void 0,gR=pR?pR.toString:void 0;function mR(e){if(typeof e=="string")return e;if(Ki(e))return p2(e,mR)+"";if(Gh(e))return gR?gR.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var g2=/\s/;function m2(e){for(var t=e.length;t--&&g2.test(e.charAt(t)););return t}var v2=/^\s+/;function C2(e){return e&&e.slice(0,m2(e)+1).replace(v2,"")}function Ro(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vR=NaN,y2=/^[-+]0x[0-9a-f]+$/i,w2=/^0b[01]+$/i,b2=/^0o[0-7]+$/i,S2=parseInt;function Km(e){if(typeof e=="number")return e;if(Gh(e))return vR;if(Ro(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ro(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=C2(e);var n=w2.test(e);return n||b2.test(e)?S2(e.slice(2),n?2:8):y2.test(e)?vR:+e}var CR=1/0,E2=17976931348623157e292;function qm(e){if(!e)return e===0?e:0;if(e=Km(e),e===CR||e===-CR){var t=e<0?-1:1;return t*E2}return e===e?e:0}function R2(e){var t=qm(e),n=t%1;return t===t?n?t-n:t:0}function Ym(e){return e}var D2="[object AsyncFunction]",F2="[object Function]",T2="[object GeneratorFunction]",x2="[object Proxy]";function yR(e){if(!Ro(e))return!1;var t=fl(e);return t==F2||t==T2||t==D2||t==x2}var Zm=ms["__core-js_shared__"],wR=function(){var e=/[^.]+$/.exec(Zm&&Zm.keys&&Zm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function _2(e){return!!wR&&wR in e}var P2=Function.prototype,A2=P2.toString;function ia(e){if(e!=null){try{return A2.call(e)}catch{}try{return e+""}catch{}}return""}var I2=/[\\^$.*+?()[\]{}|]/g,k2=/^\[object .+?Constructor\]$/,O2=Function.prototype,M2=Object.prototype,L2=O2.toString,N2=M2.hasOwnProperty,V2=RegExp("^"+L2.call(N2).replace(I2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function B2(e){if(!Ro(e)||_2(e))return!1;var t=yR(e)?V2:k2;return t.test(ia(e))}function H2(e,t){return e==null?void 0:e[t]}function sa(e,t){var n=H2(e,t);return B2(n)?n:void 0}var Jm=sa(ms,"WeakMap"),bR=Object.create,G2=function(){function e(){}return function(t){if(!Ro(t))return{};if(bR)return bR(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function $2(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 W2(){}var z2=800,U2=16,j2=Date.now;function K2(e){var t=0,n=0;return function(){var i=j2(),s=U2-(i-n);if(n=i,s>0){if(++t>=z2)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function q2(e){return function(){return e}}var $h=function(){try{var e=sa(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Y2=$h?function(e,t){return $h(e,"toString",{configurable:!0,enumerable:!1,value:q2(t),writable:!0})}:Ym,Z2=K2(Y2);function J2(e,t){for(var n=-1,i=e==null?0:e.length;++n<i&&t(e[n],n,e)!==!1;);return e}function X2(e,t,n,i){for(var s=e.length,o=n+-1;++o<s;)if(t(e[o],o,e))return o;return-1}function Q2(e){return e!==e}function eH(e,t,n){for(var i=n-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function tH(e,t,n){return t===t?eH(e,t,n):X2(e,Q2,n)}function nH(e,t){var n=e==null?0:e.length;return!!n&&tH(e,t,0)>-1}var iH=9007199254740991,sH=/^(?:0|[1-9]\d*)$/;function Xm(e,t){var n=typeof e;return t=t??iH,!!t&&(n=="number"||n!="symbol"&&sH.test(e))&&e>-1&&e%1==0&&e<t}function oH(e,t,n){t=="__proto__"&&$h?$h(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Wh(e,t){return e===t||e!==e&&t!==t}var rH=Object.prototype,aH=rH.hasOwnProperty;function lH(e,t,n){var i=e[t];(!(aH.call(e,t)&&Wh(i,n))||n===void 0&&!(t in e))&&oH(e,t,n)}var SR=Math.max;function uH(e,t,n){return t=SR(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=SR(i.length-t,0),r=Array(o);++s<o;)r[s]=i[t+s];s=-1;for(var a=Array(t+1);++s<t;)a[s]=i[s];return a[t]=n(r),$2(e,this,a)}}function cH(e,t){return Z2(uH(e,t,Ym),e+"")}var dH=9007199254740991;function Qm(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=dH}function zh(e){return e!=null&&Qm(e.length)&&!yR(e)}function hH(e,t,n){if(!Ro(n))return!1;var i=typeof t;return(i=="number"?zh(n)&&Xm(t,n.length):i=="string"&&t in n)?Wh(n[t],e):!1}var fH=Object.prototype;function ev(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||fH;return e===n}function pH(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}var gH="[object Arguments]";function ER(e){return Eo(e)&&fl(e)==gH}var RR=Object.prototype,mH=RR.hasOwnProperty,vH=RR.propertyIsEnumerable,Uh=ER(function(){return arguments}())?ER:function(e){return Eo(e)&&mH.call(e,"callee")&&!vH.call(e,"callee")};function CH(){return!1}var DR=typeof tn=="object"&&tn&&!tn.nodeType&&tn,FR=DR&&typeof module=="object"&&module&&!module.nodeType&&module,yH=FR&&FR.exports===DR,TR=yH?ms.Buffer:void 0,wH=TR?TR.isBuffer:void 0,dc=wH||CH,bH="[object Arguments]",SH="[object Array]",EH="[object Boolean]",RH="[object Date]",DH="[object Error]",FH="[object Function]",TH="[object Map]",xH="[object Number]",_H="[object Object]",PH="[object RegExp]",AH="[object Set]",IH="[object String]",kH="[object WeakMap]",OH="[object ArrayBuffer]",MH="[object DataView]",LH="[object Float32Array]",NH="[object Float64Array]",VH="[object Int8Array]",BH="[object Int16Array]",HH="[object Int32Array]",GH="[object Uint8Array]",$H="[object Uint8ClampedArray]",WH="[object Uint16Array]",zH="[object Uint32Array]",sn={};sn[LH]=sn[NH]=sn[VH]=sn[BH]=sn[HH]=sn[GH]=sn[$H]=sn[WH]=sn[zH]=!0,sn[bH]=sn[SH]=sn[OH]=sn[EH]=sn[MH]=sn[RH]=sn[DH]=sn[FH]=sn[TH]=sn[xH]=sn[_H]=sn[PH]=sn[AH]=sn[IH]=sn[kH]=!1;function UH(e){return Eo(e)&&Qm(e.length)&&!!sn[fl(e)]}function tv(e){return function(t){return e(t)}}var xR=typeof tn=="object"&&tn&&!tn.nodeType&&tn,hc=xR&&typeof module=="object"&&module&&!module.nodeType&&module,jH=hc&&hc.exports===xR,nv=jH&&dR.process,pl=function(){try{var e=hc&&hc.require&&hc.require("util").types;return e||nv&&nv.binding&&nv.binding("util")}catch{}}(),_R=pl&&pl.isTypedArray,iv=_R?tv(_R):UH,KH=Object.prototype,qH=KH.hasOwnProperty;function YH(e,t){var n=Ki(e),i=!n&&Uh(e),s=!n&&!i&&dc(e),o=!n&&!i&&!s&&iv(e),r=n||i||s||o,a=r?pH(e.length,String):[],l=a.length;for(var u in e)qH.call(e,u)&&!(r&&(u=="length"||s&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Xm(u,l)))&&a.push(u);return a}function PR(e,t){return function(n){return e(t(n))}}var ZH=PR(Object.keys,Object),JH=Object.prototype,XH=JH.hasOwnProperty;function AR(e){if(!ev(e))return ZH(e);var t=[];for(var n in Object(e))XH.call(e,n)&&n!="constructor"&&t.push(n);return t}function IR(e){return zh(e)?YH(e):AR(e)}var QH=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,eG=/^\w*$/;function sv(e,t){if(Ki(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Gh(e)?!0:eG.test(e)||!QH.test(e)||t!=null&&e in Object(t)}var fc=sa(Object,"create");function tG(){this.__data__=fc?fc(null):{},this.size=0}function nG(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var iG="__lodash_hash_undefined__",sG=Object.prototype,oG=sG.hasOwnProperty;function rG(e){var t=this.__data__;if(fc){var n=t[e];return n===iG?void 0:n}return oG.call(t,e)?t[e]:void 0}var aG=Object.prototype,lG=aG.hasOwnProperty;function uG(e){var t=this.__data__;return fc?t[e]!==void 0:lG.call(t,e)}var cG="__lodash_hash_undefined__";function dG(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fc&&t===void 0?cG:t,this}function oa(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])}}oa.prototype.clear=tG,oa.prototype.delete=nG,oa.prototype.get=rG,oa.prototype.has=uG,oa.prototype.set=dG;function hG(){this.__data__=[],this.size=0}function jh(e,t){for(var n=e.length;n--;)if(Wh(e[n][0],t))return n;return-1}var fG=Array.prototype,pG=fG.splice;function gG(e){var t=this.__data__,n=jh(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():pG.call(t,n,1),--this.size,!0}function mG(e){var t=this.__data__,n=jh(t,e);return n<0?void 0:t[n][1]}function vG(e){return jh(this.__data__,e)>-1}function CG(e,t){var n=this.__data__,i=jh(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}function Do(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])}}Do.prototype.clear=hG,Do.prototype.delete=gG,Do.prototype.get=mG,Do.prototype.has=vG,Do.prototype.set=CG;var pc=sa(ms,"Map");function yG(){this.size=0,this.__data__={hash:new oa,map:new(pc||Do),string:new oa}}function wG(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Kh(e,t){var n=e.__data__;return wG(t)?n[typeof t=="string"?"string":"hash"]:n.map}function bG(e){var t=Kh(this,e).delete(e);return this.size-=t?1:0,t}function SG(e){return Kh(this,e).get(e)}function EG(e){return Kh(this,e).has(e)}function RG(e,t){var n=Kh(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}function Fo(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])}}Fo.prototype.clear=yG,Fo.prototype.delete=bG,Fo.prototype.get=SG,Fo.prototype.has=EG,Fo.prototype.set=RG;var DG="Expected a function";function ov(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(DG);var n=function(){var i=arguments,s=t?t.apply(this,i):i[0],o=n.cache;if(o.has(s))return o.get(s);var r=e.apply(this,i);return n.cache=o.set(s,r)||o,r};return n.cache=new(ov.Cache||Fo),n}ov.Cache=Fo;var FG=500;function TG(e){var t=ov(e,function(i){return n.size===FG&&n.clear(),i}),n=t.cache;return t}var xG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_G=/\\(\\)?/g,PG=TG(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(xG,function(n,i,s,o){t.push(s?o.replace(_G,"$1"):i||n)}),t});function AG(e){return e==null?"":mR(e)}function kR(e,t){return Ki(e)?e:sv(e,t)?[e]:PG(AG(e))}function qh(e){if(typeof e=="string"||Gh(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function OR(e,t){t=kR(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[qh(t[n++])];return n&&n==i?e:void 0}function IG(e,t,n){var i=e==null?void 0:OR(e,t);return i===void 0?n:i}function MR(e,t){for(var n=-1,i=t.length,s=e.length;++n<i;)e[s+n]=t[n];return e}var LR=ji?ji.isConcatSpreadable:void 0;function kG(e){return Ki(e)||Uh(e)||!!(LR&&e&&e[LR])}function OG(e,t,n,i,s){var o=-1,r=e.length;for(n||(n=kG),s||(s=[]);++o<r;){var a=e[o];n(a)&&MR(s,a)}return s}var MG=PR(Object.getPrototypeOf,Object);function LG(e,t,n){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++i<s;)o[i]=e[i+t];return o}var NG=Math.ceil,VG=Math.max;function BG(e,t,n){t===void 0?t=1:t=VG(R2(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var s=0,o=0,r=Array(NG(i/t));s<i;)r[o++]=LG(e,s,s+=t);return r}function HG(){this.__data__=new Do,this.size=0}function GG(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function $G(e){return this.__data__.get(e)}function WG(e){return this.__data__.has(e)}var zG=200;function UG(e,t){var n=this.__data__;if(n instanceof Do){var i=n.__data__;if(!pc||i.length<zG-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Fo(i)}return n.set(e,t),this.size=n.size,this}function Hs(e){var t=this.__data__=new Do(e);this.size=t.size}Hs.prototype.clear=HG,Hs.prototype.delete=GG,Hs.prototype.get=$G,Hs.prototype.has=WG,Hs.prototype.set=UG;var NR=typeof tn=="object"&&tn&&!tn.nodeType&&tn,VR=NR&&typeof module=="object"&&module&&!module.nodeType&&module,jG=VR&&VR.exports===NR,BR=jG?ms.Buffer:void 0;BR&&BR.allocUnsafe;function KG(e,t){return e.slice()}function qG(e,t){for(var n=-1,i=e==null?0:e.length,s=0,o=[];++n<i;){var r=e[n];t(r,n,e)&&(o[s++]=r)}return o}function YG(){return[]}var ZG=Object.prototype,JG=ZG.propertyIsEnumerable,HR=Object.getOwnPropertySymbols,XG=HR?function(e){return e==null?[]:(e=Object(e),qG(HR(e),function(t){return JG.call(e,t)}))}:YG;function QG(e,t,n){var i=t(e);return Ki(e)?i:MR(i,n(e))}function rv(e){return QG(e,IR,XG)}var av=sa(ms,"DataView"),lv=sa(ms,"Promise"),gl=sa(ms,"Set"),GR="[object Map]",e$="[object Object]",$R="[object Promise]",WR="[object Set]",zR="[object WeakMap]",UR="[object DataView]",t$=ia(av),n$=ia(pc),i$=ia(lv),s$=ia(gl),o$=ia(Jm),qi=fl;(av&&qi(new av(new ArrayBuffer(1)))!=UR||pc&&qi(new pc)!=GR||lv&&qi(lv.resolve())!=$R||gl&&qi(new gl)!=WR||Jm&&qi(new Jm)!=zR)&&(qi=function(e){var t=fl(e),n=t==e$?e.constructor:void 0,i=n?ia(n):"";if(i)switch(i){case t$:return UR;case n$:return GR;case i$:return $R;case s$:return WR;case o$:return zR}return t});var r$=Object.prototype,a$=r$.hasOwnProperty;function l$(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&a$.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Yh=ms.Uint8Array;function uv(e){var t=new e.constructor(e.byteLength);return new Yh(t).set(new Yh(e)),t}function u$(e,t){var n=uv(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var c$=/\w*$/;function d$(e){var t=new e.constructor(e.source,c$.exec(e));return t.lastIndex=e.lastIndex,t}var jR=ji?ji.prototype:void 0,KR=jR?jR.valueOf:void 0;function h$(e){return KR?Object(KR.call(e)):{}}function f$(e,t){var n=uv(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}var p$="[object Boolean]",g$="[object Date]",m$="[object Map]",v$="[object Number]",C$="[object RegExp]",y$="[object Set]",w$="[object String]",b$="[object Symbol]",S$="[object ArrayBuffer]",E$="[object DataView]",R$="[object Float32Array]",D$="[object Float64Array]",F$="[object Int8Array]",T$="[object Int16Array]",x$="[object Int32Array]",_$="[object Uint8Array]",P$="[object Uint8ClampedArray]",A$="[object Uint16Array]",I$="[object Uint32Array]";function k$(e,t,n){var i=e.constructor;switch(t){case S$:return uv(e);case p$:case g$:return new i(+e);case E$:return u$(e);case R$:case D$:case F$:case T$:case x$:case _$:case P$:case A$:case I$:return f$(e);case m$:return new i;case v$:case w$:return new i(e);case C$:return d$(e);case y$:return new i;case b$:return h$(e)}}function O$(e){return typeof e.constructor=="function"&&!ev(e)?G2(MG(e)):{}}var M$="[object Map]";function L$(e){return Eo(e)&&qi(e)==M$}var qR=pl&&pl.isMap,N$=qR?tv(qR):L$,V$="[object Set]";function B$(e){return Eo(e)&&qi(e)==V$}var YR=pl&&pl.isSet,H$=YR?tv(YR):B$,ZR="[object Arguments]",G$="[object Array]",$$="[object Boolean]",W$="[object Date]",z$="[object Error]",JR="[object Function]",U$="[object GeneratorFunction]",j$="[object Map]",K$="[object Number]",XR="[object Object]",q$="[object RegExp]",Y$="[object Set]",Z$="[object String]",J$="[object Symbol]",X$="[object WeakMap]",Q$="[object ArrayBuffer]",eW="[object DataView]",tW="[object Float32Array]",nW="[object Float64Array]",iW="[object Int8Array]",sW="[object Int16Array]",oW="[object Int32Array]",rW="[object Uint8Array]",aW="[object Uint8ClampedArray]",lW="[object Uint16Array]",uW="[object Uint32Array]",Xt={};Xt[ZR]=Xt[G$]=Xt[Q$]=Xt[eW]=Xt[$$]=Xt[W$]=Xt[tW]=Xt[nW]=Xt[iW]=Xt[sW]=Xt[oW]=Xt[j$]=Xt[K$]=Xt[XR]=Xt[q$]=Xt[Y$]=Xt[Z$]=Xt[J$]=Xt[rW]=Xt[aW]=Xt[lW]=Xt[uW]=!0,Xt[z$]=Xt[JR]=Xt[X$]=!1;function Zh(e,t,n,i,s,o){var r;if(r!==void 0)return r;if(!Ro(e))return e;var a=Ki(e);if(a)r=l$(e);else{var l=qi(e),u=l==JR||l==U$;if(dc(e))return KG(e);if(l==XR||l==ZR||u&&!s)r=u?{}:O$(e);else{if(!Xt[l])return s?e:{};r=k$(e,l)}}o||(o=new Hs);var c=o.get(e);if(c)return c;o.set(e,r),H$(e)?e.forEach(function(p){r.add(Zh(p,t,n,p,e,o))}):N$(e)&&e.forEach(function(p,g){r.set(g,Zh(p,t,n,g,e,o))});var d=rv,h=a?void 0:d(e);return J2(h||e,function(p,g){h&&(g=p,p=e[g]),lH(r,g,Zh(p,t,n,g,e,o))}),r}var cW=1,dW=4;function hW(e){return Zh(e,cW|dW)}var fW="__lodash_hash_undefined__";function pW(e){return this.__data__.set(e,fW),this}function gW(e){return this.__data__.has(e)}function gc(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Fo;++t<n;)this.add(e[t])}gc.prototype.add=gc.prototype.push=pW,gc.prototype.has=gW;function mW(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 QR(e,t){return e.has(t)}var vW=1,CW=2;function eD(e,t,n,i,s,o){var r=n&vW,a=e.length,l=t.length;if(a!=l&&!(r&&l>a))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,h=!0,p=n&CW?new gc:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var g=e[d],C=t[d];if(i)var v=r?i(C,g,d,t,e,o):i(g,C,d,e,t,o);if(v!==void 0){if(v)continue;h=!1;break}if(p){if(!mW(t,function(S,R){if(!QR(p,R)&&(g===S||s(g,S,n,i,o)))return p.push(R)})){h=!1;break}}else if(!(g===C||s(g,C,n,i,o))){h=!1;break}}return o.delete(e),o.delete(t),h}function yW(e){var t=-1,n=Array(e.size);return e.forEach(function(i,s){n[++t]=[s,i]}),n}function cv(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n}var wW=1,bW=2,SW="[object Boolean]",EW="[object Date]",RW="[object Error]",DW="[object Map]",FW="[object Number]",TW="[object RegExp]",xW="[object Set]",_W="[object String]",PW="[object Symbol]",AW="[object ArrayBuffer]",IW="[object DataView]",tD=ji?ji.prototype:void 0,dv=tD?tD.valueOf:void 0;function kW(e,t,n,i,s,o,r){switch(n){case IW:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case AW:return!(e.byteLength!=t.byteLength||!o(new Yh(e),new Yh(t)));case SW:case EW:case FW:return Wh(+e,+t);case RW:return e.name==t.name&&e.message==t.message;case TW:case _W:return e==t+"";case DW:var a=yW;case xW:var l=i&wW;if(a||(a=cv),e.size!=t.size&&!l)return!1;var u=r.get(e);if(u)return u==t;i|=bW,r.set(e,t);var c=eD(a(e),a(t),i,s,o,r);return r.delete(e),c;case PW:if(dv)return dv.call(e)==dv.call(t)}return!1}var OW=1,MW=Object.prototype,LW=MW.hasOwnProperty;function NW(e,t,n,i,s,o){var r=n&OW,a=rv(e),l=a.length,u=rv(t),c=u.length;if(l!=c&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in t:LW.call(t,h)))return!1}var p=o.get(e),g=o.get(t);if(p&&g)return p==t&&g==e;var C=!0;o.set(e,t),o.set(t,e);for(var v=r;++d<l;){h=a[d];var S=e[h],R=t[h];if(i)var E=r?i(R,S,h,t,e,o):i(S,R,h,e,t,o);if(!(E===void 0?S===R||s(S,R,n,i,o):E)){C=!1;break}v||(v=h=="constructor")}if(C&&!v){var y=e.constructor,b=t.constructor;y!=b&&"constructor"in e&&"constructor"in t&&!(typeof y=="function"&&y instanceof y&&typeof b=="function"&&b instanceof b)&&(C=!1)}return o.delete(e),o.delete(t),C}var VW=1,nD="[object Arguments]",iD="[object Array]",Jh="[object Object]",BW=Object.prototype,sD=BW.hasOwnProperty;function HW(e,t,n,i,s,o){var r=Ki(e),a=Ki(t),l=r?iD:qi(e),u=a?iD:qi(t);l=l==nD?Jh:l,u=u==nD?Jh:u;var c=l==Jh,d=u==Jh,h=l==u;if(h&&dc(e)){if(!dc(t))return!1;r=!0,c=!1}if(h&&!c)return o||(o=new Hs),r||iv(e)?eD(e,t,n,i,s,o):kW(e,t,l,n,i,s,o);if(!(n&VW)){var p=c&&sD.call(e,"__wrapped__"),g=d&&sD.call(t,"__wrapped__");if(p||g){var C=p?e.value():e,v=g?t.value():t;return o||(o=new Hs),s(C,v,n,i,o)}}return h?(o||(o=new Hs),NW(e,t,n,i,s,o)):!1}function hv(e,t,n,i,s){return e===t?!0:e==null||t==null||!Eo(e)&&!Eo(t)?e!==e&&t!==t:HW(e,t,n,i,hv,s)}var GW=1,$W=2;function WW(e,t,n,i){var s=n.length,o=s;if(e==null)return!o;for(e=Object(e);s--;){var r=n[s];if(r[2]?r[1]!==e[r[0]]:!(r[0]in e))return!1}for(;++s<o;){r=n[s];var a=r[0],l=e[a],u=r[1];if(r[2]){if(l===void 0&&!(a in e))return!1}else{var c=new Hs,d;if(!(d===void 0?hv(u,l,GW|$W,i,c):d))return!1}}return!0}function oD(e){return e===e&&!Ro(e)}function zW(e){for(var t=IR(e),n=t.length;n--;){var i=t[n],s=e[i];t[n]=[i,s,oD(s)]}return t}function rD(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function UW(e){var t=zW(e);return t.length==1&&t[0][2]?rD(t[0][0],t[0][1]):function(n){return n===e||WW(n,e,t)}}function jW(e,t){return e!=null&&t in Object(e)}function KW(e,t,n){t=kR(t,e);for(var i=-1,s=t.length,o=!1;++i<s;){var r=qh(t[i]);if(!(o=e!=null&&n(e,r)))break;e=e[r]}return o||++i!=s?o:(s=e==null?0:e.length,!!s&&Qm(s)&&Xm(r,s)&&(Ki(e)||Uh(e)))}function qW(e,t){return e!=null&&KW(e,t,jW)}var YW=1,ZW=2;function JW(e,t){return sv(e)&&oD(t)?rD(qh(e),t):function(n){var i=IG(n,e);return i===void 0&&i===t?qW(n,e):hv(t,i,YW|ZW)}}function XW(e){return function(t){return t==null?void 0:t[e]}}function QW(e){return function(t){return OR(t,e)}}function ez(e){return sv(e)?XW(qh(e)):QW(e)}function tz(e){return typeof e=="function"?e:e==null?Ym:typeof e=="object"?Ki(e)?JW(e[0],e[1]):UW(e):ez(e)}var fv=function(){return ms.Date.now()},nz="Expected a function",iz=Math.max,sz=Math.min;function To(e,t,n){var i,s,o,r,a,l,u=0,c=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(nz);t=Km(t)||0,Ro(n)&&(c=!!n.leading,d="maxWait"in n,o=d?iz(Km(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(F){var x=i,V=s;return i=s=void 0,u=F,r=e.apply(V,x),r}function g(F){return u=F,a=setTimeout(S,t),c?p(F):r}function C(F){var x=F-l,V=F-u,I=t-x;return d?sz(I,o-V):I}function v(F){var x=F-l,V=F-u;return l===void 0||x>=t||x<0||d&&V>=o}function S(){var F=fv();if(v(F))return R(F);a=setTimeout(S,C(F))}function R(F){return a=void 0,h&&i?p(F):(i=s=void 0,r)}function E(){a!==void 0&&clearTimeout(a),u=0,i=l=s=a=void 0}function y(){return a===void 0?r:R(fv())}function b(){var F=fv(),x=v(F);if(i=arguments,s=this,l=F,x){if(a===void 0)return g(l);if(d)return clearTimeout(a),a=setTimeout(S,t),p(l)}return a===void 0&&(a=setTimeout(S,t)),r}return b.cancel=E,b.flush=y,b}function aD(e){return Eo(e)&&zh(e)}function oz(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var rz="[object Map]",az="[object Set]",lz=Object.prototype,uz=lz.hasOwnProperty;function cz(e){if(e==null)return!0;if(zh(e)&&(Ki(e)||typeof e=="string"||typeof e.splice=="function"||dc(e)||iv(e)||Uh(e)))return!e.length;var t=qi(e);if(t==rz||t==az)return!e.size;if(ev(e))return!AR(e).length;for(var n in e)if(uz.call(e,n))return!1;return!0}var dz=Math.floor,hz=Math.random;function fz(e,t){return e+dz(hz()*(t-e+1))}var pz=parseFloat,gz=Math.min,mz=Math.random;function vz(e,t,n){if(n&&typeof n!="boolean"&&hH(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=qm(e),t===void 0?(t=e,e=0):t=qm(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var s=mz();return gz(e+s*(t-e+pz("1e-"+((s+"").length-1))),t)}return fz(e,t)}var Cz=1/0,yz=gl&&1/cv(new gl([,-0]))[1]==Cz?function(e){return new gl(e)}:W2,wz=200;function bz(e,t,n){var i=-1,s=nH,o=e.length,r=!0,a=[],l=a;if(o>=wz){var u=t?null:yz(e);if(u)return cv(u);r=!1,s=QR,l=new gc}else l=t?[]:a;e:for(;++i<o;){var c=e[i],d=t?t(c):c;if(c=c!==0?c:0,r&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(c)}else s(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}var Xh=cH(function(e){var t=oz(e);return aD(t)&&(t=void 0),bz(OG(e,1,aD),tz(t))});const Gs=(e,t)=>{const n=Ti();return{apiServices:G(()=>{var r;const s=n==null?void 0:n.appContext.config.globalProperties,o=(r=t.params)==null?void 0:r.context;if(s!=null&&s.apiServices)return s.apiServices;if(e&&(o!=null&&o.apiServices))return o.apiServices})}},lD=e=>({id:e.id,label:String(e.name||e.display_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}),Sz=e=>{var E;const t=oe(((E=e.value)==null?void 0:E.map(y=>y.id))??[]),n=oe([]),i=G(()=>{var x,V;const y=new Set(((x=e.value)==null?void 0:x.map(I=>I.id))??[]),b=((V=e.value)==null?void 0:V.map(I=>({...lD(I),selected:!0})))??[],F=n.value.filter(I=>!y.has(I.id));return Xh(b,F,"id")}),s=oe(!1),o=po(e,"workspaceId"),r=po(e,"entityId"),a=po(e,"id"),l=po(e,"ids"),u=e.updateRowData,c=oe([]),{apiServices:d}=Gs(!!e.params,e),h=y=>{const b=i.value.find(F=>F.id===y);return b==null?void 0:b.data},p=async()=>{var b,F;if(s.value||!d.value)return;s.value=!0;const y=(b=l.value)!=null&&b.length?l.value:[String(a.value)];try{await((F=d.value)==null?void 0:F.unAssignAll(String(o.value),String(r.value),y)),u({assignees:[],type:"removeAll"})}catch(x){console.error("Failed to unassign all:",x)}finally{s.value=!1,t.value=[]}},g=async y=>{var F,x;if(s.value||!d.value)return;s.value=!0;const b=(F=l.value)!=null&&F.length?l.value:[String(a.value)];try{const V=await((x=d.value)==null?void 0:x.replaceAssignee(String(o.value),b,[y]));if((V==null?void 0:V.message)!=="Done")throw new Error("Failed to replace assignees")}catch(V){console.error("Failed to replace assignees:",V)}finally{s.value=!1,t.value=[y];const V=h(y);V&&u({assignees:[V],type:"overwrite"})}},C=async y=>{var F,x,V,I,M;if(s.value||!d.value)return;s.value=!0;const b=(F=l.value)!=null&&F.length?l.value:[String(a.value)];try{const P=await((x=d.value)==null?void 0:x.addAssignee(String(o.value),b,[y]));if((P==null?void 0:P.message)!=="Done")throw new Error("Failed to add assignee")}catch(P){console.error("Failed to add assignee:",P);return}finally{s.value=!1,t.value.push(y);const P=h(y);if(P){const N=(M=(I=(V=e.params)==null?void 0:V.api)==null?void 0:I.getRowNode(String(e.id)))==null?void 0:M.data,ie=(N==null?void 0:N.assignees)||[],ve=Xh([...ie||[],P],"id");u({assignees:ve,type:"add"})}}},v=async y=>{var F,x,V,I,M;if(s.value||!d.value)return;s.value=!0;const b=(F=l.value)!=null&&F.length?l.value:[String(a.value)];try{const P=await((x=d.value)==null?void 0:x.removeAssignee(String(o.value),b,[y]));if((P==null?void 0:P.message)!=="Done")throw new Error("Failed to removeAssignee")}catch(P){console.error("Failed to remove assignee:",P);return}finally{s.value=!1;const P=(M=(I=(V=e.params)==null?void 0:V.api)==null?void 0:I.getRowNode(String(e.id)))==null?void 0:M.data;t.value=t.value.filter(ie=>ie!==y);const N=((P==null?void 0:P.assignees)||[]).filter(ie=>ie.id!==y);u({assignees:N,type:"remove"})}};return{isSubmitting:s,options:c,unAssignAll:p,replaceAssignees:g,addAssignee:C,removeAssignee:v,handleSelect:y=>{t.value.includes(String(y.id))?v(String(y.id)):C(String(y.id))},openPeopleInsight:y=>{if(!y||!o.value)return;const b=gs({type:"people_insight",config:{user_id:y,ws_code:o.value,baseDomain:sessionStorage.getItem("BASE_URL")||""}}).url;window.open(b,"_blank")},assigneeList:n,mergedOptions:i,selectedUserIds:t}},Ez={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 Rz(e){return e.value?"$el"in e.value?e.value.$el:e.value:null}function $s(e={}){const t={...Ez,...e},n=oe(null),i=oe(null),s=oe(null),o=oe(!1),r=()=>{s.value&&(s.value.destroy(),s.value=null,o.value=!1)},a=g=>{const{showOnInit:C,alwaysShow:v,showArrow:S,debug:R,...E}=t;return{...E,content:g,theme:t.theme,trigger:v?"manual":t.trigger,placement:t.placement,interactive:t.interactive,appendTo:t.appendTo,arrow:S,animation:"fade",onShow:y=>{if(o.value=!0,e.onShow)return e.onShow(y)},onHide:y=>{if(v)return!1;if(o.value=!1,e.onHide)return e.onHide(y)},onClickOutside:(y,b)=>{if(e.onClickOutside)return e.onClickOutside(y,b);v||y.hide()},popperOptions:t.popperOptions||{modifiers:[{name:"computeStyles",options:{gpuAcceleration:!1}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{fallbackPlacements:["top","bottom","left","right"]}}]}}},l=()=>{var v;r();const g=Rz(n),C=i.value;if(!(!g||!C)){C.style.display==="none"&&(C.style.display="");try{const S=a(C),R=nr(g,S);s.value=Array.isArray(R)?R[0]:R,(t.showOnInit||t.alwaysShow)&&((v=s.value)==null||v.show())}catch(S){console.error("[useTippyComposable] Failed to create Tippy instance:",S)}}},u=()=>{s.value&&s.value.show()},c=()=>{t.alwaysShow||s.value&&s.value.hide()},d=()=>{o.value?c():u()},h=g=>{s.value&&s.value.setContent(g)},p=g=>{s.value&&s.value.setProps(g)};return wt([n,i],l,{flush:"post"}),pi(()=>{r()}),{instance:s,isVisible:o,show:u,hide:c,toggle:d,triggerRef:n,popupRef:i,destroyTippy:r,setContent:h,setProps:p}}const uD=(e,t)=>{const n=oe("Copy link"),i=()=>{setTimeout(()=>{n.value="Copy link"},3e3)};return{copyToClipboard:async()=>{try{return await navigator.clipboard.writeText(e),n.value="Copied",t&&t(),i(),!0}catch(o){return console.error("Failed to copy text to clipboard:",o),n.value="Copy failed",i(),!1}},tooltip:n}};class ra extends Error{}class Dz extends ra{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Fz extends ra{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Tz extends ra{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class ml extends ra{}class cD extends ra{constructor(t){super(`Invalid unit ${t}`)}}class qn extends ra{}class or extends ra{constructor(){super("Zone is an abstract class")}}const Ze="numeric",vs="short",Ii="long",Qh={year:Ze,month:Ze,day:Ze},dD={year:Ze,month:vs,day:Ze},xz={year:Ze,month:vs,day:Ze,weekday:vs},hD={year:Ze,month:Ii,day:Ze},fD={year:Ze,month:Ii,day:Ze,weekday:Ii},pD={hour:Ze,minute:Ze},gD={hour:Ze,minute:Ze,second:Ze},mD={hour:Ze,minute:Ze,second:Ze,timeZoneName:vs},vD={hour:Ze,minute:Ze,second:Ze,timeZoneName:Ii},CD={hour:Ze,minute:Ze,hourCycle:"h23"},yD={hour:Ze,minute:Ze,second:Ze,hourCycle:"h23"},wD={hour:Ze,minute:Ze,second:Ze,hourCycle:"h23",timeZoneName:vs},bD={hour:Ze,minute:Ze,second:Ze,hourCycle:"h23",timeZoneName:Ii},SD={year:Ze,month:Ze,day:Ze,hour:Ze,minute:Ze},ED={year:Ze,month:Ze,day:Ze,hour:Ze,minute:Ze,second:Ze},RD={year:Ze,month:vs,day:Ze,hour:Ze,minute:Ze},DD={year:Ze,month:vs,day:Ze,hour:Ze,minute:Ze,second:Ze},_z={year:Ze,month:vs,day:Ze,weekday:vs,hour:Ze,minute:Ze},FD={year:Ze,month:Ii,day:Ze,hour:Ze,minute:Ze,timeZoneName:vs},TD={year:Ze,month:Ii,day:Ze,hour:Ze,minute:Ze,second:Ze,timeZoneName:vs},xD={year:Ze,month:Ii,day:Ze,weekday:Ii,hour:Ze,minute:Ze,timeZoneName:Ii},_D={year:Ze,month:Ii,day:Ze,weekday:Ii,hour:Ze,minute:Ze,second:Ze,timeZoneName:Ii};class mc{get type(){throw new or}get name(){throw new or}get ianaName(){return this.name}get isUniversal(){throw new or}offsetName(t,n){throw new or}formatOffset(t,n){throw new or}offset(t){throw new or}equals(t){throw new or}get isValid(){throw new or}}let pv=null;class ef extends mc{static get instance(){return pv===null&&(pv=new ef),pv}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return tF(t,n,i)}formatOffset(t,n){return wc(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const gv=new Map;function Pz(e){let t=gv.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"}),gv.set(e,t)),t}const Az={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Iz(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,o,r,a,l,u,c]=i;return[r,s,o,a,l,u,c]}function kz(e,t){const n=e.formatToParts(t),i=[];for(let s=0;s<n.length;s++){const{type:o,value:r}=n[s],a=Az[o];o==="era"?i[a]=r:St(a)||(i[a]=parseInt(r,10))}return i}const mv=new Map;class xo extends mc{static create(t){let n=mv.get(t);return n===void 0&&mv.set(t,n=new xo(t)),n}static resetCache(){mv.clear(),gv.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=xo.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return tF(t,n,i,this.name)}formatOffset(t,n){return wc(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const i=Pz(this.name);let[s,o,r,a,l,u,c]=i.formatToParts?kz(i,n):Iz(i,n);a==="BC"&&(s=-Math.abs(s)+1);const h=rf({year:s,month:o,day:r,hour:l===24?0:l,minute:u,second:c,millisecond:0});let p=+n;const g=p%1e3;return p-=g>=0?g:1e3+g,(h-p)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let PD={};function Oz(e,t={}){const n=JSON.stringify([e,t]);let i=PD[n];return i||(i=new Intl.ListFormat(e,t),PD[n]=i),i}const vv=new Map;function Cv(e,t={}){const n=JSON.stringify([e,t]);let i=vv.get(n);return i===void 0&&(i=new Intl.DateTimeFormat(e,t),vv.set(n,i)),i}const yv=new Map;function Mz(e,t={}){const n=JSON.stringify([e,t]);let i=yv.get(n);return i===void 0&&(i=new Intl.NumberFormat(e,t),yv.set(n,i)),i}const wv=new Map;function Lz(e,t={}){const{base:n,...i}=t,s=JSON.stringify([e,i]);let o=wv.get(s);return o===void 0&&(o=new Intl.RelativeTimeFormat(e,t),wv.set(s,o)),o}let vc=null;function Nz(){return vc||(vc=new Intl.DateTimeFormat().resolvedOptions().locale,vc)}const bv=new Map;function AD(e){let t=bv.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),bv.set(e,t)),t}const Sv=new Map;function Vz(e){let t=Sv.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...ID,...t}),Sv.set(e,t)}return t}function Bz(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,s;try{i=Cv(e).resolvedOptions(),s=e}catch{const l=e.substring(0,n);i=Cv(l).resolvedOptions(),s=l}const{numberingSystem:o,calendar:r}=i;return[s,o,r]}}function Hz(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function Gz(e){const t=[];for(let n=1;n<=12;n++){const i=qe.utc(2009,n,1);t.push(e(i))}return t}function $z(e){const t=[];for(let n=1;n<=7;n++){const i=qe.utc(2016,11,13+n);t.push(e(i))}return t}function tf(e,t,n,i){const s=e.listingMode();return s==="error"?null:s==="en"?n(t):i(t)}function Wz(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||AD(e.locale).numberingSystem==="latn"}class zz{constructor(t,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:o,...r}=i;if(!n||Object.keys(r).length>0){const a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=Mz(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):Av(t,3);return Pn(n,this.padTo)}}}class Uz{constructor(t,n,i){this.opts=i,this.originalZone=void 0;let s;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&&xo.create(a).valid?(s=a,this.dt=t):(s="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,s=t.zone.name):(s="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const o={...this.opts};o.timeZone=o.timeZone||s,this.dtf=Cv(n,o)}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 jz{constructor(t,n,i){this.opts={style:"long",...i},!n&&JD()&&(this.rtf=Lz(t,i))}format(t,n){return this.rtf?this.rtf.format(t,n):pU(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const ID={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,s,o=!1){const r=t||mn.defaultLocale,a=r||(o?"en-US":Nz()),l=n||mn.defaultNumberingSystem,u=i||mn.defaultOutputCalendar,c=_v(s)||mn.defaultWeekSettings;return new jt(a,l,u,c,r)}static resetCache(){vc=null,vv.clear(),yv.clear(),wv.clear(),bv.clear(),Sv.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:i,weekSettings:s}={}){return jt.create(t,n,i,s)}constructor(t,n,i,s,o){const[r,a,l]=Bz(t);this.locale=r,this.numberingSystem=n||a||null,this.outputCalendar=i||l||null,this.weekSettings=s,this.intl=Hz(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Wz(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,_v(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 tf(this,t,sF,()=>{const i=this.intl==="ja"||this.intl.startsWith("ja-");n&=!i;const s=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";if(!this.monthsCache[o][t]){const r=i?a=>this.dtFormatter(a,s).format():a=>this.extract(a,s,"month");this.monthsCache[o][t]=Gz(r)}return this.monthsCache[o][t]})}weekdays(t,n=!1){return tf(this,t,aF,()=>{const i=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},s=n?"format":"standalone";return this.weekdaysCache[s][t]||(this.weekdaysCache[s][t]=$z(o=>this.extract(o,i,"weekday"))),this.weekdaysCache[s][t]})}meridiems(){return tf(this,void 0,()=>lF,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[qe.utc(2016,11,13,9),qe.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return tf(this,t,uF,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[qe.utc(-40,1,1),qe.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[t]})}extract(t,n,i){const s=this.dtFormatter(t,n),o=s.formatToParts(),r=o.find(a=>a.type.toLowerCase()===i);return r?r.value:null}numberFormatter(t={}){return new zz(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new Uz(t,this.intl,n)}relFormatter(t={}){return new jz(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Oz(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||AD(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:XD()?Vz(this.locale):ID}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 Ev=null;class li extends mc{static get utcInstance(){return Ev===null&&(Ev=new li(0)),Ev}static instance(t){return t===0?li.utcInstance:new li(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new li(af(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${wc(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${wc(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return wc(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 Kz extends mc{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 rr(e,t){if(St(e)||e===null)return t;if(e instanceof mc)return e;if(Qz(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?ef.instance:n==="utc"||n==="gmt"?li.utcInstance:li.parseSpecifier(n)||xo.create(e)}else return ar(e)?li.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new Kz(e)}const Rv={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},kD={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]},qz=Rv.hanidec.replace(/[\[|\]]/g,"").split("");function Yz(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(Rv.hanidec)!==-1)t+=qz.indexOf(e[n]);else for(const s in kD){const[o,r]=kD[s];i>=o&&i<=r&&(t+=i-o)}}return parseInt(t,10)}else return t}const Dv=new Map;function Zz(){Dv.clear()}function Cs({numberingSystem:e},t=""){const n=e||"latn";let i=Dv.get(n);i===void 0&&(i=new Map,Dv.set(n,i));let s=i.get(t);return s===void 0&&(s=new RegExp(`${Rv[n]}${t}`),i.set(t,s)),s}let OD=()=>Date.now(),MD="system",LD=null,ND=null,VD=null,BD=60,HD,GD=null;class mn{static get now(){return OD}static set now(t){OD=t}static set defaultZone(t){MD=t}static get defaultZone(){return rr(MD,ef.instance)}static get defaultLocale(){return LD}static set defaultLocale(t){LD=t}static get defaultNumberingSystem(){return ND}static set defaultNumberingSystem(t){ND=t}static get defaultOutputCalendar(){return VD}static set defaultOutputCalendar(t){VD=t}static get defaultWeekSettings(){return GD}static set defaultWeekSettings(t){GD=_v(t)}static get twoDigitCutoffYear(){return BD}static set twoDigitCutoffYear(t){BD=t%100}static get throwOnInvalid(){return HD}static set throwOnInvalid(t){HD=t}static resetCaches(){jt.resetCache(),xo.resetCache(),qe.resetCache(),Zz()}}class ys{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const $D=[0,31,59,90,120,151,181,212,243,273,304,334],WD=[0,31,60,91,121,152,182,213,244,274,305,335];function Yi(e,t){return new ys("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Fv(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function zD(e,t,n){return n+(Cc(e)?WD:$D)[t-1]}function UD(e,t){const n=Cc(e)?WD:$D,i=n.findIndex(o=>o<t),s=t-n[i];return{month:i+1,day:s}}function Tv(e,t){return(e-t+7)%7+1}function nf(e,t=4,n=1){const{year:i,month:s,day:o}=e,r=zD(i,s,o),a=Tv(Fv(i,s,o),n);let l=Math.floor((r-a+14-t)/7),u;return l<1?(u=i-1,l=yc(u,t,n)):l>yc(i,t,n)?(u=i+1,l=1):u=i,{weekYear:u,weekNumber:l,weekday:a,...uf(e)}}function jD(e,t=4,n=1){const{weekYear:i,weekNumber:s,weekday:o}=e,r=Tv(Fv(i,1,t),n),a=Cl(i);let l=s*7+o-r-7+t,u;l<1?(u=i-1,l+=Cl(u)):l>a?(u=i+1,l-=Cl(i)):u=i;const{month:c,day:d}=UD(u,l);return{year:u,month:c,day:d,...uf(e)}}function xv(e){const{year:t,month:n,day:i}=e,s=zD(t,n,i);return{year:t,ordinal:s,...uf(e)}}function KD(e){const{year:t,ordinal:n}=e,{month:i,day:s}=UD(t,n);return{year:t,month:i,day:s,...uf(e)}}function qD(e,t){if(!St(e.localWeekday)||!St(e.localWeekNumber)||!St(e.localWeekYear)){if(!St(e.weekday)||!St(e.weekNumber)||!St(e.weekYear))throw new ml("Cannot mix locale-based week fields with ISO-based week fields");return St(e.localWeekday)||(e.weekday=e.localWeekday),St(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),St(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 Jz(e,t=4,n=1){const i=sf(e.weekYear),s=Zi(e.weekNumber,1,yc(e.weekYear,t,n)),o=Zi(e.weekday,1,7);return i?s?o?!1:Yi("weekday",e.weekday):Yi("week",e.weekNumber):Yi("weekYear",e.weekYear)}function Xz(e){const t=sf(e.year),n=Zi(e.ordinal,1,Cl(e.year));return t?n?!1:Yi("ordinal",e.ordinal):Yi("year",e.year)}function YD(e){const t=sf(e.year),n=Zi(e.month,1,12),i=Zi(e.day,1,of(e.year,e.month));return t?n?i?!1:Yi("day",e.day):Yi("month",e.month):Yi("year",e.year)}function ZD(e){const{hour:t,minute:n,second:i,millisecond:s}=e,o=Zi(t,0,23)||t===24&&n===0&&i===0&&s===0,r=Zi(n,0,59),a=Zi(i,0,59),l=Zi(s,0,999);return o?r?a?l?!1:Yi("millisecond",s):Yi("second",i):Yi("minute",n):Yi("hour",t)}function St(e){return typeof e>"u"}function ar(e){return typeof e=="number"}function sf(e){return typeof e=="number"&&e%1===0}function Qz(e){return typeof e=="string"}function eU(e){return Object.prototype.toString.call(e)==="[object Date]"}function JD(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function XD(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function tU(e){return Array.isArray(e)?e:[e]}function QD(e,t,n){if(e.length!==0)return e.reduce((i,s)=>{const o=[t(s),s];return i&&n(i[0],o[0])===i[0]?i:o},null)[1]}function nU(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function vl(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _v(e){if(e==null)return null;if(typeof e!="object")throw new qn("Week settings must be an object");if(!Zi(e.firstDay,1,7)||!Zi(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Zi(t,1,7)))throw new qn("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Zi(e,t,n){return sf(e)&&e>=t&&e<=n}function iU(e,t){return e-t*Math.floor(e/t)}function Pn(e,t=2){const n=e<0;let i;return n?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function lr(e){if(!(St(e)||e===null||e===""))return parseInt(e,10)}function aa(e){if(!(St(e)||e===null||e===""))return parseFloat(e)}function Pv(e){if(!(St(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function Av(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 Cc(e){return e%4===0&&(e%100!==0||e%400===0)}function Cl(e){return Cc(e)?366:365}function of(e,t){const n=iU(t-1,12)+1,i=e+(t-n)/12;return n===2?Cc(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function rf(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 eF(e,t,n){return-Tv(Fv(e,1,t),n)+t-1}function yc(e,t=4,n=1){const i=eF(e,t,n),s=eF(e+1,t,n);return(Cl(e)-i+s)/7}function Iv(e){return e>99?e:e>mn.twoDigitCutoffYear?1900+e:2e3+e}function tF(e,t,n,i=null){const s=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);const r={timeZoneName:t,...o},a=new Intl.DateTimeFormat(n,r).formatToParts(s).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function af(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0,s=n<0||Object.is(n,-0)?-i:i;return n*60+s}function nF(e){const t=Number(e);if(typeof e=="boolean"||e===""||!Number.isFinite(t))throw new qn(`Invalid unit value ${e}`);return t}function lf(e,t){const n={};for(const i in e)if(vl(e,i)){const s=e[i];if(s==null)continue;n[t(i)]=nF(s)}return n}function wc(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Pn(n,2)}:${Pn(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${Pn(n,2)}${Pn(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function uf(e){return nU(e,["hour","minute","second","millisecond"])}const sU=["January","February","March","April","May","June","July","August","September","October","November","December"],iF=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],oU=["J","F","M","A","M","J","J","A","S","O","N","D"];function sF(e){switch(e){case"narrow":return[...oU];case"short":return[...iF];case"long":return[...sU];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 oF=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],rF=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],rU=["M","T","W","T","F","S","S"];function aF(e){switch(e){case"narrow":return[...rU];case"short":return[...rF];case"long":return[...oF];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const lF=["AM","PM"],aU=["Before Christ","Anno Domini"],lU=["BC","AD"],uU=["B","A"];function uF(e){switch(e){case"narrow":return[...uU];case"short":return[...lU];case"long":return[...aU];default:return null}}function cU(e){return lF[e.hour<12?0:1]}function dU(e,t){return aF(t)[e.weekday-1]}function hU(e,t){return sF(t)[e.month-1]}function fU(e,t){return uF(t)[e.year<0?0:1]}function pU(e,t,n="always",i=!1){const s={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."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&o){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${s[e][0]}`;case-1:return d?"yesterday":`last ${s[e][0]}`;case 0:return d?"today":`this ${s[e][0]}`}}const r=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,u=s[e],c=i?l?u[1]:u[2]||u[1]:l?s[e][0]:e;return r?`${a} ${c} ago`:`in ${a} ${c}`}function cF(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const gU={D:Qh,DD:dD,DDD:hD,DDDD:fD,t:pD,tt:gD,ttt:mD,tttt:vD,T:CD,TT:yD,TTT:wD,TTTT:bD,f:SD,ff:RD,fff:FD,ffff:xD,F:ED,FF:DD,FFF:TD,FFFF:_D};class Yn{static create(t,n={}){return new Yn(t,n)}static parseFormat(t){let n=null,i="",s=!1;const o=[];for(let r=0;r<t.length;r++){const a=t.charAt(r);a==="'"?((i.length>0||s)&&o.push({literal:s||/^\s+$/.test(i),val:i===""?"'":i}),n=null,i="",s=!s):s||a===n?i+=a:(i.length>0&&o.push({literal:/^\s+$/.test(i),val:i}),i=a,n=a)}return i.length>0&&o.push({literal:s||/^\s+$/.test(i),val:i}),o}static macroTokenToFormatOpts(t){return gU[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 Pn(t,n);const s={...this.opts};return n>0&&(s.padTo=n),i&&(s.signDisplay=i),this.loc.numberFormatter(s).format(t)}formatDateTimeFromString(t,n){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(p,g)=>this.loc.extract(t,p,g),r=p=>t.isOffsetFixed&&t.offset===0&&p.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,p.format):"",a=()=>i?cU(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(p,g)=>i?hU(t,p):o(g?{month:p}:{month:p,day:"numeric"},"month"),u=(p,g)=>i?dU(t,p):o(g?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),c=p=>{const g=Yn.macroTokenToFormatOpts(p);return g?this.formatWithSystemDefault(t,g):p},d=p=>i?fU(t,p):o({era:p},"era"),h=p=>{switch(p){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 s?o({day:"numeric"},"day"):this.num(t.day);case"dd":return s?o({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return s?o({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 s?o({month:"numeric"},"month"):this.num(t.month);case"MM":return s?o({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 s?o({year:"numeric"},"year"):this.num(t.year);case"yy":return s?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return s?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return s?o({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 c(p)}};return cF(Yn.parseFormat(n),h)}formatDurationFromString(t,n){const i=this.opts.signMode==="negativeLargestOnly"?-1:1,s=c=>{switch(c[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}},o=(c,d)=>h=>{const p=s(h);if(p){const g=d.isNegativeDuration&&p!==d.largestUnit?i:1;let C;return this.opts.signMode==="negativeLargestOnly"&&p!==d.largestUnit?C="never":this.opts.signMode==="all"?C="always":C="auto",this.num(c.get(p)*g,h.length,C)}else return h},r=Yn.parseFormat(n),a=r.reduce((c,{literal:d,val:h})=>d?c:c.concat(h),[]),l=t.shiftTo(...a.map(s).filter(c=>c)),u={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return cF(r,o(l,u))}}const dF=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function yl(...e){const t=e.reduce((n,i)=>n+i.source,"");return RegExp(`^${t}$`)}function wl(...e){return t=>e.reduce(([n,i,s],o)=>{const[r,a,l]=o(t,s);return[{...n,...r},a||i,l]},[{},null,1]).slice(0,2)}function bl(e,...t){if(e==null)return[null,null];for(const[n,i]of t){const s=n.exec(e);if(s)return i(s)}return[null,null]}function hF(...e){return(t,n)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=lr(t[n+s]);return[i,null,n+s]}}const fF=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,mU=`(?:${fF.source}?(?:\\[(${dF.source})\\])?)?`,kv=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,pF=RegExp(`${kv.source}${mU}`),Ov=RegExp(`(?:[Tt]${pF.source})?`),vU=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,CU=/(\d{4})-?W(\d\d)(?:-?(\d))?/,yU=/(\d{4})-?(\d{3})/,wU=hF("weekYear","weekNumber","weekDay"),bU=hF("year","ordinal"),SU=/(\d{4})-(\d\d)-(\d\d)/,gF=RegExp(`${kv.source} ?(?:${fF.source}|(${dF.source}))?`),EU=RegExp(`(?: ${gF.source})?`);function Sl(e,t,n){const i=e[t];return St(i)?n:lr(i)}function RU(e,t){return[{year:Sl(e,t),month:Sl(e,t+1,1),day:Sl(e,t+2,1)},null,t+3]}function El(e,t){return[{hours:Sl(e,t,0),minutes:Sl(e,t+1,0),seconds:Sl(e,t+2,0),milliseconds:Pv(e[t+3])},null,t+4]}function bc(e,t){const n=!e[t]&&!e[t+1],i=af(e[t+1],e[t+2]),s=n?null:li.instance(i);return[{},s,t+3]}function Sc(e,t){const n=e[t]?xo.create(e[t]):null;return[{},n,t+1]}const DU=RegExp(`^T?${kv.source}$`),FU=/^-?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 TU(e){const[t,n,i,s,o,r,a,l,u]=e,c=t[0]==="-",d=l&&l[0]==="-",h=(p,g=!1)=>p!==void 0&&(g||p&&c)?-p:p;return[{years:h(aa(n)),months:h(aa(i)),weeks:h(aa(s)),days:h(aa(o)),hours:h(aa(r)),minutes:h(aa(a)),seconds:h(aa(l),l==="-0"),milliseconds:h(Pv(u),d)}]}const xU={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 Mv(e,t,n,i,s,o,r){const a={year:t.length===2?Iv(lr(t)):lr(t),month:iF.indexOf(n)+1,day:lr(i),hour:lr(s),minute:lr(o)};return r&&(a.second=lr(r)),e&&(a.weekday=e.length>3?oF.indexOf(e)+1:rF.indexOf(e)+1),a}const _U=/^(?:(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 PU(e){const[,t,n,i,s,o,r,a,l,u,c,d]=e,h=Mv(t,s,i,n,o,r,a);let p;return l?p=xU[l]:u?p=0:p=af(c,d),[h,new li(p)]}function AU(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const IU=/^(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$/,kU=/^(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$/,OU=/^(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 mF(e){const[,t,n,i,s,o,r,a]=e;return[Mv(t,s,i,n,o,r,a),li.utcInstance]}function MU(e){const[,t,n,i,s,o,r,a]=e;return[Mv(t,a,n,i,s,o,r),li.utcInstance]}const LU=yl(vU,Ov),NU=yl(CU,Ov),VU=yl(yU,Ov),BU=yl(pF),vF=wl(RU,El,bc,Sc),HU=wl(wU,El,bc,Sc),GU=wl(bU,El,bc,Sc),$U=wl(El,bc,Sc);function WU(e){return bl(e,[LU,vF],[NU,HU],[VU,GU],[BU,$U])}function zU(e){return bl(AU(e),[_U,PU])}function UU(e){return bl(e,[IU,mF],[kU,mF],[OU,MU])}function jU(e){return bl(e,[FU,TU])}const KU=wl(El);function qU(e){return bl(e,[DU,KU])}const YU=yl(SU,EU),ZU=yl(gF),JU=wl(El,bc,Sc);function XU(e){return bl(e,[YU,vF],[ZU,JU])}const CF="Invalid Duration",yF={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}},QU={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},...yF},Ji=146097/400,Rl=146097/4800,e3={years:{quarters:4,months:12,weeks:Ji/7,days:Ji,hours:Ji*24,minutes:Ji*24*60,seconds:Ji*24*60*60,milliseconds:Ji*24*60*60*1e3},quarters:{months:3,weeks:Ji/28,days:Ji/4,hours:Ji*24/4,minutes:Ji*24*60/4,seconds:Ji*24*60*60/4,milliseconds:Ji*24*60*60*1e3/4},months:{weeks:Rl/7,days:Rl,hours:Rl*24,minutes:Rl*24*60,seconds:Rl*24*60*60,milliseconds:Rl*24*60*60*1e3},...yF},la=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],t3=la.slice(0).reverse();function _o(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 Nt(i)}function wF(e,t){let n=t.milliseconds??0;for(const i of t3.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function bF(e,t){const n=wF(e,t)<0?-1:1;la.reduceRight((i,s)=>{if(St(t[s]))return i;if(i){const o=t[i]*n,r=e[s][i],a=Math.floor(o/r);t[s]+=a*n,t[i]-=a*r*n}return s},null),la.reduce((i,s)=>{if(St(t[s]))return i;if(i){const o=t[i]%1;t[i]-=o,t[s]+=o*e[i][s]}return s},null)}function SF(e){const t={};for(const[n,i]of Object.entries(e))i!==0&&(t[n]=i);return t}class Nt{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let i=n?e3:QU;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 Nt.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new qn(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Nt({values:lf(t,Nt.normalizeUnit),loc:jt.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(ar(t))return Nt.fromMillis(t);if(Nt.isDuration(t))return t;if(typeof t=="object")return Nt.fromObject(t);throw new qn(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[i]=jU(t);return i?Nt.fromObject(i,n):Nt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[i]=qU(t);return i?Nt.fromObject(i,n):Nt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new qn("need to specify a reason the Duration is invalid");const i=t instanceof ys?t:new ys(t,n);if(mn.throwOnInvalid)throw new Tz(i);return new Nt({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 cD(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?Yn.create(this.loc,i).formatDurationFromString(this,t):CF}toHuman(t={}){if(!this.isValid)return CF;const n=t.showZeros!==!1,i=la.map(s=>{const o=this.values[s];return St(o)||o===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:s.slice(0,-1)}).format(o)}).filter(s=>s);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+=Av(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},qe.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?wF(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Nt.fromDurationLike(t),i={};for(const s of la)(vl(n.values,s)||vl(this.values,s))&&(i[s]=n.get(s)+this.get(s));return _o(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const n=Nt.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]=nF(t(this.values[i],i));return _o(this,{values:n},!0)}get(t){return this[Nt.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...lf(t,Nt.normalizeUnit)};return _o(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:i,matrix:s}={}){const r={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:s,conversionAccuracy:i};return _o(this,r)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return bF(this.matrix,t),_o(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=SF(this.normalize().shiftToAll().toObject());return _o(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(r=>Nt.normalizeUnit(r));const n={},i={},s=this.toObject();let o;for(const r of la)if(t.indexOf(r)>=0){o=r;let a=0;for(const u in i)a+=this.matrix[u][r]*i[u],i[u]=0;ar(s[r])&&(a+=s[r]);const l=Math.trunc(a);n[r]=l,i[r]=(a*1e3-l*1e3)/1e3}else ar(s[r])&&(i[r]=s[r]);for(const r in i)i[r]!==0&&(n[o]+=r===o?i[r]:i[r]/this.matrix[o][r]);return bF(this.matrix,n),_o(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 _o(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;const t=SF(this.values);return _o(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,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of la)if(!n(this.values[i],t.values[i]))return!1;return!0}}const Dl="Invalid Interval";function n3(e,t){return!e||!e.isValid?vn.invalid("missing or invalid start"):!t||!t.isValid?vn.invalid("missing or invalid end"):t<e?vn.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 vn{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 qn("need to specify a reason the Interval is invalid");const i=t instanceof ys?t:new ys(t,n);if(mn.throwOnInvalid)throw new Fz(i);return new vn({invalid:i})}static fromDateTimes(t,n){const i=Dc(t),s=Dc(n),o=n3(i,s);return o??new vn({start:i,end:s})}static after(t,n){const i=Nt.fromDurationLike(n),s=Dc(t);return vn.fromDateTimes(s,s.plus(i))}static before(t,n){const i=Nt.fromDurationLike(n),s=Dc(t);return vn.fromDateTimes(s.minus(i),s)}static fromISO(t,n){const[i,s]=(t||"").split("/",2);if(i&&s){let o,r;try{o=qe.fromISO(i,n),r=o.isValid}catch{r=!1}let a,l;try{a=qe.fromISO(s,n),l=a.isValid}catch{l=!1}if(r&&l)return vn.fromDateTimes(o,a);if(r){const u=Nt.fromISO(s,n);if(u.isValid)return vn.after(o,u)}else if(l){const u=Nt.fromISO(i,n);if(u.isValid)return vn.before(a,u)}}return vn.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 s;return n!=null&&n.useLocaleWeeks?s=this.end.reconfigure({locale:i.locale}):s=this.end,s=s.startOf(t,n),Math.floor(s.diff(i,t).get(t))+(s.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?vn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Dc).filter(r=>this.contains(r)).sort((r,a)=>r.toMillis()-a.toMillis()),i=[];let{s}=this,o=0;for(;s<this.e;){const r=n[o]||this.e,a=+r>+this.e?this.e:r;i.push(vn.fromDateTimes(s,a)),s=a,o+=1}return i}splitBy(t){const n=Nt.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,s=1,o;const r=[];for(;i<this.e;){const a=this.start.plus(n.mapUnits(l=>l*s));o=+a>+this.e?this.e:a,r.push(vn.fromDateTimes(i,o)),i=o,s+=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:vn.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 vn.fromDateTimes(n,i)}static merge(t){const[n,i]=t.sort((s,o)=>s.s-o.s).reduce(([s,o],r)=>o?o.overlaps(r)||o.abutsStart(r)?[s,o.union(r)]:[s.concat([o]),r]:[s,r],[[],null]);return i&&n.push(i),n}static xor(t){let n=null,i=0;const s=[],o=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),r=Array.prototype.concat(...o),a=r.sort((l,u)=>l.time-u.time);for(const l of a)i+=l.type==="s"?1:-1,i===1?n=l.time:(n&&+n!=+l.time&&s.push(vn.fromDateTimes(n,l.time)),n=null);return vn.merge(s)}difference(...t){return vn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Dl}[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=Qh,n={}){return this.isValid?Yn.create(this.s.loc.clone(n),t).formatInterval(this):Dl}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Dl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Dl}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Dl}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Dl}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Nt.invalid(this.invalidReason)}mapEndpoints(t){return vn.fromDateTimes(t(this.s),t(this.e))}}class Fl{static hasDST(t=mn.defaultZone){const n=qe.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return xo.isValidZone(t)}static normalizeZone(t){return rr(t,mn.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:s=null,outputCalendar:o="gregory"}={}){return(s||jt.create(n,i,o)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||jt.create(n,i,o)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||jt.create(n,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||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:JD(),localeWeek:XD()}}}function EF(e,t){const n=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(Nt.fromMillis(i).as("days"))}function i3(e,t,n){const i=[["years",(l,u)=>u.year-l.year],["quarters",(l,u)=>u.quarter-l.quarter+(u.year-l.year)*4],["months",(l,u)=>u.month-l.month+(u.year-l.year)*12],["weeks",(l,u)=>{const c=EF(l,u);return(c-c%7)/7}],["days",EF]],s={},o=e;let r,a;for(const[l,u]of i)n.indexOf(l)>=0&&(r=l,s[l]=u(e,t),a=o.plus(s),a>t?(s[l]--,e=o.plus(s),e>t&&(a=e,s[l]--,e=o.plus(s))):e=a);return[e,s,a,r]}function s3(e,t,n,i){let[s,o,r,a]=i3(e,t,n);const l=t-s,u=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(r<t&&(r=s.plus({[a]:1})),r!==s&&(o[a]=(o[a]||0)+l/(r-s)));const c=Nt.fromObject(o,i);return u.length>0?Nt.fromMillis(l,i).shiftTo(...u).plus(c):c}const o3="missing Intl.DateTimeFormat.formatToParts support";function Gt(e,t=n=>n){return{regex:e,deser:([n])=>t(Yz(n))}}const RF="[  ]",DF=new RegExp(RF,"g");function r3(e){return e.replace(/\./g,"\\.?").replace(DF,RF)}function FF(e){return e.replace(/\./g,"").replace(DF," ").toLowerCase()}function ws(e,t){return e===null?null:{regex:RegExp(e.map(r3).join("|")),deser:([n])=>e.findIndex(i=>FF(n)===FF(i))+t}}function TF(e,t){return{regex:e,deser:([,n,i])=>af(n,i),groups:t}}function cf(e){return{regex:e,deser:([t])=>t}}function a3(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function l3(e,t){const n=Cs(t),i=Cs(t,"{2}"),s=Cs(t,"{3}"),o=Cs(t,"{4}"),r=Cs(t,"{6}"),a=Cs(t,"{1,2}"),l=Cs(t,"{1,3}"),u=Cs(t,"{1,6}"),c=Cs(t,"{1,9}"),d=Cs(t,"{2,4}"),h=Cs(t,"{4,6}"),p=v=>({regex:RegExp(a3(v.val)),deser:([S])=>S,literal:!0}),C=(v=>{if(e.literal)return p(v);switch(v.val){case"G":return ws(t.eras("short"),0);case"GG":return ws(t.eras("long"),0);case"y":return Gt(u);case"yy":return Gt(d,Iv);case"yyyy":return Gt(o);case"yyyyy":return Gt(h);case"yyyyyy":return Gt(r);case"M":return Gt(a);case"MM":return Gt(i);case"MMM":return ws(t.months("short",!0),1);case"MMMM":return ws(t.months("long",!0),1);case"L":return Gt(a);case"LL":return Gt(i);case"LLL":return ws(t.months("short",!1),1);case"LLLL":return ws(t.months("long",!1),1);case"d":return Gt(a);case"dd":return Gt(i);case"o":return Gt(l);case"ooo":return Gt(s);case"HH":return Gt(i);case"H":return Gt(a);case"hh":return Gt(i);case"h":return Gt(a);case"mm":return Gt(i);case"m":return Gt(a);case"q":return Gt(a);case"qq":return Gt(i);case"s":return Gt(a);case"ss":return Gt(i);case"S":return Gt(l);case"SSS":return Gt(s);case"u":return cf(c);case"uu":return cf(a);case"uuu":return Gt(n);case"a":return ws(t.meridiems(),0);case"kkkk":return Gt(o);case"kk":return Gt(d,Iv);case"W":return Gt(a);case"WW":return Gt(i);case"E":case"c":return Gt(n);case"EEE":return ws(t.weekdays("short",!1),1);case"EEEE":return ws(t.weekdays("long",!1),1);case"ccc":return ws(t.weekdays("short",!0),1);case"cccc":return ws(t.weekdays("long",!0),1);case"Z":case"ZZ":return TF(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return TF(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return cf(/[a-z_+-/]{1,256}?/i);case" ":return cf(/[^\S\n\r]/);default:return p(v)}})(e)||{invalidReason:o3};return C.token=e,C}const u3={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 c3(e,t,n){const{type:i,value:s}=e;if(i==="literal"){const l=/^\s+$/.test(s);return{literal:!l,val:l?" ":s}}const o=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=u3[r];if(typeof a=="object"&&(a=a[o]),a)return{literal:!1,val:a}}function d3(e){return[`^${e.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,e]}function h3(e,t,n){const i=e.match(t);if(i){const s={};let o=1;for(const r in n)if(vl(n,r)){const a=n[r],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(s[a.token.val[0]]=a.deser(i.slice(o,o+l))),o+=l}return[i,s]}else return[i,{}]}function f3(e){const t=o=>{switch(o){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 St(e.z)||(n=xo.create(e.z)),St(e.Z)||(n||(n=new li(e.Z)),i=e.Z),St(e.q)||(e.M=(e.q-1)*3+1),St(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),St(e.u)||(e.S=Pv(e.u)),[Object.keys(e).reduce((o,r)=>{const a=t(r);return a&&(o[a]=e[r]),o},{}),n,i]}let Lv=null;function p3(){return Lv||(Lv=qe.fromMillis(1555555555555)),Lv}function g3(e,t){if(e.literal)return e;const n=Yn.macroTokenToFormatOpts(e.val),i=AF(n,t);return i==null||i.includes(void 0)?e:i}function xF(e,t){return Array.prototype.concat(...e.map(n=>g3(n,t)))}class _F{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=xF(Yn.parseFormat(n),t),this.units=this.tokens.map(i=>l3(i,t)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){const[i,s]=d3(this.units);this.regex=RegExp(i,"i"),this.handlers=s}}explainFromTokens(t){if(this.isValid){const[n,i]=h3(t,this.regex,this.handlers),[s,o,r]=i?f3(i):[null,null,void 0];if(vl(i,"a")&&vl(i,"H"))throw new ml("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:i,result:s,zone:o,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 PF(e,t,n){return new _F(e,n).explainFromTokens(t)}function m3(e,t,n){const{result:i,zone:s,specificOffset:o,invalidReason:r}=PF(e,t,n);return[i,s,o,r]}function AF(e,t){if(!e)return null;const i=Yn.create(t,e).dtFormatter(p3()),s=i.formatToParts(),o=i.resolvedOptions();return s.map(r=>c3(r,e,o))}const Nv="Invalid DateTime",IF=864e13;function Ec(e){return new ys("unsupported zone",`the zone "${e.name}" is not supported`)}function Vv(e){return e.weekData===null&&(e.weekData=nf(e.c)),e.weekData}function Bv(e){return e.localWeekData===null&&(e.localWeekData=nf(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function ua(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new qe({...n,...t,old:n})}function kF(e,t,n){let i=e-t*60*1e3;const s=n.offset(i);if(t===s)return[i,t];i-=(s-t)*60*1e3;const o=n.offset(i);return s===o?[i,s]:[e-Math.min(s,o)*60*1e3,Math.max(s,o)]}function df(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 hf(e,t,n){return kF(rf(e),t,n)}function OF(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,o={...e.c,year:i,month:s,day:Math.min(e.c.day,of(i,s))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},r=Nt.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=rf(o);let[l,u]=kF(a,n,e.zone);return r!==0&&(l+=r,u=e.zone.offset(l)),{ts:l,o:u}}function Tl(e,t,n,i,s,o){const{setZone:r,zone:a}=n;if(e&&Object.keys(e).length!==0||t){const l=t||a,u=qe.fromObject(e,{...n,zone:l,specificOffset:o});return r?u:u.setZone(a)}else return qe.invalid(new ys("unparsable",`the input "${s}" can't be parsed as ${i}`))}function ff(e,t,n=!0){return e.isValid?Yn.create(jt.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Hv(e,t,n){const i=e.c.year>9999||e.c.year<0;let s="";if(i&&e.c.year>=0&&(s+="+"),s+=Pn(e.c.year,i?6:4),n==="year")return s;if(t){if(s+="-",s+=Pn(e.c.month),n==="month")return s;s+="-"}else if(s+=Pn(e.c.month),n==="month")return s;return s+=Pn(e.c.day),s}function MF(e,t,n,i,s,o,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+=Pn(e.c.hour),r==="hour")break;if(t){if(l+=":",l+=Pn(e.c.minute),r==="minute")break;a&&(l+=":",l+=Pn(e.c.second))}else{if(l+=Pn(e.c.minute),r==="minute")break;a&&(l+=Pn(e.c.second))}if(r==="second")break;a&&(!i||e.c.millisecond!==0)&&(l+=".",l+=Pn(e.c.millisecond,3))}return s&&(e.isOffsetFixed&&e.offset===0&&!o?l+="Z":e.o<0?(l+="-",l+=Pn(Math.trunc(-e.o/60)),l+=":",l+=Pn(Math.trunc(-e.o%60))):(l+="+",l+=Pn(Math.trunc(e.o/60)),l+=":",l+=Pn(Math.trunc(e.o%60)))),o&&(l+="["+e.zone.ianaName+"]"),l}const LF={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},v3={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},C3={ordinal:1,hour:0,minute:0,second:0,millisecond:0},pf=["year","month","day","hour","minute","second","millisecond"],y3=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],w3=["year","ordinal","hour","minute","second","millisecond"];function gf(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 cD(e);return t}function NF(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return gf(e)}}function b3(e){if(Rc===void 0&&(Rc=mn.now()),e.type!=="iana")return e.offset(Rc);const t=e.name;let n=Gv.get(t);return n===void 0&&(n=e.offset(Rc),Gv.set(t,n)),n}function VF(e,t){const n=rr(t.zone,mn.defaultZone);if(!n.isValid)return qe.invalid(Ec(n));const i=jt.fromObject(t);let s,o;if(St(e.year))s=mn.now();else{for(const l of pf)St(e[l])&&(e[l]=LF[l]);const r=YD(e)||ZD(e);if(r)return qe.invalid(r);const a=b3(n);[s,o]=hf(e,a,n)}return new qe({ts:s,zone:n,loc:i,o})}function BF(e,t,n){const i=St(n.round)?!0:n.round,s=St(n.rounding)?"trunc":n.rounding,o=(a,l)=>(a=Av(a,i||n.calendary?0:2,n.calendary?"round":s),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 o(r(n.unit),n.unit);for(const a of n.units){const l=r(a);if(Math.abs(l)>=1)return o(l,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function HF(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 Rc;const Gv=new Map;class qe{constructor(t){const n=t.zone||mn.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new ys("invalid input"):null)||(n.isValid?null:Ec(n));this.ts=St(t.ts)?mn.now():t.ts;let s=null,o=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[s,o]=[t.old.c,t.old.o];else{const a=ar(t.o)&&!t.old?t.o:n.offset(this.ts);s=df(this.ts,a),i=Number.isNaN(s.year)?new ys("invalid input"):null,s=i?null:s,o=i?null:a}this._zone=n,this.loc=t.loc||jt.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=s,this.o=o,this.isLuxonDateTime=!0}static now(){return new qe({})}static local(){const[t,n]=HF(arguments),[i,s,o,r,a,l,u]=n;return VF({year:i,month:s,day:o,hour:r,minute:a,second:l,millisecond:u},t)}static utc(){const[t,n]=HF(arguments),[i,s,o,r,a,l,u]=n;return t.zone=li.utcInstance,VF({year:i,month:s,day:o,hour:r,minute:a,second:l,millisecond:u},t)}static fromJSDate(t,n={}){const i=eU(t)?t.valueOf():NaN;if(Number.isNaN(i))return qe.invalid("invalid input");const s=rr(n.zone,mn.defaultZone);return s.isValid?new qe({ts:i,zone:s,loc:jt.fromObject(n)}):qe.invalid(Ec(s))}static fromMillis(t,n={}){if(ar(t))return t<-IF||t>IF?qe.invalid("Timestamp out of range"):new qe({ts:t,zone:rr(n.zone,mn.defaultZone),loc:jt.fromObject(n)});throw new qn(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(ar(t))return new qe({ts:t*1e3,zone:rr(n.zone,mn.defaultZone),loc:jt.fromObject(n)});throw new qn("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const i=rr(n.zone,mn.defaultZone);if(!i.isValid)return qe.invalid(Ec(i));const s=jt.fromObject(n),o=lf(t,NF),{minDaysInFirstWeek:r,startOfWeek:a}=qD(o,s),l=mn.now(),u=St(n.specificOffset)?i.offset(l):n.specificOffset,c=!St(o.ordinal),d=!St(o.year),h=!St(o.month)||!St(o.day),p=d||h,g=o.weekYear||o.weekNumber;if((p||c)&&g)throw new ml("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&c)throw new ml("Can't mix ordinal dates with month/day");const C=g||o.weekday&&!p;let v,S,R=df(l,u);C?(v=y3,S=v3,R=nf(R,r,a)):c?(v=w3,S=C3,R=xv(R)):(v=pf,S=LF);let E=!1;for(const M of v){const P=o[M];St(P)?E?o[M]=S[M]:o[M]=R[M]:E=!0}const y=C?Jz(o,r,a):c?Xz(o):YD(o),b=y||ZD(o);if(b)return qe.invalid(b);const F=C?jD(o,r,a):c?KD(o):o,[x,V]=hf(F,u,i),I=new qe({ts:x,zone:i,o:V,loc:s});return o.weekday&&p&&t.weekday!==I.weekday?qe.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${I.toISO()}`):I.isValid?I:qe.invalid(I.invalid)}static fromISO(t,n={}){const[i,s]=WU(t);return Tl(i,s,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[i,s]=zU(t);return Tl(i,s,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[i,s]=UU(t);return Tl(i,s,n,"HTTP",n)}static fromFormat(t,n,i={}){if(St(t)||St(n))throw new qn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:o=null}=i,r=jt.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0}),[a,l,u,c]=m3(r,t,n);return c?qe.invalid(c):Tl(a,l,i,`format ${n}`,t,u)}static fromString(t,n,i={}){return qe.fromFormat(t,n,i)}static fromSQL(t,n={}){const[i,s]=XU(t);return Tl(i,s,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new qn("need to specify a reason the DateTime is invalid");const i=t instanceof ys?t:new ys(t,n);if(mn.throwOnInvalid)throw new Dz(i);return new qe({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const i=AF(t,jt.fromObject(n));return i?i.map(s=>s?s.val:null).join(""):null}static expandFormat(t,n={}){return xF(Yn.parseFormat(t),jt.fromObject(n)).map(s=>s.val).join("")}static resetCache(){Rc=void 0,Gv.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?Vv(this).weekYear:NaN}get weekNumber(){return this.isValid?Vv(this).weekNumber:NaN}get weekday(){return this.isValid?Vv(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Bv(this).weekday:NaN}get localWeekNumber(){return this.isValid?Bv(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Bv(this).weekYear:NaN}get ordinal(){return this.isValid?xv(this.c).ordinal:NaN}get monthShort(){return this.isValid?Fl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Fl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Fl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Fl.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=rf(this.c),s=this.zone.offset(i-t),o=this.zone.offset(i+t),r=this.zone.offset(i-s*n),a=this.zone.offset(i-o*n);if(r===a)return[this];const l=i-r*n,u=i-a*n,c=df(l,r),d=df(u,a);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[ua(this,{ts:l}),ua(this,{ts:u})]:[this]}get isInLeapYear(){return Cc(this.year)}get daysInMonth(){return of(this.year,this.month)}get daysInYear(){return this.isValid?Cl(this.year):NaN}get weeksInWeekYear(){return this.isValid?yc(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?yc(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:i,calendar:s}=Yn.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:s}}toUTC(t=0,n={}){return this.setZone(li.instance(t),n)}toLocal(){return this.setZone(mn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(t=rr(t,mn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let s=this.ts;if(n||i){const o=t.offset(this.ts),r=this.toObject();[s]=hf(r,o,t)}return ua(this,{ts:s,zone:t})}else return qe.invalid(Ec(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:i}={}){const s=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i});return ua(this,{loc:s})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=lf(t,NF),{minDaysInFirstWeek:i,startOfWeek:s}=qD(n,this.loc),o=!St(n.weekYear)||!St(n.weekNumber)||!St(n.weekday),r=!St(n.ordinal),a=!St(n.year),l=!St(n.month)||!St(n.day),u=a||l,c=n.weekYear||n.weekNumber;if((u||r)&&c)throw new ml("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new ml("Can't mix ordinal dates with month/day");let d;o?d=jD({...nf(this.c,i,s),...n},i,s):St(n.ordinal)?(d={...this.toObject(),...n},St(n.day)&&(d.day=Math.min(of(d.year,d.month),d.day))):d=KD({...xv(this.c),...n});const[h,p]=hf(d,this.o,this.zone);return ua(this,{ts:h,o:p})}plus(t){if(!this.isValid)return this;const n=Nt.fromDurationLike(t);return ua(this,OF(this,n))}minus(t){if(!this.isValid)return this;const n=Nt.fromDurationLike(t).negate();return ua(this,OF(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const i={},s=Nt.normalizeUnit(t);switch(s){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(s==="weeks")if(n){const o=this.loc.getStartOfWeek(),{weekday:r}=this;r<o&&(i.weekNumber=this.weekNumber-1),i.weekday=o}else i.weekday=1;if(s==="quarters"){const o=Math.ceil(this.month/3);i.month=(o-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?Yn.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):Nv}toLocaleString(t=Qh,n={}){return this.isValid?Yn.create(this.loc.clone(n),t).formatDateTime(this):Nv}toLocaleParts(t={}){return this.isValid?Yn.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:o=!1,precision:r="milliseconds"}={}){if(!this.isValid)return null;r=gf(r);const a=t==="extended";let l=Hv(this,a,r);return pf.indexOf(r)>=3&&(l+="T"),l+=MF(this,a,n,i,s,o,r),l}toISODate({format:t="extended",precision:n="day"}={}){return this.isValid?Hv(this,t==="extended",gf(n)):null}toISOWeekDate(){return ff(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:o=!1,format:r="extended",precision:a="milliseconds"}={}){return this.isValid?(a=gf(a),(s&&pf.indexOf(a)>=3?"T":"")+MF(this,r==="extended",n,t,i,o,a)):null}toRFC2822(){return ff(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ff(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Hv(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(n||t)&&(i&&(s+=" "),n?s+="z":t&&(s+="ZZ")),ff(this,s,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Nv}[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 Nt.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=tU(n).map(Nt.normalizeUnit),r=t.valueOf()>this.valueOf(),a=r?this:t,l=r?t:this,u=s3(a,l,o,s);return r?u.negate():u}diffNow(t="milliseconds",n={}){return this.diff(qe.now(),t,n)}until(t){return this.isValid?vn.fromDateTimes(this,t):this}hasSame(t,n,i){if(!this.isValid)return!1;const s=t.valueOf(),o=this.setZone(t.zone,{keepLocalTime:!0});return o.startOf(n,i)<=s&&s<=o.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||qe.fromObject({},{zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0;let s=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(s=t.unit,o=void 0),BF(n,this.plus(i),{...t,numeric:"always",units:s,unit:o})}toRelativeCalendar(t={}){return this.isValid?BF(t.base||qe.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(qe.isDateTime))throw new qn("min requires all arguments be DateTimes");return QD(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(qe.isDateTime))throw new qn("max requires all arguments be DateTimes");return QD(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,i={}){const{locale:s=null,numberingSystem:o=null}=i,r=jt.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0});return PF(r,t,n)}static fromStringExplain(t,n,i={}){return qe.fromFormatExplain(t,n,i)}static buildFormatParser(t,n={}){const{locale:i=null,numberingSystem:s=null}=n,o=jt.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return new _F(o,t)}static fromFormatParser(t,n,i={}){if(St(t)||St(n))throw new qn("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:o=null}=i,r=jt.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0});if(!r.equals(n.locale))throw new qn(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${n.locale}`);const{result:a,zone:l,specificOffset:u,invalidReason:c}=n.explainFromTokens(t);return c?qe.invalid(c):Tl(a,l,i,`format ${n.format}`,t,u)}static get DATE_SHORT(){return Qh}static get DATE_MED(){return dD}static get DATE_MED_WITH_WEEKDAY(){return xz}static get DATE_FULL(){return hD}static get DATE_HUGE(){return fD}static get TIME_SIMPLE(){return pD}static get TIME_WITH_SECONDS(){return gD}static get TIME_WITH_SHORT_OFFSET(){return mD}static get TIME_WITH_LONG_OFFSET(){return vD}static get TIME_24_SIMPLE(){return CD}static get TIME_24_WITH_SECONDS(){return yD}static get TIME_24_WITH_SHORT_OFFSET(){return wD}static get TIME_24_WITH_LONG_OFFSET(){return bD}static get DATETIME_SHORT(){return SD}static get DATETIME_SHORT_WITH_SECONDS(){return ED}static get DATETIME_MED(){return RD}static get DATETIME_MED_WITH_SECONDS(){return DD}static get DATETIME_MED_WITH_WEEKDAY(){return _z}static get DATETIME_FULL(){return FD}static get DATETIME_FULL_WITH_SECONDS(){return TD}static get DATETIME_HUGE(){return xD}static get DATETIME_HUGE_WITH_SECONDS(){return _D}}function Dc(e){if(qe.isDateTime(e))return e;if(e&&e.valueOf&&ar(e.valueOf()))return qe.fromJSDate(e);if(e&&typeof e=="object")return qe.fromObject(e);throw new qn(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const S3=(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},s=Ps({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});zg(()=>{var F;((F=e.value)==null?void 0:F.length)===2&&(s.startDate=e.value[0],s.endDate=e.value[1]),s.cacheStartDate=s.startDate,s.cacheEndDate=s.endDate,s.isSelectingStart=!1,s.isSelectingEnd=!1,e.timezone&&(s.timezone=e.timezone)});const o=()=>{var M,P,N,ie,ve,Be,ee,U;t("tracing",JSON.parse(JSON.stringify(n.value)));const F=((P=(M=s.startDate)==null?void 0:M.getTime)==null?void 0:P.call(M))!==((ie=(N=s.cacheStartDate)==null?void 0:N.getTime)==null?void 0:ie.call(N)),x=((Be=(ve=s.endDate)==null?void 0:ve.getTime)==null?void 0:Be.call(ve))!==((U=(ee=s.cacheEndDate)==null?void 0:ee.getTime)==null?void 0:U.call(ee)),V=s.startDate===null,I=s.endDate===null;F&&x&&V&&I?t("clearAll"):F&&!x?V?t("clearStart"):t("update:start",s.startDate):x&&!F?I?t("clearDue"):t("update:end",s.endDate):F&&x&&t("update",[s.startDate,s.endDate]),t("confirmed",{start:s.startDate,end:s.endDate}),s.isDirty=F||x},r=(F,x)=>{const V=qe.fromObject({year:F.year,month:F.month,day:F.day},{zone:s.timezone});return(x==="start"?V.startOf("day"):V.endOf("day")).toJSDate()},a=()=>{s.rangeFeedback.status="idle",s.rangeFeedback.action=null,s.rangeFeedback.message=""},l=F=>{e.enableRangeFeedback&&(s.rangeFeedback.status="corrected",s.rangeFeedback.action=F,s.rangeFeedback.message=F==="swap"?i.swap:i.truncate)},u=F=>{if(!(!s.startDate||!s.endDate)){if(s.startDate.getTime()<=s.endDate.getTime()){e.enableRangeFeedback&&a();return}if(F==="select-start"){const x={start:s.startDate,end:s.endDate};s.endDate=null,t("range:invalid",x),t("range:corrected",{start:s.startDate,end:s.endDate,action:"truncate"}),s.isSelectingEnd=!0,l("truncate")}else{const x={start:s.startDate,end:s.endDate},V=s.startDate;s.startDate=s.endDate,s.endDate=V,t("range:invalid",x),t("range:corrected",{start:s.startDate,end:s.endDate,action:"swap"}),l("swap")}}},c=(F,x=!0)=>{e.disabled||e.readOnly||(s.startDate=r(F,"start"),x?(s.isSelectingStart=!1,s.isSelectingEnd=!0):(s.isSelectingStart=!0,s.isSelectingEnd=!1),u("select-start"))},d=F=>{e.disabled||e.readOnly||(s.endDate=r(F,"end"),u("select-end"))},h=()=>{e.disabled||e.readOnly||(s.startDate=null,a())},p=()=>{e.disabled||e.readOnly||(s.endDate=null,a())},g=()=>{e.disabled||e.readOnly||(s.startDate=null,s.endDate=null,a(),v())},C=()=>{e.disabled||e.readOnly||s.isDirty||(s.cacheStartDate=s.startDate,s.cacheEndDate=s.endDate)},v=()=>{e.disabled||e.readOnly||(o(),s.cacheStartDate=s.startDate,s.cacheEndDate=s.endDate,s.isDirty=!1)},S=()=>{e.disabled||e.readOnly||(s.startDate=s.cacheStartDate,s.endDate=s.cacheEndDate,a(),s.isDirty=!1)},R=G(()=>s.startDate?qe.fromJSDate(s.startDate,{zone:s.timezone}).toFormat(s.format):e.startPlaceholder),E=G(()=>s.endDate?qe.fromJSDate(s.endDate,{zone:s.timezone}).toFormat(s.format):e.duePlaceholder),y=G(()=>!s.startDate&&!e.disabled?e.startTooltip:!s.startDate&&(e.disabled||e.readOnly)?e.startPlaceholder:s.startDate?qe.fromJSDate(s.startDate,{zone:s.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.startTooltip),b=G(()=>!s.endDate&&!e.disabled?e.dueTooltip:!s.endDate&&(e.disabled||e.readOnly)?e.startPlaceholder:s.endDate?qe.fromJSDate(s.endDate,{zone:s.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.dueTooltip);return{states:s,displayStartDate:R,displayEndDate:E,tooltipStartDate:y,tooltipEndDate:b,selectEndDate:d,selectStartDate:c,clearDue:p,clearStart:h,clearAll:g,beginInteraction:C,confirmSelection:v,cancelSelection:S}},GF=e=>{const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t?decodeURIComponent(t[2]):null},E3="account.last_set_local_timezone",Fc=300;function xl(e){if(!e)return null;if(qe.isDateTime(e))return e;if(e instanceof Date){const t=qe.fromJSDate(e);return t.isValid?t:null}if(typeof e=="number"){const t=qe.fromMillis(e);return t.isValid?t:null}if(typeof e=="string"){let t=qe.fromISO(e);return t.isValid||(t=qe.fromRFC2822(e)),t.isValid?t:null}return null}function $v(e,t,n){const i=xl(e);if(!i)return"";const s=n?i.setZone(n):i;return s.isValid?t?s.toFormat(t):s.toISO()||"":""}function $F(e,t,n){if(!t||!n)return"";const i=xl(e);if(!i)return"";const s=i.setZone(t);return s.isValid?s.toFormat(n):""}function R3(e,t){if(!e)return"";const n=qe.now().setZone(e);return n.isValid?n.toFormat(t):""}function D3(e,t){return R3(e,t)}const F3=e=>{const t=qe.now().setZone(e);if(!t.isValid)return"GMT+0";const n=t.offset,i=n>=0?"+":"-",s=Math.floor(Math.abs(n)/60),o=Math.abs(n)%60;return`GMT${i}${s}:${o.toString().padStart(2,"0")}`},mf=()=>GF(E3)||"UTC",vf=({date:e,timezone:t,format:n})=>{if(!e)return"";const i=typeof e=="string"?qe.fromISO(e,{zone:t}):e,s=qe.now().setZone(t||"local"),o=i.setZone(t||"local"),r=s.startOf("day"),l=o.startOf("day").diff(r,"days").days;let u="";if(l===0?u="Today":l===-1?u="Yesterday":l===1&&(u="Tomorrow"),u&&(n!=null&&n.includes("HH:mm"))){const c=o.toFormat("HH:mm");return`${u} at ${c}`}else if(u)return u;return o.toFormat(n)},Wv=()=>"Asia/Saigon",WF=e=>`${qe.fromJSDate(e,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,T3=e=>{const t="MMM dd",n=e.timezone,i=G(()=>$F(e.start,n,t)),s=G(()=>$F(e.end,n,t)),o=G(()=>e.start?vf({date:xl(e.start),timezone:n,format:t}):"No start"),r=G(()=>e.end?vf({date:xl(e.end),timezone:n,format:t}):"No due"),a=v=>{if(!v)return null;const S=qe.now().setZone(n).startOf("day"),R=qe.fromISO(v).setZone(n).startOf("day");if(!R.isValid)return console.warn("Invalid date:",v,R.invalidReason),null;const E=R.diff(S,"days").days;return E===0?"today":E===1?"tomorrow":E===-1?"yesterday":E<-1?"past":"future"},l=G(()=>a(e.start)),u=G(()=>a(e.end)),c=G(()=>{if(!l.value)return;const v=l.value;if(!e.isStarted){if(v==="today"||v==="tomorrow")return"#f7941d";if(v==="yesterday"||v==="past")return"#ff5200"}}),d=G(()=>{if(!u.value)return;const v=u.value;if(e.isEnded)return v==="today"||v==="tomorrow"||v==="future"?"#02c39a":void 0;if(v==="today"||v==="tomorrow")return"#f7941d";if(v==="yesterday"||v==="past")return"#ff5200"}),h=G(()=>{const v=[];return l.value&&v.push(`start-${l.value}`),e.isStarted&&v.push("actual"),v}),p=G(()=>{const v=[];return u.value&&v.push(`end-${u.value}`),e.isEnded&&v.push("actual"),v}),g=G(()=>e.start?vf({date:xl(e.start),timezone:n,format:"MMM dd, yyyy | HH:mm"}):"No start"),C=G(()=>e.end?vf({date:xl(e.end),timezone:n,format:"MMM dd, yyyy | HH:mm"}):"No due");return{startDate:o,endDate:r,startColor:c,endColor:d,displayStart:i,displayEnd:s,startClasses:h,endClasses:p,startStatus:l,endStatus:u,fullStartDate:g,fullEndDate:C}},x3="UserCache",_3="user",P3=()=>{const e=oe({}),{getCachedValue:t,setCachedValue:n}=ac({dbName:x3,storeName:_3}),i=async u=>u?await t(u):null;return{getCachedUser:i,setCachedUser:async u=>{if(!(u!=null&&u.id)){console.warn("Cannot cache user without id:",u);return}await n(u.id,u),e.value[u.id]=!0},getCachedUsers:async u=>{if(!u||u.length===0)return[];const c=u.map(h=>i(h));return(await Promise.all(c)).filter(h=>h!==null)},setCachedUsers:async u=>{if(!u||u.length===0)return;const d=Xh(u,"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:u=>!!e.value[u],clearCacheTracking:()=>{e.value={}}}},A3={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 Tc=0,ki=null;function I3(e){return ki||(ki=document.createElement("div"),ki.className="popup-overlay",ki.style.cssText=`
60
+ position: fixed;
61
+ top: 0;
62
+ left: 0;
63
+ right: 0;
64
+ bottom: 0;
65
+ background: rgba(0, 0, 0, ${e});
66
+ backdrop-filter: blur(2px);
67
+ z-index: 9998;
68
+ opacity: 0;
69
+ transition: opacity 0.3s ease;
70
+ pointer-events: auto;
71
+ `,document.body.appendChild(ki),requestAnimationFrame(()=>{ki&&(ki.style.opacity="1")})),ki}function zF(e,t){Tc++;const n=I3(e);return t&&n.addEventListener("click",t),()=>{t&&n.removeEventListener("click",t)}}function zv(e){Tc--,e&&e(),Tc<=0&&(Tc=0,ki&&(ki.style.opacity="0",setTimeout(()=>{ki&&Tc===0&&(ki.remove(),ki=null)},300)))}function Cf(e){const t=e.value;return t?"$el"in t?t.$el:t:null}function k3(e={}){const t={...A3,...e},n=oe(null),i=oe(null),s=oe(null),o=oe(!1);let r=null;const a=p=>{p.style.cssText=`
72
+ position: fixed;
73
+ top: 50%;
74
+ left: 50%;
75
+ transform: translate(-50%, -50%);
76
+ z-index: 9999;
77
+ display: block;
78
+ `},l=()=>{const p=Cf(n);if(t.centered&&p){if(o.value=!0,a(p),t.showOverlay){const g=()=>{t.closeOnOverlayClick&&u()};r=zF(t.overlayOpacity,g)}}else if(s.value&&(s.value.show(),o.value=!0,t.showOverlay)){const g=()=>{t.closeOnOverlayClick&&u()};r=zF(t.overlayOpacity,g)}},u=()=>{const p=Cf(n);t.centered&&p?(o.value=!1,p.style.display="none",t.showOverlay&&(zv(r||void 0),r=null)):s.value&&(s.value.hide(),o.value=!1,t.showOverlay&&(zv(r||void 0),r=null))},c=()=>{o.value?u():l()},d=()=>{s.value&&(s.value.destroy(),s.value=null),t.showOverlay&&r&&(zv(r),r=null)},h=()=>{var C;const p=Cf(n);if(!p)return;if(p.style.display="none",t.centered){t.showOnInit&&l();return}const g={content:p,placement:t.placement,theme:t.theme,trigger:t.trigger,interactive:t.interactive,appendTo:t.appendTo,arrow:t.showArrow,allowHTML:!0,hideOnClick:!1,popperOptions:{...t.popperOptions,modifiers:[...((C=t.popperOptions)==null?void 0:C.modifiers)||[],{name:"computeStyles",options:{adaptive:!1}}]},onShow(){o.value=!0,p.style.display="block"},onHide(){o.value=!1}};if(t.useTrigger){const v=Cf(i);if(!v)return;s.value=nr(v,g)}else{const v=document.createElement("div");v.style.display="none",document.body.appendChild(v),s.value=nr(v,g)}t.showOnInit&&l()};return Kn(()=>{h()}),pi(()=>{d()}),wt(()=>t.alwaysShow,p=>{p?l():u()},{immediate:!0}),{popupRef:n,triggerRef:i,instance:s,isVisible:o,show:l,hide:u,toggle:c,destroy:d}}const O3=sessionStorage.getItem("BASE_URL"),M3=sessionStorage.getItem("BASE_REVIEW_URL"),L3=(e,t,n,i)=>{const s="",o={baseDomain:O3||s,ws_code:e||s,entity_id:t||s,scene_id:n||s,reviewDomain:M3||s,take_id:t||s,woohoo_id:t||s,parent_id:t||s},r=G(()=>({project:gs({type:"project",config:o}).url,take_review:gs({type:"review_take",config:o}).url,review:gs({type:"review_scene",config:o}).url,review_scene:gs({type:"review_scene",config:o}).url,woohoo:gs({type:"woohoo",config:o}).url,update:gs({type:"update",config:o}).url,scene_hub:gs({type:"scene_hub",config:o}).url}));return{linkMap:r,handleOpen:(p,g)=>{const C=p instanceof MouseEvent&&(p.metaKey||p.ctrlKey),v=r.value[g]||"";v&&(C?window.open(v,"_blank"):window.location.href=v)},copyLink:p=>{const g=r.value.scene_hub||"";g&&navigator.clipboard.writeText(g)},deleteRendition:async(p,g)=>{var C;try{const v=prompt("Type YES to confirm deletion of rendition")==="YES",S=await await((C=i.value)==null?void 0:C.deleteRendition(e,[n],v))}catch(v){console.error("Error deleting rendition",v)}},deleteThumbnail:async(p,g)=>{var C;try{if(!(prompt("Type YES to confirm deletion of thumbnail")==="YES"))return;await((C=i.value)==null?void 0:C.deleteThumbnail(e,[n]))}catch(v){console.error("Error deleting thumbnail",v)}},archiveItem:async(p,g)=>{var C;try{if(!(prompt("Type YES to confirm archiving of scene")==="YES"))return;const S=await((C=i.value)==null?void 0:C.archiveScene(e,t,[n]));g&&g("archived")}catch(v){console.error("Error archiving item",v)}},deleteItem:async(p,g)=>{var C;try{if(!(prompt("Type YES to confirm deletion of scene")==="YES"))return;const S=await((C=i.value)==null?void 0:C.deleteScene(e,t,n));g&&g("deleted")}catch(v){console.error("Error deleting item",v)}}}},Uv=new Map;function N3(e){return t=>{const n=`${e}-${t}`;return Uv.has(n)||Uv.set(n,`${e}-${t}-${Date.now()}`),Uv.get(n)}}function Ws(e){const t=oe(!1),n=oe(!1),i=G(()=>{var d;const u=e.value,c=!!u.readOnly;return{readOnly:c,disabled:!!u.disabled,hovered:n.value,focused:t.value,isEmpty:u.empty??!1,error:!!u.error,actived:!!((d=u.active)!=null&&d.value),clickable:c?!1:u.clickable??!1}}),s=()=>{t.value=!0,In(()=>{const u=l(e.value.inputRef);u==null||u.focus()})},o=()=>{t.value=!1},r=()=>{n.value=!0},a=()=>{n.value=!1},l=u=>{if(!u)return null;const c=u.value||u;return(c instanceof HTMLElement?c:c==null?void 0:c.$el)||null};return Kn(()=>{const u=l(e.value.inputRef),c=l(e.value.wrapperRef);u&&(u.addEventListener("focus",s),u.addEventListener("blur",o)),c&&(c.addEventListener("mouseenter",r),c.addEventListener("mouseleave",a))}),pi(()=>{const u=l(e.value.inputRef),c=l(e.value.wrapperRef);u&&(u.removeEventListener("focus",s),u.removeEventListener("blur",o)),c&&(c.removeEventListener("mouseenter",r),c.removeEventListener("mouseleave",a))}),{isFocus:t,isHover:n,argsMain:i,handleFocus:s}}const UF=Et(ct({__name:"StatusBadge",props:{size:{default:16},color:{default:"#02C39A"},label:{default:""},status:{default:"online"},statusTooltip:{default:"Online"},showBadge:{type:Boolean,default:!0}},setup(e){const{triggerRef:t,popupRef:n}=$s({trigger:"mouseenter focus",theme:"dark",placement:"right"}),i=G(()=>{if(s.color)return s.color;switch(s.status){case"online":return"#02C39A";case"offline":return"#808080";case"busy":return"#ff0000";case"away":return"#F7941D";default:return"#02C39A"}}),s=e;return(o,r)=>(j(),Ce("div",{class:z(o.$style["status-badge-wrapper"]),style:hn({"--badge-size":`${s.size}px`,"--badge-color":i.value})},[vt(o.$slots,"default"),ut(me("div",null,[me("div",{class:z(o.$style["badge-indicator"]),ref_key:"triggerRef",ref:t},null,2)],512),[[Jr,s.showBadge]]),me("div",{ref_key:"popupRef",ref:n,class:z(o.$style["badge-tooltip"])},yt(s.statusTooltip),3)],6))}}),[["__cssModules",{$style:{"status-badge-wrapper":"_status-badge-wrapper_5t6x6_1","badge-indicator":"_badge-indicator_5t6x6_6",online:"_online_5t6x6_18",offline:"_offline_5t6x6_21",busy:"_busy_5t6x6_24",away:"_away_5t6x6_27","badge-tooltip":"_badge-tooltip_5t6x6_31"}}]]),V3=ct({__name:"MiniPeopleCard",props:{user:{},status:{default:"online"},timezone:{default:mf()},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=wn,i=wo,s=e,o=t,r={online:"Active in workspace within the last 10 minutes",offline:"No activity in workspace within the last 10 minutes",busy:"User is busy",away:"User is away"},a={online:"#02C39A",offline:"#808080",busy:"#FF0000",away:"#F7941D"},l=oe(s.status),u=oe(s.timezone),c=oe(!1),d=oe(null),h=G(()=>r[l.value]),p=G(()=>a[l.value]),g=G(()=>{var I;return((I=s.user)==null?void 0:I.name)||"Unknown User"}),C=G(()=>u.value?D3(u.value,"HH:mm"):""),v=G(()=>u.value?`(${F3(u.value)})`:""),S=async()=>{var I,M;if(!(!s.apiUpdateFunction||c.value))try{c.value=!0;const P=await s.apiUpdateFunction(s.user.id);if(!P)throw new Error("No data returned from API");((I=P.private_info)==null?void 0:I.is_offline)!==void 0&&(l.value=P.private_info.is_offline?"offline":"online"),(M=P.private_info)!=null&&M.timezone&&(u.value=P.private_info.timezone),o("dataUpdated",P)}catch(P){console.error("Failed to fetch user data:",P)}finally{c.value=!1}},R=()=>{!s.apiUpdateFunction||!s.enableAutoRefresh||(d.value!==null&&clearInterval(d.value),d.value=setInterval(S,s.refreshInterval))},E=()=>{d.value!==null&&(clearInterval(d.value),d.value=null)},y=`https://peopleinsight.arbo.com/user/${s.user.id}`,{copyToClipboard:b,tooltip:F}=uD(y,()=>o("copyLink",s.user.id)),x=()=>o("insightClick",s.user.id);wt([()=>s.enableAutoRefresh,()=>s.refreshInterval,()=>s.apiUpdateFunction],()=>{E(),s.enableAutoRefresh&&s.apiUpdateFunction&&R()}),Kn(async()=>{s.apiUpdateFunction&&(await S(),R())}),pi(E);const V=G(()=>({name:s.user.name,initial:s.user.initial,id:s.user.id,profile_image:s.user.profile_image,color:s.user.color,size:98}));return(I,M)=>(j(),Ce("div",{class:z([I.$style["mini-people-card"],{[I.$style.loading]:c.value}])},[me("div",{class:z(I.$style["avatar-section"])},[s.private?(j(),Xe(uc,fn({key:1,readOnly:!0},V.value),null,16)):(j(),Xe(UF,{key:0,size:16,status:l.value,"status-tooltip":h.value},{default:De(()=>[ye(uc,fn({readOnly:!0},V.value),null,16)]),_:1},8,["status","status-tooltip"]))],2),me("div",{class:z(I.$style["user-info"])},[me("div",{class:z(I.$style["info-row"])},[me("h3",{class:z(I.$style["user-name"])},yt(g.value),3),s.private?at("",!0):ut((j(),Ce("span",{key:0,class:z(I.$style["status-badge"]),style:hn({color:p.value})},[bt(yt(l.value),1)],6)),[[Z(i),{isLoading:c.value,fullwidth:!0}]])],2),u.value?(j(),Ce("div",{key:0,class:z([I.$style["info-row"],I.$style["time-row"]])},[ut((j(),Ce("div",{class:z(I.$style["time-display"])},[ye(lt,{source:"remote",src:"Clock",size:"14",class:z(I.$style["clock-icon"])},null,8,["class"]),me("span",{class:z(I.$style["time-text"])},[me("strong",null,yt(C.value),1),me("span",{class:z(I.$style.separator)},"|",2),me("span",null,yt(v.value),1)],2)],2)),[[Z(i),{isLoading:c.value,fullwidth:!0}]])],2)):at("",!0),!e.readOnly&&!s.private?(j(),Ce("div",{key:1,class:z([I.$style["info-row"],I.$style.actions])},[e.showInsightButton?(j(),Xe(gt,{key:0,label:"Insights",variant:"primary",size:"default",style:{flex:"1"},onClick:Ut(x,["prevent","stop"]),disabled:s.disabled},null,8,["disabled"])):at("",!0),e.showCopyLinkButton?ut((j(),Xe(gt,{key:1,variant:["icon","secondary"],size:"default","aria-label":"Copy link",onClick:Ut(Z(b),["prevent","stop"]),disabled:s.disabled},{default:De(()=>[ye(lt,{source:"remote",src:"Link",size:"14"})]),_:1},8,["onClick","disabled"])),[[Z(n),{content:Z(F),contentClass:["extra-padding"],hideOnClick:!1,delay:[300,0]}]]):at("",!0)],2)):at("",!0)],2)],2))}}),B3=Et(V3,[["__cssModules",{$style:{"mini-people-card":"_mini-people-card_1kziz_1",loading:"_loading_1kziz_22","avatar-section":"_avatar-section_1kziz_25","user-info":"_user-info_1kziz_29","info-row":"_info-row_1kziz_35","time-row":"_time-row_1kziz_42","time-display":"_time-display_1kziz_48","time-text":"_time-text_1kziz_53","actions-row":"_actions-row_1kziz_58","user-name":"_user-name_1kziz_62","status-badge":"_status-badge_1kziz_73",online:"_online_1kziz_87",offline:"_offline_1kziz_90",busy:"_busy_1kziz_93",away:"_away_1kziz_96","user-local-time":"_user-local-time_1kziz_99","clock-icon":"_clock-icon_1kziz_107",separator:"_separator_1kziz_119",timezone:"_timezone_1kziz_122","refresh-btn":"_refresh-btn_1kziz_125",spinning:"_spinning_1kziz_128",spin:"_spin_1kziz_128","insight-btn":"_insight-btn_1kziz_131","copy-link-btn":"_copy-link-btn_1kziz_135","last-update":"_last-update_1kziz_138","loading-overlay":"_loading-overlay_1kziz_144","loading-spinner":"_loading-spinner_1kziz_157"}}]]),H3=Et(ct({__name:"MoreOption",setup(e){return(t,n)=>(j(),Xe(gt,{class:z(t.$style.btnMoreOptions),variant:["secondary","icon"],size:"small"},{default:De(()=>[ye(lt,{src:"EllipsisVertical",source:"remote",size:"16"})]),_:1},8,["class"]))}}),[["__cssModules",{$style:{btnMoreOptions:"_btnMoreOptions_1gxq6_1"}}]]),G3=["src","width","height","alt"],$3=Et(ct({__name:"Visual",props:{src:{},source:{default:"remote"},size:{},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},color:{},ratio:{default:"1/1"}},setup(e){const t=wo,{getCachedValue:n,setCachedValue:i}=ac({dbName:"visual-cache-db",storeName:"visuals"}),s=h=>{if(h!==void 0)return typeof h=="number"?`${h}px`:typeof h=="string"&&/^\d+$/.test(h)?`${h}px`:h},o=e,r=G(()=>({minWidth:s(o.minWidth),maxWidth:s(o.maxWidth),minHeight:s(o.minHeight),maxHeight:s(o.maxHeight),aspectRatio:o.ratio,width:s(o.size)})),a=async h=>{const p=await n(h);if(!(!p||!(p instanceof Blob)))return URL.createObjectURL(p)},l=async(h,p)=>{await i(h,p)},u=G(()=>({name:o.src,size:Number(o.size||100),color:""})),{url:c,loading:d}=cR(u,"visual",l,a);return(h,p)=>ut((j(),Ce("div",{class:z([h.$style.visualWrapper,{[h.$style.loading]:Z(d)}]),style:hn(r.value)},[me("img",{src:Z(c),width:e.size,height:e.size,alt:"visual-"+e.src,style:hn(r.value)},null,12,G3)],6)),[[Z(t),{isLoading:Z(d),type:"skeleton",size:"cover",fullwidth:!0}]])}}),[["__cssModules",{$style:{visualWrapper:"_visualWrapper_1sro0_1",loading:"_loading_1sro0_8",pulse:"_pulse_1sro0_1"}}]]),W3=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))},jF=e=>{if(!e)return null;const t=new Date(e);return isNaN(t.getTime())?null:t},z3=e=>Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0)),KF=(e,t)=>{var i,s,o;const n={id:e.id,name:e.name,assignees:void 0,status:e.template_flow_status,dateRange:[jF(e.start_date),jF(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"+((s=e.last_updated_by)==null?void 0:s.map(r=>r.display_name).join(", ")):"",value:$v(e.updated_at,"MMM dd, yyyy | HH:mm",t)||""},completedOn:{tooltip:e.due_date?$v(e.due_date,"MMM dd, yyyy | HH:mm",t)||"":"Pending completion",value:$v(e.due_date,"MMM dd",t)||""},isDeleted:!1,isArchived:((o=e.property)==null?void 0:o.is_archived)===1||e.status==0};return z3(n)},jv=e=>e.toLowerCase().trim(),U3=e=>jv(e).split(/\s+/).filter(Boolean),qF=e=>e.replace(/(ing|ed|s)$/i,""),YF={headphone:["headphones","headset"],sofa:["couch"],couch:["sofa"],run:["running","runner"]};function j3(e){const t=new Set;for(const n of e){const i=qF(n);if(t.add(i),t.add(n),YF[i])for(const s of YF[i])t.add(qF(s))}return Array.from(t)}function K3(e,t){const n=jv(e),i=j3(U3(t));let s=0;for(const o of i)o&&(n.includes(o)&&(s+=o.length*2),n.startsWith(o)&&(s+=3));return s}function q3(e,t){const n=o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=t.split(/\s+/).filter(Boolean).map(n);if(!i.length)return e;const s=new RegExp(`(${i.join("|")})`,"ig");return e.replace(s,"<mark>$1</mark>")}const ZF=Object.freeze({delay:[500,0],contentClass:["extra-padding"]}),Y3=ct({name:"ListItem",directives:{tooltip:wn},components:{Icon:lt,Avatar:uc,CustomButton:gt},props:{label:String,value:[String,Number,Object],type:String,selected:Boolean,disabled:Boolean,hover:Boolean,clickable:{type:Boolean,default:!0},danger:Boolean,data:Object,iconName:String,readOnly:{type:Boolean,default:!1}},emits:["click","keydown","update:selected","select"],setup(e,{emit:t,slots:n}){const i=oe(!1),s=oe(!1);function o(E){if(!E||typeof E!="object")return!1;const y=E;return typeof y.name=="string"&&typeof y.id=="string"&&typeof y.initial=="string"}const r=G(()=>e.type==="status"||e.type==="assignee"||e.type==="icon"||!!n.prefix),a=G(()=>!!n.suffix||e.danger&&i.value),l=G(()=>e.disabled||!e.clickable?-1:0),u=G(()=>{var E;return e.type==="status"&&typeof((E=e.data)==null?void 0:E.color)=="string"?{backgroundColor:e.data.color,border:jm(e.data.color,"white")?"1px solid #ccc":"1px solid #fff"}:{}}),c=Sh(),d=G(()=>({[c.active]:e.selected??!1,[c.disabled]:e.disabled??!1,[c.hover]:e.hover??!1,[c.clickable]:(e.clickable??!0)&&!e.disabled,[c.danger]:e.danger??!1,[c["has-prefix"]]:r.value,[c["has-suffix"]]:a.value,[c.readOnly]:e.readOnly})),h=G(()=>({content:"Cancel",...ZF})),p=G(()=>({content:"Confirm",theme:"warning",...ZF}));function g(E){return{name:E.name,initial:E.initial,id:E.id,profile_image:E.profile_image??null,color:E.color,size:24}}function C(){i.value=!1}function v(E){E&&t("click",E),(e.clickable??!0)&&(t("update:selected",!e.selected),t("select",!e.selected))}function S(E){if(!e.disabled){if(e.danger&&!i.value){i.value=!0;return}e.danger||v(E)}}function R(E){if(t("keydown",E),!e.disabled)if(E.key==="Enter"||E.key===" "){E.preventDefault();const y=new MouseEvent("click",{bubbles:!0,cancelable:!0});S(y)}else E.key==="Escape"&&i.value&&(E.preventDefault(),C())}return{isConfirming:i,isUserInformation:o,hasPrefix:r,hasSuffix:a,computedTabindex:l,computedStatusStyle:u,classes:d,cancelTooltip:h,confirmTooltip:p,getAvatarProps:g,handleCancel:C,executeAction:v,onClick:S,onKeydown:R,isHovered:s}}}),Z3={"list-item":"_list-item_1krkg_1",disabled:"_disabled_1krkg_14",danger:"_danger_1krkg_17","has-prefix":"_has-prefix_1krkg_20","has-suffix":"_has-suffix_1krkg_20",clickable:"_clickable_1krkg_34",readOnly:"_readOnly_1krkg_37",hover:"_hover_1krkg_41",active:"_active_1krkg_47","list-item__prefix":"_list-item__prefix_1krkg_72","list-item__label":"_list-item__label_1krkg_80","list-item__suffix":"_list-item__suffix_1krkg_94","status-indicator":"_status-indicator_1krkg_101","item-icon":"_item-icon_1krkg_107","arbo-icon-state":"_arbo-icon-state_1krkg_112","item-avatar":"_item-avatar_1krkg_115","confirm-action":"_confirm-action_1krkg_124"},J3=["tabindex"];function X3(e,t,n,i,s,o){const r=Ug("Icon"),a=Ug("Avatar"),l=Ug("CustomButton"),u=wS("tooltip");return j(),Ce("div",{class:z([e.$style["list-item"],e.classes]),role:"listitem",tabindex:e.computedTabindex,onClick:t[0]||(t[0]=Ut((...c)=>e.onClick&&e.onClick(...c),["stop","prevent"])),onKeydown:t[1]||(t[1]=(...c)=>e.onKeydown&&e.onKeydown(...c)),onMouseenter:t[2]||(t[2]=c=>e.isHovered=!0),onMouseleave:t[3]||(t[3]=c=>e.isHovered=!1)},[e.hasPrefix?(j(),Ce("div",{key:0,class:z(e.$style["list-item__prefix"])},[vt(e.$slots,"prefix",{},()=>[e.type==="icon"&&e.iconName?(j(),Xe(r,{key:0,src:e.iconName,source:"remote",class:z(e.$style["item-icon"]),size:16},null,8,["src","class"])):e.type==="status"?(j(),Ce("div",{key:1,class:z(e.$style["status-indicator"]),style:hn(e.computedStatusStyle)},null,6)):e.type==="assignee"&&e.isUserInformation(e.data)?(j(),Xe(a,fn({key:2},e.getAvatarProps(e.data),{class:e.$style["item-avatar"],readOnly:!0}),null,16,["class"])):at("",!0)])],2)):at("",!0),me("div",{class:z(e.$style["list-item__label"])},[vt(e.$slots,"label",{selected:e.selected},()=>[bt(yt(e.label),1)])],2),e.hasSuffix?(j(),Ce("div",{key:1,class:z(e.$style["list-item__suffix"])},[vt(e.$slots,"suffix",{item:e.$props,hovered:e.isHovered},()=>[e.danger&&e.isConfirming?(j(),Ce("div",{key:0,class:z(e.$style["confirm-action"])},[ut((j(),Xe(l,{variant:["secondary","icon"],size:"small",onClick:Ut(e.handleCancel,["stop","prevent"])},{default:De(()=>[ye(r,{src:"Xmark",source:"remote",size:12})]),_:1},8,["onClick"])),[[u,e.cancelTooltip]]),ut((j(),Xe(l,{variant:["danger","primary","icon"],size:"small",onClick:Ut(e.executeAction,["stop","prevent"])},{default:De(()=>[ye(r,{src:"Check",source:"remote",size:12})]),_:1},8,["onClick"])),[[u,e.confirmTooltip]])],2)):at("",!0)])],2)):at("",!0)],42,J3)}const xc=Et(Y3,[["render",X3],["__cssModules",{$style:Z3}]]),zs=Et(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,s=DS(),o=Sh(),r=oe(null),a=oe("default"),l=G(()=>{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"}}),u=G(()=>`${Math.max(50,Math.round(Math.random()*100))}%`),c=G(()=>({[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})),d=G(()=>{let p=0,g=0;s.prefix&&(p=s.prefix({}).length),s.suffix&&(g=s.suffix({}).length);const C="var(--icon-size)",v=(p+g)*8;return p&&!g?`repeat(${p}, ${C}) calc(100% - ${p} * ${C} - ${v}px )`:!p&&g?`calc(100% - ${g} * ${C} - ${v}px ) repeat(${g}, ${C})`:p&&g?`repeat(${p}, ${C}) calc(100% - ${p} * ${C} - ${g} * ${C} - ${v}px ) repeat(${g}, ${C})`:"100%"}),h=p=>{a.value=p};return t({rootEl:r,updateState:h,componentState:a}),(p,g)=>(j(),Ce("div",{ref_key:"rootEl",ref:r,class:z([Z(o)["display-wrapper"],c.value]),style:hn({"--grid-template":d.value,"--wrapper-size":l.value,"--loading-overlay-width":u.value})},[vt(p.$slots,"prefix"),vt(p.$slots,"default",{updateComponentState:h,disabled:i.disabled}),vt(p.$slots,"suffix")],6))}}),[["__cssModules",{$style:{"display-wrapper":"_display-wrapper_6fnqw_1",readOnly:"_readOnly_6fnqw_23",disabled:"_disabled_6fnqw_23",error:"_error_6fnqw_23",hovered:"_hovered_6fnqw_23",active:"_active_6fnqw_27",clickable:"_clickable_6fnqw_32",suffix:"_suffix_6fnqw_38",prefix:"_prefix_6fnqw_39"}}]]),Q3=["value","placeholder","disable","readonly"],JF=Et(ct({__name:"InputText",props:{modelValue:{},placeholder:{},focused:{type:Boolean},validatorFnc:{type:Function},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:modelValue","input","clear","enter","blur"],setup(e,{expose:t,emit:n}){const i=wn,s=e,o=n,r=oe(null),a=G(()=>{var R,E;return((R=s==null?void 0:s.modelValue)==null?void 0:R.length)&&((E=s==null?void 0:s.modelValue)==null?void 0:E.length)>0}),l=To(R=>{if(s.disabled||s.readOnly){R.preventDefault();return}const E=R.target;o("update:modelValue",E.value),o("input",E.value)},300),u=R=>{if(s.disabled||s.readOnly){R.preventDefault();return}o("update:modelValue",""),o("clear"),In(()=>{var E;(E=r.value)==null||E.focus()})},c=To(R=>{R.key==="Escape"&&a.value&&u(R),R.key==="Enter"&&(R.preventDefault(),R.stopImmediatePropagation(),R.stopPropagation(),o("input",(s==null?void 0:s.modelValue)||""),o("enter",(s==null?void 0:s.modelValue)||""))},300),d=`input-text-${Math.random().toString(36).substr(2,9)}`,h=oe(!1);wt(()=>s.modelValue,R=>{s.validatorFnc?h.value=!!R&&!s.validatorFnc(R):h.value=!1});const p=oe(null),g=G(()=>({disabled:s.disabled,readOnly:s.readOnly,error:h.value,inputRef:r,clickable:!(s.disabled||s.readOnly),focused:s.focused,wrapperRef:p})),{argsMain:C,isHover:v,isFocus:S}=Ws(g);return t({focus:()=>{var R;(R=r.value)==null||R.focus()}}),(R,E)=>(j(),Ce("div",{class:z(R.$style["input-wrapper"])},[ye(zs,fn(Z(C),{ref_key:"wrapperRef",ref:p,class:R.$style["input-box"]}),{suffix:De(()=>[a.value&&(Z(v)||Z(S))&&!s.disabled&&!s.readOnly?vt(R.$slots,"clear",{key:0},()=>[ut((j(),Xe(gt,{variant:["icon"],"aria-label":"Clear search",onClick:Ut(u,["stop"]),size:16,rounded:!0},{default:De(()=>[ye(lt,{class:z([R.$style["cs-icon"]]),src:"XMarkSolid",size:"8",color:"white"},null,8,["class"])]),_:1})),[[Z(i),{content:"Clear",contentClass:"extra-padding"}]])]):vt(R.$slots,"suffix",{key:1})]),default:De(()=>[me("input",{ref_key:"inputRef",ref:r,type:"text",value:e.modelValue,placeholder:e.placeholder,class:z([R.$style["column-config__input"]]),id:d,disable:e.disabled,readonly:e.readOnly,onInput:E[0]||(E[0]=(...y)=>Z(l)&&Z(l)(...y)),onKeypress:E[1]||(E[1]=(...y)=>Z(c)&&Z(c)(...y))},null,42,Q3)]),_:3},16,["class"]),h.value?vt(R.$slots,"error",{key:0}):at("",!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"}}]]),Kv=Et(ct({__name:"SearchBox",props:{modelValue:{default:""},placeholder:{default:"Search..."},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:modelValue","search","clear"],setup(e,{emit:t}){const n=e,i=t;oe(null);const s=G(()=>n.modelValue.length>0),o=To(a=>{i("update:modelValue",a),i("search",a)},300),r=oe(n.modelValue);return`${Math.random().toString(36).substr(2,9)}`,(a,l)=>(j(),Xe(JF,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),placeholder:e.placeholder,onInput:Z(o)},{suffix:De(()=>[s.value?at("",!0):(j(),Xe(lt,{key:0,src:"MagnifyingGlass",class:z(a.$style.icon),size:"12",color:"#a6a6a6"},null,8,["class"]))]),_:1},8,["modelValue","placeholder","onInput"]))}}),[["__cssModules",{$style:{"search-box":"_search-box_91c6g_1",icon:"_icon_91c6g_17"}}]]),e4=["innerHTML"],t4=10,qv=Et(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"],setup(e,{expose:t,emit:n}){const i=wn,s={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape"},o=e,r=n,a=oe(""),l=oe(-1),u=oe(null),c=oe(null),d=G(()=>jv(a.value)),h=G(()=>!d.value||d.value.length<o.minQueryLength?o.options:o.options.map(L=>({item:L,score:K3(L.label,d.value)})).filter(({score:L})=>L>0).sort((L,$)=>$.score-L.score).map(({item:L})=>L)),p=G(()=>h.value.length>0),g=G(()=>!p.value&&a.value.trim().length>0&&!o.loading),C=G(()=>o.options.length===0&&!o.loading&&!o.error),v=G(()=>o.loading),S=G(()=>o.hasMore&&!o.loading&&!o.loadingMore),R=To(L=>{a.value=L,l.value=0,r("search",L)},Fc),E=L=>a.value?q3(L,a.value):L,y=L=>{const re={[s.ARROW_DOWN]:()=>b(L),[s.ARROW_UP]:()=>F(L),[s.ENTER]:()=>I(L),[s.ESCAPE]:()=>M(L)}[L.key];re&&re()},b=L=>{L.preventDefault(),x(1)},F=L=>{L.preventDefault(),x(-1)},x=L=>{const $=h.value.length;$!==0&&(L>0?l.value=(l.value+1)%$:l.value=l.value>0?l.value-1:$-1,V())},V=()=>{In(()=>{var $;const L=($=c.value)==null?void 0:$.querySelectorAll(".list-item")[l.value];L==null||L.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})},I=L=>{if(L.preventDefault(),l.value>=0&&l.value<h.value.length){const re=h.value[l.value];P(re)}},M=L=>{L.preventDefault(),ie()},P=L=>{L.disabled||(r("select",L),l.value=-1,ie())},N=L=>{l.value=L},ie=()=>{r("close")},ve=()=>{if(!S.value||!c.value)return;const{scrollTop:L,clientHeight:$,scrollHeight:re}=c.value;re-(L+$)<=t4&&r("loadMore")},Be=()=>{var L,$;(L=c.value)==null||L.addEventListener("scroll",ve),($=u.value)==null||$.addEventListener("keydown",y)},ee=()=>{var L,$;(L=c.value)==null||L.removeEventListener("scroll",ve),($=u.value)==null||$.removeEventListener("keydown",y)};Kn(()=>{Be()}),pi(()=>{ee()}),wt(()=>o.loading,L=>{!L&&h.value.length>0&&(l.value=0)}),t({query:a,filteredOptions:h,selectedIndex:l,closeDropdown:ie,clearSearch:()=>{a.value=""}});const U=L=>Array.isArray(o.selectedId)?o.selectedId.includes(String(L==null?void 0:L.id)):o.selectedId==L.id;return(L,$)=>(j(),Ce("div",{ref_key:"searchListRef",ref:u,class:z(L.$style["search-list"]),tabindex:"-1",style:hn({width:e.width})},[ye(Kv,{modelValue:a.value,"onUpdate:modelValue":$[0]||($[0]=re=>a.value=re),class:z(L.$style["search-box"]),disabled:e.loading,onSearch:Z(R)},null,8,["modelValue","class","disabled","onSearch"]),me("div",{ref_key:"popupRef",ref:c,class:z(L.$style["list-container"]),style:hn({maxHeight:e.maxHeight})},[vt(L.$slots,"extra-item"),(j(!0),Ce(At,null,yn(h.value,(re,Ae)=>(j(),Ce("div",{key:`${re.id}-${Ae}`},[vt(L.$slots,"item",{item:re,index:Ae,selectedIndex:l.value,isSelected:U,handleSelect:P,handleItemHover:N,getHighlightedLabel:E,query:a.value,idx:Ae},()=>[ye(xc,fn({ref_for:!0},re,{hover:Ae===l.value,selected:U(re),type:re.type,onClick:Ut(Ie=>P(re),["stop","prevent"]),onMouseover:Ie=>N(Ae)}),{prefix:De(()=>[vt(L.$slots,"prefix-item",{item:re})]),label:De(()=>[a.value?ut((j(),Ce("span",{key:0,class:z(L.$style.match),innerHTML:E(re.label)},null,10,e4)),[[Z(i),{content:re.label}]]):ut((j(),Ce("span",{key:1,class:z(L.$style["item-label"])},[bt(yt(re.label),1)],2)),[[Z(i),{content:re.label}]])]),suffix:De(({hovered:Ie})=>[vt(L.$slots,"action",{item:re,isHovered:Ae===l.value,hovered:Ie,selected:l.value==Ae})]),_:2},1040,["hover","selected","type","onClick","onMouseover"])])]))),128)),e.loadingMore||v.value?(j(),Ce("div",{key:0,class:z(L.$style["loading-more"])},[vt(L.$slots,"loading-more",{},()=>[me("div",{class:z(L.$style["loading-skeleton"])},null,2),me("div",{class:z(L.$style["loading-skeleton"])},null,2)])],2)):g.value?(j(),Ce("div",{key:1,class:z(L.$style["no-results"])},[vt(L.$slots,"empty",{query:a.value},()=>[me("div",{class:z(L.$style["no-results-content"])},[...$[1]||($[1]=[me("p",null,[bt(" No results. "),me("br"),bt(" Try another search. ")],-1)])],2)])],2)):C.value?(j(),Ce("div",{key:2,class:z(L.$style["no-results"])},[vt(L.$slots,"empty-list",{},()=>[me("div",{class:z(L.$style["no-results-content"])},[...$[2]||($[2]=[me("p",null,"No items available.",-1)])],2)])],2)):e.error?(j(),Ce("div",{key:3,class:z(L.$style["error-state"])},[vt(L.$slots,"error",{error:e.error},()=>[me("div",{class:z(L.$style["error-content"])},[me("span",{class:z(L.$style["error-icon"])},"⚠️",2),me("span",{class:z(L.$style["error-message"])},yt(e.error),3)],2)])],2)):at("",!0),vt(L.$slots,"footer")],6)],6))}}),[["__cssModules",{$style:{"search-list":"_search-list_1wb07_1","search-box":"_search-box_1wb07_9","list-container":"_list-container_1wb07_14","item-label":"_item-label_1wb07_33","loading-state":"_loading-state_1wb07_41","loading-more":"_loading-more_1wb07_42","loading-skeleton":"_loading-skeleton_1wb07_53",shimmer:"_shimmer_1wb07_1","loading-spinner":"_loading-spinner_1wb07_64",spinner:"_spinner_1wb07_71",spin:"_spin_1wb07_71","no-results":"_no-results_1wb07_86","no-results-content":"_no-results-content_1wb07_93",title:"_title_1wb07_96",tips:"_tips_1wb07_102","error-state":"_error-state_1wb07_116","error-content":"_error-content_1wb07_122","error-icon":"_error-icon_1wb07_129","error-message":"_error-message_1wb07_132",match:"_match_1wb07_136"}}]]),n4=["innerHTML"],XF=20,QF=Et(ct({__name:"AssigneeGroupEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},ids:{}},emits:["updated"],setup(e,{expose:t,emit:n}){const i=wn,s=e,o=WE,r=U=>{const L=U.data;return{name:String((L==null?void 0:L.display_name)??"Unknown"),initial:String((L==null?void 0:L.initial)??"U"),id:String(U.id),profile_image:(L==null?void 0:L.profile_image)??null,color:(L==null?void 0:L.color)??{bgColor:"#CCCCCC",textColor:"#FFFFFF"},size:24,isUseShortLabel:!0}},{id:a}=kg(s),l=n,u=U=>{var $,re;const L=(re=($=s.params)==null?void 0:$.api)==null?void 0:re.getRowNode(String(a.value));L==null||L.setDataValue("assignees",hW(U.assignees)),l("updated",U)},c=oe(!1),d=oe(!1),h=oe(null),p=oe(1),g=oe(!0),C=oe(0),v=oe(""),{isSubmitting:S,unAssignAll:R,replaceAssignees:E,handleSelect:y,assigneeList:b,mergedOptions:F,selectedUserIds:x}=Sz({...s,updateRowData:u,value:s.value}),V=Ri("bulkUpdate",!1),{apiServices:I}=Gs(!V,s),M=Ri("workspaceId"),P=async(U=1,L="",$=!1)=>{var re,Ae,Ie,Ve,ot;if(!I.value||!s.id&&!s.ids)throw console.error("API service or item identifiers are undefined"),new Error("API service or item identifiers are undefined");if($?d.value=!0:c.value=!0,h.value=null,!((re=I.value)!=null&&re.getAssignableUsers))throw new Error("API service getAssignableUsers is undefined");try{const tt=s.id?await((Ae=I.value)==null?void 0:Ae.getAssignableUsers({workspaceId:String(M),itemId:String(s.id),page:U,perPage:XF,q:L.trim()})):await((Ie=I.value)==null?void 0:Ie.multipleAssignableUser({workspaceId:String(M),itemIds:s.ids||[],page:U,perPage:XF,q:L.trim()})),ht=((Ve=tt.data)==null?void 0:Ve.map(lD))??[];b.value=$?Xh(b.value,ht,"id"):ht,C.value=((ot=tt.meta)==null?void 0:ot.total)??0,g.value=b.value.length<C.value,p.value=U}catch(tt){console.error("Error fetching assignable users:",tt),h.value="Failed to load assignable users"}finally{c.value=!1,d.value=!1}},N=()=>{!d.value&&g.value&&P(p.value+1,v.value,!0)},ie=To(async U=>{v.value=U,await P(1,U,!1)},Fc),ve=()=>P(1,v.value,!1),Be=G(mf);Kn(()=>P(1)),t({getValue:()=>{var U;return(U=F.value.find(L=>L.selected))==null?void 0:U.value},refresh:ve,clearInternal:()=>{x.value=[]}});const ee=()=>{const U=sessionStorage.getItem("BASE_URL"),L=gs({type:"access_setting",config:{baseDomain:U,ws_code:s.workspaceId,entity_id:M}}).url;window.open(L,"_blank")};return(U,L)=>(j(),Xe(qv,fn({"selected-id":Z(x)},{...s},{options:Z(F),loading:c.value,ref:"popupRef","loading-more":d.value,"has-more":g.value,onSelect:Z(y),onSearch:Z(ie),onLoadMore:N}),SS({"extra-item":De(()=>[ye(gt,{variant:"menu-item",onHandleClick:Z(R)},{prefix:De(()=>[me("div",{class:z(U.$style["unassign-icon"])},[ye(lt,{src:"UserXMark",source:"remote",size:"12"})],2)]),default:De(()=>[L[0]||(L[0]=bt(" Unassign all ",-1))]),_:1},8,["onHandleClick"])]),item:De(({item:$,selectedIndex:re,isSelected:Ae,handleSelect:Ie,handleItemHover:Ve,getHighlightedLabel:ot,query:tt,idx:ht})=>[ye(xc,fn($,{hover:ht===re,selected:Ae($),type:$.type,onClick:Ut(xt=>Ie($),["stop","prevent"]),onMouseover:xt=>Ve(ht),class:U.$style["item-assignee"]}),{prefix:De(()=>[ut(ye(uc,Wd(Wu(r($))),null,16),[[Z(o),{user:$.data,status:"online",timezone:Be.value,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0}]])]),label:De(({selected:xt})=>[tt?ut((j(),Ce("span",{key:0,class:z([U.$style["item-label"],U.$style.match]),style:{flex:"1"},innerHTML:ot($.label)},null,10,n4)),[[Z(i),{content:$.label}]]):ut((j(),Ce("span",{key:1,class:z(U.$style["item-label"]),style:{flex:"1"}},[bt(yt($.label),1)],2)),[[Z(i),{content:$.label}]]),me("div",{class:z(U.$style["item-action"])},[ut((j(),Xe(gt,{variant:["icon","tertiary"],size:24,highlightOnHover:!0,disabled:Z(S),onClick:Ut(qt=>Ie($),["stop","prevent"])},{prefix:De(()=>[ye(lt,{src:xt?"UserMinus":"UserPlus",source:"remote",size:"12"},null,8,["src"])]),_:2},1032,["disabled","onClick"])),[[Z(i),xt?"Unassign":"Assign"]]),ut((j(),Xe(gt,{variant:["icon","tertiary"],size:24,highlightOnHover:!0,disabled:Z(S),onClick:Ut(qt=>{var Je;return Z(E)((Je=$.data)==null?void 0:Je.id)},["stop","prevent"])},{prefix:De(()=>[ye(lt,{src:"IdCardClip",source:"remote",size:"12"})]),_:1},8,["disabled","onClick"])),[[Z(i),"Unassign others and reassign"]])],2)]),_:2},1040,["hover","selected","type","onClick","onMouseover","class"])]),"empty-list":De(()=>[me("div",{class:z(U.$style["empty-state"])},[L[3]||(L[3]=bt(" No assignee available. ",-1)),L[4]||(L[4]=me("br",null,null,-1)),ye(gt,{onClick:ee,variant:["text","tertiary"],size:"small"},{default:De(()=>[...L[2]||(L[2]=[bt(" Go to Access Settings to add team. ",-1)])]),_:1})],2)]),_:2},[h.value?{name:"error",fn:De(()=>[me("div",{class:z(U.$style["error-message"])},[bt(yt(h.value)+" ",1),ye(gt,{onClick:ve,size:"small"},{default:De(()=>[...L[1]||(L[1]=[bt(" Retry ",-1)])]),_:1})],2)]),key:"0"}:void 0]),1040,["selected-id","options","loading","loading-more","has-more","onSelect","onSearch"]))}}),[["__cssModules",{$style:{action:"_action_11it2_1","item-assignee":"_item-assignee_11it2_6","item-action":"_item-action_11it2_6","item-label":"_item-label_11it2_14","unassign-icon":"_unassign-icon_11it2_23","error-message":"_error-message_11it2_34","empty-state":"_empty-state_11it2_44"}}]]),i4={ref:"triggerRef"},s4={ref:"popupRef",style:{display:"none"}},o4=ct({__name:"AssignneeUpdateButton",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},ids:{},variant:{}},emits:["update"],setup(e,{emit:t}){const n=e,{isVisible:i}=$s();qr("bulkUpdate",!0);const s=t,o=oe(null),r=a=>{var l;s("update",a),(l=o.value)==null||l.clearInternal()};return wt(()=>i,a=>{var l;a&&((l=o.value)==null||l.clearInternal())}),(a,l)=>(j(),Ce("div",null,[me("div",i4,[ye(gt,{class:"action-button",variant:n.variant},{default:De(()=>[ye(lt,{src:"UserPlus",class:"icon",size:"14"}),l[0]||(l[0]=bt(" Assignee ",-1))]),_:1},8,["variant"])],512),me("div",s4,[ye(QF,fn({ref_key:"assigneeGroupEditorRef",ref:o},n,{ids:e.ids,onUpdated:r}),null,16,["ids"])],512)]))}}),eT=Et(ct({__name:"DropdownWrapper",props:{placement:{default:"bottom-start"},show:{type:Boolean,default:!1}},setup(e,{expose:t}){const{hide:n,triggerRef:i,popupRef:s,isVisible:o}=$s(),r=G(()=>o.value),a=()=>{n()};return t({closeDropdown:a,isOpen:r}),(l,u)=>(j(),Ce("div",{ref_key:"triggerRef",ref:i,class:z(l.$style["dropdown-wrapper"])},[vt(l.$slots,"trigger",{open:Z(o)},()=>[me("button",{class:z(l.$style["editable-dropdown__trigger"]),"aria-label":"Select or type"}," ▼ ",2)]),me("div",{ref_key:"popupRef",ref:s,class:z(l.$style["dropdown-content"]),style:{display:"none"}},[vt(l.$slots,"content",{closeDropdown:a},()=>[me("div",{class:z(l.$style["dropdown-list"])},null,2)])],2)],2))}}),[["__cssModules",{$style:{"dropdown-wrapper":"_dropdown-wrapper_fk5uk_1","dropdown-content":"_dropdown-content_fk5uk_5","dropdown-list":"_dropdown-list_fk5uk_9"}}]]),r4=["aria-label"],a4=["disabled","readOnly","aria-label","data-date","data-weekday","tabindex","onClick"],l4=Et(ct({__name:"MainCalendar",props:FS({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:!0},disabled:{type:Boolean},readOnly:{type:Boolean},disableConfirm:{type:Boolean,default:!1}},{tracingCase:{default:()=>({case:"",behavior:""})},tracingCaseModifiers:{}}),emits:FS(["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=G(()=>n.startDate&&n.endDate),s=YM(e,"tracingCase"),o=t,r=oe(n.year),a=oe(n.month);wt(()=>[n.year,n.month],([ee,U])=>{r.value=ee,a.value=U});const l=G(()=>qe.fromObject({year:r.value,month:a.value,day:1},{zone:n.timezone}).setLocale(n.locale||"en-US").toFormat("LLLL yyyy")),u=G(()=>qe.now().setZone(n.timezone)),c=G(()=>n.startDate?qe.fromJSDate(n.startDate,{zone:n.timezone}):null),d=G(()=>n.endDate?qe.fromJSDate(n.endDate,{zone:n.timezone}):null),h=oe(c.value),p=oe(d.value),g=oe(c.value),C=oe(d.value);wt([c,d],()=>{n.requireConfirm||(h.value=c.value,p.value=d.value,g.value=c.value,C.value=d.value)},{immediate:!0});const v=G(()=>n.requireConfirm?h.value:c.value),S=G(()=>n.requireConfirm?p.value:d.value);wt(()=>n.activeField,ee=>{const U=ee==="start"?v.value:S.value;U&&(r.value=U.year,a.value=U.month)}),wt(()=>{var ee,U;return[(ee=v.value)==null?void 0:ee.toISODate(),(U=S.value)==null?void 0:U.toISODate(),n.activeField]},()=>{const ee=n.activeField==="start"?v.value:S.value;ee&&(ee.year!==r.value||ee.month!==a.value)&&(r.value=ee.year,a.value=ee.month)});function R(ee){return ee.setZone("utc")}const E=oe("");function y(ee){E.value=ee.toISODate()||"",In(()=>{const U=document.querySelector(`.arbo-calendar-day[data-date="${E.value}"]`);U==null||U.focus()})}wt(()=>{var ee,U;return[r.value,a.value,n.activeField,(ee=v.value)==null?void 0:ee.toISODate(),(U=S.value)==null?void 0:U.toISODate()]},()=>{const ee=n.activeField==="start"?v.value:S.value;let U;ee&&ee.year===r.value&&ee.month===a.value?U=ee:v.value&&v.value.year===r.value&&v.value.month===a.value?U=v.value:U=u.value,y(U)});function b(ee){return ee.toFormat("d")}const F=G(()=>{const ee=qe.fromObject({year:r.value,month:a.value,day:1},{zone:n.timezone}),U=ee.weekday,L=n.weekStart===1?(U+6)%7:U%7;let $=ee.minus({days:L});const re=[],Ae=Fl.weekdays(n.weekdayLabelStyle||"short",{locale:n.locale||"en-US"}),Ie=Sh();for(let ot=0;ot<42;ot++){const tt=[];$.month!==a.value&&tt.push(Ie["is-outside"]),$.hasSame(u.value,"day")&&tt.push(Ie["is-today"]),v.value&&$.hasSame(v.value,"day")&&tt.push(Ie["is-selected-start"]),S.value&&$.hasSame(S.value,"day")&&tt.push(Ie["is-selected-end"]),v.value&&S.value&&$>v.value&&$<S.value&&tt.push(Ie["is-in-range"]);const ht=b($),xt=Ae[$.weekday-1]||"";re.push({dt:$,iso:$.toISODate()||"",label:$.toFormat("d"),displayLabel:ht,weekdayLabel:xt,aria:$.setLocale(n.locale||"en-US").toFormat("cccc, d LLLL yyyy"),classes:tt}),$=$.plus({days:1})}const Ve=[];for(let ot=0;ot<6;ot++)Ve.push(re.slice(ot*7,ot*7+7));return Ve}),x=G(()=>{const ee=Fl.weekdays(n.weekdayLabelStyle||"short",{locale:n.locale||"en-US"});return n.weekStart===1?ee:[ee[6],...ee.slice(0,6)]});function V(ee,U,L){const $=ee==="start"?U.startOf("day"):U.endOf("day"),re=R($),Ae={year:$.year,month:$.month,day:$.day,utc:re.toISO()||""};ee==="start"?(o("select-start",Ae,L??!0),o("select-start-utc",Ae.utc)):(o("select-end",Ae),o("select-end-utc",Ae.utc))}function I(ee){let U=r.value,L=a.value+ee;for(;L<1;)L+=12,U-=1;for(;L>12;)L-=12,U+=1;r.value=U,a.value=L,o("update:year",U),o("update:month",L)}function M(ee){const L=(E.value?qe.fromISO(E.value,{zone:n.timezone}):u.value).plus({days:ee});(L.month!==a.value||L.year!==r.value)&&(a.value=L.month,r.value=L.year,o("update:year",L.year),o("update:month",L.month)),y(L)}function P(ee=!1){const L=(E.value?qe.fromISO(E.value,{zone:n.timezone}):u.value).weekday%7,$=ee?6-L:-L;M($)}function N(ee){switch(ee.key){case"ArrowLeft":ee.preventDefault(),M(-1);break;case"ArrowRight":ee.preventDefault(),M(1);break;case"ArrowUp":ee.preventDefault(),M(-7);break;case"ArrowDown":ee.preventDefault(),M(7);break;case"Home":ee.preventDefault(),P(!1);break;case"End":ee.preventDefault(),P(!0);break;case"PageUp":ee.preventDefault(),I(ee.shiftKey?-12:-1);break;case"PageDown":ee.preventDefault(),I(ee.shiftKey?12:1);break;case"Enter":case" ":{ee.preventDefault();const U=E.value?qe.fromISO(E.value,{zone:n.timezone}):u.value,L=F.value.flat().find($=>$.iso===U.toISODate());L&&ie(L);break}}}function ie(ee){var Je,Cn;const U=!!c.value,L=!!d.value,$=n.activeField,re=((Je=c.value)==null?void 0:Je.toISODate())||"null",Ae=((Cn=d.value)==null?void 0:Cn.toISODate())||"null",Ie=ee.dt.toISODate()||"",Ve=(Wt,_t)=>{s.value={case:Wt,behavior:_t}},ot=()=>`Selected start ${Ie} > existing end ${Ae} -> reset both to ${Ie}`,tt=()=>`Selected end ${Ie} < existing start ${re} -> reset both to ${Ie}`,ht=()=>{V("start",ee.dt,!0),V("end",ee.dt),o("update:activeField","end")},xt=(Wt=!1)=>{V("start",ee.dt,Wt),Wt&&o("update:activeField","end")},qt=(Wt=!1)=>{console.trace("doSelectEnd called with closeAfter:",Wt,n.immediatelyUpdate),V("end",ee.dt),Wt&&o("close")};if(U&&L){$==="start"?d.value&&ee.dt>d.value?(ht(),Ve("INVERT_RANGE_FROM_START",ot())):(xt(!1),Ve("UPDATE_START_IN_RANGE",`Updated start from ${re} to ${Ie}; end remains ${Ae}`)):c.value&&ee.dt<c.value?(ht(),Ve("INVERT_RANGE_FROM_END",tt())):(qt(!1),Ve("UPDATE_END_IN_RANGE",`Updated end from ${Ae} to ${Ie}; start remains ${re}`));return}if(!U&&L&&$==="start"&&d.value&&ee.dt>d.value){ht(),Ve("CREATE_RANGE_FROM_LATE_START",ot());return}if(U&&!L&&$==="end"&&c.value&&ee.dt<c.value){ht(),Ve("CREATE_RANGE_FROM_EARLY_END",tt());return}if(!U&&!L){if($==="start"){xt(!0),Ve("INIT_START",`Picked start ${Ie}; awaiting end selection`);return}qt(n.immediatelyUpdate),Ve("INIT_END",`Picked end ${Ie}; awaiting start selection`);return}if(!U&&L){if($==="start"){xt(!0),Ve("FILL_MISSING_START",`Inserted start ${Ie}; existing end ${Ae}`);return}qt(!1),Ve("STRICT_UPDATE_END_ONLY",`Updated end to ${Ie}; start still null`);return}if(U&&!L){if($==="start"){xt(!0),Ve("RESELECT_START_BEFORE_END",`Replaced start with ${Ie}; end still null, switching to end`);return}qt(n.immediatelyUpdate),Ve("FILL_MISSING_END",`Picked end ${Ie}; start ${re}`);return}}function ve(){g.value=h.value,C.value=p.value,o("confirm")}function Be(){h.value=g.value,p.value=C.value,o("cancel")}return(ee,U)=>(j(),Ce("div",{class:z([ee.$style["arbo-calendar"],{[ee.$style["arbo-date-range-picker"]]:i.value}]),role:"grid","aria-label":l.value,tabindex:"0",onKeydown:N},[me("div",{class:z([ee.$style["arbo-calendar-header"],ee.$style["arbo-calendar-week"]]),role:"row"},[(j(!0),Ce(At,null,yn(x.value,L=>(j(),Ce("div",{key:L,class:z(ee.$style["arbo-calendar-weekday"]),role:"columnheader"},yt(L),3))),128))],2),me("div",{class:z(ee.$style["arbo-calendar-weeks"])},[(j(!0),Ce(At,null,yn(F.value,(L,$)=>(j(),Ce("div",{key:$,class:z(ee.$style["arbo-calendar-week"]),role:"row"},[(j(!0),Ce(At,null,yn(L,re=>(j(),Ce("div",{key:re.iso,class:z([ee.$style["arbo-calendar-day"],re.classes,{[ee.$style["is-focused"]]:re.iso===E.value}]),disabled:n.disabled,readOnly:n.readOnly,role:"gridcell","aria-label":re.aria,"data-date":re.iso,"data-weekday":re.weekdayLabel,tabindex:re.iso===E.value?0:-1,onClick:Ae=>ie(re)},yt(re.displayLabel),11,a4))),128))],2))),128))],2),n.readOnly?at("",!0):(j(),Ce("div",{key:0,class:z(ee.$style["arbo-calendar-actions"])},[ye(gt,{disabled:n.disabled,readOnly:n.readOnly,variant:"secondary",size:"medium",onClick:Be},{default:De(()=>[bt(yt(n.cancelLabel),1)]),_:1},8,["disabled","readOnly"]),ye(gt,{disabled:n.disabled||n.disableConfirm,readOnly:n.readOnly,variant:"primary",size:"medium",onClick:ve},{default:De(()=>[bt(yt(n.confirmLabel),1)]),_:1},8,["disabled","readOnly"])],2))],42,r4))}}),[["__cssModules",{$style:{"arbo-date-range-picker":"_arbo-date-range-picker_15l55_1","arbo-calendar-day":"_arbo-calendar-day_15l55_2","arbo-calendar-week":"_arbo-calendar-week_15l55_3","arbo-calendar":"_arbo-calendar_15l55_2","arbo-calendar-nav":"_arbo-calendar-nav_15l55_37","arbo-calendar-nav-btn":"_arbo-calendar-nav-btn_15l55_45","arbo-calendar-nav-label":"_arbo-calendar-nav-label_15l55_52","arbo-calendar-weekday":"_arbo-calendar-weekday_15l55_57","arbo-calendar-weeks":"_arbo-calendar-weeks_15l55_62","is-today":"_is-today_15l55_93","is-selected-start":"_is-selected-start_15l55_99","is-outside":"_is-outside_15l55_108","is-selected-end":"_is-selected-end_15l55_108","is-in-range":"_is-in-range_15l55_136","arbo-calendar-actions":"_arbo-calendar-actions_15l55_141","arbo-calendar-btn":"_arbo-calendar-btn_15l55_150",cancel:"_cancel_15l55_159",confirm:"_confirm_15l55_164"}}]]),u4=Et(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=G(()=>{if(n.monthLabels&&n.monthLabels.length===12)return n.monthLabels;const P=n.locale||"en-US",N=n.monthLabelStyle||"short",ie=new Intl.DateTimeFormat(P,{month:N,timeZone:"UTC"});return Array.from({length:12},(Be,ee)=>ie.format(new Date(Date.UTC(2020,ee,1))))}),s=t,o=oe(n.year),r=oe(n.month);wt(()=>n.year,P=>{P!==o.value&&(o.value=P)}),wt(()=>n.month,P=>{P!==r.value&&(r.value=P)});const a=oe("days");function l(P){a.value!==P&&(a.value=P,s("mode-change",P))}const u=G(()=>n.minYear),c=G(()=>n.maxYear),d=G(()=>{const P=n.yearSpan;return o.value-o.value%P}),h=G(()=>d.value+n.yearSpan-1);function p(){const P=n.yearSpan,N=d.value-P;N>=u.value&&(o.value=N)}function g(){const P=n.yearSpan,N=d.value+P;N<=c.value&&(o.value=N)}const C=G(()=>d.value-n.yearSpan<u.value),v=G(()=>h.value+n.yearSpan>c.value),S=G(()=>{const P=n.yearSpan;return Math.ceil(P/3)});function R(P){const ie=d.value+(P-1)*3;return Array.from({length:3},(ve,Be)=>ie+Be).filter(ve=>ve<=h.value)}function E(){a.value==="months"?l("days"):l("months")}function y(){a.value==="years"?l("days"):l("years")}function b(P){o.value=P,s("update:year",P),s("year-selected",P),l("months")}function F(P){r.value=P,s("update:month",P),s("month-selected",P),l("days")}function x(){if(a.value==="days"){let P=o.value,N=r.value-1;if(N<1&&(N=12,P--),P<u.value)return;o.value=P,r.value=N,s("update:year",P),s("update:month",N)}else if(a.value==="months"){if(o.value-1<u.value)return;o.value--,s("update:year",o.value)}else a.value==="years"&&p()}function V(){if(a.value==="days"){let P=o.value,N=r.value+1;if(N>12&&(N=1,P++),P>c.value)return;o.value=P,r.value=N,s("update:year",P),s("update:month",N)}else if(a.value==="months"){if(o.value+1>c.value)return;o.value++,s("update:year",o.value)}else a.value==="years"&&g()}const I=G(()=>a.value==="days"?o.value===u.value&&r.value===1:a.value==="months"?o.value-1<u.value:C.value),M=G(()=>a.value==="days"?o.value===c.value&&r.value===12:a.value==="months"?o.value+1>c.value:v.value);return(P,N)=>(j(),Ce("div",{class:z(P.$style["cal-nav-wrapper"])},[vt(P.$slots,"selection"),me("div",{class:z(P.$style["cal-nav-bar"]),role:"toolbar","aria-label":"Calendar navigation"},[ye(gt,{variant:"secondary",class:z([P.$style["cal-nav-btn"],P.$style.prev]),"aria-label":"Previous",disabled:I.value,label:"",onClick:x},{default:De(()=>[ye(lt,{src:"ChevronLeft",source:"remote",size:"16"})]),_:1},8,["class","disabled"]),me("div",{class:z(P.$style["cal-nav-center"])},[ye(gt,{"aria-pressed":a.value==="months",onClick:E,variant:"secondary"},{default:De(()=>[bt(yt(i.value[r.value-1]),1)]),_:1},8,["aria-pressed"]),ye(gt,{variant:"secondary","aria-pressed":a.value==="years",onClick:y},{default:De(()=>[bt(yt(o.value),1)]),_:1},8,["aria-pressed"])],2),ye(gt,{variant:"secondary",class:z([P.$style["cal-nav-btn"],P.$style.next]),"aria-label":"Next",disabled:M.value,label:"",onClick:V},{default:De(()=>[ye(lt,{src:"ChevronRight",source:"remote",size:"16"})]),_:1},8,["class","disabled"])],2),a.value==="years"?(j(),Ce("div",{key:0,class:z(P.$style["year-grid"]),role:"dialog","aria-label":"Select year"},[me("div",{class:z(P.$style["year-grid-header"])},[ye(gt,{variant:"secondary",class:z([P.$style["cal-nav-btn"],P.$style.prev]),"aria-label":"Next",disabled:C.value,"prefix-icon":"AnglesRight",label:"",onClick:p},{default:De(()=>[ye(lt,{src:"AnglesRight",source:"remote",size:"16",class:z(P.$style["arbo-label__prefix--icon"])},null,8,["class"])]),_:1},8,["class","disabled"]),me("div",{class:z(P.$style["range-label"])},yt(d.value)+" - "+yt(h.value),3),ye(gt,{variant:"secondary",class:z([P.$style["cal-nav-btn"],P.$style.next]),"aria-label":"Next",disabled:v.value,"prefix-icon":"AnglesRight",label:"",onClick:g},{default:De(()=>[ye(lt,{src:"AnglesRight",source:"remote",size:"16",class:z(P.$style["arbo-label__prefix--icon"])},null,8,["class"])]),_:1},8,["class","disabled"])],2),me("div",{class:z(P.$style["year-grid-body"]),role:"grid"},[(j(!0),Ce(At,null,yn(S.value,ie=>(j(),Ce("div",{key:"yr-row-"+ie,class:z(P.$style["year-grid-row"]),role:"row"},[(j(!0),Ce(At,null,yn(R(ie),ve=>(j(),Xe(gt,{key:ve,variant:"secondary",class:z([P.$style["year-cell"],{[P.$style.selected]:ve===o.value}]),role:"gridcell",disabled:ve<u.value||ve>c.value,onClick:Be=>b(ve)},{default:De(()=>[bt(yt(ve),1)]),_:2},1032,["class","disabled","onClick"]))),128))],2))),128))],2)],2)):a.value==="months"?(j(),Ce("div",{key:1,class:z(P.$style["month-grid"]),role:"dialog","aria-label":"Select month"},[me("div",{class:z(P.$style.months),role:"grid"},[(j(!0),Ce(At,null,yn(i.value,(ie,ve)=>(j(),Xe(gt,{disabled:n.disabled,"read-only":n.readOnly,key:ie,variant:"secondary",class:z([P.$style["month-cell"],{[P.$style.selected]:ve+1===r.value}]),role:"gridcell",onClick:Be=>F(ve+1)},{default:De(()=>[bt(yt(ie),1)]),_:2},1032,["disabled","read-only","class","onClick"]))),128))],2)],2)):(j(),Ce("div",{key:2,class:z(P.$style["days-slot"])},[vt(P.$slots,"default",{year:o.value,month:r.value,mode:a.value})],2))],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_14bx8_1","cal-nav-bar":"_cal-nav-bar_14bx8_11","cal-nav-btn":"_cal-nav-btn_14bx8_19","year-grid-header":"_year-grid-header_14bx8_33",prev:"_prev_14bx8_33","cal-nav-center":"_cal-nav-center_14bx8_45","cal-nav-label":"_cal-nav-label_14bx8_51","month-grid":"_month-grid_14bx8_65","year-grid":"_year-grid_14bx8_33",months:"_months_14bx8_78","month-cell":"_month-cell_14bx8_85","pg-btn":"_pg-btn_14bx8_100","year-grid-body":"_year-grid-body_14bx8_113","year-grid-row":"_year-grid-row_14bx8_120","year-cell":"_year-cell_14bx8_126",selected:"_selected_14bx8_134","days-slot":"_days-slot_14bx8_143","range-label":"_range-label_14bx8_147"}}]]);function c4(e){const{format:t="dd/MM/yyyy",timezone:n="local",minDate:i,maxDate:s}=e,o=oe(""),r=G(()=>{const C=qe.fromFormat(o.value,t,{zone:n});return C.isValid?C:null}),a=G(()=>{if(!i||!r.value)return!0;const C={year:i.getFullYear(),month:i.getMonth()+1,day:i.getDate()},v={year:r.value.year,month:r.value.month,day:r.value.day};return v.year>C.year?!0:v.year<C.year?!1:v.month>C.month?!0:v.month<C.month?!1:l(v,C)>=0}),l=(C,v)=>{const S=new Date(C.year,C.month-1,C.day),R=new Date(v.year,v.month-1,v.day);return S<R?-1:S>R?1:0},u=G(()=>{if(!s||!r.value)return!0;const C={year:s.getFullYear(),month:s.getMonth()+1,day:s.getDate()},v={year:r.value.year,month:r.value.month,day:r.value.day};return v.year<C.year?!0:v.year>C.year?!1:v.month<C.month?!0:v.month>C.month?!1:l(v,C)<=0}),c=G(()=>o.value.length==0||o.value.length>0&&r.value!==null&&a.value&&u.value),d=G(()=>o.value.length===t.length&&c.value);return{inputValue:o,isValid:c,isComplete:d,clear:()=>{o.value=""},setDate:C=>{let v;C instanceof Date?v=qe.fromJSDate(C,{zone:n}):v=C.setZone(n),v.isValid?o.value=v.toFormat(t):o.value=""},getDate:()=>c.value?r.value:null}}const d4=["disabled","readonly","placeholder"],tT=Et(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=wn,s=e,o=n,r=oe(null),a=oe(null),{isValid:l,isComplete:u,inputValue:c,clear:d,setDate:h,getDate:p}=c4({format:s.format,allowPastDates:s.allowPastDates,allowFutureDates:s.allowFutureDates,timezone:s.timezone,minDate:s.minDate,maxDate:s.maxDate}),g=G(()=>s.active),C=G(()=>({disabled:s.disabled,error:!l.value&&c.value.length>0,readOnly:s.readOnly,isEmpty:c.value.length===0,inputRef:r,wrapperRef:a,active:g})),{argsMain:v,isHover:S,isFocus:R}=Ws(C),E=b=>{var x;const F=(x=b.clipboardData)==null?void 0:x.getData("text/plain");F&&(c.value=F.trim())},y=()=>{d(),o("clear")};return t({clear:y,setDate:h,getDate:p,focus:()=>{var b;return(b=r.value)==null?void 0:b.focus()}}),wt(()=>s.modelValue,b=>{b?h(b):d()},{immediate:!0}),wt([()=>u.value,()=>c.value],()=>{if(c.value.length===0){o("complete",null);return}else if(l.value&&!s.readOnly&&!s.disabled&&u.value){const b=p();(b||c.value.length===0)&&o("complete",b)}}),wt(()=>l.value,b=>{b||o("invalid","")}),(b,F)=>(j(),Xe(zs,fn(Z(v),{ref_key:"wrapperRef",ref:a,size:26,style:{padding:0,background:"var(--bg-secondary,)"}}),{default:De(()=>{var x;return[me("div",{class:z([b.$style["date-input-wrapper"]])},[ye(lt,{src:"Calendar",source:"remote",size:"16",class:z(b.$style["icon-calendar"]),color:"var(--primary-color)"},null,8,["class"]),ut(me("input",{disabled:s.disabled,readonly:s.readOnly,ref_key:"inputRef",ref:r,type:"text","onUpdate:modelValue":F[0]||(F[0]=V=>Ht(c)?c.value=V:null),onPaste:Ut(E,["prevent"]),placeholder:(x=s.format)==null?void 0:x.toLocaleUpperCase(),class:z([b.$style["date-input"]])},null,42,d4),[[H0,Z(c)]]),vt(b.$slots,"clear",{handleClear:y},()=>[Z(c).length>0&&!s.readOnly&&!s.disabled&&(Z(S)||Z(R))?ut((j(),Xe(gt,{key:0,variant:["icon","primary"],onClick:Ut(y,["stop"]),size:16,rounded:!0},{default:De(()=>[ye(lt,{src:"XMarkSolid",source:"remote",size:"8",color:"white"})]),_:1})),[[Z(i),"Clear"]]):at("",!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"}}]]),h4=ct({__name:"Calendar",props:{params:{},label:{},value:{},timezone:{default:Wv()},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:!0}},emits:["clearStart","clearDue","clearAll","update","update:start","update:end","range:invalid","range:corrected","tracing","confirmed"],setup(e,{expose:t,emit:n}){const i=oe({case:"",behavior:""}),s=e,o=n,r=($,re)=>{var Ae,Ie;$(),(Ie=(Ae=s.params)==null?void 0:Ae.api)==null||Ie.stopEditing(),In(()=>{re()})},a=($,re)=>{var Ae,Ie;$(),(Ie=(Ae=s.params)==null?void 0:Ae.api)==null||Ie.stopEditing(),In(()=>{re()})},l=Ps({start:!1,end:!1}),{states:u,selectEndDate:c,cancelSelection:d,confirmSelection:h,selectStartDate:p,beginInteraction:g,clearStart:C,clearDue:v}=S3(s,o,i),S=G(()=>{if(u.isSelectingStart)return"start";if(u.isSelectingEnd)return"end"}),R=$=>{if(!$){l.start=!1,C();return}const re=u.endDate?qe.fromJSDate(u.endDate,{zone:s.timezone}):null;if(re&&E($,re)>0){const Ie={year:$.year,month:$.month,day:$.day};l.start=!1,p(Ie,!1),c(Ie),In(()=>{u.isSelectingStart=!0,u.isSelectingEnd=!1});return}const Ae={year:$.year,month:$.month,day:$.day};l.start=!1,p(Ae,!0)},E=($,re)=>{const Ae=$.startOf("day"),Ie=re.startOf("day");return Ae<Ie?-1:Ae>Ie?1:0},y=$=>{if(!$){l.end=!1,v();return}const re=u.startDate?qe.fromJSDate(u.startDate,{zone:s.timezone}):null;if(re&&E($,re)<0){const Ie={year:$.year,month:$.month,day:$.day};l.end=!1,p(Ie),c(Ie),In(()=>{u.isSelectingEnd=!0,u.isSelectingStart=!1});return}const Ae={year:$.year,month:$.month,day:$.day};l.end=!1,c(Ae)},b=()=>{C()},F=()=>{v()},x=()=>{P()},V=G(()=>u.isSelectingStart||u.isSelectingEnd);function I(){s.disabled||s.readOnly||(g(),u.isSelectingStart=!0,u.isSelectingEnd=!1)}function M(){s.disabled||s.readOnly||(g(),u.isSelectingEnd=!0,u.isSelectingStart=!1)}function P(){u.isSelectingStart=!1,u.isSelectingEnd=!1}function N($){$.key==="Escape"&&($.stopPropagation(),P())}const ie=oe(new Date().getFullYear()),ve=oe(new Date().getMonth()+1);wt(()=>[u.isSelectingStart,u.isSelectingEnd,u.startDate,u.endDate],()=>{u.isSelectingStart&&u.startDate?(ie.value=u.startDate.getFullYear(),ve.value=u.startDate.getMonth()+1):u.isSelectingEnd&&u.endDate&&(ie.value=u.endDate.getFullYear(),ve.value=u.endDate.getMonth()+1)},{immediate:!0});const Be=oe(null);function ee(){if(Array.isArray(s.value)){const[re,Ae]=s.value;u.startDate=re||null,u.endDate=Ae||null}u.isSelectingStart=!1,u.isSelectingEnd=!1;const $=u.startDate||u.endDate||new Date;ie.value=$.getFullYear(),ve.value=$.getMonth()+1}wt(()=>{var $,re,Ae,Ie,Ve,ot,tt,ht;return[((Ae=(re=($=s.value)==null?void 0:$[0])==null?void 0:re.getTime)==null?void 0:Ae.call(re))||((Ie=s.value)==null?void 0:Ie[0]),((tt=(ot=(Ve=s.value)==null?void 0:Ve[1])==null?void 0:ot.getTime)==null?void 0:tt.call(ot))||((ht=s.value)==null?void 0:ht[1]),s.timezone,s.format,s.placeholder,s.enableRangeFeedback]},()=>{ee()},{immediate:!0,deep:!0}),t({resetCalendarLogic:ee,openStart:I,openEnd:M,closePicker:P,clearAll:x,isOpen:V,drpRef:Be,getValues:()=>({startDate:u.startDate,endDate:u.endDate,dateRange:[u.startDate,u.endDate]})});const L=oe(null);return wt(()=>V.value,$=>{if(s.disabled||s.readOnly)return;const re=L.value;re&&($?re.show():re.hide())},{immediate:!0}),($,re)=>(j(),Ce("div",{class:z($.$style["calendar-wrapper"])},[ye(u4,{year:ie.value,"onUpdate:year":re[6]||(re[6]=Ae=>ie.value=Ae),month:ve.value,"onUpdate:month":re[7]||(re[7]=Ae=>ve.value=Ae),locale:s.locale,disabled:s.disabled,readOnly:s.readOnly,onKeydown:N},{selection:De(()=>[me("div",{class:z($.$style["calendar-input-section"])},[ye(tT,{"model-value":Z(u).startDate,placeholder:s.startPlaceholder,timezone:s.timezone,active:Z(u).isSelectingStart,onClick:I,onClear:b,onComplete:R,onInvalid:re[0]||(re[0]=Ae=>l.start=!0),disabled:s.disabled,readOnly:s.readOnly},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"]),ye(tT,{"model-value":Z(u).endDate,placeholder:s.duePlaceholder,timezone:s.timezone,active:Z(u).isSelectingEnd,onClick:M,onClear:F,disabled:s.disabled,onComplete:y,onInvalid:re[1]||(re[1]=Ae=>l.end=!0),readOnly:s.readOnly},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"])],2)]),default:De(({year:Ae,month:Ie})=>[ye(l4,{disabled:s.disabled,disableConfirm:l.end||l.start,readOnly:s.readOnly,ref_key:"drpRef",ref:Be,"tracing-case":i.value,"onUpdate:tracingCase":re[2]||(re[2]=Ve=>i.value=Ve),year:Ae,month:Ie,"start-date":Z(u).startDate,"end-date":Z(u).endDate,"active-field":S.value,timezone:s.timezone,immediatelyUpdate:e.immediatelyUpdate,onSelectStart:Z(p),onSelectEnd:Z(c),onConfirm:re[3]||(re[3]=Ve=>r(Z(h),P)),onCancel:re[4]||(re[4]=Ve=>a(Z(d),P)),onClose:re[5]||(re[5]=Ve=>r(Z(h),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))}}),nT=Et(h4,[["__cssModules",{$style:{"calendar-wrapper":"_calendar-wrapper_1lhhq_1","calendar-input-section":"_calendar-input-section_1lhhq_10","display-wrapper":"_display-wrapper_1lhhq_18","calendar-actions":"_calendar-actions_1lhhq_22","clear-all-btn":"_clear-all-btn_1lhhq_28"}}]]),f4=ct({__name:"DateUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{}},emits:["updated"],setup(e,{emit:t}){const n=t,i=e,s=Ri("bulkUpdate",!1),{apiServices:o}=Gs(!s,i),r=l=>{var c,d;const u={workspaceId:i.workspaceId,itemIds:i.ids,startDate:l.start?WF(l.start):null,dueDate:l.end?WF(l.end):null};(d=(c=o.value)==null?void 0:c.changeDate)==null||d.call(c,u).then(()=>{n("updated",{workspaceId:i.workspaceId,itemIds:i.ids,data:[l.start,l.end]})})};wt(()=>i.ids,l=>{a.value=[null,null]});const a=oe([null,null]);return(l,u)=>(j(),Xe(eT,{placement:"top"},{trigger:De(()=>[ye(gt,{variant:i.variant},{default:De(()=>[ye(lt,{src:"Calendar",size:"14"}),u[0]||(u[0]=bt(" Date ",-1))]),_:1},8,["variant"])]),content:De(()=>[ye(nT,{immediatelyUpdate:!1,value:a.value,onConfirmed:r,ref:"calendarRef"},null,8,["value"])]),_:1}))}}),p4=ct({__name:"MetricUpdateButton",props:{variant:{}},setup(e){const t=oe([{label:"Number input",type:"text",value:"number",selected:!1,id:"number"},{label:" Single select",type:"text",value:"select",selected:!1,id:"select"},{label:"Rating",type:"text",value:"rating",selected:!1,id:"rating"}]),n=e,{popupRef:i,triggerRef:s}=$s();return(o,r)=>(j(),Ce("div",null,[ye(gt,{class:"action-button",variant:n.variant,ref_key:"triggerRef",ref:s},{default:De(()=>[ye(lt,{src:"SquareRootVariable",class:"icon",size:"14"}),r[0]||(r[0]=bt(" Metric ",-1))]),_:1},8,["variant"]),me("div",{ref_key:"popupRef",ref:i,style:{display:"none"}},[ye(qv,{options:t.value,"selected-id":void 0},null,8,["options"])],512)]))}}),iT=ct({__name:"StatusEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},ids:{}},emits:["updated","error"],setup(e,{expose:t,emit:n}){const i={PER_PAGE:50,INITIAL_PAGE:1},s=e,o=n,r=N3("status"),a=oe([]),l=oe(!1),u=oe(!1),c=oe(null),d=oe(i.INITIAL_PAGE),h=oe(!0),p=oe(0),g=oe(""),C=G(()=>{var M;return(M=s.value)==null?void 0:M.id}),v=G(()=>!!(s.id||s.ids&&s.ids.length>0)),S=M=>({label:M.name,value:M.id,selected:C.value===M.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:M,id:M.id,color:M.color}),R=G(()=>{const M=new Set;return s.id&&M.add(String(s.id)),s.ids&&s.ids.forEach(P=>{P&&M.add(String(P))}),Array.from(M)}),E=Ri("bulkUpdate",!1),{apiServices:y}=Gs(!E,s),b=async(M=i.INITIAL_PAGE,P="",N=!1)=>{var ie,ve,Be;if(!v.value){console.error("Missing required props",s);return}N?u.value=!0:l.value=!0,c.value=null;try{const ee={workspaceId:String(s.workspaceId),itemIds:R.value,page:M,perPage:i.PER_PAGE,name_like:P.trim()};if(((ie=y.value)==null?void 0:ie.getAssignableStatus)===void 0)throw new Error("API service getAssignableStatus is undefined");const U=await((ve=y.value)==null?void 0:ve.getAssignableStatus(ee));if(!(U!=null&&U.data)){N||(a.value=[]),h.value=!1;return}const L=U.data.map(S);a.value=N?[...a.value,...L]:L,p.value=((Be=U.meta)==null?void 0:Be.total)??U.data.length,h.value=a.value.length<p.value,d.value=M}catch(ee){console.error("Error fetching statuses:",ee),c.value="Failed to load statuses",N||(a.value=[]),h.value=!1,o("error",c.value)}finally{l.value=!1,u.value=!1}},F=To(M=>{g.value=M,d.value=i.INITIAL_PAGE,b(i.INITIAL_PAGE,M,!1)},Fc),x=()=>{!h.value||u.value||b(d.value+1,g.value,!0)},V=async M=>{var P,N,ie;if(!v.value){console.error("Missing required props for updating status",s);return}try{const ve=await y.value.updateItemStatus({workspaceId:String(s.workspaceId),itemIds:R.value,statusId:String(M.value)});if(!(ve!=null&&ve.message))throw new Error("API did not return success");s.params&&((N=s.params)==null||N.node.setData({...(P=s.params)==null?void 0:P.node.data,status:{id:M.id,name:M.label,color:M.color}}),(ie=s.params)==null||ie.api.stopEditing()),o("updated",{workspaceId:String(s.workspaceId),itemIds:R.value,data:{id:M.id,name:M.label,color:M.color}})}catch(ve){console.error("Error updating status:",ve),c.value="Failed to update status",o("error",c.value)}},I=G(()=>a.value.map(M=>({id:r(M.id||""),...M})));return wt([()=>s.id,()=>s.workspaceId,()=>s.ids],()=>{b()},{deep:!0,immediate:!0}),t({refresh:()=>b(i.INITIAL_PAGE,g.value,!1),loadMore:x}),(M,P)=>{var N;return j(),Xe(qv,fn(s,{"selected-id":(N=s.value)==null?void 0:N.id,options:I.value,loading:l.value,"loading-more":u.value,"has-more":h.value,error:c.value,onSearch:Z(F),onSelect:V,onLoadMore:x}),null,16,["selected-id","options","loading","loading-more","has-more","error","onSearch"])}}}),g4=ct({__name:"StatusUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{}},emits:["updated"],setup(e,{emit:t}){const n=e,i=G(()=>{const d=Ti();return d==null?void 0:d.appContext.config.globalProperties.apiServices}),{popupRef:s,triggerRef:o,isVisible:r,hide:a}=$s(),l=t,u=d=>{l("updated",d),a()},c=G(()=>({apiServices:i.value,ids:n.ids,workspaceId:n.workspaceId,entityId:n.entityId}));return qr("bulkUpdate",!0),(d,h)=>(j(),Ce("div",null,[ye(gt,{ref_key:"triggerRef",ref:o,variant:e.variant},{default:De(()=>[ye(lt,{src:"Square",class:"icon",size:"14"}),h[0]||(h[0]=bt(" Status ",-1))]),_:1},8,["variant"]),me("div",{ref_key:"popupRef",ref:s},[Z(r)?(j(),Xe(iT,fn({key:0},c.value,{onUpdated:u}),null,16)):at("",!0)],512)]))}}),m4=Et(ct({__name:"BulkUpdate",props:{selectRowData:{},workspaceId:{},entityId:{},gridApi:{}},emits:["close","assignStatus","assignAssignee","assignDate","assignMetric","moreActions","deleteSelected","unselect"],setup(e,{emit:t}){const n=wn,i=e,s=t,o=G(()=>i.selectRowData.map(b=>b.id)),{popupRef:r,triggerRef:a}=$s();qr("bulkUpdate",!0);const l=({itemIds:b,data:F})=>{const x=i.gridApi;b.forEach(V=>{if(!x){console.error("Grid API is undefined");return}const I=x.getRowNode(V);if(I){const M={...I.data,status:F};I.setData(M)}})},u=({itemIds:b,data:F})=>{const x=i.gridApi;b.forEach(V=>{if(!x){console.error("Grid API is undefined");return}const I=x.getRowNode(V);if(I){const M={...I.data,dateRange:F};I.setData(M)}})},c=["primary"],d=[{label:"Delete Thumbnail",iconName:"Image",id:"delete-thumbnail",type:"icon",value:"delete-thumbnail"},{label:"Delete Rendition",iconName:"Film",id:"delete-rendition",type:"icon",value:"delete-rendition"},{label:"Archive",value:"BoxArchive",type:"icon",iconName:"BoxArchive",id:"archive",clickable:!0},{label:"Delete",value:"delete",type:"icon",iconName:"TrashCan",id:"delete",danger:!0,clickable:!0}],h=()=>{s("unselect")},p=()=>{const F=`https://review.dev.arbocollab.com/w:yngazem?scene_ids=${i.selectRowData.map(x=>x.id).join(",")}`;window.open(F,"_blank")},g=b=>{const{assignees:F,type:x}=b,V=i.gridApi;if(!V){console.error("Grid API is not available for bulk update.");return}i.selectRowData.map(M=>{const P=V.getRowNode(M.id);if(!P)return null;const N=P.data.assignees||[];let ie=[];switch(x){case"add":{const ve=new Set(N.map(ee=>ee.id)),Be=F.filter(ee=>!ve.has(ee.id));ie=[...N,...Be];break}case"overwrite":{ie=F;break}case"remove":{const ve=new Set(F.map(Be=>Be.id));ie=N.filter(Be=>!ve.has(Be.id));break}case"removeAll":{ie=[];break}}return{...P.data,assignees:ie}}).filter(M=>M!==null).forEach(M=>{const P=V.getRowNode(M.id);P&&P.setData(M)})},{apiServices:C}=Gs(!1,i),v=async()=>{var x;const b=i.selectRowData.map(V=>V.id),F=i.gridApi;if(!F){console.error("Grid API is not available for bulk delete.");return}await((x=C.value)==null?void 0:x.bulkDeleteItems(String(i.workspaceId),b)),b.forEach(V=>{const I=F.getRowNode(V);if(I){const M={...I.data,isDeleted:!0,disabled:!0};I.setData(M)}})},S=async()=>{var x;const b=i.selectRowData.map(V=>V.id),F=i.gridApi;if(!F){console.error("Grid API is not available for bulk archive.");return}await((x=C.value)==null?void 0:x.bulkArchiveItems(String(i.workspaceId),b)),b.forEach(V=>{const I=F.getRowNode(V);if(I){const M={...I.data,isArchived:!0};I.setData(M)}})},R=async()=>{var x;const b=i.selectRowData.map(V=>V.id),F=i.gridApi;if(!F){console.error("Grid API is not available for bulk thumbnail deletion.");return}await((x=C.value)==null?void 0:x.deleteThumbnail(String(i.workspaceId),b)),b.forEach(V=>{const I=F.getRowNode(V);if(I){const M={...I.data,thumbnail:null};I.setData(M)}})},E=async()=>{var x;const b=i.selectRowData.map(V=>V.id),F=i.gridApi;if(!F){console.error("Grid API is not available for bulk rendition deletion.");return}await((x=C.value)==null?void 0:x.deleteRendition(String(i.workspaceId),b)),b.forEach(V=>{const I=F.getRowNode(V);if(I){const M={...I.data,rendition:null};I.setData(M)}})},y=b=>{b.id==="delete"?v():b.id==="archive"?S():b.id==="delete-thumbnail"?R():b.id==="delete-rendition"&&E()};return(b,F)=>ut((j(),Ce("div",{class:z(b.$style["bulk-update-action"])},[me("div",{class:z(b.$style["left-actions"])},[me("div",{class:z(b.$style["selection-track"]),ref_key:"triggerRef",ref:a},[ye(gt,{variant:["icon","tertiary"],onClick:h},{default:De(()=>[ye(lt,{src:"XMarkSolid",source:"remote",size:"10"})]),_:1}),me("span",{class:z(b.$style["selected-count"])},yt(e.selectRowData.length)+" selected",3),me("span",{class:z(b.$style.divider)},null,2)],2),me("div",{ref_key:"popupRef",ref:r,class:z(b.$style["selected-list"])},[(j(!0),Ce(At,null,yn(e.selectRowData,x=>(j(),Ce("div",{key:x.id},yt(x.name),1))),128))],2),ye(g4,{ids:o.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:c,onUpdated:l},null,8,["ids","workspace-id","entity-id"]),ye(o4,{onUpdate:g,ids:o.value,"workspace-id":e.workspaceId,variant:c,"entity-id":e.entityId},null,8,["ids","workspace-id","entity-id"]),ye(f4,{ids:o.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:c,onUpdated:u},null,8,["ids","workspace-id","entity-id"]),ye(p4,{variant:c}),me("span",{class:z(b.$style.divider)},null,2),ut((j(),Xe(gt,{class:z(b.$style["action-button"]),variant:[...c,"icon"],onClick:p},{default:De(()=>[ye(lt,{src:"PenRuler",class:z(b.$style["icon-btn"]),size:"14"},null,8,["class"])]),_:1},8,["class","variant"])),[[Z(n),{content:"Open in Review"}]]),me("span",{class:z(b.$style.divider)},null,2),ye(eT,{placement:"top-end"},{trigger:De(({open:x})=>[ut((j(),Xe(gt,{actived:x,class:z(b.$style["action-button"]),variant:[...c,"icon"]},{default:De(()=>[ye(lt,{src:"EllipsisVertical",class:z(b.$style.icon),source:"remote",size:"14"},null,8,["class"])]),_:1},8,["actived","class","variant"])),[[Z(n),{content:"More actions"}]])]),content:De(()=>[(j(),Ce(At,null,yn(d,x=>ye(xc,fn({key:x.id,selected:!1},{ref_for:!0},x,{onSelect:()=>y(x)}),null,16,["onSelect"])),64))]),_:1})],2)],2)),[[Jr,e.selectRowData.length>0]])}}),[["__cssModules",{$style:{"bulk-update-action":"_bulk-update-action_t9k2f_1","left-actions":"_left-actions_t9k2f_19","right-actions":"_right-actions_t9k2f_20","selection-track":"_selection-track_t9k2f_25","close-icon":"_close-icon_t9k2f_30","selected-count":"_selected-count_t9k2f_34",divider:"_divider_t9k2f_37","more-button":"_more-button_t9k2f_42",dropdown:"_dropdown_t9k2f_46","dropdown-content":"_dropdown-content_t9k2f_49",delete:"_delete_t9k2f_72","icon-btn":"_icon-btn_t9k2f_79","selected-list":"_selected-list_t9k2f_83"}}]]),v4=Et(ct({__name:"LabelRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{}},setup(e){const t=wo,n=wn,i=e,s=G(()=>({disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:i.value===void 0||i.value===null||i.value==="",clickable:!0})),{argsMain:o}=Ws(s),r=G(()=>{var l,u,c;return!!((l=i.params)!=null&&l.api||(u=i.params)!=null&&u.node||(c=i.params)!=null&&c.context)}),a=G(()=>i.value===void 0);return(l,u)=>ut((j(),Xe(zs,Wd(Wu(Z(o))),{default:De(()=>[me("span",{class:z(l.$style["item-table-label-renderer"])},yt(i.value||"-"),3)]),_:1},16)),[[Z(t),{isLoading:a.value||!r.value}],[Z(n),i.tooltip?i.tooltip:{content:i.value}]])}}),[["__cssModules",{$style:{"item-table-label-renderer":"_item-table-label-renderer_s1gdy_1"}}]]),C4=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const y4=Object.prototype.toString,w4=e=>y4.call(e)==="[object Object]",yf=()=>{};function Yv(e){return Array.isArray(e)?e:[e]}function b4(e,t,n){return wt(e,t,{...n,immediate:!0})}const sT=C4?window:void 0;function _c(e){var t;const n=Hr(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function Zv(...e){const t=(i,s,o,r)=>(i.addEventListener(s,o,r),()=>i.removeEventListener(s,o,r)),n=G(()=>{const i=Yv(Hr(e[0])).filter(s=>s!=null);return i.every(s=>typeof s!="string")?i:void 0});return b4(()=>{var i,s;return[(i=(s=n.value)===null||s===void 0?void 0:s.map(o=>_c(o)))!==null&&i!==void 0?i:[sT].filter(o=>o!=null),Yv(Hr(n.value?e[1]:e[0])),Yv(Z(n.value?e[2]:e[1])),Hr(n.value?e[3]:e[2])]},([i,s,o,r],a,l)=>{if(!(i!=null&&i.length)||!(s!=null&&s.length)||!(o!=null&&o.length))return;const u=w4(r)?{...r}:r,c=i.flatMap(d=>s.flatMap(h=>o.map(p=>t(d,h,p,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}function S4(e,t,n={}){const{window:i=sT,ignore:s=[],capture:o=!0,detectIframe:r=!1,controls:a=!1}=n;if(!i)return a?{stop:yf,cancel:yf,trigger:yf}:yf;let l=!0;const u=v=>Hr(s).some(S=>{if(typeof S=="string")return Array.from(i.document.querySelectorAll(S)).some(R=>R===v.target||v.composedPath().includes(R));{const R=_c(S);return R&&(v.target===R||v.composedPath().includes(R))}});function c(v){const S=Hr(v);return S&&S.$.subTree.shapeFlag===16}function d(v,S){const R=Hr(v),E=R.$.subTree&&R.$.subTree.children;return E==null||!Array.isArray(E)?!1:E.some(y=>y.el===S.target||S.composedPath().includes(y.el))}const h=v=>{const S=_c(e);if(v.target!=null&&!(!(S instanceof Element)&&c(e)&&d(e,v))&&!(!S||S===v.target||v.composedPath().includes(S))){if("detail"in v&&v.detail===0&&(l=!u(v)),!l){l=!0;return}t(v)}};let p=!1;const g=[Zv(i,"click",v=>{p||(p=!0,setTimeout(()=>{p=!1},0),h(v))},{passive:!0,capture:o}),Zv(i,"pointerdown",v=>{const S=_c(e);l=!u(v)&&!!(S&&!v.composedPath().includes(S))},{passive:!0}),r&&Zv(i,"blur",v=>{setTimeout(()=>{var S;const R=_c(e);((S=i.document.activeElement)===null||S===void 0?void 0:S.tagName)==="IFRAME"&&!(R!=null&&R.contains(i.document.activeElement))&&t(v)},0)},{passive:!0})].filter(Boolean),C=()=>g.forEach(v=>v());return a?{stop:C,cancel:()=>{l=!1},trigger:v=>{l=!0,h(v),l=!1}}:C}const E4=["placeholder"],R4=Et(ct({__name:"LabelEditor",props:{value:{},placeholder:{default:"Enter name"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:value","enter","blur"],setup(e,{expose:t,emit:n}){const i=wo,s=wn,o=e,r=n,a=oe(o.value),l=oe(null),u=oe(null),c=G(()=>{var F;return{disabled:o.disabled,error:!1,readOnly:o.readOnly,isEmpty:((F=o.value)==null?void 0:F.length)===0,inputRef:l,wrapperRef:u,clickable:!0}}),{argsMain:d,isHover:h,isFocus:p}=Ws(c),g=F=>{const x=document.createElement("div");return x.textContent=F,x.innerHTML},C=F=>{p.value=!1,b.value=a.value,r("update:value",a.value)},v=F=>{if(!p.value||!l.value)return;const x=g(l.value.value);r("update:value",x),r("enter",x),p.value=!1},S=F=>{F.key==="Enter"?(F.preventDefault(),v()):F.key==="Escape"&&(F.preventDefault(),C())},R=()=>{a.value=o.value,p.value=!0,In(()=>{var F;(F=l.value)==null||F.focus()})},E={focus:()=>{var F;p.value=!0,(F=l.value)==null||F.focus()}};Kn(()=>{const F=u.value.$el;F&&(F.__sceneNameEditor=E)}),pi(()=>{const F=u.value;F&&delete F.__sceneNameEditor}),t({focus:()=>{R()}});const y=G(()=>o.value===void 0),b=oe(o.value||"");return S4(u,F=>{p.value&&v()}),(F,x)=>ut((j(),Xe(Z(zs),fn(Z(d),{ref_key:"wrapperRef",ref:u}),SS({default:De(()=>[Z(p)?at("",!0):vt(F.$slots,"default",{key:0},()=>[ut((j(),Ce("span",{class:z(F.$style["label-renderer"])},[bt(yt(b.value),1)],2)),[[Z(s),{content:b.value||void 0}]])]),ut(me("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":x[0]||(x[0]=V=>b.value=V),class:z(F.$style["label-editor"]),type:"text",placeholder:e.placeholder,onKeydown:S},null,42,E4),[[Jr,Z(p)],[H0,b.value]])]),_:2},[!e.disabled&&!e.readOnly?{name:"suffix",fn:De(()=>[Z(h)&&!Z(p)?ut((j(),Xe(Z(gt),{key:0,variant:["icon","secondary"],size:24,onClick:Ut(R,["prevent","stop"])},{default:De(()=>[ye(Z(lt),{src:"Pen",source:"remote",size:"14"})]),_:1})),[[Z(s),"Edit"]]):Z(p)?ut((j(),Xe(Z(gt),{key:1,variant:["icon","tertiary","danger"],size:24,onMousedown:Ut(C,["prevent"])},{default:De(()=>[ye(Z(lt),{src:"XMarkSolid",source:"remote",size:"14"})]),_:1})),[[Z(s),"Cancel"]]):at("",!0)]),key:"0"}:void 0]),1040)),[[Z(i),{isLoading:y.value}]])}}),[["__cssModules",{$style:{"label-renderer":"_label-renderer_cyzth_1","label-editor":"_label-editor_cyzth_10"}}]]),D4=["href"],oT=Et(ct({__name:"SceneNameEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},placeholder:{default:"Enter name"}},emits:["update:value","enter","blur"],setup(e,{emit:t}){const n=wo,i=e,s=t,o=oe(i.value),r=oe(i.value);wt(()=>i.value,b=>{o.value=b,r.value=b});const a=oe(null),l=oe(null),u=G(()=>{var b;return{componentType:void 0,disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:((b=o==null?void 0:o.value)==null?void 0:b.length)===0,inputRef:a,wrapperRef:l,clickable:!0}}),{isFocus:c}=Ws(u),d=G(()=>GF("timezone")||"Asia/Tokyo"),h=Ri("bulkUpdate",!1),{apiServices:p}=Gs(!h,i),g=async b=>{var F,x,V,I;o.value=b,c.value=!1;try{const M=await((x=(F=p.value)==null?void 0:F.updateSceneName)==null?void 0:x.call(F,{workspaceId:i.workspaceId,entityId:i.entityId,itemId:i.id,name:o.value}));if(M){const P=KF(M,d.value),N={...i.data,...P};(I=(V=i.params)==null?void 0:V.node)==null||I.setData(N),r.value=o.value,s("enter")}else o.value=r.value}catch(M){console.error("Failed to update scene name:",M),o.value=r.value}},C=G(()=>{const b=sessionStorage.getItem("ws.code")||i.workspaceId,F=sessionStorage.getItem("BASE_URL")||"https://app.dev.arbocollab.com";return gs({type:"scene_hub",config:{baseDomain:F,ws_code:b,scene_id:String(i.id)}}).url}),v={focus:()=>{c.value=!0,setTimeout(()=>{var b;return(b=l.value)==null?void 0:b.focus()},0)}},S=()=>{if(l.value)return"$el"in l.value?l.value.$el:l.value};Kn(()=>{const b=S();b&&(b.__sceneNameEditor=v)}),pi(()=>{const b=l.value;b&&delete b.__sceneNameEditor});const R=G(()=>{var b;return((b=i.data)==null?void 0:b.isDeleted)==!0}),E=G(()=>{var b;return((b=i.data)==null?void 0:b.isArchived)==1}),y=G(()=>i.value===void 0);return(b,F)=>ut((j(),Xe(R4,fn({"save-on-blur":!0,ref_key:"wrapperRef",ref:l},i,{value:o.value,"onUpdate:value":F[0]||(F[0]=x=>o.value=x),id:`scene-name-${i.id}`,onEnter:g}),{default:De(()=>[ut(me("div",{class:z(b.$style["scene-name-display"])},[me("a",{href:C.value,target:"_blank",class:z(b.$style["scene-name-text"])},yt(o.value),11,D4),E.value?(j(),Ce("div",{key:0,class:z([b.$style["icon-processing"],b.$style.archived])},[ye(lt,{src:"BoxArchive",size:"14",color:"#959595"})],2)):at("",!0),R.value?(j(),Ce("div",{key:1,class:z([b.$style["icon-processing"],b.$style.processing])},[ye(lt,{src:"AnimatedHourglass",color:"#DE851A",size:"14"})],2)):at("",!0)],2),[[Jr,!Z(c)]])]),_:1},16,["value","id"])),[[Z(n),{isLoading:y.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"}}]]),rT=Et(ct({__name:"OptionList",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},options:{}},emits:["select"],setup(e,{emit:t}){const n=t;function i(s){n("select",s)}return(s,o)=>(j(),Ce("div",{class:z(s.$style["dropdown-list"])},[(j(!0),Ce(At,null,yn(e.options,r=>(j(),Xe(xc,fn({key:r.value},{ref_for:!0},{...r},{"icon-name":r.iconName,onClick:Ut(a=>i(r.value),["stop","prevent"])}),{label:De(()=>[bt(yt(r.label),1)]),_:2},1040,["icon-name","onClick"]))),128)),e.options.length==0?(j(),Ce("div",{key:0,class:z(s.$style["empty-list"])}," No options available. ",2)):at("",!0)],2))}}),[["__cssModules",{$style:{"dropdown-list":"_dropdown-list_1d2i1_1","empty-list":"_empty-list_1d2i1_8"}}]]),Jv=Et(ct({__name:"ButtonDropdown",props:{label:{},value:{},variant:{},options:{default:()=>[]},size:{},placement:{default:"bottom"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["select","handleClick"],setup(e,{emit:t}){const n=e,i=G(()=>typeof n.size=="number"?`${n.size}px`:n.size),s=G(()=>{let d=[];return typeof n.variant=="string"?d.push(n.variant):Array.isArray(n.variant)&&(d=[...n.variant]),[...d,"icon"]}),o=t,{hide:r,isVisible:a,triggerRef:l,popupRef:u}=$s({placement:n.placement||"bottom"});function c(d){o("select",d),r()}return(d,h)=>(j(),Ce("div",{class:z(d.$style["button-dropdown-wrapper"]),style:hn({"--button-size":i.value})},[me("div",{class:z(d.$style["button-group"])},[vt(d.$slots,"prefix"),me("div",{ref_key:"triggerRef",ref:l},[vt(d.$slots,"triggerDropdown",{open:Z(a)},()=>[n.readOnly?at("",!0):(j(),Xe(gt,{key:0,actived:Z(a),class:z(d.$style["button-dropdown-trigger"]),variant:s.value,size:e.size,disabled:n.disabled},{default:De(()=>[vt(d.$slots,"iconDropdown",{},()=>[ye(lt,{src:"ChevronDown",source:"remote",size:"16"})])]),_:3},8,["actived","class","variant","size","disabled"]))])],512)],2),me("div",{ref_key:"popupRef",ref:u,class:z(d.$style["button-dropdown-list"])},[ye(rT,{options:e.options,onSelect:c,style:{width:"max-content"}},null,8,["options"])],2)],6))}}),[["__cssModules",{$style:{"button-dropdown-wrapper":"_button-dropdown-wrapper_1tiue_1","button-group":"_button-group_1tiue_7","overflow-elipsis":"_overflow-elipsis_1tiue_26","button-dropdown-list":"_button-dropdown-list_1tiue_33",show:"_show_1tiue_36","button-dropdown-item":"_button-dropdown-item_1tiue_39"}}]]),F4=Et(ct({__name:"AssigneeGroupRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},error:{type:Boolean},maxVisible:{default:4}},setup(e){const t=wn,n=wo,i=WE,s=e,o=oe(s.value),r=oe(null),a=oe(null),l=G(()=>({disabled:s.disabled,readOnly:s.readOnly,error:s.error,inputRef:r,wrapperRef:a,clickable:!0})),{argsMain:u,isHover:c}=Ws(l);wt(()=>s.value,y=>{o.value=y},{immediate:!0,deep:!0});const d=G(()=>{var y;return((y=o.value)==null?void 0:y.slice(0,s.maxVisible))||[]}),h=G(()=>{var y;return Math.max(0,(((y=o.value)==null?void 0:y.length)||0)-s.maxVisible)}),p=G(()=>{var y;return h.value>0&&((y=o.value)==null?void 0:y.slice(s.maxVisible).map(b=>b.name).join(", "))||""}),g=G(()=>d.value.map(y=>({id:y.id,name:y.name,initial:y.initial,avatarId:y.id,profile_image:y.profile_image,color:y.color,size:24,user:y}))),C=G(()=>s.value===void 0),v=G(()=>({color:c.value?"var(--primary-color)":"var(--bg-inactive-color)",display:"flex",alignItems:"center",marginLeft:"4px"})),S=G(()=>mf()),{apiServices:R}=Gs(!0,s),E=async y=>{var x;const b=s.workspaceId;return await((x=R.value)==null?void 0:x.getUserInformation(b,y))??void 0};return(y,b)=>ut((j(),Xe(zs,Wd(Wu(Z(u))),{default:De(()=>{var F;return[me("div",{class:z(y.$style.assigneeGroupRenderer)},[(F=o.value)!=null&&F.length?at("",!0):(j(),Xe(lt,{key:0,src:"UserPlus",source:"remote",size:16,style:hn(v.value)},null,8,["style"])),(j(!0),Ce(At,null,yn(g.value,x=>ut((j(),Ce("div",{key:x.id},[ye(uc,{readOnly:!0,class:z(y.$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"])])),[[Z(i),{user:x.user,status:"online",timezone:S.value,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0,apiUpdateFunction:E}]])),128)),h.value>0?ut((j(),Ce("div",{key:1,class:z(y.$style["extra-avatars"])},[bt(" +"+yt(h.value),1)],2)),[[Z(t),p.value]]):at("",!0)],2)]}),_:1},16)),[[Z(n),{isLoading:C.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"}}]]),T4=Et(ct({__name:"DateRangeRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{}},setup(e){var E,y;const t=wn,n=wo,i=G(()=>r.value===void 0),s=oe(null),o=oe(null),r=e,a=G(()=>({disabled:r.disabled,error:!1,readOnly:r.readOnly,inputRef:s,wrapperRef:o,clickable:!0})),{argsMain:l}=Ws(a),u=G(()=>{var b;return(b=r.data)==null?void 0:b.isStarted}),c=G(()=>{var b;return(b=r.data)==null?void 0:b.isCompleted}),d=b=>{if(b){if(typeof b=="string")return b;if(b instanceof Date)return b.toISOString()}},h=G(()=>r.disabled&&!r.readOnly?"var(--disabled-color)":"var(--primary-color)"),{startDate:p,endDate:g,startClasses:C,endClasses:v,fullStartDate:S,fullEndDate:R}=T3({start:d((E=r.value)==null?void 0:E[0]),end:d((y=r.value)==null?void 0:y[1]),isStarted:u.value,isEnded:c.value,timezone:Wv()});return(b,F)=>ut((j(),Xe(zs,fn(Z(l),{ref_key:"wrapperRef",ref:o}),{default:De(()=>[i.value?at("",!0):(j(),Ce("div",{key:0,class:z(b.$style.dateRangeRenderer)},[me("div",{class:z(b.$style.dateSection)},[ut((j(),Ce("span",{class:z([b.$style.dateLabelDisplay,...Z(C).map(x=>b.$style[x])])},[bt(yt(Z(p)),1)],2)),[[Z(t),Z(S)]]),r.readOnly?at("",!0):(j(),Xe(lt,{key:0,src:"Calendar",size:16,class:z(b.$style.calendarIcon),color:h.value},null,8,["class","color"]))],2),F[0]||(F[0]=me("span",null,"-",-1)),me("div",{class:z(b.$style.dateSection)},[ut((j(),Ce("span",{class:z([b.$style.dateLabelDisplay,...Z(v).map(x=>b.$style[x])])},[bt(yt(Z(g)),1)],2)),[[Z(t),Z(R)]]),r.readOnly?at("",!0):(j(),Xe(lt,{key:0,src:"Calendar",size:16,class:z(b.$style.calendarIcon),color:h.value},null,8,["class","color"]))],2)],2))]),_:1},16)),[[Z(n),{isLoading:i.value,fullwidth:!0}]])}}),[["__cssModules",{$style:{dateRangeRenderer:"_dateRangeRenderer_19vxf_1",calendarIcon:"_calendarIcon_19vxf_7",dateSection:"_dateSection_19vxf_11",dateLabelDisplay:"_dateLabelDisplay_19vxf_19","end-today":"_end-today_19vxf_29",actual:"_actual_19vxf_32","end-tomorrow":"_end-tomorrow_19vxf_35","end-yesterday":"_end-yesterday_19vxf_41","end-past":"_end-past_19vxf_47","end-future":"_end-future_19vxf_53","start-today":"_start-today_19vxf_56","start-tomorrow":"_start-tomorrow_19vxf_62","start-yesterday":"_start-yesterday_19vxf_68","start-past":"_start-past_19vxf_74","start-future":"_start-future_19vxf_80"}}]]),x4=ct({__name:"DateRangeEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{default:void 0},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{default:Wv()}},setup(e){const t=oe(null),n=e,i=p=>`${qe.fromJSDate(p,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,s=async p=>{await h({startDate:p[0]?i(p[0]):null,dueDate:p[1]?i(p[1]):null})},o=async()=>{await h({startDate:null})},r=async()=>{await h({dueDate:null})},a=async p=>{await h({startDate:p?i(p):null})},l=async p=>{await h({dueDate:p?i(p):null})},u=async()=>{await h({startDate:null,dueDate:null})},c=Ri("bulkUpdate",!1),{apiServices:d}=Gs(!c,n),h=async p=>{var g,C,v,S,R;try{const E=(g=t.value)==null?void 0:g.getValues(),y=await((v=(C=d.value)==null?void 0:C.changeDate)==null?void 0:v.call(C,{workspaceId:n.workspaceId,itemIds:[n.id],startDate:p.startDate,dueDate:p.dueDate}));y!=null&&y.message&&((R=n.params)==null||R.node.setData({...(S=n.params)==null?void 0:S.node.data,dateRange:E==null?void 0:E.dateRange}))}catch(E){console.error("Failed to update scene name:",E)}};return(p,g)=>(j(),Xe(nT,fn(n,{onUpdate:s,"onUpdate:end":l,"onUpdate:start":a,onClearAll:u,onClearDue:r,onClearStart:o,ref_key:"calendarRef",ref:t}),null,16))}}),_4=Et(ct({__name:"item-table-layout",props:{isSidebarOpen:{type:Boolean,default:!1}},emits:["close-sidebar","sidebar-clear","sidebar-apply"],setup(e,{emit:t}){const n=oe(null),i=oe(0);let s=null;Kn(()=>{n.value&&(s=new ResizeObserver(r=>{for(const a of r)i.value=a.contentRect.height}),s.observe(n.value))}),Lu(()=>{s&&n.value&&s.unobserve(n.value)});const o=G(()=>{const r=i.value;return r>120?r-42-36:0});return(r,a)=>(j(),Ce("div",{class:z(r.$style["item-table-wrapper"]),ref_key:"itemTableWrapperRef",ref:n},[me("div",{class:z(r.$style["item-header"])},[me("div",{class:z(r.$style["item-header__left"])},[vt(r.$slots,"header-left",{},()=>[me("h1",{class:z(r.$style["item-header__title"])},[vt(r.$slots,"title",{},()=>[a[0]||(a[0]=bt("Items",-1))])],2)])],2),me("div",{class:z(r.$style["item-header__spacer"])},null,2),me("div",{class:z(r.$style["item-header__actions"])},[vt(r.$slots,"header-actions")],2)],2),vt(r.$slots,"grid",{availableHeight:o.value}),me("div",{class:z(r.$style.footer)},[vt(r.$slots,"footer")],2),vt(r.$slots,"new-row"),vt(r.$slots,"bulk-update-actions"),vt(r.$slots,"snackbar"),vt(r.$slots,"popup")],2))}}),[["__cssModules",{$style:{"item-table-wrapper":"_item-table-wrapper_12ija_1","item-header":"_item-header_12ija_15","item-header__left":"_item-header__left_12ija_23","item-header__title":"_item-header__title_12ija_28","item-header__spacer":"_item-header__spacer_12ija_33","item-header__actions":"_item-header__actions_12ija_36","main-content":"_main-content_12ija_42",sidebar:"_sidebar_12ija_49","is-open":"_is-open_12ija_65","sidebar-header":"_sidebar-header_12ija_69","sidebar-footer":"_sidebar-footer_12ija_70","sidebar-content":"_sidebar-content_12ija_90",footer:"_footer_12ija_95"}}]]),P4=e=>[{groupLabel:"Quick actions",type:"row",options:[{label:"",icon:"CustomSceneHub",description:"Scene tile",action:e.openSceneTile},{label:"",icon:"PenRuler",description:"Open in arbo Review",action:e.openInArboReview},{label:"",icon:"Link",description:"Copy link ",action:e.copyLink}]},{groupLabel:"Action",type:"column",options:[{label:"Rename",icon:"Pen",action:e.renameItem}]},{type:"column",groupLabel:"Download Options",options:[{label:"Open Take in",icon:"ArrowUpRightFromSquare",subMenu:{type:"column",groupLabel:"Sub Menu",options:[{label:"Review",icon:"PenRuler",action:e.openReview},{label:"Update",icon:"UserCheck",action:e.update},{label:"Woohoo Details",icon:"ChartPie",action:e.woohooDetails}]}}]},{type:"column",groupLabel:"Download Options",options:[{label:"Delete rendition",icon:"Clapperboard",action:e.deleteRendition},{label:"Delete thumbnail",icon:"Image",action:e.deleteThumbnail}]},{type:"column",groupLabel:"Download Options",options:[{label:"Archive",icon:"BoxArchive",action:e.archive},{label:"Delete",icon:"TrashCan",isDanger:!0,description:"Delete permanently",action:e.deleteItem}]}],aT=Et(ct({__name:"MoreOptionEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},optionBlock:{},isSubmenu:{type:Boolean,default:!1}},emits:["actionExecuted"],setup(e,{emit:t}){const n=e,i=G(()=>(n==null?void 0:n.workspaceId)||""),s=G(()=>(n==null?void 0:n.entityId)||""),o=R=>{const E=`scene-name-${n.id}`,y=document.getElementById(E);y.__sceneNameEditor&&y.__sceneNameEditor.focus()},{apiServices:r}=Gs(!0,n),{handleOpen:a,deleteRendition:l,deleteThumbnail:u,archiveItem:c,deleteItem:d,copyLink:h}=L3(i.value,s.value,String(n.id),r),p=R=>{var y,b;let E=(b=(y=n.params)==null?void 0:y.api)==null?void 0:b.getRowNode(String(n.id));if(E){const F={...E.data,isDeleted:R==="deleted",isArchived:R==="archived",disabled:!0};E.setData(F)}},g={update:R=>a(R,"update"),woohooDetails:R=>a(R,"woohoo"),openInArboReview:R=>a(R,"review_scene"),openSceneTile:R=>a(R,"scene_hub"),openReview:R=>a(R,"review"),deleteRendition:R=>l(R,p),deleteThumbnail:R=>u(R,p),archive:R=>c(R,p),deleteItem:R=>d(R,p),copyLink:R=>h(R),renameItem:R=>o()},C=G(()=>n.optionBlock||P4(g)),v=t,S=R=>{var E,y;(y=(E=n==null?void 0:n.params)==null?void 0:E.api)==null||y.stopEditing(),v("actionExecuted",R)};return(R,E)=>(j(),Ce("div",{class:z([R.$style["more-option-section"],{[R.$style.submenu]:e.isSubmenu}])},[(j(!0),Ce(At,null,yn(C.value,y=>(j(),Ce("div",{key:y.groupLabel,class:z([R.$style["option-block"],R.$style[y.type]]),style:hn({"--g-number":Math.min(y.options.length,4)})},[(j(!0),Ce(At,null,yn(y.options,b=>(j(),Ce("div",{key:b.label,class:z(R.$style["option-item"])},[ye(I4,{"scene-id":String(n.id),option:b,type:y.type,onActionExecuted:S},null,8,["scene-id","option","type"])],2))),128))],6))),128))],2))}}),[["__cssModules",{$style:{"more-option-section":"_more-option-section_1audy_1","option-block":"_option-block_1audy_9","option-item":"_option-item_1audy_19",row:"_row_1audy_23",column:"_column_1audy_29",block:"_block_1audy_33"}}]]),A4={key:0},I4=Et(ct({__name:"MoreOptionItem",props:{option:{},sceneId:{},type:{}},emits:["actionExecuted"],setup(e,{emit:t}){const n=wn,i=e,s=oe(!1),o=(E,y)=>{if(!y){d();return}const b=y.target;b.closest(".tippy-content")||b.closest(".tippy-box")||b.closest("[data-tippy-root]")||b.closest(".option-item")||d()},r=oe(null),{triggerRef:a,popupRef:l,show:u,isVisible:c,hide:d}=$s({interactive:!0,trigger:"click",placement:"left",showArrow:!1,offset:[0,4],hideOnClick:!1,allowHTML:!0,onClickOutside:o,appendTo:r.value||void 0}),h=t,p=E=>{var y,b;(b=(y=i.option).action)==null||b.call(y,E),h("actionExecuted",i.option),s.value=!1},g=E=>{var y,b;if(E.preventDefault(),E.stopPropagation(),i.option.isDanger){s.value=!s.value;return}if(!i.option.subMenu){(b=(y=i.option).action)==null||b.call(y,E),h("actionExecuted",i.option);return}In(()=>{c.value?d():u()})},C=E=>{h("actionExecuted",E),d()},v=E=>{E.key==="Escape"?d():(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),g(E))},S=E=>({row:"small",column:"large",block:"small"})[E]||"large",R=E=>{const y=i.option.isDanger?["danger","tertiary"]:[];return{row:["secondary","icon",...y],column:["menu-item",...y],block:["secondary",...y]}[E]||[]};return(E,y)=>{var b;return j(),Ce("div",{ref_key:"wrapperRef",ref:r,class:z(E.$style["option-item-wrapper"])},[ut((j(),Xe(gt,{ref_key:"triggerRef",ref:a,class:z(E.$style["option-item"]),disabled:e.option.disabled,actived:Z(c)||s.value,size:S(e.type),variant:R(e.type),tabindex:"0",onClick:g,onKeydown:v},{prefix:De(()=>[e.option.icon?ut((j(),Xe(lt,{key:0,src:e.option.icon,source:"remote",size:"14"},null,8,["src"])),[[Z(n),{content:e.option.label,delay:[500,0],contentClass:["extra-padding"]}]]):at("",!0)]),suffix:De(()=>[e.option.subMenu?(j(),Xe(lt,{key:0,src:"Play",source:"remote",size:"14"})):at("",!0),e.option.isDanger&&s.value?(j(),Ce("div",{key:1,class:z(E.$style["confirm-action"])},[ut((j(),Xe(gt,{variant:["tertiary","icon","danger"],size:"small",onClick:y[0]||(y[0]=Ut(F=>s.value=!1,["stop","prevent"]))},{default:De(()=>[ye(lt,{src:"XMarkSolid",source:"remote",size:"12"})]),_:1})),[[Z(n),{content:"Cancel ",delay:[500,0],contentClass:["extra-padding"]}]]),ut((j(),Xe(gt,{variant:["danger","primary","icon"],size:"small",onClick:Ut(p,["stop","prevent"])},{default:De(()=>[ye(lt,{src:"Check",source:"remote",size:"12"})]),_:1})),[[Z(n),{delay:[500,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):at("",!0)]),default:De(()=>[e.option.label?(j(),Ce("span",A4,yt(e.option.label),1)):at("",!0)]),_:1},8,["class","disabled","actived","size","variant"])),[[Z(n),{content:e.option.description||void 0,delay:[500,0],contentClass:["extra-padding"],theme:e.option.isDanger?"warning":"arbo"}]]),e.option.subMenu?(j(),Ce("div",{key:0,ref_key:"popupRef",ref:l,class:z(E.$style["submenu-container"])},[ye(aT,{ref:"submenuRef","option-block":[((b=e.option)==null?void 0:b.subMenu)||[]],"is-submenu":!1,onActionExecuted:C},null,8,["option-block"])],2)):at("",!0)],2)}}}),[["__cssModules",{$style:{"option-item":"_option-item_82ug7_1","icon-wrapper":"_icon-wrapper_82ug7_11","confirm-action":"_confirm-action_82ug7_19"}}]]),k4=Et(ct({__name:"TimeStampRenderer",props:{value:{},timezone:{},format:{},tooltip:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=wn,n=e,i=G(()=>({disabled:n.disabled,readOnly:n.readOnly,clickable:!0})),{argsMain:s}=Ws(i),o=G(()=>{if(!n.value)return"";let a=qe.fromISO(n.value);return a.isValid?(n.timezone&&(a=a.setZone(n.timezone)),a.toFormat("MMM dd, yyyy | HH:mm")):"Invalid Date"}),r=G(()=>{if(!n.value)return"";let a=qe.fromISO(n.value);return a.isValid?(n.timezone&&(a=a.setZone(n.timezone)),a.toFormat(n.format||"MMM dd")):"Invalid Date"});return(a,l)=>(j(),Xe(zs,Wd(Wu(Z(s))),{default:De(()=>[ut((j(),Ce("span",{class:z(a.$style.timestampRender)},[bt(yt(r.value),1)],2)),[[Z(t),n.tooltip||o.value]])]),_:1},16))}}),[["__cssModules",{$style:{timestampRender:"_timestampRender_1296j_1"}}]]);var _l=(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))(_l||{});const O4=["width","height","viewBox"],M4=["d"],L4="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",lT=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,s=oe(n.modelValue??0),o=G(()=>{var S;return((S=n.params)==null?void 0:S.size)??40}),r=G(()=>{var S;return((S=n.params)==null?void 0:S.iconViewBox)??"0 0 24 24"}),a=G(()=>{var S;return((S=n.params)==null?void 0:S.iconPath)??L4}),l=G(()=>{var S;return((S=n.params)==null?void 0:S.wrapperTag)??"span"}),u=G(()=>{var S;return n.disabled||((S=n.params)==null?void 0:S.disabled)||!1}),c=G(()=>{var S;return n.readOnly||((S=n.params)==null?void 0:S.readOnly)||!1}),d=G(()=>!u.value&&!c.value),h=G(()=>u.value?"not-allowed":c.value?"default":"pointer");wt(()=>n.modelValue,S=>{typeof S=="number"&&S!==s.value&&(s.value=S)});const p=S=>{var R;return((R=n.params)==null?void 0:R.maxRating)-S+1<=s.value},g=S=>{d.value&&v(S)},C=S=>{d.value&&v(S)},v=S=>{var E,y;if(!d.value)return;const R=((E=n.params)==null?void 0:E.maxRating)-S+1;s.value=R,i("update:modelValue",R),i("update",R),i("change",R),(y=n.params)!=null&&y.onUpdate&&n.params.onUpdate(R)};return(S,R)=>(j(),Ce("div",{class:z(["rating-component",{"rating-component--disabled":u.value,"rating-component--readOnly":c.value}])},[(j(!0),Ce(At,null,yn(e.params.maxRating,E=>(j(),Xe(IM(l.value),{key:E,class:z(["rating-item",{filled:p(E),"rating-item--disabled":u.value,"rating-item--readOnly":c.value}]),style:hn({cursor:h.value,order:e.params.maxRating-E,height:o.value+"px",width:o.value+"px"}),role:"radio","aria-checked":p(E),"aria-disabled":u.value,"aria-readOnly":c.value,tabindex:u.value?-1:0,onClick:Ut(y=>g(E),["prevent","stop"]),onKeyup:[G0(Ut(y=>C(E),["prevent"]),["enter"]),G0(Ut(y=>C(E),["prevent"]),["space"])]},{default:De(()=>[vt(S.$slots,"icon",{index:E,filled:p(E),size:o.value,iconViewBox:r.value,disabled:u.value,readOnly:c.value},()=>[(j(),Ce("svg",{class:"rating-icon",width:o.value,height:o.value,viewBox:r.value,"aria-hidden":"true",focusable:"false"},[me("path",{d:a.value},null,8,M4)],8,O4))]),vt(S.$slots,"overlay",{index:E,filled:p(E),disabled:u.value,readOnly:c.value})]),_:2},1064,["class","style","aria-checked","aria-disabled","aria-readOnly","tabindex","onClick","onKeyup"]))),128))],2))}}),N4={key:4},Xv=16,V4=Et(ct({__name:"MetricRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},error:{type:Boolean}},emits:["update:value","clear","copy"],setup(e,{emit:t}){const n=wo,i=wn,s=Object.freeze({id:"",id_original:0,code:"",name:"Unknown Metric",description:null,metric_type:{id:"",name:"",code:"number"},format_type:"number",format_value:"0",format_symbol:null,formula:null,formula_name:null,morpheme_type:"none",morpheme_value:null,restricted_type:"none",restricted_value:null,mapping:{},range:5,status:1,is_deployed:0,is_favorite:0,is_dependent:0,error:0,created_at:"",updated_at:"",created_by:"",created_by_original:0,updated_by:"",updated_by_original:0,deleted_at:null,deleted_by:""}),o=e,r=oe(Number(o.value)),a=$O(!1),l=G(()=>{var $,re;return{...((re=($=o.params)==null?void 0:$.colDef)==null?void 0:re.context)||s}}),u=G(()=>(l.value.format_symbol||"").split(/[\s-_]+/).map(re=>re.charAt(0).toUpperCase()+re.slice(1)).join("").replace(/Outline|Solid/g,"")),c=G(()=>{const{format_type:$,format_value:re}=l.value;if($==="dropdown"&&typeof re=="string"&&re.startsWith("["))try{return JSON.parse(re)}catch{return[]}return[]}),d=G(()=>C.value?"var(--error-color, #d32f2f)":"var(--grey-300)"),h=G(()=>o.value===void 0),p=G(()=>String(o.value)),g=G(()=>o.value===null||o.value===void 0||String(o.value).length===0),C=G(()=>!!o.error),v=G(()=>l.value.format_type==="icon"),S=G(()=>{var $,re;return((re=($=l.value)==null?void 0:$.metric_type)==null?void 0:re.code)==="formula"}),R=G(()=>l.value.format_type==="dropdown"),E=G(()=>l.value.morpheme_type==="prefix"),y=G(()=>l.value.morpheme_type==="suffix"),b=G(()=>S.value),F=G(()=>a.value&&!g.value&&!o.disabled&&!v.value&&!g.value),x=oe(null),V=oe(null),I=G(()=>({disabled:o.disabled,readOnly:o.readOnly,error:C.value,inputRef:x,wrapperRef:V,clickable:!0,isEmpty:g.value})),{argsMain:M,isHover:P}=Ws(I),N=G(()=>{if(g.value)return"-";const $=o.value,{format_type:re,format_value:Ae,format_symbol:Ie,mapping:Ve}=l.value;if(Ve&&typeof Ve=="object"&&!Array.isArray(Ve)){const tt=Ve[`!${$}`];if(tt)return tt}if(re==="dropdown"){const tt=c.value.find(ht=>String(ht.value)===String($));if(tt)return tt.name}if(typeof $=="string"&&isNaN(Number($)))return $;const ot=parseInt(String(Ae)||"0",10)||0;try{const ht=Number($).toFixed(ot);return re==="currency"&&Ie?`${Ie}${ht}`:ht}catch(tt){return console.error("Error formatting metric value:",tt),String($)}}),ie=G(()=>({content:Be.value,hideOnClick:!1,contentClass:"extra-padding"}));G(()=>({content:"Clear",hideOnClick:!1,contentClass:"extra-padding"}));const{copyToClipboard:ve,tooltip:Be}=uD(N.value),ee=G(()=>({maxRating:l.value.range||5,readOnly:o.readOnly,disabled:o.disabled,size:Xv}));wt(()=>o.value,$=>{const re=Number($);Number.isFinite(re)&&re!==r.value?r.value=re:$==null&&r.value!==0&&(r.value=0)},{immediate:!0});const U=()=>{o.disabled||(a.value=!0)},L=()=>{a.value=!1};return($,re)=>ut((j(),Xe(zs,fn(Z(M),{onMouseenter:U,style:{"--icon-size":"52px"},onMouseleave:L,ref_key:"wrapperRef",ref:V}),{suffix:De(()=>[Z(P)?(j(),Ce("div",{key:0,class:z($.$style.suffix)},[F.value&&!g.value&&!C.value?ut((j(),Xe(gt,{key:0,variant:["icon","secondary"],size:24,onClick:Ut(Z(ve),["prevent","stop"])},{default:De(()=>[ye(lt,{src:"Copy",source:"remote",size:12})]),_:1},8,["onClick"])),[[Z(i),ie.value]]):at("",!0),!e.readOnly&&!g.value&&!C.value?(j(),Xe(gt,{key:1,style:hn({display:R.value&&!g.value&&!C.value?void 0:"none!important"}),variant:["icon","secondary"],size:24},{default:De(()=>[ye(lt,{src:"ChevronDown",source:"remote",size:12,style:{width:"20px"}})]),_:1},8,["style"])):at("",!0)],2)):at("",!0)]),default:De(()=>[v.value?(j(),Xe(lT,{key:0,modelValue:r.value,"onUpdate:modelValue":re[0]||(re[0]=Ae=>r.value=Ae),params:ee.value,readOnly:!0,disabled:o.disabled},{icon:De(()=>[ye(lt,{source:"rating",src:u.value||"Star",size:Xv},null,8,["src"])]),_:1},8,["modelValue","params","disabled"])):(j(),Ce("div",{key:1,class:z([$.$style["metric-content"],$.$style["metric-icon"]])},[b.value?(j(),Xe(lt,{key:0,src:"SquareRootVariable",source:"remote",size:Xv,color:d.value},null,8,["color"])):R.value&&!C.value&&g.value?(j(),Xe(lt,{key:1,src:"ChevronDown",source:"remote",size:12,style:{width:"20px"},color:"var(--grey-300)"})):g.value&&!C.value?(j(),Ce("span",{key:2,class:z($.$style["metric-empty"])}," - ",2)):at("",!0),!g.value&&!C.value?(j(),Ce(At,{key:3},[E.value?(j(),Ce("span",{key:0,class:z([$.$style["metric-morpheme"],$.$style["metric-morpheme--prefix"]])},yt(l.value.morpheme_value),3)):at("",!0),ut((j(),Ce("span",{class:z([$.$style["metric-value"]])},[bt(yt(N.value),1)],2)),[[Z(i),p.value]]),y.value?(j(),Ce("span",{key:1,class:z([$.$style["metric-morpheme"],$.$style["metric-morpheme--suffix"]])},yt(l.value.morpheme_value),3)):at("",!0)],64)):at("",!0),C.value?(j(),Ce("div",N4,"Error")):at("",!0)],2))]),_:1},16)),[[Z(n),{isLoading:h.value}]])}}),[["__cssModules",{$style:{"metric-renderer":"_metric-renderer_wuhgv_1","metric-renderer--hovered":"_metric-renderer--hovered_wuhgv_13","metric-content":"_metric-content_wuhgv_17","metric-value":"_metric-value_wuhgv_26","metric-value--number":"_metric-value--number_wuhgv_31","metric-value--currency":"_metric-value--currency_wuhgv_31","metric-value--percentage":"_metric-value--percentage_wuhgv_31","metric-morpheme":"_metric-morpheme_wuhgv_35","metric-morpheme--suffix":"_metric-morpheme--suffix_wuhgv_42","metric-empty":"_metric-empty_wuhgv_46","metric-icon":"_metric-icon_wuhgv_52","metric-actions":"_metric-actions_wuhgv_59",suffix:"_suffix_wuhgv_80"}}]]),B4=["onClick"],H4=Et(ct({__name:"Select",props:{options:{},value:{},onChange:{type:Function}},setup(e){const t=e,{triggerRef:n,popupRef:i,isVisible:s}=$s({trigger:"click",placement:"bottom-start",interactive:!0,arrow:!1,theme:"light",appendTo(o){return document.getElementById("item-table-layout-id")||document.body}});return(o,r)=>(j(),Ce("div",{class:z(o.$style.select)},[me("div",{class:"trigger",ref_key:"triggerRef",ref:n},[vt(o.$slots,"trigger",{visibled:Z(s)})],512),me("div",{class:"options",ref_key:"popupRef",ref:i},[vt(o.$slots,"options",{},()=>[(j(!0),Ce(At,null,yn(t.options,a=>(j(),Ce("div",{key:a.value,onClick:l=>(t==null?void 0:t.onChange)&&(t==null?void 0:t.onChange(a.value))},yt(a.label),9,B4))),128))])],512)],2))}}),[["__cssModules",{$style:{select:"_select_ps68k_1"}}]]),G4=Et(ct({__name:"HeaderSorting",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean},modelValue:{}},emits:["sort-changed","update:modelValue"],setup(e,{emit:t}){const n=wn,i={START_ASC:{value:"start_asc",label:"Soonest to furthest start"},START_DESC:{value:"start_desc",label:"Furthest to soonest start"},DUE_ASC:{value:"due_asc",label:"Soonest to furthest due"},DUE_DESC:{value:"due_desc",label:"Furthest to soonest due"}},s={desc:{value:"desc",label:"Newest to oldest"},asc:{value:"asc",label:"Oldest to newest"}},o={asc:{value:"asc",label:"Smallest to largest"},desc:{value:"desc",label:"Largest to smallest"}},r={asc:{value:"asc",label:"Sort Ascending"},desc:{value:"desc",label:"Sort Descending"}},a={label:"Clear sorting",value:"none",selected:!1,type:"text",iconName:"XMark"},l=e,u=G(()=>{const y=l.headerType??l.params.column.getColId();return y==="dateRange"?"dateRange":y==="date"?"date":y==="number"?"number":"default"}),c=G(()=>{var y;return((y=l.params)==null?void 0:y.displayName)??""}),d=G(()=>{let y=[];switch(u.value){case"dateRange":y=Object.values(i).map(b=>({...b,selected:p.value===b.value,type:"text"}));break;case"date":y=Object.values(s).map(b=>({...b,selected:p.value===b.value,type:"text"}));break;case"number":y=Object.values(o).map(b=>({...b,selected:p.value===b.value,type:"text"}));break;default:y=Object.values(r).map(b=>({...b,selected:p.value===b.value,type:"text"}));break}return p.value!=="none"&&y.push(a),y}),h=G(()=>String(p.value).endsWith("asc")?"SortUp":String(p.value).endsWith("desc")?"SortDown":"Sort"),p=oe(l.modelValue??"none"),g=y=>{R("update:modelValue",y),R("sort-changed",y)},C=y=>{p.value=y},v=To(()=>{if(u.value==="date"||u.value==="default"||u.value==="number"){const y=p.value==="none"?"asc":p.value==="asc"?"desc":"none";p.value=y}else{const y=[i.START_ASC.value,i.START_DESC.value,i.DUE_ASC.value,i.DUE_DESC.value,"none"],F=(y.indexOf(p.value)+1)%y.length;p.value=y[F]}},300),S=G(()=>{if(p.value==="none")return"No sorting applied";const y=d.value.find(b=>b.value===p.value);return(y==null?void 0:y.label)||""}),R=t,E=G(()=>{if(l.disabled&&!l.readOnly)return"var(--disabled-color)";if(p.value!=="none")return"var(--primary-color-hover)"});return wt(()=>l.modelValue,y=>{y!==l.modelValue&&(p.value=y)}),wt(p,y=>{y!==l.modelValue&&g(y)}),(y,b)=>(j(),Xe(Jv,{options:d.value,label:c.value,readOnly:l.readOnly,disabled:l.disabled,variant:["icon","tertiary"],onHandleClick:Z(v),onSelect:b[0]||(b[0]=F=>C(F))},{prefix:De(()=>[ye(gt,{variant:["text"],onClick:Z(v),label:c.value},null,8,["onClick","label"])]),iconDropdown:De(()=>[ut(ye(lt,{src:h.value,source:"remote",size:"16",color:E.value},null,8,["src","color"]),[[Z(n),S.value]])]),_:1},8,["options","label","readOnly","disabled","onHandleClick"]))}}),[["__cssModules",{$style:{iconSorting:"_iconSorting_1luqv_1","button-group":"_button-group_1luqv_7","button-main":"_button-main_1luqv_12","button-dropdown-trigger":"_button-dropdown-trigger_1luqv_17","ab-table-button":"_ab-table-button_1luqv_33",headerSorting:"_headerSorting_1luqv_39"}}]]),$4=["disabled","readonly","checked","indeterminate"],uT=Et(ct({__name:"Checkbox",props:{modelValue:{type:[Number,Boolean]},disabled:{type:Boolean},readOnly:{type:Boolean},tooltipText:{},allowIndeterminate:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=wn,i=e,s=G(()=>i.allowIndeterminate?[0,1,2]:[0,2]),o=G(()=>{if(typeof i.tooltipText=="string"||!i.tooltipText)return i.tooltipText||"";switch(a.value){case 0:return i.tooltipText.unchecked;case 1:return i.tooltipText.indeterminate;case 2:return i.tooltipText.checked;default:return""}}),r=()=>{if(u.value)return;const d=(s.value.indexOf(a.value)+1)%s.value.length;a.value=s.value[d]},a=oe(typeof i.modelValue=="boolean"?i.modelValue?2:0:i.modelValue),l=G(()=>({checked:a.value===2,indeterminate:a.value===1,none:a.value===0})),u=G(()=>i.disabled||i.readOnly);return(c,d)=>ut((j(),Ce("input",{disabled:i.disabled,key:a.value,readonly:i.readOnly,type:"checkbox",class:z(c.$style["input-checkbox"]),checked:l.value.checked,indeterminate:l.value.indeterminate,onChange:r,"aria-label":"Select All Items"},null,42,$4)),[[Z(n),{content:o.value,hideOnClick:!1,contentClass:"extra-padding"}]])}}),[["__cssModules",{$style:{}}]]),W4=Et(ct({__name:"HeaderCheckbox",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{}},setup(e){const t=e,n=wn,i=oe(0),s=oe(!1),o=G(()=>i.value!==0),r=G(()=>({checked:i.value===2,indeterminate:i.value===1,UNCHECK:i.value===0})),a=G(()=>({0:"Click to select check visible items",1:"Click to select check items",2:"Click to clear selection"})[i.value]),l=G(()=>{const v=[{label:"All visible",value:"INDETERMINATE",type:"text",clickable:!0,selected:i.value===1},{label:"All",value:"CHECKED",type:"text",clickable:!0,selected:i.value===2}];return o.value&&v.push({label:"None",value:"UNCHECK",type:"text",clickable:!0,selected:i.value===0}),v}),u=v=>({selected:v.getSelectedRows().length,INDETERMINATE:(()=>{let S=0;return v.forEachNode(()=>S++),S})()}),c=({api:v,state:S})=>{i.value=S,s.value=S===2,S===0?v==null||v.deselectAll():v==null||v.forEachNode(R=>R.setSelected(!0))},d=v=>{s.value&&v.forEachNode(S=>{S.isSelected()||S.setSelected(!0)})},h=()=>{var R;const v=(R=t.params)==null?void 0:R.api;v||console.error("[HeaderCheckbox] There is no API available"),c({api:v,state:{0:1,1:2,2:0}[i.value]})},p=v=>{var E;const S=(E=t.params)==null?void 0:E.api;S||console.error("no api"),c({api:S,state:{INDETERMINATE:1,CHECKED:2,UNCHECK:0}[v]})};let g=[];Kn(()=>{var E;const v=(E=t.params)==null?void 0:E.api;if(!v)return;const S=()=>{const{selected:y,INDETERMINATE:b}=u(v);y===0?(i.value=0,s.value=!1):y===b&&b>0?i.value!==2&&(i.value=1):y>b?(i.value=2,s.value=!0):s.value&&(s.value=!1,i.value=0)},R=()=>d(v);v.addEventListener("selectionChanged",S),v.addEventListener("rowDataUpdated",R),v.addEventListener("modelUpdated",R),g=[()=>v.removeEventListener("selectionChanged",S),()=>v.removeEventListener("rowDataUpdated",R),()=>v.removeEventListener("modelUpdated",R)]}),pi(()=>{g.forEach(v=>v())});const C=`header-checkbox-${Math.random().toString(36).substr(2,9)}`;return Kn(()=>{}),(v,S)=>(j(),Xe(Jv,{options:l.value,size:24,disabled:t.disabled,readOnly:t.readOnly,variant:["icon","tertiary"],onSelect:p},{prefix:De(()=>[ut((j(),Xe(uT,{id:C,disabled:t.disabled,key:i.value,readonly:t.readOnly,type:"checkbox",checked:r.value.checked,indeterminate:r.value.indeterminate,modelValue:i.value,"onUpdate:modelValue":S[0]||(S[0]=R=>i.value=R),onChange:h,"aria-label":"Select CHECKED Items",class:z(v.$style["ag-checkbox-input"])},null,8,["disabled","readonly","checked","indeterminate","modelValue","class"])),[[Z(n),{content:a.value,hideOnClick:!1,contentClass:"extra-padding"}]])]),_:1},8,["options","disabled","readOnly"]))}}),[["__cssModules",{$style:{"ag-checkbox-input":"_ag-checkbox-input_1wkhj_1","button-group":"_button-group_1wkhj_69","button-main":"_button-main_1wkhj_69",headerCheckbox:"_headerCheckbox_1wkhj_73"}}]]),z4={key:1},U4=Et(ct({__name:"StatusRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{}},setup(e){const t=wo,n=wn,i=e,s=po(()=>i.value),o=G(()=>s.value===void 0),r=G(()=>{var p;return(p=s.value)==null?void 0:p.label}),a=oe(null),l=oe(null),u=G(()=>({disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:cz(r.value),inputRef:a,wrapperRef:l,clickable:!i.disabled&&!i.readOnly})),{argsMain:c}=Ws(u),d=G(()=>{var p,g;return{backgroundColor:Um((p=s.value)==null?void 0:p.color)?s.value.color:"#fff",border:jm((g=s.value)==null?void 0:g.color,"white")?"1px solid #ccc":"1px solid #fff"}}),h=G(()=>{var p;return((p=s.value)==null?void 0:p.name)||"No status"});return(p,g)=>ut((j(),Xe(Z(zs),fn(Z(c),{ref_key:"wrapperRef",ref:l}),{default:De(()=>[o.value?at("",!0):(j(),Ce("div",{key:0,class:z(p.$style["status-renderer"])},[s.value?(j(),Ce(At,{key:0},[me("div",{class:z(p.$style["status-renderer__color-code"]),style:hn(d.value)},null,6),ut((j(),Ce("div",{class:z(p.$style["status-renderer__status-name"])},[bt(yt(h.value),1)],2)),[[Z(n),{content:h.value}]])],64)):o.value?at("",!0):(j(),Ce("div",z4,"No status"))],2))]),_:1},16)),[[Z(t),{isLoading:o.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"}}]]),j4=Et(ct({__name:"PopupLayout",props:{popupName:{},showOverlay:{type:Boolean,default:!0},overlayOpacity:{default:.5},closeOnOverlayClick:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=e,{popupRef:i,show:s,hide:o,isVisible:r}=k3({useTrigger:!1,arrow:!1,centered:!0,showOverlay:n.showOverlay,overlayOpacity:n.overlayOpacity,closeOnOverlayClick:n.closeOnOverlayClick,appendTo(l){return document.getElementById("item-table-layout-id")||document.body}}),a=l=>{n.closeOnEscape&&l.key==="Escape"&&r.value&&o()};return Kn(()=>{document.addEventListener("keydown",a)}),pi(()=>{document.removeEventListener("keydown",a)}),t({show:s,hide:o,isVisible:r}),(l,u)=>(j(),Ce("div",{ref_key:"popupRef",ref:i,class:z(l.$style.popupContainer)},[me("div",{class:z(l.$style.popupWrapper)},[me("div",{class:z(l.$style.header)},[me("span",null,yt(e.popupName),1),me("button",{class:z(l.$style.closeBtn),onClick:u[0]||(u[0]=(...c)=>Z(o)&&Z(o)(...c))}," × ",2)],2),me("div",{class:z(l.$style.body)},[vt(l.$slots,"default")],2),me("div",{class:z(l.$style.footer)},[vt(l.$slots,"footer",{},()=>[me("button",{onClick:u[1]||(u[1]=(...c)=>Z(o)&&Z(o)(...c))},"Cancel"),me("button",{class:z(l.$style.primary),onClick:u[2]||(u[2]=(...c)=>Z(o)&&Z(o)(...c))}," Confirm ",2)])],2)],2)],2))}}),[["__cssModules",{$style:{popupContainer:"_popupContainer_1dgrg_1",popupWrapper:"_popupWrapper_1dgrg_5",popupFadeIn:"_popupFadeIn_1dgrg_1",header:"_header_1dgrg_18",closeBtn:"_closeBtn_1dgrg_28",body:"_body_1dgrg_48",footer:"_footer_1dgrg_53",primary:"_primary_1dgrg_75"}}]]);var K4=Object.create,cT=Object.defineProperty,q4=Object.getOwnPropertyDescriptor,Qv=Object.getOwnPropertyNames,Y4=Object.getPrototypeOf,Z4=Object.prototype.hasOwnProperty,J4=(e,t)=>function(){return e&&(t=(0,e[Qv(e)[0]])(e=0)),t},X4=(e,t)=>function(){return t||(0,e[Qv(e)[0]])((t={exports:{}}).exports,t),t.exports},Q4=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Qv(t))!Z4.call(e,s)&&s!==n&&cT(e,s,{get:()=>t[s],enumerable:!(i=q4(t,s))||i.enumerable});return e},e6=(e,t,n)=>(n=e!=null?K4(Y4(e)):{},Q4(cT(n,"default",{value:e,enumerable:!0}),e)),Pc=J4({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),t6=X4({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){Pc(),t.exports=i;function n(o){return o instanceof Buffer?Buffer.from(o):new o.constructor(o.buffer.slice(),o.byteOffset,o.length)}function i(o){if(o=o||{},o.circles)return s(o);const r=new Map;if(r.set(Date,d=>new Date(d)),r.set(Map,(d,h)=>new Map(l(Array.from(d),h))),r.set(Set,(d,h)=>new Set(l(Array.from(d),h))),o.constructorHandlers)for(const d of o.constructorHandlers)r.set(d[0],d[1]);let a=null;return o.proto?c:u;function l(d,h){const p=Object.keys(d),g=new Array(p.length);for(let C=0;C<p.length;C++){const v=p[C],S=d[v];typeof S!="object"||S===null?g[v]=S:S.constructor!==Object&&(a=r.get(S.constructor))?g[v]=a(S,h):ArrayBuffer.isView(S)?g[v]=n(S):g[v]=h(S)}return g}function u(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return l(d,u);if(d.constructor!==Object&&(a=r.get(d.constructor)))return a(d,u);const h={};for(const p in d){if(Object.hasOwnProperty.call(d,p)===!1)continue;const g=d[p];typeof g!="object"||g===null?h[p]=g:g.constructor!==Object&&(a=r.get(g.constructor))?h[p]=a(g,u):ArrayBuffer.isView(g)?h[p]=n(g):h[p]=u(g)}return h}function c(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return l(d,c);if(d.constructor!==Object&&(a=r.get(d.constructor)))return a(d,c);const h={};for(const p in d){const g=d[p];typeof g!="object"||g===null?h[p]=g:g.constructor!==Object&&(a=r.get(g.constructor))?h[p]=a(g,c):ArrayBuffer.isView(g)?h[p]=n(g):h[p]=c(g)}return h}}function s(o){const r=[],a=[],l=new Map;if(l.set(Date,p=>new Date(p)),l.set(Map,(p,g)=>new Map(c(Array.from(p),g))),l.set(Set,(p,g)=>new Set(c(Array.from(p),g))),o.constructorHandlers)for(const p of o.constructorHandlers)l.set(p[0],p[1]);let u=null;return o.proto?h:d;function c(p,g){const C=Object.keys(p),v=new Array(C.length);for(let S=0;S<C.length;S++){const R=C[S],E=p[R];if(typeof E!="object"||E===null)v[R]=E;else if(E.constructor!==Object&&(u=l.get(E.constructor)))v[R]=u(E,g);else if(ArrayBuffer.isView(E))v[R]=n(E);else{const y=r.indexOf(E);y!==-1?v[R]=a[y]:v[R]=g(E)}}return v}function d(p){if(typeof p!="object"||p===null)return p;if(Array.isArray(p))return c(p,d);if(p.constructor!==Object&&(u=l.get(p.constructor)))return u(p,d);const g={};r.push(p),a.push(g);for(const C in p){if(Object.hasOwnProperty.call(p,C)===!1)continue;const v=p[C];if(typeof v!="object"||v===null)g[C]=v;else if(v.constructor!==Object&&(u=l.get(v.constructor)))g[C]=u(v,d);else if(ArrayBuffer.isView(v))g[C]=n(v);else{const S=r.indexOf(v);S!==-1?g[C]=a[S]:g[C]=d(v)}}return r.pop(),a.pop(),g}function h(p){if(typeof p!="object"||p===null)return p;if(Array.isArray(p))return c(p,h);if(p.constructor!==Object&&(u=l.get(p.constructor)))return u(p,h);const g={};r.push(p),a.push(g);for(const C in p){const v=p[C];if(typeof v!="object"||v===null)g[C]=v;else if(v.constructor!==Object&&(u=l.get(v.constructor)))g[C]=u(v,h);else if(ArrayBuffer.isView(v))g[C]=n(v);else{const S=r.indexOf(v);S!==-1?g[C]=a[S]:g[C]=h(v)}}return r.pop(),a.pop(),g}}}});Pc(),Pc(),Pc();var dT=typeof navigator<"u",it=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof it.chrome<"u"&&it.chrome.devtools,dT&&(it.self,it.top);var hT;typeof navigator<"u"&&((hT=navigator.userAgent)==null||hT.toLowerCase().includes("electron")),Pc();var n6=e6(t6()),i6=/(?:^|[-_/])(\w)/g;function s6(e,t){return t?t.toUpperCase():""}function o6(e){return e&&`${e}`.replace(i6,s6)}function r6(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const i=n.lastIndexOf("/"),s=n.substring(i+1);{const o=s.lastIndexOf(t);return s.substring(0,o)}}var fT=(0,n6.default)({circles:!0});const a6={trailing:!0};function Pl(e,t=25,n={}){if(n={...a6,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let i,s,o=[],r,a;const l=(u,c)=>(r=l6(e,u,c),r.finally(()=>{if(r=null,n.trailing&&a&&!s){const d=l(u,a);return a=null,d}}),r);return function(...u){return r?(n.trailing&&(a=u),r):new Promise(c=>{const d=!s&&n.leading;clearTimeout(s),s=setTimeout(()=>{s=null;const h=n.leading?i:l(this,u);for(const p of o)p(h);o=[]},t),d?(i=l(this,u),c(i)):o.push(c)})}}async function l6(e,t,n){return await e.apply(t,n)}function eC(e,t={},n){for(const i in e){const s=e[i],o=n?`${n}:${i}`:i;typeof s=="object"&&s!==null?eC(s,t,o):typeof s=="function"&&(t[o]=s)}return t}const u6={run:e=>e()},c6=()=>u6,pT=typeof console.createTask<"u"?console.createTask:c6;function d6(e,t){const n=t.shift(),i=pT(n);return e.reduce((s,o)=>s.then(()=>i.run(()=>o(...t))),Promise.resolve())}function h6(e,t){const n=t.shift(),i=pT(n);return Promise.all(e.map(s=>i.run(()=>s(...t))))}function tC(e,t){for(const n of[...e])n(t)}class f6{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,i={}){if(!t||typeof n!="function")return()=>{};const s=t;let o;for(;this._deprecatedHooks[t];)o=this._deprecatedHooks[t],t=o.to;if(o&&!i.allowDeprecated){let r=o.message;r||(r=`${s} hook has been deprecated`+(o.to?`, please use ${o.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(r)||(console.warn(r),this._deprecatedMessages.add(r))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let i,s=(...o)=>(typeof i=="function"&&i(),i=void 0,s=void 0,n(...o));return i=this.hook(t,s),i}removeHook(t,n){if(this._hooks[t]){const i=this._hooks[t].indexOf(n);i!==-1&&this._hooks[t].splice(i,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const i=this._hooks[t]||[];delete this._hooks[t];for(const s of i)this.hook(t,s)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=eC(t),i=Object.keys(n).map(s=>this.hook(s,n[s]));return()=>{for(const s of i.splice(0,i.length))s()}}removeHooks(t){const n=eC(t);for(const i in n)this.removeHook(i,n[i])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(d6,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(h6,t,...n)}callHookWith(t,n,...i){const s=this._before||this._after?{name:n,args:i,context:{}}:void 0;this._before&&tC(this._before,s);const o=t(n in this._hooks?[...this._hooks[n]]:[],i);return o instanceof Promise?o.finally(()=>{this._after&&s&&tC(this._after,s)}):(this._after&&s&&tC(this._after,s),o)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function gT(){return new f6}var p6=Object.create,mT=Object.defineProperty,g6=Object.getOwnPropertyDescriptor,nC=Object.getOwnPropertyNames,m6=Object.getPrototypeOf,v6=Object.prototype.hasOwnProperty,C6=(e,t)=>function(){return e&&(t=(0,e[nC(e)[0]])(e=0)),t},vT=(e,t)=>function(){return t||(0,e[nC(e)[0]])((t={exports:{}}).exports,t),t.exports},y6=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of nC(t))!v6.call(e,s)&&s!==n&&mT(e,s,{get:()=>t[s],enumerable:!(i=g6(t,s))||i.enumerable});return e},w6=(e,t,n)=>(n=e!=null?p6(m6(e)):{},y6(mT(n,"default",{value:e,enumerable:!0}),e)),_e=C6({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),b6=vT({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){_e(),function(n){var i={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},s=["်","ް"],o={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},r={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},a={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},l=[";","?",":","@","&","=","+","$",",","/"].join(""),u=[";","?",":","@","&","=","+","$",","].join(""),c=[".","!","~","*","'","(",")"].join(""),d=function(v,S){var R="-",E="",y="",b=!0,F={},x,V,I,M,P,N,ie,ve,Be,ee,U,L,$,re,Ae="";if(typeof v!="string")return"";if(typeof S=="string"&&(R=S),ie=a.en,ve=r.en,typeof S=="object"){x=S.maintainCase||!1,F=S.custom&&typeof S.custom=="object"?S.custom:F,I=+S.truncate>1&&S.truncate||!1,M=S.uric||!1,P=S.uricNoSlash||!1,N=S.mark||!1,b=!(S.symbols===!1||S.lang===!1),R=S.separator||R,M&&(Ae+=l),P&&(Ae+=u),N&&(Ae+=c),ie=S.lang&&a[S.lang]&&b?a[S.lang]:b?a.en:{},ve=S.lang&&r[S.lang]?r[S.lang]:S.lang===!1||S.lang===!0?{}:r.en,S.titleCase&&typeof S.titleCase.length=="number"&&Array.prototype.toString.call(S.titleCase)?(S.titleCase.forEach(function(Ie){F[Ie+""]=Ie+""}),V=!0):V=!!S.titleCase,S.custom&&typeof S.custom.length=="number"&&Array.prototype.toString.call(S.custom)&&S.custom.forEach(function(Ie){F[Ie+""]=Ie+""}),Object.keys(F).forEach(function(Ie){var Ve;Ie.length>1?Ve=new RegExp("\\b"+p(Ie)+"\\b","gi"):Ve=new RegExp(p(Ie),"gi"),v=v.replace(Ve,F[Ie])});for(U in F)Ae+=U}for(Ae+=R,Ae=p(Ae),v=v.replace(/(^\s+|\s+$)/g,""),$=!1,re=!1,ee=0,L=v.length;ee<L;ee++)U=v[ee],g(U,F)?$=!1:ve[U]?(U=$&&ve[U].match(/[A-Za-z0-9]/)?" "+ve[U]:ve[U],$=!1):U in i?(ee+1<L&&s.indexOf(v[ee+1])>=0?(y+=U,U=""):re===!0?(U=o[y]+i[U],y=""):U=$&&i[U].match(/[A-Za-z0-9]/)?" "+i[U]:i[U],$=!1,re=!1):U in o?(y+=U,U="",ee===L-1&&(U=o[y]),re=!0):ie[U]&&!(M&&l.indexOf(U)!==-1)&&!(P&&u.indexOf(U)!==-1)?(U=$||E.substr(-1).match(/[A-Za-z0-9]/)?R+ie[U]:ie[U],U+=v[ee+1]!==void 0&&v[ee+1].match(/[A-Za-z0-9]/)?R:"",$=!0):(re===!0?(U=o[y]+U,y="",re=!1):$&&(/[A-Za-z0-9]/.test(U)||E.substr(-1).match(/A-Za-z0-9]/))&&(U=" "+U),$=!1),E+=U.replace(new RegExp("[^\\w\\s"+Ae+"_-]","g"),R);return V&&(E=E.replace(/(\w)(\S*)/g,function(Ie,Ve,ot){var tt=Ve.toUpperCase()+(ot!==null?ot:"");return Object.keys(F).indexOf(tt.toLowerCase())<0?tt:tt.toLowerCase()})),E=E.replace(/\s+/g,R).replace(new RegExp("\\"+R+"+","g"),R).replace(new RegExp("(^\\"+R+"+|\\"+R+"+$)","g"),""),I&&E.length>I&&(Be=E.charAt(I)===R,E=E.slice(0,I),Be||(E=E.slice(0,E.lastIndexOf(R)))),!x&&!V&&(E=E.toLowerCase()),E},h=function(v){return function(R){return d(R,v)}},p=function(v){return v.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},g=function(C,v){for(var S in v)if(v[S]===C)return!0};if(typeof t<"u"&&t.exports)t.exports=d,t.exports.createSlug=h;else if(typeof define<"u"&&define.amd)define([],function(){return d});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=d,n.createSlug=h}catch{}}(e)}}),S6=vT({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e,t){_e(),t.exports=b6()}});_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e();function E6(e){var t;const n=e.name||e._componentTag||e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||e.__name;return n==="index"&&((t=e.__file)!=null&&t.endsWith("index.vue"))?"":n}function R6(e){const t=e.__file;if(t)return o6(r6(t,".vue"))}function CT(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function iC(e){if(e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(e.root)return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function yT(e){var t,n;const i=(t=e.subTree)==null?void 0:t.type,s=iC(e);return s?((n=s==null?void 0:s.types)==null?void 0:n.Fragment)===i:!1}function wf(e){var t,n,i;const s=E6((e==null?void 0:e.type)||{});if(s)return s;if((e==null?void 0:e.root)===e)return"Root";for(const r in(n=(t=e.parent)==null?void 0:t.type)==null?void 0:n.components)if(e.parent.type.components[r]===(e==null?void 0:e.type))return CT(e,r);for(const r in(i=e.appContext)==null?void 0:i.components)if(e.appContext.components[r]===(e==null?void 0:e.type))return CT(e,r);const o=R6((e==null?void 0:e.type)||{});return o||"Anonymous Component"}function D6(e){var t,n,i;const s=(i=(n=(t=e==null?void 0:e.appContext)==null?void 0:t.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?i:0,o=e===(e==null?void 0:e.root)?"root":e.uid;return`${s}:${o}`}function sC(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function F6(){const e={top:0,bottom:0,left:0,right:0,get width(){return e.right-e.left},get height(){return e.bottom-e.top}};return e}var bf;function T6(e){return bf||(bf=document.createRange()),bf.selectNode(e),bf.getBoundingClientRect()}function x6(e){const t=F6();if(!e.children)return t;for(let n=0,i=e.children.length;n<i;n++){const s=e.children[n];let o;if(s.component)o=ca(s.component);else if(s.el){const r=s.el;r.nodeType===1||r.getBoundingClientRect?o=r.getBoundingClientRect():r.nodeType===3&&r.data.trim()&&(o=T6(r))}o&&_6(t,o)}return t}function _6(e,t){return(!e.top||t.top<e.top)&&(e.top=t.top),(!e.bottom||t.bottom>e.bottom)&&(e.bottom=t.bottom),(!e.left||t.left<e.left)&&(e.left=t.left),(!e.right||t.right>e.right)&&(e.right=t.right),e}var wT={top:0,left:0,right:0,bottom:0,width:0,height:0};function ca(e){const t=e.subTree.el;return typeof window>"u"?wT:yT(e)?x6(e.subTree):(t==null?void 0:t.nodeType)===1?t==null?void 0:t.getBoundingClientRect():e.subTree.component?ca(e.subTree.component):wT}_e();function oC(e){return yT(e)?P6(e.subTree):e.subTree?[e.subTree.el]:[]}function P6(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...oC(n.component)):n!=null&&n.el&&t.push(n.el)}),t}var bT="__vue-devtools-component-inspector__",ST="__vue-devtools-component-inspector__card__",ET="__vue-devtools-component-inspector__name__",RT="__vue-devtools-component-inspector__indicator__",DT={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},A6={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},I6={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function Al(){return document.getElementById(bT)}function k6(){return document.getElementById(ST)}function O6(){return document.getElementById(RT)}function M6(){return document.getElementById(ET)}function rC(e){return{left:`${Math.round(e.left*100)/100}px`,top:`${Math.round(e.top*100)/100}px`,width:`${Math.round(e.width*100)/100}px`,height:`${Math.round(e.height*100)/100}px`}}function aC(e){var t;const n=document.createElement("div");n.id=(t=e.elementId)!=null?t:bT,Object.assign(n.style,{...DT,...rC(e.bounds),...e.style});const i=document.createElement("span");i.id=ST,Object.assign(i.style,{...A6,top:e.bounds.top<35?0:"-35px"});const s=document.createElement("span");s.id=ET,s.innerHTML=`&lt;${e.name}&gt;&nbsp;&nbsp;`;const o=document.createElement("i");return o.id=RT,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(o.style,I6),i.appendChild(s),i.appendChild(o),n.appendChild(i),document.body.appendChild(n),n}function lC(e){const t=Al(),n=k6(),i=M6(),s=O6();t&&(Object.assign(t.style,{...DT,...rC(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),i.innerHTML=`&lt;${e.name}&gt;&nbsp;&nbsp;`,s.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function L6(e){const t=ca(e);if(!t.width&&!t.height)return;const n=wf(e);Al()?lC({bounds:t,name:n}):aC({bounds:t,name:n})}function FT(){const e=Al();e&&(e.style.display="none")}var uC=null;function cC(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(uC=n,n.vnode.el)){const s=ca(n),o=wf(n);Al()?lC({bounds:s,name:o}):aC({bounds:s,name:o})}}}function N6(e,t){if(e.preventDefault(),e.stopPropagation(),uC){const n=D6(uC);t(n)}}var Sf=null;function V6(){FT(),window.removeEventListener("mouseover",cC),window.removeEventListener("click",Sf,!0),Sf=null}function B6(){return window.addEventListener("mouseover",cC),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),N6(n,i=>{window.removeEventListener("click",t,!0),Sf=null,window.removeEventListener("mouseover",cC);const s=Al();s&&(s.style.display="none"),e(JSON.stringify({id:i}))})}Sf=t,window.addEventListener("click",t,!0)})}function H6(e){const t=sC(ui.value,e.id);if(t){const[n]=oC(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const i=ca(t),s=document.createElement("div"),o={...rC(i),position:"absolute"};Object.assign(s.style,o),document.body.appendChild(s),s.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(s)},2e3)}setTimeout(()=>{const i=ca(t);if(i.width||i.height){const s=wf(t),o=Al();o?lC({...e,name:s,bounds:i}):aC({...e,name:s,bounds:i}),setTimeout(()=>{o&&(o.style.display="none")},1500)}},1200)}}_e();var TT,xT;(xT=(TT=it).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(TT.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function G6(e){let t=0;const n=setInterval(()=>{it.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function $6(){const e=it.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function W6(){return new Promise(e=>{function t(){$6(),e(it.__VUE_INSPECTOR__)}it.__VUE_INSPECTOR__?t():G6(()=>{t()})})}_e(),_e();function z6(e){return!!(e&&e.__v_isReadonly)}function _T(e){return z6(e)?_T(e.__v_raw):!!(e&&e.__v_isReactive)}function dC(e){return!!(e&&e.__v_isRef===!0)}function Ac(e){const t=e&&e.__v_raw;return t?Ac(t):e}var U6=class{constructor(){this.refEditor=new j6}set(e,t,n,i){const s=Array.isArray(t)?t:t.split(".");for(;s.length>1;){const a=s.shift();e instanceof Map?e=e.get(a):e instanceof Set?e=Array.from(e.values())[a]:e=e[a],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}const o=s[0],r=this.refEditor.get(e)[o];i?i(e,o,n):this.refEditor.isRef(r)?this.refEditor.set(r,n):e[o]=n}get(e,t){const n=Array.isArray(t)?t:t.split(".");for(let i=0;i<n.length;i++)if(e instanceof Map?e=e.get(n[i]):e=e[n[i]],this.refEditor.isRef(e)&&(e=this.refEditor.get(e)),!e)return;return e}has(e,t,n=!1){if(typeof e>"u")return!1;const i=Array.isArray(t)?t.slice():t.split("."),s=n?2:1;for(;e&&i.length>s;){const o=i.shift();e=e[o],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}return e!=null&&Object.prototype.hasOwnProperty.call(e,i[0])}createDefaultSetCallback(e){return(t,n,i)=>{if((e.remove||e.newKey)&&(Array.isArray(t)?t.splice(n,1):Ac(t)instanceof Map?t.delete(n):Ac(t)instanceof Set?t.delete(Array.from(t.values())[n]):Reflect.deleteProperty(t,n)),!e.remove){const s=t[e.newKey||n];this.refEditor.isRef(s)?this.refEditor.set(s,i):Ac(t)instanceof Map?t.set(e.newKey||n,i):Ac(t)instanceof Set?t.add(i):t[e.newKey||n]=i}}}},j6=class{set(e,t){if(dC(e))e.value=t;else{if(e instanceof Set&&Array.isArray(t)){e.clear(),t.forEach(s=>e.add(s));return}const n=Object.keys(t);if(e instanceof Map){const s=new Set(e.keys());n.forEach(o=>{e.set(o,Reflect.get(t,o)),s.delete(o)}),s.forEach(o=>e.delete(o));return}const i=new Set(Object.keys(e));n.forEach(s=>{Reflect.set(e,s,Reflect.get(t,s)),i.delete(s)}),i.forEach(s=>Reflect.deleteProperty(e,s))}}get(e){return dC(e)?e.value:e}isRef(e){return dC(e)||_T(e)}};_e(),_e(),_e();var K6="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function q6(){if(typeof window>"u"||!dT||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const e=typeof localStorage.getItem<"u"?localStorage.getItem(K6):null;return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}_e(),_e(),_e();var PT,AT;(AT=(PT=it).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(PT.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var Y6=new Proxy(it.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function Z6(e,t){kn.timelineLayersState[t.id]=!1,Y6.push({...e,descriptorId:t.id,appRecord:iC(t.app)})}var IT,kT;(kT=(IT=it).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(IT.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var hC=new Proxy(it.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),OT=Pl(()=>{kl.hooks.callHook("sendInspectorToClient",MT())});function J6(e,t){var n,i;hC.push({options:e,descriptor:t,treeFilterPlaceholder:(n=e.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(i=e.stateFilterPlaceholder)!=null?i:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:iC(t.app)}),OT()}function MT(){return hC.filter(e=>e.descriptor.app===ui.value.app).filter(e=>e.descriptor.id!=="components").map(e=>{var t;const n=e.descriptor,i=e.options;return{id:i.id,label:i.label,logo:n.logo,icon:`custom-ic-baseline-${(t=i==null?void 0:i.icon)==null?void 0:t.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function Ef(e,t){return hC.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}function X6(){const e=gT();e.hook("addInspector",({inspector:i,plugin:s})=>{J6(i,s.descriptor)});const t=Pl(async({inspectorId:i,plugin:s})=>{var o;if(!i||!((o=s==null?void 0:s.descriptor)!=null&&o.app)||kn.highPerfModeEnabled)return;const r=Ef(i,s.descriptor.app),a={app:s.descriptor.app,inspectorId:i,filter:(r==null?void 0:r.treeFilter)||"",rootNodes:[]};await new Promise(l=>{e.callHookWith(async u=>{await Promise.all(u.map(c=>c(a))),l()},"getInspectorTree")}),e.callHookWith(async l=>{await Promise.all(l.map(u=>u({inspectorId:i,rootNodes:a.rootNodes})))},"sendInspectorTreeToClient")},120);e.hook("sendInspectorTree",t);const n=Pl(async({inspectorId:i,plugin:s})=>{var o;if(!i||!((o=s==null?void 0:s.descriptor)!=null&&o.app)||kn.highPerfModeEnabled)return;const r=Ef(i,s.descriptor.app),a={app:s.descriptor.app,inspectorId:i,nodeId:(r==null?void 0:r.selectedNodeId)||"",state:null},l={currentTab:`custom-inspector:${i}`};a.nodeId&&await new Promise(u=>{e.callHookWith(async c=>{await Promise.all(c.map(d=>d(a,l))),u()},"getInspectorState")}),e.callHookWith(async u=>{await Promise.all(u.map(c=>c({inspectorId:i,nodeId:a.nodeId,state:a.state})))},"sendInspectorStateToClient")},120);return e.hook("sendInspectorState",n),e.hook("customInspectorSelectNode",({inspectorId:i,nodeId:s,plugin:o})=>{const r=Ef(i,o.descriptor.app);r&&(r.selectedNodeId=s)}),e.hook("timelineLayerAdded",({options:i,plugin:s})=>{Z6(i,s.descriptor)}),e.hook("timelineEventAdded",({options:i,plugin:s})=>{var o;const r=["performance","component-event","keyboard","mouse"];kn.highPerfModeEnabled||!((o=kn.timelineLayersState)!=null&&o[s.descriptor.id])&&!r.includes(i.layerId)||e.callHookWith(async a=>{await Promise.all(a.map(l=>l(i)))},"sendTimelineEventToClient")}),e.hook("getComponentInstances",async({app:i})=>{const s=i.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!s)return null;const o=s.id.toString();return[...s.instanceMap].filter(([a])=>a.split(":")[0]===o).map(([,a])=>a)}),e.hook("getComponentBounds",async({instance:i})=>ca(i)),e.hook("getComponentName",({instance:i})=>wf(i)),e.hook("componentHighlight",({uid:i})=>{const s=ui.value.instanceMap.get(i);s&&L6(s)}),e.hook("componentUnhighlight",()=>{FT()}),e}var LT,NT;(NT=(LT=it).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(LT.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var VT,BT;(BT=(VT=it).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(VT.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var HT,GT;(GT=(HT=it).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(HT.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var $T,WT;(WT=($T=it).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||($T.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var zT,UT;(UT=(zT=it).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(zT.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var da="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function Q6(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:q6()}}var jT,KT;(KT=(jT=it)[da])!=null||(jT[da]=Q6());var e5=Pl(e=>{kl.hooks.callHook("devtoolsStateUpdated",{state:e})});Pl((e,t)=>{kl.hooks.callHook("devtoolsConnectedUpdated",{state:e,oldState:t})});var Rf=new Proxy(it.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?it.__VUE_DEVTOOLS_KIT_APP_RECORDS__:it.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),ui=new Proxy(it.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?it.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?it.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:it.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function qT(){e5({...it[da],appRecords:Rf.value,activeAppRecordId:ui.id,tabs:it.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:it.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function t5(e){it.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,qT()}function n5(e){it.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,qT()}var kn=new Proxy(it[da],{get(e,t){return t==="appRecords"?Rf:t==="activeAppRecordId"?ui.id:t==="tabs"?it.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?it.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:it[da][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...it[da]},e[t]=n,it[da][t]=n,!0}});function i5(e={}){var t,n,i;const{file:s,host:o,baseUrl:r=window.location.origin,line:a=0,column:l=0}=e;if(s){if(o==="chrome-extension"){const u=s.replace(/\\/g,"\\\\"),c=(n=(t=window.VUE_DEVTOOLS_CONFIG)==null?void 0:t.openInEditorHost)!=null?n:"/";fetch(`${c}__open-in-editor?file=${encodeURI(s)}`).then(d=>{if(!d.ok){const h=`Opening component ${u} failed`;console.log(`%c${h}`,"color:red")}})}else if(kn.vitePluginDetected){const u=(i=it.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?i:r;it.__VUE_INSPECTOR__.openInEditor(u,s,a,l)}}}_e(),_e(),_e(),_e(),_e();var YT,ZT;(ZT=(YT=it).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(YT.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var fC=new Proxy(it.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function pC(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function gC(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function s5(e){var t,n,i;const s=(n=(t=fC.find(o=>{var r;return o[0].id===e&&!!((r=o[0])!=null&&r.settings)}))==null?void 0:t[0])!=null?n:null;return(i=s==null?void 0:s.settings)!=null?i:null}function JT(e,t){var n,i,s;const o=gC(e);if(o){const r=localStorage.getItem(o);if(r)return JSON.parse(r)}if(e){const r=(i=(n=fC.find(a=>a[0].id===e))==null?void 0:n[0])!=null?i:null;return pC((s=r==null?void 0:r.settings)!=null?s:{})}return pC(t)}function o5(e,t){const n=gC(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(pC(t)))}function r5(e,t,n){const i=gC(e),s=localStorage.getItem(i),o=JSON.parse(s||"{}"),r={...o,[t]:n};localStorage.setItem(i,JSON.stringify(r)),kl.hooks.callHookWith(a=>{a.forEach(l=>l({pluginId:e,key:t,oldValue:o[t],newValue:n,settings:r}))},"setPluginSettings")}_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e();var XT,QT,Oi=(QT=(XT=it).__VUE_DEVTOOLS_HOOK)!=null?QT:XT.__VUE_DEVTOOLS_HOOK=gT(),a5={vueAppInit(e){Oi.hook("app:init",e)},vueAppUnmount(e){Oi.hook("app:unmount",e)},vueAppConnected(e){Oi.hook("app:connected",e)},componentAdded(e){return Oi.hook("component:added",e)},componentEmit(e){return Oi.hook("component:emit",e)},componentUpdated(e){return Oi.hook("component:updated",e)},componentRemoved(e){return Oi.hook("component:removed",e)},setupDevtoolsPlugin(e){Oi.hook("devtools-plugin:setup",e)},perfStart(e){return Oi.hook("perf:start",e)},perfEnd(e){return Oi.hook("perf:end",e)}},ex={on:a5,setupDevToolsPlugin(e,t){return Oi.callHook("devtools-plugin:setup",e,t)}},l5=class{constructor({plugin:e,ctx:t}){this.hooks=t.hooks,this.plugin=e}get on(){return{visitComponentTree:e=>{this.hooks.hook("visitComponentTree",e)},inspectComponent:e=>{this.hooks.hook("inspectComponent",e)},editComponentState:e=>{this.hooks.hook("editComponentState",e)},getInspectorTree:e=>{this.hooks.hook("getInspectorTree",e)},getInspectorState:e=>{this.hooks.hook("getInspectorState",e)},editInspectorState:e=>{this.hooks.hook("editInspectorState",e)},inspectTimelineEvent:e=>{this.hooks.hook("inspectTimelineEvent",e)},timelineCleared:e=>{this.hooks.hook("timelineCleared",e)},setPluginSettings:e=>{this.hooks.hook("setPluginSettings",e)}}}notifyComponentUpdate(e){var t;if(kn.highPerfModeEnabled)return;const n=MT().find(i=>i.packageName===this.plugin.descriptor.packageName);if(n!=null&&n.id){if(e){const i=[e.appContext.app,e.uid,(t=e.parent)==null?void 0:t.uid,e];Oi.callHook("component:updated",...i)}else Oi.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(e){this.hooks.callHook("addInspector",{inspector:e,plugin:this.plugin}),this.plugin.descriptor.settings&&o5(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){kn.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){kn.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:e,plugin:this.plugin})}selectInspectorNode(e,t){this.hooks.callHook("customInspectorSelectNode",{inspectorId:e,nodeId:t,plugin:this.plugin})}visitComponentTree(e){return this.hooks.callHook("visitComponentTree",e)}now(){return kn.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook("timelineLayerAdded",{options:e,plugin:this.plugin})}addTimelineEvent(e){kn.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:e,plugin:this.plugin})}getSettings(e){return JT(e??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(e){return this.hooks.callHook("getComponentInstances",{app:e})}getComponentBounds(e){return this.hooks.callHook("getComponentBounds",{instance:e})}getComponentName(e){return this.hooks.callHook("getComponentName",{instance:e})}highlightElement(e){const t=e.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:t})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},u5=l5;_e(),_e(),_e(),_e();var c5="__vue_devtool_undefined__",d5="__vue_devtool_infinity__",h5="__vue_devtool_negative_infinity__",f5="__vue_devtool_nan__";_e(),_e();var p5={[c5]:"undefined",[f5]:"NaN",[d5]:"Infinity",[h5]:"-Infinity"};Object.entries(p5).reduce((e,[t,n])=>(e[n]=t,e),{}),_e(),_e(),_e(),_e(),_e();var tx,nx;(nx=(tx=it).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(tx.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function ix(e,t){return ex.setupDevToolsPlugin(e,t)}function g5(e,t){const[n,i]=e;if(n.app!==t)return;const s=new u5({plugin:{setupFn:i,descriptor:n},ctx:kl});n.packageName==="vuex"&&s.on.editInspectorState(o=>{s.sendInspectorState(o.inspectorId)}),i(s)}function sx(e,t){it.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||kn.highPerfModeEnabled&&!(t!=null&&t.inspectingComponent)||(it.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),fC.forEach(n=>{g5(n,e)}))}_e(),_e();var Ic="__VUE_DEVTOOLS_ROUTER__",Il="__VUE_DEVTOOLS_ROUTER_INFO__",ox,rx;(rx=(ox=it)[Il])!=null||(ox[Il]={currentRoute:null,routes:[]});var ax,lx;(lx=(ax=it)[Ic])!=null||(ax[Ic]={}),new Proxy(it[Il],{get(e,t){return it[Il][t]}}),new Proxy(it[Ic],{get(e,t){if(t==="value")return it[Ic]}});function m5(e){const t=new Map;return((e==null?void 0:e.getRoutes())||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function mC(e){return e.map(t=>{let{path:n,name:i,children:s,meta:o}=t;return s!=null&&s.length&&(s=mC(s)),{path:n,name:i,children:s,meta:o}})}function v5(e){if(e){const{fullPath:t,hash:n,href:i,path:s,name:o,matched:r,params:a,query:l}=e;return{fullPath:t,hash:n,href:i,path:s,name:o,params:a,query:l,matched:mC(r)}}return e}function C5(e,t){function n(){var i;const s=(i=e.app)==null?void 0:i.config.globalProperties.$router,o=v5(s==null?void 0:s.currentRoute.value),r=mC(m5(s)),a=console.warn;console.warn=()=>{},it[Il]={currentRoute:o?fT(o):{},routes:fT(r)},it[Ic]=s,console.warn=a}n(),ex.on.componentUpdated(Pl(()=>{var i;((i=t.value)==null?void 0:i.app)===e.app&&(n(),!kn.highPerfModeEnabled&&kl.hooks.callHook("routerInfoUpdated",{state:it[Il]}))},200))}function y5(e){return{async getInspectorTree(t){const n={...t,app:ui.value.app,rootNodes:[]};return await new Promise(i=>{e.callHookWith(async s=>{await Promise.all(s.map(o=>o(n))),i()},"getInspectorTree")}),n.rootNodes},async getInspectorState(t){const n={...t,app:ui.value.app,state:null},i={currentTab:`custom-inspector:${t.inspectorId}`};return await new Promise(s=>{e.callHookWith(async o=>{await Promise.all(o.map(r=>r(n,i))),s()},"getInspectorState")}),n.state},editInspectorState(t){const n=new U6,i={...t,app:ui.value.app,set:(s,o=t.path,r=t.state.value,a)=>{n.set(s,o,r,a||n.createDefaultSetCallback(t.state))}};e.callHookWith(s=>{s.forEach(o=>o(i))},"editInspectorState")},sendInspectorState(t){const n=Ef(t);e.callHook("sendInspectorState",{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return B6()},cancelInspectComponentInspector(){return V6()},getComponentRenderCode(t){const n=sC(ui.value,t);if(n)return typeof(n==null?void 0:n.type)!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return H6({id:t})},openInEditor:i5,getVueInspector:W6,toggleApp(t,n){const i=Rf.value.find(s=>s.id===t);i&&(n5(t),t5(i),C5(i,ui),OT(),sx(i.app,n))},inspectDOM(t){const n=sC(ui.value,t);if(n){const[i]=oC(n);i&&(it.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=i)}},updatePluginSettings(t,n,i){r5(t,n,i)},getPluginSettings(t){return{options:s5(t),values:JT(t)}}}}_e();var ux,cx;(cx=(ux=it).__VUE_DEVTOOLS_ENV__)!=null||(ux.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var dx=X6(),hx,fx;(fx=(hx=it).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||(hx.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:dx,get state(){return{...kn,activeAppRecordId:ui.id,activeAppRecord:ui.value,appRecords:Rf.value}},api:y5(dx)});var kl=it.__VUE_DEVTOOLS_KIT_CONTEXT__;_e(),w6(S6());var px,gx;(gx=(px=it).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(px.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),_e(),_e();function w5(e){kn.highPerfModeEnabled=e??!kn.highPerfModeEnabled,!e&&ui.value&&sx(ui.value.app)}_e(),_e(),_e();function b5(e){kn.devtoolsClientDetected={...kn.devtoolsClientDetected,...e};const t=Object.values(kn.devtoolsClientDetected).some(Boolean);w5(!t)}var mx,vx;(vx=(mx=it).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(mx.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=b5),_e(),_e(),_e(),_e(),_e(),_e(),_e();var S5=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},Cx=class{constructor(t){this.generateIdentifier=t,this.kv=new S5}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},E5=class extends Cx{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};_e(),_e();function R5(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function D5(e,t){const n=R5(e);if("find"in n)return n.find(t);const i=n;for(let s=0;s<i.length;s++){const o=i[s];if(t(o))return o}}function Ol(e,t){Object.entries(e).forEach(([n,i])=>t(i,n))}function Df(e,t){return e.indexOf(t)!==-1}function yx(e,t){for(let n=0;n<e.length;n++){const i=e[n];if(t(i))return i}}var F5=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return D5(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};_e(),_e();var T5=e=>Object.prototype.toString.call(e).slice(8,-1),wx=e=>typeof e>"u",x5=e=>e===null,kc=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,vC=e=>kc(e)&&Object.keys(e).length===0,ur=e=>Array.isArray(e),_5=e=>typeof e=="string",P5=e=>typeof e=="number"&&!isNaN(e),A5=e=>typeof e=="boolean",I5=e=>e instanceof RegExp,Oc=e=>e instanceof Map,Mc=e=>e instanceof Set,bx=e=>T5(e)==="Symbol",k5=e=>e instanceof Date&&!isNaN(e.valueOf()),O5=e=>e instanceof Error,Sx=e=>typeof e=="number"&&isNaN(e),M5=e=>A5(e)||x5(e)||wx(e)||P5(e)||_5(e)||bx(e),L5=e=>typeof e=="bigint",N5=e=>e===1/0||e===-1/0,V5=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),B5=e=>e instanceof URL;_e();var Ex=e=>e.replace(/\./g,"\\."),CC=e=>e.map(String).map(Ex).join("."),Lc=e=>{const t=[];let n="";for(let s=0;s<e.length;s++){let o=e.charAt(s);if(o==="\\"&&e.charAt(s+1)==="."){n+=".",s++;continue}if(o==="."){t.push(n),n="";continue}n+=o}const i=n;return t.push(i),t};_e();function Us(e,t,n,i){return{isApplicable:e,annotation:t,transform:n,untransform:i}}var Rx=[Us(wx,"undefined",()=>null,()=>{}),Us(L5,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),Us(k5,"Date",e=>e.toISOString(),e=>new Date(e)),Us(O5,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(i=>{n[i]=e[i]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(i=>{n[i]=e[i]}),n}),Us(I5,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Us(Mc,"set",e=>[...e.values()],e=>new Set(e)),Us(Oc,"map",e=>[...e.entries()],e=>new Map(e)),Us(e=>Sx(e)||N5(e),"number",e=>Sx(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Us(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Us(B5,"URL",e=>e.toString(),e=>new URL(e))];function Ff(e,t,n,i){return{isApplicable:e,annotation:t,transform:n,untransform:i}}var Dx=Ff((e,t)=>bx(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const i=n.symbolRegistry.getValue(t[1]);if(!i)throw new Error("Trying to deserialize unknown symbol");return i}),H5=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),Fx=Ff(V5,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=H5[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function Tx(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var xx=Ff(Tx,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const i={};return n.forEach(s=>{i[s]=e[s]}),i},(e,t,n)=>{const i=n.classRegistry.getValue(t[1]);if(!i)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(i.prototype),e)}),_x=Ff((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const i=n.customTransformerRegistry.findByName(t[1]);if(!i)throw new Error("Trying to deserialize unknown custom value");return i.deserialize(e)}),G5=[xx,Dx,_x,Fx],Px=(e,t)=>{const n=yx(G5,s=>s.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const i=yx(Rx,s=>s.isApplicable(e,t));if(i)return{value:i.transform(e,t),type:i.annotation}},Ax={};Rx.forEach(e=>{Ax[e.annotation]=e});var $5=(e,t,n)=>{if(ur(t))switch(t[0]){case"symbol":return Dx.untransform(e,t,n);case"class":return xx.untransform(e,t,n);case"custom":return _x.untransform(e,t,n);case"typed-array":return Fx.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const i=Ax[t];if(!i)throw new Error("Unknown transformation: "+t);return i.untransform(e,n)}};_e();var Ml=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Ix(e){if(Df(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Df(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Df(e,"constructor"))throw new Error("constructor is not allowed as a property")}var W5=(e,t)=>{Ix(t);for(let n=0;n<t.length;n++){const i=t[n];if(Mc(e))e=Ml(e,+i);else if(Oc(e)){const s=+i,o=+t[++n]==0?"key":"value",r=Ml(e,s);switch(o){case"key":e=r;break;case"value":e=e.get(r);break}}else e=e[i]}return e},yC=(e,t,n)=>{if(Ix(t),t.length===0)return n(e);let i=e;for(let o=0;o<t.length-1;o++){const r=t[o];if(ur(i)){const a=+r;i=i[a]}else if(kc(i))i=i[r];else if(Mc(i)){const a=+r;i=Ml(i,a)}else if(Oc(i)){if(o===t.length-2)break;const l=+r,u=+t[++o]==0?"key":"value",c=Ml(i,l);switch(u){case"key":i=c;break;case"value":i=i.get(c);break}}}const s=t[t.length-1];if(ur(i)?i[+s]=n(i[+s]):kc(i)&&(i[s]=n(i[s])),Mc(i)){const o=Ml(i,+s),r=n(o);o!==r&&(i.delete(o),i.add(r))}if(Oc(i)){const o=+t[t.length-2],r=Ml(i,o);switch(+s==0?"key":"value"){case"key":{const l=n(r);i.set(l,i.get(r)),l!==r&&i.delete(r);break}case"value":{i.set(r,n(i.get(r)));break}}}return e};function wC(e,t,n=[]){if(!e)return;if(!ur(e)){Ol(e,(o,r)=>wC(o,t,[...n,...Lc(r)]));return}const[i,s]=e;s&&Ol(s,(o,r)=>{wC(o,t,[...n,...Lc(r)])}),t(i,n)}function z5(e,t,n){return wC(t,(i,s)=>{e=yC(e,s,o=>$5(o,i,n))}),e}function U5(e,t){function n(i,s){const o=W5(e,Lc(s));i.map(Lc).forEach(r=>{e=yC(e,r,()=>o)})}if(ur(t)){const[i,s]=t;i.forEach(o=>{e=yC(e,Lc(o),()=>e)}),s&&Ol(s,n)}else Ol(t,n);return e}var j5=(e,t)=>kc(e)||ur(e)||Oc(e)||Mc(e)||Tx(e,t);function K5(e,t,n){const i=n.get(e);i?i.push(t):n.set(e,[t])}function q5(e,t){const n={};let i;return e.forEach(s=>{if(s.length<=1)return;t||(s=s.map(a=>a.map(String)).sort((a,l)=>a.length-l.length));const[o,...r]=s;o.length===0?i=r.map(CC):n[CC(o)]=r.map(CC)}),i?vC(n)?[i]:[i,n]:vC(n)?void 0:n}var kx=(e,t,n,i,s=[],o=[],r=new Map)=>{var a;const l=M5(e);if(!l){K5(e,s,t);const g=r.get(e);if(g)return i?{transformedValue:null}:g}if(!j5(e,n)){const g=Px(e,n),C=g?{transformedValue:g.value,annotations:[g.type]}:{transformedValue:e};return l||r.set(e,C),C}if(Df(o,e))return{transformedValue:null};const u=Px(e,n),c=(a=u==null?void 0:u.value)!=null?a:e,d=ur(c)?[]:{},h={};Ol(c,(g,C)=>{if(C==="__proto__"||C==="constructor"||C==="prototype")throw new Error(`Detected property ${C}. This is a prototype pollution risk, please remove it from your object.`);const v=kx(g,t,n,i,[...s,C],[...o,e],r);d[C]=v.transformedValue,ur(v.annotations)?h[C]=v.annotations:kc(v.annotations)&&Ol(v.annotations,(S,R)=>{h[Ex(C)+"."+R]=S})});const p=vC(h)?{transformedValue:d,annotations:u?[u.type]:void 0}:{transformedValue:d,annotations:u?[u.type,h]:h};return l||r.set(e,p),p};_e(),_e();function Ox(e){return Object.prototype.toString.call(e).slice(8,-1)}function Mx(e){return Ox(e)==="Array"}function Y5(e){if(Ox(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function Z5(e,t,n,i,s){const o={}.propertyIsEnumerable.call(i,t)?"enumerable":"nonenumerable";o==="enumerable"&&(e[t]=n),s&&o==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function bC(e,t={}){if(Mx(e))return e.map(s=>bC(s,t));if(!Y5(e))return e;const n=Object.getOwnPropertyNames(e),i=Object.getOwnPropertySymbols(e);return[...n,...i].reduce((s,o)=>{if(Mx(t.props)&&!t.props.includes(o))return s;const r=e[o],a=bC(r,t);return Z5(s,o,a,e,t.nonenumerable),s},{})}var Qt=class{constructor({dedupe:e=!1}={}){this.classRegistry=new E5,this.symbolRegistry=new Cx(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new F5,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=kx(e,t,this,this.dedupe),i={json:n.transformedValue};n.annotations&&(i.meta={...i.meta,values:n.annotations});const s=q5(t,this.dedupe);return s&&(i.meta={...i.meta,referentialEqualities:s}),i}deserialize(e){const{json:t,meta:n}=e;let i=bC(t);return n!=null&&n.values&&(i=z5(i,n.values,this)),n!=null&&n.referentialEqualities&&(i=U5(i,n.referentialEqualities)),i}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};Qt.defaultInstance=new Qt,Qt.serialize=Qt.defaultInstance.serialize.bind(Qt.defaultInstance),Qt.deserialize=Qt.defaultInstance.deserialize.bind(Qt.defaultInstance),Qt.stringify=Qt.defaultInstance.stringify.bind(Qt.defaultInstance),Qt.parse=Qt.defaultInstance.parse.bind(Qt.defaultInstance),Qt.registerClass=Qt.defaultInstance.registerClass.bind(Qt.defaultInstance),Qt.registerSymbol=Qt.defaultInstance.registerSymbol.bind(Qt.defaultInstance),Qt.registerCustom=Qt.defaultInstance.registerCustom.bind(Qt.defaultInstance),Qt.allowErrorProps=Qt.defaultInstance.allowErrorProps.bind(Qt.defaultInstance),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e(),_e();var Lx,Nx;(Nx=(Lx=it).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(Lx.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var Vx,Bx;(Bx=(Vx=it).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(Vx.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var Hx,Gx;(Gx=(Hx=it).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(Hx.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var $x,Wx;(Wx=($x=it).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||($x.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var zx,Ux;(Ux=(zx=it).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(zx.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var jx,Kx;(Kx=(jx=it).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(jx.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),_e(),_e(),_e(),_e(),_e(),_e(),_e();/*!
79
+ * pinia v3.0.4
80
+ * (c) 2025 Eduardo San Martin Morote
81
+ * @license MIT
82
+ */const Po=typeof window<"u";let ha;const Nc=e=>ha=e;A.env.NODE_ENV;const Tf=A.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function fa(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var js;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(js||(js={}));const qx=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 J5(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 SC(e,t,n){const i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){Jx(i.response,t,n)},i.onerror=function(){console.error("could not download file")},i.send()}function Yx(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function xf(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 _f=typeof navigator=="object"?navigator:{userAgent:""},Zx=/Macintosh/.test(_f.userAgent)&&/AppleWebKit/.test(_f.userAgent)&&!/Safari/.test(_f.userAgent),Jx=Po?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Zx?X5:"msSaveOrOpenBlob"in _f?Q5:ej:()=>{};function X5(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?Yx(i.href)?SC(e,t,n):(i.target="_blank",xf(i)):xf(i)):(i.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(i.href)},4e4),setTimeout(function(){xf(i)},0))}function Q5(e,t="download",n){if(typeof e=="string")if(Yx(e))SC(e,t,n);else{const i=document.createElement("a");i.href=e,i.target="_blank",setTimeout(function(){xf(i)})}else navigator.msSaveOrOpenBlob(J5(e,n),t)}function ej(e,t,n,i){if(i=i||open("","_blank"),i&&(i.document.title=i.document.body.innerText="downloading..."),typeof e=="string")return SC(e,t,n);const s=e.type==="application/octet-stream",o=/constructor/i.test(String(qx.HTMLElement))||"safari"in qx,r=/CriOS\/[\d]+/.test(navigator.userAgent);if((r||s&&o||Zx)&&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 Mn(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 EC(e){return"_a"in e&&"install"in e}function Xx(){if(!("clipboard"in navigator))return Mn("Your browser doesn't support the Clipboard API","error"),!0}function Qx(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(Mn('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function tj(e){if(!Xx())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),Mn("Global state copied to clipboard.")}catch(t){if(Qx(t))return;Mn("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function nj(e){if(!Xx())try{e_(e,JSON.parse(await navigator.clipboard.readText())),Mn("Global state pasted from clipboard.")}catch(t){if(Qx(t))return;Mn("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function ij(e){try{Jx(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){Mn("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Ao;function sj(){Ao||(Ao=document.createElement("input"),Ao.type="file",Ao.accept=".json");function e(){return new Promise((t,n)=>{Ao.onchange=async()=>{const i=Ao.files;if(!i)return t(null);const s=i.item(0);return t(s?{text:await s.text(),file:s}:null)},Ao.oncancel=()=>t(null),Ao.onerror=n,Ao.click()})}return e}async function oj(e){try{const n=await sj()();if(!n)return;const{text:i,file:s}=n;e_(e,JSON.parse(i)),Mn(`Global state imported from "${s.name}".`)}catch(t){Mn("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function e_(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 bs(e){return{_custom:{display:e}}}const t_="🍍 Pinia (root)",Pf="_root";function rj(e){return EC(e)?{id:Pf,label:t_}:{id:e.$id,label:e.$id}}function aj(e){if(EC(e)){const n=Array.from(e._s.keys()),i=e._s;return{state:n.map(o=>({editable:!0,key:o,value:e.state.value[o]})),getters:n.filter(o=>i.get(o)._getters).map(o=>{const r=i.get(o);return{editable:!1,key:o,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 lj(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:bs(e.type),key:bs(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function uj(e){switch(e){case js.direct:return"mutation";case js.patchFunction:return"$patch";case js.patchObject:return"$patch";default:return"unknown"}}let Ll=!0;const Af=[],pa="pinia:mutations",Zn="pinia",{assign:cj}=Object,If=e=>"🍍 "+e;function dj(e,t){ix({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Af,app:e},n=>{typeof n.now!="function"&&Mn("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:pa,label:"Pinia 🍍",color:15064968}),n.addInspector({id:Zn,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{tj(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await nj(t),n.sendInspectorTree(Zn),n.sendInspectorState(Zn)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{ij(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await oj(t),n.sendInspectorTree(Zn),n.sendInspectorState(Zn)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:i=>{const s=t._s.get(i);s?typeof s.$reset!="function"?Mn(`Cannot reset "${i}" store because it doesn't have a "$reset" method implemented.`,"warn"):(s.$reset(),Mn(`Store "${i}" reset.`)):Mn(`Cannot reset "${i}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent(i=>{const s=i.componentInstance&&i.componentInstance.proxy;if(s&&s._pStores){const o=i.componentInstance.proxy._pStores;Object.values(o).forEach(r=>{i.instanceData.state.push({type:If(r.$id),key:"state",editable:!0,value:r._isOptionsAPI?{_custom:{value:mt(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:If(r.$id),key:"getters",editable:!1,value:r._getters.reduce((a,l)=>{try{a[l]=r[l]}catch(u){a[l]=u}return a},{})})})}}),n.on.getInspectorTree(i=>{if(i.app===e&&i.inspectorId===Zn){let s=[t];s=s.concat(Array.from(t._s.values())),i.rootNodes=(i.filter?s.filter(o=>"$id"in o?o.$id.toLowerCase().includes(i.filter.toLowerCase()):t_.toLowerCase().includes(i.filter.toLowerCase())):s).map(rj)}}),globalThis.$pinia=t,n.on.getInspectorState(i=>{if(i.app===e&&i.inspectorId===Zn){const s=i.nodeId===Pf?t:t._s.get(i.nodeId);if(!s)return;s&&(i.nodeId!==Pf&&(globalThis.$store=mt(s)),i.state=aj(s))}}),n.on.editInspectorState(i=>{if(i.app===e&&i.inspectorId===Zn){const s=i.nodeId===Pf?t:t._s.get(i.nodeId);if(!s)return Mn(`store "${i.nodeId}" not found`,"error");const{path:o}=i;EC(s)?o.unshift("state"):(o.length!==1||!s._customProperties.has(o[0])||o[0]in s.$state)&&o.unshift("$state"),Ll=!1,i.set(s,o,i.state.value),Ll=!0}}),n.on.editComponentState(i=>{if(i.type.startsWith("🍍")){const s=i.type.replace(/^🍍\s*/,""),o=t._s.get(s);if(!o)return Mn(`store "${s}" not found`,"error");const{path:r}=i;if(r[0]!=="state")return Mn(`Invalid path for store "${s}":
83
+ ${r}
84
+ Only state can be modified.`);r[0]="$state",Ll=!1,i.set(o,r,i.state.value),Ll=!0}})})}function hj(e,t){Af.includes(If(t.$id))||Af.push(If(t.$id)),ix({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Af,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:u})=>{const c=n_++;n.addTimelineEvent({layerId:pa,event:{time:i(),title:"🛫 "+l,subtitle:"start",data:{store:bs(t.$id),action:bs(l),args:u},groupId:c}}),r(d=>{cr=void 0,n.addTimelineEvent({layerId:pa,event:{time:i(),title:"🛬 "+l,subtitle:"end",data:{store:bs(t.$id),action:bs(l),args:u,result:d},groupId:c}})}),a(d=>{cr=void 0,n.addTimelineEvent({layerId:pa,event:{time:i(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:bs(t.$id),action:bs(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(r=>{wt(()=>Z(t[r]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(Zn),Ll&&n.addTimelineEvent({layerId:pa,event:{time:i(),title:"Change",subtitle:r,data:{newValue:a,oldValue:l},groupId:cr}})},{deep:!0})}),t.$subscribe(({events:r,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(Zn),!Ll)return;const u={time:i(),title:uj(a),data:cj({store:bs(t.$id)},lj(r)),groupId:cr};a===js.patchFunction?u.subtitle="⤵️":a===js.patchObject?u.subtitle="🧩":r&&!Array.isArray(r)&&(u.subtitle=r.type),r&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:r}}),n.addTimelineEvent({layerId:pa,event:u})},{detached:!0,flush:"sync"});const s=t._hotUpdate;t._hotUpdate=Zo(r=>{s(r),n.addTimelineEvent({layerId:pa,event:{time:i(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:bs(t.$id),info:bs("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(Zn),n.sendInspectorState(Zn)});const{$dispose:o}=t;t.$dispose=()=>{o(),n.notifyComponentUpdate(),n.sendInspectorTree(Zn),n.sendInspectorState(Zn),n.getSettings().logStoreChanges&&Mn(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(Zn),n.sendInspectorState(Zn),n.getSettings().logStoreChanges&&Mn(`"${t.$id}" store installed 🆕`)})}let n_=0,cr;function i_(e,t,n){const i=t.reduce((s,o)=>(s[o]=mt(e)[o],s),{});for(const s in i)e[s]=function(){const o=n_,r=n?new Proxy(e,{get(...l){return cr=o,Reflect.get(...l)},set(...l){return cr=o,Reflect.set(...l)}}):e;cr=o;const a=i[s].apply(r,arguments);return cr=void 0,a}}function fj({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){i_(t,Object.keys(n.actions),t._isOptionsAPI);const i=t._hotUpdate;mt(t)._hotUpdate=function(s){i.apply(this,arguments),i_(t,Object.keys(s._hmrPayload.actions),!!t._isOptionsAPI)}}hj(e,t)}}function pj(){const e=Pb(!0),t=e.run(()=>oe({}));let n=[],i=[];const s=Zo({install(o){Nc(s),s._a=o,o.provide(Tf,s),o.config.globalProperties.$pinia=s,A.env.NODE_ENV!=="production"&&A.env.NODE_ENV!=="test"&&Po&&dj(o,s),i.forEach(r=>n.push(r)),i=[]},use(o){return this._a?n.push(o):i.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return A.env.NODE_ENV!=="production"&&A.env.NODE_ENV!=="test"&&Po&&typeof Proxy<"u"&&s.use(fj),s}function s_(e,t){for(const n in t){const i=t[n];if(!(n in e))continue;const s=e[n];fa(s)&&fa(i)&&!Ht(i)&&!Hi(i)?e[n]=s_(s,i):e[n]=i}return e}const o_=()=>{};function r_(e,t,n,i=o_){e.add(t);const s=()=>{e.delete(t)&&i()};return!n&&Ab()&&bO(s),s}function Nl(e,...t){e.forEach(n=>{n(...t)})}const gj=e=>e(),a_=Symbol(),RC=Symbol();function DC(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],s=e[n];fa(s)&&fa(i)&&e.hasOwnProperty(n)&&!Ht(i)&&!Hi(i)?e[n]=DC(s,i):e[n]=i}return e}const mj=A.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function vj(e){return!fa(e)||!Object.prototype.hasOwnProperty.call(e,mj)}const{assign:Xi}=Object;function l_(e){return!!(Ht(e)&&e.effect)}function u_(e,t,n,i){const{state:s,actions:o,getters:r}=t,a=n.state.value[e];let l;function u(){!a&&(A.env.NODE_ENV==="production"||!i)&&(n.state.value[e]=s?s():{});const c=A.env.NODE_ENV!=="production"&&i?kg(oe(s?s():{}).value):kg(n.state.value[e]);return Xi(c,o,Object.keys(r||{}).reduce((d,h)=>(A.env.NODE_ENV!=="production"&&h in c&&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]=Zo(G(()=>{Nc(n);const p=n._s.get(e);return r[h].call(p,p)})),d),{}))}return l=FC(e,u,t,n,i,!0),l}function FC(e,t,n={},i,s,o){let r;const a=Xi({actions:{}},n);if(A.env.NODE_ENV!=="production"&&!i._e.active)throw new Error("Pinia destroyed");const l={deep:!0};A.env.NODE_ENV!=="production"&&(l.onTrigger=M=>{u?p=M:u==!1&&!x._hotUpdating&&(Array.isArray(p)?p.push(M):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,c,d=new Set,h=new Set,p;const g=i.state.value[e];!o&&!g&&(A.env.NODE_ENV==="production"||!s)&&(i.state.value[e]={});const C=oe({});let v;function S(M){let P;u=c=!1,A.env.NODE_ENV!=="production"&&(p=[]),typeof M=="function"?(M(i.state.value[e]),P={type:js.patchFunction,storeId:e,events:p}):(DC(i.state.value[e],M),P={type:js.patchObject,payload:M,storeId:e,events:p});const N=v=Symbol();In().then(()=>{v===N&&(u=!0)}),c=!0,Nl(d,P,i.state.value[e])}const R=o?function(){const{state:P}=n,N=P?P():{};this.$patch(ie=>{Xi(ie,N)})}:A.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:o_;function E(){r.stop(),d.clear(),h.clear(),i._s.delete(e)}const y=(M,P="")=>{if(a_ in M)return M[RC]=P,M;const N=function(){Nc(i);const ie=Array.from(arguments),ve=new Set,Be=new Set;function ee($){ve.add($)}function U($){Be.add($)}Nl(h,{args:ie,name:N[RC],store:x,after:ee,onError:U});let L;try{L=M.apply(this&&this.$id===e?this:x,ie)}catch($){throw Nl(Be,$),$}return L instanceof Promise?L.then($=>(Nl(ve,$),$)).catch($=>(Nl(Be,$),Promise.reject($))):(Nl(ve,L),L)};return N[a_]=!0,N[RC]=P,N},b=Zo({actions:{},getters:{},state:[],hotState:C}),F={_p:i,$id:e,$onAction:r_.bind(null,h),$patch:S,$reset:R,$subscribe(M,P={}){const N=r_(d,M,P.detached,()=>ie()),ie=r.run(()=>wt(()=>i.state.value[e],ve=>{(P.flush==="sync"?c:u)&&M({storeId:e,type:js.direct,events:p},ve)},Xi({},l,P)));return N},$dispose:E},x=Ps(A.env.NODE_ENV!=="production"||A.env.NODE_ENV!=="production"&&A.env.NODE_ENV!=="test"&&Po?Xi({_hmrPayload:b,_customProperties:Zo(new Set)},F):F);i._s.set(e,x);const I=(i._a&&i._a.runWithContext||gj)(()=>i._e.run(()=>(r=Pb()).run(()=>t({action:y}))));for(const M in I){const P=I[M];if(Ht(P)&&!l_(P)||Hi(P))A.env.NODE_ENV!=="production"&&s?C.value[M]=po(I,M):o||(g&&vj(P)&&(Ht(P)?P.value=g[M]:DC(P,g[M])),i.state.value[e][M]=P),A.env.NODE_ENV!=="production"&&b.state.push(M);else if(typeof P=="function"){const N=A.env.NODE_ENV!=="production"&&s?P:y(P,M);I[M]=N,A.env.NODE_ENV!=="production"&&(b.actions[M]=P),a.actions[M]=P}else A.env.NODE_ENV!=="production"&&l_(P)&&(b.getters[M]=o?n.getters[M]:P,Po&&(I._getters||(I._getters=Zo([]))).push(M))}if(Xi(x,I),Xi(mt(x),I),Object.defineProperty(x,"$state",{get:()=>A.env.NODE_ENV!=="production"&&s?C.value:i.state.value[e],set:M=>{if(A.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");S(P=>{Xi(P,M)})}}),A.env.NODE_ENV!=="production"&&(x._hotUpdate=Zo(M=>{x._hotUpdating=!0,M._hmrPayload.state.forEach(P=>{if(P in x.$state){const N=M.$state[P],ie=x.$state[P];typeof N=="object"&&fa(N)&&fa(ie)?s_(N,ie):M.$state[P]=ie}x[P]=po(M.$state,P)}),Object.keys(x.$state).forEach(P=>{P in M.$state||delete x[P]}),u=!1,c=!1,i.state.value[e]=po(M._hmrPayload,"hotState"),c=!0,In().then(()=>{u=!0});for(const P in M._hmrPayload.actions){const N=M[P];x[P]=y(N,P)}for(const P in M._hmrPayload.getters){const N=M._hmrPayload.getters[P],ie=o?G(()=>(Nc(i),N.call(x,x))):N;x[P]=ie}Object.keys(x._hmrPayload.getters).forEach(P=>{P in M._hmrPayload.getters||delete x[P]}),Object.keys(x._hmrPayload.actions).forEach(P=>{P in M._hmrPayload.actions||delete x[P]}),x._hmrPayload=M._hmrPayload,x._getters=M._getters,x._hotUpdating=!1})),A.env.NODE_ENV!=="production"&&A.env.NODE_ENV!=="test"&&Po){const M={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(P=>{Object.defineProperty(x,P,Xi({value:x[P]},M))})}return i._p.forEach(M=>{if(A.env.NODE_ENV!=="production"&&A.env.NODE_ENV!=="test"&&Po){const P=r.run(()=>M({store:x,app:i._a,pinia:i,options:a}));Object.keys(P||{}).forEach(N=>x._customProperties.add(N)),Xi(x,P)}else Xi(x,r.run(()=>M({store:x,app:i._a,pinia:i,options:a})))}),A.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
85
+ state: () => new MyClass()
86
+ Found in store "${x.$id}".`),g&&o&&n.hydrate&&n.hydrate(x.$state,g),u=!0,c=!0,x}/*! #__NO_SIDE_EFFECTS__ */function c_(e,t,n){let i;const s=typeof t=="function";i=s?n:t;function o(r,a){const l=Xg();if(r=(A.env.NODE_ENV==="test"&&ha&&ha._testing?null:r)||(l?Ri(Tf,null):null),r&&Nc(r),A.env.NODE_ENV!=="production"&&!ha)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
87
+ See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
88
+ This will fail in production.`);r=ha,r._s.has(e)||(s?FC(e,t,i,r):u_(e,i,r),A.env.NODE_ENV!=="production"&&(o._pinia=r));const u=r._s.get(e);if(A.env.NODE_ENV!=="production"&&a){const c="__hot:"+e,d=s?FC(c,t,i,r,!0):u_(c,Xi({},i),r,!0);a._hotUpdate(d),delete r.state.value[c],r._s.delete(c)}if(A.env.NODE_ENV!=="production"&&Po){const c=Ti();if(c&&c.proxy&&!a){const d=c.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[e]=u}}return u}return o.$id=e,o}function TC(e){const t=mt(e),n={};for(const i in t){const s=t[i];s.effect?n[i]=G({get:()=>e[i],set(o){e[i]=o}}):(Ht(s)||Hi(s))&&(n[i]=po(e,i))}return n}const d_=c_("toast",()=>{const e=oe([]),t=(i,s=5e3)=>{const o={...i,id:i.id??Date.now()+Math.random()};e.value.push(o),s>0&&i.type!=="interactive"&&setTimeout(()=>{n(o.id)},s)};function n(i){e.value=e.value.filter(s=>s.id!==i)}return{notifications:e,addNotification:t,removeNotification:n}}),Cj=["innerHTML"],yj=Et(ct({__name:"Snackbar",setup(e){const t=yN,n=d_(),{removeNotification:i}=n,{notifications:s}=TC(n),o=r=>r.trim().startsWith("<svg");return(r,a)=>(j(),Xe(nN,{name:"list",tag:"div",class:z(r.$style["notification-wrapper"])},{default:De(()=>[(j(!0),Ce(At,null,yn(Z(s),l=>{var u;return ut((j(),Ce("div",{key:l.id,class:z([r.$style["notification-item"],r.$style[`notification--${l.type||"info"}`],!(l!=null&&l.actions)||((u=l==null?void 0:l.actions)==null?void 0:u.length)==0?r.$style["snackbar-type"]:""])},[me("p",{class:z(r.$style.snackbar__message)},[l.icon&&!o(l.icon)?(j(),Xe(lt,{key:0,src:l.icon,source:"remote",size:"16"},null,8,["src"])):at("",!0),l.icon&&o(l.icon)?(j(),Ce("i",{key:1,class:z(r.$style["icon-draw"]),innerHTML:l.icon},null,10,Cj)):at("",!0),bt(" "+yt(l.message),1)],2),l.actions?(j(),Ce("div",{key:0,class:z(r.$style["actions-notification"])},[(j(!0),Ce(At,null,yn(l.actions,c=>(j(),Xe(gt,fn({key:c.label},{ref_for:!0},c,{onClick:c.action}),{prefix:De(()=>[c.btnIcon?(j(),Xe(lt,{key:0,src:c.btnIcon,source:"remote",size:"12"},null,8,["src"])):at("",!0)]),_:2},1040,["onClick"]))),128))],2)):at("",!0),ye(gt,{variant:"tertiary",onClick:c=>Z(i)(l.id),class:z(r.$style["close-btn"]),size:18},{default:De(()=>[ye(lt,{src:"Xmark",size:"12"})]),_:1},8,["onClick","class"])],2)),[[Z(t)]])}),128))]),_:1},8,["class"]))}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_1660r_1","notification-item":"_notification-item_1660r_14","notification--success":"_notification--success_1660r_28","notification--error":"_notification--error_1660r_31","close-btn":"_close-btn_1660r_35","notification--info":"_notification--info_1660r_38","notification--warning":"_notification--warning_1660r_45","notification--interactive":"_notification--interactive_1660r_52","snackbar-type":"_snackbar-type_1660r_56",snackbar__message:"_snackbar__message_1660r_64","actions-notification":"_actions-notification_1660r_76"}}]]),wj=["draggable","onDragstart","onDragenter","onDragleave","onDrop","onFocus"],bj=Et(ct({__name:"DragDropList",props:{modelValue:{default:()=>[]},value:{default:void 0},groupName:{default:"default"},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","input"],setup(e,{emit:t}){const n=e,i=t,s=oe([]),o=oe(null),r=oe(null),a=oe(null),l=oe(0),u=G(()=>n.value!==void 0?n.value:n.modelValue);wt(u,E=>{s.value=[...E]},{immediate:!0});const c=(E,y)=>{var b;if(n.disabled||n.readOnly||(b=s.value[y])!=null&&b.required){E.preventDefault();return}r.value=y,E.dataTransfer&&(E.dataTransfer.effectAllowed="move",E.dataTransfer.setData("text/plain",y.toString()),E.dataTransfer.setData("application/json",JSON.stringify({index:y,groupName:n.groupName}))),setTimeout(()=>{const F=E.target;F==null||F.classList.add("drag-item--dragging")},0)},d=E=>{r.value=null,a.value=null,l.value=0;const y=E.target;y==null||y.classList.remove("drag-item--dragging")},h=(E,y)=>{n.disabled||n.readOnly||(E.preventDefault(),!(r.value===null||r.value===y)&&(l.value++,a.value=y))},p=(E,y)=>{l.value--,l.value===0&&(a.value=null)},g=E=>{n.disabled||n.readOnly||(E.preventDefault(),E.dataTransfer&&(E.dataTransfer.dropEffect="move"))},C=(E,y)=>{if(n.disabled||n.readOnly)return;E.preventDefault(),E.stopPropagation();const b=r.value;if(b===null||b===y){S();return}const F=[...s.value],[x]=F.splice(b,1);F.splice(y,0,x),s.value=F,R(F),S()},v=E=>{E.preventDefault(),S()},S=()=>{r.value=null,a.value=null,l.value=0},R=E=>{i("update",E,n.groupName),i("update:modelValue",E),i("input",E)};return(E,y)=>(j(),Ce("div",{class:z([E.$style["drag-drop-container"],{[E.$style["is-disabled"]]:n.disabled,[E.$style["is-readonly"]]:n.readOnly}]),onDragover:Ut(g,["prevent"]),onDrop:Ut(v,["prevent"])},[(j(!0),Ce(At,null,yn(s.value,(b,F)=>(j(),Ce("div",{key:b.id||F,class:z({[E.$style["drag-item"]]:!0,[E.$style["drag-item--focused"]]:o.value===F,[E.$style["drag-item--dragging"]]:r.value===F,[E.$style["drag-item--over"]]:a.value===F,[E.$style["drag-item--disabled"]]:b.required}),draggable:!n.disabled&&!n.readOnly,tabindex:"0",onDragstart:x=>c(x,F),onDragend:d,onDragenter:Ut(x=>h(x,F),["prevent"]),onDragleave:x=>p(),onDragover:Ut(g,["prevent"]),onDrop:Ut(x=>C(x,F),["prevent"]),onFocus:x=>o.value=F,onBlur:y[0]||(y[0]=x=>o.value=null)},[vt(E.$slots,"item",{item:b,index:F},()=>[b.required?at("",!0):(j(),Ce("span",{key:0,class:z(E.$style["drag-handle"]),"aria-hidden":"true"}," :: ",2)),me("div",{class:z(E.$style["draggable-item"])},yt(b.name),3)])],42,wj))),128))],34))}}),[["__cssModules",{$style:{"drag-drop-container":"_drag-drop-container_fuk6u_1","is-disabled":"_is-disabled_fuk6u_7","is-readonly":"_is-readonly_fuk6u_11","drag-item":"_drag-item_fuk6u_15","drag-item--dragging":"_drag-item--dragging_fuk6u_23","drag-item--over":"_drag-item--over_fuk6u_30"}}]]),xC=Et(ct({__name:"DragDropItem",props:{item:{},disabled:{type:Boolean},readOnly:{type:Boolean},columnStates:{}},emits:["toggle-column"],setup(e,{emit:t}){const n=wn,i=e,s=oe(!1),o=oe(i.columnStates[String(i.item.field)]||!1),r=t,a=G(()=>{var l,u;return(u=(l=i.item)==null?void 0:l.field)==null?void 0:u.includes("metric")});return wt(()=>o.value,()=>{r("toggle-column",i.item.field,i.item.required)}),(l,u)=>(j(),Ce("div",{key:e.item.field,class:z([l.$style["column-config__item"],{[l.$style.disabled]:e.disabled||i.readOnly}])},[ye(uT,{id:`col-${e.item.field}`,modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=c=>o.value=c),disabled:e.disabled},null,8,["id","modelValue","disabled"]),ye(lt,{color:e.disabled?"var(--disabled-color)":"var(--primary-color)",source:"remote",src:"GripVertical",size:"16",class:z(l.$style.handler)},null,8,["color","class"]),ut((j(),Ce("span",{class:z(l.$style["column-config__item-label"])},[bt(yt(e.item.headerName),1)],2)),[[Z(n),{content:e.item.headerName}]]),a.value?ut((j(),Ce("div",{key:0,class:z(l.$style.badge),onHover:u[1]||(u[1]=c=>s.value=!0)},[...u[2]||(u[2]=[bt(" M ",-1)])],34)),[[Z(n),"Metric"]]):at("",!0)],2))}}),[["__cssModules",{$style:{"column-config__item":"_column-config__item_48o5h_1",disabled:"_disabled_48o5h_13",readOnly:"_readOnly_48o5h_17","column-config__item--pinned":"_column-config__item--pinned_48o5h_20",handler:"_handler_48o5h_27",badge:"_badge_48o5h_31","column-config__item-label":"_column-config__item-label_48o5h_45"}}]]),Sj=Et(ct({__name:"TableCustomization",props:{modelValue:{},readOnly:{type:Boolean},disabled:{type:Boolean},checkboxColumn:{}},emits:["update:modelValue","input"],setup(e,{emit:t}){const n=wn,i=e,s=t,o=oe(""),r=oe([]),a=oe({}),{triggerRef:l,popupRef:u}=$s({placement:"bottom-end",trigger:"click"}),c=G(()=>r.value.filter(E=>E.pinned==="left"&&E.field&&E.headerName)),d=G(()=>r.value.filter(E=>E.pinned==="right"&&E.field)),h=G({get:()=>r.value.filter(E=>!E.pinned&&E.field),set:E=>{r.value=[...c.value,...E,...d.value]}}),p=G(()=>{if(!o.value)return{};const E=o.value.toLowerCase();return[...r.value,...h.value].reduce((y,b)=>{var F;return(F=b.headerName)!=null&&F.toLowerCase().includes(E)&&b.field&&(y[b.field]=!0),y},{})}),g=G(()=>i.modelValue),C=()=>{const E={};r.value.forEach(y=>{y.field&&(E[y.field]=!y.hide)}),a.value=E},v=()=>{const E=r.value.map(y=>({...y,hide:y.field?!a.value[y.field]:!1}));i.checkboxColumn&&E.unshift(i.checkboxColumn),s("update:modelValue",E),s("input",E)},S=E=>{r.value=[...c.value,...E,...d.value],v()},R=(E,y)=>{!y&&E&&(a.value[E]=!a.value[E],v())};return wt(g,E=>{E&&E.length>0&&(r.value=[...E],C())},{immediate:!0}),(E,y)=>(j(),Ce("div",{class:z(E.$style["table-customization"])},[me("div",{ref_key:"triggerRef",ref:l},[vt(E.$slots,"trigger",{},()=>[ut((j(),Xe(gt,{variant:["secondary"],disabled:i.disabled},{prefix:De(()=>[ye(lt,{src:"Gear",size:"14"})]),default:De(()=>[y[2]||(y[2]=bt(" Customise ",-1))]),_:1},8,["disabled"])),[[Z(n),"Customise table columns"]])])],512),me("div",{ref_key:"popupRef",ref:u,class:z(E.$style["tippy-content-wrapper"])},[me("div",{class:z(E.$style["column-config"])},[ye(Kv,{modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=b=>o.value=b)},null,8,["modelValue"]),me("div",{class:z(E.$style["column-config__header"])},[...y[3]||(y[3]=[me("label",null,"Manage columns",-1)])],2),Object.entries(p.value).length===0&&o.value.length>0?(j(),Ce("div",{key:0,class:z(E.$style["no-columns"])},[...y[4]||(y[4]=[bt(" No results. ",-1),me("br",null,null,-1),bt(" Try another search. ",-1)])],2)):at("",!0),me("div",{class:z(E.$style["column-config__list"])},[c.value.length>0?(j(),Ce("div",{key:0,class:z(E.$style["column-config__pinned-section"])},[(j(!0),Ce(At,null,yn(c.value,b=>ut((j(),Xe(xC,{key:b.field,item:b,disabled:i.disabled,readOnly:i.readOnly,columnStates:a.value},null,8,["item","disabled","readOnly","columnStates"])),[[Jr,p.value[b.field]||!o.value]])),128))],2)):at("",!0),ye(bj,{modelValue:h.value,"onUpdate:modelValue":y[1]||(y[1]=b=>h.value=b),"group-name":"columns",onUpdate:S,disabled:i.disabled,readOnly:i.readOnly},{item:De(({item:b})=>[ut(ye(xC,{item:b,columnStates:a.value,disabled:i.disabled,readOnly:i.readOnly,onToggleColumn:R},null,8,["item","columnStates","disabled","readOnly"]),[[Jr,p.value[b.field]||!o.value]])]),_:1},8,["modelValue","disabled","readOnly"]),d.value.length>0?(j(),Ce("div",{key:1,class:z(E.$style["column-config__pinned-section"])},[(j(!0),Ce(At,null,yn(d.value.filter(b=>{var F;return b.headerName&&((F=b.headerName)==null?void 0:F.length)>0}),b=>ut((j(),Xe(xC,{key:b.field,item:b,disabled:i.disabled,readOnly:i.readOnly,columnStates:a.value},null,8,["item","disabled","readOnly","columnStates"])),[[Jr,p.value[b.field]||!o.value]])),128))],2)):at("",!0)],2),me("div",{class:z(E.$style["column-config__footer"])},[ye(gt,{type:"button",variant:"secondary",disabled:!0},{default:De(()=>[...y[5]||(y[5]=[me("span",null,"Add Column",-1)])]),_:1})],2)],2)],2)],2))}}),[["__cssModules",{$style:{"table-customization":"_table-customization_picce_1","table-customization__trigger":"_table-customization__trigger_picce_7","column-config":"_column-config_picce_23","column-config__header":"_column-config__header_picce_33","icon-color":"_icon-color_picce_43","column-config__list":"_column-config__list_picce_46","column-config__section-label":"_column-config__section-label_picce_50","column-config__footer":"_column-config__footer_picce_59","column-config__add-button":"_column-config__add-button_picce_62","cs-icon":"_cs-icon_picce_80","no-columns":"_no-columns_picce_84"}}]]),Ej=Et(ct({__name:"StatusSelect",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=[{label:"Online",value:"online",color:"green"},{label:"Offline",value:"offline",color:"gray"},{label:"Busy",value:"busy",color:"red"},{label:"Away",value:"away",color:"yellow"}],i=e,s=oe(i.modelValue),o=G(()=>i.modelValue||"Select status"),r=G(()=>{const a="red";return{backgroundColor:a,border:jm(a,"white")?"1px solid #ccc":"1px solid #fff"}});return(a,l)=>(j(),Xe(H4,{options:n,value:s.value},{trigger:De(({visibled:u})=>[ye(zs,{actived:u,class:z(a.$style["status-wrapper"])},{suffix:De(()=>[ye(lt,{src:"ChevronUp",source:"remote",size:12,class:z([[a.$style["dropdown-icon"]],{[a.$style["dropdown-icon-show"]]:!u}])},null,8,["class"])]),default:De(()=>[me("div",{class:z(a.$style.status)},[me("div",{class:z(a.$style["color-indicator"]),style:hn(r.value)},null,6),bt(" "+yt(o.value),1)],2)]),_:2},1032,["actived","class"])]),options:De(()=>[(j(),Ce(At,null,yn(n,u=>ye(xc,{key:u.value,label:u.label,value:u,type:"status",data:{color:u.color}},null,8,["label","value","data"])),64))]),_:1},8,["value"]))}}),[["__cssModules",{$style:{"status-wrapper":"_status-wrapper_tjjfy_1",status:"_status_tjjfy_1","color-indicator":"_color-indicator_tjjfy_11","dropdown-icon":"_dropdown-icon_tjjfy_16","dropdown-icon-show":"_dropdown-icon-show_tjjfy_22"}}]]),Rj=Et(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=G(()=>t.isSearching||t.isFiltering?"NoDataSearchFilter":"ClickToCreate"),s=G(()=>t.isSearching?n.noSearchResults:t.isFiltering?n.noFilterResults:n.noData);return(o,r)=>(j(),Ce("div",{class:z(o.$style["no-data-item-table"])},[me("div",{class:z(o.$style.visual)},[ye($3,{source:"remote",src:i.value,ratio:"4/3",maxWidth:500,maxHeight:350},null,8,["src"])],2),me("div",{class:z(o.$style.description)},yt(s.value),3)],2))}}),[["__cssModules",{$style:{"no-data-item-table":"_no-data-item-table_oh0wi_1",visual:"_visual_oh0wi_12",description:"_description_oh0wi_19"}}]]),h_=c_("sortStore",()=>{const e=oe({}),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=G(()=>{const a=e.value,l=Object.values(a).filter(u=>u.sort!=="none"&&!!u.sort).map(u=>{let c;switch(u.colId){case"dateRange":c=n[u.sort];break;default:if(u.colId.includes("metric")){const[d,h]=u.colId.split("_");c={column:d,direction:u.sort,type:h}}else c={column:t[u.colId]||u.colId,direction:u.sort};break}return c});return console.log("sorting res",{sortConfig:l,sortOption:a}),l}),s=(a,l)=>{e.value={...e.value,[a]:{colId:a,sort:l}}},o=()=>{e.value={}},r=oe(!1);return{sortingAPIConfiguration:i,sorts:e,setSort:s,clearSorting:o,isSortingRunning:r}}),ga=ct({__name:"HeaderWrapper",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=e,n=h_(),{sorts:i}=TC(n),s=G(()=>t.params.column.getColId()),o=a=>{s.value&&n.setSort(s.value,a)},r=G({get:()=>{if(!s.value)return"none";const a=i.value[s.value];return a?a.sort:"none"},set:a=>{s.value&&n.setSort(s.value,a)}});return(a,l)=>s.value?(j(),Xe(G4,fn({key:0},t,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),onSortChanged:o}),null,16,["modelValue"])):at("",!0)}}),Dj={class:"create-scenes-body"},Fj={class:"step step-1-download-sample"},Tj={class:"step step-2-upload-file"},xj={class:"drop-area-content"},_j={class:"step step-3-select-status"},Pj={class:"step description"},Aj=Et(ct({__name:"PopupCreateScenes",setup(e,{expose:t}){const n=oe(null),i=oe(null),s=oe(!1),o=()=>{n.value&&n.value.show()},r=()=>{var p;(p=i.value)==null||p.click()},a=p=>{s.value=!0},l=p=>{s.value=!1},u=p=>{var C;s.value=!1;const g=(C=p.dataTransfer)==null?void 0:C.files;g&&g.length>0&&d(g[0])},c=p=>{const C=p.target.files;C&&C.length>0&&d(C[0])},d=p=>{console.log("Selected file:",p)};Kn(()=>{In(()=>{})}),t({open:o});const h=oe(null);return(p,g)=>(j(),Xe(Z(j4),{"popup-name":"Create Scenes","show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:n},{default:De(()=>[me("div",Dj,[me("div",Fj,[g[3]||(g[3]=me("h2",null,"Step 1: Download sample",-1)),g[4]||(g[4]=me("p",null,"This file contains all columns available for editing.",-1)),ye(Z(gt),{class:"download-sample-btn",size:12,variant:"secondary"},{prefix:De(()=>[ye(Z(lt),{src:"Download",size:"12"})]),default:De(()=>[g[2]||(g[2]=bt(" Download sample file ",-1))]),_:1})]),me("div",Tj,[g[6]||(g[6]=me("h2",null,"Step 2: Upload file (.xlsx, .xls, .csv)",-1)),me("div",{class:z(["drop-area",{"is-dragging":s.value}]),onDragenter:Ut(a,["prevent"]),onDragover:g[0]||(g[0]=Ut(()=>{},["prevent"])),onDragleave:Ut(l,["prevent"]),onDrop:Ut(u,["prevent"]),onClick:r},[me("div",xj,[ye(Z(lt),{src:"UploadCloud",size:"48"}),g[5]||(g[5]=me("p",null,[bt(" Drag & drop your file here or "),me("span",{class:"browse"},"browse")],-1))]),me("input",{ref_key:"fileInput",ref:i,type:"file",style:{display:"none"},accept:".xlsx, .xls, .csv",onChange:c},null,544)],34)]),me("div",_j,[g[7]||(g[7]=me("h2",null,"Step 3: Select status",-1)),ye(Z(Ej),{modelValue:h.value,"onUpdate:modelValue":g[1]||(g[1]=C=>h.value=C)},null,8,["modelValue"])]),me("div",Pj,[g[9]||(g[9]=me("h3",null,"Date format guide",-1)),g[10]||(g[10]=bt(" Ensure all dates follow one of the two formats below: ",-1)),g[11]||(g[11]=me("ul",null,[me("li",null,"DD MM YYYY (Day-Month-Year)"),me("li",null,"YYYY MM DD (Year-Month-Day)")],-1)),ye(Z(gt),null,{prefix:De(()=>[ye(Z(lt),{src:"InfoCircle",size:"12"})]),default:De(()=>[g[8]||(g[8]=bt(" Check valid formats ",-1))]),_:1})])])]),_:1},512))}}),[["__scopeId","data-v-4c7e39fb"]]),Ij={status:U4,dateRange:T4,checkbox:void 0,dateTime:k4,format:void 0,number:void 0,rating:lT,more:H3,assignee:F4,name:oT,text:v4,metric:V4},kj={status:!0,dateRange:!0,checkbox:!0,dateTime:!1,format:!1,number:!1,rating:!1,more:!1,assignee:!0,name:!1,text:!1,metric:!1},Oj={status:iT,checkbox:"agCheckboxCellEditor",dateTime:null,format:rT,number:"agNumberCellEditor",more:aT,assignee:QF,dateRange:x4,rating:null,name:oT,text:null,metric:null},f_={status:[200,200],dateRange:[255,255],checkbox:[50,50],dateTime:[200,200],format:[200,200],number:[200,200],rating:[200,200],more:[130,130],assignee:[200,200],name:[300,window.innerWidth*.7],text:[200,500],metric:[200,300]},Mj={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized"}};class ma{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 o,r;const n=t.data||((o=t.node)==null?void 0:o.data),i=(r=t.colDef)==null?void 0:r.field,s=i&&n?n[i]:void 0;return{...t,value:s}}static fromType(t,n){var v,S;const{wrapVueCellRenderer:i,wrapVueCellEditor:s}=this.getWrappers(),o=Ij[t],r=Oj[t],a=kj[t]??!1,l={minWidth:((v=f_[t])==null?void 0:v[0])||250,maxWidth:((S=f_[t])==null?void 0:S[1])||250},u=Mj[t]||{},c=R=>!!R&&typeof R!="string",d=c(o)?i(o):o,h=n.editable??a;let p={};const g=n.cellRendererParams?n.cellRendererParams:this.buildCommonCellParams;return h&&r&&(p={cellEditor:c(r)?s(r):r,cellEditorParams:g,singleClickEdit:!0,cellEditorPopup:!0,cellEditorPopupPosition:"under"}),{headerName:t,...l,cellRenderer:d,editable:h,...n,...p,...u,context:{...n.context,workspaceId:this.workspaceId,entityId:this.entityId},cellRendererParams:g,headerComponentParams:R=>({...typeof n.headerComponentParams=="function"?n.headerComponentParams(R):n.headerComponentParams,headerType:t==="dateRange"?"date":"text"})}}}ln(ma,"wrappers",null),ln(ma,"workspaceId",""),ln(ma,"entityId","");function Lj(e){return"stopEditing"in e}const Nj=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}},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),()=>ye(t,{...e})}}),Vj=()=>`${Math.max(50,Math.round(vz(0,100)))}%`;function p_(e){return class{constructor(){ln(this,"container");ln(this,"vNode",null);ln(this,"componentInstance",null);ln(this,"params");ln(this,"isEditor",!1)}init(n){var r,a;if(!n){console.error("[Vue3CellWrapper] Missing context information: workspaceId or entityId. Cannot initialize wrapper.");return}const i=n.context.apiClass;this.params=n,this.isEditor=Lj(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.style.setProperty("--loading-overlay-width",Vj()),this.container.style.width="100%",this.container.style.height="100%";const s=Object.freeze(n),o={component:e,params:s,disabled:n.disabled??!1,readOnly:n.readOnly??!1,value:n.value,data:n.data,id:(r=n==null?void 0:n.data)==null?void 0:r.id,isNoData:n.isNoData??!1,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:i,tooltip:n.tooltip??void 0};this.vNode=ye(Nj,o),z0(this.vNode,this.container),this.componentInstance=(a=this.vNode.component)==null?void 0:a.proxy,this.componentInstance||console.warn("[Vue3CellWrapper] Component instance not available after render")}getGui(){return this.container}refresh(n){return!1}getValue(){var n,i,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(i=this.componentInstance).getValue)==null?void 0:s.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,s,o;return this.isEditor?(i=this.componentInstance)!=null&&i.getPopupPosition?this.componentInstance.getPopupPosition():((o=(s=this.params)==null?void 0:s.colDef)==null?void 0:o.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||!this.componentInstance||requestAnimationFrame(()=>{try{if(typeof this.componentInstance.focus=="function")this.componentInstance.focus();else{const n=this.container.querySelector("input, textarea, select");n instanceof HTMLElement&&n.focus()}}catch(n){console.warn("[Vue3CellWrapper] Error during focus:",n)}})}destroy(){if(!(!this.container||!this.vNode))try{this.componentInstance&&(typeof this.componentInstance.$destroy=="function"&&this.componentInstance.$destroy(),typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy()),Promise.resolve().then(()=>{try{z0(null,this.container)}catch(n){console.warn("[Vue3CellWrapper] Error during unmount:",n)}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function kf(e){return p_(e)}function g_(e){return p_(e)}var va=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 s=i.get(e);return!s&&n&&(s=new Set,i.set(e,s)),s}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,s=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},o=this.getListeners(n,t,!1);if(((o==null?void 0:o.size)??0)>0){const a=new Set(o);for(const l of a)o!=null&&o.has(l)&&s(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)s(()=>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 Io(e){return e==null||e===""?null:e}function ze(e){return e!=null&&e!==""}function on(e){return!ze(e)}function _C(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Vc(e,t){const n=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return n===i}function Bj(e,t,n=!1){const i=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),i&&s)return 0;if(i)return-1;if(s)return 1;function o(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return o(e,t);try{return e.localeCompare(t)}catch{return o(e,t)}}var Hj=/[&<>"']/g,Gj={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Vl(e){return(e==null?void 0:e.toString().toString())??null}function Bc(e){var t;return((t=Vl(e))==null?void 0:t.replace(Hj,n=>Gj[n]))??null}function Ks(e){return e.eRootDiv.getRootNode()}function un(e){return Ks(e).activeElement}function Ln(e){const{gos:t,eRootDiv:n}=e;let i=null;const s=t.get("getDocument");return s&&ze(s)?i=s():n&&(i=n.ownerDocument),i&&ze(i)?i:document}function m_(e){const t=un(e);return t===null||t===Ln(e).body}function v_(e){return Ln(e).defaultView||window}function PC(e){let t=null,n=null;try{t=Ln(e).fullscreenElement}catch{}finally{t||(t=Ks(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 $j(e){const t=PC(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function Wj(e){const t=PC(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Ss(e,t,n){n==null||typeof n=="string"&&n==""?C_(e,t):Qi(e,t,n)}function Qi(e,t,n){e.setAttribute(y_(t),n.toString())}function C_(e,t){e.removeAttribute(y_(t))}function y_(e){return`aria-${e}`}function dr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function zj(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Uj(e){return e.getAttribute("aria-label")}function Bl(e,t){Ss(e,"label",t)}function Hc(e,t){Ss(e,"labelledby",t)}function w_(e,t){Ss(e,"live",t)}function jj(e,t){Ss(e,"atomic",t)}function Kj(e,t){Ss(e,"relevant",t)}function qj(e,t){Ss(e,"invalid",t)}function Yj(e,t){Ss(e,"disabled",t)}function b_(e,t){Ss(e,"hidden",t)}function AC(e,t){Qi(e,"expanded",t)}function Zj(e,t){Qi(e,"setsize",t)}function Jj(e,t){Qi(e,"posinset",t)}function Xj(e,t){Qi(e,"multiselectable",t)}function Qj(e,t){Qi(e,"rowcount",t)}function Of(e,t){Qi(e,"rowindex",t)}function e8(e,t){Qi(e,"rowspan",t)}function t8(e,t){Qi(e,"colcount",t)}function S_(e,t){Qi(e,"colindex",t)}function n8(e,t){Qi(e,"colspan",t)}function i8(e,t){Qi(e,"sort",t)}function s8(e){C_(e,"sort")}function E_(e,t){Ss(e,"selected",t)}function o8(e,t){Ss(e,"controls",t)}function r8(e,t){o8(e,t.id),Hc(t,e.id)}function R_(e,t){Ss(e,"owns",t)}function Mf(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var a8="[tabindex], input, select, button, textarea, [href]",D_="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Gc(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(D_)?!1:qs(e)}function rn(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-hidden",!t),i||b_(e,!t)}function l8(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-invisible",!t),i||b_(e,!t)}function $c(e,t){const n="disabled",i=t?o=>o.setAttribute(n,""):o=>o.removeAttribute(n);i(e);const s=e.querySelectorAll("input")??[];for(const o of s)i(o)}function Ca(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 ya(e){const{height:t,width:n,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:o,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:p,marginLeft:g,boxSizing:C}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(n||"0"),borderTopWidth:v(i||"0"),borderRightWidth:v(s||"0"),borderBottomWidth:v(o||"0"),borderLeftWidth:v(r||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(u||"0"),paddingLeft:v(c||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(p||"0"),marginLeft:v(g||"0"),boxSizing:C}}function IC(e){const t=ya(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Wc(e){const t=ya(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function F_(e){const{height:t,marginBottom:n,marginTop:i}=ya(e);return Math.floor(t+n+i)}function Lf(e){const{width:t,marginLeft:n,marginRight:i}=ya(e);return Math.floor(t+n+i)}function T_(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:o}=ya(e);return{top:t.top+(n||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(o||0)}}function Nf(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function Vf(e,t,n){n&&(t*=-1),e.scrollLeft=t}function Gn(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Es(e){e!=null&&e.parentNode&&e.remove()}function x_(e){return!!e.offsetParent}function qs(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!x_(e)||window.getComputedStyle(e).visibility!=="visible")}function kC(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function __(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 P_(e,t){for(let n=0;n<t.length;n++){const i=t[n],s=e.children[n];s!==i&&e.insertBefore(i,s)}}function u8(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function zc(e,t){if(t)for(const n of Object.keys(t)){const i=t[n];if(!(n!=null&&n.length)||i==null)continue;const s=u8(n),o=i.toString(),r=o.replace(/\s*!important/g,""),a=r.length!=o.length?"important":void 0;e.style.setProperty(s,r,a)}}function Bf(e){return()=>{const t=e();return t?OC(t)||A_(t):!0}}function OC(e){return e.clientWidth<e.scrollWidth}function A_(e){return e.clientHeight<e.scrollHeight}function Hf(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ys(e,t)}function Ys(e,t){t=MC(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Uc(e,t){t=MC(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function MC(e){return typeof e=="number"?`${e}px`:e}function LC(e){return e instanceof Node||e instanceof HTMLElement}function Mi(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function hr(e,t,n){const s=v_(e).ResizeObserver,o=s?new s(n):null;return o==null||o.observe(t),()=>o==null?void 0:o.disconnect()}function ko(e,t){const n=v_(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var I_="data-ref",NC;function k_(){return NC??(NC=document.createTextNode(" ")),NC.cloneNode()}function jc(e){const{attrs:t,children:n,cls:i,ref:s,role:o,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),s&&a.setAttribute(I_,s),o&&a.setAttribute("role",o),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 u of n)u&&(typeof u=="string"?(a.appendChild(document.createTextNode(u)),l=!1):typeof u=="function"?a.appendChild(u()):(l&&(a.appendChild(k_()),l=!1),a.append(jc(u)),a.appendChild(k_())))}return a}var c8=["touchstart","touchend","touchmove","touchcancel","scroll"],d8=["wheel"],VC={},O_=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof VC[n]=="boolean")return VC[n];const i=document.createElement(e[n]||"div");return n="on"+n,VC[n]=n in i}})();function h8(e,t){return!t||!e?!1:p8(t).indexOf(e)>=0}function f8(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function p8(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():f8(t)}function g8(e,t,n){const i=m8(t);let s;i!=null&&(s={passive:i}),e.addEventListener(t,n,s)}var m8=e=>{const t=c8.includes(e),n=d8.includes(e);if(t)return!0;if(n)return!1};function M_(e,t,n){if(n===0)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=n}var Kc=(e,t)=>{const n=e.identifier;for(let i=0,s=t.length;i<s;++i){const o=t[i];if(o.identifier===n)return o}return null};function qc(e,t){return e.gos.isElementInThisInstance(t.target)}function v8(e,t,n){const s=e.getBoundingClientRect().height,o=$j(n)-2,r=Wj(n)-2;if(!e.offsetParent)return;const l=T_(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const p=Ln(n),g=p.defaultView||window,C=g.pageYOffset||p.documentElement.scrollTop,v=g.pageXOffset||p.documentElement.scrollLeft;o>0&&h+e.clientWidth>o+v&&(h=o+v-e.clientWidth),h<0&&(h=0),r>0&&d+e.clientHeight>r+C&&(d=r+C-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var Gf=(e,...t)=>{for(const n of t){const[i,s,o,r]=n;i.addEventListener(s,o,r),e.push(n)}},BC=e=>{if(e){for(const[t,n,i,s]of e)t.removeEventListener(n,i,s);e.length=0}},fr=e=>{e.cancelable&&e.preventDefault()};function C8(e,t){return t}function L_(e){return(e==null?void 0:e.getLocaleTextFunc())??C8}function y8(e,t,n,i){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(i):s,i)}function w8(e){return(t,n,i)=>e({key:t,defaultValue:n,variableValues:i})}function b8(e){return(t,n,i)=>{let s=e==null?void 0:e[t];if(s&&(i!=null&&i.length)){let o=0;for(;!(o>=i.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",i[o++])}return s??n}}var Zs=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 va),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 s=t[i];s&&n.push(this._setupListener(e,i,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let i;if(S8(e))e.__addEventListener(t,n),i=()=>(e.__removeEventListener(t,n),null);else{const s=E8(e);e instanceof HTMLElement?g8(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),i=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==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(s=>s!==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=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const o={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(o)};for(const s of e)this.setupPropertyListener(s,i)}getLocaleTextFunc(){return L_(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 S8(e){return e.__addEventListener!==void 0}function E8(e){return e.eventServiceType==="global"}var ge=class extends Zs{},N_={};function HC(e,t){N_[t]||(e(),N_[t]=!0)}var R8={pending:!1,funcs:[]},D8={pending:!1,funcs:[]};function GC(e,t="setTimeout",n){const i=t==="raf"?D8:R8;if(i.funcs.push(e),i.pending)return;i.pending=!0;const s=()=>{const o=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of o)r()};t==="raf"?ko(n,s):window.setTimeout(s,0)}function $n(e,t,n){let i;return function(...s){const o=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(o,s)},n)}}function V_(e,t){let n=0;return function(...i){const s=this,o=Date.now();o-n<t||(n=o,e.apply(s,i))}}function F8(e,t,n,i=100){const s=Date.now();let o=null,r=!1;const a=()=>{o!=null&&(window.clearInterval(o),o=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>i;(t()||u)&&(n(),r=!0,a())};l(),r||(o=window.setInterval(l,10))}var B_=new Set(["__proto__","constructor","prototype"]);function T8(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=>!B_.has(i)))t(n,e[n])}}function ci(e,t,n=!0,i=!1){ze(t)&&T8(t,(s,o)=>{let r=e[s];r!==o&&(i&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},e[s]=r),H_(o)&&H_(r)&&!Array.isArray(r)?ci(r,o,n,i):(n||o!==void 0)&&(e[s]=o))})}function H_(e){return typeof e=="object"&&e!==null}var $C=class qo{static applyGlobalGridOptions(t){if(!qo.gridOptions)return{...t};let n={};return ci(n,qo.gridOptions,!0,!0),qo.mergeStrategy==="deep"?ci(n,t,!0,!0):n={...n,...t},qo.gridOptions.context&&(n.context=qo.gridOptions.context),t.context&&(qo.mergeStrategy==="deep"&&n.context&&ci(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(qo.mergeStrategy==="deep"){const i=x8(t);if(i&&typeof i=="object"&&typeof n=="object")return qo.applyGlobalGridOptions({[t]:n})[t]}return n}};$C.gridOptions=void 0,$C.mergeStrategy="shallow";var WC=$C;function x8(e){var t;return(t=WC.gridOptions)==null?void 0:t[e]}var _8={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},G_="https://www.ag-grid.com";function pr(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Yc(e,...t){HC(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Hl(e,...t){HC(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var $_=new Set,$f={},Gl={},Wf,W_=!1,z_=!1,P8=!1;function A8(e){const[t,n]=e.version.split(".")||[],[i,s]=Wf.split(".")||[];return t===i&&n===s}function I8(e){var i;Wf||(Wf=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?A8(e)||Hl(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Wf}.`)):Hl(t(`'${e.moduleName}' is incompatible.`));const n=(i=e.validate)==null?void 0:i.call(e);n&&!n.isValid&&Hl(`${n.message}`)}function Zc(e,t,n=!1){n||(W_=!0),I8(e);const i=e.rowModels??["all"];$_.add(e);let s;t!==void 0?(z_=!0,Gl[t]===void 0&&(Gl[t]={}),s=Gl[t]):s=$f;for(const o of i)s[o]===void 0&&(s[o]={}),s[o][e.moduleName]=e;if(e.dependsOn)for(const o of e.dependsOn)Zc(o,t,n)}function k8(e){delete Gl[e]}function zC(e,t,n){const i=s=>{var o,r,a;return!!((o=$f[s])!=null&&o[e])||!!((a=(r=Gl[t])==null?void 0:r[s])!=null&&a[e])};return i(n)||i("all")}function UC(){return z_}function O8(e,t){const n=Gl[e]??{};return[...Object.values($f.all??{}),...Object.values(n.all??{}),...Object.values($f[t]??{}),...Object.values(n[t]??{})]}function M8(){return new Set($_)}function L8(){return W_}function N8(){return P8}var V8=class{static register(e){Zc(e,void 0)}static registerModules(e){for(const t of e)Zc(t,void 0)}},$e="34.3.1",U_=2e3,j_=100,K_="_version_",zf=null,$l=`${G_}/javascript-data-grid`;function B8(e){zf=e}function H8(e){$l=e}function q_(e,t,n){return(zf==null?void 0:zf(e,t))??[z8(e,t,n)]}function jC(e,t,n,i,s){e(`${i?"warning":"error"} #${t}`,...q_(t,n,s))}function G8(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 $8(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=G8(e)),t}function Uf(e){return e===void 0?"undefined":e===null?"null":e}function KC(e,t){return`${e}?${t.toString()}`}function W8(e,t,n){const i=Array.from(t.entries()).sort((o,r)=>r[1].length-o[1].length);let s=KC(e,t);for(const[o,r]of i){if(o===K_)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=r.length-u>j_?r.slice(0,r.length-u)+l:r.slice(0,j_)+l;t.set(o,c),s=KC(e,t)}return s}function Y_(e,t){const n=new URLSearchParams;if(n.append(K_,$e),t)for(const o of Object.keys(t))n.append(o,$8(t[o]));const i=`${$l}/errors/${e}`,s=KC(i,n);return s.length<=U_?s:W8(i,n,U_)}var z8=(e,t,n)=>{const i=Y_(e,t);return`${`${n?n+`
89
+ `:""}Visit ${i}`}${n?"":`
90
+ Alternatively register the ValidationModule to see the full message in the console.`}`};function xe(...e){jC(Yc,e[0],e[1],!0)}function Kt(...e){jC(Hl,e[0],e[1],!1)}function Jc(e,t,n){jC(Hl,e,t,!1,n)}function U8(e,t){const n=t[0];return`error #${n} `+q_(n,t[1],e).join(" ")}function Js(...e){return U8(void 0,e)}function Z_(e,t){return e.get("rowModelType")===t}function bn(e,t){return Z_(e,"clientSide")}function Wl(e,t){return Z_(e,"serverSide")}function Wn(e,t){return e.get("domLayout")===t}function wa(e){return qf(e)!==void 0}function J_(e){return typeof e.get("getRowHeight")=="function"}function j8(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function gr(e,t,n=!1,i){const{gos:s,environment:o}=e;if(i==null&&(i=o.getDefaultRowHeight()),J_(s)){if(n)return{height:i,estimated:!0};const l={node:t,data:t.data},u=s.getCallback("getRowHeight")(l);if(qC(u))return u===0&&xe(23),{height:Math.max(1,u),estimated:!1}}if(t.detail&&s.get("masterDetail"))return K8(s);const r=s.get("rowHeight");return{height:r&&qC(r)?r:i,estimated:!1}}function K8(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return qC(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ba(e){const{environment:t,gos:n}=e,i=n.get("rowHeight");if(!i||on(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(xe(24),t.getDefaultRowHeight())}function qC(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function X_(e,t,n){const i=t[e.getDomDataKey()];return i?i[n]:void 0}function Sa(e,t,n,i){const s=e.getDomDataKey();let o=t[s];on(o)&&(o={},t[s]=o),o[n]=i}function zl(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function Q_(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Wn(e,"print"))}function Xs(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function YC(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function eP(e){return e.get("grandTotalRow")}function tP(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function nP(e,t,n){return!!t.group&&!t.footer&&tP(e,n)}function Ul(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let i=t(n);return typeof i!="string"&&(HC(()=>xe(25,{id:i}),"getRowIdString"),i=String(i)),i}}function q8(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Y8(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function jl(e){return(e==null?void 0:e.checkboxes)??!0}function jf(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Kf(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function ZC(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function Z8(e){return typeof e.get("rowSelection")!="string"}function Oo(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function iP(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 J8(e){const t=iP(e);return t===!0||t==="enableSelection"}function X8(e){const t=iP(e);return t===!0||t==="enableDeselection"}function JC(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function qf(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 Xc(e){return qf(e)==="multiRow"}function Q8(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Yf(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 sP(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function eK(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function Qc(e){const t=Yf(e);return t==="descendants"||t==="filteredDescendants"}function oP(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function tK(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Li(e){return e.get("columnMenu")==="legacy"}function nK(e){return!Li(e)}function iK(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function dt(e,t){return e.addCommon(t)}function rP({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var sK={resizable:!0,sortable:!0},oK=0;function aP(){return oK++}function mr(e){return e instanceof Ea}var Ea=class extends ge{constructor(e,t,n,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=i,this.isColumn=!0,this.instanceId=aP(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new va,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Bc(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 s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,n==null||n.initCol(this),i==null||i.initCol(this)}setColDef(e,t,n){var s;const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((s=this.beans.rowSpanSvc)==null||s.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=ze(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=ze(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,s,o;this.frameworkEventListenerService=(s=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(i,this.frameworkEventListenerService,this.colEventSvc);const n=((o=this.frameworkEventListenerService)==null?void 0:o.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 dt(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]??sK[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 dt(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 on(this.sort)}isSorting(){return ze(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 xe(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 dt(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(on(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(on(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&&ci(i,n),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Jn(e){return e instanceof Zf}var Zf=class extends ge{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=aP(),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)mr(t)?e(t):Jn(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)mr(t)?e.push(t):Jn(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 o=0,r=i.length;o<r;o++){const a=i[o];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 s=e&&t&&n;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=n=>{for(const i of n)Jn(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},rK={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function lP(e,t,n){const i={},s=e.gos;return Object.assign(i,s.get("defaultColGroupDef")),Object.assign(i,t),s.validateColDef(i,n),i}var aK=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=_C(e);let n=0;for(;;){let i=e??t;if(i?n!==0&&(i+="_"+n):i=n,!this.existingKeys[i]){const s=String(i);return e&&n>0&&xe(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}n++}}};function Zt(e){if(e!=null&&e.length)return e[e.length-1]}function vr(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 s=0;s<i;s++)if(e[s]!==t[s]&&!(n!=null&&n(e[s],t[s])))return!1;return!0}function ed(e,t){if(e)for(const n of e)t(n)}function Rs(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function uP(e,t,n){for(let i=0;i<t.length;i++)Rs(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(n,0,t[i])}var Jf="ag-Grid-AutoColumn",cP="ag-Grid-SelectionColumn",dP="ag-Grid-RowNumbersColumn";function hP(e){const t=[],n=i=>{for(let s=0;s<i.length;s++){const o=i[s];mr(o)?t.push(o):Jn(o)&&n(o.getChildren())}};return n(e),t}function Mo(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function Xf(e,t,n){const i={};if(!t)return;Vo(null,t,o=>{i[o.getInstanceId()]=o}),n&&Vo(null,n,o=>{i[o.getInstanceId()]=null});const s=Object.values(i).filter(o=>o!=null);e.context.destroyBeans(s)}function XC(e){return e.getId().startsWith(Jf)}function Lo(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(cP))??!1}function No(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(dP))??!1}function lK(e){return Lo(e)||No(e)}function Qf(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function uK(e,t){return vr(e,t,(n,i)=>n.getColId()===i.getColId())}function cK(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function Kl(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function td(e,t){const n=e===t,i=e.getColDef()===t,s=e.getColId()==t;return n||i||s}var dK=(e,t)=>(n,i)=>{const s={value1:void 0,value2:void 0};let o=!1;return e&&(e[n]!==void 0&&(s.value1=e[n],o=!0),ze(i)&&e[i]!==void 0&&(s.value2=e[i],o=!0)),!o&&t&&(t[n]!==void 0&&(s.value1=t[n]),ze(i)&&t[i]!==void 0&&(s.value2=t[i])),s},hK=(e,t)=>{Jn(e)&&e.setupExpandable(),e.originalParent=t};function fK(e,t=null,n,i,s){const o=new aK,{existingCols:r,existingGroups:a,existingColKeys:l}=pK(i);o.addExistingKeys(l);const u=fP(e,t,0,n,r,o,a,s),{colGroupSvc:c}=e,d=(c==null?void 0:c.findMaxDepth(u,0))??0,h=c?c.balanceColumnTree(u,0,d,o):u;return Vo(null,h,hK),{columnTree:h,treeDepth:d}}function pK(e){const t=[],n=[],i=[];return e&&Vo(null,e,s=>{if(Jn(s)){const o=s;n.push(o)}else{const o=s;i.push(o.getId()),t.push(o)}}),{existingCols:t,existingGroups:n,existingColKeys:i}}function fP(e,t,n,i,s,o,r,a){if(!t)return[];const{colGroupSvc:l}=e,u=new Array(t.length);for(let c=0;c<u.length;c++){const d=t[c];l&&wK(d)?u[c]=l.createProvidedColumnGroup(i,d,n,s,o,r,a):u[c]=gK(e,i,d,s,o,a)}return u}function gK(e,t,n,i,s,o){var l;const r=vK(n,i);r&&(i==null||i.splice(r.idx,1));let a=r==null?void 0:r.column;if(a){const u=QC(e,n,a.getColId());a.setColDef(u,n,o),mK(e,a,u,o)}else{const u=s.getUniqueKey(n.colId,n.field),c=QC(e,n,u);a=new Ea(c,n,u,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function pP(e,t,n,i,s,o,r,a){const{sortSvc:l,pinnedCols:u,colFlex:c}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,i,a),s!==void 0&&l.setColSortIndex(t,s)),o!==void 0&&(u==null||u.setColPinned(t,o)),r!==void 0&&(c==null||c.setColFlex(t,r))}function mK(e,t,n,i){pP(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,i);const s=t.getFlex();if(!(s!=null&&s>0))if(n.width!=null)t.setActualWidth(n.width,i);else{const o=t.getActualWidth();t.setActualWidth(o,i)}}function vK(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 QC(e,t,n,i){const{gos:s,dataTypeSvc:o}=e,r={},a=s.get("defaultColDef");ci(r,a,!1,!0);const l=CK(e,r,t,n);l&&yK(e,l,r);const u=r.cellDataType;ci(r,t,!1,!0),u!==void 0&&(r.cellDataType=u);const c=s.get("autoGroupColumnDef"),d=Xs(s);return t.rowGroup&&c&&d&&ci(r,{sort:c.sort,initialSort:c.initialSort},!1,!0),o&&(o.postProcess(r),o.validateColDef(r)),s.validateColDef(r,n,i),r}function CK(e,t,n,i){var r;const s=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,n,i),o=n.type??s??t.type;return t.type=o,o?Qf(o):void 0}function yK(e,t,n){if(!t.length)return;const i=Object.assign({},rK),s=e.gos.get("columnTypes")||{};for(const o of Object.keys(s)){const r=s[o];o in i?xe(34,{key:o}):(r.type&&xe(35),i[o]=r)}for(const o of t){const r=i[o.trim()];r?ci(n,r,!1,!0):xe(36,{t:o})}}function wK(e){return e.children!==void 0}function Vo(e,t,n){if(t)for(let i=0;i<t.length;i++){const s=t[i];Jn(s)&&Vo(s,s.getChildren(),n),n(s,e)}}function gP(e,t){const n=[],i=[],s=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?s.push(r):a==="left"||a===!0?n.push(r):i.push(r)}),t.get("enableRtl")?[...s,...i,...n]:[...n,...i,...s]}function mP(e,t){let n=!0;return Vo(null,t,i=>{if(!Jn(i))return;const s=i,o=s.getColGroupDef();if(!(o==null?void 0:o.marryChildren))return;const a=[];for(const h of s.getLeafColumns()){const p=e.indexOf(h);a.push(p)}const l=Math.max.apply(Math,a),u=Math.min.apply(Math,a),c=l-u,d=s.getLeafColumns().length-1;c>d&&(n=!1)}),n}function vP(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 CP(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,s=vP(t,o=>o.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:i,source:n})}function bK(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,s=vP(t,o=>o.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:n})}function SK(e,t,n,i){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:i})}function ql(e,t,n,i,s=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:n,source:i})}function Ds(e,t,n){var b;const{colModel:i,rowGroupColsSvc:s,pivotColsSvc:o,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:u,pivotResultCols:c,environment:d,valueColsSvc:h,eventSvc:p,gos:g}=e,C=i.getColDefCols()??[],v=a==null?void 0:a.getColumns();if(!C.length&&!(v!=null&&v.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return xe(32),!1;const S=(F,x,V,I,M)=>{if(!F)return;const P=dK(x,t.defaultState),N=P("flex").value1;if(pP(e,F,P("hide").value1,P("sort").value1,P("sortIndex").value1,P("pinned").value1,N,n),N==null){const ie=P("width").value1;if(ie!=null){const ve=F.getColDef().minWidth??d.getDefaultColumnMinWidth();ve!=null&&ie>=ve&&F.setActualWidth(ie,n)}}M||!F.isPrimary()||(h==null||h.syncColumnWithState(F,n,P),s==null||s.syncColumnWithState(F,n,P,V),o==null||o.syncColumnWithState(F,n,P,I))},R=(F,x,V)=>{var Ae,Ie;const I=yP(e,n),M=x.slice(),P={},N={},ie=[],ve=[],Be=[];let ee=0;const U=(s==null?void 0:s.columns.slice())??[],L=(o==null?void 0:o.columns.slice())??[];for(const Ve of F){const ot=Ve.colId;if(ot.startsWith(Jf)){ie.push(Ve),Be.push(Ve);continue}if(Lo(ot)){ve.push(Ve),Be.push(Ve);continue}const ht=V(ot);ht?(S(ht,Ve,P,N,!1),Rs(M,ht)):(Be.push(Ve),ee+=1)}const $=Ve=>S(Ve,null,P,N,!1);M.forEach($),s==null||s.sortColumns(bP.bind(s,P,U)),o==null||o.sortColumns(bP.bind(o,N,L)),i.refreshCols(!1,n);const re=(Ve,ot,tt=[])=>{for(const ht of ot){const xt=Ve(ht.colId);Rs(tt,xt),S(xt,ht,null,null,!0)}tt.forEach($)};return re(Ve=>(r==null?void 0:r.getColumn(Ve))??null,ie,(Ae=r==null?void 0:r.getColumns())==null?void 0:Ae.slice()),re(Ve=>(a==null?void 0:a.getColumn(Ve))??null,ve,(Ie=a==null?void 0:a.getColumns())==null?void 0:Ie.slice()),RK(t,i,g),u.refresh(n),p.dispatchEvent({type:"columnEverythingChanged",source:n}),I(),{unmatchedAndAutoStates:Be,unmatchedCount:ee}};l==null||l.start();let{unmatchedAndAutoStates:E,unmatchedCount:y}=R(t.state||[],C,F=>i.getColDefCol(F));if(E.length>0||ze(t.defaultState)){const F=((b=c==null?void 0:c.getPivotResultCols())==null?void 0:b.list)??[];y=R(E,F,x=>(c==null?void 0:c.getPivotResultCol(x))??null).unmatchedCount}return l==null||l.finish(),y===0}function EK(e,t){var R,E;const{colModel:n,autoColSvc:i,selectionColSvc:s,eventSvc:o,gos:r}=e,a=n.getColDefCols();if(!(a!=null&&a.length))return;const l=n.getColDefColTree(),u=hP(l),c=[];let d=1e3,h=1e3;const p=y=>{const b=wP(y);on(b.rowGroupIndex)&&b.rowGroup&&(b.rowGroupIndex=d++),on(b.pivotIndex)&&b.pivot&&(b.pivotIndex=h++),c.push(b)};(R=i==null?void 0:i.getColumns())==null||R.forEach(p),(E=s==null?void 0:s.getColumns())==null||E.forEach(p),u==null||u.forEach(p),Ds(e,{state:c},t);const g=(i==null?void 0:i.getColumns())??[],S=[...(s==null?void 0:s.getColumns())??[],...g,...a].map(y=>({colId:y.colId}));Ds(e,{state:S,applyOrder:!0},t),o.dispatchEvent(dt(r,{type:"columnsReset",source:t}))}function yP(e,t){const{rowGroupColsSvc:n,pivotColsSvc:i,valueColsSvc:s,colModel:o,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(i==null?void 0:i.columns.slice())??[],valueColumns:(s==null?void 0:s.columns.slice())??[]},u=ep(e),c={};for(const d of u)c[d.colId]=d;return()=>{const d=(F,x,V,I)=>{const M=x.map(I),P=V.map(I);if(vr(M,P))return;const ie=new Set(x);for(const Be of V)ie.delete(Be)||ie.add(Be);const ve=[...ie];a.dispatchEvent({type:F,columns:ve,column:ve.length===1?ve[0]:null,source:t})},h=F=>{const x=[];return o.forAllCols(V=>{const I=c[V.getColId()];I&&F(I,V)&&x.push(V)}),x},p=F=>F.getColId();d("columnRowGroupChanged",l.rowGroupColumns,(n==null?void 0:n.columns)??[],p),d("columnPivotChanged",l.pivotColumns,(i==null?void 0:i.columns)??[],p);const C=h((F,x)=>{const V=F.aggFunc!=null,I=V!=x.isValueActive(),M=V&&F.aggFunc!=x.getAggFunc();return I||M});C.length>0&&SK(a,"columnValueChanged",C,t),ql(a,h((F,x)=>F.width!=x.getActualWidth()),!0,t),CP(a,h((F,x)=>F.pinned!=x.getPinned()),t),bK(a,h((F,x)=>F.hide==x.isVisible()),t);const y=h((F,x)=>F.sort!=x.getSort()||F.sortIndex!=x.getSortIndex());y.length>0&&(r==null||r.dispatchSortChangedEvents(t,y));const b=ep(e);FK(u,b,t,o,a)}}function ep(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:i}=e,s=t.getColDefCols();if(on(s)||!t.isAlive())return[];const o=n==null?void 0:n.columns,r=i==null?void 0:i.columns,a=[],l=c=>{const d=c.isRowGroupActive()&&o?o.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,p=c.isValueActive()?c.getAggFunc():null,g=c.getSort()!=null?c.getSort():null,C=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:g,sortIndex:C,aggFunc:p,rowGroup:c.isRowGroupActive(),rowGroupIndex:d,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const u=new Map(t.getCols().map((c,d)=>[c.getColId(),d]));return a.sort((c,d)=>{const h=u.has(c.colId)?u.get(c.colId):-1,p=u.has(d.colId)?u.get(d.colId):-1;return h-p}),a}function wP(e){const t=(g,C)=>g??C??null,n=e.getColDef(),i=t(n.sort,n.initialSort),s=t(n.sortIndex,n.initialSortIndex),o=t(n.hide,n.initialHide),r=t(n.pinned,n.initialPinned),a=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex);let u=t(n.rowGroupIndex,n.initialRowGroupIndex),c=t(n.rowGroup,n.initialRowGroup);u==null&&!c&&(u=null,c=null);let d=t(n.pivotIndex,n.initialPivotIndex),h=t(n.pivot,n.initialPivot);d==null&&!h&&(d=null,h=null);const p=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:s,hide:o,pinned:r,width:a,flex:l,rowGroup:c,rowGroupIndex:u,pivot:h,pivotIndex:d,aggFunc:p}}function RK(e,t,n){if(!e.applyOrder||!e.state)return;const i=[];for(const s of e.state)s.colId!=null&&i.push(s.colId);DK(t.cols,i,t,n)}function DK(e,t,n,i){if(e==null)return;let s=[];const o={};for(const a of t){if(o[a])continue;const l=e.map[a];l&&(s.push(l),o[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(o[l]!=null)continue;l.startsWith(Jf)?s.splice(r++,0,a):s.push(a)}if(s=gP(s,i),!mP(s,n.getColTree())){xe(39);return}e.list=s}function FK(e,t,n,i,s){const o={};for(const c of t)o[c.colId]=c;const r={};for(const c of e)o[c.colId]&&(r[c.colId]=!0);const a=e.filter(c=>r[c.colId]),l=t.filter(c=>r[c.colId]),u=[];l.forEach((c,d)=>{const h=a==null?void 0:a[d];if(h&&h.colId!==c.colId){const p=i.getCol(h.colId);p&&u.push(p)}}),u.length&&s.dispatchEvent({type:"columnMoved",columns:u,column:u.length===1?u[0]:null,finished:!0,source:n})}var bP=(e,t,n,i)=>{const s=e[n.getId()],o=e[i.getId()],r=s!=null,a=o!=null;if(r&&a)return s-o;if(r)return-1;if(a)return 1;const l=t.indexOf(n),u=t.indexOf(i),c=l>=0,d=u>=0;return c&&d?l-u:c?-1:1},TK=class extends ge{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(Kl(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Kl(e.source)))}createColsFromColDefs(e){var R,E,y;const{beans:t}=this,{valueCache:n,colAutosize:i,rowGroupColsSvc:s,pivotColsSvc:o,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:u}=t,c=this.colDefs?yP(t,e):void 0;n==null||n.expire();const d=(R=this.colDefCols)==null?void 0:R.list,h=(E=this.colDefCols)==null?void 0:E.tree,p=fK(t,this.colDefs,!0,h,e);Xf(t,(y=this.colDefCols)==null?void 0:y.tree,p.columnTree);const g=p.columnTree,C=p.treeDepth,v=hP(g),S={};for(const b of v)S[b.getId()]=b;this.colDefCols={tree:g,treeDepth:C,list:v,map:S},this.createColumnsForService([u],this.colDefCols,e),s==null||s.extractCols(e,d),o==null||o.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}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e,t){var v;if(!this.colDefCols)return;const n=(v=this.cols)==null?void 0:v.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:s,rowNumbersSvc:o,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:u,visibleCols:c,colViewport:d,eventSvc:h}=this.beans,p=this.selectCols(a,this.colDefCols);this.createColumnsForService([i,s,o],p,t);const g=j8(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(p),this.positionLockedCols(p),l==null||l.refresh(),r==null||r.refreshCols(),this.setColSpanActive(),u==null||u.setAutoHeightActive(p),c.clear(),d.clear(),!vr(n,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,n){for(const i of e)i&&(i.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(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:s,tree:o,treeDepth:r}=n??t;return this.cols={list:s.slice(),map:{...i},tree:o.slice(),treeDepth:r},n&&(n.list.some(l=>{var u;return((u=this.cols)==null?void 0:u.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,s=t==null?void 0:t.isSelectionColumnEnabled(),o=n.get("rowNumbers"),r=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const u=XC(l);if(i){const c=r==null?void 0:r.includes(l);return u||c||s&&Lo(l)||o&&No(l)}else return u||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Ds(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 s=new Map;for(let d=0;d<n.length;d++){const h=n[d];s.set(h,d)}const o=e.list.filter(d=>!s.has(d));if(o.length===0){e.list=n;return}const r=(d,h)=>{const p=h?h.getOriginalParent():d.getOriginalParent();if(!p)return null;let g=null,C=null;for(const v of p.getChildren())if(!(v===h||v===d)){if(v instanceof Ea){const S=s.get(v);if(S==null)continue;(g==null||g<S)&&(g=S,C=v);continue}v.forEachLeafColumn(S=>{const R=s.get(S);R!=null&&(g==null||g<R)&&(g=R,C=S)})}return C??r(d,p)},a=[],l=new Map;for(const d of o){const h=r(d,null);if(h==null){a.push(d);continue}const p=l.get(h);p===void 0?l.set(h,d):Array.isArray(p)?p.push(d):l.set(h,[p,d])}const u=new Array(e.list.length);let c=u.length-1;for(let d=a.length-1;d>=0;d--)u[c--]=a[d];for(let d=n.length-1;d>=0;d--){const h=n[d],p=l.get(h);if(p)if(Array.isArray(p))for(let g=p.length-1;g>=0;g--){const C=p[g];u[c--]=C}else u[c--]=p;u[c--]=h}e.list=u}positionLockedCols(e){e.list=gP(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=Kl(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;Xf(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 o,r,a,l,u;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:i,groupHierarchyColSvc:s}=this.beans;ed((o=this.colDefCols)==null?void 0:o.list,e),ed((r=n==null?void 0:n.columns)==null?void 0:r.list,e),ed((a=i==null?void 0:i.columns)==null?void 0:a.list,e),ed((l=s==null?void 0:s.columns)==null?void 0:l.list,e),ed((u=t==null?void 0:t.getPivotResultCols())==null?void 0:u.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(td(i[a],e))return i[a];const{autoColSvc:s,selectionColSvc:o,groupHierarchyColSvc:r}=this.beans;return(s==null?void 0:s.getColumn(e))??(o==null?void 0:o.getColumn(e))??(r==null?void 0:r.getColumn(e))??null}},SP=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 nd(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var We=null;function EP(e){return typeof(e==null?void 0:e.getGui)=="function"}var RP=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){for(const o of s)this.toggleCss(o,t);return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},xK=0,id=class extends Zs{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=xK++,this.cssManager=new RP(()=>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(I_):null}applyElementsToComponent(e,t,n,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===We)this[t]=i??e;else{const o=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!o)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}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 s=this.createComponentFromElement(i,o=>{const r=o.getGui();if(r)for(const a of i.attributes??[])r.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const o=Array.prototype.slice.call(i.children);s.addItems(o)}this.swapComponentForNode(s,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)}}createComponentFromElement(e,t,n){const i=e.nodeName,s=this.getDataRefAttribute(e),o=i.indexOf("AG-")===0,r=o?this.componentSelectors.get(i):null;let a=null;if(r){const l=n&&s?n[s]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(o)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,s,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=kC(e):i=jc(e),this.setTemplateFromElement(i,t,n)}setTemplateFromElement(e,t,n,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let s=0;s<t.length;s++){const o=t[s];this.componentSelectors.set(o.selector,o)}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),LC(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;l8(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;rn(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)}},$t=class extends id{};function DP(e){return typeof e=="object"&&!!e.component}function _K(e,t){return new gn(n=>{n(window.setInterval(e,t))})}var gn=class Nd{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 Nd(n=>{let i=t.length;const s=new Array(i);t.forEach((o,r)=>{o.then(a=>{s[r]=a,i--,i===0&&n(s)})})}):Nd.resolve()}static resolve(t=null){return new Nd(n=>n(t))}then(t){return new Nd(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 PK(e){return e?e.prototype&&"getGui"in e.prototype:!1}function FP(e,t,n,i){const{name:s}=n;let o,r,a,l,u,c;if(t){const d=t,h=d[s+"Selector"],p=h?h(i):null,g=C=>{typeof C=="string"?o=C:C!=null&&C!==!0&&(e.isFrameworkComponent(C)?a=C:r=C)};p?(g(p.component),l=p.params,u=p.popup,c=p.popupPosition):g(d[s])}return{compName:o,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:u,popupPositionFromSelector:c}}var AK=class extends ge{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,s=!1){var E;const{name:o,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:d,popupPositionFromSelector:h}=FP(this.beans.frameworkOverrides,e,t,i),p,g;const C=y=>{const b=this.registry.getUserComponent(o,y);b&&(l=b.componentFromFramework?void 0:b.component,u=b.componentFromFramework?b.component:void 0,p=b.params,g=b.processParams)};if(a!=null&&C(a),l==null&&u==null&&n!=null&&C(n),l&&r&&!PK(l)&&(l=(E=this.agCompUtils)==null?void 0:E.adaptFunction(t,l)),!l&&!u){const{validation:y}=this.beans;s&&(a!==n||!n)?a?y!=null&&y.isProvidedUserComp(a)||Kt(50,{compName:a}):n?y||Kt(260,{...this.gos.getModuleErrorParams(),propName:o,compName:n}):Kt(216,{name:o}):n&&!y&&Kt(146,{comp:n});return}const v=this.mergeParams(e,t,i,c,p,g),S=l==null,R=l??u;return{componentFromFramework:S,componentClass:R,params:v,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(R,S,v,t)}}newAgStackInstance(e,t,n,i){var a;const s=!t;let o;s?o=new e:o=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(o);const r=(a=o.init)==null?void 0:a.call(o,n);return r==null?gn.resolve(o):r.then(()=>o)}mergeParams(e,t,n,i=null,s,o){const r={...n,...s},a=e,l=a==null?void 0:a[t.name+"Params"];if(typeof l=="function"){const u=l(n);ci(r,u)}else typeof l=="object"&&ci(r,l);return ci(r,i),o?o(r):r}},IK={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},kK={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},OK={name:"headerComponent",optionalMethods:["refresh"]},MK={name:"innerHeaderComponent"},LK={name:"innerHeaderGroupComponent"},NK={name:"headerGroupComponent"},VK={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},BK={name:"loadingCellRenderer",cellRenderer:!0},HK={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},GK={name:"loadingOverlayComponent",optionalMethods:["refresh"]},$K={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},WK={name:"tooltipComponent"},ey={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},zK={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},UK={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},jK={name:"loadingCellRenderer",cellRenderer:!0},KK={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},qK={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function YK(e,t){return e.getCompDetailsFromGridOptions(kK,"agDragAndDropImage",t,!0)}function ZK(e,t,n){return e.getCompDetails(t,OK,"agColumnHeader",n)}function JK(e,t,n){return e.getCompDetails(t,MK,void 0,n)}function XK(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,NK,"agColumnGroupHeader",t)}function QK(e,t,n){return e.getCompDetails(t,LK,void 0,n)}function e7(e,t){return e.getCompDetailsFromGridOptions(UK,void 0,t,!0)}function t7(e,t){return e.getCompDetailsFromGridOptions(jK,"agLoadingCellRenderer",t,!0)}function n7(e,t){return e.getCompDetailsFromGridOptions(KK,"agGroupRowRenderer",t,!0)}function i7(e,t){return e.getCompDetailsFromGridOptions(qK,"agDetailCellRenderer",t,!0)}function TP(e,t,n){return e.getCompDetails(t,VK,void 0,n)}function xP(e,t,n){return e.getCompDetails(t,BK,"agSkeletonCellRenderer",n,!0)}function _P(e,t,n){return e.getCompDetails(t,HK,"agCellEditor",n,!0)}function s7(e,t,n,i){const s=t.filter;return DP(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,ey,i,n,!0)}function o7(e,t,n){return e.getCompDetails(t,IK,"agDateInput",n,!0)}function r7(e,t){return e.getCompDetailsFromGridOptions(GK,"agLoadingOverlay",t,!0)}function a7(e,t){return e.getCompDetailsFromGridOptions($K,"agNoRowsOverlay",t,!0)}function l7(e,t){return e.getCompDetails(t.colDef,WK,"agTooltipComponent",t,!0)}function u7(e,t,n,i){return e.getCompDetails(t,zK,i,n)}function PP(e,t){return FP(e,t,ey)}function ty(e,t,n){return e.mergeParams(t,ey,n)}function sd(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function c7(e){return typeof e=="object"&&!!e.getComp}var se={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"},ny=class extends id{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()}},iy,sy,oy,ry,ay,ly,uy;function Cr(){return iy===void 0&&(iy=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),iy}function AP(){return sy===void 0&&(sy=/(firefox)/i.test(navigator.userAgent)),sy}function IP(){return oy===void 0&&(oy=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),oy}function Ra(){return ry===void 0&&(ry=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),ry}function cy(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!AP())?null:t.toString()}function d7(){if(uy!==void 0)return uy;if(!document.body)return-1;let e=1e6;const t=AP()?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(),uy=e,e}function h7(){return ly==null&&kP(),ly}function kP(){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&&(ly=n,ay=n===0)}function OP(){return ay==null&&kP(),ay}var dy="T",f7=new RegExp(`[${dy} ]`),p7=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${dy}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Qs(e,t){return e.toString().padStart(t,"0")}function Ni(e,t=!0,n=dy){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>Qs(s,2)).join("-");return t&&(i+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>Qs(s,2)).join(":")),i}function tp(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Qs(e.getDate(),2),Qs(e.getHours(),2),`:${Qs(e.getMinutes(),2)}`,`:${Qs(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Qs(e.getDate(),2)].map(String):null}var hy=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"},MP=["January","February","March","April","May","June","July","August","September","October","November","December"],fy=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function py(e,t){if(t==null)return Ni(e,!1);const n=Qs(e.getFullYear(),4),i={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>MP[e.getMonth()],MMM:()=>MP[e.getMonth()].slice(0,3),MM:()=>Qs(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${hy(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${hy(e.getDate())}`,DD:()=>Qs(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>fy[e.getDay()],ddd:()=>fy[e.getDay()].slice(0,3),dd:()=>fy[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${hy(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(i).join("|"),"g");return t.replace(s,o=>o in i?i[o]():o)}function np(e,t=!1){return!!Ci(e,t)}function g7(e){return np(e,!0)}function Ci(e,t=!1,n){if(!e||!n&&!p7.test(e))return null;const[i,s]=e.split(f7);if(!i)return null;const o=i.split("-").map(p=>Number.parseInt(p,10));if(o.filter(p=>!isNaN(p)).length!==3)return null;const[r,a,l]=o,u=new Date(r,a-1,l);if(u.getFullYear()!==r||u.getMonth()!==a-1||u.getDate()!==l||!s&&t)return null;if(!s||s==="00:00:00")return u;const[c,d,h]=s.split(":").map(p=>Number.parseInt(p,10));if(c>=0&&c<24)u.setHours(c);else if(t)return null;if(d>=0&&d<60)u.setMinutes(d);else if(t)return null;if(h>=0&&h<60)u.setSeconds(h);else if(t)return null;return u}function gy(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:i,filterByPercentageOfBestMatch:s}=e;let o=(n??[]).map((l,u)=>({value:l,relevance:m7(t,l),idx:u}));if(o.sort((l,u)=>l.relevance-u.relevance),i&&(o=o.filter(l=>l.relevance<Math.max(l.value.length,t.length))),o.length>0&&s&&s>0){const u=o[0].relevance*s;o=o.filter(c=>u-c.relevance<0)}const r=[],a=[];for(const l of o)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function m7(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],i=[];const s=e.length,o=t.length;for(let a=0;a<=o;a++)n[a]=a;let r=0;for(let a=1;a<=s;a++){i[0]=a;for(let l=1;l<=o;l++){const u=e[a-1],c=t[l-1];if(u.toLocaleLowerCase()===c.toLocaleLowerCase())++r,u===c&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<s/2-10&&++r,i[l]=n[l-1];else{const d=i[l-1],h=n[l],p=n[l-1];i[l]=1+Math.min(d,h,p)}}[n,i]=[i,n]}return n[o]/(r+1)}function LP(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var my=!1,ip=0;function v7(e){ip>0||(e.addEventListener("keydown",sp),e.addEventListener("mousedown",sp))}function C7(e){ip>0||(e.removeEventListener("keydown",sp),e.removeEventListener("mousedown",sp))}function sp(e){const t=my,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(my=n)}function y7(e){const t=Ln(e);return v7(t),ip++,()=>{ip--,C7(t)}}function w7(){return my}function Yl(e,t,n=!1){const i=a8;let s=D_;t&&(s+=", "+t),n&&(s+=', [tabindex="-1"]');const o=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>qs(l)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?((l,u)=>l.filter(c=>u.indexOf(c)===-1))(o,r):o}function Da(e,t=!1,n=!1,i=!1){const s=Yl(e,i?".ag-tab-guard":null,n),o=t?Zt(s):s[0];return o?(o.focus({preventScroll:!0}),!0):!1}function Fa(e,t,n,i){const s=Yl(t,n?':not([tabindex="-1"])':null),o=un(e);let r;n?r=s.findIndex(l=>l.contains(o)):r=s.indexOf(o);const a=r+(i?-1:1);return a<0||a>=s.length?null:s[a]}function NP(e,t=5){let n=0;for(;e&&cy(e)===null&&++n<=t;)e=e.parentElement;return cy(e)===null?null:e}var b7=".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)}",S7=class extends id{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(b7)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:i,disabled:s}=this.config;s!=null&&this.setDisabled(s),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;Gn(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(rn(t,!1),dr(t,"presentation")):(rn(t,!0),dr(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:(Hf(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return $c(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},VP=class extends S7{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==""||Uj(e)!==null?Hc(e,""):Hc(e,t??"")}setAriaLabel(e){return Bl(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 Ys(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 E7(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 Ta=class extends VP{constructor(e,t,n="text",i="input"){super(e,(e==null?void 0:e.template)??E7(i),[],t),this.inputType=n,this.displayFieldTag=i,this.eLabel=We,this.eWrapper=We,this.eInput=We}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:s,inputWidth:o}=this.config;s!=null&&this.setInputName(s),o!=null&&this.setInputWidth(o),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,Mi(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return Hf(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 Mi(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Bl(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return $c(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Mi(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Mi(this.eInput,"autocomplete",t)}return this}},vy=class extends Ta{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)}},Cy={selector:"AG-CHECKBOX",component:vy},R7=class extends vy{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)}},xa=class extends Ta{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=ze(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{LP(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{var s;const i=(s=n.clipboardData)==null?void 0:s.getData("text");i!=null&&i.split("").some(o=>!e.test(o))&&n.preventDefault()}})}},op={selector:"AG-INPUT-TEXT-FIELD",component:xa},D7=class extends Ta{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}},F7={selector:"AG-INPUT-TEXT-AREA",component:D7},yy=class extends xa{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const o=Number.parseFloat(e.value),r=isNaN(o)?"":this.normalizeValue(o.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:i,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof i=="number"&&this.setMax(i),typeof s=="number"&&this.setStep(s)}onWheel(e){un(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 s=Number.parseFloat(e).toFixed(n);return Number.parseFloat(s).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,Mi(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Mi(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Mi(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(ze(n)){let i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return e(n);if(!i){n=this.adjustPrecision(n);const s=this.normalizeValue(n);i=n!=s}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")}},T7={selector:"AG-INPUT-NUMBER-FIELD",component:yy},x7=class extends xa{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Cr();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){un(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Ni(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Mi(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Ni(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Mi(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Mi(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 Ci(this.getValue())??void 0}setDate(e,t){this.setValue(Ni(e??null,this.includeTime),t)}},BP={selector:"AG-INPUT-DATE-FIELD",component:x7},_7=".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)}}",P7="ag-active-item",A7=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),I7=class extends id{constructor(e,t,n){super(A7(e,t)),this.label=t,this.value=n,this.eText=We}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(P7,e),E_(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();Jj(n,e),Zj(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>OC(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)}))}},k7=class extends id{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(_7)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case se.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case se.DOWN:case se.UP:e.preventDefault(),this.navigate(t);break;case se.PAGE_DOWN:case se.PAGE_UP:case se.PAGE_HOME:case se.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();Gn(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(!qs(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:i,clientHeight:s}=n,{offsetTop:o,offsetHeight:r}=t;(o+r>i+s||o<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 I7(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===se.DOWN;let n;const{listItems:i,highlightedItem:s}=this;if(!s)n=t?i[0]:Zt(i);else{let r=i.indexOf(s)+(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),s=this.options.length-1,o=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/o);let a=-1;e===se.PAGE_HOME?a=0:e===se.PAGE_END?a=s:e===se.PAGE_DOWN?a=Math.min(i+r,s):e===se.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){dr(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"})}},O7=".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}}",M7={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"}}]}]},L7=class extends VP{constructor(e){if(super(e,(e==null?void 0:e.template)||M7,(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=We,this.eWrapper=We,this.eDisplayField=We,this.eIcon=We,this.registerCSS(O7),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:s,maxPickerWidth:o}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,n!=null&&this.setPickerMaxHeight(n),s!=null&&this.setPickerMinWidth(s),o!=null&&this.setPickerMaxWidth(o)}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 s=this.beans.iconSvc.createIconNoSpan(n);s&&this.eIcon.appendChild(s)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),AC(e,!1),this.ariaRole&&dr(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 se.UP:case se.DOWN:case se.ENTER:case se.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case se.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:s=!0},maxPickerHeight:o,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:u,eWrapper:c}=this,d={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const C=m_(u);this.beforeHidePicker(),C&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,i),anchorToElement:c};e.style.position="absolute";const h=u.popupSvc,p=h.addPopup(d);l?(r&&(e.style.minWidth=r),e.style.width=MC(Lf(c)),a&&(e.style.maxWidth=a)):Hf(e,a??Lf(c));const g=o??`${IC(h.getPopupParent())}px`;return e.style.setProperty("max-height",g),this.alignPickerToComponent(),p.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:i},eWrapper:s,pickerComponent:o}=this,r=i.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:s,ePopup:o.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();AC(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 Hf(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()}},N7=".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)}",wy=class extends L7{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(N7)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Bf(()=>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 k7("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),r8(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===se.TAB&&this.hidePicker(),t){case se.ENTER:case se.UP:case se.DOWN:case se.PAGE_UP:case se.PAGE_DOWN:case se.PAGE_HOME:case se.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case se.ESCAPE:super.onKeyDown(e);break;case se.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:s},eDisplayField:o,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&&s&&(l=s),o.textContent=l,r==null||r.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},V7={selector:"AG-SELECT",component:wy},B7=':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}}',by=typeof window!="object"||!((Fk=(Dk=window==null?void 0:window.document)==null?void 0:Dk.fonts)!=null&&Fk.forEach),Zl=(e,t,n,i,s,o)=>{if(by)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let r=Jl.map.get(t);if(r||(r=[],Jl.map.set(t,r)),r.some(c=>c.css===e))return;const a=document.createElement("style");o&&a.setAttribute("nonce",o),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:s};let u;for(const c of r){if(c.priority>s)break;u=c}if(u){u.el.insertAdjacentElement("afterend",a);const c=r.indexOf(u);r.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},HP=(e,t,n,i)=>{Zl(B7,e,"shared",t,0,n),i==null||i.forEach((s,o)=>s.forEach(r=>Zl(r,e,o,t,0,n)))},H7=e=>{Jl.grids.add(e)},G7=e=>{if(Jl.grids.delete(e),Jl.grids.size===0){Jl.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},GP,Jl=(GP=typeof window=="object"?window:{}).agStyleInjectionState??(GP.agStyleInjectionState={map:new WeakMap,grids:new Set}),eo=e=>new $P(e),yr="$default",$7=0,$P=class{constructor({feature:e,params:t,modeParams:n={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[yr]:{...n[yr]??{},...t??{}},...n}}use(e,t,n){let i=this._inject;if(i==null){let{css:s}=this;if(s){const o=`ag-theme-${this.feature??"part"}-${++$7}`;typeof s=="function"&&(s=s()),s=`:where(.${o}) {
91
+ ${s}
92
+ }
93
+ `;for(const r of this.cssImports??[])s=`@import url(${JSON.stringify(r)});
94
+ ${s}`;i={css:s,class:o}}else i=!1;this._inject=i}return i&&e&&Zl(i.css,e,i.class,t,1,n),i?i.class:!1}},W7=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),WP=e=>`--ag-${W7(e)}`,to=e=>`var(${WP(e)})`,z7=(e,t,n)=>Math.max(t,Math.min(n,e)),U7=e=>{const t=new Map;return n=>{const i=n;return t.has(i)||t.set(i,e(n)),t.get(i)}},no=e=>({ref:"accentColor",mix:e}),es=e=>({ref:"foregroundColor",mix:e}),ts=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),j7=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),yi={ref:"backgroundColor"},Xl={ref:"foregroundColor"},Bo={ref:"accentColor"},rp={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:es(.15),chromeBackgroundColor:ts(.02),browserColorScheme:"light"},K7={...rp,textColor:Xl,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,focusShadow:{spread:3,color:no(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:yi,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:Bo,toggleButtonOffBackgroundColor:ts(.3),toggleButtonSwitchBackgroundColor:yi,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}}},q7=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],Y7=U7(e=>(e=e.toLowerCase(),q7.find(t=>e.endsWith(t.toLowerCase()))??"length")),ap=e=>typeof e=="object"&&(e!=null&&e.ref)?to(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,Sy=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){const t=to(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?to(e.onto):"transparent"}, ${t} ${z7(e.mix*100,0,100)}%)`}return!1},Z7=ap,Ql=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,n=>n[0]==="-"?n:" "+to(n)+" ")})`:e&&"ref"in e?to(e.ref):!1,J7=ap,Ey=(e,t)=>typeof e=="string"?e:e===!0?Ey({},t):e===!1?t==="columnBorder"?Ey({color:"transparent"},t):"none":e&&"ref"in e?to(e.ref):zP(e.style??"solid")+" "+Ql(e.width??{ref:"borderWidth"})+" "+Sy(e.color??{ref:"borderColor"}),X7=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?to(e.ref):[Ql(e.offsetX??0),Ql(e.offsetY??0),Ql(e.radius??0),Ql(e.spread??0),Sy(e.color??{ref:"foregroundColor"})].join(" "),zP=ap,UP=e=>typeof e=="string"?e.includes(",")?e:jP(e):e&&"googleFont"in e?UP(e.googleFont):e&&"ref"in e?to(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),jP(t))).join(", "):!1,jP=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),Q7=ap,KP=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?KP({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?to(e.ref):!1,e9=(e,t,n)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&n.warn(104,{value:e,param:t}),`${e}s`):e&&"ref"in e?to(e.ref):!1,t9={color:Sy,colorScheme:Z7,length:Ql,scale:J7,border:Ey,borderStyle:zP,shadow:X7,image:KP,fontFamily:UP,fontWeight:Q7,duration:e9},n9=(e,t,n)=>{const i=Y7(e);return t9[i](t,e,n)},i9=e=>new qP(e),qP=class nO{constructor(t,n=[]){this.themeLogger=t,this.parts=n}withPart(t){return typeof t=="function"&&(t=t()),t instanceof $P?new nO(this.themeLogger,[...this.parts,t]):(this.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(eo({feature:t}))}withParams(t,n=yr){return this.withPart(eo({modeParams:{[n]:t}}))}_startUse({styleContainer:t,cssLayer:n,nonce:i,loadThemeGoogleFonts:s,moduleCss:o}){if(by)return;o9(),HP(t,n,i,o);const r=s9(this);if(r.length>0)for(const a of r)s&&r9(a,i);for(const a of this.parts)a.use(t,n,i)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=YP(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const n={[yr]:{...K7}};for(const i of YP(this.parts))for(const s of Object.keys(i.modeParams)){const o=i.modeParams[s];if(o){const r=n[s]??(n[s]={}),a=new Set;for(const l of Object.keys(o)){const u=o[l];u!==void 0&&(r[l]=u,a.add(l))}if(s===yr)for(const l of Object.keys(n)){const u=n[l];if(l!==yr)for(const c of a)delete u[c]}}}this._paramsCache=t=n}return t}_getPerInstanceCss(t){const n="##SELECTOR##";let i=this._paramsCssCache;if(!i){let s="",o="";const r=this._getModeParams();for(const l of Object.keys(r)){const u=r[l];if(l!==yr){const d=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(l):l}"]) & {
95
+ `;s+=d,o+=d}for(const c of Object.keys(u).sort()){const d=u[c],h=n9(c,d,this.themeLogger);if(h===!1)this.themeLogger.error(107,{key:c,value:d});else{const p=WP(c),g=p.replace("--ag-","--ag-inherited-");s+=` ${p}: var(${g}, ${h});
96
+ `,o+=` ${g}: var(${p});
97
+ `}}l!==yr&&(s+=`}
98
+ `,o+=`}
99
+ `)}let a=`${n} {
100
+ ${s}}
101
+ `;a+=`:has(> ${n}):not(${n}) {
102
+ ${o}}
103
+ `,this._paramsCssCache=i=a}return i.replaceAll(n,`:where(.${t})`)}},YP=e=>{const t=new Map;for(const i of e)t.set(i.feature,i);const n=[];for(const i of e)(!i.feature||t.get(i.feature)===i)&&n.push(i);return n},s9=e=>{const t=new Set,n=o=>{if(Array.isArray(o))o.forEach(n);else{const r=o==null?void 0:o.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(o=>Object.values(o)).forEach(n),Array.from(t).sort()},ZP=!1,o9=()=>{if(!ZP){ZP=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},r9=async(e,t)=>{const n=`@import url('https://${a9}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
104
+ `;Zl(n,document.head,`googleFont:${e}`,void 0,0,t)},a9="fonts.googleapis.com",l9=1,u9=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=l9++,e!=null&&e.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(const t of e.beanClasses){const n=new t;n.beanName?this.beans[n.beanName]=n:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(n)}for(const t of e.derivedBeans??[]){const{beanName:n,bean:i}=t(this);this.beans[n]=i,this.createdBeans.push(i)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){var i,s,o,r;const n=this.beans;for(const a of e)(i=a.preWireBeans)==null||i.call(a,n),(s=a.wireBeans)==null||s.call(a,n);for(const a of e)(o=a.preConstruct)==null||o.call(a);t&&e.forEach(t);for(const a of e)(r=a.postConstruct)==null||r.call(a)}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){var t;if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],(t=this.destroyCallback)==null||t.call(this)}destroyBean(e){var t;(t=e==null?void 0:e.destroy)==null||t.call(e)}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},c9=0,d9=class extends Zs{constructor(){super(...arguments),this.beanName="environment",this.paramsClass=`ag-theme-params-${++c9}`,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){const{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t),this.eStyleContainer=e.get("themeStyleContainer")??(t.getRootNode()===document?document.head:t),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.initVariables(),this.addDestroyFunc(()=>G7(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){const{theme:n}=this;let i;n?i=`${this.paramsClass} ${n._getCssClass()}`:i=this.applyLegacyThemeClasses();for(const s of Array.from(e.classList))s.startsWith("ag-theme-")&&e.classList.remove(s);if(i){const s=e.className;e.className=`${s}${s?" ":""}${i}${t!=null&&t.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let n=!1;for(const i of Array.from(t.classList))i.startsWith("ag-theme-")&&(n=!0,e=e?`${e} ${i}`:i);n&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?Zl(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}handleThemeChange(){const{gos:e,theme:t}=this,n=e.get("theme");let i;if(n==="legacy")i=void 0;else{const s=n??this.getDefaultTheme();s instanceof qP?i=s:this.themeError(s)}i!==t&&this.handleNewTheme(i),this.postProcessThemeChange(i,n)}handleNewTheme(e){const{gos:t,eRootDiv:n,globalCSS:i}=this,s=this.getAdditionalCss();if(e){H7(this),HP(this.eStyleContainer,this.cssLayer,this.styleNonce,s);for(const[r,a]of i)Zl(r,this.eStyleContainer,a,this.cssLayer,0,this.styleNonce);i.length=0}this.theme=e,e==null||e._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:s});let o=this.eParamsStyle;if(!o){o=this.eParamsStyle=jc({tag:"style"});const r=t.get("styleNonce");r&&o.setAttribute("nonce",r),n.appendChild(o)}by||(o.textContent=(e==null?void 0:e._getPerInstanceCss(this.paramsClass))||""),this.applyThemeClasses(n),this.fireStylesChangedEvent("themeChanged")}},h9=class extends Zs{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e){this.dynamicBeans??(this.dynamicBeans={});for(const t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...n){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));const i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new i(...n)}},f9=class extends Zs{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new va}addListener(e,t,n){this.globalSvc.addEventListener(e,t,n)}removeListener(e,t,n){this.globalSvc.removeEventListener(e,t,n)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},JP=class extends Zs{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const n="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(n,e):i.removeAttribute(n))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){var e;(e=this.tooltipManager)==null||e.prepareToShowTooltip()}attemptToHideTooltip(){var e;(e=this.tooltipManager)==null||e.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},p9=1e3,g9=1e3,XP=100,QP,lp=!1,m9=class extends Zs{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){var t,n,i,s;return e==="show"?((n=(t=this.tooltipCtrl).getTooltipShowDelayOverride)==null?void 0:n.call(t))??this.getGridOptionsTooltipDelay("tooltipShowDelay"):((s=(i=this.tooltipCtrl).getTooltipHideDelayOverride)==null?void 0:s.call(i))??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Ra()&&(lp?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},XP):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){var s;const t=e.relatedTarget,n=this.tooltipCtrl.getGui(),i=(s=this.tooltipComp)==null?void 0:s.getGui();this.isInteractingWithTooltip||n.contains(t)||this.interactionEnabled&&(i!=null&&i.contains(t))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||lp)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-QP<p9}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){var s,o;const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!ze(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const n=this.gos.addCommon({location:((s=t.getLocation)==null?void 0:s.call(t))??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...(o=t.getAdditionalParams)==null?void 0:o.call(t)});this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(n,i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),QP=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){var r;if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),o=(r=this.popupSvc)==null?void 0:r.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(o&&(this.tooltipPopupDestroyFunc=o.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const a=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:a}),this.setEventHandlers(a)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Ln(this.beans),{keydown:a=>{i.contains(a==null?void 0:a.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var n;const e=(n=this.tooltipComp)==null?void 0:n.getGui(),t=un(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){var t,n;const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?(t=this.popupSvc)==null||t.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):(n=this.popupSvc)==null||n.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,n=this.tooltipTrigger===0?g9:0;window.setTimeout(()=>{e(),this.destroyBean(t)},n),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){lp=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},XP)}unlockService(){lp=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}},v9=class extends JP{constructor(e,t,n){super(e,n),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},up=0,C9=200,y9=class extends Zs{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:n,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:s,eventSource:o,alignSide:r="left",position:a="over",type:l}=e,u=o.getBoundingClientRect(),c=this.getParentRect();this.setAlignedTo(o,t);const d=()=>{let h=u.left-c.left;r==="right"&&(h-=t.offsetWidth-u.width);let p;return a==="over"?(p=u.top-c.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,c,e.nudgeY||0)==="under"?p=u.top-c.top+u.height:p=u.top-t.offsetHeight-(i||0)*2-c.top),{x:h,y:p}};this.positionPopup({ePopup:t,nudgeX:n,nudgeY:i,keepWithinBounds:s,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup(e,l,t,o,null)})}shouldRenderUnderOrAbove(e,t,n,i){const s=n.bottom-t.bottom,o=t.top-n.top,r=e.offsetHeight+i;return s>r?"under":o>r||o>s?"above":"under"}setAlignedStyles(e,t){const n=this.getPopupIndex(e);if(n===-1)return;const i=this.popupList[n],{alignedToElement:s}=i;if(!s)return;const o=["right","left","over","above","under"];for(const r of o)s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`);t&&(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const n=this.getPopupIndex(t);if(n!==-1){const i=this.popupList[n];i.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:n,nudgeX:i,nudgeY:s,skipObserver:o,updatePosition:r}=e,a={width:0,height:0},l=(u=!1)=>{let{x:c,y:d}=r();u&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(c+=i),s&&(d+=s),n&&(c=this.keepXYWithinBounds(t,c,1),d=this.keepXYWithinBounds(t,d,0)),t.style.left=`${c}px`,t.style.top=`${d}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!o){const u=hr(this.beans,t,()=>l(!0));setTimeout(()=>u(),C9)}}getParentRect(){const e=Ln(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),T_(t)}keepXYWithinBounds(e,t,n){const i=n===0,s=i?"clientHeight":"clientWidth",o=i?"top":"left",r=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=Ln(this.beans),u=l.documentElement,c=this.getPopupParent(),d=e.getBoundingClientRect(),h=c.getBoundingClientRect(),p=l.documentElement.getBoundingClientRect(),g=c===l.body,C=Math.ceil(d[r]);let S=g?(i?F_:Lf)(u)+u[a]:c[s];g&&(S-=Math.abs(p[o]-h[o]));const R=S-C;return Math.min(Math.max(t,0),Math.max(R,0))}addPopup(e){const{eChild:t,ariaLabel:n,ariaOwns:i,alwaysOnTop:s,positionCallback:o,anchorToElement:r}=e,a=this.getPopupIndex(t);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!s,n,i),u=this.addEventListenersToPopup({...e,wrapperEl:l});return o&&o(),this.addPopupToPopupList(t,l,u,r),{hideFunc:u}}initialisePopupPosition(e){const n=this.getPopupParent().getBoundingClientRect();ze(e.style.top)||(e.style.top=`${n.top*-1}px`),ze(e.style.left)||(e.style.left=`${n.left*-1}px`)}createPopupWrapper(e,t,n,i){const s=this.getPopupParent(),{environment:o,gos:r}=this.beans,a=jc({tag:"div"});return o.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||dr(e,"dialog"),n?Bl(e,n):i&&(e.id||(e.id=`popup-component-${up}`),R_(i,e.id)),a.appendChild(e),s.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,n=Ln(t),{wrapperEl:i,eChild:s,closedCallback:o,afterGuiAttached:r,closeOnEsc:a,modal:l,ariaOwns:u}=e;let c=!1;const d=C=>{if(!i.contains(un(t)))return;C.key===se.ESCAPE&&!this.isStopPropagation(C)&&g({keyboardEvent:C})},h=C=>g({mouseEvent:C}),p=C=>g({touchEvent:C}),g=(C={})=>{const{mouseEvent:v,touchEvent:S,keyboardEvent:R,forceHide:E}=C;!E&&(this.isEventFromCurrentPopup({mouseEvent:v,touchEvent:S},s)||c)||(c=!0,i.remove(),n.removeEventListener("keydown",d),n.removeEventListener("mousedown",h),n.removeEventListener("touchstart",p),n.removeEventListener("contextmenu",h),this.eventSvc.removeListener("dragStarted",h),o&&o(v||S||R),this.removePopupFromPopupList(s,u))};return r&&r({hidePopup:g}),window.setTimeout(()=>{a&&n.addEventListener("keydown",d),l&&(n.addEventListener("mousedown",h),this.eventSvc.addListener("dragStarted",h),n.addEventListener("touchstart",p),n.addEventListener("contextmenu",h))},0),g}addPopupToPopupList(e,t,n,i){this.popupList.push({element:e,wrapper:t,hideFunc:n,instanceId:up,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),up=up+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const n=this.getPopupIndex(e);if(n===-1)return;const i=this.popupList[n];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(o=>o&&o()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=s,i.isAnchored=!0,s}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&R_(t,null),this.popupList=this.popupList.filter(n=>n.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),n=t.getBoundingClientRect(),{element:i,ePopup:s}=e,o=i.getBoundingClientRect(),r=d=>Number.parseInt(d.substring(0,d.length-1),10),a=(d,h)=>{const p=n[d]-o[d],g=r(s.style[d]);return{initialDiff:p,lastDiff:p,initial:g,last:g,direction:h}},l=a("top",0),u=a("left",1),c=this.beans.frameworkOverrides;return new gn(d=>{c.wrapIncoming(()=>{_K(()=>{const h=t.getBoundingClientRect(),p=i.getBoundingClientRect();if(p.top==0&&p.left==0&&p.height==0&&p.width==0){e.hidePopup();return}const C=(v,S)=>{const R=r(s.style[S]);v.last!==R&&(v.initial=R,v.last=R);const E=h[S]-p[S];if(E!=v.lastDiff){const y=this.keepXYWithinBounds(s,v.initial+v.initialDiff-E,v.direction);s.style[S]=`${y}px`,v.last=y}v.lastDiff=E};C(l,"top"),C(u,"left")},200).then(h=>{d(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:n,touchEvent:i}=e,s=n||i;if(!s)return!1;const o=this.getPopupIndex(t);if(o===-1)return!1;for(let r=o;r<this.popupList.length;r++){const a=this.popupList[r];if(h8(a.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=Ln(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const n=this.getWrapper(e);n&&(n.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(n))}bringPopupToFront(e){const t=this.getPopupParent(),n=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=n.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const o=[],r=[];for(const h of n)h!==s&&(h.classList.contains("ag-always-on-top")?r.push(h):o.push(h));const a=[],l=r.length,d=s.classList.contains("ag-always-on-top")||!l?[...o,...r,s]:[...o,s,...r];for(let h=0;h<=i;h++){const p=d[h];if(n[h]===d[h]||p===s)continue;const g=p.querySelectorAll("div");for(const C of g)C.scrollTop!==0&&a.push([C,C.scrollTop]);h===0?t.insertAdjacentElement("afterbegin",p):d[h-1].insertAdjacentElement("afterend",p)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}},w9=class extends ny{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,n=this.getGui();n.textContent=Vl(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();n.classList.add(`ag-${i}-tooltip`)}},e1=(e,t)=>{if(t!=null&&(e!=null&&e.setPointerCapture))try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},b9=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const n=t.pointerId;if(!e1(e,n))return null;const i={eElement:e,pointerId:n,onLost(s){E9(i,s)}};return e.addEventListener("lostpointercapture",i.onLost),i},S9=e=>{if(!e)return;t1(e);const{eElement:t,pointerId:n}=e;if(t){try{t.releasePointerCapture(n)}catch{}e.eElement=null}},t1=e=>{const{eElement:t,onLost:n}=e;t&&n&&(t.removeEventListener("lostpointercapture",n),e.onLost=null)},E9=(e,t)=>{t1(e);const{eElement:n,pointerId:i}=e;n&&t.pointerId===i&&e1(n,i)},ns,io,Ho=e=>{if(!io)io=new WeakSet;else if(io.has(e))return!1;return io.add(e),!0},R9=class extends Zs{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){var e;return((e=this.drag)==null?void 0:e.start.target)??null}isPointer(){return!!(ns!=null&&ns.has(Ks(this.beans)))}hasPointerCapture(){var t,n,i;const e=(t=this.drag)==null?void 0:t.pointerCapture;return!!(e&&((i=(n=this.beans.eRootDiv).hasPointerCapture)!=null&&i.call(n,e.pointerId)))}destroy(){this.drag&&this.cancelDrag();const e=this.dragSources;for(const t of e)n1(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let n=0,i=t.length;n<i;++n){const s=t[n];if(s.params===e){t.splice(n,1),n1(s);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:n}=e,i=[];let s;if(n){const u=t.style;u&&(s=u.touchAction,u.touchAction="none")}const o={handlers:i,params:e,oldTouchAction:s};this.dragSources.push(o),Gf(i,[t,"pointerdown",u=>this.onPointerDown(e,u),{passive:!1}],[t,"mousedown",u=>this.onMouseDown(e,u)]);const l=this.gos.get("suppressTouch");n&&!l&&Gf(i,[t,"touchstart",c=>this.onTouchStart(e,c),{passive:!1}])}cancelDrag(e){var n,i;const t=this.drag;e??(e=t==null?void 0:t.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),(i=t==null?void 0:(n=t.params).onDragCancel)==null||i.call(n),this.destroyDrag()}shouldPreventMouseEvent(e){const t=e.type;return(t==="mousemove"||t==="pointermove")&&e.cancelable&&qc(this.beans,e)&&!Gc(Dy(e))}initDrag(e,...t){this.drag=e;const n=this.beans,i=a=>this.onScroll(a),s=a=>this.onKeyDown(a),o=Ks(n),r=Ln(n);Gf(e.handlers,[o,"contextmenu",fr],[o,"keydown",s],[r,"scroll",i,{capture:!0}],[r.defaultView||window,"scroll",i],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;(ns==null?void 0:ns.get(t))===e&&(ns==null||ns.delete(t)),this.drag=null,S9(e.pointerCapture),BC(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const n=this.beans;if(io!=null&&io.has(t))return;const i=t.pointerType;if(i==="touch"&&(n.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),Gc(Dy(t))))||!t.isPrimary||i==="mouse"&&t.button!==0)return;this.destroyDrag();const s=Ks(n),o=e.eElement,r=t.pointerId,a=new Ry(s,e,t,r);ns??(ns=new WeakMap),ns.set(s,a);const l=d=>{d.pointerId===r&&this.onMouseOrPointerMove(d)},u=d=>{d.pointerId===r&&this.onMouseOrPointerUp(d)},c=d=>{d.pointerId===r&&Ho(d)&&this.cancelDrag()};this.initDrag(a,[s,"pointerup",u],[s,"pointercancel",c],[s,"pointermove",l,{passive:!1}],[s,"touchmove",fr,{passive:!1}],[o,"mousemove",fr,{passive:!1}]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Ho(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!Ho(t)||Gc(Dy(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){fr(t);return}this.destroyDrag();const i=this.beans,s=Ks(i),o=new Ry(s,e,t.touches[0]),r=u=>this.onTouchMove(u),a=u=>this.onTouchUp(u),l=t.target??e.eElement;this.initDrag(o,[Ks(i),"touchmove",fr,{passive:!1}],[l,"touchmove",r,{passive:!0}],[l,"touchend",a,{passive:!0}],[l,"touchcancel",a,{passive:!0}]),e.dragStartPixels===0&&this.onMove(o.start)}onMouseDown(e,t){if(t.button!==0||io!=null&&io.has(t)||this.isPointer())return;const n=this.beans;this.destroyDrag();const i=new Ry(Ks(n),e,t),s=a=>this.onMouseOrPointerMove(a),o=a=>this.onMouseOrPointerUp(a),r=Ks(n);this.initDrag(i,[r,"mousemove",s],[r,"mouseup",o]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Ho(t)}onScroll(e){var i;if(!Ho(e))return;const t=this.drag,n=t==null?void 0:t.lastDrag;n&&this.dragging&&((i=t.params)==null||i.onDragging(n))}onMouseOrPointerMove(e){var t;Ho(e)&&(Cr()&&((t=Ln(this.beans).getSelection())==null||t.removeAllRanges()),this.shouldPreventMouseEvent(e)&&fr(e),this.onMove(e))}onTouchMove(e){const t=this.drag;if(!t||!Ho(e))return;const n=Kc(t.start,e.touches);n&&(e.preventDefault(),this.onMove(n))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const n=t.params;if(!this.dragging){const i=t.start,o=n.dragStartPixels??4;if(M_(e,i,o)||(this.dragging=!0,n.capturePointer&&(t.pointerCapture=b9(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:n.eElement}),n.onDragStart(i),this.drag!==t)||(n.onDragging(i),this.drag!==t))return}n.onDragging(e)}onTouchUp(e){const t=this.drag;t&&Ho(e)&&this.onUp(Kc(t.start,e.changedTouches))}onMouseOrPointerUp(e){Ho(e)&&this.onUp(e)}onUp(e){const t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,t.params.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===se.ESCAPE&&this.cancelDrag()}},n1=e=>{BC(e.handlers);const t=e.oldTouchAction;if(t!=null){const n=e.params.eElement.style;n&&(n.touchAction=t)}},Ry=class{constructor(e,t,n,i=null){this.rootEl=e,this.params=t,this.start=n,this.pointerId=i,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},Dy=e=>{const t=e.target;return t instanceof Element?t:null},D9=class extends Zs{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageParent=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.lastDropTarget=null}addDragSource(e,t=!1){const n={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:i=>this.onDragStart(e,i),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(n),this.beans.dragSvc.addDragSource(n)}setDragImageCompIcon(e,t=!1){const n=this.dragImageComp;n&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,n.setIcon(e,t))}removeDragSource(e){var s;const{dragSourceAndParamsList:t,beans:n}=this,i=t.find(o=>o.dragSource===e);i&&((s=n.dragSvc)==null||s.removeDragSource(i),Rs(t,i))}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:n}=this,i=n.dragSvc;for(const s of e)i==null||i.removeDragSource(s);e.length=0,t.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){var i;this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();const n=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-n.left,this.dragInitialSourcePointerOffsetY=t.clientY-n.top,(i=e.onDragStarted)==null||i.call(e),this.createAndUpdateDragImageComp(e)}onDragStop(e){var i,s;const{dragSource:t,lastDropTarget:n}=this;if((i=t==null?void 0:t.onDragStopped)==null||i.call(t),n){const o=this.dropTargetEvent(n,e,!1);(s=n.onDragStop)==null||s.call(n,o)}this.clearDragAndDropProperties()}onDragCancel(){var i,s;const{dragSource:e,lastDropTarget:t,lastMouseEvent:n}=this;if((i=e==null?void 0:e.onDragCancelled)==null||i.call(e),t&&n){const o=this.dropTargetEvent(t,n,!1);(s=t.onDragCancel)==null||s.call(t,o)}this.clearDragAndDropProperties()}onDragging(e,t=!1){var a,l,u;this.positionDragImageComp(e);const n=this.findCurrentDropTarget(e),{lastDropTarget:i,dragSource:s,dragItem:o}=this;let r=!1;if(n!==i){if(r=!0,i){const c=this.dropTargetEvent(i,e,t);(a=i.onDragLeave)==null||a.call(i,c)}if(i!==null&&!n?this.handleExit(s,o):i===null&&n&&this.handleEnter(s,o),n){const c=this.dropTargetEvent(n,e,t);(l=n.onDragEnter)==null||l.call(n,c)}this.lastDropTarget=n}else if(n){const c=this.dropTargetEvent(n,e,t);(u=n.onDragging)==null||u.call(n,c),c!=null&&c.changed&&(r=!0)}this.lastMouseEvent=e,r&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageParent=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,n=[[e.getContainer()]];return t?n.concat(t):n}isMouseOnDropTarget(e,t){const n=this.getAllContainersFromDropTarget(t);let i=!1;const s=(a,l)=>{for(const u of l){const{width:c,height:d,left:h,right:p,top:g,bottom:C}=u.getBoundingClientRect();if(c===0||d===0)return!1;const v=a.clientX>=h&&a.clientX<p,S=a.clientY>=g&&a.clientY<C;if(!v||!S)return!1}return!0};for(const a of n)if(s(e,a)){i=!0;break}const{eElement:o,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(o)?!1:i&&t.isInterestedIn(r,o)}findCurrentDropTarget(e){const t=this.dropTargets.filter(o=>this.isMouseOnDropTarget(e,o)),n=t.length;if(n===0)return null;if(n===1)return t[0];const s=Ks(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const o of s)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(l=>l).indexOf(o)!==-1)return r;return null}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.find(t=>t.external&&t.getContainer()===e)||null}dropTargetEvent(e,t,n){const{dragSource:i,dragItem:s,lastDraggingEvent:o,lastMouseEvent:r,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,u=e.getContainer(),c=u.getBoundingClientRect(),{clientX:d,clientY:h}=t,p=d-((r==null?void 0:r.clientX)||0),g=h-((r==null?void 0:r.clientY)||0),C=this.createEvent({event:t,x:d-c.left,y:h-c.top,vDirection:g>0?"down":g<0?"up":null,hDirection:p<0?"left":p>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:i,fromNudge:n,dragItem:s,dropZoneTarget:u,dropTarget:(o==null?void 0:o.dropTarget)??null,changed:!!(o!=null&&o.changed)});return this.lastDraggingEvent=C,C}positionDragImageComp(e){var n;const t=(n=this.dragImageComp)==null?void 0:n.getGui();t&&v8(t,e,this.beans)}removeDragImageComp(e){var t;this.dragImageComp===e&&(this.dragImageComp=null),e&&((t=e.getGui())==null||t.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){const t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t==null||t.then(n=>{if(t!==this.dragImageCompPromise||!this.lastMouseEvent||!this.isAlive()){this.destroyBean(n);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const i=this.dragImageComp;i!==n&&(this.dragImageComp=n,this.removeDragImageComp(i)),n&&(this.appendDragImageComp(n),this.updateDragImageComp())})}appendDragImageComp(e){var s;const t=e.getGui(),n=t.style;n.position="absolute",n.zIndex="9999",(s=this.beans.dragSvc)!=null&&s.hasPointerCapture()&&(n.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),n.top="20px",n.left="20px";const i=PC(this.beans);this.dragImageParent=i,i?i.appendChild(t):this.warnNoBody()}updateDragImageComp(){var r;const{dragImageComp:e,dragSource:t,lastDropTarget:n,lastDraggingEvent:i,dragImageLastLabel:s}=this;if(!e)return;this.setDragImageCompIcon(((r=n==null?void 0:n.getIconName)==null?void 0:r.call(n,i))??null);let o=t==null?void 0:t.dragItemName;typeof o=="function"&&(o=o(i)),o||(o=""),s!==o&&(this.dragImageLastLabel=o,e.setLabel(o))}},F9=class extends D9{createEvent(e){return dt(this.gos,e)}createDragImageComp(e){const{gos:t,beans:n}=this,i=YK(n.userCompFactory,dt(t,{dragSource:e}));return i==null?void 0:i.newAgStackInstance()}handleEnter(e,t){var n;(n=e==null?void 0:e.onGridEnter)==null||n.call(e,t)}handleExit(e,t){var n;(n=e==null?void 0:e.onGridExit)==null||n.call(e,t)}warnNoBody(){xe(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const n={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(n),t.addDestroyFunc(()=>this.removeDropTarget(n))}};function i1(e,t){return e+"_"+t}function Sn(e){return e instanceof od}var od=class extends ge{constructor(e,t,n,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=n,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=Bc(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return i1(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){for(const e of this.displayedChildren)Sn(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=Zt(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;for(const t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(const t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(const t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){for(const t of this.displayedChildren??[])mr(t)?e.push(t):Sn(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])mr(t)?e.push(t):Sn(t)&&t.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!(e!=null&&e.isPadding())?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){var n;this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(const i of this.children??[]){if(Sn(i)&&!((n=i.displayedChildren)!=null&&n.length))continue;switch(i.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(i);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i);break}}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},Fy="row-group-",Ty="t-",xy="b-",T9=0,wr=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=T9++,this.alreadyRendered=!1,this.hovered=!1,this.__selected=!1,this.beans=e}get allLeafChildren(){var t,n;const e=this._leafs;return e===void 0?((n=(t=this.beans.groupStage)==null?void 0:t.loadLeafs)==null?void 0:n.call(t,this))??null:e}set allLeafChildren(e){this._leafs=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){var a,l,u;const{valueCache:n,eventSvc:i}=this.beans,s=this.data;this.data=e,n==null||n.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const o=this.createDataChangedEvent(e,s,t);if((a=this.__localEventService)==null||a.dispatchEvent(o),this.sibling){this.sibling.data=e;const c=this.sibling.createDataChangedEvent(e,s,t);(l=this.sibling.__localEventService)==null||l.dispatchEvent(c)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,(u=r.__localEventService)==null||u.dispatchEvent(r.createDataChangedEvent(e,s,t)),i.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,n){return{type:"dataChanged",node:this,oldData:t,newData:e,update:n}}getRowIndexString(){return this.rowIndex==null?(Kt(13),null):this.rowPinned==="top"?Ty+this.rowIndex:this.rowPinned==="bottom"?xy+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){var r,a;const{selectionSvc:n}=this.beans,i=(r=n==null?void 0:n.createDaemonNode)==null?void 0:r.call(n,this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),n&&(n.updateRowSelectable(this),n.syncInRowNode(this,i));const o=this.createDataChangedEvent(e,s,!1);(a=this.__localEventService)==null||a.dispatchEvent(o)}setId(e){var n;const t=Ul(this.beans.gos);if(t)if(this.data){const i=((n=this.parent)==null?void 0:n.getRoute())??[];this.id=t({data:this.data,parentKeys:i.length>0?i:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(Fy)&&Kt(14,{groupPrefix:Fy})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=e!==null;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,n){var i;(i=this.beans.expansionSvc)==null||i.setExpanded(this,e,t,n)}setDataValue(e,t,n){var c;const{colModel:i,valueSvc:s,gos:o,editSvc:r}=this.beans,a=typeof e!="string"?e:i.getCol(e)??i.getColDefCol(e);if(!a)return!1;const l=s.getValueForDisplay(a,this,void 0,void 0,"api").value;if(o.get("readOnlyEdit")){const{beans:{eventSvc:d},data:h,rowIndex:p,rowPinned:g}=this;return d.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:p,rowPinned:g,column:a,colDef:a.colDef,data:h,node:this,oldValue:l,newValue:t,value:t,source:n}),!1}if(r&&!r.committing){const d=r.setDataValue({rowNode:this,column:a},t,n);if(d!=null)return d}const u=s.setValue(this,a,t,n);return this.dispatchCellChangedEvent(a,t,l),u&&((c=this.pinnedSibling)==null||c.dispatchCellChangedEvent(a,t,l)),u}updateHasChildren(){var n;let e=this.group&&!this.footer||!!((n=this.childrenAfterGroup)!=null&&n.length);const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,n){var s;const i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:n};(s=this.__localEventService)==null||s.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){var e;return((e=this.beans.expansionSvc)==null?void 0:e.isExpandable(this))??!1}isSelected(){if(this.footer)return this.sibling.isSelected();const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let n=0,i=t.length;n<i;++n)t[n].depthFirstSearch(e);e(this)}dispatchRowEvent(e){var t;(t=this.__localEventService)==null||t.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,n="api"){var i;(i=this.beans.selectionSvc)==null||i.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:n})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){(this.__localEventService??(this.__localEventService=new va)).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){var s,o,r,a;(s=this.beans.validation)==null||s.checkRowEvents(e);const n=this.__localEventService??(this.__localEventService=new va);this.frameworkEventListenerService=(r=(o=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:r.call(o,this.frameworkEventListenerService,n);const i=((a=this.frameworkEventListenerService)==null?void 0:a.wrap(e,t))??t;n.addEventListener(e,i)}removeEventListener(e,t){var i;const n=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.removeLocalListener(e,n)}removeLocalListener(e,t){const n=this.__localEventService;n&&(n.removeEventListener(e,t),n.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(xe(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;(t==null?void 0:t.key)!=null;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){var t;const e=this.childStore;return e?e.getFirstNode():((t=this.childrenAfterSort)==null?void 0:t[0])??null}};function x9(e,t,n){return dt(t,{type:n,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var _9=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_leafs","childStore","oldRowTop","sticky","treeNodeFlags","treeParent"]),P9=(e,t)=>{const n=new wr(t);for(const i of Object.keys(e))_9.has(i)||(n[i]=e[i]);return n.oldRowTop=null,n},s1=e=>{for(;e!=null&&e.length;){const t=e[0];if(t.data)return t;e=t.childrenAfterGroup}},o1={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},A9=new Set(Object.values(o1));function br(e,t){const n=e.filterUi;if(!n)return null;if(n.created)return n.promise;if(t)return null;const i=n.create(n.refreshed),s=n;return s.created=!0,s.promise=i,i}function I9(e,t,n,i,s,o,r){var a;return(a=t.refresh)==null||a.call(t,{...n,model:i,source:o,additionalEventAttributes:r}),e().then(l=>{if(l){const{filter:u,filterParams:c}=l;r1(u,c,i,s,o,r)}})}function r1(e,t,n,i,s,o){var r;(r=e==null?void 0:e.refresh)==null||r.call(e,{...t,model:n,state:i,source:s,additionalEventAttributes:o})}function a1(e,t,n){const i=e();i!=null&&i.created&&i.promise.then(s=>{const o=t();r1(s,i.filterParams,o,n()??{model:o},"ui")})}function l1(e,t,n,i,s,o,r){let a,l=!1,u;switch(e){case"apply":{const c=i();u=(c==null?void 0:c.model)??null,r&&(u=r(u)),a={state:c==null?void 0:c.state,model:u},l=!0;break}case"clear":{a={model:null};break}case"reset":{a={model:null},l=!0,u=null;break}case"cancel":{a={model:n()};break}}s(a),l?o(u):a1(t,n,i)}function Nn(e,t){return e[t]??null}function En(e){return jc(e)}function k9(e){return{tag:"div",cls:e}}var O9=class extends $t{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(k9(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const n=this.buttons;if(this.buttons=e,n===e)return;const i=this.getGui();Gn(i);let s;this.destroyListeners();const o=document.createDocumentFragment(),r=this.className,a=({type:u,label:c})=>{const d=S=>{this.dispatchLocalEvent({type:u,event:S})};["apply","clear","reset","cancel"].includes(u)||xe(75);const h=u==="apply",g=En({tag:"button",attrs:{type:h&&t?"submit":"button"},ref:`${u}FilterButton`,cls:`ag-button ag-standard-button ${r}-button${h?" "+r+"-apply-button":""}`,children:c});this.activateTabIndex([g]),h&&(s=g);const C=S=>{S.key===se.ENTER&&(S.preventDefault(),d(S))},v=this.listeners;g.addEventListener("click",d),v.push(()=>g.removeEventListener("click",d)),g.addEventListener("keydown",C),v.push(()=>g.removeEventListener("keydown",C)),o.append(g)};for(const u of e)a(u);this.eApply=s;const l=this.validationTooltipFeature;s&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!s&&l&&(this.validationTooltipFeature=this.destroyBean(l)),i.append(o)}getApplyButton(){return this.eApply}updateValidity(e,t=null){var i;const n=this.eApply;n&&($c(n,e===!1),this.validationMessage=t??null,(i=this.validationTooltipFeature)==null||i.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},M9={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`};function Sr(e,t,n){return y8(e,M9,t,n)}function _y(e,t){const{debounceMs:n}=e;return cp(e)?(n!=null&&xe(71),0):n??t}function cp(e){var t;return(((t=e.buttons)==null?void 0:t.indexOf("apply"))??-1)>=0}var L9=class extends $t{constructor(e,t,n,i,s,o){super(),this.column=e,this.wrapper=t,this.eventParent=n,this.updateModel=i,this.isGlobalButtons=s,this.enableGlobalButtonCheck=o,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,n=t,i=n.useForm,s=i?"form":"div";this.setTemplate({tag:s,cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:o=>{o==null||o.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=n,this.resetButtonsPanel(n),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:o,params:r})=>{o===this.column&&this.resetButtonsPanel(r,this.params)},filterStateChanged:({column:o,state:r})=>{var a;o===this.column&&((a=this.eButtons)==null||a.updateValidity(r.valid!==!1))},filterAction:({column:o,action:r,event:a})=>{o===this.column&&this.afterAction(r,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:o})=>{if(o!==this.isGlobalButtons){this.isGlobalButtons=o;const r=this.params;this.resetButtonsPanel(r,r,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,n){const{buttons:i,readOnly:s}=t??{},{buttons:o,readOnly:r,useForm:a}=e;if(!n&&s===r&&Vc(i,o))return;const l=o&&o.length>0&&!e.readOnly&&!this.isGlobalButtons;let u=this.eButtons;if(l){const c=o.map(d=>{const h=`${d}Filter`;return{type:d,label:Sr(this,h)}});if(this.applyActive=cp(this.params),!u){u=this.createBean(new O9),this.appendChild(u.getGui());const d=this.column,h=p=>({event:g})=>{this.updateModel(d,p,{fromButtons:!0}),this.afterAction(p,g)};u==null||u.addManagedListeners(u,{apply:h("apply"),clear:h("clear"),reset:h("reset"),cancel:h("cancel")}),this.eButtons=u}u.updateButtons(c,a)}else this.applyActive=!1,u&&(Es(u.getGui()),this.eButtons=this.destroyBean(u))}close(e){const t=this.hidePopup;if(!t)return;const n=e,i=n==null?void 0:n.key;let s;(i===se.ENTER||i===se.SPACE)&&(s={keyboardEvent:n}),t(s),this.hidePopup=null}afterAction(e,t){const{params:n,applyActive:i}=this,s=n==null?void 0:n.closeOnApply;switch(e){case"apply":{t==null||t.preventDefault(),s&&i&&this.close(t);break}case"reset":{s&&i&&this.close();break}case"cancel":{s&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===se.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},N9={tag:"div",cls:"ag-filter"},V9=class extends $t{constructor(e,t,n){super(N9),this.column=e,this.source=t,this.enableGlobalButtonCheck=n,this.wrapper=null}postConstruct(){var e;(e=this.beans.colFilter)==null||e.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){var e;return((e=this.wrapper)==null?void 0:e.then(t=>t.comp))??null}afterInit(){var e;return((e=this.wrapper)==null?void 0:e.then(()=>{}))??gn.resolve()}afterGuiAttached(e){var t;this.afterGuiAttachedParams=e,(t=this.wrapper)==null||t.then(n=>{var i,s,o;(i=this.comp)==null||i.afterGuiAttached(e),(o=(s=n==null?void 0:n.comp)==null?void 0:s.afterGuiAttached)==null||o.call(s,e)})}afterGuiDetached(){var e;(e=this.wrapper)==null||e.then(t=>{var n,i;(i=(n=t==null?void 0:t.comp)==null?void 0:n.afterGuiDetached)==null||i.call(n)})}createFilter(e){const{column:t,source:n,beans:{colFilter:i}}=this,s=i.getFilterUiForDisplay(t)??null;this.wrapper=s,s==null||s.then(o=>{var u;if(!o)return;const{isHandler:r,comp:a}=o;let l;if(r){const c=!!this.enableGlobalButtonCheck,d=this.createBean(new L9(t,o,i,i.updateModel.bind(i),c&&i.isGlobalButtons,c));this.comp=d,l=d.getGui()}else l=a.getGui(),ze(l)||xe(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:n,eGui:this.getGui()}):(u=a.afterGuiAttached)==null||u.call(a,this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:n}=e;(t==="api"||t==="paramsUpdated")&&n.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(Gn(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){var e;(e=this.beans.colFilter)==null||e.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},u1={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},c1=["january","february","march","april","may","june","july","august","september","october","november","december"];function B9(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function d1(e){return e instanceof Date&&!isNaN(e.getTime())}var Py={number:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:d1}),dateString:({dataTypeDefinition:e})=>({comparator:(t,n)=>{const i=e.dateParser(n);return n==null||i<t?-1:i>t?1:0},isValidDate:t=>typeof t=="string"&&d1(e.dateParser(t))}),dateTime:e=>Py.date(e),dateTimeString:e=>Py.dateString(e),object:()=>{},text:()=>{}},Ay={number:()=>({comparator:B9}),boolean:({t:e})=>({valueFormatter:t=>ze(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:n=>{const i=e(n);return ze(i)?i:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(n,i)=>{if(n==="NaN")return t("invalidDate","Invalid Date");if(i===1&&n!=null){const s=c1[Number(n)-1];return t(s,u1[s])}return n??t("blanks","(Blanks)")},treeListPathGetter:n=>tp(n,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:n})=>({valueFormatter:i=>{const s=e(i);return ze(s)?s:n("blanks","(Blanks)")},treeList:!0,treeListPathGetter:i=>tp(t.dateParser(i??void 0),!1),treeListFormatter:(i,s)=>{if(s===1&&i!=null){const o=c1[Number(i)-1];return n(o,u1[o])}return i??n("blanks","(Blanks)")}}),dateTime:e=>{const t=Ay.date(e);return t.treeListPathGetter=tp,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,n=Ay.dateString(e);return n.treeListPathGetter=i=>tp(t(i??void 0)),n},object:({formatValue:e,t})=>({valueFormatter:n=>{const i=e(n);return ze(i)?i:t("blanks","(Blanks)")}}),text:()=>{}};function H9(e,t,n,i,s,o,r){let a=t,l=n;const u=e==="agSetColumnFilter";!l&&i.baseDataType==="object"&&!u&&(l=({column:p,node:g})=>s({column:p,node:g,value:o.valueSvc.getValue(p,g)}));const d=(u?Ay:Py)[i.baseDataType],h=d({dataTypeDefinition:i,formatValue:s,t:r});return a=typeof t=="object"?{...h,...t}:h,{filterParams:a,filterValueGetter:l}}var G9={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},$9={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function W9(e,t=!1){return(t?$9:G9)[e??"text"]}var h1="ag-resizer-wrapper",Er=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),z9={tag:"div",cls:h1,children:[Er("eTopLeft","topLeft"),Er("eTop","top"),Er("eTopRight","topRight"),Er("eRight","right"),Er("eBottomRight","bottomRight"),Er("eBottom","bottom"),Er("eBottomLeft","bottomLeft"),Er("eLeft","left")]},U9=class extends ge{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:n}=this.offsetParent,i=n/2-this.getWidth()/2,s=t/2-this.getHeight()/2;this.offsetElement(i,s,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:n,minWidth:i,width:s,minHeight:o,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let u=0,c=0;const d=qs(this.element);if(d){const h=this.findBoundaryElement(),p=window.getComputedStyle(h);if(p.minWidth!=null){const g=h.offsetWidth-this.element.offsetWidth;c=Number.parseInt(p.minWidth,10)-g}if(p.minHeight!=null){const g=h.offsetHeight-this.element.offsetHeight;u=Number.parseInt(p.minHeight,10)-g}}if(this.minHeight=o||u,this.minWidth=i||c,s&&this.setWidth(s),r&&this.setHeight(r),(!s||!r)&&this.refreshSize(),t)this.center(e);else if(a||l)this.offsetElement(a,l,e);else if(d&&n){let h=this.boundaryEl,p=!0;if(h||(h=this.findBoundaryElement(),p=!1),h){const g=Number.parseFloat(h.style.top),C=Number.parseFloat(h.style.left);p?this.offsetElement(isNaN(C)?0:C,isNaN(g)?0:g,e):this.setPosition(C,g)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){var i,s;if(!this.config.popup||e===this.movable)return;this.movable=e;const n=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?((i=this.dragSvc)==null||i.addDragSource(n),this.moveElementDragListener=n):((s=this.dragSvc)==null||s.removeDragSource(n),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{var r;const i=!!e[t],s=this.getResizerElement(t),o={dragStartPixels:0,eElement:s,onDragStart:a=>this.onResizeStart(a,t),onDragging:this.onResize.bind(this),onDragStop:a=>this.onResizeEnd(a,t)};(i||!this.isAlive()&&!i)&&(i?((r=this.dragSvc)==null||r.addDragSource(o),this.resizeListeners.push(o),s.style.pointerEvents="all"):s.style.pointerEvents="none",this.resizable[t]=i)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,n=this.element;let i=!1;if(typeof e=="string"&&e.includes("%"))Uc(n,e),e=F_(n),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(i?(n.style.maxHeight="unset",n.style.minHeight="unset"):t?Uc(n,e):(n.style.height=`${e}px`,n.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:Number.parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:n}=this.offsetParent;if(!n)return null;const i=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),o=e?this.position.y:i.top,r=e?0:s.top;let a=0;if(t){const u=this.element.parentElement;if(u){const{bottom:c}=u.getBoundingClientRect();a=c-i.bottom}}return n+r-o-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:n}=this.config;let i=!1;if(typeof e=="string"&&e.includes("%"))Ys(t,e),e=Lf(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:s}=this.offsetParent,o=n?this.position.x:this.element.getBoundingClientRect().left;s&&e+o>s&&(e=s-o)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Ys(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,n){var o;const{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&((o=this.popupSvc)==null||o.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:n}),this.setPosition(Number.parseFloat(s.style.left),Number.parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){var n,i;if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const s=this.getAvailableHeight();this.element.style.setProperty("max-height",`${s}px`)};e&&this.popupSvc?((n=this.resizeObserverSubscriber)==null||n.call(this),this.resizeObserverSubscriber=hr(this.beans,(i=this.popupSvc)==null?void 0:i.getPopupParent(),t)):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:n,isTop:i,anywhereWithin:s,topBuffer:o}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!n,!!s,r)?0:r,u=this.shouldSkipY(t,!!i,o,a)?0:a;return{movementX:l,movementY:u}}shouldSkipX(e,t,n,i){const s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:s.left;let l=a<=0&&o.left>=e.clientX||o.right<=e.clientX&&o.right<=r.right;return l?!0:(t?l=i<0&&e.clientX>a+o.left||i>0&&e.clientX<a+o.left:n?l=i<0&&e.clientX>r.right||i>0&&e.clientX<a+o.left:l=i<0&&e.clientX>r.right||i>0&&e.clientX<r.right,l)}shouldSkipY(e,t,n=0,i){const s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:s.top;let l=a<=0&&o.top>=e.clientY||o.bottom<=e.clientY&&o.bottom<=r.bottom;return l?!0:(t?l=i<0&&e.clientY>a+o.top+n||i>0&&e.clientY<a+o.top:l=i<0&&e.clientY>r.bottom||i>0&&e.clientY<r.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(En(z9)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${h1}`);e==null||e.remove(),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:n,forcePopupParentAsOffsetParent:i}=this.config;!n&&!i&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(n=>!n.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,n=0;for(let i=0;i<e.length;i++){const s=e[i],o=!!s.style.flex&&s.style.flex!=="0 0 auto";if(s===this.element)continue;let r=this.minHeight||0,a=this.minWidth||0;if(o){const l=window.getComputedStyle(s);l.minHeight&&(r=Number.parseInt(l.minHeight,10)),l.minWidth&&(a=Number.parseInt(l.minWidth,10))}else r=s.offsetHeight,a=s.offsetWidth;t+=r,n+=a}return{height:t,width:n}}applySizeToSiblings(e){let t=null;const n=this.getSiblings();if(n){for(let i=0;i<n.length;i++){const s=n[i];s!==t&&(e?s.style.height=`${s.offsetHeight}px`:s.style.width=`${s.offsetWidth}px`,s.style.flex="0 0 auto",s===this.element&&(t=n[i+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:n}=this.config,{isTop:i,isRight:s,isBottom:o,isLeft:r}=this.currentResizer,a=s||r,l=o||i,{movementX:u,movementY:c}=this.calculateMouseMovement({e,isLeft:r,isTop:i}),d=this.position.x,h=this.position.y;let p=0,g=0;if(a&&u){const C=r?-1:1,v=this.getWidth(),S=v+u*C;let R=!1;r&&(p=v-S,(d+p<=0||S<=this.minWidth)&&(R=!0,p=0)),R||this.setWidth(S)}if(l&&c){const C=i?-1:1,v=this.getHeight(),S=v+c*C;let R=!1;i?(g=v-S,(h+g<=0||S<=this.minHeight)&&(R=!0,g=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&v<S&&this.getMinSizeOfSiblings().height+S>this.element.parentElement.offsetHeight&&(R=!0),R||this.setHeight(S)}this.updateDragStartPosition(e.clientX,e.clientY),((t||n)&&p||g)&&this.offsetElement(d+p,h+g)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:n}=this.position;let i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());const{movementX:s,movementY:o}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+s,n+o),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){var e;for(;this.resizeListeners.length;){const t=this.resizeListeners.pop();(e=this.dragSvc)==null||e.removeDragSource(t)}}destroy(){var e;super.destroy(),this.moveElementDragListener&&((e=this.dragSvc)==null||e.removeDragSource(this.moveElementDragListener)),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},f1="__ag_Grid_Stop_Propagation";function _a(e){e[f1]=!0}function Go(e){return e[f1]===!0}var j9="ag-focus-managed",eu=class extends ge{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:n=>{if(n.defaultPrevented)return;const i=Fa(this.beans,this.eFocusable,!1,n.shiftKey);i&&(i.focus(),n.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:n}}=this;e.classList.add(j9),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),n&&this.addManagedElementListeners(e,{focusout:n})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||Go(t))return;const{callbacks:n}=this;if(n.shouldStopEventPropagation(t)){_a(t);return}t.key===se.TAB?n.onTabKeyDown(t):n.handleKeyDown&&n.handleKeyDown(t)}})}},K9=class extends $t{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new eu(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new U9(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}refresh(e){const t=e,n=this.params;this.params=t,t.source==="colDef"&&this.updateParams(t,n);const s=t.state,o=this.state;return this.state=s,(s.model!==o.model||s.state!==o.state)&&this.setModelIntoUi(s.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=cp(e),this.setupApplyDebounced()}doesFilterPass(e){xe(283);const{getHandler:t,model:n,column:i}=this.params;return t().doesFilterPass({...e,model:n,handlerParams:this.beans.colFilter.getHandlerParams(i)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return xe(284),this.params.model!=null}setupApplyDebounced(){const e=_y(this.params,this.defaultDebounceMs),t=$n(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return xe(285),this.params.model}setModel(e){xe(286);const{beans:t,params:n}=this;return t.colFilter.setModelForColumnLegacy(n.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:n}=this,i=!this.areModelsEqual(t.model,n.model);return i&&t.onAction("apply",e),i}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const n=this.getModelFromUi(),i={model:n,state:this.getState(),valid:this.canApply(n)};this.state=i;const s=this.params;s.onStateChange(i),s.onUiChange(this.getUiChangeEventParams()),this.gos.get("enableFilterHandlers")||this.eventSvc.dispatchEvent({type:"filterModified",column:s.column,filterInstance:this}),e??(e=this.applyActive?void 0:"debounce"),e==="immediately"?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e==="debounce"&&this.applyDebounced()}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e==null?void 0:e.container,this.refreshFilterResizer(e==null?void 0:e.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:n}=this;if(!t)return;const i=e==="floatingFilter"||e==="columnFilter";i?(t.restoreLastSize(),t.setResizable(n.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(i)}afterGuiDetached(){var e;this.checkApplyDebounce(),(e=this.positionableFeature)==null||e.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e){return Sr(this,e)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}};function p1(e){return!!e.operator}function q9(e,t,n){if(t==null)return null;let i=null;const{compName:s,jsComp:o,fwComp:r}=PP(e,t);return s?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[s]:o==null&&r==null&&t.filter===!0&&(i=n()),i}var Fs={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Iy=class extends ge{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},n=t.autoHeight?Fs.AUTO_HEIGHT:t.print?Fs.PRINT:Fs.NORMAL;this.view.updateLayoutClasses(n,t)}},Rr="Viewport",g1="fakeVScrollComp",ky=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],m1=100,Oy=150,Y9=class extends ge{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=$n(this,()=>this.lastScrollSource[1]=null,Oy),this.resetLastVScrollDebounced=$n(this,()=>this.lastScrollSource[0]=null,Oy)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,n=>{this.centerRowsCtrl=n.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,Rr)});for(const e of ky){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),n=t?$n(this,this.onVScroll.bind(this,Rr),m1):this.onVScroll.bind(this,Rr),i=t?$n(this,this.onVScroll.bind(this,g1),m1):this.onVScroll.bind(this,g1);this.addManagedElementListeners(this.eBodyViewport,{scroll:n}),this.registerScrollPartner(e,i)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...ky,Rr]){if(this.lastScrollSource[1]===t)continue;const n=this.getViewportForSource(t);Vf(n,e,this.enableRtl)}}getViewportForSource(e){return e===Rr?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:n}=t;if(this.shouldBlockScrollUpdate(1,n,!0))return;const i=Nf(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===Rr?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:n}=this;n==null||n.setScrollTop(t),this.nextScrollTop=t,e===Rr?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,n!=null&&n.active?n.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Oy)}shouldBlockScrollUpdate(e,t,n=!1){return n&&!Ra()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=IC(this.eBodyViewport),{scrollHeight:n}=this.eBodyViewport;return e<0||e+t>n}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:n}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>n}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){const e=this.scrollLeft;let t=!1;for(const n of ky)if(this.getViewportForSource(n).scrollLeft!==e){t=!0;break}t&&this.onHScroll(Rr)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),Vf(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:n,lastScrollTop:i}=this;return{top:i,bottom:i+n}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:n}=this.beans,i=n.getRowCount();let s=-1;for(let o=0;o<i;o++){const r=n.getRow(o);if(typeof e=="function"){if(r&&e(r)){s=o;break}}else if(e===r||e===r.data){s=o;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t,n=0){if(Wn(this.gos,"print"))return;const{rowModel:i}=this.beans,s=i.getRowCount();if(typeof e!="number"||e<0||e>=s){xe(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:o,pageBounds:r,rowContainerHeight:a,rowRenderer:l}=this.beans;o.wrapIncoming(()=>{var g,C;const u=this.ctrlsSvc.getGridBodyCtrl(),c=i.getRow(e);let d,h,p=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:v,stickyBottomHeight:S}=u,R=c.rowTop,E=c.rowHeight,y=r.getPixelOffset(),b=c.rowTop-y,F=b+c.rowHeight,x=this.getVScrollPosition(),V=a.divStretchOffset,I=x.top+V,M=x.bottom+V,P=M-I,N=a.getScrollPositionForPixel(b),ie=a.getScrollPositionForPixel(F-P),ve=Math.min((N+ie)/2,b),Be=I+v>b,ee=M-S<F;let U=null;t==="top"?U=N-v:t==="bottom"?U=ie+S:t==="middle"?U=ve:Be?U=N-v:ee&&(ie-N>P?U=N-v:U=ie+S),U!==null&&(this.setVerticalScrollPosition(U),l.redraw({afterScroll:!0})),d=R!==c.rowTop||E!==c.rowHeight,h=v!==u.stickyTopHeight||S!==u.stickyBottomHeight,p++}while((d||h)&&p<10);if((g=this.animationFrameSvc)==null||g.flushAllFrames(),n<10&&(c!=null&&c.stub||!((C=this.beans.rowAutoHeight)!=null&&C.areRowsMeasured()))){const v=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const S=this.getVScrollPosition().top;v!==S&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=i.getRowCount())&&this.ensureIndexVisible(e,t,n+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:n,frameworkOverrides:i}=this.beans,s=n.getCol(e);if(!s||s.isPinned()||!this.visibleCols.isColDisplayed(s))return;const o=this.getPositionedHorizontalScroll(s,t);i.wrapIncoming(()=>{var r;o!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(o),this.centerRowsCtrl.onHorizontalViewportChanged(),(r=this.animationFrameSvc)==null||r.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:n,columnAfterEnd:i}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),o=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?n:i)||s,l=r?i:n;t!=="auto"&&(a=t==="start",l=t==="end");const u=t==="middle";if(a||l||u){const{colLeft:c,colMiddle:d,colRight:h}=this.getColumnBounds(e);return u?d-o/2:a?r?h:c:r?c-o:h-o}return null}isColumnOutsideViewport(e){const{start:t,end:n}=this.getViewportBounds(),{colLeft:i,colRight:s}=this.getColumnBounds(e),o=this.enableRtl,r=o?t>s:n<s,a=o?n<i:t>i;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,n=this.visibleCols.bodyWidth,i=e.getActualWidth(),s=e.getLeft(),o=t?-1:1,r=t?n-s:s,a=r+i*o,l=r+i/2*o;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),n=t,i=e+t;return{start:n,end:i,width:e}}},My=class extends ge{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=Wn(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:n}=this.beans,i=t.bodyWidth,s=t.getColsLeftWidth(),o=t.getDisplayedColumnsRightWidth();let r;e?r=i+s+o:(r=i,this.addSpacer&&(this.gos.get("enableRtl")?s:o)===0&&n.verticalScrollShowing&&(r+=n.getScrollbarWidth())),this.callback(r)}},Z9=class extends ge{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:n}=this,i=()=>{ko(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),n.registerBodyViewportResizeListener(i)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e==null||e.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const n=this.centerContainerCtrl.getCenterWidth();n!==this.centerWidth&&(this.centerWidth=n,t==null||t.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=IC(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function dp(e,t,n,i){var o;const s=(o=t.getColDef().cellRendererParams)==null?void 0:o.suppressMouseEventHandling;return v1(e,t,n,i,s)}function J9(e,t,n,i){const s=t==null?void 0:t.suppressMouseEventHandling;return v1(e,void 0,n,i,s)}function v1(e,t,n,i,s){return s?s(dt(e,{column:t,node:n,event:i})):!1}function C1(e,t,n){let i=t;for(;i;){const s=X_(e,i,n);if(s)return s;i=i.parentElement}return null}var hp="cellCtrl";function Ly(e,t){return C1(e,t,hp)}var fp="renderedRow";function X9(e,t){return C1(e,t,fp)}function Ny(e,t,n,i,s){const o=i?i.getColDef().suppressKeyboardEvent:void 0;if(!o)return!1;const r=dt(e,{event:t,editing:s,column:i,node:n,data:n.data,colDef:i.getColDef()});return!!(o&&o(r))}function Q9(e){const{pinnedRowModel:t,rowModel:n}=e,[i,s]=[(t==null?void 0:t.isEmpty("top"))??!0,(t==null?void 0:t.isEmpty("bottom"))??!0],o=i?null:"top";let r,a;s?(r=null,a=n.getRowCount()-1):(r="bottom",a=(t==null?void 0:t.getPinnedBottomRowCount())??-1);const{visibleCols:l,rangeSvc:u}=e,c=l.allCols;!u||!(c!=null&&c.length)||u.setCellRange({rowStartIndex:0,rowStartPinned:o,rowEndIndex:a,rowEndPinned:r})}var eq=65,tq=67,nq=86,iq=68,sq=90,oq=89;function rq(e){const{keyCode:t}=e;let n;switch(t){case eq:n=se.A;break;case tq:n=se.C;break;case nq:n=se.V;break;case iq:n=se.D;break;case sq:n=se.Z;break;case oq:n=se.Y;break;default:n=e.code}return n}var aq=class extends ge{constructor(e){super(),this.element=e}postConstruct(){var e;this.addKeyboardListeners(),this.addMouseListeners(),(e=this.beans.touchSvc)==null||e.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){const t=["dblclick","contextmenu","mouseover","mouseout","click",O_("touchstart")?"touchstart":"mousedown"];for(const n of t){const i=this.processMouseEvent.bind(this,n);this.addManagedElementListeners(this.element,{[n]:i})}}processMouseEvent(e,t){var s;if(!qc(this.beans,t)||Go(t))return;const{cellCtrl:n,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(n!=null&&n.column&&n.dispatchCellContextMenuEvent(t),(s=this.beans.contextMenuSvc)==null||s.handleContextMenuMouseEvent(t,void 0,i,n)):(n&&n.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:Ly(t,e),rowCtrl:X9(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:n,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(n?this.processCellKeyboardEvent(n,e,t):i!=null&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,n){var o,r;const i=((o=this.editSvc)==null?void 0:o.isEditing(e,{withOpenEditor:!0}))??!1;!Ny(this.gos,n,e.rowNode,e.column,i)&&t==="keydown"&&(!i&&((r=this.beans.navigation)!=null&&r.handlePageScrollingKey(n))||e.onKeyDown(n),this.doGridOperations(n,i),LP(n)&&e.processCharacter(n)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(n,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,n){const{rowNode:i}=e,{focusSvc:s,navigation:o}=this.beans,r=s.getFocusedCell(),a=r==null?void 0:r.column;if(!Ny(this.gos,n,i,a,!1)){const u=n.key;if(t==="keydown")switch(u){case se.PAGE_HOME:case se.PAGE_END:case se.PAGE_UP:case se.PAGE_DOWN:o==null||o.handlePageScrollingKey(n,!0);break;case se.LEFT:case se.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case se.UP:case se.DOWN:e.onKeyboardNavigate(n);break;case se.TAB:e.onTabKeyDown(n);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",n))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!qc(this.beans,e))return;const n=rq(e),{clipboardSvc:i,undoRedo:s}=this.beans;if(n===se.A)return this.onCtrlAndA(e);if(n===se.C)return this.onCtrlAndC(i,e);if(n===se.D)return this.onCtrlAndD(i,e);if(n===se.V)return this.onCtrlAndV(i,e);if(n===se.X)return this.onCtrlAndX(i,e);if(n===se.Y)return this.onCtrlAndY(s);if(n===se.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:n,selectionSvc:i},gos:s}=this;n&&Oo(s)&&!eK(s)&&t.isRowsToRender()?Q9(this.beans):i&&i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:sP(s)}),e.preventDefault()}onCtrlAndC(e,t){var i;if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:n}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(n,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){var i;if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:n}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(n,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){var i;const{cellCtrl:n}=this.getControlsForEventTarget(t.target);(i=this.editSvc)!=null&&i.isEditing(n,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e==null||e.redo("ui")}},y1=class extends ge{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,n=t!=null?`${t}px`:"";this.eContainer.style.height=n,this.eViewport&&(this.eViewport.style.height=n)}},pp=e=>e.topRowCtrls,gp=e=>e.getStickyTopRowCtrls(),mp=e=>e.getStickyBottomRowCtrls(),vp=e=>e.bottomRowCtrls,Cp=e=>e.allRowCtrls,Vy=e=>e.getCtrls("top"),By=e=>e.getCtrls("center"),Hy=e=>e.getCtrls("bottom"),lq={center:{type:"center",name:"center-cols",getRowCtrls:Cp,getSpannedRowCtrls:By},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Cp,getSpannedRowCtrls:By},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Cp,getSpannedRowCtrls:By},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Cp},topCenter:{type:"center",name:"floating-top",getRowCtrls:pp,getSpannedRowCtrls:Vy},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:pp,getSpannedRowCtrls:Vy},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:pp,getSpannedRowCtrls:Vy},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:pp},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:gp},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:gp},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:gp},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:gp},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:mp},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:mp},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:mp},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:mp},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:vp,getSpannedRowCtrls:Hy},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:vp,getSpannedRowCtrls:Hy},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:vp,getSpannedRowCtrls:Hy},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:vp}};function w1(e){return`ag-${rd(e).name}-viewport`}function yp(e){const t=rd(e);return t.container??`ag-${t.name}-container`}function uq(e){return`ag-${rd(e).name}-spanned-cells-container`}function rd(e){return lq[e]}var cq=["topCenter","topLeft","topRight"],dq=["bottomCenter","bottomLeft","bottomRight"],hq=["center","left","right"],fq=["center","left","right","fullWidth"],pq=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],gq=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],mq=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],b1=["stickyTopCenter","stickyTopLeft","stickyTopRight"],S1=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],vq=[...b1,"stickyTopFullWidth",...S1,"stickyBottomFullWidth"],Cq=[...cq,...dq,...hq,...b1,...S1],yq=class extends ge{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=rd(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Z9(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,n,i){this.comp=e,this.eContainer=t,this.eSpannedContainer=n,this.eViewport=i,this.createManagedBean(new aq(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:o}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(gq,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s==null?void 0:s.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(mq,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s==null?void 0:s.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(fq,()=>this.createManagedBean(new y1(this.eContainer,this.name==="center"?i:void 0))),o&&this.forContainers(Cq,()=>this.createManagedBean(o.createDragListenerFeature(this.eContainer))),this.forContainers(pq,()=>this.createManagedBean(new My(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,n=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:n,displayedColumnsWidthChanged:n,displayedRowsChanged:i=>this.onDisplayedRowsChanged(i.afterScroll)}),n(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(vq.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const n=this.gos.get("ensureDomOrder"),i=Wn(this.gos,"print");this.comp.setDomOrder(n||i)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=n=>{e.dragging&&n.cancelable&&n.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),n=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,n,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return Wc(this.eViewport)}getCenterViewportScrollLeft(){return Nf(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=hr(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return x_(this.eViewport)}getViewportScrollLeft(){return Nf(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||OC(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Vf(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const n=Wn(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||n,o=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!s&&a:s||!a});this.comp.setRowCtrls({rowCtrls:o,useFlushSync:e})}},E1="ag-force-vertical-scroll",wq="ag-selectable",bq="ag-column-moving",Sq=class extends ge{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,n,i,s,o,r){var a,l;this.comp=e,this.eGridBody=t,this.eBodyViewport=n,this.eTop=i,this.eBottom=s,this.eStickyTop=o,this.eStickyBottom=r,this.eCenterColsViewport=n.querySelector(`.${w1("center")}`),this.eFullWidthContainer=n.querySelector(`.${yp("fullWidth")}`),this.eStickyTopFullWidthContainer=o.querySelector(`.${yp("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${yp("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",u=>this.setCellTextSelection(u.currentValue)),this.createManagedBean(new Iy(this.comp)),this.scrollFeature=this.createManagedBean(new Y9(n)),(a=this.beans.rowDragSvc)==null||a.setupRowDrag(n,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,n,s,o,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),(l=this.filterManager)==null||l.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),n=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:n,rowResizeEnded:n}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const n=t&&e.getScrollbarWidth()||0,i=OP()?16:0,s=`calc(100% + ${n+i}px)`;ko(this.beans,()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let n=this.gos.get("treeData");if(!n){const i=t.isPivotMode();n=(e?e.columns.length:0)>=(i?2:1)}this.comp.setGridRootRole(n?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:n=>{const{target:i}=n,s=Ca(i,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:n=>{const{target:i,relatedTarget:s}=n,o=t.contains(s),r=Ca(s,"ag-root",t);Ca(i,"ag-root",t)||(!o||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(bq,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(wq,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){var e;(e=this.beans.editSvc)==null||e.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){var s,o;const e=(((s=this.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:s.getRowCount())??0)+(((o=this.filterManager)==null?void 0:o.getHeaderRowCount())??0),{rowModel:t}=this.beans,n=t.isLastRowIndexKnown()?t.getRowCount():-1,i=n===-1?-1:e+n;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?E1:null,n=Wn(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||n&&A_(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let n=t.sizesMeasured;const i=()=>{const s=n&&zl(this.gos)&&!e.stretching,o=s?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(o,s)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({gridStylesChanged:()=>{!n&&t.sizesMeasured&&(n=!0,i())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:n,eTop:i,eBottom:s,beans:{popupSvc:o,touchSvc:r}}=this,a=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:a}),r==null||r.mockBodyContextMenu(this,a),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,o)});const l=this.onStickyWheel.bind(this);for(const c of[t,n,i,s])this.addManagedElementListeners(c,{wheel:l});const u=this.onHorizontalWheel.bind(this);for(const c of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(c).eContainer,{wheel:u});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:n,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(n))&&qc(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:n,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(n))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:n}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||n})}onBodyViewportContextMenu(e,t,n){var s;if(!e&&!n)return;this.gos.get("preventDefaultOnContextMenu")&&(e||n).preventDefault();const{target:i}=e||t;(i===this.eBodyViewport||i===this.ctrlsSvc.get("center").eViewport)&&((s=this.beans.contextMenuSvc)==null||s.showContextMenu({mouseEvent:e,touchEvent:n,value:null,anchorToElement:this.eGridBody,source:"ui"}))}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e!=null&&e.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e,beans:{environment:t}}=this,n=e==null?void 0:e.getPinnedTopTotalHeight(),i=e==null?void 0:e.getPinnedBottomTotalHeight(),s=t.getPinnedRowBorderWidth(),o=t.getRowBorderWidth(),r=s-o,a=n?r+n:0,l=i?r+i:0;this.comp.setTopHeight(a),this.comp.setBottomHeight(l),this.comp.setTopInvisible(a<=0),this.comp.setBottomInvisible(l<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){var s,o;const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(((s=this.filterManager)==null?void 0:s.getHeaderHeight())??0),n=((o=this.pinnedRowModel)==null?void 0:o.getPinnedTopTotalHeight())??0;let i=0;t>0&&(i+=t),n>0&&(i+=n),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:n}=this,i=(e==null?void 0:e.getPinnedBottomTotalHeight())??0,o=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=i+o;n.setStickyBottomBottom(`${r}px`)}};function Eq(e,t){var n;return((n=Ly(e,t.target))==null?void 0:n.getFocusedCellPosition())??null}function R1(e,t){const n=Wn(e.gos,"normal"),i=t;let s,o;i.clientX!=null||i.clientY!=null?(s=i.clientX,o=i.clientY):(s=i.x,o=i.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(o+=r,n){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition(),u=a.getHScrollPosition();s+=u.left,o+=l.top}return{x:s,y:o}}var D1=class extends $t{constructor(e,t){super(),this.direction=t,this.eViewport=We,this.eContainer=We,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",IP()||Ra())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=OP(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),n=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:n,touchend:n})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),ko(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;F8(this,()=>qs(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},Rq={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},Dq=class extends D1{constructor(){super(Rq,"horizontal"),this.eLeftSpacer=We,this.eRightSpacer=We,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new My(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){var t;if(!this.invisibleScrollbar)return;const e=((t=this.beans.pinnedRowModel)==null?void 0:t.getPinnedBottomTotalHeight())??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const n=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();n&&(t+=i),Ys(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=i),Ys(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=i)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,n=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,o=n?0:i===0&&t?16:i,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Uc(this.getGui(),o),Uc(this.eViewport,o),Uc(this.eContainer,o),o||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return Nf(this.eViewport,this.enableRtl)}setScrollPosition(e){qs(this.eViewport)||this.attemptSettingScrollPosition(e),Vf(this.eViewport,e,this.enableRtl)}},Fq={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:Dq},Tq={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},xq=class extends D1{constructor(){super(Tq,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new y1(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,n=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,s=i===0&&n?16:i;this.toggleCss("ag-scrollbar-invisible",n),Ys(this.getGui(),s),Ys(this.eViewport,s),Ys(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const n=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),s=n.scrollTop;i!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!qs(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},_q={selector:"AG-FAKE-VERTICAL-SCROLL",component:xq},Pq="ag-column-first",Aq="ag-column-last";function F1(e,t,n,i){return on(e)?[]:kq(e.headerClass,e,t,n,i)}function T1(e,t,n){e.toggleCss(Pq,n.isColAtEdge(t,"first")),e.toggleCss(Aq,n.isColAtEdge(t,"last"))}function Iq(e,t,n,i){return dt(t,{colDef:e,column:n,columnGroup:i})}function kq(e,t,n,i,s){if(on(e))return[];let o;if(typeof e=="function"){const r=Iq(t,n,i,s);o=e(r)}else o=e;return typeof o=="string"?[o]:Array.isArray(o)?[...o]:[]}function Oq(e,t,n){t.addManagedElementListeners(n,{keydown:i=>{if(!i.defaultPrevented&&i.key===se.TAB){const s=i.shiftKey;Fa(e,n,!1,s)||tu(e,s)&&i.preventDefault()}}})}function Mq(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function Pa(e){var t;return e.gos.get("suppressHeaderFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function wp(e){var t;return e.gos.get("suppressCellFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function tu(e,t,n=!1){const i=e.ctrlsSvc.get("gridCtrl");return!n&&i.focusNextInnerContainer(t)?!0:((n||!t&&!i.isDetailGrid())&&i.forceFocusOutOfContainer(t),!1)}function so(e){var t;return((t=e.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:t.getRowCount())??0}function Gy(e){const t=[],n=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const i of n){if(!i)continue;const s=i.getGroupRowCount()||0;for(let o=0;o<s;o++){const r=i.getGroupRowCtrlAtIndex(o),a=t[o];if(r){const l=Lq(e,r);(a==null||l>a)&&(t[o]=l)}}}return t}function Lq(e,t){let i=e.colModel.isPivotMode()?Vq(e):_1(e);const s=t.getHeaderCellCtrls();for(const o of s){const{column:r}=o,a=r.getAutoHeaderHeight();a!=null&&a>i&&r.isAutoHeaderHeight()&&(i=a)}return i}function $y(e){let n=e.colModel.isPivotMode()?Nq(e):ad(e);return e.colModel.forAllCols(i=>{const s=i.getAutoHeaderHeight();s!=null&&s>n&&i.isAutoHeaderHeight()&&(n=s)}),n}function ad(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function x1(e){return e.gos.get("floatingFiltersHeight")??ad(e)}function _1(e){return e.gos.get("groupHeaderHeight")??ad(e)}function Nq(e){return e.gos.get("pivotHeaderHeight")??ad(e)}function Vq(e){return e.gos.get("pivotGroupHeaderHeight")??_1(e)}function Bq(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}var Hq=class extends ge{setComp(e,t,n){this.comp=e,this.eGui=t;const{beans:i}=this,{headerNavigation:s,touchSvc:o,ctrlsSvc:r}=i;s&&this.createManagedBean(new eu(n,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),o==null||o.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>ko(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){var o;const{beans:e}=this;let t=0;const n=Gy(e).reduce((r,a)=>r+a,0),i=$y(e);if((o=e.filterManager)!=null&&o.hasFloatingFilters()&&(t+=x1(e)),t+=n,t+=i,this.headerHeight===t)return;this.headerHeight=t;const s=`${t+1}px`;this.comp.setHeightAndMinHeight(s),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const n=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",n)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),n=e.shiftKey,i=n!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:o,focusSvc:r}=s;(o.navigateHorizontally(i,!0,e)||!n&&r.focusOverlay(!1)||tu(s,n,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:n}=this.beans;switch(e.key){case se.LEFT:t="LEFT";case se.RIGHT:{ze(t)||(t="RIGHT"),n.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case se.UP:t="UP";case se.DOWN:{ze(t)||(t="DOWN"),n.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:n,beans:i}=this;!t&&n.contains(un(i))||n.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,n){var r;const{menuSvc:i,ctrlsSvc:s}=this.beans;if(!e&&!n||!(i!=null&&i.isHeaderContextMenuEnabled()))return;const{target:o}=e??t;(o===this.eGui||o===((r=s.getHeaderRowContainerCtrl())==null?void 0:r.eViewport))&&i.showHeaderContextMenu(void 0,e,n)}},Wy=class extends $t{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Gq={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},$q=class extends Wy{constructor(e){super(Gq,e),this.eResize=We,this.eHeaderCompWrapper=We,this.headerCompVersion=0}postConstruct(){const e=this.getGui(),t=()=>{const i=this.ctrl.getSelectAllGui();i&&(this.eResize.insertAdjacentElement("afterend",i),this.addDestroyFunc(()=>i.remove()))},n={setWidth:i=>e.style.width=i,toggleCss:(i,s)=>this.toggleCss(i,s),setUserStyles:i=>zc(e,i),setAriaSort:i=>i?i8(e,i):s8(e),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:t,removeSelectAllGui:()=>{var i;return(i=this.ctrl.getSelectAllGui())==null?void 0:i.remove()}};this.ctrl.setComp(n,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),t()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){var e;this.headerComp&&((e=this.headerCompGui)==null||e.remove(),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(n=>this.afterCompCreated(t,n))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},Wq={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},zq=class extends Wy{constructor(e){super(Wq,e),this.eResize=We,this.eHeaderCompWrapper=We}postConstruct(){const e=this.getGui(),t=(i,s)=>s!=null?e.setAttribute(i,s):e.removeAttribute(i),n={toggleCss:(i,s)=>this.toggleCss(i,s),setUserStyles:i=>zc(e,i),setHeaderWrapperHidden:i=>{i?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:i=>{i!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${i}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",i!=null)},setResizableDisplayed:i=>rn(this.eResize,i),setWidth:i=>e.style.width=i,setAriaExpanded:i=>t("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(n,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const n=this.getGui(),i=e.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(n)}},Uq={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},jq=class extends Wy{constructor(e){super(Uq,e),this.eFloatingFilterBody=We,this.eButtonWrapper=We,this.eButtonShowMainFilter=We}postConstruct(){const e=this.getGui(),t={toggleCss:(n,i)=>this.toggleCss(n,i),setUserStyles:n=>zc(e,n),addOrRemoveBodyCssClass:(n,i)=>this.eFloatingFilterBody.classList.toggle(n,i),setButtonWrapperDisplayed:n=>rn(this.eButtonWrapper,n),setCompDetails:n=>this.setCompDetails(n),getFloatingFilterComp:()=>this.compPromise,setWidth:n=>e.style.width=n,setMenuIcon:n=>this.eButtonShowMainFilter.appendChild(n)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.floatingFilterComp.getGui().remove(),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},Kq=class extends $t{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),Of(this.getGui(),this.ctrl.getAriaRowIndex());const t={setHeight:n=>this.getGui().style.height=n,setTop:n=>this.getGui().style.top=n,setHeaderCtrls:(n,i)=>this.setHeaderCtrls(n,i),setWidth:n=>this.getGui().style.width=n,setRowIndex:n=>Of(this.getGui(),n)};this.ctrl.setComp(t,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const n=this.headerComps;this.headerComps={};for(const i of e){const s=i.instanceId;let o=n[s];delete n[s],o==null&&(o=this.createHeaderComp(i),this.getGui().appendChild(o.getGui())),this.headerComps[s]=o}if(Object.values(n).forEach(i=>{i.getGui().remove(),this.destroyBean(i)}),t){const i=Object.values(this.headerComps);i.sort((o,r)=>{const a=o.getCtrl().column.getLeft(),l=r.getCtrl().column.getLeft();return a-l});const s=i.map(o=>o.getGui());P_(this.getGui(),s)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new zq(e);break;case"filter":t=new jq(e);break;default:t=new $q(e);break}return this.createBean(t),t.setParentComponent(this),t}},zy=class extends ge{constructor(e,t,n,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=n}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?Zt(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,n=e.get("suppressColumnMoveAnimation"),i=ze(this.columnOrGroup.getOldLeft());(t==null?void 0:t.isActive())&&i&&!n?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),n=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=n,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===n&&this.setLeft(n)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:n,visibleCols:i}=this.beans;if(!Wn(n,"print")||e.getPinned()==="left")return t;const o=i.getColsLeftWidth();if(e.getPinned()==="right"){const r=i.bodyWidth;return o+r+t}return o+t}setLeft(e){if(ze(e)&&(this.eCell.style.left=`${e}px`),Sn(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&n8(this.ariaEl,t.length)}}},qq=0,P1="headerCtrl",Uy=class extends ge{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+qq++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,n,i,s){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,n,i,s),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:n}=this.beans.focusSvc.focusedHeader,i=n.getDefinition(),s=i==null?void 0:i.suppressHeaderKeyboardEvent;if(!ze(s))return!1;const o=dt(this.gos,{colDef:i,column:n,headerRowIndex:t,event:e});return!!s(o)}getWrapperHasFocus(){return un(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let n;if(typeof t=="function"){const i=this.getHeaderClassParams();n=t(i)}else n=t;n&&this.comp.setUserStyles(n)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:n,compBean:i}=e,{beans:s}=this,o=d=>{if(!this.isAlive()||!i.isAlive())return;const{paddingTop:h,paddingBottom:p,borderBottomWidth:g,borderTopWidth:C}=ya(this.eGui),v=h+p+g+C,R=t.offsetHeight+v;if(d<5){const E=Ln(s),y=!(E!=null&&E.contains(t)),b=R==0;if(y||b){GC(()=>o(d+1),"raf",s);return}}this.setColHeaderHeight(this.column,R)};let r=!1,a;const l=()=>{const d=this.column.isAutoHeaderHeight();d&&!r&&u(),!d&&r&&c()},u=()=>{r=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),o(0),a=hr(this.beans,t,()=>o(0))},c=()=>{r=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),i.addDestroyFunc(()=>c()),i.addManagedListeners(this.column,{widthChanged:()=>r&&o(0)}),i.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>o(0))}}),n&&n(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:n,eGui:i}=this;!e||!t||!i||(T1(e,t,n.visibleCols),S_(i,n.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=Pa(this.beans);this.eGui&&Mi(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){var o;const t=un(this.beans),n=e.key===se.LEFT||e.key===se.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||n)&&(e.preventDefault(),e.stopImmediatePropagation()),!n))return;const s=e.key===se.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),(o=this.resizeFeature)==null||o.toggleColumnResizing(!0)}else this.moveHeader(s)}moveHeader(e){var t;(t=this.beans.colMoves)==null||t.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:n}=this.beans;return n?n.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:n}=this;let i=e.key===se.LEFT!==t.get("enableRtl");const s=n.getPinned(),o=t.get("enableRtl");return s&&o!==(s==="right")&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{var e;(e=this.resizeFeature)==null||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case se.PAGE_DOWN:case se.PAGE_UP:case se.PAGE_HOME:case se.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=P1,{eGui:n,gos:i}=this;Sa(i,n,t,this),e.addDestroyFunc(()=>Sa(i,n,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(t.focus(),this.lastFocusEvent=e||null):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){var e;this.dragSource&&((e=this.beans.dragAndDrop)==null||e.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,n){const i=e??t,{menuSvc:s,gos:o}=this.beans;o.get("preventDefaultOnContextMenu")&&i.preventDefault(),s!=null&&s.isHeaderContextMenuEnabled(n)&&s.showHeaderContextMenu(n,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",n)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:n}=this;e.isColumn?n.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):n.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},Yq=class extends Uy{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,n,i,s){this.comp=e;const{rowCtrl:o,column:r,beans:a}=this,{colResize:l,context:u,colHover:c,rangeSvc:d}=a,h=nd(this,u,s);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:g=>this.setRefreshFunction("measuring",g),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(o.pinned,r,n,e,this)):rn(n,!1),c==null||c.createHoverFeature(h,[r],t),d==null||d.createRangeHighlightFeature(h,r,e),h.createManagedBean(new zy(r,t,a)),h.createManagedBean(new eu(t,{shouldStopEventPropagation:g=>this.shouldStopEventPropagation(g),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),h.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const p=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:p,columnRowGroupChanged:p,columnPivotChanged:p,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){var n;(n=this.beans.colResize)==null||n.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,n=e.colDef;return dt(t.gos,{colDef:n,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return ZK(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:n,gos:i}=this.beans;return dt(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!(e!=null&&e.isHeaderFilterButtonEnabled(this.column)),enableFilterIcon:!!n&&(!this.openFilterEnabled||Li(this.gos)),showColumnMenu:(o,r)=>{e==null||e.showColumnMenu({column:this.column,buttonElement:o,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(o,r)=>{e==null||e.showColumnMenu({column:this.column,mouseEvent:o,positionBy:"mouse",onClosedCallback:r})},showFilter:o=>{e==null||e.showFilterMenu({column:this.column,buttonElement:o,containerType:"columnFilter",positionBy:"button"})},progressSort:o=>{t==null||t.progressSort(this.column,!!o,"uiColumnSorted")},setSort:(o,r)=>{t==null||t.setSortForColumn(this.column,o,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(o,r)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(o,r)}})}setupSelectAll(e){var n;const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),(n=this.selectAllFeature)==null||n.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{var s;const i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),(s=this.selectAllFeature)==null||s.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){var e;return(e=this.selectAllFeature)==null?void 0:e.getCheckboxGui()}handleKeyDown(e){var t;super.handleKeyDown(e),e.key===se.SPACE&&((t=this.selectAllFeature)==null||t.onSpaceKeyDown(e)),e.key===se.ENTER&&this.onEnterKeyDown(e),e.key===se.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){var t;e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&((t=this.beans.sortSvc)==null||t.progressSort(this.column,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const n=this.comp.getUserCompInstance();A1(n)&&n.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),w7()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){var n;this.tooltipFeature=(n=this.beans.tooltipSvc)==null?void 0:n.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),n=F1(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(n);for(const s of n)i.has(s)?i.delete(s):this.comp.toggleCss(s,!0);for(const s of i)this.comp.toggleCss(s,!1)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){var t;this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=((t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!(e!=null&&e.isColumnMenuInHeaderEnabled(this.column)),this.openFilterEnabled=!!(e!=null&&e.isFilterMenuInHeaderEnabled(this.column)),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const n=this.column.getActualWidth();this.comp.setWidth(`${n}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{var n;(n=this.comp)==null||n.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const n=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",n),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,n=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",n)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){var h;const{eGui:e,column:t,comp:n,beans:i}=this,s=Gy(this.beans),o=s.reduce((p,g)=>p+g,0)===0;if(n.toggleCss("ag-header-parent-hidden",o),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),n.toggleCss("ag-header-span-height",!1),n.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();n.toggleCss("ag-header-span-height",r>0);const l=$y(i);if(r===0){n.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}n.toggleCss("ag-header-span-total",a);const u=(((h=this.column.getFirstRealParent())==null?void 0:h.getLevel())??-1)+1,c=s.length-u;let d=0;for(let p=0;p<c;p++)d+=s[s.length-1-p];e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${l+d}px`)}refreshAriaSort(){var e;if(this.sortable){const t=this.getLocaleTextFunc(),n=((e=this.beans.sortSvc)==null?void 0:e.getDisplaySortForColumn(this.column))||null;this.comp.setAriaSort(zj(n)),this.setAriaDescriptionProperty("sort",t("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!Li(this.gos)){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){var t;if(!this.eGui.contains(un(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((n,i)=>n==="filter"?-1:i.charCodeAt(0)-n.charCodeAt(0)).map(n=>this.ariaDescriptionProperties.get(n)).join(". ");(t=this.beans.ariaAnnounce)==null||t.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){var t;(t=this.beans.colHover)==null||t.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),n=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:n,contextmenu:i})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return A1(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function A1(e){return typeof(e==null?void 0:e.getAnchorElementForMenu)=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var Zq=0,jy=class extends ge{constructor(e,t,n){super(),this.rowIndex=e,this.pinned=t,this.type=n,this.instanceId=Zq++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";n==="group"?i="ag-header-row-group":n==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){var t;this.rowIndex=e,(t=this.comp)==null||t.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=Wn(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,n=!0){this.comp=e,t=nd(this,this.beans.context,t),n&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),n=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:n,virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",n),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=Wn(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=Gy(this.beans);for(let s=0;s<t.length;s++){if(s===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[s]};e+=t[s]}const n=$y(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:n};e+=n;const i=x1(this.beans);return{topOffset:e,rowHeight:i}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls(),n=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,n,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const i of t)this.recycleAndCreateHeaderCtrls(i,this.ctrlsById,e);const n=i=>{const{focusSvc:s,visibleCols:o}=this.beans;return s.isHeaderWrapperFocused(i)?o.isVisible(i.column):!1};if(e)for(const[i,s]of e)n(s)?this.ctrlsById.set(i,s):this.destroyBean(s);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,n){if(e.isEmptyGroup())return;const i=e.getUniqueId();let s;if(n&&(s=n.get(i),n.delete(i)),s&&s.column!=e&&(this.destroyBean(s),s=void 0),s==null)switch(this.type){case"filter":{s=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":s=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:s=this.createBean(new Yq(e,this));break}t.set(i,s)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const n=this.allCtrls.find(s=>s.column==e);return n?n.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},Jq=class extends ge{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:n,ctrlsSvc:i,colModel:s,colMoves:o}=this.beans;this.setupCenterWidth(),n==null||n.setupHeaderPinnedWidth(this),this.setupDragAndDrop(o,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const a=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;i.register(a,this),s.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,filterManager:n,visibleCols:i}=this.beans;let s=0;const o=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const d=i.headerGroupRowCount;s=d,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==d){if(h>d){for(let p=d;p<h;p++)this.destroyBean(this.groupsRowCtrls[p]);this.groupsRowCtrls.length=d;return}for(let p=h;p<d;p++){const g=this.createBean(new jy(p,this.pinned,"group"));this.groupsRowCtrls.push(g)}}},a=()=>{const d=s++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new jy(d,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==d&&this.columnsRowCtrl.setRowIndex(d)},l=()=>{this.includeFloatingFilter=!!(n!=null&&n.hasFloatingFilters())&&!this.hidden;const d=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){d();return}e||d();const h=s++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new jy(h,this.pinned,"filter"))},u=this.getAllCtrls();r(),a(),l();const c=this.getAllCtrls();this.comp.setCtrls(c),this.restoreFocusOnHeader(t,o),u.length!==c.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=n=>n==null?void 0:n.getHeaderCellCtrls().find(i=>i.column===e);if(mr(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let n=0;n<this.groupsRowCtrls.length;n++){const i=t(this.groupsRowCtrls[n]);if(i)return i}}getHtmlElementForColumnHeader(e){var t;return((t=this.getHeaderCtrlForColumn(e))==null?void 0:t.eGui)??null}getRowType(e){var t;return(t=this.getAllCtrls()[e])==null?void 0:t.type}focusHeader(e,t,n){const s=this.getAllCtrls()[e];return s?s.focusHeader(t,n):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const n=e==null?void 0:e.createBodyDropTarget(this.pinned,t);n&&this.createManagedBean(n)}restoreFocusOnHeader(e,t){if(!t)return;const{column:n}=t;n.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t,scroll:!1})}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new My(e=>this.comp.setCenterWidth(`${e}px`),!0))}},Xq=class extends ge{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(k1(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,n){var i;(i=this.activeMenuFactory)==null||i.showMenuAfterContextMenuEvent(e,t,n)}hidePopupMenu(){var e,t;(e=this.beans.contextMenuSvc)==null||e.hideActiveMenu(),(t=this.activeMenuFactory)==null||t.hideActiveMenu()}hideFilterMenu(){var e;(e=k1(this.beans))==null||e.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){var n;const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!((n=this.activeMenuFactory)!=null&&n.isMenuEnabled(e))&&(Li(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){var t;return!e.getColDef().suppressHeaderFilterButton&&!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))}isHeaderContextMenuEnabled(e){const t=e&&mr(e)?e.getColDef():e==null?void 0:e.getColGroupDef();return!(t!=null&&t.suppressHeaderContextMenu)&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Ra()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!Li(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){var t;return!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))&&!Li(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return Li(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,n,i){const{positionBy:s,onClosedCallback:o}=t,r=t.column;if(s==="button"){const{buttonElement:a}=t;e==null||e.showMenuAfterButtonClick(r,a,n,o,i)}else if(s==="mouse"){const{mouseEvent:a}=t;e==null||e.showMenuAfterMouseEvent(r,a,n,o,i)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),ko(a,()=>{var c;const u=(c=l.getHeaderRowContainerCtrl(r.getPinned()))==null?void 0:c.getHeaderCtrlForColumn(r);u&&(e==null||e.showMenuAfterButtonClick(r,u.getAnchorElementForMenu(i),n,o,i))})}}};function I1(e,t,n){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",n))}function k1(e){const{enterpriseMenuFactory:t,filterMenuFactory:n,gos:i}=e;return t&&Li(i)?t:n}var bp=class extends ny{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.errorMessages=null}},O1=class extends $t{constructor(){super()}},Qq={tag:"span",cls:"ag-overlay-loading-center"},eY=class extends O1{init(){var t;const e=Io((t=this.gos.get("overlayLoadingTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??Qq),!e){const i=this.getLocaleTextFunc()("loadingOoo","Loading...");this.getGui().textContent=i,this.beans.ariaAnnounce.announceValue(i,"overlay")}}},tY={tag:"span",cls:"ag-overlay-no-rows-center"},nY=class extends O1{init(){var t;const e=Io((t=this.gos.get("overlayNoRowsTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??tY),!e){const i=this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=i,this.beans.ariaAnnounce.announceValue(i,"overlay")}}};function iY(e,t,n){const i=is(e,t,n);if(i){const{className:o}=i;if(typeof o=="string"&&o.includes("ag-icon")||typeof o=="object"&&o["ag-icon"])return i}const s=En({tag:"span"});return s.appendChild(i),s}function is(e,t,n){var o;let i=null;e==="smallDown"?xe(262):e==="smallLeft"?xe(263):e==="smallRight"&&xe(264);const s=n==null?void 0:n.getColDef().icons;if(s&&(i=s[e]),t.gos&&!i){const r=t.gos.get("icons");r&&(i=r[e])}if(i){let r;if(typeof i=="function")r=i();else if(typeof i=="string")r=i;else{xe(38,{iconName:e});return}if(typeof r=="string")return kC(r);if(LC(r))return r;xe(133,{iconName:e});return}else{const r=t.registry.getIcon(e);return r||(o=t.validation)==null||o.validateIcon(e),En({tag:"span",cls:`ag-icon ag-icon-${r??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var sY=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}",oY={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},rY=class extends $t{constructor(){super(),this.dragSource=null,this.eIcon=We,this.eLabel=We,this.eGhost=We,this.registerCSS(sY)}postConstruct(){const e=t=>iY(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(oY),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:n,eIcon:i,dragSource:s,dropIconMap:o,gos:r}=this;Gn(i);let a=null;e||(e=s!=null&&s.getDefaultIconName?s.getDefaultIconName():"notAllowed"),a=o[e],n.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),i.classList.toggle("ag-shake-left-to-right",t),!(a===o.hide&&r.get("suppressDragLeaveHidesColumns"))&&a&&i.appendChild(a)}setLabel(e){this.eLabel.textContent=e}},aY=".ag-checkbox-cell{height:100%}",lY={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},uY=class extends $t{constructor(){super(lY,[Cy]),this.eCheckbox=We,this.registerCSS(aY)}init(t){this.refresh(t);const{eCheckbox:n,beans:i}=this,s=n.getInputElement();s.setAttribute("tabindex","-1"),w_(s,"polite"),this.addManagedListeners(s,{click:o=>{if(_a(o),n.isDisabled())return;const r=n.getValue();this.onCheckboxChanged(r)},dblclick:o=>{_a(o)}}),this.addManagedElementListeners(t.eGridCell,{keydown:o=>{if(o.key===se.SPACE&&!n.isDisabled()){t.eGridCell===un(i)&&n.toggle();const r=n.getValue();this.onCheckboxChanged(r),o.preventDefault()}}})}refresh(t){return this.params=t,this.updateCheckbox(t),!0}updateCheckbox(t){let n,i=!0;const{value:s,column:o,node:r}=t;if(r.group&&o)if(typeof s=="boolean")n=s;else{const h=o.getColId();h.startsWith(Jf)?n=s==null||s===""?void 0:s==="true":r.aggData&&r.aggData[h]!==void 0||r.sourceRowIndex>=0?n=s??void 0:i=!1}else n=s??void 0;const{eCheckbox:a}=this;if(!i){a.setDisplayed(!1);return}a.setValue(n);const l=t.disabled??!(o!=null&&o.isCellEditable(r));a.setDisabled(l);const u=this.getLocaleTextFunc(),c=Mf(u,n),d=l?c:`${u("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;a.setInputAriaLabel(d)}onCheckboxChanged(t){var a,l,u,c;const{params:n}=this,{column:i,node:s,value:o}=n;(l=(a=this.beans)==null?void 0:a.editSvc)==null||l.setEditingCells([{column:i,colId:i.getColId(),rowIndex:s.rowIndex,rowPinned:s.rowPinned,state:"changed",oldValue:o,newValue:o}],{update:!0,forceRefreshOfEditCellsOnly:!0});const r=s.setDataValue(i,t,"renderer");(c=this.beans.editSvc)==null||c.stopEditing({rowNode:s,column:i},{source:(u=this.beans.editSvc)!=null&&u.isBatchEditing()?"ui":"api"}),r||this.updateCheckbox(n)}},M1=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:n,order:i}=this;t.has(e)||(t.add(e),n.add(e),i.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),Rs(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:n,queued:i}=this;e.clear(),i.clear(),t.clear(),n.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:n}=this.beans,i=(e==null?void 0:e.getSortOptions())??[],s=hY(this.order);if(this.order.sort((r,a)=>{var l,u;return(((l=r.pinnedSibling)==null?void 0:l.rowIndex)??0)-(((u=a.pinnedSibling)==null?void 0:u.rowIndex)??0)}),this.order=(t==null?void 0:t.doFullSort(this.order,i))??this.order,!s)return;const o=eP(n);o==="bottom"||o==="pinnedBottom"?this.order.push(s):this.order.unshift(s)}hide(e){const{all:t,visible:n}=this;t.forEach(i=>e(i)?n.delete(i):n.add(i)),this.order=Array.from(n),this.sort()}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function L1(e){var n;if(e.level===-1)return!0;const t=e.parent;return(n=t==null?void 0:t.childrenAfterSort)!=null&&n.some(i=>i==e)?L1(t):!1}function Ky(e,t){const{gos:n,rowModel:i,filterManager:s}=e;return Wl(n)?!i.getRowNode(t.id):s!=null&&s.isAnyFilterPresent()?!L1(t):n.get("pivotMode")?!t.group:!1}function cY(e){return!!e.footer&&e.level===-1}function dY(e){return!!e.pinnedSibling&&cY(e.pinnedSibling)}function hY(e){var n;const t=e.findIndex(dY);if(t>-1)return(n=e.splice(t,1))==null?void 0:n[0]}var N1=class extends ge{postConstruct(){const{gos:e,beans:t}=this;this.top=new M1(t,"top"),this.bottom=new M1(t,"bottom");const n=s=>Ky(t,s.pinnedSibling),i=()=>{const s=e.get("isRowPinned");s&&e.get("enableRowPinning")&&t.rowModel.forEachNode(o=>this.pinRow(o,s(o)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:s})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow(),this.forContainers(r=>r.hide(n));const o=this.refreshRowPositions();(!s||o)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(pY),this.refreshRowPositions()},rowNodeDataChanged:({node:s})=>{const o=e.get("isRowPinnable");((o==null?void 0:o(s))??!0)||this.pinRow(s,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(s=>s.hide(n)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:s})=>{this._grandTotalPinned=s==="pinnedBottom"?"bottom":s==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const n=[];t.forEach(i=>n.push(i)),n.forEach(i=>this.pinRow(i,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,n){var r;if(e.footer&&e.level>-1)return;if(e.footer&&e.level===-1){this._grandTotalPinned=t,mY(this.beans);return}const i=e.rowPinned??((r=e.pinnedSibling)==null?void 0:r.rowPinned);if(i!=null&&t!=null&&t!=i){const a=e.rowPinned?e:e.pinnedSibling,l=e.rowPinned?e.pinnedSibling:e;this.pinRow(a,null,n),this.pinRow(l,t,n);return}const o=n&&gY(this.beans,e,n);if(o){o.forEach(a=>this.pinRow(a,t));return}if(t==null){const a=e.rowPinned?e:e.pinnedSibling,l=this.findPinnedRowNode(a);if(!l)return;l.delete(a);const u=a.pinnedSibling;qy(a),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(u)}else{const a=V1(this.beans,e,t),l=this.getContainer(t);l.add(a),Ky(this.beans,e)&&l.hide(u=>Ky(this.beans,u.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const n=i=>{if(i.rowHeightEstimated){const s=gr(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return this.bottom.forEach(n),t=0,this.top.forEach(n),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return B1(this.top)}getPinnedBottomTotalHeight(){return B1(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const n=[];return this.forEachPinnedRow(t,i=>n.push(i.pinnedSibling.id)),n};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,n)=>{for(const i of e[n]){const s=this.beans.rowModel.getRowNode(i);s?this.pinRow(s,n):t.queue(i)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const n=new Set;e.forEachQueued(i=>{const s=this.beans.rowModel.getRowNode(i);s&&n.add(s)});for(const i of n)e.unqueue(i.id),this.pinRow(i,t)})}pinGrandTotalRow(){var a;const{gos:e,beans:t,_grandTotalPinned:n}=this,i=t.rowModel;if(!bn(e))return;const s=(a=i.rootNode)==null?void 0:a.sibling;if(!s)return;const o=s.pinnedSibling,r=o&&this.findPinnedRowNode(o);if(n){if(r&&r.floating!==n&&(r.delete(o),qy(o)),!r||r.floating!==n){const l=V1(t,s,n);this.getContainer(n).add(l)}}else{if(!r)return;r.delete(o),qy(o)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(n=>n.setRowHeight(n.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){const t=i=>fY(this.beans,i);if(e)return t(this.getContainer(e));let n=!1;return this.forContainers(i=>{const s=t(i);n||(n=s)}),n}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e==null||e.dispatchRowEvent("rowPinned")}};function fY(e,t){let n=0,i=!1;return t.forEach((s,o)=>{if(i||(i=s.rowTop!==n),s.setRowTop(n),s.rowHeightEstimated||s.rowHeight==null){const r=gr(e,s).height;i||(i=s.rowHeight!==r),s.setRowHeight(r)}s.setRowIndex(o),n+=s.rowHeight}),i}function V1(e,t,n){if(t.pinnedSibling)return t.pinnedSibling;const i=P9(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=n;const s=n==="top"?Ty:xy;return i.id=`${s}${n}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function qy(e){if(!e.pinnedSibling)return;e.rowPinned=null,e.setRowTop(null),e.setRowIndex(null);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function pY(e){const t=new Set;e.forEach(n=>{n.group&&t.add(n)}),t.forEach(n=>e.delete(n))}function gY(e,t,n){var o;const{rowSpanSvc:i}=e,s=(n&&(i==null?void 0:i.isCellSpanning(n,t)))??!1;if(n&&s)return(o=i==null?void 0:i.getCellSpan(n,t))==null?void 0:o.spannedNodes}function B1(e){const t=e.size();if(t===0)return 0;const n=e.getByIndex(t-1);return n===void 0?0:n.rowTop+n.rowHeight}function mY({gos:e,rowModel:t}){bn(e)&&t.refreshModel({step:"map"})}var H1=class extends ge{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=n=>{n.setRowHeight(n.rowHeight,!0)};ud(this.pinnedBottomRows,t),ud(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const n=i=>{if(i.rowHeightEstimated){const s=gr(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return ud(this.pinnedBottomRows,n),t=0,ud(this.pinnedTopRows,n),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){var c;const n=this.getCache(t);if(e===void 0){n.order.length=0,n.cache={};return}const i=Ul(this.gos),s=t==="top"?Ty:xy,o=new Set(n.order),r=[],a=new Set;let l=0,u=-1;for(const d of e){const h=(i==null?void 0:i({data:d,level:0,rowPinned:t}))??s+this.nextId++;if(a.has(h)){xe(96,{id:h,data:d});continue}u++,a.add(h),r.push(h);const p=ld(n,h);if(p!==void 0)p.data!==d&&p.updateData(d),l+=this.setRowTopAndRowIndex(p,l,u),o.delete(h);else{const g=new wr(this.beans);g.id=h,g.data=d,g.rowPinned=t,l+=this.setRowTopAndRowIndex(g,l,u),n.cache[h]=g,n.order.push(h)}}for(const d of o)(c=ld(n,d))==null||c.clearRowTopAndRowIndex(),delete n.cache[d];n.order=r}setRowTopAndRowIndex(e,t,n){return e.setRowTop(t),e.setRowHeight(gr(this.beans,e).height),e.setRowIndex(n),e.rowHeight}getPinnedTopTotalHeight(){return G1(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return G1(this.pinnedBottomRows)}getPinnedTopRowCount(){return Zy(this.pinnedTopRows)}getPinnedBottomRowCount(){return Zy(this.pinnedBottomRows)}getPinnedTopRow(e){return Yy(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Yy(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return ld(this.getCache(t),e)}forEachPinnedRow(e,t){return ud(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function G1(e){const t=Zy(e);if(t===0)return 0;const n=Yy(e,t-1);return n===void 0?0:n.rowTop+n.rowHeight}function ld(e,t){return e.cache[t]}function Yy(e,t){return ld(e,e.order[t])}function ud(e,t){e.order.forEach((n,i)=>{const s=ld(e,n);s&&t(s,i)})}function Zy(e){return e.order.length}var vY=class extends ge{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const n=e.get("enableRowPinning"),i=eP(e),o=!!n||(i==="pinnedBottom"||i==="pinnedTop"),r=o?this.inner instanceof H1:this.inner instanceof N1;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(o?new N1:new H1))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,n){return this.inner.pinRow(e,t,n)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}};function cd(e){return!!(e.rowPinned&&e.pinnedSibling)}function ss(e,t,n,i){const s=t==="top";if(!n)return ss(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const l=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return ss(e,t,n,s?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let o=!1,r=!1;const a=[];return e.forEachPinnedRow(t,l=>{if(l===n&&!o){o=!0,a.push(l);return}if(o&&l===i){r=!0,a.push(l);return}o&&!r&&a.push(l)}),a}var CY={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},yY=class extends $t{constructor(){super(CY,[Cy]),this.eCheckbox=We}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:n}=this,i=t.isSelected(),s=Mf(e,i),[o,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(o,r);n.setValue(i,!0),n.setInputAriaLabel(`${a} (${s})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:_a,click:i=>{var s;_a(i),(s=this.beans.selectionSvc)==null||s.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const o=typeof i=="object"?ZC(i):void 0,r=typeof s=="object"?ZC(s):void 0;o!==r&&this.onSelectableChanged()}),JC(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:n,gos:i}=this,s=t.selectable,o=this.getIsVisible();let r;if(typeof o=="function"){const d=n==null?void 0:n.callbackParams;if(!e)r=o({...d,node:t,data:t.data});else{const h=e.createColumnFunctionCallbackParams(t);r=o({...d,...h})}}else r=o??!1;const a=s&&!r||!s&&r,l=s||r,u=i.get("rowSelection"),c=u&&typeof u!="string"?!ZC(u):!!(e!=null&&e.getColDef().showDisabledCheckboxes);this.setVisible(l&&(a?c:!0)),this.setDisplayed(l&&(a?c:!0)),l&&this.eCheckbox.setDisabled(a),n!=null&&n.removeHidden&&this.setDisplayed(l)}getIsVisible(){var n,i;const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?jl(t):(i=(n=this.column)==null?void 0:n.getColDef())==null?void 0:i.checkboxSelection}},wY=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:n,pinnedRowModel:i}=this;return t??(t=n.getRowNode(e)),i!=null&&i.isManual()&&(t??(t=i.getPinnedRowById(e,"top")),t??(t=i.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const n=t[0].id===this.rootId,i=t.findIndex(s=>s.id===e.id);if(i>-1){const s=t.slice(0,i),o=t.slice(i+1);return this.setEndRange(e),n?{keep:s,discard:o}:{keep:o,discard:s}}else return{keep:t,discard:[]}}extend(e,t=!1){const n=this.getRoot();if(n==null){const s=this.getRange().slice();return t&&e.depthFirstSearch(o=>!o.group&&s.push(o)),s.push(e),this.setRoot(e),{keep:s,discard:[]}}const i=this.getNodesInRange(n,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(s=>s.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const s=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:s}}}getNodesInRange(e,t){const{pinnedRowModel:n,rowModel:i}=this;if(!(n!=null&&n.isManual()))return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return ss(n,"top",e,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const s=ss(n,"bottom",void 0,e),o=i.getRowCount(),r=i.getRow(o-1);return(i.getNodesInRangeForSelection(t,r)??[]).concat(s)}if(!e.rowPinned&&!t.rowPinned)return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return ss(n,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const s=ss(n,"top",t,void 0),o=ss(n,"bottom",void 0,e),r=i.getRow(0),a=i.getRow(i.getRowCount()-1);return s.concat(i.getNodesInRangeForSelection(r,a)??[]).concat(o)}if(!e.rowPinned&&t.rowPinned==="top")return ss(n,"top",t,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const s=ss(n,"top",e,void 0),o=ss(n,"bottom",void 0,t),r=i.getRow(0),a=i.getRow(i.getRowCount()-1);return s.concat(i.getNodesInRangeForSelection(r,a)??[]).concat(o)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return ss(n,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const s=ss(n,"bottom",void 0,t),o=i.getRow(i.getRowCount());return(i.getNodesInRangeForSelection(e,o)??[]).concat(s)}return null}},bY=class extends ge{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(un(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new vy);this.cbSelectAll=t,t.addCss("ag-header-select-all"),dr(t.getGui(),"presentation"),this.showOrHideSelectAll();const n=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:n,paginationChanged:n,modelUpdated:n}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const o=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;o(i)!==o(s)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,n=this.cbSelectAll,i=t.getSelectAllState(e);n.setValue(i);const s=t.hasNodesToSelect(e);n.setDisabled(!s),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:n,cbSelectAll:i,cbSelectAllVisible:s}=this,o=i.getValue(),r=Mf(t,o),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");n.setAriaDescriptionProperty("selectAll",s?`${a} (${r})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||n.announceAriaDescription()}checkSelectionType(e){return Xc(this.gos)?!0:(xe(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:n}=this.beans;return bn(t)||Wl(t)?!0:(xe(129,{feature:e,rowModel:n.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let n="uiSelectAll";t==="currentPage"?n="uiSelectAllCurrentPage":t==="filtered"&&(n="uiSelectAllFiltered");const i={source:n,selectAll:t},s=this.beans.selectionSvc;e?s.selectAllRowNodes(i):s.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:n}=this,o=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return $1(n,e)&&this.checkRightRowModelType(o)&&this.checkSelectionType(o)}getSelectAllMode(){const e=sP(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:n}=this.column.getColDef();return t?"currentPage":n?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function $1({gos:e,selectionColSvc:t},n){const i=e.get("rowSelection"),s=n.getColDef(),{headerCheckboxSelection:o}=s;let r=!1;if(typeof i=="object"){const l=Lo(n),u=XC(n);(Kf(i)==="autoGroupColumn"&&u||l&&(t!=null&&t.isSelectionColumnEnabled()))&&(r=jf(i))}else typeof o=="function"?r=o(dt(e,{column:n,colDef:s})):r=!!o;return r}var SY=class extends ge{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new wY(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const n=JC(e);n!==this.isRowSelectable&&(this.isRowSelectable=n,this.updateSelectable())}),this.isRowSelectable=JC(e),this.addManagedEventListeners({cellValueChanged:n=>this.updateRowSelectable(n.node),rowNodeDataChanged:n=>this.updateRowSelectable(n.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new yY}createSelectAllFeature(e){if($1(this.beans,e))return new bY(e)}isMultiSelect(){return Xc(this.gos)}onRowCtrlSelected(e,t,n){const i=!!e.rowNode.isSelected();e.forEachGui(n,s=>{s.rowComp.toggleCss("ag-row-selected",i);const o=s.element;E_(o,i),o.contains(un(this.beans))&&t(s)})}announceAriaRowSelection(e){var o,r;if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),n=(o=this.beans.editSvc)==null?void 0:o.isEditing({rowNode:e});if(!e.selectable||n)return;const s=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);(r=this.beans.ariaAnnounce)==null||r.announceValue(s,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!cd(e)||!wa(this.gos)}updateRowSelectable(e,t){var i;const n=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:((i=this.isRowSelectable)==null?void 0:i.call(this,e))??!0;return this.setRowSelectable(e,n,t),n}setRowSelectable(e,t,n){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),n)return;if(Qc(this.gos)){const s=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:s??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){var i;let t=!1,n=!1;if(!((i=e.childrenAfterGroup)!=null&&i.length))return e.selectable?e.__selected:null;for(let s=0;s<e.childrenAfterGroup.length;s++){const o=e.childrenAfterGroup[s];let r=o.isSelected();if(!o.selectable){const a=this.calculateSelectedFromChildren(o);if(a===null)continue;r=a}switch(r){case!0:t=!0;break;case!1:n=!0;break;default:return}}if(!(t&&n))return t?!0:n?!1:e.selectable?e.__selected:null}selectRowNode(e,t,n,i="api"){const s=!e.selectable&&t,o=e.__selected===t;if(s||o)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a!=null&&a.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...x9(e,this.gos,"rowSelected"),event:n||null,source:i}),!0}isCellCheckboxSelection(e,t){const n=this.gos.get("rowSelection");if(n&&typeof n!="string"){const i=Lo(e)&&jl(n);return e.isColumnFunc(t,i)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,n,i){const{gos:s,selectionCtx:o}=this,r=e.isSelected(),a=Qc(s),l=J8(s),u=X8(s),c=this.isMultiSelect(),d=i==="rowClicked";if(d&&!(l||u))return null;if(t&&n&&c){const h=o.getRoot();if(h)if(h.isSelected()){const p=o.isInRange(e)?o.truncate(e):o.extend(e,a);return{deselect:p.discard,select:p.keep,reset:!1}}else{const p=o.extend(e,a);return{select:[],deselect:p.keep,reset:!1}}else return null}else if(t&&c){const h=o.selectAll?this.beans.rowModel.getRow(0):void 0,p=o.getRoot(h),g=o.isInRange(e)?o.truncate(e):o.extend(e,a);return{select:g.keep,deselect:g.discard,reset:o.selectAll||!!(p&&!p.isSelected())}}else if(n){if(d){const h=!r;return h&&!l||!h&&!u?null:(o.setRoot(e),{node:e,newValue:h,clearSelection:!1})}return o.setRoot(e),{node:e,newValue:!r,clearSelection:!c}}else{o.setRoot(e);const h=Q8(s),p=Yf(s)==="filteredDescendants",g=d&&(!h||!l);if(p&&r===void 0&&bn(s))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!c||g};if(d){const C=r?!h:l;return C===r&&!g||C&&!l||!C&&!u?null:{node:e,newValue:C,clearSelection:!c||g,keepDescendants:e.group&&a}}return{node:e,newValue:!r,clearSelection:!c||g}}}},Jy={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},EY=class extends ge{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:n,eBottomGuard:i,focusTrapActive:s,forceFocusOutWhenTabGuardsAreEmpty:o,isFocusableContainer:r,focusInnerElement:a,onFocusIn:l,onFocusOut:u,shouldStopEventPropagation:c,onTabKeyDown:d,handleKeyDown:h,isEmpty:p,eFocusableElement:g}=e;this.comp=t,this.eTopGuard=n,this.eBottomGuard=i,this.providedFocusInnerElement=a,this.eFocusableElement=g,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!o,this.isFocusableContainer=!!r,this.providedFocusIn=l,this.providedFocusOut=u,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=d,this.providedHandleKeyDown=h,this.providedIsEmpty=p}postConstruct(){this.createManagedBean(new eu(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards();for(const e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():Yl(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){var l;const t=Ln(this.beans),n=Yl(t.body,null,!0),i=n.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let s,o;e?(s=0,o=i):(s=i+1,o=n.length);const r=n.slice(s,o),a=this.gos.get("tabIndex");r.sort((u,c)=>{const d=Number.parseInt(u.getAttribute("tabindex")||"0"),h=Number.parseInt(c.getAttribute("tabindex")||"0");return h===a?1:d===a?-1:d===0?1:h===0?-1:d-h}),(l=r[e?r.length-1:0])==null||l.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const n=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),n&&(n.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=Yl(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return Fa(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},RY=class extends ge{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:n,eFocusableElement:i}=this,s=[t,n],o={setTabIndex:v=>{for(const S of s)v!=null?S.setAttribute("tabindex",v):S.removeAttribute("tabindex")}};this.addTabGuards(t,n);const{focusTrapActive:r=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:u,handleKeyDown:c,onTabKeyDown:d,shouldStopEventPropagation:h,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:g,isFocusableContainer:C}=e;this.tabGuardCtrl=this.createManagedBean(new EY({comp:o,focusTrapActive:r,eTopGuard:t,eBottomGuard:n,eFocusableElement:i,onFocusIn:a,onFocusOut:l,focusInnerElement:u,handleKeyDown:c,onTabKeyDown:d,shouldStopEventPropagation:h,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:g,isFocusableContainer:C}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Ln(this.beans).createElement("div"),n=e==="top"?Jy.TAB_GUARD_TOP:Jy.TAB_GUARD_BOTTOM;return t.classList.add(Jy.TAB_GUARD,n),dr(t,"presentation"),t}addTabGuards(e,t){const n=this.eFocusableElement;n.insertAdjacentElement("afterbegin",e),n.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];Gn(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,n){LC(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",t):e(t,n)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;Es(e),Es(t),super.destroy()}},W1=class extends $t{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new RY(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},DY=500,FY=550,Sp,TY=e=>{if(!Sp)Sp=new WeakSet;else if(Sp.has(e))return!1;return Sp.add(e),!0},Aa=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let n=this.eventSvc;if(!n){if(n===null)return;this.eventSvc=n=new va;const i=this.onTouchStart.bind(this);this.startListener=i,this.eElement.addEventListener("touchstart",i,{passive:!0})}n.addEventListener(e,t)}removeEventListener(e,t){var n;(n=this.eventSvc)==null||n.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!TY(e))return;const t=e.touches[0];this.touchStart=t;const n=this.handlers;if(!n.length){const i=this.eElement,s=i.ownerDocument,o=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l={passive:!0},u={passive:!1};Gf(n,[i,"touchmove",o,l],[s,"touchcancel",a,l],[s,"touchend",r,u],[s,"contextmenu",fr,u])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{var i;this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,(i=this.eventSvc)==null||i.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},FY)}onTouchMove(e){const{moved:t,touchStart:n}=this;if(!t&&n){const i=Kc(n,e.touches);i&&!M_(i,n,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){var n;const t=this.touchStart;!t||!Kc(t,e.changedTouches)||(this.moved||((n=this.eventSvc)==null||n.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&fr(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!Kc(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){var i;let t=Date.now();const n=this.lastTapTime;n&&t-n>DY&&((i=this.eventSvc)==null||i.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),BC(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}},xY=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return this.tickingInterval!==null}check(e,t=!1){const n=t||this.shouldSkipVerticalScroll();if(n&&this.shouldSkipHorizontalScroll())return;const i=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick;this.tickLeft=e.clientX<i.left+s,this.tickRight=e.clientX>i.right-s,this.tickUp=e.clientY<i.top+s&&!n,this.tickDown=e.clientY>i.bottom-s&&!n,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},_Y=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${G_}/${this.frameworkName}-data-grid`,H8(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}};function PY(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var AY=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],z1=Object.fromEntries(AY.map((e,t)=>[e,t]));function IY(e,t){const n=(e.beanName?z1[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,i=(t.beanName?z1[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return n-i}function kY(e,t){return(e==null?void 0:e.beanName)==="gridDestroySvc"?-1:(t==null?void 0:t.beanName)==="gridDestroySvc"?1:0}var OY={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},MY={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},LY={tag:"div",cls:"ag-header-viewport",role:"rowgroup",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"presentation"}]},Xy=class extends $t{constructor(e){super(),this.eCenterContainer=We,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:n=>this.setDisplayed(n),setCtrls:n=>this.setCtrls(n),setCenterWidth:n=>this.eCenterContainer.style.width=n,setViewportScrollLeft:n=>this.getGui().scrollLeft=n,setPinnedContainerWidth:n=>{const i=this.getGui();i.style.width=n,i.style.maxWidth=n,i.style.minWidth=n}};this.createManagedBean(new Jq(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",n=e?OY:t?MY:LY;this.setTemplate(n),this.eRowContainer=this.eCenterContainer!==We?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),e.getGui().remove()}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let n;const i=s=>{const o=s.getGui();o.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(o),n&&__(this.eRowContainer,o,n),n=o};for(const s of e){const o=s.instanceId,r=t[o];delete t[o];const a=r||this.createBean(new Kq(s));this.headerRowComps[o]=a,this.rowCompsList.push(a),i(a)}for(const s of Object.values(t))this.destroyRowComp(s)}},NY={tag:"div",cls:"ag-header",role:"presentation"},VY=class extends $t{constructor(){super(NY)}postConstruct(){const e={toggleCss:(i,s)=>this.toggleCss(i,s),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new Hq).setComp(e,this.getGui(),this.getFocusableElement());const n=i=>{this.createManagedBean(i),this.appendChild(i)};n(new Xy("left")),n(new Xy(null)),n(new Xy("right"))}},BY={selector:"AG-HEADER-ROOT",component:VY},HY=class extends $t{constructor(e,t,n,i,s){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=i;const o=En({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=o;let r;t.isCellSpanning()?(r=En({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(o),this.setTemplateFromElement(r)):this.setTemplateFromElement(o),this.cellCssManager=new RP(()=>o),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const a={toggleCss:(l,u)=>this.cellCssManager.toggleCss(l,u),setUserStyles:l=>zc(o,l),getFocusableElement:()=>o,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRenderDetails:(l,u,c)=>this.setRenderDetails(l,u,c),setEditDetails:(l,u,c)=>this.setEditDetails(l,u,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(l,u)=>this.refreshEditStyles(l,u)};t.setComp(a,o,r,this.eCellWrapper,n,s,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,n){var o;if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(n||s)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)),(o=this.rowDraggingComp)==null||o.refreshVisibility()}setEditDetails(e,t,n){e?this.createCellEditorInstance(e,t,n):this.destroyEditor()}removeControls(){const e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,n=t||this.forceWrapper,i=n&&this.eCellWrapper==null;i&&(this.eCellWrapper=En({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!n&&this.eCellWrapper!=null;s&&(Es(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!n);const o=!e&&n,r=o&&this.eCellValue==null;if(r){const u=this.cellCtrl.getCellValueClass();this.eCellValue=En({tag:"span",cls:u,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}const a=!o&&this.eCellValue!=null;a&&(Es(this.eCellValue),this.eCellValue=void 0);const l=i||s||r||a;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:n,includeRowDrag:i,includeDndSource:s,includeSelection:o}=this,r=a=>{a&&t.insertBefore(a.getGui(),n)};i&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),r(this.rowDraggingComp)),s&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),r(this.dndSourceComp)),o&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),r(this.checkboxSelectionComp))}createCellEditorInstance(e,t,n){const i=this.editorVersion,s=e.newAgStackInstance(),{params:o}=e;s.then(a=>this.afterCellEditorCreated(i,a,o,t,n)),on(this.cellEditor)&&o.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();Gn(t);const n=Vl(e);n!=null&&(t.textContent=n)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),Es(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){var n,i;const{context:e}=this.beans;(((n=this.cellEditorPopupWrapper)==null?void 0:n.getGui().contains(un(this.beans)))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),(i=this.hideEditorPopup)==null||i.call(this),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),Es(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){var n;if(((n=this.cellRenderer)==null?void 0:n.refresh)==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){var o;const t=this.rendererVersion,n=r=>a=>{if(this.rendererVersion!==t||!this.isAlive())return;const u=r.newAgStackInstance(),c=this.afterCellRendererCreated.bind(this,t,r.componentClass);u==null||u.then(c)},{animationFrameSvc:i}=this.beans;let s;if(i!=null&&i.active&&this.firstRender?s=(r,a=!1)=>{i.createTask(n(r),this.rowNode.rowIndex,"p2",r.componentFromFramework,a)}:s=r=>n(r)(),(o=e.params)!=null&&o.deferRender&&!this.cellCtrl.rowNode.group){const{loadingComp:r,onReady:a}=this.cellCtrl.getDeferLoadingCellRenderer();r&&(s(r),a.then(()=>s(e,!0)))}else s(e)}afterCellRendererCreated(e,t,n){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(n);return}this.cellRenderer=n,this.cellRendererClass=t;const s=n.getGui();if(this.cellRendererGui=s,s!=null){const o=this.getParentOfValue();Gn(o),o.appendChild(s)}}afterCellEditorCreated(e,t,n,i,s){var u,c,d;const o=e!==this.editorVersion,{context:r}=this.beans;if(o){r.destroyBean(t);return}if((u=t.isCancelBeforeStart)==null?void 0:u.call(t)){r.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){xe(97,{colId:this.column.getId()}),r.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const l=i||((c=t.isPopup)==null?void 0:c.call(t));l?this.addPopupCellEditor(n,s):this.addInCellEditor(),this.refreshEditStyles(!0,l),(d=t.afterGuiAttached)==null||d.call(t),this.cellCtrl.enableEditorTooltipFeature(t),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssManager:n}=this;n.toggleCss("ag-cell-inline-editing",e&&!t),n.toggleCss("ag-cell-popup-editing",e&&!!t),n.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){const{eCell:e}=this;e.contains(un(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),Gn(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){var y;const{gos:n,context:i,popupSvc:s,editSvc:o}=this.beans;n.get("editType")==="fullRow"&&xe(98);const r=this.cellEditorPopupWrapper=i.createBean(o.createPopupEditorWrapper(e)),{cellEditor:a,cellEditorGui:l,eCell:u,rowNode:c,column:d,cellCtrl:h}=this,p=r.getGui();l&&p.appendChild(l);const g=n.get("stopEditingWhenCellsLoseFocus"),C=t??((y=a.getPopupPosition)==null?void 0:y.call(a))??"over",v=n.get("enableRtl"),S={ePopup:p,column:d,rowNode:c,type:"popupCellEditor",eventSource:u,position:C,alignSide:v?"right":"left",keepWithinBounds:!0},R=s.positionPopupByComponent.bind(s,S),E=s.addPopup({modal:g,eChild:p,closeOnEsc:!0,closedCallback:()=>{h.onPopupEditorClosed()},anchorToElement:u,positionCallback:R,ariaOwns:u});E&&(this.hideEditorPopup=E.hideFunc)}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},GY=class extends $t{constructor(e,t,n){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const i=En({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(i,n),this.setTemplateFromElement(i);const s=i.style;this.domOrder=this.rowCtrl.getDomOrder();const o={setDomOrder:r=>this.domOrder=r,setCellCtrls:r=>this.setCellCtrls(r),showFullWidth:r=>this.showFullWidth(r),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,getFullWidthCellRendererParams:()=>this.fullWidthCellRendererParams,toggleCss:(r,a)=>this.toggleCss(r,a),setUserStyles:r=>zc(i,r),setTop:r=>s.top=r,setTransform:r=>s.transform=r,setRowIndex:r=>i.setAttribute("row-index",r),setRowId:r=>i.setAttribute("row-id",r),setRowBusinessKey:r=>i.setAttribute("row-business-key",r),refreshFullWidth:r=>{var l,u;const a=r();return this.fullWidthCellRendererParams=a,((u=(l=this.fullWidthCellRenderer)==null?void 0:l.refresh)==null?void 0:u.call(l,a))??!1}};e.setComp(o,this.getGui(),n,void 0),this.addDestroyFunc(()=>{e.unsetComp(n)})}setInitialStyle(e,t){const n=this.rowCtrl.getInitialTransform(t);if(n)e.style.setProperty("transform",n);else{const i=this.rowCtrl.getInitialRowTop(t);i&&e.style.setProperty("top",i)}}showFullWidth(e){const t=i=>{if(this.isAlive()){const s=i.getGui();this.getGui().appendChild(s),this.rowCtrl.setupDetailRowAutoHeight(s),this.setFullWidthRowComp(i,e.params)}else this.beans.context.destroyBean(i)};e.newAgStackInstance().then(t)}setCellCtrls(e){const t=new Map(this.cellComps);for(const n of e){const i=n.instanceId;this.cellComps.has(i)?t.delete(i):this.newCellComp(n)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const n of e){const i=this.cellComps.get(n.instanceId);i&&t.push(i.getGui())}P_(this.getGui(),t)}newCellComp(e){var i;const t=((i=this.beans.editSvc)==null?void 0:i.isEditing(e,{withOpenEditor:!0}))??!1,n=new HY(this.beans,e,this.rowCtrl.printLayout,this.getGui(),t);this.cellComps.set(e.instanceId,n),this.getGui().appendChild(n.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e,t){this.fullWidthCellRenderer=e,this.fullWidthCellRendererParams=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer),this.fullWidthCellRendererParams=void 0})}destroyCells(e){for(const t of e.values()){if(!t)return;const n=t.cellCtrl.instanceId;if(this.cellComps.get(n)!==t)return;t.detach(),t.destroy(),this.cellComps.delete(n)}}};function $Y(e,t,n){const i=!!n.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,s={tag:"div",ref:"eContainer",cls:yp(e),role:"rowgroup"};if(t.type==="center"||i){const o={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${uq(e)}`,role:"presentation"};return s.role="presentation",{tag:"div",ref:"eViewport",cls:`ag-viewport ${w1(e)}`,role:"rowgroup",children:[s,i?o:null]}}return s}var WY=class extends $t{constructor(e){super(),this.eViewport=We,this.eContainer=We,this.eSpannedContainer=We,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e==null?void 0:e.name,this.options=rd(this.name)}postConstruct(){this.setTemplate($Y(this.name,this.options,this.beans));const e={setHorizontalScroll:n=>this.eViewport.scrollLeft=n,setViewportHeight:n=>this.eViewport.style.height=n,setRowCtrls:({rowCtrls:n})=>this.setRowCtrls(n),setSpannedRowCtrls:n=>this.setRowCtrls(n,!0),setDomOrder:n=>{this.domOrder=n},setContainerWidth:n=>{this.eContainer.style.width=n,this.eSpannedContainer&&(this.eSpannedContainer.style.width=n)},setOffsetTop:n=>{const i=`translateY(${n})`;this.eContainer.style.transform=i,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=i)}};this.createManagedBean(new yq(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const{beans:n,options:i}=this,s=t?this.eSpannedContainer:this.eContainer,o=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},r={};t?this.rowCompsWithSpan=r:this.rowCompsNoSpan=r,this.lastPlacedElement=null;const a=[];for(const l of e){const u=l.instanceId,c=o[u];let d;if(c)d=c,delete o[u];else{if(!l.rowNode.displayed)continue;d=new GY(l,n,i.type)}r[u]=d,a.push([d,!c])}this.removeOldRows(Object.values(o)),this.addRowNodes(a,s)}addRowNodes(e,t){const{domOrder:n}=this;for(const[i,s]of e){const o=i.getGui();n?this.ensureDomOrder(o,t):s&&t.appendChild(o)}}removeOldRows(e){for(const t of e)t.getGui().remove(),t.destroy()}ensureDomOrder(e,t){__(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},zY={selector:"AG-ROW-CONTAINER",component:WY};function dd(e,t){return t.map(n=>{const i=`e${n[0].toUpperCase()+n.substring(1)}RowContainer`;return e[i]={name:n},{tag:"ag-row-container",ref:i,attrs:{name:n}}})}function UY(e){const t={},n={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:dd(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:dd(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:dd(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:dd(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:dd(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:n}}var jY=class extends $t{constructor(){super(...arguments),this.eGridRoot=We,this.eBodyViewport=We,this.eStickyTop=We,this.eStickyBottom=We,this.eTop=We,this.eBottom=We,this.eBody=We}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,n=e==null?void 0:e.getOverlayWrapperSelector(),{paramsMap:i,elementParams:s}=UY(!!n);this.setTemplate(s,[...n?[n]:[],Fq,_q,BY,zY],i);const o=(a,l)=>{const u=`${a}px`;l.style.minHeight=u,l.style.height=u},r={setRowAnimationCssOnBodyViewport:(a,l)=>this.setRowAnimationCssOnBodyViewport(a,l),setColumnCount:a=>t8(this.getGui(),a),setRowCount:a=>Qj(this.getGui(),a),setTopHeight:a=>o(a,this.eTop),setBottomHeight:a=>o(a,this.eBottom),setTopInvisible:a=>this.eTop.classList.toggle("ag-invisible",a),setBottomInvisible:a=>this.eBottom.classList.toggle("ag-invisible",a),setStickyTopHeight:a=>this.eStickyTop.style.height=a,setStickyTopTop:a=>this.eStickyTop.style.top=a,setStickyTopWidth:a=>this.eStickyTop.style.width=a,setStickyBottomHeight:a=>{this.eStickyBottom.style.height=a,this.eStickyBottom.classList.toggle("ag-invisible",a==="0px")},setStickyBottomBottom:a=>this.eStickyBottom.style.bottom=a,setStickyBottomWidth:a=>this.eStickyBottom.style.width=a,setColumnMovingCss:(a,l)=>this.toggleCss(a,l),updateLayoutClasses:(a,l)=>{const u=[this.eBodyViewport.classList,this.eBody.classList];for(const c of u)c.toggle(Fs.AUTO_HEIGHT,l.autoHeight),c.toggle(Fs.NORMAL,l.normal),c.toggle(Fs.PRINT,l.print);this.toggleCss(Fs.AUTO_HEIGHT,l.autoHeight),this.toggleCss(Fs.NORMAL,l.normal),this.toggleCss(Fs.PRINT,l.print)},setAlwaysVerticalScrollClass:(a,l)=>this.eBodyViewport.classList.toggle(E1,l),registerBodyViewportResizeListener:a=>{const l=hr(this.beans,this.eBodyViewport,a);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:a=>this.eTop.style.overflowY=this.eBottom.style.overflowY=a,setCellSelectableCss:(a,l)=>{for(const u of[this.eTop,this.eBodyViewport,this.eBottom])u.classList.toggle(a,l)},setBodyViewportWidth:a=>this.eBodyViewport.style.width=a,setGridRootRole:a=>dr(this.eGridRoot,a)};this.ctrl=this.createManagedBean(new Sq),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&Oo(this.gos)||Xc(this.gos))&&Xj(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const n=this.eBodyViewport.classList;n.toggle("ag-row-animation",t),n.toggle("ag-row-no-animation",!t)}},KY={selector:"AG-GRID-BODY",component:jY},qY=class extends ge{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,n){this.view=e,this.eGridHostDiv=t,this.eGui=n,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:i,ctrlsSvc:s}=this.beans;i==null||i.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new Iy(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const o=hr(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>o()),s.register("gridCtrl",this)}isDetailGrid(){var t;const e=NP(this.getGui());return((t=e==null?void 0:e.getAttribute("row-id"))==null?void 0:t.startsWith("detail"))||!1}getOptionalSelectors(){var t,n,i,s,o;const e=this.beans;return{paginationSelector:(t=e.pagination)==null?void 0:t.getPaginationSelector(),gridHeaderDropZonesSelector:(n=e.registry)==null?void 0:n.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:(i=e.sideBar)==null?void 0:i.getSelector(),statusBarSelector:(s=e.registry)==null?void 0:s.getSelector("AG-STATUS-BAR"),watermarkSelector:(o=e.licenseManager)==null?void 0:o.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){const{view:t}=this;if(e===!1)t.setCursor(null);else{const n=e===1?"ew-resize":"ns-resize";t.setCursor(n)}}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:n,nextIndex:i}=this.getNextFocusableIndex(t,e);if(i<0||i>=t.length)return!1;if(i===0){if(n>0){const{visibleCols:s,focusSvc:o}=this.beans,r=s.allCols,a=Zt(r);if(o.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[i],e)}focusInnerElement(e){const t=this.gos.getCallback("focusGridInnerElement");if(t!=null&&t({fromBottom:!!e}))return!0;const n=this.getFocusableContainers(),{focusSvc:i,visibleCols:s}=this.beans,o=s.allCols;if(e){if(n.length>1)return this.focusContainer(Zt(n),e);const r=Zt(o);if(i.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||Pa(this.beans)){if(i.focusGridView({column:o[0],backwards:e}))return!0;for(let r=1;r<n.length;r++)if(Da(n[r].getGui(),e))return!0;return!1}return i.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){var o;const t=this.view.getFocusableContainers(),{nextIndex:n,indexWithFocus:i}=this.getNextFocusableIndex(t,e);if(i===-1||n<0||n>=t.length)return;const s=t[n];(o=s.setAllowFocus)==null||o.call(s,!0),setTimeout(()=>{var r;(r=s.setAllowFocus)==null||r.call(s,!1)})}isFocusable(){var t,n;const e=this.beans;return!wp(e)||!Pa(e)||!!((n=(t=e.sideBar)==null?void 0:t.comp)!=null&&n.isDisplayed())}getNextFocusableIndex(e,t){const n=un(this.beans),i=e.findIndex(o=>o.getGui().contains(n)),s=i+(t?-1:1);return{indexWithFocus:i,nextIndex:s}}focusContainer(e,t){var i,s;(i=e.setAllowFocus)==null||i.call(e,!0);const n=Da(e.getGui(),t,!1,!0);return(s=e.setAllowFocus)==null||s.call(e,!1),n}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},YY=class extends W1{constructor(e){super(),this.gridBody=We,this.sideBar=We,this.pagination=We,this.rootWrapperBody=We,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:o=>this.addCss(o),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:o=>{this.getGui().style.userSelect=o??"",this.getGui().style.webkitUserSelect=o??""},setCursor:o=>{this.getGui().style.cursor=o??""}},t=this.createManagedBean(new qY),n=t.getOptionalSelectors(),i=this.createTemplate(n),s=[KY,...Object.values(n).filter(o=>!!o)];this.setTemplate(i,s),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:o=>t.focusInnerElement(o),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{e.remove(),pr(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const n=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:o}=Fs,{autoHeight:r,normal:a,print:l}=t;n.toggle(i,r),n.toggle(s,a),n.toggle(o,l),this.toggleCss(i,r),this.toggleCss(s,a),this.toggleCss(o,l)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,n=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,i=e.statusBarSelector?{tag:"ag-status-bar"}:null,s=e.watermarkSelector?{tag:"ag-watermark"}:null,o=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},n]},i,o,s]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){var t;if(!e&&((t=this.pagination)!=null&&t.isDisplayed())){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];for(const t of[this.sideBar,this.pagination])t&&e.push(t);return e.filter(t=>qs(t.getGui()))}},pt=(e,t)=>{for(const n of Object.keys(t))t[n]=e;return t},U1={dispatchEvent:"CommunityCore",...pt("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...pt("GridState",{getState:0,setState:0}),...pt("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...pt("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...pt("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...pt("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...pt("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...pt("ValueCache",{expireValueCache:0}),...pt("CellApi",{getCellValue:0}),...pt("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...pt("Sort",{onSortChanged:0}),...pt("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...pt("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...pt("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...pt("HighlightChanges",{flashCells:0}),...pt("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...pt("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...pt("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...pt("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...pt("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...pt("ColumnResize",{setColumnWidths:0}),...pt("ColumnHover",{isColumnHovered:0}),...pt("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...pt("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...pt("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...pt("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...pt("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...pt("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...pt("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...pt("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...pt("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0}),...pt("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...pt("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...pt("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...pt("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...pt("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...pt("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...pt("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...pt("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...pt("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...pt("ContextMenu",{showContextMenu:0}),...pt("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...pt("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...pt("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...pt("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...pt("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...pt("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...pt("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...pt("StatusBar",{getStatusPanel:0}),...pt("AiToolkit",{getStructuredSchema:0})},Qy={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},ZY=(e,t)=>e.eventSvc.dispatchEvent(t),j1=class{};Reflect.defineProperty(j1,"name",{value:"GridApi"});var JY=class extends ge{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new j1,this.fns={...Qy,dispatchEvent:ZY},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(U1))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){var s;const{fns:n,beans:i}=this;n!==Qy&&(n[e]=((s=i==null?void 0:i.validation)==null?void 0:s.validateApiFunction(e,t))??t)}makeApi(e){return{[e]:(...t)=>{const{beans:n,fns:{[e]:i}}=this;return i?i(n,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:n,preDestroyLink:i}=this;if(!t)xe(26,{fnName:e,preDestroyLink:i});else{const s=U1[e];n.assertModuleRegistered(s,`api.${e}`)&&xe(27,{fnName:e,module:s})}}destroy(){super.destroy(),this.fns=Qy,this.beans=null}};function XY(e){return e.context.getId()}function QY(e){e.gridDestroySvc.destroy()}function eZ(e){return e.gridDestroySvc.destroyCalled}function tZ(e,t){return e.gos.get(t)}function nZ(e,t,n){K1(e,{[t]:n})}function K1(e,t){e.gos.updateGridOptions({options:t})}function iZ(e,t){const n=t.replace(/Module$/,"");return e.gos.isModuleRegistered(n)}var sZ={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},oZ=class extends $t{constructor(e,t,n){super(sZ),this.rowNode=e,this.column=t,this.eCell=n}postConstruct(){this.getGui().appendChild(is("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:n,eCell:i,gos:s}=this,o=n.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(i,0,0),o){const a=dt(s,{rowNode:t,dragEvent:e});o(a)}else try{const a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};function rZ(e,t){var n,i;(i=(n=e.rowDragSvc)==null?void 0:n.rowDragFeature)==null||i.addRowDropZone(t)}function aZ(e,t){var i,s;const n=(i=e.dragAndDrop)==null?void 0:i.findExternalZone(t.getContainer());n&&((s=e.dragAndDrop)==null||s.removeDropTarget(n))}function lZ(e,t){var n,i;return(i=(n=e.rowDragSvc)==null?void 0:n.rowDragFeature)==null?void 0:i.getRowDropZone(t)}function uZ(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function cZ(e,t){const n=e.rowDropHighlightSvc;if(!n)return;const i=t==null?void 0:t.row;let s=t==null?void 0:t.dropIndicatorPosition;s!=="above"&&s!=="below"&&s!=="inside"&&(s="none");const o=i==null?void 0:i.rowIndex;o==null||s==="none"?n.clear():n.set(i,s)}var dZ=class extends R9{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},hZ=class extends ge{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:n}=this.beans;return n.addDragSource(t),()=>n.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const n=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(n)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},fZ={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},pZ=class extends $t{constructor(e,t,n,i,s,o=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=n,this.customGui=i,this.dragStartPixels=s,this.alwaysVisible=o,this.dragSource=null}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(fZ),this.getGui().appendChild(is("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,gos:t,rowNode:n}=this,i=this.refreshVisibility.bind(this);this.addManagedPropertyListener("suppressRowDrag",i),this.addManagedListeners(n,{dataChanged:i,cellChanged:i}),this.addManagedListeners(e.eventSvc,t.get("rowDragManaged")?{sortChanged:i,filterChanged:i,columnRowGroupChanged:i,newColumnsLoaded:i}:{newColumnsLoaded:i})}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const e={skipAriaHidden:!0};if(this.isNeverDisplayed()){this.setDisplayed(!1,e);return}const t=this.column;let n=typeof(t==null?void 0:t.getColDef().rowDrag)=="function",i=!t||this.isCustomGui()||t.isRowDrag(this.rowNode);i&&this.rowNode.footer&&this.gos.get("rowDragManaged")&&(i=!1,n=!0),this.setDisplayed(n||i,e),this.setVisible(i,e)}isNeverDisplayed(){var n,i;const{gos:e,beans:t}=this;return!!(e.get("suppressRowDrag")||e.get("rowDragManaged")&&((n=t.rowDragSvc.rowDragFeature)!=null&&n.shouldPreventRowMove())&&!((i=t.dragAndDrop)!=null&&i.hasExternalDropZones()))}getSelectedNodes(){var i;const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const n=((i=this.beans.selectionSvc)==null?void 0:i.getSelectedNodes())??[];return n.indexOf(e)!==-1?n:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:i=>{i==null||i.preventDefault()}})[0]);const n=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:i=>{var a,l;const s=(i==null?void 0:i.dragItem)||this.getDragItem(),o=(((a=i==null?void 0:i.dropTarget)==null?void 0:a.rows.length)??((l=s.rowNodes)==null?void 0:l.length))||1,r=this.getRowDragText(this.column);return r?r(s,o):o===1?this.cellValueFn():`${o} ${n("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},Ep=class{constructor(){this.reordered=!1,this.removals=new Set,this.updates=new Set,this.adds=new Set}};function gZ(e){const{rowIndex:t,rowPinned:n,column:i}=e;return`${t}.${n??"null"}.${i.getId()}`}function q1(e,t){const n=e.column===t.column,i=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return n&&i&&s}function mZ(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(ze(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function vZ(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function CZ(e){let t=0,n;const{pinnedRowModel:i,rowModel:s,pageBounds:o}=e;return i!=null&&i.getPinnedTopRowCount()?n="top":s.getRowCount()?(n=null,t=o.getFirstRow()):i!=null&&i.getPinnedBottomRowCount()&&(n="bottom"),n===void 0?null:{rowIndex:t,rowPinned:n}}function yZ(e){let t,n=null;const{pinnedRowModel:i,pageBounds:s}=e,o=i==null?void 0:i.getPinnedBottomRowCount(),r=i==null?void 0:i.getPinnedTopRowCount();return o?(n="bottom",t=o-1):e.rowModel.getRowCount()?t=s.getLastRow():r&&(n="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:n}}function $o(e,t){var n,i;switch(t.rowPinned){case"top":return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t.rowIndex);case"bottom":return(i=e.pinnedRowModel)==null?void 0:i.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function nu(e,t){var s;const n=(s=e.spannedRowRenderer)==null?void 0:s.getCellByPosition(t);if(n)return n;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function wZ(e,t,n){const{rowModel:i,pinnedRowModel:s}=e;let o;return o??(o=i==null?void 0:i.getRowNode(t)),n?o??(o=s==null?void 0:s.getPinnedRowById(t,n)):(o??(o=s==null?void 0:s.getPinnedRowById(t,"top")),o??(o=s==null?void 0:s.getPinnedRowById(t,"bottom"))),o}function Rp(e,t,n=!1){const{rowIndex:i,rowPinned:s}=t,{pageBounds:o,pinnedRowModel:r,rowModel:a}=e;if(i===0)return s==="top"?null:s==="bottom"&&a.isRowsToRender()?{rowIndex:o.getLastRow(),rowPinned:null}:r!=null&&r.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(n){const l=s?void 0:a.getRow(i);return Z1(e,l,!0)??{rowIndex:i-1,rowPinned:s}}return{rowIndex:i-1,rowPinned:s}}function Y1(e,t,n=!1){const{rowIndex:i,rowPinned:s}=t,{pageBounds:o,pinnedRowModel:r,rowModel:a}=e;if(bZ(e,t))return s==="bottom"?null:s==="top"&&a.isRowsToRender()?{rowIndex:o.getFirstRow(),rowPinned:null}:r!=null&&r.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(n){const l=s?void 0:a.getRow(i);return Z1(e,l)??{rowIndex:i+1,rowPinned:s}}return{rowIndex:i+1,rowPinned:s}}function Z1(e,t,n=!1){const{gos:i,rowRenderer:s}=e;if(!(t!=null&&t.sticky)||!Q_(i))return;const o=s.getStickyTopRowCtrls(),r=s.getStickyBottomRowCtrls(),a=!r.some(d=>d.rowNode.rowIndex===t.rowIndex),l=a?o:r,u=(n?-1:1)*(a?-1:1);let c;for(let d=0;d<l.length;d++)if(l[d].rowNode.rowIndex===t.rowIndex){c=l[d+u];break}return c?{rowIndex:c.rowNode.rowIndex,rowPinned:null}:void 0}function bZ(e,t){const{rowPinned:n,rowIndex:i}=t,{pinnedRowModel:s,pageBounds:o}=e;return n==="top"?((s==null?void 0:s.getPinnedTopRowCount())??0)-1<=i:n==="bottom"?((s==null?void 0:s.getPinnedBottomRowCount())??0)-1<=i:o.getLastRow()<=i}var hd=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}depthFirstSearchChangedPath(e,t){const{rowNode:n,children:i}=e;if(i)for(let s=0;s<i.length;++s)this.depthFirstSearchChangedPath(i[s],t);t(n)}depthFirstSearchEverything(e,t,n){const i=e.childrenAfterGroup;if(i)for(let s=0,o=i.length;s<o;++s){const r=i[s];r.childrenAfterGroup?this.depthFirstSearchEverything(r,t,n):n&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,n=!1){this.active&&!n?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,n=0;for(;!this.mapToItems[t.id];){const i={rowNode:t,children:null};this.mapToItems[t.id]=i,n++,t=t.parent}return n}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let n=e;for(;n;){this.nodeIdsToColumns[n.id]||(this.nodeIdsToColumns[n.id]={});for(const i of t)this.nodeIdsToColumns[n.id][i.getId()]=!0;n=n.parent}}linkPathItems(e,t){let n=e;for(let i=0;i<t;i++){const s=this.mapToItems[n.id],o=this.mapToItems[n.parent.id];o.children||(o.children=[]),o.children.push(s),n=n.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const n=this.createPathItems(e);this.linkPathItems(e,n),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const n=this.nodeIdsToColumns[e.id];return t.filter(s=>n[s.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const n=this.nodeIdsToColumns[e.id];return t.filter(s=>!n[s.getId()])}},SZ=class{constructor(e,t){this.beans=e,this.groupThrottled=!1,this.scrollChanged=!1,this.scrollChanging=!1,this.oldVScroll=null,this.groupTimer=null,this.groupTarget=null,this.onGroupThrottle=()=>{var i;this.groupTimer=null,this.groupThrottled=!0,(i=this.beans.dragAndDrop)==null||i.nudge()};const n=()=>t.scrollFeature.getVScrollPosition().top;this.autoScroll=new xY({scrollContainer:t.eBodyViewport,scrollAxis:"y",getVerticalPosition:n,setVerticalPosition:i=>t.scrollFeature.setVerticalScrollPosition(i),onScrollCallback:()=>{var o;const i=n();if(this.oldVScroll!==i){this.oldVScroll=i,this.scrollChanging=!0;return}const s=this.scrollChanging;this.scrollChanged=s,this.scrollChanging=!1,s&&((o=this.beans.dragAndDrop)==null||o.nudge(),this.scrollChanged=!1)}})}updateGroup(e,t){var n,i;this.groupTarget&&this.groupTarget!==e&&this.clearGroup(),e&&(t&&this.groupThrottled&&!e.expanded&&((n=e.childrenAfterSort)!=null&&n.length)&&e.isExpandable()&&e.setExpanded(!0,void 0,!0),e.expanded&&((i=e.childrenAfterSort)!=null&&i.length)&&(this.groupThrottled=!0,this.groupTarget=e))}startGroup(e){this.groupTarget=e,this.groupTimer===null&&(this.groupTimer=window.setTimeout(this.onGroupThrottle,this.beans.gos.get("rowDragInsertDelay")))}clearGroup(){this.groupThrottled=!1,this.groupTarget=null;const e=this.groupTimer;e!==null&&(this.groupTimer=null,window.clearTimeout(e))}clear(){this.clearGroup(),this.autoScroll.ensureCleared(),this.oldVScroll=null,this.scrollChanged=!1,this.scrollChanging=!1}},EZ=class extends ge{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.nudger=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{this.nudger=new SZ(e,t.gridBodyCtrl)})}destroy(){var e;super.destroy(),(e=this.nudger)==null||e.clear(),this.nudger=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){var t;return((t=e==null?void 0:e.dropTarget)==null?void 0:t.allowed)===!1||this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){const{rowGroupColsSvc:e,filterManager:t,sortSvc:n}=this.beans;return!!(((e==null?void 0:e.columns)??[]).length||(t==null?void 0:t.isAnyFilterPresent())||(n==null?void 0:n.isSortActive()))}getRowNodes(e){var n;if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const i=(n=this.beans.selectionSvc)==null?void 0:n.getSelectedNodes();if(i&&i.indexOf(t)>=0)return i.slice().sort(FZ)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){var r,a,l,u;const{lastDraggingEvent:n,beans:i}=this;if(t){const c=this.getRowNodes(e);e.dragItem.rowNodes=c,Q1(c,!0)}this.lastDraggingEvent=e;const s=e.fromNudge,o=this.makeRowsDrop(n,e,s,!1);(r=i.rowDropHighlightSvc)==null||r.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e),o!=null&&o.rowDragManaged&&o.moved&&o.allowed&&o.sameGrid&&!o.suppressMoveWhenRowDragging&&(!s&&!((a=this.nudger)!=null&&a.autoScroll.scrolling)||(l=this.nudger)!=null&&l.scrollChanged)&&this.dropRows(o),(u=this.nudger)==null||u.autoScroll.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,n,i){var E,y;const{beans:s,gos:o}=this,r=this.newRowsDrop(t,i),a=s.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:l,rootNode:u,source:c,target:d,rows:h}=r;d??(d=a.getRow(a.getRowCount()-1)??null);const p=!!((E=this.beans.groupStage)!=null&&E.treeData)&&l;let g=null;if(d!=null&&d.footer){const b=Dp(a,-1,d)??Dp(a,1,d);g=d.sibling??u,d=b??null}d!=null&&d.detail&&(d=d.parent),r.moved&&(r.moved=c!==d);let C=.5;if(d&&(l&&r.moved&&(g||!p)?C=c.rowIndex>d.rowIndex?-.5:.5:C=(r.y-d.rowTop-d.rowHeight/2)/d.rowHeight||0),!p&&l&&d&&r.moved&&bn(o)){const b=TZ(a,r);b&&(C=c.rowIndex>b.rowIndex?-.5:.5,d=b,r.moved&&(r.moved=c!==d))}const v=this.nudger;v==null||v.updateGroup(d,n),p&&!g&&v&&(!d||C>=.5&&d.rowIndex===s.pageBounds.getLastRow()?g=u:r.moved&&this.targetShouldBeParent(d,C,h)&&(v.groupThrottled&&(g=d),!n&&(!g||d&&!d.expanded&&((y=d.childrenAfterSort)!=null&&y.length))&&v.startGroup(d)),g??(g=(d==null?void 0:d.parent)??u));let S=!1;if(g){if(g===d&&g!==u){const b=g.expanded?Dp(a,1,d):null;(b==null?void 0:b.parent)===g?(d=b,C=-.5):S=!0}if(d&&!S){let b=d;for(;b&&b!==u&&b!==g;)d=b,b=b.parent}}r.target=d,r.newParent=g,r.moved&&(r.moved=c!==d);const R=C<0?"above":"below";return r.position=r.moved?S?"inside":R:"none",this.validateRowsDrop(r,p,R,i),t.changed||(t.changed=DZ(e==null?void 0:e.dropTarget,r)),r}newRowsDrop(e,t){const{beans:n,gos:i}=this,s=n.rowModel.rootNode,o=bn(i)?i.get("rowDragManaged"):!1,r=i.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:u}=e.dragItem;if(u||(u=l?[l]:[]),l||(l=u[0]),!l||!s)return null;const c=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let d=!0;o&&(!u.length||this.shouldPreventRowMove()||(r||!a)&&!c)&&(d=!1);const h=R1(n,e).y,p=this.getOverNode(h);return{api:n.gridApi,context:n.gridOptions.context,draggingEvent:e,rowDragManaged:o,suppressMoveWhenRowDragging:r,sameGrid:a,withinGrid:c,rootNode:s,moved:l!==p,y:h,overNode:p,overIndex:(p==null?void 0:p.rowIndex)??-1,position:"none",source:l,target:p??null,newParent:null,rows:u,allowed:d,highlight:!t&&o&&r&&(c||!a)}}validateRowsDrop(e,t,n,i){const{rowDragManaged:s,suppressMoveWhenRowDragging:o}=e;t||(e.newParent=null),o&&!e.moved&&(e.allowed=!1);const r=(!s||e.allowed)&&this.gos.get("isRowValidDropPosition");if(r){t&&e.newParent&&J1(e.rows,e.newParent)&&(e.newParent=null);const a=r(e);if(!a)e.allowed=!1;else if(typeof a=="object"){a.rows!==void 0&&(e.rows=a.rows??[]),t&&a.newParent!==void 0&&(e.newParent=a.newParent),a.target!==void 0&&(e.target=a.target),a.position&&(e.position=a.position),a.allowed!==void 0?e.allowed=a.allowed:s||(e.allowed=!0);const l=e.draggingEvent;a.changed&&l&&(l.changed=!0),!i&&a.highlight!==void 0&&(e.highlight=a.highlight)}}s&&(e.rows=this.filterRows(e)),t&&e.newParent&&J1(e.rows,e.newParent)&&(e.newParent=null),o&&(!e.rows.length||e.position==="none")&&(e.allowed=!1),(!e.allowed||!e.newParent)&&e.position==="inside"&&(e.position=n)}targetShouldBeParent(e,t,n){const i=e.rowIndex,s=.25;if(t<-.5+s)return!1;if(t<.5-s)return!0;let o,r=i+1;const a=this.beans.rowModel;do o=a.getRow(r++);while(o!=null&&o.footer);const l=e.childrenAfterGroup;if(o&&o.parent===e&&(l!=null&&l.length)){const u=new Set(n);for(const c of l)if(c.rowIndex!==null&&!u.has(c))return!0}return!1}addRowDropZone(e){if(!e.getContainer()){xe(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){xe(56);return}const n=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(s=>e.onDragEnter(this.rowDragEvent("rowDragEnter",s))),onDragLeave:e.onDragLeave&&(s=>e.onDragLeave(this.rowDragEvent("rowDragLeave",s))),onDragging:e.onDragging&&(s=>e.onDragging(this.rowDragEvent("rowDragMove",s))),onDragStop:e.onDragStop&&(s=>e.onDragStop(this.rowDragEvent("rowDragEnd",s))),onDragCancel:e.onDragCancel&&(s=>e.onDragCancel(this.rowDragEvent("rowDragCancel",s)))},i={isInterestedIn:s=>s===2,getIconName:()=>"move",external:!0,...n};t.addDropTarget(i),this.addDestroyFunc(()=>t.removeDropTarget(i))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:n=>{var i;this.onDragEnter(n),(i=e==null?void 0:e.onDragEnter)==null||i.call(e,this.rowDragEvent("rowDragEnter",n))},onDragLeave:n=>{var i;this.onDragLeave(n),(i=e==null?void 0:e.onDragLeave)==null||i.call(e,this.rowDragEvent("rowDragLeave",n))},onDragging:n=>{var i;this.onDragging(n),(i=e==null?void 0:e.onDragging)==null||i.call(e,this.rowDragEvent("rowDragMove",n))},onDragStop:n=>{var i;this.onDragStop(n),(i=e==null?void 0:e.onDragStop)==null||i.call(e,this.rowDragEvent("rowDragEnd",n))},onDragCancel:n=>{var i;this.onDragCancel(n),(i=e==null?void 0:e.onDragCancel)==null||i.call(e,this.rowDragEvent("rowDragCancel",n))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:n}=this.beans,s=e>t.getCurrentPagePixelRange().pageLastPixel?-1:n.getRowIndexAtPixel(e);return s>=0?n.getRow(s):void 0}rowDragEvent(e,t){const n=this.beans,{dragItem:i,dropTarget:s,event:o,vDirection:r}=t,a=(s==null?void 0:s.rootNode)===n.rowModel.rootNode,l=a?s.y:R1(n,t).y,u=a?s.overNode:this.getOverNode(l),c=a?s.overIndex:(u==null?void 0:u.rowIndex)??-1;return{api:n.gridApi,context:n.gridOptions.context,type:e,event:o,node:i.rowNode,nodes:i.rowNodes,overIndex:c,overNode:u,y:l,vDirection:r,rowsDrop:s}}dispatchGridEvent(e,t){const n=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(n)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e)}onDragStop(e){var n;const t=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),t!=null&&t.allowed&&t.rowDragManaged&&(t.suppressMoveWhenRowDragging||!t.sameGrid||(n=this.nudger)!=null&&n.autoScroll.scrolling)&&this.dropRows(t),this.stopDragging(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e)}stopDragging(e){var t,n;(t=this.nudger)==null||t.clear(),(n=this.beans.rowDropHighlightSvc)==null||n.fromDrag(null),Q1(e.dragItem.rowNodes,!1)}dropRows(e){return e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:n}){const i=Ul(this.gos),s=this.beans.rowModel,o=n.filter(({data:a,rowPinned:l})=>!s.getRowNode((i==null?void 0:i({data:a,level:0,rowPinned:l}))??a.id)).map(({data:a})=>a);if(o.length===0)return!1;const r=t?X1(t)+(e==="above"?0:1):void 0;return s.updateRowData({add:o,addIndex:r}),!0}filterRows({newParent:e,rows:t}){let n;for(let i=0,s=t.length;i<s;++i){let o=!0;const r=t[i];(!r||r.footer||r.rowTop===null&&r!==this.beans.rowModel.getRowNode(r.id)||e&&r.parent!==e&&RZ(r,e)||!ew(r))&&(o=!1),o?n==null||n.push(r):n??(n=t.slice(0,i))}return n??t}csrmMoveRows({position:e,target:t,rows:n,newParent:i,rootNode:s}){let o=!1;const r=new Set;for(const h of n){i&&h.parent!==i&&(h.treeParent=i,o=!0);const p=ew(h);p&&r.add(p)}if(!o&&r.size===0)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),u=l&&nu(this.beans,l);if(r.size&&this.reorderLeafChildren(r,...this.getMoveRowsBounds(r,t,e==="above"))&&(o=!0),!o)return!1;const c=this.beans.rowModel,d=new Ep;return d.reordered=!0,c.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedPath:new hd(!1,s),changedRowNodes:d}),u?u.focusCell():a.clearFocusedCell(),!0}getMoveRowsBounds(e,t,n){var a,l;const i=((l=(a=this.beans.rowModel.rootNode)==null?void 0:a._leafs)==null?void 0:l.length)??0;let s=t?X1(t):-1;s<0||s>=i?s=i:n||++s;let o=s,r=Math.min(s,i-1);for(const u of e){const c=u.sourceRowIndex;c<o&&(o=c),c>r&&(r=c)}return[o,s,r]}reorderLeafChildren(e,t,n,i){var l;let s=!1;const o=(l=this.beans.rowModel.rootNode)==null?void 0:l._leafs;if(!e.size||!o)return!1;let r=t;for(let u=t;u<n;++u){const c=o[u];e.has(c)||(c.sourceRowIndex!==r&&(c.sourceRowIndex=r,o[r]=c,s=!0),++r)}let a=i;for(let u=i;u>=n;--u){const c=o[u];e.has(c)||(c.sourceRowIndex!==a&&(c.sourceRowIndex=a,o[a]=c,s=!0),--a)}for(const u of e)u.sourceRowIndex!==r&&(u.sourceRowIndex=r,o[r]=u,s=!0),++r;return s}},Dp=(e,t,n)=>{if(n){const i=e.getRowCount();let s=n.rowIndex+t;for(;s>=0&&s<i;){const o=e.getRow(s);if(!o||!o.footer&&!o.detail)return o;s+=t}}},RZ=(e,t)=>{let n=t;for(;n;){if(n===e)return!0;n=n.parent}return!1},J1=(e,t)=>{for(let n=0,i=e.length;n<i;++n)if(e[n].parent!==t)return!1;return!0},X1=e=>{const t=ew(e);return t!==void 0?t.sourceRowIndex:-1},ew=e=>e.data?e:s1(e.childrenAfterGroup),DZ=(e,t)=>e!==t&&(!e||e.sameGrid!==t.sameGrid||e.allowed!==t.allowed||e.position!==t.position||e.target!==t.target||e.source!==t.source||e.newParent!==t.newParent||!vr(e.rows,t.rows)),FZ=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,Q1=(e,t)=>{for(let n=0,i=(e==null?void 0:e.length)||0;n<i;++n){const s=e[n];s.dragging!==t&&(s.dragging=t,s.dispatchRowEvent("draggingChanged"))}},TZ=(e,t)=>{let n=null,i=t.target;if(i&&t.rows.indexOf(i)<0)return null;const s=t.source;if(!i||!s)return null;let o=i.rowIndex-s.rowIndex;const r=o<0?-1:1;o=t.suppressMoveWhenRowDragging?Math.abs(o):1;const a=new Set(t.rows);do{const l=Dp(e,r,i);if(!l)break;a.has(l)||(n=l,--o),i=l}while(o>0);return n},xZ=class extends ge{constructor(){super(...arguments),this.beanName="rowDragSvc"}setupRowDrag(e,t){const n=t.createManagedBean(new EZ(e)),i=this.beans.dragAndDrop;i.addDropTarget(n),t.addDestroyFunc(()=>i.removeDropTarget(n)),this.rowDragFeature=n}createRowDragComp(e,t,n,i,s,o){return new pZ(e,t,n,i,s,o)}createRowDragCompForRow(e,t){if(Oo(this.gos))return;const n=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${n("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,n,i,s,o){const r=this.gos;return r.get("rowDragManaged")&&(!bn(r)||r.get("pagination"))?void 0:this.createRowDragComp(n,e,t,i,s,o)}},_Z=class extends ge{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;!e||(e==null?void 0:e.rowIndex)===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const n=e!==this.row,i=e.uiLevel,s=t!==this.position,o=i!==this.uiLevel;this.dragging=!1,(n||s||o)&&(n&&this.clear(),this.uiLevel=i,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e==null?void 0:e.dropTarget;if(t){const{highlight:n,target:i,position:s}=t;if(n&&i&&s!=="none"){this.set(i,s),this.dragging=!0;return}}this.dragging&&this.clear()}},eA={moduleName:"Drag",version:$e,beans:[dZ]},PZ={moduleName:"DragAndDrop",version:$e,dynamicBeans:{dndSourceComp:oZ},icons:{rowDrag:"grip"}},tA={moduleName:"SharedDragAndDrop",version:$e,beans:[F9],dependsOn:[eA],userComponents:{agDragAndDropImage:rY},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},AZ={moduleName:"RowDrag",version:$e,beans:[_Z,xZ],apiFunctions:{addRowDropZone:rZ,removeRowDropZone:aZ,getRowDropZoneParams:lZ,getRowDropPositionIndicator:uZ,setRowDropPositionIndicator:cZ},dependsOn:[tA]},IZ={moduleName:"HorizontalResize",version:$e,beans:[hZ],dependsOn:[eA]},kZ=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",OZ=class extends ge{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:n,executeLaterFuncs:i}=this;if(n.length===0&&i.length===0){e(),t();return}const s=o=>{for(;o.length;){const r=o.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),s(n)},0),window.setTimeout(()=>{t(),s(i)},200)})}};function MZ(e,t,n){var i;(i=e.colMoves)==null||i.moveColumnByIndex(t,n,"api")}function LZ(e,t,n){var i;(i=e.colMoves)==null||i.moveColumns(t,n,"api")}var NZ=class extends ge{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const n of t)n.isPrimary()&&(n.isAnyFunctionActive()||(n.isAllowValue()?this.columnsToAggregate.push(n):n.isAllowRowGroup()?this.columnsToGroup.push(n):n.isAllowPivot()&&this.columnsToPivot.push(n)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:n,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&(t==null||t.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop")),this.columnsToGroup.length>0&&(n==null||n.addColumns(this.columnsToGroup,"toolPanelDragAndDrop")),this.columnsToPivot.length>0&&(i==null||i.addColumns(this.columnsToPivot,"toolPanelDragAndDrop"))}onDragCancel(){this.clearColumnsList()}};function VZ(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,s)=>{const o=e.indexOf(i),r=e.indexOf(s);return o-r})}function BZ(e){var n;const t=[...e];for(const i of e){let s=null,o=i.getParent();for(;o!=null&&o.getDisplayedLeafColumns().length===1;)s=o,o=o.getParent();if(s!=null){const a=!!((n=s.getColGroupDef())!=null&&n.marryChildren)?s.getProvidedColumnGroup().getLeafColumns():s.getLeafColumns();for(const l of a)t.includes(l)||t.push(l)}}return t}function HZ(e,t,n,i){const s=i.allCols;let o=null,r=null;for(let a=0;a<e.length;a++){const l=e[a],u=n.getProposedColumnOrder(t,l);if(!n.doesOrderPassRules(u))continue;const c=u.filter(h=>s.includes(h));if(r===null)r=c;else if(!vr(c,r))break;const d=$Z(u);(o===null||d<o.fragCount)&&(o={move:l,fragCount:d})}return o}function nA(e){const{isFromHeader:t,fromLeft:n,xPosition:i,fromEnter:s,fakeEvent:o,pinned:r,gos:a,colModel:l,colMoves:u,visibleCols:c}=e;let{allMovingColumns:d}=e;t&&(d=BZ(d));const h=d.slice();VZ(l.getCols(),h);const p=zZ({movingCols:h,draggingRight:n,xPosition:i,pinned:r,gos:a,colModel:l,visibleCols:c}),g=GZ(h,l);if(p.length===0)return;const C=p[0];if(g!==null&&(t||!s)&&!o&&(!n&&C>=g||n&&C<=g))return;const S=HZ(p,h,u,c);if(!S)return;const R=S.move;if(!(R>l.getCols().length-h.length))return{columns:h,toIndex:R}}function iA(e){const{columns:t,toIndex:n}=nA(e)||{},{finished:i,colMoves:s}=e;return!t||n==null?null:(s.moveColumns(t,n,"uiColumnMoved",i),i?null:{columns:t,toIndex:n})}function GZ(e,t){const n=t.getCols(),i=e.map(l=>n.indexOf(l)).sort((l,u)=>l-u),s=i[0];return Zt(i)-s!==i.length-1?null:s}function $Z(e){function t(i){const s=[];let o=i.getOriginalParent();for(;o!=null;)s.push(o),o=o.getOriginalParent();return s}let n=0;for(let i=0;i<e.length-1;i++){let s=t(e[i]),o=t(e[i+1]);[s,o]=s.length>o.length?[s,o]:[o,s];for(const r of s)o.indexOf(r)===-1&&n++}return n}function WZ(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function zZ(e){const{movingCols:t,draggingRight:n,xPosition:i,pinned:s,gos:o,colModel:r,visibleCols:a}=e;if(o.get("suppressMovableColumns")||t.some(E=>E.getColDef().suppressMovable))return[];const u=WZ(a,s),c=r.getCols(),d=u.filter(E=>t.includes(E)),h=u.filter(E=>!t.includes(E)),p=c.filter(E=>!t.includes(E));let g=0,C=i;if(n){let E=0;for(const y of d)E+=y.getActualWidth();C-=E}if(C>0){for(let E=0;E<h.length;E++){const y=h[E];if(C-=y.getActualWidth(),C<0)break;g++}n&&g++}let v;if(g>0){const E=h[g-1];v=p.indexOf(E)+1}else v=p.indexOf(h[0]),v===-1&&(v=0);const S=[v],R=(E,y)=>E-y;if(n){let E=v+1;const y=c.length-1;for(;E<=y;)S.push(E),E++;S.sort(R)}else{let E=v;const y=c.length-1;let b=c[E];for(;E<=y&&u.indexOf(b)<0;)E++,S.push(E),b=c[E];E=v-1;const F=0;for(;E>=F;)S.push(E),E--;S.sort(R).reverse()}return S}function tw(e){var u;const{pinned:t,fromKeyboard:n,gos:i,ctrlsSvc:s,useHeaderRow:o,skipScrollPadding:r}=e;let a=(u=s.getHeaderRowContainerCtrl(t))==null?void 0:u.eViewport,{x:l}=e;return a?(n&&(l-=a.getBoundingClientRect().left),i.get("enableRtl")&&(o&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=s.get("center").getCenterViewportScrollLeft()),l):0}function nw(e,t){for(const n of e)n.moving=t,n.dispatchColEvent("movingChanged","uiColumnMoved")}var sA=7,iw=100,Fp=iw/2,UZ=5,jZ=100,KZ=class extends ge{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!ze(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:n}=t||{},i=(n==null?void 0:n.columns)??[];for(const s of i){const o=s.getPinned();if(s.getColDef().lockPinned){if(o==e)return"move";continue}const r=n==null?void 0:n.containerType;if(r===e||!e)return"move";if(e&&(!o||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,n=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(n,!0,"uiColumnDragged");else{const s=t.visibleState,o=(n||[]).filter(r=>s[r.getId()]&&!r.isVisible());this.setColumnsVisible(o,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(n,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,n=!1,i=!1){const{gos:s,ctrlsSvc:o}=this.beans,r=s.get("suppressMoveWhenColumnDragging");if(i&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&on(e.hDirection))return;const a=tw({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:o});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,n,a,i):this.handleColumnDragWhileAllowingMovement(e,t,n,a,i)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,n){if(!(e!=null&&e.length))return;const i=e.filter(s=>!s.getColDef().lockVisible);i.length&&this.beans.colModel.setColsVisible(i,t,n)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:n}=e;this.beans.colMoves.moveColumns(t,n,"uiColumnMoved",!0)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,n,i,s){const o=this.getAllMovingColumns(e,!0);if(s){const r=this.isAttemptingToPin(o);r&&this.attemptToPinColumns(o,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(o,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:o,xPosition:l,fromEnter:t,fakeEvent:n,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(o,i)}}handleColumnDragWhileAllowingMovement(e,t,n,i,s){const o=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:o,isFromHeader:a,xPosition:i,fromLeft:r,fromEnter:t,fakeEvent:n}),u=iA({...l,finished:s});u&&(this.lastMovedInfo=u)}getAllMovingColumns(e,t=!1){const n=e.dragSource.getDragItem();let i=null;t?(i=n.columnsInSplit,i||(i=n.columns)):i=n.columns;const s=o=>o.getColDef().lockPinned?o.getPinned()==this.pinned:!0;return i?i.filter(s):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:n,xPosition:i,fromLeft:s,fromEnter:o,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:u,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:n,fromLeft:s,xPosition:i,pinned:this.pinned,fromEnter:o,fakeEvent:r,gos:a,colModel:l,colMoves:u,visibleCols:c}}highlightHoveredColumn(e,t){var c;const{gos:n,colModel:i}=this.beans,s=n.get("enableRtl"),o=i.getCols().filter(d=>d.isVisible()&&d.getPinned()===this.pinned);let r=null,a=null,l=null;for(const d of o){if(a=d.getActualWidth(),r=this.getNormalisedColumnLeft(d,0,s),r!=null){const h=r+a;if(r<=t&&h>=t){l=d;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let d=o.length-1;d>=0;d--){const h=o[d],p=o[d].getParent();if(!p){l=h;break}const g=p==null?void 0:p.getDisplayedLeafColumns();if(g.length){l=Zt(g);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,s),a=l.getActualWidth()}if(((c=this.lastHighlightedColumn)==null?void 0:c.column)!==l&&this.clearHighlighted(),l==null||r==null||a==null)return;let u;t-r<a/2!==s?u=0:u=1,oA(l,u),this.lastHighlightedColumn={column:l,position:u}}getNormalisedXPositionInfo(e,t){const{gos:n,visibleCols:i}=this.beans,s=n.get("enableRtl"),{firstMovingCol:o,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,s);if(!o||!r||a==null)return;const l=i.allCols,u=l.indexOf(o),c=l.indexOf(r),d=a===0!==s,h=u<c||u===c&&!d;let p=0;if(d?h&&(p-=1):h||(p+=1),c+p===u)return;const g=l[c+p];if(!g)return;const C=this.getNormalisedColumnLeft(g,20,s);return{fromLeft:h,xPosition:C}}getColumnMoveAndTargetInfo(e,t,n){const i=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:o}=qZ(e);if(!s||!o||i.column||!t)return{firstMovingCol:s,...i};const a=this.getPinDirection()==="left";return{firstMovingCol:s,position:a?1:0,column:a!==n?s:o}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,n){const{gos:i,ctrlsSvc:s}=this.beans,o=e.getLeft();if(o==null)return null;const r=e.getActualWidth();return tw({x:n?o+r-t:o+t,pinned:e.getPinned(),useHeaderRow:n,skipScrollPadding:!0,gos:i,ctrlsSvc:s})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,n=this.failedMoveAttempts>sA;return t&&n||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:n,fromEnter:i,fakeEvent:s,fromLeft:o}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:n,fromLeft:o,fromEnter:i,fakeEvent:s}),{columns:a,toIndex:l}=nA(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(oA(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),n=t.getCenterViewportScrollLeft(),i=n+t.getCenterWidth();let s,o;this.gos.get("enableRtl")?(s=e<n+Fp,o=e>i-Fp):(o=e<n+Fp,s=e>i-Fp),this.needToMoveRight=s,this.needToMoveLeft=o,o||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),jZ),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){var i;let e;this.intervalCount++,e=10+this.intervalCount*UZ,e>iw&&(e=iw);let t=null;const n=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=n.scrollHorizontally(-e):this.needToMoveRight&&(t=n.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:s,dragAndDrop:o,gos:r}=this.beans;if(this.failedMoveAttempts<=sA+1||!s)return;if(o.setDragImageCompIcon("pinned"),!r.get("suppressMoveWhenColumnDragging")){const a=(i=this.lastDraggingEvent)==null?void 0:i.dragItem.columns;this.attemptToPinColumns(a,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,n=!1){const i=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!i.length)return 0;n&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:o}=this.beans;return s==null||s.setColsPinned(i,t,"uiColumnDragged"),n&&o.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function oA(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function qZ(e){const t=e.length;let n,i;for(let s=0;s<t;s++){if(!n){const o=e[s];o.getLeft()!=null&&(n=o)}if(!i){const o=e[t-1-s];o.getLeft()!=null&&(i=o)}if(n&&i)break}return{firstMovingCol:n,lastMovingCol:i}}var YZ=class extends ge{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,n=this.pinned;e.whenReady(this,i=>{let s;const o=i.gridBodyCtrl.eBodyViewport;switch(n){case"left":s=[[o,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":s=[[o,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:s=[[o,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=s}),this.moveColumnFeature=this.createManagedBean(new KZ(n)),this.bodyDropPivotTarget=this.createManagedBean(new NZ(n)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},ZZ=class extends ge{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,n){const i=this.beans.colModel.getCols();if(!i)return;const s=i[e];this.moveColumns([s],t,n)}moveColumns(e,t,n,i=!0){const{colModel:s,colAnimation:o,visibleCols:r,eventSvc:a}=this.beans,l=s.getCols();if(!l)return;if(t>l.length-e.length){xe(30,{toIndex:t});return}o==null||o.start();const u=s.getColsForKeys(e);this.doesMovePassRules(u,t)&&(uP(s.getCols(),u,t),r.refresh(n),a.dispatchEvent({type:"columnMoved",columns:u,column:u.length===1?u[0]:null,toIndex:t,finished:i,source:n})),o==null||o.finish()}doesMovePassRules(e,t){const n=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(n)}doesOrderPassRules(e){const{colModel:t,gos:n}=this.beans;return!(!mP(e,t.getColTree())||!(s=>{const o=u=>u?u==="left"||u===!0?-1:1:0,r=n.get("enableRtl");let a=r?1:-1,l=!0;for(const u of s){const c=o(u.getColDef().lockPosition);r?c>a&&(l=!1):c<a&&(l=!1),a=c}return l})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return uP(i,e,t),i}createBodyDropTarget(e,t){return new YZ(e,t)}moveHeader(e,t,n,i,s){const{ctrlsSvc:o,gos:r,colModel:a,visibleCols:l,focusSvc:u}=this.beans,c=t.getBoundingClientRect(),d=c.left,h=Sn(n),p=h?c.width:n.getActualWidth(),g=e==="left"!==r.get("enableRtl"),C=tw({x:g?d-20:d+p+20,pinned:i,fromKeyboard:!0,gos:r,ctrlsSvc:o}),v=u.focusedHeader;iA({allMovingColumns:h?n.getLeafColumns():[n],isFromHeader:!0,fromLeft:e==="right",xPosition:C,pinned:i,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let S;if(h){const R=n.getDisplayedLeafColumns();S=g?R[0]:Zt(R)}else S=n;if(o.getScrollFeature().ensureColumnVisible(S,"auto"),(!s.isAlive()||r.get("ensureDomOrder"))&&v){let R;if(h){const E=n.getGroupId(),y=n.getLeafColumns();if(!y.length)return;const b=y[0].getParent();if(!b)return;R=JZ(b,E)}else R=n;R&&u.focusHeaderPosition({headerPosition:{...v,column:R}})}}setDragSourceForHeader(e,t,n){const{gos:i,colModel:s,dragAndDrop:o,visibleCols:r}=this.beans;let a=!i.get("suppressDragLeaveHidesColumns");const l=Sn(t),u=l?t.getProvidedColumnGroup().getLeafColumns():[t],d={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>QZ(t,r.allCols):()=>XZ(t),dragItemName:n,onDragStarted:()=>{a=!i.get("suppressDragLeaveHidesColumns"),nw(u,!0)},onDragStopped:()=>nw(u,!1),onDragCancelled:()=>nw(u,!1),onGridEnter:h=>{if(a){const{columns:p=[],visibleState:g}=h??{},C=l?S=>!g||g[S.getColId()]:()=>!0,v=p.filter(S=>!S.getColDef().lockVisible&&C(S));s.setColsVisible(v,!0,"uiColumnMoved")}},onGridExit:h=>{var p;if(a){const g=((p=h==null?void 0:h.columns)==null?void 0:p.filter(C=>!C.getColDef().lockVisible))||[];s.setColsVisible(g,!1,"uiColumnMoved")}}};return o.addDragSource(d,!0),d}};function JZ(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function XZ(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function QZ(e,t){var a;const n=e.getProvidedColumnGroup().getLeafColumns(),i={};for(const l of n)i[l.getId()]=l.isVisible();const s=[];for(const l of t)n.indexOf(l)>=0&&(s.push(l),Rs(n,l));for(const l of n)s.push(l);const o=[],r=e.getLeafColumns();for(const l of s)r.indexOf(l)!==-1&&o.push(l);return{columns:s,columnsInSplit:o,visibleState:i,containerType:(a=o[0])==null?void 0:a.pinned}}var eJ={moduleName:"ColumnMove",version:$e,beans:[ZZ,OZ],apiFunctions:{moveColumnByIndex:MZ,moveColumns:LZ},dependsOn:[tA],css:[kZ]},tJ=class extends ge{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const n=this.getHeaderCellForColumn(e);if(!n)return-1;const i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(n),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const n=document.createElement("form");n.style.position="fixed";const i=this.centerRowContainerCtrl.eContainer;for(const o of e)this.cloneItemIntoDummy(o,n);i.appendChild(n);const s=n.offsetWidth;return n.remove(),t=t??this.gos.get("autoSizePadding"),s+t}getHeaderCellForColumn(e){let t=null;for(const n of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const i=n.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}return t}cloneItemIntoDummy(e,t){const n=e.cloneNode(!0);n.style.width="",n.style.position="static",n.style.left="";const i=document.createElement("div"),s=i.classList;["ag-header-cell","ag-header-group-cell"].some(a=>n.classList.contains(a))?(s.add("ag-header","ag-header-row"),i.style.position="static"):s.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){const u=r.classList[l];u!="ag-row-position-absolute"&&s.add(u)}break}r=r.parentElement}i.appendChild(n),t.appendChild(i)}},rA={moduleName:"AutoWidth",version:$e,beans:[tJ]};function nJ(e,t,n=!0,i="api"){var s;(s=e.colResize)==null||s.setColumnWidths(t,!1,n,i)}var iJ=class extends ge{constructor(e,t,n,i){super(),this.comp=e,this.eResize=t,this.pinned=n,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:n}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&n&&this.addDestroyFunc(n.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:n,resizeRatios:i,groupAfterColumns:s,groupAfterStartWidth:o,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=n,this.resizeRatios=i,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=o,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,n="uiColumnResized"){const i=this.normaliseDragChange(t),s=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(s,n,e)}getInitialValues(e){var l;const t=u=>u.reduce((c,d)=>c+d.getActualWidth(),0),n=(u,c)=>u.map(d=>d.getActualWidth()/c),i=this.getColumnsToResize(),s=t(i),o=n(i,s),r={columnsToResize:i,resizeStartWidth:s,resizeRatios:o};let a=null;if(e&&(a=((l=this.beans.colGroupSvc)==null?void 0:l.getGroupAtDirection(this.columnGroup,"After"))??null),a){const u=a.getDisplayedLeafColumns(),c=r.groupAfterColumns=u.filter(h=>h.isResizable()),d=r.groupAfterStartWidth=t(c);r.groupAfterRatios=n(c,d)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),n=this.getInitialValues();t>n.resizeStartWidth&&this.resizeColumns(n,t,e,!0)}resizeColumnsFromLocalValues(e,t,n=!0){if(!this.resizeCols||!this.resizeRatios)return;const i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,n)}resizeColumns(e,t,n,i=!0){var d;const{columnsToResize:s,resizeStartWidth:o,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:u}=e,c=[];if(c.push({columns:s,ratios:r,width:t}),a){const h=t-o;c.push({columns:a,ratios:u,width:l-h})}(d=this.beans.colResize)==null||d.resizeColumnSets({resizeSets:c,finished:i,source:n}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},sJ=class extends ge{constructor(e,t,n,i,s){super(),this.pinned=e,this.column=t,this.eResize=n,this.comp=i,this.ctrl=s}postConstruct(){const e=[];let t,n;const i=()=>{if(rn(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),n&&a&&e.push(a.addColumnAutosizeListeners(this.eResize,this.column))},s=()=>{for(const r of e)r();e.length=0},o=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==n)&&(t=r,n=a,s(),i())};o(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",o)}onResizing(e,t){const{column:n,lastResizeAmount:i,resizeStartWidth:s,beans:o}=this,r=this.normaliseResizeAmount(t),a=s+r,l=[{key:n,newWidth:a}],{pinnedCols:u,ctrlsSvc:c,colResize:d}=o;if(this.column.getPinned()){const h=(u==null?void 0:u.leftWidth)??0,p=(u==null?void 0:u.rightWidth)??0,g=Wc(c.getGridBodyCtrl().eBodyViewport)-50;if(h+p+(r-i)>g)return}this.lastResizeAmount=r,d==null||d.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const n=this.pinned!=="left",i=this.pinned==="right";return this.gos.get("enableRtl")?n&&(t*=-1):i&&(t*=-1),t}},oJ=class extends ge{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,n,i){const s=[],{colModel:o,gos:r,visibleCols:a}=this.beans;for(const l of e){const u=o.getColDefCol(l.key)||o.getCol(l.key);if(!u)continue;if(s.push({width:l.newWidth,ratios:[1],columns:[u]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const d=a.getColAfter(u);if(!d)continue;const h=u.getActualWidth()-l.newWidth,p=d.getActualWidth()+h;s.push({width:p,ratios:[1],columns:[d]})}}s.length!==0&&this.resizeColumnSets({resizeSets:s,finished:n,source:i})}resizeColumnSets(e){const{resizeSets:t,finished:n,source:i}=e;if(!(!t||t.every(c=>rJ(c)))){if(n){const c=t&&t.length>0?t[0].columns:null;ql(this.eventSvc,c,n,i)}return}const o=[],r=[];for(const c of t){const{width:d,columns:h,ratios:p}=c,g={},C={};for(const R of h)r.push(R);let v=!0,S=0;for(;v;){if(S++,S>1e3){Kt(31);break}v=!1;const R=[];let E=0,y=d;h.forEach((F,x)=>{if(C[F.getId()])y-=g[F.getId()];else{R.push(F);const I=p[x];E+=I}});const b=1/E;R.forEach((F,x)=>{const V=x===R.length-1;let I;V?I=y:(I=Math.round(p[x]*d*b),y-=I);const M=F.getMinWidth(),P=F.getMaxWidth();I<M?(I=M,C[F.getId()]=!0,v=!0):P>0&&I>P&&(I=P,C[F.getId()]=!0,v=!0),g[F.getId()]=I})}for(const R of h){const E=g[R.getId()];R.getActualWidth()!==E&&(R.setActualWidth(E,i),o.push(R))}}const a=o.length>0;let l=[];if(a){const{colFlex:c,visibleCols:d,colViewport:h}=this.beans;l=(c==null?void 0:c.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0}))??[],d.setLeftValues(i),d.updateBodyWidths(),h.checkViewportColumns()}const u=r.concat(l);(a||n)&&ql(this.eventSvc,u,n,i,l)}resizeHeader(e,t,n){if(!e.isResizable())return;const i=e.getActualWidth(),s=e.getMinWidth(),o=e.getMaxWidth(),r=Math.min(Math.max(i+t,s),o);this.setColumnWidths([{key:e,newWidth:r}],n,!0,"uiColumnResized")}createResizeFeature(e,t,n,i,s){return new sJ(e,t,n,i,s)}createGroupResizeFeature(e,t,n,i){return new iJ(e,t,n,i)}};function rJ(e){const{columns:t,width:n}=e;let i=0,s=0,o=!0;for(const l of t){const u=l.getMinWidth();i+=u||0;const c=l.getMaxWidth();c>0?s+=c:o=!1}const r=n>=i,a=!o||n<=s;return r&&a}var aJ={moduleName:"ColumnResize",version:$e,beans:[oJ],apiFunctions:{setColumnWidths:nJ},dependsOn:[IZ,rA]},lJ=class extends ge{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);for(const t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})}removeListenersOnChildrenColumns(){for(const e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},uJ=class extends Uy{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,n,i,s){const{column:o,beans:r}=this,{context:a,colNames:l,colHover:u,rangeSvc:c,colResize:d}=r;this.comp=e,s=nd(this,a,s),this.setGui(t,s),this.displayName=l.getDisplayNameForColumnGroup(o,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(),this.setupAutoHeight({wrapperElement:i,compBean:s}),this.setupUserComp(),this.addHeaderMouseListeners(s),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,p=o.getProvidedColumnGroup().getLeafColumns();u==null||u.createHoverFeature(s,p,t),c==null||c.createRangeHighlightFeature(s,o,e),s.createManagedBean(new zy(o,t,r)),s.createManagedBean(new lJ(e,o)),d?this.resizeFeature=s.createManagedBean(d.createGroupResizeFeature(e,n,h,o)):e.setResizableDisplayed(!1),s.createManagedBean(new eu(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,p),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,n=e.getDefinition();return dt(t.gos,{colDef:n,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,n=e.get("groupHeaderHeight");n!=null?n===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(n):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const n of t)e.addManagedListeners(n,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,n)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),n=t[0]===e,i=Zt(t)===e;if(!n&&!i)return;const s=e.getHighlighted(),o=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let r=!1,a=!1;if(o){const l=this.beans.gos.get("enableRtl"),u=s===1,c=s===0;n&&(l?a=u:r=c),i&&(l?r=c:a=u)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:n}=this;if(!n)return;const i=n.getInitialValues(t);n.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){var t;(t=this.resizeFeature)==null||t.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:n,enterpriseMenuFactory:i}=this.beans,s=this.column,o=s.getProvidedColumnGroup(),r=dt(n,{displayName:this.displayName,columnGroup:s,setExpanded:l=>{e.setColumnGroupOpened(o,l,"gridInitializing")},setTooltip:(l,u)=>{n.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,u)},showColumnMenu:(l,u)=>i==null?void 0:i.showMenuAfterButtonClick(o,l,"columnMenu",u),showColumnMenuAfterMouseClick:(l,u)=>i==null?void 0:i.showMenuAfterMouseEvent(o,l,"columnMenu",u),eGridHeader:this.eGui}),a=XK(t,r);a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),n=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:n,contextmenu:i})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){var n;this.tooltipFeature=(n=this.beans.tooltipSvc)==null?void 0:n.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const n=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:n,expandableChanged:n})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),n=F1(t,this.gos,null,e);e.isPadding()?(n.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&n.push("ag-header-span-height")):(n.push("ag-header-group-cell-with-group"),t!=null&&t.wrapHeaderText&&n.push("ag-header-cell-wrap-text"));for(const i of n)this.comp.toggleCss(i,!0)}setupMovingCss(e){const{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const o of i)e.addManagedListeners(o,{movingChanged:s});s()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===se.ENTER){const n=this.column,i=!n.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(n.getProvidedColumnGroup(),i,"uiColumnExpanded")}}setDragSource(e){var t;!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=((t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function cJ(e,t,n){var i;(i=e.colGroupSvc)==null||i.setColumnGroupOpened(t,n,"api")}function dJ(e,t,n){var i;return((i=e.colGroupSvc)==null?void 0:i.getColumnGroup(t,n))??null}function hJ(e,t){var n;return((n=e.colGroupSvc)==null?void 0:n.getProvidedColGroup(t))??null}function fJ(e,t,n){return e.colNames.getDisplayNameForColumnGroup(t,n)||""}function pJ(e){var t;return((t=e.colGroupSvc)==null?void 0:t.getColumnGroupState())??[]}function gJ(e,t){var n;(n=e.colGroupSvc)==null||n.setColumnGroupState(t,"api")}function mJ(e){var t;(t=e.colGroupSvc)==null||t.resetColumnGroupState("api")}function vJ(e){return e.visibleCols.treeLeft}function CJ(e){return e.visibleCols.treeCenter}function yJ(e){return e.visibleCols.treeRight}function wJ(e){return e.visibleCols.getAllTrees()}function bJ(e,t){for(let n=0;n<t.length;n++){const i=e.indexOf(t[n]);i>=0&&(e[i]=e[e.length-1],e.pop())}}var SJ=class extends ge{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:n,colModel:i,colGroupSvc:s,colViewport:o,selectionColSvc:r}=this.beans;t||this.buildTrees(i,s),s==null||s.updateOpenClosedVisibility(),this.leftCols=sw(this.treeLeft),this.centerCols=sw(this.treeCenter),this.rightCols=sw(this.treeRight),r==null||r.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(i),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),n==null||n.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(i,this.leftCols,this.rightCols,e),o.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let n=t.getParent();for(;n;){if(!n.isPadding()){const i=n.getProvidedColumnGroup().getLevel()+1;i>e&&(e=i);break}n=n.getParent()}}return e}updateBodyWidths(){const e=Mo(this.centerCols),t=Mo(this.leftCols),n=Mo(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==n)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=n,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,n,i){let s,o;this.gos.get("enableRtl")?(s=t?t[0]:null,o=n?Zt(n):null):(s=t?Zt(t):null,o=n?n[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===s,i),r.setFirstRightPinned(r===o,i)}buildTrees(e,t){const n=e.getColsToShow(),i=n.filter(l=>l.getPinned()=="left"),s=n.filter(l=>l.getPinned()=="right"),o=n.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new SP,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:i,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:s,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:o,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),n=[],i=[],s=[];for(const o of t){const r=o.getPinned();r?r===!0||r==="left"?n.push(o):s.push(o):i.push(o)}this.ariaOrderColumns=n.concat(i).concat(s)}getAriaColIndex(e){let t;return Sn(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(const e of[this.treeLeft,this.treeRight,this.treeCenter])for(const t of e)Sn(t)&&t.checkLeft()}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const i=t.getCols().slice(0),s=this.gos.get("enableRtl");for(const o of[this.leftCols,this.rightCols,this.centerCols]){if(s){let r=Mo(o);for(const a of o)r-=a.getActualWidth(),a.setLeft(r,e)}else{let r=0;for(const a of o)a.setLeft(r,e),r+=a.getActualWidth()}bJ(i,o)}for(const o of i)o.setLeft(null,e)}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:n}}=this;return n.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:n}}=this;return n.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,n,i){const s=[];let o=null;for(let r=0;r<t.length;r++){const a=t[r],l=t.length-r,u=Math.min(a.getColSpan(e),l),c=[a];if(u>1){const h=u-1;for(let p=1;p<=h;p++)c.push(t[r+p]);r+=h}let d;if(n){d=!1;for(const h of c)n(h)&&(d=!0)}else d=!0;d&&(s.length===0&&o&&(i&&i(a))&&s.push(o),s.push(a)),o=a}return s}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,n=t.indexOf(e);return n>0?t[n-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};Ia(this.treeCenter,!1,e),Ia(this.treeLeft,!1,e),Ia(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let n=0;n<t.length;n++){const i=this[t[n]];if(i.length)return e?Zt(i):i[0]}return null}getColAfter(e){const t=this.allCols,n=t.indexOf(e);return n<t.length-1?t[n+1]:null}getColsLeftWidth(){return Mo(this.leftCols)}getDisplayedColumnsRightWidth(){return Mo(this.rightCols)}isColAtEdge(e,t){const n=this.allCols;if(!n.length)return!1;const i=t==="first";let s;if(Sn(e)){const o=e.getDisplayedLeafColumns();if(!o.length)return!1;s=i?o[0]:Zt(o)}else s=e;return(i?n[0]:Zt(n))===s}};function Ia(e,t,n){if(e)for(let i=0;i<e.length;i++){const s=e[i];if(Sn(s)){const o=t?s.getDisplayedChildren():s.getChildren();Ia(o,t,n)}n(s)}}function sw(e){const t=[];return Ia(e,!0,n=>{mr(n)&&t.push(n)}),t}var EJ=class extends ge{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Vo(null,t,n=>{Jn(n)&&e.push({groupId:n.getGroupId(),open:n.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const n=[];Vo(null,t,i=>{if(Jn(i)){const s=i.getColGroupDef(),o={groupId:i.getGroupId(),open:s?s.openByDefault:void 0};n.push(o)}}),this.setColumnGroupState(n,e)}setColumnGroupState(e,t){const{colModel:n,colAnimation:i,visibleCols:s,eventSvc:o}=this.beans;if(!n.getColTree().length)return;i==null||i.start();const a=[];for(const l of e){const u=l.groupId,c=l.open,d=this.getProvidedColGroup(u);d&&d.isExpanded()!==c&&(d.setExpanded(c),a.push(d))}s.refresh(t,!0),a.length&&o.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),i==null||i.finish()}setColumnGroupOpened(e,t,n){let i;Jn(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],n)}getProvidedColGroup(e){let t=null;return Vo(null,this.beans.colModel.getColTree(),n=>{Jn(n)&&n.getId()===e&&(t=n)}),t}getGroupAtDirection(e,t){const n=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),s=t==="After"?Zt(i):i[0],o=`getCol${t}`;for(;;){const r=this.beans.visibleCols[o](s);if(!r)return null;const a=this.getColGroupAtLevel(r,n);if(a!==e)return a}}getColGroupAtLevel(e,t){let n=e.getParent(),i,s;for(;i=n.getProvidedColumnGroup().getLevel(),s=n.getPaddingLevel(),!(i+s<=t);)n=n.getParent();return n}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();Ia(e,!1,t=>{Sn(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Sn(e))return e;const n=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let s=null;return Ia(n,!1,o=>{if(Sn(o)){const r=o;let a;i?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(s=r)}}),s}createColumnGroups(e){const{columns:t,idCreator:n,pinned:i,oldDisplayedGroups:s,isStandaloneStructure:o}=e,r=this.mapOldGroupsById(s),a=[];let l=t;for(;l.length;){const u=l;l=[];let c=0;const d=h=>{const p=c;c=h;const g=u[p],v=(Sn(g)?g.getProvidedColumnGroup():g).getOriginalParent();if(v==null){for(let R=p;R<h;R++)a.push(u[R]);return}const S=this.createColumnGroup(v,n,r,i,o);for(let R=p;R<h;R++)S.addChild(u[R]);l.push(S)};for(let h=1;h<u.length;h++){const p=u[h],C=(Sn(p)?p.getProvidedColumnGroup():p).getOriginalParent(),v=u[c],R=(Sn(v)?v.getProvidedColumnGroup():v).getOriginalParent();C!==R&&d(h)}c<u.length&&d(u.length)}return o||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,n,i,s,o,r){const a=s.getUniqueKey(t.groupId||null,null),l=lP(this.beans,t,a),u=new Zf(l,a,!1,n);this.createBean(u);const c=this.findExistingGroup(t,o);c&&o.splice(c.idx,1);const d=c==null?void 0:c.group;d&&u.setExpanded(d.isExpanded());const h=fP(this.beans,l.children,n+1,e,i,s,o,r);return u.setChildren(h),u}balanceColumnTree(e,t,n,i){const s=[];for(let o=0;o<e.length;o++){const r=e[o];if(Jn(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,n,i);a.setChildren(l),s.push(a)}else{let a,l;for(let u=t;u<n;u++){const c=i.getUniqueKey(null,null),d=lP(this.beans,null,c),h=new Zf(d,c,!0,u);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(s.push(a),e.some(c=>Jn(c))){l.setChildren([r]);continue}else{l.setChildren(e);break}s.push(r)}}return s}findDepth(e){let t=0,n=e;for(;n!=null&&n[0]&&Jn(n[0]);)t++,n=n[0].getChildren();return t}findMaxDepth(e,t){let n=t;for(let i=0;i<e.length;i++){const s=e[i];if(Jn(s)){const o=s,r=this.findMaxDepth(o.getChildren(),t+1);n<r&&(n=r)}}return n}balanceTreeForAutoCols(e,t){const n=[];for(const i of e){let s=i;for(let o=t-1;o>=0;o--){const r=new Zf(null,`FAKE_PATH_${i.getId()}}_${o}`,!0,o);this.createBean(r),r.setChildren([s]),s.originalParent=r,s=r}t===0&&(i.originalParent=null),n.push(s)}return n}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i<t.length;i++){const s=t[i];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:i,group:s}}}createColumnGroup(e,t,n,i,s){const o=e.getGroupId(),r=t.getInstanceIdForKey(o),a=i1(o,r);let l=n[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),ze(l)?l.reset():(l=new od(e,o,r,i),s||this.createBean(l)),l}mapOldGroupsById(e){const t={},n=i=>{for(const s of i)if(Sn(s)){const o=s;t[s.getUniqueId()]=o,n(o.getChildren())}};return e&&n(e),t}setupParentsIntoCols(e,t){for(const n of e??[])if(n.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),n.parent=t,Sn(n)){const i=n;this.setupParentsIntoCols(i.getChildren(),i)}}},RJ={moduleName:"ColumnGroup",version:$e,dynamicBeans:{headerGroupCellCtrl:uJ},beans:[EJ],apiFunctions:{getAllDisplayedColumnGroups:wJ,getCenterDisplayedColumnGroups:CJ,getColumnGroup:dJ,getColumnGroupState:pJ,getDisplayNameForColumnGroup:fJ,getLeftDisplayedColumnGroups:vJ,getProvidedColumnGroup:hJ,getRightDisplayedColumnGroups:yJ,resetColumnGroupState:mJ,setColumnGroupOpened:cJ,setColumnGroupState:gJ}},DJ={tag:"div",cls:"ag-skeleton-container"},FJ=class extends $t{constructor(){super(DJ)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>Hc(e.eParentOfValue)),Hc(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");Bl(this.getGui(),t)}setupLoading(e){const t=En({tag:"div",cls:"ag-skeleton-effect"}),n=e.node.rowIndex;if(n!=null){const o=75+25*(n%2===0?Math.sin(n):Math.cos(n));t.style.width=`${o}%`}this.getGui().appendChild(t);const i=this.getLocaleTextFunc(),s=e.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");Bl(this.getGui(),s)}refresh(e){return!1}},TJ={moduleName:"CheckboxCellRenderer",version:$e,userComponents:{agCheckboxCellRenderer:uY}},xJ={moduleName:"SkeletonCellRenderer",version:$e,userComponents:{agSkeletonCellRenderer:FJ}};function _J(e,t){const n=e.colModel.getColDefCol(t);return n?n.getColDef():null}function PJ(e){return e.colModel.getColumnDefs(!0)}function AJ(e,t,n){return e.colNames.getDisplayNameForColumn(t,n)||""}function IJ(e,t){return e.colModel.getColDefCol(t)}function kJ(e){return e.colModel.getColDefCols()}function OJ(e,t){return Ds(e,t,"api")}function MJ(e){return ep(e)}function LJ(e){EK(e,"api")}function NJ(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function VJ(e){return e.visibleCols.isPinningLeft()}function BJ(e){return e.visibleCols.isPinningRight()}function HJ(e,t){return e.visibleCols.getColAfter(t)}function GJ(e,t){return e.visibleCols.getColBefore(t)}function $J(e,t,n){e.colModel.setColsVisible(t,n,"api")}function WJ(e,t,n){var i;(i=e.pinnedCols)==null||i.setColsPinned(t,n,"api")}function zJ(e){return e.colModel.getCols()}function UJ(e){return e.visibleCols.leftCols}function jJ(e){return e.visibleCols.centerCols}function KJ(e){return e.visibleCols.rightCols}function qJ(e){return e.visibleCols.allCols}function YJ(e){return e.colViewport.getViewportColumns()}function ow(e,t){if(!e)return;const n=e,i={};for(const s of Object.keys(n)){if(t&&t.indexOf(s)>=0||B_.has(s))continue;const o=n[s];typeof o=="object"&&o!==null&&o.constructor===Object?i[s]=ow(o):i[s]=o}return i}var ZJ=class extends ge{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,n,i,s=!1){var l,u;const o=e.slice();t?o.sort((c,d)=>n.indexOf(c)-n.indexOf(d)):(n||s)&&o.sort((c,d)=>i.indexOf(c)-i.indexOf(d));const r=(l=this.rowGroupColsSvc)==null?void 0:l.columns,a=(u=this.pivotColsSvc)==null?void 0:u.columns;return this.buildColumnDefs(o,r,a)}buildColumnDefs(e,t=[],n=[]){const i=[],s={};for(const o of e){const r=this.createDefFromColumn(o,t,n);let a=!0,l=r,u=o.getOriginalParent(),c=null;for(;u;){let d=null;if(u.isPadding()){u=u.getOriginalParent();continue}const h=s[u.getGroupId()];if(h){h.children.push(l),a=!1;break}if(d=this.createDefFromGroup(u),d&&(d.children=[l],s[d.groupId]=d,l=d,u=u.getOriginalParent()),u!=null&&c===u){a=!1;break}c=u}a&&i.push(l)}return i}createDefFromGroup(e){const t=ow(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,n){const i=ow(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?n.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=e.isVisible()?void 0:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSort()?e.getSort():null,i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},JJ=class extends ge{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const n=this.flexViewportWidth,{visibleCols:i,colDelayRenderSvc:s}=this.beans,o=i.centerCols;let r=-1;if(e.resizingCols){const C=new Set(e.resizingCols);for(let v=o.length-1;v>=0;v--)if(C.has(o[v])){r=v;break}}let a=!1;const l=o.map((C,v)=>{const S=C.getFlex(),R=S!=null&&S>0&&v>r;return a||(a=R),{col:C,isFlex:R,flex:Math.max(0,S??0),initialSize:C.getActualWidth(),min:C.getMinWidth(),max:C.getMaxWidth(),targetSize:0}});if(a?(s==null||s.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(s),!n||!a)return[];let u=l.length,c=l.reduce((C,v)=>C+v.flex,0),d=n;const h=(C,v)=>{C.frozenSize=v,C.col.setActualWidth(v,t),d-=v,c-=C.flex,u-=1},p=C=>C.frozenSize!=null;for(const C of l)C.isFlex||h(C,C.initialSize);for(;u>0;){const C=Math.round(c<1?d*c:d);let v,S=0,R=0;for(const b of l){if(p(b))continue;v=b,R+=C*(b.flex/c);const F=R-S,x=Math.round(F);b.targetSize=x,S+=x}v&&(v.targetSize+=C-S);let E=0;for(const b of l){if(p(b))continue;const F=b.targetSize,x=Math.min(Math.max(F,b.min),b.max);E+=x-F,b.violationType=x===F?void 0:x<F?"max":"min",b.targetSize=x}const y=E===0?"all":E>0?"min":"max";for(const b of l)p(b)||(y==="all"||b.violationType===y)&&h(b,b.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const g=l.filter(C=>C.isFlex&&!C.violationType).map(C=>C.col);if(e.fireResizedEvent){const C=l.filter(S=>S.initialSize!==S.frozenSize).map(S=>S.col),v=l.filter(S=>S.flex).map(S=>S.col);ql(this.eventSvc,C,!0,t,v)}return this.revealColumns(s),g}revealColumns(e){this.columnsHidden&&(e==null||e.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:n}=e.colDef;t!==void 0?e.flex=t:n!==void 0&&(e.flex=n)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}};function fd(e,t,n){if(!t||!e)return;if(!n)return e[t];const i=t.split(".");let s=e;for(let o=0;o<i.length;o++){if(s==null)return;s=s[i[o]]}return s}var XJ=["dateTimeString","dateString","text","number","boolean","date"],QJ=class extends ge{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:e=>!!e.colDef.editable&&e.event.key===se.SPACE}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:n}){return{cellEditorParams:{useFormatter:!0},comparator:(i,s)=>{const o=t.getColDefCol(n),r=o==null?void 0:o.getColDef();if(!o||!r)return 0;const a=i==null?"":e({column:o,node:null,value:i}),l=s==null?"":e({column:o,node:null,value:s});return a===l?0:a>l?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},n={},i=c=>d=>{const{column:h,node:p,value:g}=d;let C=h.getColDef().valueFormatter;return C===c.groupSafeValueFormatter&&(C=c.valueFormatter),this.beans.valueSvc.formatValue(h,p,g,C)};for(const c of Object.keys(e)){const d=e[c],h={...d,groupSafeValueFormatter:uA(d,this.gos)};t[c]=h,n[c]=i(h)}const s=this.gos.get("dataTypeDefinitions")??{},o={};for(const c of Object.keys(s)){const d=s[c],h=this.processDataTypeDefinition(d,s,[c],e);h&&(t[c]=h,d.dataTypeMatcher&&(o[c]=d.dataTypeMatcher),n[c]=i(h))}const{valueParser:r,valueFormatter:a}=e.object,{valueParser:l,valueFormatter:u}=t.object;this.hasObjectValueParser=l!==r,this.hasObjectValueFormatter=u!==a,this.formatValueFuncs=n,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(o,e)}sortKeysInMatchers(e,t){const n={...e};for(const i of XJ)delete n[i],n[i]=e[i]??t[i].dataTypeMatcher;return n}processDataTypeDefinition(e,t,n,i){let s;const o=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=i[o];const a=t[o];if(r&&a&&(r=a),!lA(e,r,o))return;s=aA(r,e)}else{if(n.includes(o)){xe(44);return}const r=t[o];if(!lA(e,r,o))return;const a=this.processDataTypeDefinition(r,t,[...n,o],i);if(!a)return;s=aA(a,e)}return{...s,groupSafeValueFormatter:uA(s,this.gos)}}updateColDefAndGetColumnType(e,t,n){let{cellDataType:i}=t;const{field:s}=t;if(i===void 0&&(i=e.cellDataType),(i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(s,n):!1),!i){e.cellDataType=!1;return}const o=this.dataTypeDefinitions[i];if(!o){xe(47,{cellDataType:i});return}return e.cellDataType=i,o.groupSafeValueFormatter&&(e.valueFormatter=o.groupSafeValueFormatter),o.valueParser&&(e.valueParser=o.valueParser),o.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,o,n),o.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const n=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",n),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",n))}canInferCellDataType(e,t){const{gos:n}=this;if(!bn(n))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(rw(t,i))return!1;const s=t.type===null?e.type:t.type;if(s){const o=n.get("columnTypes")??{};if(Qf(s).some(a=>{const l=o[a.trim()];return l&&rw(l,i)}))return!1}return!rw(e,i)}inferCellDataType(e,t){if(!e)return;let n;const i=this.getInitialData();if(i){const o=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");n=fd(i,e,o)}else this.initWaitForRowData(t);return n==null?void 0:Object.keys(this.dataTypeMatchers).find(o=>this.dataTypeMatchers[o](n))??"object"}getInitialData(){var t;const e=this.gos.get("rowData");if(e!=null&&e.length)return e[0];if(this.initialData)return this.initialData;{const n=(t=this.beans.rowModel.rootNode)==null?void 0:t._leafs;if(n!=null&&n.length)return n[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:n,eventSvc:i}=this.beans;t&&n&&(n.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:o=>{const{firstRowData:r}=o;r&&(s==null||s(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&(n==null||n.processResizeOperations()),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const n=[];this.destroyColumnStateUpdateListeners();const i={},s={};for(const o of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[o],a=this.colModel.getCol(o);if(!a)return;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const u=a.getColDef();if(t&&u.type&&u.type!==l.type){const c=tX(a,r);c.rowGroup&&c.rowGroupIndex==null&&(i[o]=c),c.pivot&&c.pivotIndex==null&&(s[o]=c),n.push(c)}}t&&n.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,s)),n.length&&Ds(this.beans,{state:n},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const n={},{rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;return i==null||i.restoreColumnOrder(n,e),s==null||s.restoreColumnOrder(n,t),Object.values(n)}resetColDefIntoCol(e,t){const n=e.getUserProvidedColDef();if(!n)return!1;const i=QC(this.beans,n,e.getColId());return e.setColDef(i,n,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return(t=this.getDataTypeDefinition(e))==null?void 0:t.baseDataType}checkType(e,t){var i;if(t==null)return!0;const n=(i=this.getDataTypeDefinition(e))==null?void 0:i.dataTypeMatcher;return n?n(t):!0}validateColDef(e){const t=n=>xe(48,{property:n});if(e.cellDataType==="object"){const{object:n}=this.dataTypeDefinitions;e.valueFormatter===n.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===n.valueParser&&!this.hasObjectValueParser&&t("Parser")}}postProcess(e){var r;const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:n,beans:i,formatValueFuncs:s}=this,o=n[t];o&&((r=i.colFilter)==null||r.setColDefPropsForDataType(e,o,s[t]))}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,n,i){const s=this.formatValueFuncs[t],o=this.columnDefinitionPropsPerDataType[n.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:n,colId:i,formatValue:s});Object.assign(e,o)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),n=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:i=>Ci(i.newValue&&String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):Ni(i.value,n)??"",dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:n=>Ci(n)??void 0,dateFormatter:n=>Ni(n??null,t)??void 0,valueParser:n=>np(String(n.newValue))?n.newValue:null,valueFormatter:n=>np(String(n.value))?String(n.value):"",dataTypeMatcher:n=>typeof n=="string"&&np(n)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>{var n,i;return((i=(n=t.newValue)==null?void 0:n.trim)==null?void 0:i.call(n))===""?null:Number(t.newValue)},valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:_C(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>{var n,i;return t.newValue==null?t.newValue:((i=(n=t.newValue)==null?void 0:n.trim)==null?void 0:i.call(n))===""?null:String(t.newValue).toLowerCase()==="true"},valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&g7(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>_C(t.value)??""}}}destroyColumnStateUpdateListeners(){for(const e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function aA(e,t){const n={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(n.columnTypes=[...Qf(e.columnTypes),...Qf(t.columnTypes)]),n}function lA(e,t,n){return t?t.baseDataType!==e.baseDataType?(xe(46),!1):!0:(xe(45,{parentCellDataType:n}),!1)}function uA(e,t){if(e.valueFormatter)return n=>{var i,s;if((i=n.node)!=null&&i.group){const o=(n.colDef.pivotValueColumn??n.column).getAggFunc();if(o){if(o==="first"||o==="last")return e.valueFormatter(n);if(e.baseDataType==="number"&&o!=="count"){if(typeof n.value=="number")return e.valueFormatter(n);if(typeof n.value=="object"){if(!n.value)return;if("toNumber"in n.value)return e.valueFormatter({...n,value:n.value.toNumber()});if("value"in n.value)return e.valueFormatter({...n,value:n.value.value})}}return}}else if(t.get("groupHideOpenParents")&&n.column.isRowGroupActive()&&typeof n.value=="string"&&!((s=e.dataTypeMatcher)!=null&&s.call(e,n.value)))return;return e.valueFormatter(n)}}function eX(e,t,n,i){if(!t[n])return!1;const s=e[n];return s===null?(t[n]=!1,!1):i===void 0?!!s:s===i}function rw(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([n,i])=>eX(e,t,n,i))}function tX(e,t){const n=wP(e);for(const i of t)delete n[i],i==="rowGroup"?delete n.rowGroupIndex:i==="pivot"&&delete n.pivotIndex;return n}var nX={moduleName:"DataType",version:$e,beans:[QJ],dependsOn:[TJ]},iX={moduleName:"ColumnFlex",version:$e,beans:[JJ]},cA={moduleName:"ColumnApi",version:$e,beans:[ZJ],apiFunctions:{getColumnDef:_J,getDisplayNameForColumn:AJ,getColumn:IJ,getColumns:kJ,applyColumnState:OJ,getColumnState:MJ,resetColumnState:LJ,isPinning:NJ,isPinningLeft:VJ,isPinningRight:BJ,getDisplayedColAfter:HJ,getDisplayedColBefore:GJ,setColumnsVisible:$J,setColumnsPinned:WJ,getAllGridColumns:zJ,getDisplayedLeftColumns:UJ,getDisplayedCenterColumns:jJ,getDisplayedRightColumns:KJ,getAllDisplayedColumns:qJ,getAllDisplayedVirtualColumns:YJ,getColumnDefs:PJ}};function sX(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,n=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(n,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" ")}var oX=class extends ge{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,n=!1){if(!e)return null;const i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:s}=this.beans;return n&&s?s.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,n){const i=t==null?void 0:t.getColGroupDef();return i?this.getHeaderName(i,null,e,t,n):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,n,i,s){var r;const o=e.headerValueGetter;if(o){const a=dt(this.gos,{colDef:e,column:t,columnGroup:n,providedColumnGroup:i,location:s});return typeof o=="function"?o(a):typeof o=="string"?((r=this.beans.expressionSvc)==null?void 0:r.evaluate(o,a))??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return sX(e.field)}return""}},rX=class extends ge{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,n=!1){const{visibleCols:i}=this,s=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!s)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=i.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(n)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let n;switch(e){case"left":n=this.rowsOfHeadersToRenderLeft[t];break;case"right":n=this.rowsOfHeadersToRenderRight[t];break;default:n=this.rowsOfHeadersToRenderCenter[t];break}return n??[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||aX(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,n=t+e.getActualWidth(),i=this.viewportLeft-200,s=this.viewportRight+200,o=t<i&&n<i,r=t>s&&n>s;return!o&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=o=>{const r=o.getLeft();return ze(r)&&r>this.viewportLeft},n=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,s=i.centerCols;return i.getColsForRow(e,s,n,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const n=i=>{const s=new Set,o={};for(const r of i){let a=r.getParent();const l=r.isSpanHeaderHeight();for(;a&&!s.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const c=a.getProvidedColumnGroup().getLevel();o[c]??(o[c]=[]),o[c].push(a),s.add(a),a=a.getParent()}}return o};this.rowsOfHeadersToRenderLeft=n(e),this.rowsOfHeadersToRenderRight=n(t),this.rowsOfHeadersToRenderCenter=n(this.headerColsWithinViewport)}extractViewport(){const e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),n=this.colsWithinViewportHash!==t;return n&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),n}};function aX(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var lX=class extends ge{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class n{refresh(){return!1}getGui(){return this.eGui}init(s){const o=t(s),r=typeof o;if(r==="string"||r==="number"||r==="boolean"){this.eGui=kC("<span>"+o+"</span>");return}if(o==null){this.eGui=En({tag:"span"});return}this.eGui=o}}return n}},uX={moduleName:"CellRendererFunction",version:$e,beans:[lX]},cX=class extends h9{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:n,dynamicBeans:i,selectors:s}=e;if(n){const o=(r,a,l,u)=>{this.agGridDefaults[r]=a,(l||u)&&(this.agGridDefaultOverrides[r]={params:l,processParams:u})};for(const r of Object.keys(n)){let a=n[r];if(c7(a)&&(a=a.getComp(this.beans)),typeof a=="object"){const{classImp:l,params:u,processParams:c}=a;o(r,l,u,c)}else o(r,a)}}this.registerDynamicBeans(i);for(const o of s??[])this.selectors[o.selector]=o;if(t)for(const o of Object.keys(t))this.icons[o]=t[o]}getUserComponent(e,t){var a;const n=(l,u,c,d)=>({componentFromFramework:u,component:l,params:c,processParams:d}),{frameworkOverrides:i}=this.beans,s=i.frameworkComponent(t,this.gos.get("components"));if(s!=null)return n(s,!0);const o=this.jsComps[t];if(o){const l=i.isFrameworkComponent(o);return n(o,l)}const r=this.agGridDefaults[t];if(r){const l=this.agGridDefaultOverrides[t];return n(r,!1,l==null?void 0:l.params,l==null?void 0:l.processParams)}return(a=this.beans.validation)==null||a.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){var n;return t?Js(279,{name:e}):((n=this.beans.validation)==null?void 0:n.missingDynamicBean(e))??Js(256)}},dX=23,hX=class extends ge{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){var e,t;this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(const n of this.readyCallbacks)n(this.params);this.readyCallbacks.length=0}},((t=(e=this.beans.frameworkOverrides).runWhenReadyAsync)==null?void 0:t.call(e))??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===dX&&e.every(t=>(t==null?void 0:t.isAlive())??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const n=this.readyCallbacks.indexOf(t);n>=0&&this.readyCallbacks.splice(n,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:n}=this.params;return[e,n,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},fX='.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-virtual-list-item{height:var(--ag-list-item-height);position:absolute;width:100%}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',pX={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:yi,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:Bo,rangeSelectionBackgroundColor:no(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:no(.5),rangeHeaderHighlightColor:j7(.08),rowNumbersSelectedColor:no(.5),rowHoverColor:no(.08),columnHoverColor:no(.05),selectedRowBackgroundColor:no(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:yi,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:es(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:es(.1),iconButtonActiveColor:Bo,iconButtonActiveBackgroundColor:no(.28),iconButtonActiveIndicatorColor:Bo,menuBorder:{color:es(.2)},menuBackgroundColor:ts(.03),menuTextColor:ts(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:es(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:Bo},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},dialogBorder:{color:es(.2)},panelBackgroundColor:yi,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:es(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:es(.13)},selectCellBackgroundColor:es(.07),selectCellBorder:{color:es(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:yi,filterPanelApplyButtonBackgroundColor:Bo,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:Xl,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:Xl,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:es(.15),statusBarLabelColor:Xl,statusBarLabelFontWeight:500,statusBarValueColor:Xl,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"}},gX=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",dA={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},mX={...dA,cellBatchEditTextColor:"#f3d0b3"},vX=()=>eo({feature:"batchEditStyle",params:dA,css:gX}),CX=vX(),yX=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}",wX={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},bX=()=>eo({feature:"buttonStyle",params:{...wX,buttonBackgroundColor:yi,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:Bo}},css:yX}),SX=bX(),EX=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",RX=()=>eo({feature:"columnDropStyle",css:EX}),hA=RX(),DX={warn:(...e)=>{xe(e[0],e[1])},error:(...e)=>{Kt(e[0],e[1])},preInitErr:(...e)=>{Jc(e[0],e[2],e[1])}},FX=()=>i9(DX).withParams(pX).withPart(SX).withPart(hA).withPart(CX),TX='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',xX=()=>eo({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:yi,checkboxUncheckedBorderColor:ts(.3),checkboxCheckedBackgroundColor:Bo,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:yi,checkboxIndeterminateBackgroundColor:ts(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:yi,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:TX}),_X=xX(),fA=()=>({...rp,...mX,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:ts(.05),rowHoverColor:no(.15),selectedRowBackgroundColor:no(.2),menuBackgroundColor:ts(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:Xl,findMatchColor:yi,findActiveMatchColor:yi,checkboxUncheckedBorderColor:ts(.4),toggleButtonOffBackgroundColor:ts(.4),rowBatchEditBackgroundColor:ts(.1)}),PX=()=>({...fA(),backgroundColor:"#1f2836"}),AX=()=>eo({feature:"colorScheme",params:rp,modeParams:{light:rp,dark:fA(),"dark-blue":PX()}}),IX=AX(),pA={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},gA={"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>'},kX=(e={})=>{let t="";for(const n of[...Object.keys(pA),...Object.keys(gA)]){const i=OX(n,e.strokeWidth);t+=`.ag-icon-${n}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); }
105
+ `}return t},OX=(e,t=1.5)=>{const n=gA[e];if(n)return n;const i=pA[e];if(!i)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+i+"</svg>"},MX=(e={})=>eo({feature:"iconSet",css:()=>kX(e)}),LX=MX(),NX=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',VX=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",BX={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},HX=()=>eo({feature:"inputStyle",params:{...BX,inputBackgroundColor:yi,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:Bo},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:ts(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>NX+VX}),GX=HX(),$X='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}',WX={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},zX=()=>eo({feature:"tabStyle",params:{...WX,tabBarBorder:!0,tabBarBackgroundColor:es(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:yi},css:$X}),UX=zX(),jX=()=>FX().withPart(_X).withPart(IX).withPart(LX).withPart(UX).withPart(GX).withPart(hA).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),mA=jX(),KX={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},qX={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},YX={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},vA={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},CA={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},yA={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},aw={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},wA={cssName:"--ag-pinned-row-border",changeKey:"pinnedRowBorderWidthChanged",defaultValue:1,border:!0};function ZX(e,t){for(const n of t.sort((i,s)=>i.moduleName.localeCompare(s.moduleName))){const i=n.css;i&&e.set(`module-${n.moduleName}`,i)}}var JX=class extends d9{constructor(){super(...arguments),this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1}initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(vA),this.getSizeEl(CA),this.getSizeEl(yA),this.getSizeEl(aw),this.getSizeEl(wA),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(wA)}getRowBorderWidth(){return this.getCSSVariablePixelValue(aw)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(vA)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(CA)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(KX)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(qX),n=this.getCSSVariablePixelValue(YX);return e-1+n*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(yA)}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),n=this.gos.get("rowHeight");if(n==null||isNaN(n)||!isFinite(n))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const i=`${n}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),n):t!=""?Number.parseFloat(t):-1}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const n=this.measureSizeEl(e);return n==="detached"||n==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,n),n)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const n=t.offsetWidth;return n===lw?"no-styles":(this.sizesMeasured=!0,n)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=En({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const n=this.getMeasurementContainer();t=En({tag:"div"});const{border:i,noWarn:s}=e;i?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${lw}px)`)):t.style.width=`var(${e.cssName}, ${lw}px)`,n.appendChild(t),this.sizeEls.set(e,t);let o=this.measureSizeEl(e);o==="no-styles"&&!s&&xe(9,{variable:e});const r=hr(this.beans,t,()=>{const a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==o&&(o=a,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(aw);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&Kt(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",[fX]),ZX(e,Array.from(M8())),e}getDefaultTheme(){return mA}themeError(e){Kt(240,{theme:e})}},lw=15538,XX=class extends f9{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function bA(e,t,n){const i=e.visibleCols.headerGroupRowCount;if(n>=i)return{column:t,headerRowIndex:n};let s=t.getParent();for(;s&&s.getProvidedColumnGroup().getLevel()>n;)s=s.getParent();const o=t.isSpanHeaderHeight();return!s||o&&s.isPadding()?{column:t,headerRowIndex:i}:{column:s,headerRowIndex:s.getProvidedColumnGroup().getLevel()}}var QX=class extends ge{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,n=>{this.gridBodyCon=n.gridBodyCtrl});const t=Ln(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let n;const{colModel:i,colGroupSvc:s,ctrlsSvc:o}=this.beans;if(typeof e=="string"?(n=i.getCol(e),n||(n=(s==null?void 0:s.getColumnGroup(e))??null)):n=e,!n)return null;const r=o.getHeaderRowContainerCtrl(),a=r==null?void 0:r.getAllCtrls(),l=Zt(a||[]).type==="filter",u=so(this.beans)-1;let c=-1,d=n;for(;d;)c++,d=d.getParent();let h=c;return t&&l&&h===u-1&&h++,h===-1?null:{headerRowIndex:h,column:n}}navigateVertically(e,t){const{focusSvc:n,visibleCols:i}=this.beans,{focusedHeader:s}=n;if(!s)return!1;const{headerRowIndex:o}=s,r=s.column,a=so(this.beans),l=this.getHeaderRowType(o),u=i.headerGroupRowCount;let{headerRowIndex:c,column:d,headerRowIndexWithoutSpan:h}=e==="UP"?eQ(l,r,o):tQ(r,o,u),p=!1;return c<0&&(c=0,d=r,p=!0),c>=a?(c=-1,this.currentHeaderRowWithoutSpan=-1):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!p&&!d?!1:n.focusHeaderPosition({headerPosition:{headerRowIndex:c,column:d},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,n){const{focusSvc:i,gos:s}=this.beans,o={...i.focusedHeader};let r,a;this.currentHeaderRowWithoutSpan!==-1?o.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=o.headerRowIndex,e==="LEFT"!==s.get("enableRtl")?(a="Before",r=this.findHeader(o,a)):(a="After",r=this.findHeader(o,a));const l=s.getCallback("tabToNextHeader");if(t&&l){const u=i.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(u){const{headerRowIndex:c}=i.focusedHeader||{};c!=null&&c!=o.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return u}return r||!t?i.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:n}):this.focusNextHeaderRow(o,a,n)}focusNextHeaderRow(e,t,n){const i=this.beans,s=e.headerRowIndex;let o=null,r;const a=so(i),l=this.beans.visibleCols.allCols;if(t==="Before"){if(s<=0)return!1;o=Zt(l),r=s-1,this.currentHeaderRowWithoutSpan-=1}else o=l[0],r=s+1,this.currentHeaderRowWithoutSpan<a?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:u,headerRowIndex:c}=bA(this.beans,o,r);return c>=a&&(c=-1),i.focusSvc.focusHeaderPosition({headerPosition:{column:u,headerRowIndex:c},direction:t,fromTab:!0,allowUserOverride:!0,event:n})}scrollToColumn(e,t="After"){if(e.getPinned())return;let n;if(Sn(e)){const i=e.getDisplayedLeafColumns();n=t==="Before"?Zt(i):i[0]}else n=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(n)}findHeader(e,t){const{colGroupSvc:n,visibleCols:i}=this.beans;let s=e.column;if(s instanceof od){const l=s.getDisplayedLeafColumns();s=t==="Before"?l[0]:l[l.length-1]}const o=t==="Before"?i.getColBefore(s):i.getColAfter(s);if(!o)return;const r=i.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:o};const a=n==null?void 0:n.getColGroupAtLevel(o,e.headerRowIndex);return a?a.isPadding()&&o.isSpanHeaderHeight()?{headerRowIndex:i.headerGroupRowCount,column:o}:{headerRowIndex:e.headerRowIndex,column:a??o}:{headerRowIndex:o instanceof Ea&&o.isSpanHeaderHeight()?i.headerGroupRowCount:e.headerRowIndex,column:o}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function eQ(e,t,n){const i=n-1;if(e!=="filter"){const s=t instanceof Ea&&t.isSpanHeaderHeight();let o=t.getParent();for(;o&&(o.getProvidedColumnGroup().getLevel()>i||s&&o.isPadding());)o=o.getParent();if(o)return s?{column:o,headerRowIndex:o.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:i}:{column:o,headerRowIndex:i,headerRowIndexWithoutSpan:i}}return{column:t,headerRowIndex:i,headerRowIndexWithoutSpan:i}}function tQ(e,t,n){const i=t+1,s={column:e,headerRowIndex:i,headerRowIndexWithoutSpan:i};if(e instanceof od){if(i>=n)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:n,headerRowIndexWithoutSpan:i};let r=e.getDisplayedChildren()[0];if(r instanceof od&&r.isPadding()){const l=r.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(r=l)}s.column=r,r instanceof Ea&&r.isSpanHeaderHeight()&&(s.headerRowIndex=n,s.headerRowIndexWithoutSpan=i)}return s}var nQ=class extends ge{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(y7(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(un(this.beans),P1)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=un(this.beans);return this.isDomDataPresentInHierarchy(e,hp)?!0:this.isDomDataPresentInHierarchy(e,fp)}isDomDataPresentInHierarchy(e,t){let n=e;for(;n;){if(X_(this.gos,n,t))return!0;n=n.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:n,column:i}=e,s={rowIndex:t,rowPinned:n,column:i,isFullWidthCell:!1},o=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:n});return o&&(s.isFullWidthCell=o.isFullWidth()),s}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:n,rowPinned:i,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:o=!1,sourceEvent:r}=e,a=this.colModel.getCol(t);if(!a){this.focusedCell=null;return}this.focusedCell={rowIndex:n,rowPinned:Io(i),column:a};const l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:s,preventScrollOnBrowserFocus:o,sourceEvent:r}),this.previousCellFocusParams=l}isCellFocused(e){return this.focusedCell==null?!1:q1(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:n,pinned:i}}=e,{column:s,headerRowIndex:o}=this.focusedHeader;return t===s&&n===o&&i==s.getPinned()}focusHeaderPosition(e){var u;if(this.setFocusRecovered(),Pa(this.beans))return!1;const{direction:t,fromTab:n,allowUserOverride:i,event:s,fromCell:o,rowWithoutSpanValue:r,scroll:a=!0}=e;let{headerPosition:l}=e;if(o&&((u=this.filterManager)!=null&&u.isAdvFilterHeaderActive()))return this.focusAdvancedFilter(l);if(i){const c=this.focusedHeader,d=so(this.beans);if(n){const h=this.gos.getCallback("tabToNextHeader");h&&(l=this.getHeaderPositionFromUserFunc({userFunc:h,direction:t,currentPosition:c,headerPosition:l,headerRowCount:d}))}else{const h=this.gos.getCallback("navigateToNextHeader");if(h&&s){const p={key:s.key,previousHeaderPosition:c,nextHeaderPosition:l,headerRowCount:d,event:s};l=h(p)}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:s,fromCell:o,rowWithoutSpanValue:r,scroll:a}):!1}focusHeaderPositionFromUserFunc(e){if(Pa(this.beans))return!1;const{userFunc:t,headerPosition:n,direction:i,event:s}=e,o=this.focusedHeader,r=so(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:o,headerPosition:n,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:i,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:n,currentPosition:i,headerPosition:s,headerRowCount:o}=e,a=t({backwards:n==="Before",previousHeaderPosition:i,nextHeaderPosition:s,headerRowCount:o});return a===!0?i:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:n,fromCell:i,rowWithoutSpanValue:s,event:o,scroll:r=!0}=e,{column:a,headerRowIndex:l}=t,{filterManager:u,ctrlsSvc:c,headerNavigation:d}=this.beans;if(this.focusedHeader&&Bq(e.headerPosition,this.focusedHeader))return!1;if(l===-1)return u!=null&&u.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:a,event:o});r&&(d==null||d.scrollToColumn(a,n));const h=c.getHeaderRowContainerCtrl(a.getPinned()),p=(h==null?void 0:h.focusHeader(t.headerRowIndex,a,o))||!1;return d&&p&&(s!=null||i)&&(d.currentHeaderRowWithoutSpan=s??-1),p}focusFirstHeader(){var n;if((n=this.overlays)!=null&&n.isExclusive()&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=bA(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){var i;if((i=this.overlays)!=null&&i.isExclusive()&&this.focusOverlay(!0))return!0;const t=so(this.beans)-1,n=Zt(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:n},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){var t;return(t=this.filterManager)!=null&&t.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===Io(t)}focusOverlay(e){var n,i;const t=((n=this.overlays)==null?void 0:n.isVisible())&&((i=this.overlays.eWrapper)==null?void 0:i.getGui());return!!t&&Da(t,e)}focusGridView(e){var o,r,a,l,u,c;const{backwards:t=!1,canFocusOverlay:n=!0,event:i}=e;if((o=this.overlays)!=null&&o.isExclusive())return n&&this.focusOverlay(t);if(wp(this.beans))return t&&!Pa(this.beans)?this.focusLastHeader():n&&this.focusOverlay(t)?!0:t?!1:tu(this.beans,t);const s=t?yZ(this.beans):CZ(this.beans);if(s){const d=e.column??((r=this.focusedHeader)==null?void 0:r.column),{rowIndex:h,rowPinned:p}=s,g=$o(this.beans,s);if(!d||!g||h==null)return!1;if(d.isSuppressNavigable(g)){const C=this.gos.get("enableRtl");let v;return!i||i.key===se.TAB?v=C?se.LEFT:se.RIGHT:v=i.key,(a=this.beans.navigation)==null||a.navigateToNextCell(null,v,{rowIndex:h,column:d,rowPinned:p||null},!0),!0}if((l=this.navigation)==null||l.ensureCellVisible({rowIndex:h,column:d,rowPinned:p}),t){const C=this.rowRenderer.getRowByPosition(s);if(C!=null&&C.isFullWidth()&&((u=this.navigation)!=null&&u.tryToFocusFullWidthRow(s,t)))return!0}return this.setFocusedCell({rowIndex:h,column:d,rowPinned:Io(p),forceBrowserFocus:!0}),(c=this.beans.rangeSvc)==null||c.setRangeToCell({rowIndex:h,rowPinned:p,column:d}),!0}return!!(n&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){var t;return this.advFilterFocusColumn=e==null?void 0:e.column,((t=this.beans.advancedFilter)==null?void 0:t.getCtrl().focusHeaderComp())??!1}focusNextFromAdvancedFilter(e,t){var i;const n=(t?void 0:this.advFilterFocusColumn)??((i=this.visibleCols.allCols)==null?void 0:i[0]);return e?this.focusHeaderPosition({headerPosition:{column:n,headerRowIndex:so(this.beans)-1}}):this.focusGridView({column:n})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},iQ=class extends ge{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.horizontalScrollShowing=this.gos.get("alwaysShowHorizontalScroll")===!0,this.verticalScrollShowing=this.gos.get("alwaysShowVerticalScroll")===!0,this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e!=null&&e.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){var n;const e=this.ctrlsSvc.get("center");if(!e||(n=this.colAnimation)!=null&&n.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),n=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==n)&&(this.horizontalScrollGap=t,this.verticalScrollGap=n,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),n=typeof e=="number"&&e>=0?e:h7();n!=null&&(this.scrollbarWidth=n,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},sQ=class extends ge{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){var i;if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:n}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:(e==null?void 0:e.getState())??{}}),this.destroyCalled=!0,(i=t.get("gridCtrl"))==null||i.destroyGridUi(),n.destroy(),super.destroy()}},Tp=new Set(["gridPreDestroyed","fillStart","pasteStart"]),oQ=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"],uw=oQ.reduce((e,t)=>(e[t]=iK(t),e),{}),pd=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),rQ={tag:"span",cls:"ag-sort-indicator-container",children:[pd("Order","order"),pd("Asc","ascending-icon"),pd("Desc","descending-icon"),pd("Mixed","mixed-icon"),pd("None","none-icon")]},cw=class extends $t{constructor(e){super(),this.eSortOrder=We,this.eSortAsc=We,this.eSortDesc=We,this.eSortMixed=We,this.eSortNone=We,e||this.setTemplate(rQ)}attachCustomElements(e,t,n,i,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=n,this.eSortMixed=i,this.eSortNone=s}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);const n=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",n),this.addManagedEventListeners({newColumnsLoaded:n,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(e,t,n){if(t==null)return;const i=is(e,this.beans,n);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:n,column:i,gos:s,beans:o}=this,r=o.sortSvc.getDisplaySortForColumn(i);if(e&&rn(e,r==="asc",{skipAriaHidden:!0}),t&&rn(t,r==="desc",{skipAriaHidden:!0}),n){const a=!i.getColDef().unSortIcon&&!s.get("unSortIcon"),l=r==null;rn(n,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:n}=this;this.addInIcon("sortUnSort",e,t);const i=t.getColDef().showRowGroup;Xs(n)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:n}=this;if(e){const i=t.sortSvc.getDisplaySortForColumn(n)==="mixed";rn(e,i,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:n}}=this;if(!e)return;const i=n.getColumnsWithSortingOrdered(),s=n.getDisplaySortIndexForColumn(t)??-1,o=i.some(a=>n.getDisplaySortIndexForColumn(a)??!1),r=s>=0&&o;rn(e,r,{skipAriaHidden:!0}),s>=0?e.textContent=(s+1).toString():Gn(e)}},aQ={selector:"AG-SORT-INDICATOR",component:cw},gd=["asc","desc",null],lQ=class extends ge{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,n){const i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,n)}progressSortFromEvent(e,t){const i=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,n,i){var c;t!=="asc"&&t!=="desc"&&(t=null);const{gos:s,showRowGroupCols:o}=this.beans,r=Xs(s);let a=[e];if(r&&e.getColDef().showRowGroup){const d=(c=o==null?void 0:o.getSourceColumnsForGroupColumn)==null?void 0:c.call(o,e),h=d==null?void 0:d.filter(p=>p.isSortable());h&&(a=[e,...h])}for(const d of a)this.setColSort(d,t,i);const l=(n||s.get("alwaysMultiSort"))&&!s.get("suppressMultiSort"),u=[];if(!l){const d=this.clearSortBarTheseColumns(a,i);u.push(...d)}this.updateSortIndex(e),u.push(...a),this.dispatchSortChangedEvents(i,u)}updateSortIndex(e){const{gos:t,colModel:n,showRowGroupCols:i}=this.beans,s=Xs(t),o=i==null?void 0:i.getShowRowGroupCol(e.getId()),r=s&&o||e,a=this.getColumnsWithSortingOrdered();n.forAllCols(c=>this.setColSortIndex(c,null));const l=a.filter(c=>s&&c.getColDef().showRowGroup?!1:c!==r);(r.getSort()?[...l,r]:l).forEach((c,d)=>this.setColSortIndex(c,d))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{t.getSort()&&(e=!0)}),e}dispatchSortChangedEvents(e,t){const n={type:"sortChanged",source:e};t&&(n.columns=t),this.eventSvc.dispatchEvent(n)}clearSortBarTheseColumns(e,t){const n=[];return this.beans.colModel.forAllCols(i=>{e.includes(i)||(i.getSort()&&n.push(i),this.setColSort(i,void 0,t))}),n}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??gd,n=t.indexOf(e.getSort()),i=n<0,s=n==t.length-1;return i||s?t[0]:t[n+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:n,rowGroupColsSvc:i}=this.beans;let s=[];if(t.forAllCols(u=>{u.getSort()&&s.push(u)}),t.isPivotMode()){const u=Xs(e);s=s.filter(c=>{const d=!!c.getAggFunc(),h=!c.isPrimary(),p=u?n==null?void 0:n.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return d||h||p})}const o=(i==null?void 0:i.columns.filter(u=>!!u.getSort()))??[],r={};s.forEach((u,c)=>r[u.getId()]=c),s.sort((u,c)=>{const d=u.getSortIndex(),h=c.getSortIndex();if(d!=null&&h!=null)return d-h;if(d==null&&h==null){const p=r[u.getId()],g=r[c.getId()];return p>g?1:-1}else return h==null?-1:1});const a=Xs(e)&&!!o.length;a&&(s=[...new Set(s.map(u=>(n==null?void 0:n.getShowRowGroupCol(u.getId()))??u))]);const l=new Map;if(s.forEach((u,c)=>l.set(u,c)),a)for(const u of o){const c=n.getShowRowGroupCol(u.getId());l.set(u,l.get(c))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=Xs(this.gos),n=!!e.getColDef().showRowGroup;return t&&n}getDisplaySortForColumn(e){var r;const t=(r=this.beans.showRowGroupCols)==null?void 0:r.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(t!=null&&t.length))return e.getSort();const i=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,s=i[0].getSort();return i.every(a=>a.getSort()==s)?s:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,n){let i=0;e.addManagedListeners(t,{movingChanged:()=>{i=Date.now()}}),n&&e.addManagedElementListeners(n,{click:o=>{const r=t.isMoving(),l=Date.now()-i<50;r||l||this.progressSortFromEvent(t,o)}});const s=()=>{var r;const o=t.getSort();if(e.toggleCss("ag-header-cell-sorted-asc",o==="asc"),e.toggleCss("ag-header-cell-sorted-desc",o==="desc"),e.toggleCss("ag-header-cell-sorted-none",!o),t.getColDef().showRowGroup){const a=(r=this.beans.showRowGroupCols)==null?void 0:r.getSourceColumnsForGroupColumn(t),u=!(a==null?void 0:a.every(c=>t.getSort()==c.getSort()));e.toggleCss("ag-header-cell-sorted-mixed",u)}};e.addManagedEventListeners({sortChanged:s,columnRowGroupChanged:s})}initCol(e){const{sort:t,initialSort:n,sortIndex:i,initialSortIndex:s}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(n==="asc"||n==="desc")&&(e.sort=n),i!==void 0?i!==null&&(e.sortIndex=i):s!==null&&(e.sortIndex=s)}updateColSort(e,t,n){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,n):this.setColSort(e,void 0,n))}setColSort(e,t,n){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",n)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new cw(e)}getSortIndicatorSelector(){return aQ}},iu={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function SA(e){return`"${e}"`}var uQ=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}}),cQ={aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t})=>t?typeof e=="string"?iu[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:iu[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?iu[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{var n;const t=["columnsMenuTab","generalMenuTab"];return(n=e.menuTabs)!=null&&n.some(i=>t.includes(i))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},dQ=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:n})=>n?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,n)=>n.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:n})=>n==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:n})=>n==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:n})=>n==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const n=t.headerValueGetter;return typeof n=="function"||typeof n=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Js(262);if(t.smallLeft)return Js(263);if(t.smallRight)return Js(264)}return null}},sortingOrder:{validate:t=>{const n=t.sortingOrder;if(Array.isArray(n)&&n.length>0){const i=n.filter(s=>!gd.includes(s));if(i.length>0)return`sortingOrder must be an array with elements from [${gd.map(Uf).join()}], currently it includes [${i.map(Uf).join()}]`}else if(!Array.isArray(n)||n.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${n}`;return null}},type:{validate:t=>{const n=t.type;return n instanceof Array?n.some(s=>typeof s!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof n=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:n})=>n?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:n,cellSelection:i,suppressRowTransform:s,enableCellSpan:o,rowDragEntireRow:r,enableCellTextSelection:a})=>typeof n=="object"&&(n==null?void 0:n.mode)==="singleRow"&&n!=null&&n.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":i?"colDef.spanRows is not supported with cellSelection.":s?"colDef.spanRows is not supported with suppressRowTransform.":o?r?"colDef.spanRows is not supported with rowDragEntireRow.":a?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:n={}},i){var r;const s=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),o=[];for(const a of t.groupHierarchy??[]){if(typeof a=="object"){(r=i.validation)==null||r.validateColDef(a);continue}!s.has(a)&&!(a in n)&&o.push(SA(a))}if(o.length>0){const a=`The following parts of colDef.groupHierarchy are not recognised: ${o.join(", ")}.`,l=`Choose one of ${[...s].map(SA).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${a}
106
+ ${l}`}return null}}}),hQ={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0},fQ=()=>Object.keys(hQ),pQ=()=>({objectName:"colDef",allProperties:fQ(),docsUrl:"column-properties/",deprecations:uQ(),validations:dQ()}),gQ=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],mQ=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],vQ=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],EA=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],CQ=["theme","rowSelection"],yQ=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],RA=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows"],wQ=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],bQ=()=>[...vQ,...mQ,...gQ,...EA,...wQ,...RA,...yQ,...CQ],SQ=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}});function oo(e,t,n){return typeof t=="number"||t==null?t==null||t>=n?null:`${e}: value should be greater than or equal to ${n}`:`${e}: value should be a number`}var EQ={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},RQ=()=>{const e={autoSizePadding:{validate({autoSizePadding:n}){return oo("autoSizePadding",n,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:n}){return oo("cacheBlockSize",n,1)}},cacheOverflowSize:{validate({cacheOverflowSize:n}){return oo("cacheOverflowSize",n,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:n=>{const i=n.domLayout,s=["autoHeight","normal","print"];return i&&!s.includes(i)?`domLayout must be one of [${s.join()}], currently it's ${i}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:n,pinnedTopRowData:i,pinnedBottomRowData:s}){return n&&(i||s)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:n,isRowPinnable:i,pinnedTopRowData:s,pinnedBottomRowData:o}){return i&&(s||o)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!n&&i?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:n,isRowPinned:i,pinnedTopRowData:s,pinnedBottomRowData:o}){return i&&(s||o)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!n&&i?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:n={}},i,s){var o;for(const r of Object.keys(n))(o=s.validation)==null||o.validateColDef(n[r]);return null}},icons:{validate:({icons:n})=>{if(n){if(n.smallDown)return Js(262);if(n.smallLeft)return Js(263);if(n.smallRight)return Js(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:n}){return oo("infiniteInitialRowCount",n,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:n=>{if(typeof n.ssrmExpandAllAffectsAllRows=="boolean"){if(n.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(n.ssrmExpandAllAffectsAllRows&&typeof n.getRowId!="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:n}){return oo("keepDetailRowsCount",n,1)}},paginationPageSize:{validate({paginationPageSize:n}){return oo("paginationPageSize",n,1)}},paginationPageSizeSelector:{validate:n=>{const i=n.paginationPageSizeSelector;return typeof i=="boolean"||i==null||i.length?null:`'paginationPageSizeSelector' cannot be an empty array.
107
+ If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:n}){return oo("rowBuffer",n,0)}},rowClass:{validate:n=>typeof n.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:n}){return n&&typeof n=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':n&&typeof n!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":n&&n.mode!=="multiRow"&&n.mode!=="singleRow"?`Selection mode "${n.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:n=>{const i=n.rowStyle;return i&&typeof i=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:n}){return oo("serverSideInitialRowCount",n,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:n=>{const i=n.sortingOrder;if(Array.isArray(i)&&i.length>0){const s=i.filter(o=>!gd.includes(o));if(s.length>0)return`sortingOrder must be an array with elements from [${gd.map(Uf).join()}], currently it includes [${s.map(Uf).join()}]`}else if(!Array.isArray(i)||i.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},tooltipHideDelay:{validate:n=>n.tooltipHideDelay&&n.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:n=>n.tooltipShowDelay&&n.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:n=>{const i=n.rowModelType??"clientSide";switch(i){case"clientSide":{const{treeDataChildrenField:s,treeDataParentIdField:o,getDataPath:r,getRowId:a}=n;if(!s&&!o&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(s){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(o)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(o){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const s=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return n.isServerSideGroup&&n.getServerSideGroupKey?null:s}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:n}){return oo("viewportRowModelBufferSize",n,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:n}){return oo("viewportRowModelPageSize",n,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:n,showOpenedGroup:i}){return n!=null&&n.field&&i?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":n!=null&&n.valueGetter&&i?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:n=>{const i=n.renderingMode,s=["default","legacy"];return i&&!s.includes(i)?`renderingMode must be one of [${s.join()}], currently it's ${i}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:n})=>{if(!n)return null;const i=["fitCellContents","fitGridWidth","fitProvidedWidth"],s=n.type;return s!=="fitCellContents"&&s!=="fitGridWidth"&&s!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${i.map(o=>'"'+o+'"').join(", ")}, currently it's ${s}`:s==="fitProvidedWidth"&&typeof n.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${n.width}`:null}}},t={};for(const n of RA)t[n]={expectedType:"boolean"};for(const n of EA)t[n]={expectedType:"number"};return ci(t,e),t},DQ=()=>({objectName:"gridOptions",allProperties:[...bQ(),...Object.values(uw)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:SQ(),validations:RQ()}),FQ=0,TQ=0,DA="__ag_grid_instance",xQ=class extends ge{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=TQ++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new va,this.globalEventHandlerFactory=e=>(t,n)=>{if(!this.isAlive())return;const i=Tp.has(t);if(i&&!e||!i&&e||!_Q(t))return;const s=(o,r)=>{const a=uw[o],l=this.gridOptions[a];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(r))};if(this.gridReadyFired)s(t,n);else if(t==="gridReady"){s(t,n),this.gridReadyFired=!0;for(const o of this.queueEvents)s(o.eventName,o.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:n})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??_8[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return ze(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(n=>e(this.addCommon(n)))}updateGridOptions({options:e,force:t,source:n="api"}){const i={id:FQ++,properties:[]},s=[],{gridOptions:o,validation:r}=this;for(const a of Object.keys(e)){const l=WC.applyGlobalGridOption(a,e[a]);r==null||r.warnOnInitialPropertyUpdate(n,a);const u=t||typeof l=="object"&&n==="api",c=o[a];if(u||c!==l){o[a]=l;const d={type:a,currentValue:l,previousValue:c,changeSet:i,source:n};s.push(d)}}this.validateGridOptions(this.gridOptions),i.properties=s.map(a=>a.type);for(const a of s)pr(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const n of Object.keys(e)){const i=e[n];if(i==null||i===!1)continue;let s=t[n];typeof s=="function"&&(s=s(e,this.gridOptions,this.beans)),s&&this.assertModuleRegistered(s,n)}}validateGridOptions(e){var t;this.validateOptions(e,EQ),(t=this.validation)==null||t.processGridOptions(e)}validateColDef(e,t,n){var i,s;(n||!((i=this.beans.dataTypeSvc)!=null&&i.isColPendingInference(t)))&&(this.validateOptions(e,cQ),(s=this.validation)==null||s.validateColDef(e))}assertModuleRegistered(e,t){const n=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return n||Kt(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),n}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:UC(),rowModelType:this.get("rowModelType"),isUmd:N8()}}isModuleRegistered(e){return zC(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[DA]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const n=t[DA];if(ze(n))return n===this.instanceId;t=t.parentElement}return!1}};function _Q(e){return!!uw[e]}function FA(e){const t={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:t},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:t},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:t},e?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var PQ=FA(!0),AQ=FA(!1),IQ=class extends $t{constructor(){super(...arguments),this.eFilter=We,this.eFilterButton=We,this.eSortIndicator=We,this.eMenu=We,this.eLabel=We,this.eText=We,this.eSortOrder=We,this.eSortAsc=We,this.eSortDesc=We,this.eSortMixed=We,this.eSortNone=We,this.isLoadingInnerComponent=!1}refresh(e){var n,i,s;const t=this.params;if(this.params=e,this.workOutTemplate(e,!!((n=this.beans)!=null&&n.sortSvc))!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const o={...e};ci(o,e.innerHeaderComponentParams),(s=(i=this.innerHeaderComponent).refresh)==null||s.call(i,o)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const n=e.template;return n?n!=null&&n.trim?n.trim():n:t?PQ:AQ}init(e){this.params=e;const{sortSvc:t,touchSvc:n,rowNumbersSvc:i,userCompFactory:s}=this.beans,o=t==null?void 0:t.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!o),this.setTemplate(this.currentTemplate,o?[o]:void 0),n==null||n.setupForHeader(this),this.setMenu(),this.setupSort(),i==null||i.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(s,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const n=JK(e,t,t);n&&(this.isLoadingInnerComponent=!0,n.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderComponent=i,this.eText&&this.eText.appendChild(i.getGui())):this.destroyBean(i))}))}setDisplayName(e){const{displayName:t}=e,n=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||n===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=Vl(t))}addInIcon(e,t,n){const i=is(e,this.beans,n);i&&t.appendChild(i)}workOutShowMenu(){var e;return this.params.enableMenu&&!!((e=this.beans.menuSvc)!=null&&e.isHeaderMenuButtonEnabled())}shouldSuppressMenuHide(){var e;return!!((e=this.beans.menuSvc)!=null&&e.isHeaderMenuButtonAlwaysShowEnabled())}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){Es(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:n}=this,i=Li(e);this.addInIcon(i?"menu":"menuAlt",t,n.column),t.classList.toggle("ag-header-menu-icon",!i);const s=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=s,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(s)}toggleMenuAlwaysShow(e){var t;(t=this.eMenu)==null||t.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:n}=this;t||this.toggleMenuAlwaysShow(!0),n.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){var l;const{params:t,gos:n,beans:i,eMenu:s,eFilterButton:o}=this,r=t.column,a=Li(n);if(e&&!a){if((l=i.menuSvc)!=null&&l.isFilterMenuInHeaderEnabled(r))return t.showFilter(o??s??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(s??o??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:n}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:i,eSortOrder:s,eSortAsc:o,eSortDesc:r,eSortMixed:a,eSortNone:l}=this;i.attachCustomElements(s,o,r,a,l)}this.eSortIndicator.setupSort(n),this.currentSort&&e.setupHeader(this,n,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const n=()=>{const i=t.column.isFilterActive();rn(e,i,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,n,"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,n,i){if(!e)return Es(t),!1;const s=this.params.column;return this.addInIcon(i,t,s),this.addManagedListeners(s,{filterChanged:n}),n(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:n}=this;return e?t??n??this.getGui():n??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},kQ={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},OQ=class extends $t{constructor(){super(kQ),this.agOpened=We,this.agClosed=We,this.agLabel=We,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:n}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),n==null||n.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&xe(89)}workOutInnerHeaderGroupComponent(e,t){const n=QK(e,t,t);n&&(this.isLoadingInnerComponent=!0,n.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderGroupComponent=i,this.agLabel.appendChild(i.getGui())):this.destroyBean(i))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:n},beans:i}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const s=l=>{if(Go(l))return;const u=!n.isExpanded();i.colGroupSvc.setColumnGroupOpened(n.getProvidedColumnGroup(),u,"uiColumnExpanded")};this.addTouchAndClickListeners(i,t,s),this.addTouchAndClickListeners(i,e,s);const o=l=>{_a(l)};this.addManagedElementListeners(t,{dblclick:o}),this.addManagedElementListeners(e,{dblclick:o}),this.addManagedElementListeners(this.getGui(),{dblclick:s}),this.updateIconVisibility();const r=n.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,n){var i;(i=e.touchSvc)==null||i.setupForHeaderGroupElement(this,t,n),this.addManagedElementListeners(t,{click:n})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:n}}=this;if(n.isExpandable()){const i=n.isExpanded();rn(e,i),rn(t,!i)}else rn(e,!1),rn(t,!1)}addInIcon(e,t){const n=is(e,this.beans,null);n&&t.appendChild(n)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:n}=this;rn(t,!1),rn(n,!1)}}setupLabel(e){var s;const{displayName:t,columnGroup:n}=e,i=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;ze(t)&&!i&&(this.agLabel.textContent=Vl(t)),this.toggleCss("ag-sticky-label",!((s=n.getColGroupDef())!=null&&s.suppressStickyLabel))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},MQ={moduleName:"ColumnHeaderComp",version:$e,userComponents:{agColumnHeader:IQ},icons:{menu:"menu",menuAlt:"menu-alt"}},LQ={moduleName:"ColumnGroupHeaderComp",version:$e,userComponents:{agColumnGroupHeader:OQ},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},NQ=class extends ge{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&xe(92)}createTask(e,t,n,i,s=!1){this.verify();let o=n;i&&this.batchFrameworkComps&&(o="f1");const r={task:e,index:t,createOrder:++this.taskCount,deferred:s};this.addTaskToList(this[o],r),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((n,i)=>n.deferred!==i.deferred?n.deferred?-1:1:n.index!==i.index?t*(i.index-n.index):i.createOrder-n.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:n,f1:i,destroyTasks:s,beans:o}=this,{ctrlsSvc:r,frameworkOverrides:a}=o,l=t.list,u=n.list,c=i.list,d=Date.now();let h=0;const p=e<=0,g=r.getScrollFeature();for(;p||h<e;){if(!g.scrollGridIfNeeded()){let v;if(l.length)this.sortTaskList(t),v=l.pop().task;else if(u.length)this.sortTaskList(n),v=u.pop().task;else if(c.length)a.wrapOutgoing(()=>{for(;(p||h<e)&&!g.scrollGridIfNeeded();){if(c.length)this.sortTaskList(i),v=c.pop().task,v();else break;h=Date.now()-d}}),v=()=>{};else if(s.length)v=s.pop();else break;v()}h=Date.now()-d}l.length||u.length||c.length||s.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);ko(this.beans,e)}isQueueEmpty(){return!this.ticking}},VQ={moduleName:"AnimationFrame",version:$e,beans:[NQ]},BQ=class extends ge{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return is(e,this.beans,t==null?void 0:t.column)}},HQ=class extends ge{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!Ra())return;const t=(n,i,s)=>{var a;const{rowCtrl:o,cellCtrl:r}=e.getControlsForEventTarget((s==null?void 0:s.target)??null);r!=null&&r.column&&r.dispatchCellContextMenuEvent(s??null),(a=this.beans.contextMenuSvc)==null||a.handleContextMenuMouseEvent(void 0,s,o,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!Ra()||O_("dblclick"))return!1;const i=Date.now(),s=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,s})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:n,menuSvc:i}=this.beans;if(t.get("suppressTouch"))return;const{params:s,eMenu:o,eFilterButton:r}=e,a=new Aa(e.getGui(),!0);e.addDestroyFunc(()=>a.destroy());const l=e.shouldSuppressMenuHide(),u=l&&ze(o)&&s.enableMenu;let c=a;if(u&&(c=new Aa(o,!0),e.addDestroyFunc(()=>c.destroy())),s.enableMenu||i!=null&&i.isHeaderContextMenuEnabled(s.column)){const d=u?"tap":"longTap",h=p=>s.showColumnMenuAfterMouseClick(p.touchStart);e.addManagedListeners(c,{[d]:h}),e.addManagedListeners(a,{longTap:h})}if(s.enableSorting){const d=h=>{const p=h.touchStart.target;l&&(o!=null&&o.contains(p)||r!=null&&r.contains(p))||n==null||n.progressSort(s.column,!1,"uiColumnSorted")};e.addManagedListeners(a,{tap:d})}if(s.enableFilterButton&&r){const d=new Aa(r,!0);e.addManagedListeners(d,{tap:()=>s.showFilter(r)}),e.addDestroyFunc(()=>d.destroy())}}setupForHeaderGroup(e){var n;const t=e.params;if((n=this.beans.menuSvc)!=null&&n.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const i=new Aa(t.eGridHeader,!0),s=o=>t.showColumnMenuAfterMouseClick(o.touchStart);e.addManagedListeners(i,{longTap:s}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,n){const i=new Aa(t,!0);e.addManagedListeners(i,{tap:n}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,n){if(!Ra())return;const i=new Aa(t),s=o=>{qc(this.beans,o.touchEvent)&&n(void 0,o.touchStart,o.touchEvent)};e.addManagedListeners(i,{longTap:s}),e.addDestroyFunc(()=>i.destroy())}},GQ={moduleName:"Touch",version:$e,beans:[HQ]},$Q=class extends ge{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,n=!1){return n?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const n=e===se.UP,i=e===se.DOWN,s=e===se.LEFT;let o,r;const{pageBounds:a,gos:l,visibleCols:u,pinnedRowModel:c}=this.beans,{rowPinned:d}=t;if(n||i)d&&c?n?r=0:r=d==="top"?c.getPinnedTopRowCount()-1:c.getPinnedBottomRowCount()-1:r=n?a.getFirstRow():a.getLastRow(),o=t.column;else{const h=l.get("enableRtl");r=t.rowIndex,o=(s!==h?u.allCols:[...u.allCols].reverse()).find(g=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:g}))}return o?{rowIndex:r,rowPinned:d,column:o}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let n=t,i=!1;for(;!i;){switch(e){case se.UP:n=this.getCellAbove(n);break;case se.DOWN:n=this.getCellBelow(n);break;case se.RIGHT:n=this.gos.get("enableRtl")?this.getCellToLeft(n):this.getCellToRight(n);break;case se.LEFT:n=this.gos.get("enableRtl")?this.getCellToRight(n):this.getCellToLeft(n);break;default:n=null,xe(8,{key:e});break}n?i=this.isCellGoodToFocusOn(n):i=!0}return n}isCellGoodToFocusOn(e){const t=e.column;let n;const{pinnedRowModel:i,rowModel:s}=this.beans;switch(e.rowPinned){case"top":n=i==null?void 0:i.getPinnedTopRow(e.rowIndex);break;case"bottom":n=i==null?void 0:i.getPinnedBottomRow(e.rowIndex);break;default:n=s.getRow(e.rowIndex);break}return n?!this.isSuppressNavigable(t,n):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){var i;if(!e)return null;const t=((i=this.rowSpanSvc)==null?void 0:i.getCellEnd(e))??e,n=Y1(this.beans,t,!0);return n?{rowIndex:n.rowIndex,column:e.column,rowPinned:n.rowPinned}:null}getCellAbove(e){var i;if(!e)return null;const t=((i=this.rowSpanSvc)==null?void 0:i.getCellStart(e))??e,n=Rp(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return n?{rowIndex:n.rowIndex,column:e.column,rowPinned:n.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:n}=this.beans,i=t.allCols;let s=e.rowIndex,o=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=i[0];const a=Y1(this.beans,e,!0);if(on(a)||!a.rowPinned&&!((n==null?void 0:n.isRowInPage(a.rowIndex))??!0))return null;s=a?a.rowIndex:null,o=a?a.rowPinned:null}return{rowIndex:s,column:r,rowPinned:o}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:n,pagination:i}=t,s=n.allCols;let o=e.rowIndex,r=e.rowPinned,a=n.getColBefore(e.column);if(!a){a=Zt(s);const l=Rp(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(on(l)||!l.rowPinned&&!((i==null?void 0:i.isRowInPage(l.rowIndex))??!0))return null;o=l?l.rowIndex:null,r=l?l.rowPinned:null}return{rowIndex:o,column:a,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:n}=e.colDef;if(typeof n=="boolean")return n;if(typeof n=="function"){const i=e.createColumnFunctionCallbackParams(t);return n(i)}return!1}};function WQ(e){return e.focusSvc.getFocusedCell()}function zQ(e){return e.focusSvc.clearFocusedCell()}function UQ(e,t,n,i){e.focusSvc.setFocusedCell({rowIndex:t,column:n,rowPinned:i,forceBrowserFocus:!0})}function jQ(e,t){var n;return((n=e.navigation)==null?void 0:n.tabToNextCell(!1,t))??!1}function KQ(e,t){var n;return((n=e.navigation)==null?void 0:n.tabToNextCell(!0,t))??!1}function qQ(e,t,n=!1){var s;const i=(s=e.headerNavigation)==null?void 0:s.getHeaderPositionForColumn(t,n);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})}var YQ=class extends ge{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new TA,this.rowValidations=new xA,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const n=this.getEditRow(e);t?n.delete(t):n.clear(),n.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const n=e&&this.edits.get(e);if(n)return n;if(t.checkSiblings){const i=e.pinnedSibling;if(i)return this.getEditRow(i)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;const n=this.getEditRow(e),i=e.pinnedSibling,s=t&&i&&this.getEditRow(i);if(!n&&!s)return;const o=Object.assign({},e.data),r=(a,l)=>a.forEach(({pendingValue:u},c)=>{u!==os&&(l[c.getColId()]=u)});return n&&r(n,o),s&&r(s,o),o}getEdit(e,t){const n=this._getEdit(e);return t&&n?{...n}:n}_getEdit(e){var t;if(!this.suspendEdits&&this.edits.size!==0)return e.rowNode&&e.column&&((t=this.getEditRow(e.rowNode))==null?void 0:t.get(e.column))}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((n,i)=>{const s=new Map;n.forEach(({editorState:o,...r},a)=>s.set(a,{...r})),t.set(i,s)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,n)=>{const i=new Map;t.forEach((s,o)=>i.set(o,{...s})),this.edits.set(n,i)})}setEdit(e,t){(this.edits.size===0||!this.edits.has(e.rowNode))&&this.edits.set(e.rowNode,new Map);const n=this._getEdit(e),i=Object.assign({editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...n,...t});return this.getEditRow(e.rowNode).set(e.column,i),i}clearEditValue(e){var i;const{rowNode:t,column:n}=e;if(t)if(n){const s=this._getEdit(e);s&&(s.editorValue=void 0,s.pendingValue=s.sourceValue,s.state="changed")}else(i=this.getEditRow(t))==null||i.forEach(s=>{s.editorValue=void 0,s.pendingValue=s.sourceValue,s.state="changed"})}getState(e){var t;if(!this.suspendEdits)return(t=this.getEdit(e))==null?void 0:t.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((n,i)=>{for(const s of n.keys()){const{editorState:o,...r}=n.get(s);t.push({rowNode:i,column:s,...r})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){var o;if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:n,column:i}=e,{withOpenEditor:s}=t;if(n){const r=this.getEditRow(n,t);return r?i?s?((o=this.getEdit(e))==null?void 0:o.state)==="editing":r.has(i)??!1:r.size!==0?s?Array.from(r.values()).some(({state:a})=>a==="editing"):!0:!1:!1}return s?this.getEditPositions().some(({state:r})=>r==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:n,column:i}=e;i&&!t.has(i)&&t.set(i,{editorValue:void 0,pendingValue:os,sourceValue:this.beans.valueSvc.getValue(i,n,!1,"api"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(n,t)}stop(e){this.hasEdits(e)&&(e?this.removeEdits(e):this.clear())}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},TA=class{constructor(){this.cellValidations=new Map}getCellValidation(e){var i,s;const{rowNode:t,column:n}=e||{};return(s=(i=this.cellValidations)==null?void 0:i.get(t))==null?void 0:s.get(n)}hasCellValidation(e){return!(e!=null&&e.rowNode)||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:n,column:i}=e;this.cellValidations.has(n)||this.cellValidations.set(n,new Map),this.cellValidations.get(n).set(i,t)}clearCellValidation(e){var i;const{rowNode:t,column:n}=e;(i=this.cellValidations.get(t))==null||i.delete(n)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},xA=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e!=null&&e.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function dw(e,t={}){var u;const{rowIndex:n,rowId:i,rowCtrl:s,rowPinned:o}=t;if(s)return s;const{rowModel:r,rowRenderer:a}=e;let{rowNode:l}=t;return l||(i?l=wZ(e,i,o):n!=null&&(l=r.getRow(n))),(u=a.getRowCtrls(l?[l]:[]))==null?void 0:u[0]}function cn(e,t={}){var c;const{cellCtrl:n,colId:i,columnId:s,column:o}=t;if(n)return n;const r=e.colModel.getCol(i??s??hw(o)),a=t.rowCtrl??dw(e,t),l=(a==null?void 0:a.getCellCtrl(r))??void 0;if(l)return l;const u=t.rowNode??(a==null?void 0:a.rowNode);if(u)return(c=e.rowRenderer.getCellCtrls([u],[r]))==null?void 0:c[0]}function _A(e){const{editSvc:t}=e;t!=null&&t.isBatchEditing()?ou(e):t==null||t.stopEditing(void 0,{source:"api"})}function ZQ(e,t,n){const{gos:i,popupSvc:s}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;const o=r=>{const a=r.relatedTarget;if(cy(a)===null){_A(t);return}let l=n.some(u=>u.contains(a))&&i.isElementInThisInstance(a);l||(l=!!s&&(s.getActivePopups().some(u=>u.contains(a))||s.isElementWithinCustomPopup(a))),l||_A(t)};for(const r of n)e.addManagedElementListeners(r,{focusout:o})}function hw(e){if(e)return typeof e=="string"?e:e.getColId()}var os=Symbol("unedited");function PA(e,t={}){var s;const n=[],i=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns);for(const o of i){const r=(s=o.comp)==null?void 0:s.getCellEditor();r&&n.push({ctrl:o,editor:sd(r)})}return n}var JQ=(e,t={})=>PA(e,t).map(n=>n.editor);function XQ(e,t,n,i,s,o){var d;t.length===0&&(n!=null&&n.rowNode)&&(n!=null&&n.column)&&su(e,n,{key:i,event:s,cellStartedEdit:o});const{valueSvc:r,editSvc:a,editModelSvc:l}=e,{rowNode:u,column:c}=n??{};for(const h of t){const{rowNode:p,column:g}=h,C=cn(e,h);if(!C){if(p&&g){const S=r.getValue(g,p,void 0,"api"),y=((n==null?void 0:n.rowNode)===p&&(n==null?void 0:n.column)===g&&i||void 0)??(a==null?void 0:a.getCellDataValue(h,!1))??((d=r.getValueForDisplay(g,p))==null?void 0:d.value)??S??os;l==null||l.setEdit(h,{pendingValue:y,sourceValue:S,state:"editing"})}continue}const v=o&&u===C.rowNode&&C.column===c;su(e,{rowNode:u,column:C.column},{key:v?i:null,event:v?s:null,cellStartedEdit:v&&o})}}function Wo({pendingValue:e,sourceValue:t}){return e===os&&(e=t),e!==t}function su(e,t,n){var S,R,E,y,b,F,x,V,I,M;const i=e.gos.get("enableGroupEdit"),{key:s,event:o,cellStartedEdit:r,silent:a}=n??{},l=cn(e,t),u=(S=l==null?void 0:l.comp)==null?void 0:S.getCellEditor(),c=IA(e,t,s,r&&!a),d=(R=e.editModelSvc)==null?void 0:R.getEdit(t);let h=c.value;if(h===void 0&&(h=d==null?void 0:d.sourceValue),(E=e.editModelSvc)==null||E.setEdit(t,{editorValue:h,state:"editing"}),u){(y=u.refresh)==null||y.call(u,c);return}const p=t.column.getColDef(),g=_P(e.userCompFactory,p,c),C=(g==null?void 0:g.popupFromSelector)!=null?g.popupFromSelector:!!p.cellEditorPopup,v=(g==null?void 0:g.popupPositionFromSelector)!=null?g.popupPositionFromSelector:p.cellEditorPopupPosition;if(kA(g.params,o),l){l.editCompDetails=g,l.onEditorAttachedFuncs.push(()=>{var N;return(N=l.rangeFeature)==null?void 0:N.unsetComp()}),(b=l.comp)==null||b.setEditDetails(g,C,v,e.gos.get("reactiveCustomComponents")),(F=l==null?void 0:l.rowCtrl)==null||F.refreshRow({suppressFlash:!0});const P=(x=e.editModelSvc)==null?void 0:x.getEdit(t,!0);!a&&!((V=P==null?void 0:P.editorState)!=null&&V.cellStartedEditing)&&((I=e.editSvc)==null||I.dispatchCellEvent(t,o,"cellEditingStarted",i?{value:h}:{}),(M=e.editModelSvc)==null||M.setEdit(t,{editorState:{cellStartedEditing:!0}}))}}function AA(e,t,n){var o,r;const i={editorValueExists:!1};if(pw(e)){const a=(o=t.getValidationErrors)==null?void 0:o.call(t);if(((a==null?void 0:a.length)??0)>0)return i}if(n!=null&&n.isCancelling)return i;if(n!=null&&n.isStopping){const a=(r=t==null?void 0:t.isCancelAfterEnd)==null?void 0:r.call(t);if(a)return{...i,isCancelAfterEnd:a}}return{editorValue:t.getValue(),editorValueExists:!0}}function IA(e,t,n,i){var R,E,y,b;const{valueSvc:s,gos:o,editSvc:r}=e,a=e.gos.get("enableGroupEdit"),l=cn(e,t),u=((R=t.rowNode)==null?void 0:R.rowIndex)??void 0,c=r==null?void 0:r.isBatchEditing(),d=e.colModel.getCol(t.column.getId()),{rowNode:h,column:p}=t,g=(E=l.comp)==null?void 0:E.getCellEditor(),C=r==null?void 0:r.getCellDataValue(t,!1),v=C===void 0?g?(y=AA(e,g))==null?void 0:y.editorValue:void 0:C,S=v===os?(b=s.getValueForDisplay(d,h))==null?void 0:b.value:v;return dt(o,{value:a?v:S,eventKey:n??null,column:p,colDef:p.getColDef(),rowIndex:u,node:h,data:h.data,cellStartedEdit:i??!1,onKeyDown:l==null?void 0:l.onKeyDown.bind(l),stopEditing:F=>{r.stopEditing(t,{source:c?"ui":"api",suppressNavigateAfterEdit:F}),_p(e,t)},eGridCell:l==null?void 0:l.eGui,parseValue:F=>s.parseValue(d,h,F,l==null?void 0:l.value),formatValue:l==null?void 0:l.formatValue.bind(l),validate:()=>{r==null||r.validateEdit()}})}function fw(e,t){const{editModelSvc:n}=e;n==null||n.getEditMap().forEach((i,s)=>{i.forEach((o,r)=>{!t&&(o.state==="editing"||o.pendingValue===os)||!Wo(o)&&(o.state!=="editing"||t)&&(n==null||n.removeEdits({rowNode:s,column:r}))})})}function QQ(e,t){var u;const n=(u=t.comp)==null?void 0:u.getCellEditor();if(!(n!=null&&n.refresh))return;const{eventKey:i,cellStartedEdit:s}=t.editCompDetails.params,{column:o}=t,r=IA(e,t,i,s),a=o.getColDef(),l=_P(e.userCompFactory,a,r);n.refresh(kA(l.params,i))}function kA(e,t){var n;return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes((t==null?void 0:t.key)??"")||e.suppressPreventDefault:(n=t==null?void 0:t.preventDefault)==null||n.call(t),e}function ka(e,t){var n,i,s;for(const o of((n=e.editModelSvc)==null?void 0:n.getEditPositions())??[]){const r=cn(e,o);if(!r)continue;const a=(i=r.comp)==null?void 0:i.getCellEditor();if(!a)continue;const{editorValue:l,editorValueExists:u,isCancelAfterEnd:c}=AA(e,a,t);c&&((s=e.editModelSvc)==null||s.setEdit(o,{editorState:{isCancelAfterEnd:c}})),xp(e,o,l,void 0,!u,t)}}function xp(e,t,n,i,s,o){const{editModelSvc:r,valueSvc:a}=e;if(!r)return;const{rowNode:l,column:u}=t;if(!(l&&u))return;let c=r.getEdit(t,!0);c!=null&&c.sourceValue||(c=r.setEdit(t,{sourceValue:a.getValue(u,l,void 0,"api"),pendingValue:c?c.editorValue:os})),r.setEdit(t,{editorValue:s?c.sourceValue:n}),o!=null&&o.persist&&eee(e,t)}function eee(e,t){const{editModelSvc:n}=e,i=n==null?void 0:n.getEdit(t,!0);n==null||n.setEdit(t,{pendingValue:i==null?void 0:i.editorValue})}function ou(e,t,n){var i;t||(t=(i=e.editModelSvc)==null?void 0:i.getEditPositions());for(const s of t??[])_p(e,s,n)}function _p(e,t,n){var u,c;const i=e.gos.get("enableGroupEdit"),{editModelSvc:s}=e,o=cn(e,t),r=s==null?void 0:s.getEdit(t,!0);if(!o){r&&(s==null||s.setEdit(t,{state:"changed"}));return}const{comp:a}=o;if(a&&!a.getCellEditor()){if(o==null||o.refreshCell(),r){s==null||s.setEdit(t,{state:"changed"});const d=i?OA(n,r):{valueChanged:!1,newValue:void 0,oldValue:r.sourceValue};MA(e,t,d,n)}return}if(pw(e)){const d=(c=(u=a==null?void 0:a.getCellEditor())==null?void 0:u.getValidationErrors)==null?void 0:c.call(u),h=s==null?void 0:s.getCellValidationModel();d!=null&&d.length?h==null||h.setCellValidation(t,{errorMessages:d}):h==null||h.clearCellValidation(t)}s==null||s.setEdit(t,{state:"changed"}),a==null||a.setEditDetails(),a==null||a.refreshEditStyles(!1,!1),o==null||o.refreshCell({force:!0,suppressFlash:!0});const l=s==null?void 0:s.getEdit(t);if(l&&l.state==="changed"){const d=i?OA(n,l):{valueChanged:Wo(l)&&!(n!=null&&n.cancel),newValue:n!=null&&n.cancel||l.editorState.isCancelAfterEnd?void 0:(l==null?void 0:l.editorValue)??(r==null?void 0:r.pendingValue),oldValue:l==null?void 0:l.sourceValue};MA(e,t,d,n)}}function OA(e,t){return e!=null&&e.cancel?{valueChanged:!1,oldValue:t.sourceValue,newValue:void 0,value:t.sourceValue}:{valueChanged:!1,oldValue:t.sourceValue,newValue:t.pendingValue,value:t.sourceValue}}function MA(e,t,n,{silent:i,event:s}={}){const{editSvc:o,editModelSvc:r}=e,a=r==null?void 0:r.getEdit(t),{editorState:l}=a||{},{isCancelBeforeStart:u}=l||{};!i&&!u&&(o==null||o.dispatchCellEvent(t,s,"cellEditingStopped",n),r==null||r.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function pw(e){var r;const{gos:t,colModel:n}=e,i=!!t.get("getFullRowEditValidationErrors"),s=(r=n.getColumnDefs())==null?void 0:r.filter(a=>a.editable).some(({cellEditorParams:a})=>{const{minLength:l,maxLength:u,getValidationErrors:c,min:d,max:h}=a||{};return l!==void 0||u!==void 0||c!==void 0||d!==void 0||h!==void 0}),o=e.gridApi.getCellEditorInstances().some(a=>a.getValidationElement||a.getValidationErrors);return s||i||o}function Oa(e,t){var h,p,g,C,v,S,R,E;if(!(t||pw(e)))return;const n=PA(e),i=new TA,{ariaAnnounce:s,localeSvc:o,editModelSvc:r,gos:a}=e,l=a.get("editType")==="fullRow",c=L_(o)("ariaValidationErrorPrefix","Cell Editor Validation");for(const y of n){const{ctrl:b,editor:F}=y,{rowNode:x,column:V}=b,I=((h=F.getValidationErrors)==null?void 0:h.call(F))??[],M=((p=F.getValidationElement)==null?void 0:p.call(F,!1))||!((g=F.isPopup)!=null&&g.call(F))&&b.eGui;if(M){const P=I!=null&&I.length>0,N=P?I.join(". "):"";qj(M,P),P&&s.announceValue(`${c} ${I}`,"editorValidation"),M instanceof HTMLInputElement?M.setCustomValidity(N):M.classList.toggle("invalid",P)}(I==null?void 0:I.length)>0&&i.setCellValidation({rowNode:x,column:V},{errorMessages:I})}ka(e,{persist:!1}),r==null||r.setCellValidationModel(i);const d=new Set;for(const{ctrl:y}of n)d.add(y.rowCtrl);if(l){const y=tee(e);r==null||r.setRowValidationModel(y)}for(const y of d.values()){(C=y.rowEditStyleFeature)==null||C.applyRowStyles();for(const b of y.getAllCellCtrls())(v=b.tooltipFeature)==null||v.refreshTooltip(!0),(S=b.editorTooltipFeature)==null||S.refreshTooltip(!0),(E=(R=b.editStyleFeature)==null?void 0:R.applyCellStyles)==null||E.call(R)}}var tee=e=>{var s;const t=new xA,n=e.gos.get("getFullRowEditValidationErrors"),i=(s=e.editModelSvc)==null?void 0:s.getEditMap();if(!i)return t;for(const o of i.keys()){const r=i.get(o);if(!r)continue;const a=[],{rowIndex:l,rowPinned:u}=o;for(const d of r.keys()){const h=r.get(d);if(!h)continue;const{editorValue:p,pendingValue:g,sourceValue:C}=h,v=p??(g===os?void 0:g)??C;a.push({column:d,colId:d.getColId(),rowIndex:l,rowPinned:u,oldValue:C,newValue:v})}const c=(n==null?void 0:n({editorsState:a}))??[];c.length>0&&t.setRowValidation({rowNode:o},{errorMessages:c})}return t};function nee(e){var i;Oa(e,!0);const t=(i=e.editModelSvc)==null?void 0:i.getCellValidationModel().getCellValidationMap();if(!t)return null;const n=[];return t.forEach((s,o)=>{s.forEach(({errorMessages:r},a)=>{n.push({column:a,rowIndex:o.rowIndex,rowPinned:o.rowPinned,messages:r??null})})}),n}function iee(e,t,n,{rowNode:i,column:s},o){return dt(e.gos,{type:n,node:i,data:i.data,value:o,column:s,colDef:s.getColDef(),rowPinned:i.rowPinned,event:t,rowIndex:i.rowIndex})}function see(e,t=!1){return e===se.DELETE?!0:!t&&e===se.BACKSPACE?IP():!1}var oee=class extends ge{constructor(e,t,n,i){super(),this.cellCtrl=e,this.rowNode=n,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case se.ENTER:this.onEnterKeyDown(e);break;case se.F2:this.onF2KeyDown(e);break;case se.ESCAPE:this.onEscapeKeyDown(e);break;case se.TAB:this.onTabKeyDown(e);break;case se.BACKSPACE:case se.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case se.DOWN:case se.UP:case se.RIGHT:case se.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){var s,o;const{cellCtrl:n,beans:i}=this;if(!((s=i.editSvc)!=null&&s.isEditing(n,{withOpenEditor:!0}))){if(e.shiftKey&&n.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const r=n.getFocusedCellPosition();(o=i.navigation)==null||o.navigateToNextCell(e,t,r,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:n}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&(e.key===se.LEFT||e.key===se.RIGHT?n==null||n.ensureColumnVisible(i.column):n==null||n.ensureRowVisible(i.rowIndex))}onTabKeyDown(e){var t;(t=this.beans.navigation)==null||t.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var u;const{cellCtrl:n,beans:i,rowNode:s}=this,{gos:o,rangeSvc:r,eventSvc:a,editSvc:l}=i;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),see(e,o.get("enableCellEditingOnBackspace"))&&!(l!=null&&l.isEditing(n,{withOpenEditor:!0}))){if(r&&Oo(o))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(n.isCellEditable()){const{column:c}=n,d=this.beans.valueSvc.getDeleteValue(c,s);s.setDataValue(c,d,"cellClear")}}else l!=null&&l.isEditing(n,{withOpenEditor:!0})||(u=i.editSvc)==null||u.startEditing(n,{startedEdit:!0,event:t});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){var u;const{cellCtrl:t,beans:n}=this,{editSvc:i,navigation:s}=n,o=i==null?void 0:i.isEditing(t,{withOpenEditor:!0}),r=t.rowNode,a=i==null?void 0:i.isRowEditing(r,{withOpenEditor:!0}),l=c=>{(i==null?void 0:i.startEditing(c,{startedEdit:!0,event:e,source:"edit"}))&&e.preventDefault()};if(o||a){if(this.isCtrlEnter(e)){i==null||i.applyBulkEdit(t,((u=n==null?void 0:n.rangeSvc)==null?void 0:u.getCellRanges())||[]);return}if(Oa(n),(i==null?void 0:i.checkNavWithValidation(void 0,e))==="block-stop")return;i!=null&&i.isEditing(t,{withOpenEditor:!0})?i==null||i.stopEditing(t,{event:e,source:"edit"}):a&&!t.isCellEditable()?i==null||i.stopEditing({rowNode:r},{event:e,source:"edit"}):l(t)}else if(n.gos.get("enterNavigatesVertically")){const c=e.shiftKey?se.UP:se.DOWN;s==null||s.navigateToNextCell(null,c,t.cellPosition,!1)}else{if(i!=null&&i.hasValidationErrors())return;i!=null&&i.hasValidationErrors(t)&&i.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===se.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:n}}=this;n!=null&&n.isEditing()&&(Oa(this.beans),(n==null?void 0:n.checkNavWithValidation(void 0,e))==="block-stop")||n==null||n.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:n}}=this;(n==null?void 0:n.checkNavWithValidation(t,e))==="block-stop"&&n.revertSingleCellEdit(t),n==null||n.stopEditing(t,{event:e,cancel:!0})}processCharacter(e){var r;const n=e.target!==this.eGui,{beans:{editSvc:i},cellCtrl:s}=this;if(n||i!=null&&i.isEditing(s,{withOpenEditor:!0}))return;if(e.key===se.SPACE)this.onSpaceKeyDown(e);else if(i!=null&&i.isCellEditable(s,"ui")){if(i!=null&&i.hasValidationErrors()&&!(i!=null&&i.hasValidationErrors(s)))return;i==null||i.startEditing(s,{startedEdit:!0,event:e,source:"api"});const a=s.editCompDetails;!((r=a==null?void 0:a.params)!=null&&r.suppressPreventDefault)&&e.preventDefault()}}onSpaceKeyDown(e){var s;const{gos:t,editSvc:n}=this.beans,{rowNode:i}=this.cellCtrl;!(n!=null&&n.isEditing(this.cellCtrl,{withOpenEditor:!0}))&&wa(t)&&((s=this.beans.selectionSvc)==null||s.handleSelectionEvent(e,i,"spaceKey")),e.preventDefault()}},ree=class extends ge{constructor(e,t,n){super(),this.cellCtrl=e,this.column=n,this.beans=t}onMouseEvent(e,t){if(!Go(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){var C;if((C=this.beans.touchSvc)!=null&&C.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:n,editSvc:i,editModelSvc:s,frameworkOverrides:o,gos:r}=this.beans,a=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:u,cellPosition:c,rowNode:d}=l,h=dp(r,u,d,e);n&&a&&!h&&n.getCellRangeCount(c)>1&&n.intersectLastRange(!0);const p=l.createEvent(e,"cellClicked");p.isEventHandlingSuppressed=h,t.dispatchEvent(p);const g=u.getColDef();if(g.onCellClicked&&window.setTimeout(()=>{o.wrapOutgoing(()=>{g.onCellClicked(p)})},0),!h&&(s==null?void 0:s.getState(l))!=="editing"){const v=i==null?void 0:i.isEditing(),S=(s==null?void 0:s.getCellValidationModel().getCellValidationMap().size)??0,R=(s==null?void 0:s.getRowValidationModel().getRowValidationMap().size)??0;if(v&&(S>0||R>0))return;i!=null&&i.shouldStartEditing(l,e)?i==null||i.startEditing(l,{event:e}):i!=null&&i.shouldStopEditing(l,e)&&(this.beans.gos.get("editType")==="fullRow"?i==null||i.stopEditing(l,{event:e,source:"edit"}):i==null||i.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:n,cellCtrl:i}=this,{eventSvc:s,frameworkOverrides:o,editSvc:r,editModelSvc:a,gos:l}=n,u=dp(l,i.column,i.rowNode,e),c=t.getColDef(),d=i.createEvent(e,"cellDoubleClicked");if(d.isEventHandlingSuppressed=u,s.dispatchEvent(d),typeof c.onCellDoubleClicked=="function"&&window.setTimeout(()=>{o.wrapOutgoing(()=>{c.onCellDoubleClicked(d)})},0),!u&&r!=null&&r.shouldStartEditing(i,e)&&(a==null?void 0:a.getState(i))!=="editing"){const h=r==null?void 0:r.isEditing(),p=(a==null?void 0:a.getCellValidationModel().getCellValidationMap().size)??0,g=(a==null?void 0:a.getRowValidationModel().getRowValidationMap().size)??0;if(h&&(p>0||g>0))return;r==null||r.startEditing(i,{event:e})}}onMouseDown(e){const{ctrlKey:t,metaKey:n,shiftKey:i}=e,s=e.target,{cellCtrl:o,beans:r}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:u,focusSvc:c,gos:d,editSvc:h}=r,{column:p,rowNode:g,cellPosition:C}=o,v=dp(d,p,g,e),S=()=>{const b=o.createEvent(e,"cellMouseDown");b.isEventHandlingSuppressed=v,a.dispatchEvent(b)};if(v){S();return}if(this.isRightClickInExistingRange(e))return;const R=l&&!l.isEmpty(),E=this.containsWidget(s),y=No(p);if(u&&y&&!u.handleMouseDownOnCell(C,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!i||!R){const b=h==null?void 0:h.isEditing(o),x=d.get("enableCellTextSelection")&&e.defaultPrevented,V=(Cr()||x)&&!b&&!Gc(s)&&!E;o.focusCell(V,e)}if(i&&R&&!c.isCellFocused(C)){e.preventDefault();const b=c.getFocusedCell();if(b){const{column:F,rowIndex:x,rowPinned:V}=b;h!=null&&h.isEditing(b)&&(h==null||h.stopEditing(b)),c.setFocusedCell({column:F,rowIndex:x,rowPinned:V,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}if(!E){if(l){y&&e.preventDefault();const b=rP(r,e)&&y;if(i)l.extendLatestRangeToCell(C);else if(!b){const F=t||n;l.setRangeToCell(C,F)}}S()}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const n=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=rP(this.beans,e);if(n&&i)return!0}return!1}containsWidget(e){return Ca(e,"ag-selection-checkbox",3)||Ca(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:n}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),n==null||n.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:n}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),n==null||n.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,n=t.contains(e.target),i=t.contains(e.relatedTarget);return n&&i}},aee=class extends ge{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();vr(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,n=e.getColSpan(t),i=[];if(n===1)i.push(e);else{let s=e;const o=e.getPinned();for(let r=0;s&&r<n&&(i.push(s),s=this.beans.visibleCols.getColAfter(s),!(!s||on(s)||o!==s.getPinned()));r++);}return i}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=Zt(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,n=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const i=t.bodyWidth;return n+i+(e||0)}return n+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const n=ba(this.beans)*this.rowSpan;this.eContent.style.height=`${n}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},lee="ag-cell",uee="ag-cell-auto-height",cee="ag-cell-normal-height",dee="ag-cell-focus",hee="ag-cell-first-right-pinned",fee="ag-cell-last-left-pinned",pee="ag-cell-not-inline-editing",gee="ag-cell-wrap-text",mee=0,ru=class extends ge{constructor(e,t,n,i){super(),this.column=e,this.rowNode=t,this.rowCtrl=i,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=n,this.gos=n.gos,this.editSvc=n.editSvc,this.hasEdit=!!n.editSvc;const{colId:s}=e;this.instanceId=s+"-"+mee++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){var i,s;const{beans:e}=this;this.positionFeature=new aee(this,e),this.customStyleFeature=(i=e.cellStyles)==null?void 0:i.createCellCustomStyleFeature(this,e),this.editStyleFeature=(s=e.editSvc)==null?void 0:s.createCellStyleFeature(this,e),this.mouseListener=new ree(this,e,this.column),this.keyboardListener=new oee(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&Oo(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this)),No(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){var n;this.tooltipFeature=(n=this.beans.tooltipSvc)==null?void 0:n.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){var t;this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=(t=this.beans.tooltipSvc)==null?void 0:t.setupCellEditorTooltip(this,e),Oa(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,n,i,s,o,r){var a,l,u,c,d,h,p,g,C;if(this.comp=e,this.eGui=t,this.printLayout=s,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),(a=this.positionFeature)==null||a.init(),(l=this.customStyleFeature)==null||l.setComp(e),(u=this.editStyleFeature)==null||u.setComp(e),(c=this.tooltipFeature)==null||c.refreshTooltip(),(d=this.keyboardListener)==null||d.init(),(h=this.rangeFeature)==null||h.setComp(e),(p=this.rowResizeFeature)==null||p.refreshRowResizer(),o&&this.isCellEditable()||this.hasEdit&&((g=this.editSvc)!=null&&g.isEditing(this,{withOpenEditor:!0}))?(C=this.editSvc)==null||C.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const v of this.onCompAttachedFuncs)v();this.onCompAttachedFuncs=[]}}setupAutoHeight(e,t){var n;this.isAutoHeight=((n=this.beans.rowAutoHeight)==null?void 0:n.setupCellAutoHeight(this,e,t))??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){var l,u;const{beans:e,column:t}=this,{userCompFactory:n,ctrlsSvc:i,eventSvc:s}=e,o=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const a=xP(n,o,r);if((u=(l=i.getGridBodyCtrl())==null?void 0:l.scrollFeature)!=null&&u.isScrolling()){let c;const d=new gn(p=>{c=p}),[h]=this.addManagedListeners(s,{bodyScrollEnd:()=>{c(),h()}});return{loadingComp:a,onReady:d}}return{loadingComp:a,onReady:gn.resolve()}}showValue(e,t){var d,h,p,g;const{beans:n,column:i,rowNode:s,rangeFeature:o}=this,{userCompFactory:r}=n;let a=this.getValueToDisplay(),l;const u=s.stub&&((d=s.groupData)==null?void 0:d[i.getId()])==null,c=i.getColDef();if(u||this.isCellRenderer()){const C=this.createCellRendererParams();!u||No(i)?l=TP(r,c,C):l=xP(r,c,C)}if(!l&&!u&&((h=n.findSvc)!=null&&h.isMatch(s,i))){const C=this.createCellRendererParams();l=TP(r,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},C)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(s,{checkSiblings:!0})){const C=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});C&&(C.compDetails?l=C.compDetails:C.valueToDisplay&&(a=C.valueToDisplay))}this.comp.setRenderDetails(l,a,e),(p=this.customRowDragComp)==null||p.refreshVisibility(),!t&&o&&ko(n,()=>o==null?void 0:o.refreshHandle()),(g=this.rowResizeFeature)==null||g.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){const e="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer";let n="";return t&&(n=" ag-allow-overflow"),`${e}${n}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&cd(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:n}=this.beans.gridOptions,i=Kf(t),s=Lo(this.column);return n==="custom"&&i!=="selectionColumn"&&s?!1:e.checkboxSelection||s&&typeof t=="object"&&jl(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),n=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||n||i||s}onPopupEditorClosed(){const{editSvc:e}=this.beans;e!=null&&e.isEditing(this,{withOpenEditor:!0})&&(e==null||e.stopEditing(this,{source:e!=null&&e.isBatchEditing()?"ui":"api"}))}stopEditing(e=!1){const{editSvc:t}=this.beans;return(t==null?void 0:t.stopEditing(this,{cancel:e,source:t!=null&&t.isBatchEditing()?"ui":"api"}))??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:n,rowNode:i,comp:s,eGui:o,beans:{valueSvc:r,gos:a,editSvc:l}}=this;return dt(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(n,i).value,setValue:c=>(l==null?void 0:l.setDataValue({rowNode:i,column:n},c))||i.setDataValue(n,c),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:n.getPinned(),colDef:n.getColDef(),column:n,refreshCell:this.refreshCell.bind(this),eGridCell:o,eParentOfValue:s.getParentOfValue(),registerRowDragger:(c,d,h,p)=>this.registerRowDragger(c,d,p),setTooltip:(c,d)=>{var h;a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(c,d),(h=this.tooltipFeature)==null||h.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){var t;if(this.refreshShouldDestroy()?(t=this.rowCtrl)==null||t.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:n,comp:i}=this;!(i!=null&&i.getCellEditor())&&n.isEditing(this,{withOpenEditor:!0})&&n.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell({force:e,suppressFlash:t,newData:n}={}){var b;const{editStyleFeature:i,customStyleFeature:s,rowCtrl:{rowEditStyleFeature:o},beans:{cellFlashSvc:r,filterManager:a},column:l,comp:u,suppressRefreshCell:c,tooltipFeature:d}=this;if(c)return;const{field:h,valueGetter:p,showRowGroup:g,enableCellChangeFlash:C}=l.getColDef(),v=h==null&&p==null&&g==null,S=e||v||n,R=!!u,E=this.updateAndFormatValue(R),y=S||E;if(R){if(y){this.showValue(!!n,!1);const F=a==null?void 0:a.isSuppressFlashingCellsBecauseFiltering();!t&&!F&&C&&(r==null||r.flashCell(this)),(b=i==null?void 0:i.applyCellStyles)==null||b.call(i),s==null||s.applyUserStyles(),s==null||s.applyClassesFromColDef(),o==null||o.applyRowStyles()}d==null||d.refreshTooltip(),s==null||s.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,n=this.valueFormatted,{value:i,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode,!0);return this.value=i,this.valueFormatted=s,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=n:!0}valuesAreEqual(e,t){const n=this.column.getColDef();return n.equals?n.equals(e,t):e===t}addDomData(e){const t=this.eGui;Sa(this.beans.gos,t,hp,this),e.addDestroyFunc(()=>Sa(this.beans.gos,t,hp,null))}createEvent(e,t){const{rowNode:n,column:i,value:s,beans:o}=this;return iee(o,e,t,{rowNode:n,column:i},s)}processCharacter(e){var t;(t=this.keyboardListener)==null||t.processCharacter(e)}onKeyDown(e){var t;(t=this.keyboardListener)==null||t.onKeyDown(e)}onMouseEvent(e,t){var n;(n=this.mouseListener)==null||n.onMouseEvent(e,t)}getColSpanningList(){var e;return((e=this.positionFeature)==null?void 0:e.getColSpanningList())??[]}onLeftChanged(){var e;this.comp&&((e=this.positionFeature)==null||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:n}=this;T1(e,t,n.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);S_(this.eGui,e)}onWidthChanged(){var e;return(e=this.positionFeature)==null?void 0:e.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){var e;this.comp&&((e=this.rangeFeature)==null||e.updateRangeBordersIfRangeCount())}onCellSelectionChanged(){var e;this.comp&&((e=this.rangeFeature)==null||e.onCellSelectionChanged())}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){var i;const n=(i=this.editSvc)==null?void 0:i.allowedFocusTargetOnValidation(this);n&&n!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:n},comp:i}=this;if(!i||t!=null&&t.isEditing(this)||!this.isCellFocused()||!n.shouldTakeFocus())return;const s=()=>{if(!this.isAlive())return;const o=i.getFocusableElement();this.isCellFocused()&&o.focus({preventScroll:!0})};if(e){setTimeout(s,0);return}s()}onRowIndexChanged(){var e,t;this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),(e=this.rangeFeature)==null||e.onCellSelectionChanged(),(t=this.rowResizeFeature)==null||t.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(No(this.column)&&(e=!0),Mi(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(hee,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(fee,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){var s;const{beans:t}=this;if(wp(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const n=this.isCellFocused(),i=((s=t.editSvc)==null?void 0:s.isEditing(this))??!1;if(this.comp.toggleCss(dee,n),n&&(e!=null&&e.forceBrowserFocus)){let o=this.comp.getFocusableElement();if(i){const r=Yl(o,null,!0);r.length&&(o=r[0])}o.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}n&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:Io(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(lee,!0),e.toggleCss(pee,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(uee,t),e.toggleCss(cee,!t)}onColumnHover(){var e;(e=this.beans.colHover)==null||e.onCellColumnHover(this.column,this.comp)}onColDefChanged(){var e,t;this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),(e=this.editSvc)!=null&&e.isEditing(this)?(t=this.editSvc)==null||t.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(gee,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),n=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(n),t.onCellContextMenu&&window.setTimeout(()=>{i.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(n)})},0)}getCellRenderer(){var e;return((e=this.comp)==null?void 0:e.getCellRenderer())??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){var e;return((e=this.eGui)==null?void 0:e.contains(un(this.beans)))??!1}createSelectionCheckbox(){var t;const e=(t=this.beans.selectionSvc)==null?void 0:t.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,n){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const i=this.createRowDragComp(e,t,n);i&&(this.customRowDragComp=i,this.addDestroyFunc(()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null}),i.refreshVisibility())}createRowDragComp(e,t,n){var s;const i=(s=this.beans.rowDragSvc)==null?void 0:s.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,n);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}};function gw(e,t,n,i,s,o){if(n==null&&t==null)return;const r={},a={},l=(u,c)=>{for(const d of u.split(" "))d.trim()!=""&&c(d)};if(n){const u=Object.keys(n);for(let c=0;c<u.length;c++){const d=u[c],h=n[d];let p;typeof h=="string"?p=e?e.evaluate(h,i):!0:typeof h=="function"&&(p=h(i)),l(d,g=>{p?r[g]=!0:a[g]=!0})}}if(t&&o)for(const u of Object.keys(t))l(u,c=>{r[c]||(a[c]=!0)});o&&Object.keys(a).forEach(o),Object.keys(r).forEach(s)}function LA(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var vee=class extends ge{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const n=this.gos,i=r=>{if(typeof r=="string")e.push(r);else if(Array.isArray(r))for(const a of r)e.push(a)},s=n.get("rowClass");s&&i(s);const o=n.getCallback("getRowClass");if(o){const r={data:t.data,node:t,rowIndex:t.rowIndex},a=o(r);i(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,n=>{e.push(n)},()=>{})}processRowClassRules(e,t,n){const{gos:i,expressionSvc:s}=this.beans,o=dt(i,{data:e.data,node:e,rowIndex:e.rowIndex});gw(s,void 0,i.get("rowClassRules"),o,t,n)}processStylesFromGridOptions(e){const t=this.gos,n=t.get("rowStyle"),i=t.getCallback("getRowStyle");let s;if(i){const o={data:e.data,node:e,rowIndex:e.rowIndex};s=i(o)}if(s||n)return Object.assign({},n,s)}},Cee=0,Pp=class extends ge{constructor(e,t,n,i,s){var o,r;super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=s,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=((o=t.pagination)==null?void 0:o.getCurrentPage())??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+Cee++,this.rowId=Bc(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=LA(this.rowNode),this.setRowType(),this.setAnimateFlags(n),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=(r=t.editSvc)==null?void 0:r.createRowStyleFeature(this,t),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Bc(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,n,i){var d,h;const{context:s,focusSvc:o}=this.beans;i=nd(this,s,i);const r={rowComp:e,element:t,containerType:n,compBean:i};this.allRowGuis.push(r),this.updateGui(n,r),this.initialiseRowComp(r);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,u=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!u&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const c=(d=this.fullWidthGui)==null?void 0:d.element;c&&!((h=this.beans.editSvc)!=null&&h.isEditing(this))&&o.isRowFocused(a.rowIndex,a.rowPinned)&&o.shouldTakeFocus()&&setTimeout(()=>c.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";for(const n of this.allRowGuis)n.element.style.display=t}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),wa(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const n=e.rowComp,i=this.getInitialRowClasses(e.containerType);for(const s of i)n.toggleCss(s,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&AC(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(n),this.setRowCompRowBusinessKey(n),Sa(t,e.element,fp,this),e.compBean.addDestroyFunc(()=>Sa(t,e.element,fp,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Bc(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(GC(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(GC(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){var i;const t=(i=this.beans.rowDragSvc)==null?void 0:i.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const n=this.createBean(t,this.beans.context);this.rowDragComps.push(n),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(s=>s!==n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(n,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),n=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(n)}getFullWidthCellRenderers(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(n=>{var i;return(i=n==null?void 0:n.rowComp)==null?void 0:i.getFullWidthCellRenderer()}):[(t=(e=this.fullWidthGui)==null?void 0:e.rowComp)==null?void 0:t.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:n,beans:{visibleCols:i}}=this,s=!!e||!i.isPinningLeft(),o=!!t,r=!!n||!i.isPinningRight();return s&&o&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),n=this.gos.get("masterDetail")&&this.rowNode.detail,i=this.beans.colModel.isPivotMode(),s=nP(this.gos,this.rowNode,i);e?this.rowType="FullWidthLoading":n?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":s?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:n}=this.beans;if(!(n!=null&&n.active)||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(n.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){var n;if(!((n=this.beans.rowSpanSvc)!=null&&n.isCellSpanning(e,this.rowNode)))return new ru(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){var t;return!((t=this.beans.rowSpanSvc)!=null&&t.isCellSpanning(e.column,this.rowNode))}createCellCtrls(e,t,n=null){const i={list:[],map:{}},s=(u,c,d)=>{d!=null?i.list.splice(d,0,c):i.list.push(c),i.map[u]=c},o=[];for(const u of t){const c=u.getInstanceId();let d=e.map[c];d&&!this.isCorrectCtrlForSpan(d)&&(d.destroy(),d=void 0),d||(d=this.getNewCellCtrl(u)),d&&s(c,d)}for(const u of e.list){const c=u.column.getInstanceId();if(i.map[c]!=null)continue;!this.isCellEligibleToBeRemoved(u,n)?o.push([c,u]):u.destroy()}if(o.length)for(const[u,c]of o){const d=i.list.findIndex(p=>p.column.getLeft()>c.column.getLeft()),h=d===-1?void 0:Math.max(d-1,0);s(u,c,h)}const{focusSvc:r,visibleCols:a}=this.beans,l=r.getFocusedCell();if(l&&l.column.getPinned()==n){const u=l.column.getInstanceId();if(!i.map[u]&&a.allCols.includes(l.column)){const d=this.createFocusedCellCtrl();if(d){const h=i.list.findIndex(g=>g.column.getLeft()>d.column.getLeft()),p=h===-1?void 0:Math.max(h-1,0);s(u,d,p)}}}return i}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,n=e.getFocusedCell();if(!n)return;const i=t==null?void 0:t.getCellSpan(n.column,this.rowNode);if(i){if(i.firstNode!==this.rowNode||!i.doesSpanContain(n))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(n.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(const t of this.allRowGuis){const n=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(n,e)}}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const n=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,n);const i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");const s=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,s,"right")}}isCellEligibleToBeRemoved(e,t){const{column:s}=e;if(s.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{visibleCols:o,editSvc:r}=this.beans,a=r==null?void 0:r.isEditing(e),l=e.isCellFocused();return a||l?!(o.allCols.indexOf(s)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||Wn(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=ze(this.rowNode.oldRowTop),{visibleCols:n}=this.beans,i=n.isPinningLeft(),s=n.isPinningRight();if(t){const{slideInAnimation:o}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){o.fullWidth=!0;return}o.center=!0,o.left=i,o.right=s}else{const{fadeInAnimation:o}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){o.fullWidth=!0;return}o.center=!0,o.left=i,o.right=s}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,a)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).params):!0,t=e(this.fullWidthGui,null),n=e(this.centerGui,null),i=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&n&&i&&s}addListeners(){const{beans:e,gos:t,rowNode:n}=this,{expansionSvc:i,eventSvc:s,context:o,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...(i==null?void 0:i.getRowExpandedListeners(this))??{}}),n.detail&&this.addManagedListeners(n.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(n,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(s,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:a})=>{a&&!n.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,o),this.tooltipFeature=this.destroyBean(this.tooltipFeature,o),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,o)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(const l of this.allRowGuis)this.addRowDraggerToRow(l);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,o)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(const n of this.getAllCellCtrls())n.refreshCell(e);for(const n of this.allRowGuis)this.setRowCompRowId(n.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(n.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){var e;this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),(e=this.rowEditStyleFeature)==null||e.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=(e==null?void 0:e.row)===this.rowNode?e.position:"none",n=t==="above",i=t==="inside",s=t==="below",r=this.gos.get("treeData")&&(s||n),a=this.rowNode.uiLevel.toString();for(const l of this.allRowGuis){const u=l.rowComp;u.toggleCss("ag-row-highlight-above",n),u.toggleCss("ag-row-highlight-inside",i),u.toggleCss("ag-row-highlight-below",s),u.toggleCss("ag-row-highlight-indent",r),r?l.element.style.setProperty("--ag-row-highlight-level",a):l.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){var e;this.updateColumnLists(!0),(e=this.beans.rowAutoHeight)==null||e.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Io(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:n,column:i}=t;if(!(n.element===e.target))return;const r=this.rowNode,{focusSvc:a,navigation:l}=this.beans,u=a.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:(u==null?void 0:u.column)??i};l==null||l.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){var a;if(e.defaultPrevented||Go(e))return;const t=this.allRowGuis.find(l=>l.element.contains(e.target)),n=t?t.element:null,i=n===e.target,s=un(this.beans);let o=!1;n&&s&&(o=n.contains(s)&&s.classList.contains("ag-cell"));let r=null;!i&&!o&&(r=Fa(this.beans,n,!1,e.shiftKey)),(this.isFullWidth()&&i||!r)&&((a=this.beans.navigation)==null||a.onTabKeyDown(this,e))}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;const e=(t=this.allRowGuis.find(n=>qs(n.element)))==null?void 0:t.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const n of this.allRowGuis)Mi(n.element,"tabindex",t)}onFullWidthRowFocused(e){var s,o,r;const t=this.rowNode,n=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1;let i;if(this.fullWidthGui)i=this.fullWidthGui.element;else{const a=this.beans.colModel.getCol(e==null?void 0:e.column),l=a==null?void 0:a.pinned;l?i=l==="right"?(s=this.rightGui)==null?void 0:s.element:(o=this.leftGui)==null?void 0:o.element:i=(r=this.centerGui)==null?void 0:r.element}i&&(i.classList.toggle("ag-full-width-focus",n),n&&(e!=null&&e.forceBrowserFocus)&&i.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const n={list:[],map:{}};for(const i of e.list)i!==t&&(n.list.push(i),n.map[i.column.getInstanceId()]=i);return n}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:n}=this;return dt(this.gos,{type:e,node:n,data:n.data,rowIndex:n.rowIndex,rowPinned:n.rowPinned,event:t})}createRowEventWithSource(e,t){const n=this.createRowEvent(e,t);return n.source=this,n}onRowDblClick(e){if(Go(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),n=this.getColumnForFullWidth(t);if(!(!t||!n))return{rowGui:t,column:n}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e==null?void 0:e.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=Ca(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:n}=this.beans;t==null||t.removeAllCellRanges();const i=this.findFullWidthInfoForEvent(e);if(!i)return;const{rowGui:s,column:o}=i,r=s.element,a=e.target,l=this.rowNode;let u=e.defaultPrevented||Cr();r&&r.contains(a)&&Gc(a)&&(u=!1),n.setFocusedCell({rowIndex:l.rowIndex,column:o,rowPinned:l.rowPinned,forceBrowserFocus:u})}isSuppressMouseEvent(e){const{gos:t,rowNode:n}=this;if(this.isFullWidth()){const s=this.findFullWidthRowGui(e.target);return J9(t,s==null?void 0:s.rowComp.getFullWidthCellRendererParams(),n,e)}const i=Ly(t,e.target);return i!=null&&dp(t,i.column,n,e)}onRowClick(e){if(Go(e)||this.lastMouseDownOnDragger)return;const n=this.isSuppressMouseEvent(e),{eventSvc:i,selectionSvc:s}=this.beans,o=this.createRowEventWithSource("rowClicked",e);o.isEventHandlingSuppressed=n,i.dispatchEvent(o),!n&&(s==null||s.handleSelectionEvent(e,this.rowNode,"rowClicked"))}setupDetailRowAutoHeight(e){var t;this.rowType==="FullWidthDetail"&&((t=this.beans.masterDetailSvc)==null||t.setupDetailRowAutoHeight(this,e))}createFullWidthCompDetails(e,t){const{gos:n,rowNode:i}=this,s=dt(n,{fullWidth:!0,data:i.data,node:i,value:i.key,valueFormatted:i.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,a,l,u)=>this.addFullWidthRowDragging(r,a,l,u),setTooltip:(r,a)=>{n.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(r,a)}}),o=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return i7(o,s);case"FullWidthGroup":{const{value:r,valueFormatted:a}=this.beans.valueSvc.getValueForDisplay(void 0,this.rowNode,!0);return s.value=r,s.valueFormatted=a,n7(o,s)}case"FullWidthLoading":return t7(o,s);default:return e7(o,s)}}setupFullWidthRowTooltip(e,t){var n;this.fullWidthGui&&(this.tooltipFeature=(n=this.beans.tooltipSvc)==null?void 0:n.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,n="",i){const{rowDragSvc:s,context:o}=this.beans;if(!s||!this.isFullWidth())return;const r=s.createRowDragComp(()=>n,this.rowNode,void 0,e,t,i);this.createBean(r,o),this.addDestroyFunc(()=>{this.destroyBean(r,o)})}onUiLevelChanged(){const e=LA(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,n="ag-row-level-"+this.rowLevel;for(const i of this.allRowGuis)i.rowComp.toggleCss(t,!0),i.rowComp.toggleCss(n,!1)}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const n of this.allRowGuis)n.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const n of this.allRowGuis)n.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){var t;const e=[];if((t=this.beans.rowStyleSvc)==null||t.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(const n of e)for(const i of this.allRowGuis)i.rowComp.toggleCss(n,!0)}postProcessRowClassRules(){var e;(e=this.beans.rowStyleSvc)==null||e.processRowClassRules(this.rowNode,t=>{for(const n of this.allRowGuis)n.rowComp.toggleCss(t,!0)},t=>{for(const n of this.allRowGuis)n.rowComp.toggleCss(t,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,n=>n.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){var a,l;const t=this.getPinnedForContainer(e),n=this.isFullWidth(),{rowNode:i,beans:s}=this,o=[];o.push("ag-row"),o.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&o.push("ag-opacity-zero"),o.push(i.rowIndex%2===0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&(o.push("ag-row-pinned"),(a=s.pinnedRowModel)!=null&&a.isManual()&&o.push("ag-row-pinned-manual")),!i.isRowPinned()&&i.pinnedSibling&&o.push("ag-row-pinned-source"),i.isSelected()&&o.push("ag-row-selected"),i.footer&&o.push("ag-row-footer"),o.push("ag-row-level-"+this.rowLevel),i.stub&&o.push("ag-row-loading"),n&&o.push("ag-full-width-row"),(l=s.expansionSvc)==null||l.addExpandedCss(o,i),i.dragging&&o.push("ag-row-dragging");const{rowStyleSvc:r}=s;return r&&(r.processClassesFromGridOptions(o,i),r.preProcessRowClassRules(o,i)),o.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&o.push("ag-row-first"),this.isLastRowOnPage()&&o.push("ag-row-last"),n&&(t==="left"&&o.push("ag-cell-last-left-pinned"),t==="right"&&o.push("ag-cell-first-right-pinned")),o}processStylesFromGridOptions(){var e;return((e=this.beans.rowStyleSvc)==null?void 0:e.processStylesFromGridOptions(this.rowNode))??this.emptyStyle}onRowSelected(e){var t;(t=this.beans.selectionSvc)==null||t.onRowCtrlSelected(this,n=>{(n===this.centerGui||n===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){var e;(e=this.beans.selectionSvc)==null||e.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:n}=e,{rowNode:i,beans:s,gos:o}=this;n.addManagedListeners(t,{pointerenter:r=>{r.pointerType==="mouse"&&i.dispatchRowEvent("mouseEnter")},pointerleave:r=>{r.pointerType==="mouse"&&i.dispatchRowEvent("mouseLeave")}}),n.addManagedListeners(i,{mouseEnter:()=>{var r;!((r=s.dragSvc)!=null&&r.dragging)&&!o.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(n=>n.element);for(const n of t)n.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),n=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(n,e),i)}forEachGui(e,t){if(e)t(e);else for(const n of this.allRowGuis)t(n)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,n=this.beans.environment.getDefaultRowHeight(),s=J_(this.gos)?gr(this.beans,this.rowNode).height:void 0,o=s?`${Math.min(n,s)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,o&&r.element.style.setProperty("--ag-line-height",o)})}destroyFirstPass(e=!1){var i;this.active=!1;const{rowNode:t}=this;if(!e&&zl(this.gos)&&!t.sticky)if(t.rowTop!=null){const o=this.roundRowTopToBounds(t.rowTop);this.setRowTop(o)}else for(const o of this.allRowGuis)o.rowComp.toggleCss("ag-opacity-zero",!0);(i=this.fullWidthGui)!=null&&i.element.contains(un(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const n=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(n),this.beans.eventSvc.dispatchEvent(n),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const e=t=>{for(const n of t.list)n.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){var t;const e=((t=this.beans.pagination)==null?void 0:t.getCurrentPage())??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const n=this.beans.pageBounds.getPixelOffset();return e+n*(t?1:-1)}setRowTop(e){if(!this.printLayout&&ze(e)){const t=this.applyPaginationOffset(e),s=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(s)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let n;if(t.sticky)n=t.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,s=this.applyPaginationOffset(i);n=t.isRowPinned()?s:this.beans.rowContainerHeight.getRealPixelPosition(s)}return n+"px"}setRowTopStyle(e){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let n=null;for(const i of this.getAllCellCtrls())i.column==e&&(n=i);if(n!=null||t)return n;for(const i of this.getAllCellCtrls())(i==null?void 0:i.getColSpanningList().indexOf(e))>=0&&(n=i);return n}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){var o,r;const t=this.rowNode.getRowIndexString();if(t===null)return;const n=(((o=this.beans.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:o.getRowCount())??0)+(((r=this.beans.filterManager)==null?void 0:r.getHeaderRowCount())??0),i=this.rowNode.rowIndex%2===0,s=n+this.rowNode.rowIndex+1;this.forEachGui(e,a=>{a.rowComp.setRowIndex(t),a.rowComp.toggleCss("ag-row-even",i),a.rowComp.toggleCss("ag-row-odd",!i),Of(a.element,s)})}},yee=class extends ge{constructor(){super(),this.beanName="navigation",this.onPageDown=V_(this.onPageDown,100),this.onPageUp=V_(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const n=e.key,i=e.altKey,s=e.ctrlKey||e.metaKey,o=!!this.beans.rangeSvc&&e.shiftKey,r=Eq(this.gos,e);let a=!1;switch(n){case se.PAGE_HOME:case se.PAGE_END:!s&&!i&&(this.onHomeOrEndKey(n),a=!0);break;case se.LEFT:case se.RIGHT:case se.UP:case se.DOWN:if(!r)return!1;s&&!i&&!o&&(this.onCtrlUpDownLeftRight(n,r),a=!0);break;case se.PAGE_DOWN:case se.PAGE_UP:!s&&!i&&(a=this.handlePageUpDown(n,r,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,n){return n&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===se.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:n,focusIndex:i,focusColumn:s,isAsync:o,rowPinned:r}){const{scrollFeature:a}=this.gridBodyCon;ze(n)&&!n.isPinned()&&a.ensureColumnVisible(n),ze(e)&&a.ensureIndexVisible(e,t),o||a.ensureIndexVisible(i);const{focusSvc:l,rangeSvc:u}=this.beans;l.setFocusedCell({rowIndex:i,column:s,rowPinned:r,forceBrowserFocus:!0}),u==null||u.setRangeToCell({rowIndex:i,rowPinned:r,column:s})}onPageDown(e){const t=this.beans,n=mw(t),i=this.getViewportHeight(),{pageBounds:s,rowModel:o,rowAutoHeight:r}=t,a=s.getPixelOffset(),l=n.top+i,u=o.getRowIndexAtPixel(l+a);r!=null&&r.active?this.navigateToNextPageWithAutoHeight(e,u):this.navigateToNextPage(e,u)}onPageUp(e){const t=this.beans,n=mw(t),{pageBounds:i,rowModel:s,rowAutoHeight:o}=t,r=i.getPixelOffset(),a=n.top,l=s.getRowIndexAtPixel(a+r);o!=null&&o.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,n=!1){const{pageBounds:i,rowModel:s}=this.beans,o=this.getViewportHeight(),r=i.getFirstRow(),a=i.getLastRow(),l=i.getPixelOffset(),u=s.getRow(e.rowIndex),c=n?(u==null?void 0:u.rowHeight)-o-l:o-l,d=(u==null?void 0:u.rowTop)+c;let h=s.getRowIndexAtPixel(d+l);if(h===e.rowIndex){const g=n?-1:1;t=h=e.rowIndex+g}let p;n?(p="bottom",h<r&&(h=r),t<r&&(t=r)):(p="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(s.getRow(h))&&(t=h,p="top"),this.navigateTo({scrollIndex:t,scrollType:p,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,n=!1){this.navigateTo({scrollIndex:t,scrollType:n?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const i=this.getNextFocusIndexForAutoHeight(e,n);this.navigateTo({scrollIndex:t,scrollType:n?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const n=t?-1:1,i=this.getViewportHeight(),{pageBounds:s,rowModel:o}=this.beans,r=s.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const u=o.getRow(l);if(u){const c=u.rowHeight??0;if(a+c>i)break;a+=c}l+=n}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=mw(e),n=this.beans.scrollVisibleSvc.getScrollbarWidth();let i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=n),i}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const n=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),i=this.getNormalisedPosition(n),{rowIndex:s,rowPinned:o,column:r}=i??n,a=r;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:a,focusIndex:s,focusColumn:a,rowPinned:o})}onHomeOrEndKey(e){const t=e===se.PAGE_HOME,{visibleCols:n,pageBounds:i,rowModel:s}=this.beans,o=n.allCols,r=t?i.getFirstRow():i.getLastRow(),a=s.getRow(r);if(!a)return;const l=(t?o:[...o].reverse()).find(u=>!u.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){const n=t.shiftKey,i=this.tabToNextCellCommon(e,n,t),s=this.beans,{ctrlsSvc:o,pageBounds:r,focusSvc:a,gos:l}=s;if(i!==!1){i?t.preventDefault():i===null&&o.get("gridCtrl").allowFocusForNextCoreContainer(n);return}if(n){const{rowIndex:u,rowPinned:c}=e.getRowPosition();(c?u===0:u===r.getFirstRow())&&(l.get("headerHeight")===0||Pa(s)?tu(s,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof ru&&e.focusCell(!0),(a.focusOverlay(!1)||tu(s,n))&&t.preventDefault()}tabToNextCell(e,t){const n=this.beans,{focusSvc:i,rowRenderer:s}=n,o=i.getFocusedCell();if(!o)return!1;let r=nu(n,o);return!r&&(r=s.getRowByPosition(o),!(r!=null&&r.isFullWidth()))?!1:!!this.tabToNextCellCommon(r,e,t,"api")}tabToNextCellCommon(e,t,n,i="ui"){var l;const{editSvc:s,focusSvc:o}=this.beans;let r;const a=e instanceof ru?e:(l=e.getAllCellCtrls())==null?void 0:l[0];return s!=null&&s.isEditing()?r=s==null?void 0:s.moveToNextCell(a,t,n,i):r=this.moveToNextCellNotEditing(e,t,n),r===null?r:r||!!o.focusedHeader}moveToNextCellNotEditing(e,t,n){const i=this.beans.visibleCols.allCols;let s;if(e instanceof Pp){if(s={...e.getRowPosition(),column:t?i[0]:Zt(i)},this.gos.get("embedFullWidthRows")&&n){const r=e.findFullWidthInfoForEvent(n);r&&(s.column=r.column)}}else s=e.getFocusedCellPosition();const o=this.findNextCellToFocusOn(s,{backwards:t,startEditing:!1});if(o===!1)return null;if(o instanceof ru)o.focusCell(!0);else if(o)return this.tryToFocusFullWidthRow(o,t);return ze(o)}findNextCellToFocusOn(e,{backwards:t,startEditing:n,skipToNextEditableCell:i}){let s=e;const o=this.beans,{cellNavigation:r,gos:a,focusSvc:l,rowRenderer:u,rangeSvc:c}=o;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=r.getNextTabbedCell(s,t);const d=a.getCallback("tabToNextCell");if(ze(d)){const C=d({backwards:t,editing:n,previousCellPosition:e,nextCellPosition:s||null});if(C===!0)s=e;else{if(C===!1)return!1;s={rowIndex:C.rowIndex,column:C.column,rowPinned:C.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const g=so(o);return l.focusHeaderPosition({headerPosition:{headerRowIndex:g+s.rowIndex,column:s.column},fromCell:!0}),null}const h=a.get("editType")==="fullRow";if(n&&(!h||i)&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const p=nu(o,s);if(!p){const g=u.getRowByPosition(s);if(!g||!g.isFullWidth()||n)continue;return{...g.getRowPosition(),column:s==null?void 0:s.column}}if(!r.isSuppressNavigable(p.column,p.rowNode))return p.setFocusedCellPosition(s),c==null||c.setRangeToCell(s),p}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:n,rowModel:i}=this.beans;return t==="top"?n==null?void 0:n.getPinnedTopRow(e):t==="bottom"?n==null?void 0:n.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,n,i){let s=n,o=!1;const r=this.beans,{cellNavigation:a,focusSvc:l,gos:u}=r;for(;s&&(s===n||!this.isValidNavigateCell(s));)u.get("enableRtl")?t===se.LEFT&&(s=this.getLastCellOfColSpan(s)):t===se.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=a.getNextCellToFocus(t,s),o=on(s);if(o&&e&&e.key===se.UP&&(s={rowIndex:-1,rowPinned:null,column:n.column}),i){const d=u.getCallback("navigateToNextCell");if(ze(d)){const p=d({key:t,previousCellPosition:n,nextCellPosition:s||null,event:e});ze(p)?s={rowPinned:p.rowPinned,rowIndex:p.rowIndex,column:p.column}:s=null}}if(!s)return;if(s.rowIndex<0){const d=so(r);l.focusHeaderPosition({headerPosition:{headerRowIndex:d+s.rowIndex,column:n.column},event:e||void 0,fromCell:!0});return}const c=this.getNormalisedPosition(s);c?this.focusPosition(c):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){var i;if(!!((i=this.beans.spannedRowRenderer)!=null&&i.getCellByPosition(e)))return e;this.ensureCellVisible(e);const n=nu(this.beans,e);return n?(e=n.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:n,rowRenderer:i,focusSvc:s,eventSvc:o}=this.beans,r=n.allCols,a=i.getRowByPosition(e);if(!(a!=null&&a.isFullWidth()))return!1;const l=s.getFocusedCell(),u={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Zt(r):r[0])};this.focusPosition(u);const c=t??(l!=null&&mZ(u,l));return o.dispatchEvent({type:"fullWidthRowFocused",rowIndex:u.rowIndex,rowPinned:u.rowPinned,column:u.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:n}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),n==null||n.setRangeToCell(e)}isValidNavigateCell(e){return!!$o(this.beans,e)}getLastCellOfColSpan(e){const t=nu(this.beans,e);if(!t)return e;const n=t.getColSpanningList();return n.length===1?e:{rowIndex:e.rowIndex,column:Zt(n),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=Q_(this.gos),n=this.beans.rowModel.getRow(e.rowIndex),i=t&&(n==null?void 0:n.sticky),{scrollFeature:s}=this.gridBodyCon;!i&&on(e.rowPinned)&&s.ensureIndexVisible(e.rowIndex),e.column.isPinned()||s.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function mw(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var wee={moduleName:"KeyboardNavigation",version:$e,beans:[yee,$Q,QX],apiFunctions:{getFocusedCell:WQ,clearFocusedCell:zQ,setFocusedCell:UQ,setFocusedHeader:qQ,tabToNextCell:jQ,tabToPreviousCell:KQ}},bee=class extends ge{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:(e==null?void 0:e.animate)??!1,newData:(e==null?void 0:e.newData)??!1,newPage:(e==null?void 0:e.newPage)??!1,newPageSize:(e==null?void 0:e.newPageSize)??!1,keepRenderedRows:(e==null?void 0:e.keepRenderedRows)??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:n}=this.beans;t?t.calculatePages():e.calculateBounds(0,n.getRowCount()-1)}},See=class extends ge{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){var e;return((e=this.topRowBounds)==null?void 0:e.rowIndex)??-1}getLastRow(){var e;return((e=this.bottomRowBounds)==null?void 0:e.rowIndex)??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,n=(e==null?void 0:e.rowTop)??0,i=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:n,pageLastPixel:i}}calculateBounds(e,t){const{rowModel:n}=this.beans,i=n.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;const s=n.getRowBounds(t);s&&(s.rowIndex=t),this.bottomRowBounds=s,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){var t;const e=((t=this.topRowBounds)==null?void 0:t.rowTop)??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},Eee=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",Ree=class extends ge{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const n of this.elements)n&&(rn(n,t),Ys(n,e))}},Dee=class extends ge{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:n}=this.beans,i=Wn(e,"print"),s=i?0:t.getColsLeftWidth(),o=i?0:t.getDisplayedColumnsRightWidth();s!=this.leftWidth&&(this.leftWidth=s,n.dispatchEvent({type:"leftPinnedWidthChanged"})),o!=this.rightWidth&&(this.rightWidth=o,n.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=Wc(e);if(t<=50)return;const n=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:s,hasLockedPinned:o}=n;let r=s;!r.length&&!o||(i&&(r=i({columns:r,viewportWidth:t})),r!=null&&r.length&&(r=r.filter(a=>!No(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new Ree(e,t)}setColsPinned(e,t,n){const{colModel:i,colAnimation:s,visibleCols:o,gos:r}=this.beans;if(!i.cols||!(e!=null&&e.length))return;if(Wn(r,"print")){xe(37);return}s==null||s.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];for(const u of e){if(!u)continue;const c=i.getCol(u);c&&c.getPinned()!==a&&(this.setColPinned(c,a),l.push(c))}l.length&&(o.refresh(n),CP(this.eventSvc,l,n)),s==null||s.finish()}initCol(e){const{pinned:t,initialPinned:n}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,n)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const n=e.pinned==="left",i=e.pinned==="right";e.hidden=!0;const s=()=>{const o=n?this.leftWidth:this.rightWidth;if(o==null)return;const r=o==0,a=e.hidden!==r,l=this.gos.get("enableRtl"),u=t.getScrollbarWidth(),d=t.verticalScrollShowing&&(l&&n||!l&&i)?o+u:o;e.comp.setPinnedContainerWidth(`${d}px`),e.comp.setDisplayed(!r),a&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:s,rightPinnedWidthChanged:s,scrollVisibilityChanged:s,scrollbarWidthChanged:s})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:i,rightWidth:s}=this,o=Wc(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(i+s+e>o)if(o>i+s)e=o-i-s;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,n=this.leftWidth??0,i=t+n;let s=!1;if(i<e)return{columns:[],hasLockedPinned:s};const{visibleCols:o}=this.beans,r=[...o.leftCols],a=[...o.rightCols];let l=0,u=0;const c=0,d=[];let h=i-c-e;for(;(u<r.length||l<a.length)&&h>0;){if(l<a.length){const p=a[l++];if(p.colDef.lockPinned){s=!0;continue}h-=p.getActualWidth(),d.push(p)}if(u<r.length&&h>0){const p=r[u++];if(p.colDef.lockPinned){s=!0;continue}h-=p.getActualWidth(),d.push(p)}}return{columns:d,hasLockedPinned:s}}},Fee={moduleName:"PinnedColumn",version:$e,beans:[Dee],css:[Eee]},Tee=class extends ge{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=$n(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=Ln(e),n=this.descriptionContainer=t.createElement("div");n.classList.add("ag-aria-description-container"),w_(n,"polite"),Kj(n,"additions text"),jj(n,!0),e.eGridDiv.appendChild(n)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}​`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(Gn(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},xee={moduleName:"Aria",version:$e,beans:[Tee]},_ee=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",NA="ag-delay-render",Pee=class extends ge{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(NA)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;const{renderStatus:t,ctrlsSvc:n}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}n.getGridBodyCtrl().eGridBody.classList.remove(NA),this.alreadyRevealed=!0}},Aee={moduleName:"ColumnDelayRender",version:$e,beans:[Pee],css:[_ee]};function Iee(e){var t;(t=e.overlays)==null||t.showLoadingOverlay()}function kee(e){var t;(t=e.overlays)==null||t.showNoRowsOverlay()}function Oee(e){var t;(t=e.overlays)==null||t.hideOverlay()}var Mee=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",Lee={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},VA=class extends $t{constructor(){super(Lee),this.eOverlayWrapper=We,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(Mee)}handleKeyDown(e){if(e.key!==se.TAB||e.defaultPrevented||Go(e))return;const t=this.beans;if(Fa(t,this.eOverlayWrapper,!1,e.shiftKey))return;let i=!1;e.shiftKey?i=t.focusSvc.focusGridView({column:Zt(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):i=tu(t,!1),i&&e.preventDefault()}updateLayoutClasses(e,t){const n=this.eOverlayWrapper.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:o}=Fs;n.toggle(i,t.autoHeight),n.toggle(s,t.normal),n.toggle(o,t.print)}postConstruct(){this.createManagedBean(new Iy(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,n,i){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),n&&this.isGridFocused()){const s=un(this.beans);s&&!m_(this.beans)&&(this.elToFocusAfter=s)}e.then(s=>{if(this.activePromise!==e){this.activeOverlay!==s&&(this.destroyBean(s),s=null);return}if(this.activePromise=null,!!s){if(this.activeOverlay!==s&&(this.eOverlayWrapper.appendChild(s.getGui()),this.activeOverlay=s,i)){const o=s;this.updateListenerDestroyFunc=this.addManagedPropertyListener(i,({currentValue:r})=>{var a;(a=o.refresh)==null||a.call(o,dt(this.gos,{...r??{}}))})}n&&this.isGridFocused()&&Da(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){var i;this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);const n=this.updateListenerDestroyFunc;n&&(n(),this.updateListenerDestroyFunc=null),this.destroyBean(e),Gn(this.eOverlayWrapper),(i=t==null?void 0:t.focus)==null||i.call(t,{preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=un(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},Nee={selector:"AG-OVERLAY-WRAPPER",component:VA},Vee=class extends ge{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=bn(this.gos),this.isServerSide=!this.isClientSide&&Wl(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.eWrapper=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.eWrapper}isExclusive(){return this.state===1&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(t!==void 0||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){xe(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return Nee}getOverlayWrapperCompClass(){return VA}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}const{state:e,isClientSide:t,isServerSide:n,beans:{gos:i,colModel:s,rowModel:o}}=this;let r=this.gos.get("loading");r!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&r===void 0&&!i.get("suppressLoadingOverlay")&&(r=!i.get("columnDefs")||!s.ready||!i.get("rowData")&&t),r?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&o.isEmpty()&&!i.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!n&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(r7(this.beans.userCompFactory,dt(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(a7(this.beans.userCompFactory,dt(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,n){var s;const i=(e==null?void 0:e.newAgStackInstance())??null;(s=this.eWrapper)==null||s.showOverlay(i,t,this.isExclusive(),n),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const e=this.eWrapper;if(!e)return;let t=0;if(this.state===2){const n=this.beans.ctrlsSvc.get("gridHeaderCtrl");t=(n==null?void 0:n.headerHeight)||0}this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},Bee={moduleName:"Overlay",version:$e,userComponents:{agLoadingOverlay:eY,agNoRowsOverlay:nY},apiFunctions:{showLoadingOverlay:Iee,showNoRowsOverlay:kee,hideOverlay:Oee},beans:[Vee]},Hee=class extends ge{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=d7(),pr(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;pr(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),n=e/t;return this.maxScrollY*n}},Gee=400,$ee=class extends ge{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{for(const o of this.getAllCellCtrls())o.onCellSelectionChanged()},t=()=>{for(const o of this.getAllCellCtrls())o.updateRangeBordersIfRangeCount()},n=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},i=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{Oo(this.gos)?n():i()}),Oo(this.gos)&&n()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",i=>this.onSuppressCellFocusChanged(i.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:i,previousValue:s})=>{(!s&&i||s&&!i)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:n}=this.beans;if(n&&this.addManagedPropertyListener("showOpenedGroup",()=>{const i=n.getShowRowGroupCols();i.length&&this.refreshCells({columns:i,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const i=this.gridBodyCtrl;i.setStickyTopHeight(0),i.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=Wn(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new Wee(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){var e;return((e=this.stickyRowFeature)==null?void 0:e.stickyTopRowCtrls)??[]}getStickyBottomRowCtrls(){var e;return((e=this.stickyRowFeature)==null?void 0:e.stickyBottomRowCtrls)??[]}updateAllRowCtrls(){var i;const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),n=((i=this.cachedRowCtrls)==null?void 0:i.getEntries())??[];t.length>0||n.length>0?this.allRowCtrls=[...e,...t,...n]:this.allRowCtrls=e}isCellBeingRendered(e,t){var s;const n=this.rowCtrlsByRowIndex[e];return!t||!n?!!n:n.isFullWidth()?!0:!!((s=this.beans.spannedRowRenderer)==null?void 0:s.getCellByPosition({rowIndex:e,column:t,rowPinned:null}))||!!n.getCellCtrl(t)||!n.isRowRendered()}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if((e==null?void 0:e.rowIndex)!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const n of this.getAllCellCtrls())t.onFlashCells(n,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const n=l=>{for(const u of this.getAllCellCtrls())u.column===t&&l(u)},i=()=>{n(l=>l.onLeftChanged())},s=()=>{n(l=>l.onWidthChanged())},o=()=>{n(l=>l.onFirstRightPinnedChanged())},r=()=>{n(l=>l.onLastLeftPinnedChanged())},a=()=>{n(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",s),t.__addEventListener("firstRightPinnedChanged",o),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",s),t.__removeEventListener("firstRightPinnedChanged",o),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})}}onDomLayoutChanged(){const e=Wn(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),n=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,n&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){var n;const t=[];for(const i of this.getAllRowCtrls()){const s=(n=i.getCellCtrl(e,!0))==null?void 0:n.eGui;s&&t.push(s)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,n){const{pinnedRowModel:i,beans:s,printLayout:o}=this,r=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));i==null||i.forEachPinnedRow(t,(l,u)=>{const c=e[u];c&&i.getPinnedRowById(c.rowNode.id,t)===void 0&&(c.destroyFirstPass(),c.destroySecondPass()),l.id in r&&n?(e[u]=r[l.id],delete r[l.id]):e[u]=new Pp(l,s,!1,!1,o)});const a=(t==="top"?i==null?void 0:i.getPinnedTopRowCount():i==null?void 0:i.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){var n,i;if(e.sticky)(n=this.stickyRowFeature)==null||n.refreshStickyNode(e);else if((i=this.cachedRowCtrls)!=null&&i.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const s=o=>{const r=o[e.rowIndex];r&&r.rowNode===e&&(r.destroyFirstPass(),r.destroySecondPass(),o[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":s(this.topRowCtrls);break;case"bottom":s(this.bottomRowCtrls);break;default:s(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t!=null&&t.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(const i of e??[])this.redrawRow(i,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){var a;this.getLockOnRefresh();const t=(a=this.beans.focusSvc)==null?void 0:a.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const n=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&zl(this.gos),s=n?this.getRowsToRecycle():null;n||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:o,gos:r}=this;if(o){o.checkStickyRows();const l=o.extraTopHeight+o.extraBottomHeight;l&&this.updateContainerHeights(l)}this.recycleRows(s,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?n:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){var i;const t=e.newData||e.newPage,n=this.gos.get("suppressScrollOnNewData");t&&!n&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),(i=this.stickyRowFeature)==null||i.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let n=this.pageBounds.getCurrentPageHeight();n===0&&(n=1),t.setModelHeight(n+e)}getLockOnRefresh(){var e,t;if(this.refreshInProgress)throw new Error(Js(252));this.refreshInProgress=!0,(t=(e=this.beans.frameworkOverrides).getLockOnRefresh)==null||t.call(e)}releaseLockOnRefresh(){var e,t;this.refreshInProgress=!1,(t=(e=this.beans.frameworkOverrides).releaseLockOnRefresh)==null||t.call(e)}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,n=this.findPositionToFocus(e);if(!n){t.focusHeaderPosition({headerPosition:{headerRowIndex:so(this.beans)-1,column:e.column}});return}if(e.rowIndex!==n.rowIndex||e.rowPinned!=n.rowPinned){t.setFocusedCell({...n,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(dt(this.gos,{...n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:n}=this.beans;let i=e;for(i.rowPinned==null&&t&&n&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:n.getFirstRow()});i;){if(i.rowPinned==null&&n)if(i.rowIndex<n.getFirstRow()){if(i=Rp(this.beans,{rowPinned:null,rowIndex:0}),!i)return null}else i.rowIndex>n.getLastRow()&&(i={rowPinned:null,rowIndex:n.getLastRow()});const s=this.getRowByPosition(i);if(s!=null&&s.isAlive())return{...s.getRowPosition(),column:e.column};i=Rp(this.beans,i)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),n=t.length;for(let i=0;i<n;i++){const s=t[i].getAllCellCtrls(),o=s.length;for(let r=0;r<o;r++)e.push(s[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),n=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...n,...(e==null?void 0:e.getCtrls("top"))??[],...(e==null?void 0:e.getCtrls("bottom"))??[],...(e==null?void 0:e.getCtrls("center"))??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,n){const i=this.rowCtrlsByRowIndex[t];i&&i.addEventListener(e,n)}refreshCells({rowNodes:e,columns:t,force:n,suppressFlash:i}={}){const s={force:n,newData:!1,suppressFlash:i};for(const o of this.getCellCtrls(e,t))o.refreshOrDestroyCell(s);this.refreshFullWidth(e)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const n of this.getRowCtrls(e)){if(!n.isFullWidth())continue;n.refreshFullWidth()||(t=!0,this.redrawRow(n.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=vw(e),n=this.getAllRowCtrls();return!e||!t?n:n.filter(i=>{const s=i.rowNode;return Cw(s,t)})}getCellCtrls(e,t){let n;ze(t)&&(n={},t.forEach(s=>{const o=this.colModel.getCol(s);ze(o)&&(n[o.getId()]=!0)}));const i=[];for(const s of this.getRowCtrls(e))for(const o of s.getAllCellCtrls()){const r=o.column.getId();n&&!n[r]||i.push(o)}return i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){var n;const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),(n=this.stickyRowFeature)==null||n.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const n of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[n].rowNode.id==null&&e.push(n);this.removeRowCtrls(e);const t={};for(const n of Object.values(this.rowCtrlsByRowIndex)){const i=n.rowNode;t[i.id]=n}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const n of e){const i=this.rowCtrlsByRowIndex[n];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[n]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:n}=this.beans,{afterScroll:i}=e;let s;const o=this.stickyRowFeature;o&&(s=(t==null?void 0:t.getFocusCellToUseAfterRefresh())||void 0);const r=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(o){l=o.checkStickyRows();const c=o.extraTopHeight+o.extraBottomHeight;c&&this.updateContainerHeights(c)}const u=this.firstRenderedRow!==r||this.lastRenderedRow!==a;if(!(i&&!l&&!u)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!l),s!=null)){const c=t==null?void 0:t.getFocusCellToUseAfterRefresh();s!=null&&c==null&&(n==null||n.flushAllFrames(),this.restoreFocusedCell(s))}}removeRowCompsNotToDraw(e,t){const n={};for(const o of e)n[o]=!0;const s=Object.keys(this.rowCtrlsByRowIndex).filter(o=>!n[o]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){var r,a;const t=[];for(let l=this.firstRenderedRow;l<=this.lastRenderedRow;l++)t.push(l);const n=this.beans.pagination,i=(a=(r=this.beans.focusSvc)==null?void 0:r.getFocusedCell())==null?void 0:a.rowIndex;i!=null&&(i<this.firstRenderedRow||i>this.lastRenderedRow)&&(!n||n.isRowInPage(i))&&i<this.rowModel.getRowCount()&&t.push(i);const s=l=>{const u=l.rowNode.rowIndex;u==null||u===i||(u<this.firstRenderedRow||u>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(l)&&t.push(u)};for(const l of Object.values(this.rowCtrlsByRowIndex))s(l);if(e)for(const l of Object.values(e))s(l);t.sort((l,u)=>l-u);const o=[];for(let l=0;l<t.length;l++){const u=t[l],c=this.rowModel.getRow(u);c&&!c.sticky&&o.push(u)}return o}recycleRows(e,t=!1,n=!1){const i=this.calculateIndexesToDraw(e);(this.printLayout||n)&&(t=!1),this.removeRowCompsNotToDraw(i,!t);for(const s of i)this.createOrUpdateRowCtrl(s,e,t,n);if(e){const{animationFrameSvc:s}=this.beans;(s==null?void 0:s.active)&&n&&!this.printLayout?s.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),n=e.isPinningRight();(this.pinningLeft!==t||n!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=n,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls()){const n=t.rowNode.rowIndex;e.push(n.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=vw(e);return this.getAllRowCtrls().filter(n=>{if(!n.isFullWidth())return!1;const i=n.rowNode;return!(t!=null&&!Cw(i,t))})}createOrUpdateRowCtrl(e,t,n,i){let s,o=this.rowCtrlsByRowIndex[e];if(o||(s=this.rowModel.getRow(e),ze(s)&&ze(t)&&t[s.id]&&s.alreadyRendered&&(o=t[s.id],t[s.id]=null)),!o)if(s||(s=this.rowModel.getRow(e)),ze(s))o=this.createRowCon(s,n,i);else return;s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=o}destroyRowCtrls(e,t){const n=[];if(e){for(const i of Object.values(e))if(i){if(this.cachedRowCtrls&&i.isCacheable()){this.cachedRowCtrls.addRow(i);continue}if(i.destroyFirstPass(!t),t){const s=i.instanceId;this.zombieRowCtrls[s]=i,n.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[s]})}else i.destroySecondPass()}}t&&(n.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const i of n)i()},Gee))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=ba(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:n}=this;e.updateOffset();let i,s;if(!n.isRowsToRender())i=0,s=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),s=t.getLastRow();else{const c=this.getRowBufferInPixels(),d=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let p=!1,g,C;do{const y=t.getPixelOffset(),{pageFirstPixel:b,pageLastPixel:F}=t.getCurrentPagePixelRange(),x=e.divStretchOffset,V=d.getVScrollPosition(),I=V.top,M=V.bottom;h?(g=b+x,C=F+x):(g=Math.max(I+y-c,b)+x,C=Math.min(M+y+c,F)+x),this.firstVisibleVPixel=Math.max(I+y,b)+x,this.lastVisibleVPixel=Math.min(M+y,F)+x,p=this.ensureAllRowsInRangeHaveHeightsCalculated(g,C)}while(p);let v=n.getRowIndexAtPixel(g),S=n.getRowIndexAtPixel(C);const R=t.getFirstRow(),E=t.getLastRow();v<R&&(v=R),S>E&&(S=E),i=v,s=S}const o=Wn(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);o&&!r&&s-i>a&&(s=i+a);const l=i!==this.firstRenderedRow,u=s!==this.lastRenderedRow;(l||u)&&(this.firstRenderedRow=i,this.lastRenderedRow=s,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:s}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,ko(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){var a,l;const n=(a=this.pinnedRowModel)==null?void 0:a.ensureRowHeightsValid(),i=(l=this.stickyRowFeature)==null?void 0:l.ensureRowHeightsValid(),{pageBounds:s,rowModel:o}=this,r=o.ensureRowHeightsValid(e,t,s.getFirstRow(),s.getLastRow());return(r||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),i||r||n?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){var u;const i=e.rowNode,s=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),o=(u=this.editSvc)==null?void 0:u.isEditing(e),r=i.detail;return s||o||r?!!this.isRowPresent(i):!1}isRowPresent(e){var t;return this.rowModel.isRowPresent(e)?((t=this.beans.pagination)==null?void 0:t.isRowInPage(e.rowIndex))??!0:!1}createRowCon(e,t,n){var r,a;const i=((r=this.cachedRowCtrls)==null?void 0:r.getRow(e))??null;if(i)return i;const s=n&&!this.printLayout&&!!((a=this.beans.animationFrameSvc)!=null&&a.active);return new Pp(e,this.beans,t,s,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode),t=this.getStickyTopRowCtrls().map(i=>i.rowNode),n=this.getStickyBottomRowCtrls().map(i=>i.rowNode);return[...t,...e,...n]}getRowByPosition(e){let t;const{rowIndex:n}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[n];break;case"bottom":t=this.bottomRowCtrls[n];break;default:t=this.rowCtrlsByRowIndex[n],t||(t=this.getStickyTopRowCtrls().find(i=>i.rowNode.rowIndex===n)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===n)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},Wee=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if((e==null?void 0:e.id)==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,n=this.entriesMap[t];delete this.entriesMap[t],Rs(this.entriesList,n)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],Rs(this.entriesList,e)}getEntries(){return this.entriesList}};function vw(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const n of e){const i=n.id;switch(n.rowPinned){case"top":t.top[i]=n;break;case"bottom":t.bottom[i]=n;break;default:t.normal[i]=n;break}}return t}function Cw(e,t){const n=e.id;switch(e.rowPinned){case"top":return t.top[n]!=null;case"bottom":return t.bottom[n]!=null;default:return t.normal[n]!=null}}var zee=class extends ge{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=Xs(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=Xs(e))}doFullSort(e,t){const n=e.map((i,s)=>({currentPos:s,rowNode:i}));return n.sort(this.compareRowNodes.bind(this,t)),n.map(i=>i.rowNode)}compareRowNodes(e,t,n){const i=t.rowNode,s=n.rowNode;for(let o=0,r=e.length;o<r;o++){const a=e[o],l=a.sort==="desc",u=this.getValue(i,a.column),c=this.getValue(s,a.column);let d;const h=this.getComparator(a,i);if(h?d=h(u,c,i,s,l):d=Bj(u,c,this.isAccentedSort),!isNaN(d)&&d!==0)return a.sort==="asc"?d:d*-1}return t.currentPos-n.currentPos}getComparator(e,t){const n=e.column,i=n.getColDef().comparator;if(i!=null)return i;if(!n.getColDef().showRowGroup)return;const s=!t.group&&n.getColDef().field;if(!s)return;const o=this.beans.colModel.getColDefCol(s);if(o)return o.getColDef().comparator}getValue(e,t){var a;const{valueSvc:n,colModel:i,showRowGroupCols:s,gos:o}=this.beans;if(!this.primaryColumnsSortGroups)return n.getValue(t,e,!1);if(e.rowGroupColumn===t){if(tP(o,i.isPivotActive())){const c=e.data?e:s1(e.childrenAfterGroup);return c&&n.getValue(t,c,!1)}const u=s==null?void 0:s.getShowRowGroupCol(t.getId());return u?(a=e.groupData)==null?void 0:a[u.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return n.getValue(t,e,!1)}};function Uee(e){var t;(t=e.sortSvc)==null||t.onSortChanged("api")}var BA={moduleName:"Sort",version:$e,beans:[lQ,zee],apiFunctions:{onSortChanged:Uee},userComponents:{agSortIndicator:cw},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},jee=class extends ge{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:n}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),n.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),pr(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,Kl(e.source))}}};function Kee(e){var t;(t=e.valueCache)==null||t.expire()}function qee(e,t){const{colKey:n,rowNode:i,useFormatter:s}=t,o=e.colModel.getColDefCol(n)??e.colModel.getCol(n);if(on(o))return null;const r=e.valueSvc.getValueForDisplay(o,i,s);return s?r.valueFormatted??Vl(r.value):r.value}var Yee="paste",Zee=class extends ge{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;bn(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:n}=this.beans;if(e.source===Yee||t.get("suppressChangeDetection"))return;const i=e.node,s=[i],o=this.clientSideRowModel,r=o==null?void 0:o.rootNode;if(r&&!i.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new hd(a,r);l.addParentNode(i.parent,[e.column]),o.doAggregate(l),l.forEachChangedNodeDepthFirst(u=>{s.push(u),u.sibling&&s.push(u.sibling)})}n.refreshCells({rowNodes:s})}},Jee=class extends ge{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);Kt(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(n){return Kt(16,{expression:e,params:t,e:n}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const n=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",n);return t[e]=i,i}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},Xee=class extends ge{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,n){if(this.active){const i=this.cacheVersion;e.__cacheVersion!==i&&(e.__cacheVersion=i,e.__cacheData={}),e.__cacheData[t]=n}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},Qee={moduleName:"ValueCache",version:$e,beans:[Xee],apiFunctions:{expireValueCache:Kee}},ete={moduleName:"Expression",version:$e,beans:[Jee]},tte={moduleName:"ChangeDetection",version:$e,beans:[Zee]},nte={moduleName:"CellApi",version:$e,apiFunctions:{getCellValue:qee}},ite=class extends ge{constructor(){super(...arguments),this.beanName="valueSvc",this.hasEditSvc=!1,this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.hasEditSvc=!!e.editSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=Wl(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t,n=!1,i=!1,s="ui"){const{showRowGroupColValueSvc:o}=this.beans,r=!e&&t.group,a=e==null?void 0:e.colDef.showRowGroup,l=!this.isTreeData||t.footer;if(o&&l&&(r||a)){const C=o.getGroupValue(t,e);if(C==null)return{value:null,valueFormatted:null};if(!n)return{value:C.value,valueFormatted:null};const v=o.formatAndPrefixGroupColValue(C,e,i);return{value:C.value,valueFormatted:v}}if(!e)return{value:t.key,valueFormatted:null};const u=t.leafGroup&&this.colModel.isPivotMode(),c=t.group&&t.expanded&&!t.footer&&!u,d=this.gos.get("groupSuppressBlankHeader")||!t.sibling,h=c&&!d,p=this.getValue(e,t,h,s),g=n&&!(i&&e.colDef.useValueFormatterForExport===!1);return{value:p,valueFormatted:g?this.formatValue(e,t,p):null}}getValue(e,t,n=!1,i="ui"){var C;if(this.initialised||this.init(),!t)return;const s=e.getColDef(),o=s.field,r=e.getColId(),a=t.data;if(this.hasEditSvc&&i==="ui"){const v=this.editSvc;if(v.isEditing()){const S=v.getCellDataValue({rowNode:t,column:e},!0);if(S!==void 0)return S}}let l;const u=s.showRowGroup;if(typeof u=="string"&&(((C=this.beans.rowGroupColsSvc)==null?void 0:C.getColumnIndex(u))??-1)>t.level)return null;const c=typeof u!="string"||!t.group,d=t.groupData&&r in t.groupData,h=!n&&t.aggData&&t.aggData[r]!==void 0,p=this.isSsrm&&n&&!!s.aggFunc,g=this.isSsrm&&t.footer&&t.field&&(s.showRowGroup===!0||s.showRowGroup===t.field);if(this.isTreeData&&h)l=t.aggData[r];else if(this.isTreeData&&s.valueGetter)l=this.executeValueGetter(s.valueGetter,a,e,t);else if(this.isTreeData&&o&&a)l=fd(a,o,e.isFieldContainsDots());else if(d)l=t.groupData[r];else if(h)l=t.aggData[r];else if(s.valueGetter&&!p){if(!c)return l;l=this.executeValueGetter(s.valueGetter,a,e,t)}else if(g)l=fd(a,t.field,e.isFieldContainsDots());else if(o&&a&&!p){if(!c)return l;l=fd(a,o,e.isFieldContainsDots())}if(this.cellExpressions&&typeof l=="string"&&l.indexOf("=")===0){const v=l.substring(1);l=this.executeValueGetter(v,a,e,t)}return l}parseValue(e,t,n,i){var r;const s=e.getColDef(),o=s.valueParser;if(ze(o)){const a=dt(this.gos,{node:t,data:t==null?void 0:t.data,oldValue:i,newValue:n,colDef:s,column:e});return typeof o=="function"?o(a):(r=this.expressionSvc)==null?void 0:r.evaluate(o,a)}return n}getDeleteValue(e,t){return ze(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t).value)??null:null}formatValue(e,t,n,i,s=!0){const{expressionSvc:o}=this.beans;let r=null,a;const l=e.getColDef();if(i?a=i:s&&(a=l.valueFormatter),a){const u=t?t.data:null,c=dt(this.gos,{value:n,node:t,data:u,colDef:l,column:e});typeof a=="function"?r=a(c):r=o?o.evaluate(a,c):null}else if(l.refData)return l.refData[n]||"";return r==null&&Array.isArray(n)&&(r=n.join(", ")),r}setValue(e,t,n,i){var c,d;const s=this.colModel.getColDefCol(t);if(!e||!s)return!1;on(e.data)&&(e.data={});const{field:o,valueSetter:r}=s.getColDef();if(on(o)&&on(r))return xe(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(s,n))return xe(135),!1;const a=dt(this.gos,{node:e,data:e.data,oldValue:this.getValue(s,e,void 0,i),newValue:n,colDef:s.getColDef(),column:s});a.newValue=n;let l;if(ze(r)?typeof r=="function"?l=r(a):l=(c=this.expressionSvc)==null?void 0:c.evaluate(r,a):l=this.setValueUsingField(e.data,o,n,s.isFieldContainsDots()),l===void 0&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),(d=this.valueCache)==null||d.onDataChanged();const u=this.getValue(s,e);return this.dispatchCellValueChangedEvent(e,a,u,i),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,a,u,i),!0}dispatchCellValueChangedEvent(e,t,n,i){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:n,value:n,source:i})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,n,i){if(!t)return!1;let s=!1;if(!i)s=e[t]===n,s||(e[t]=n);else{const o=t.split(".");let r=e;for(;o.length>0&&r;){const a=o.shift();o.length===0?(s=r[a]===n,s||(r[a]=n)):r=r[a]}}return!s}executeValueGetterWithValueCache(e,t,n,i){const s=n.getColId(),o=this.valueCache.getValue(i,s);if(o!==void 0)return o;const r=this.executeValueGetterWithoutValueCache(e,t,n,i);return this.valueCache.setValue(i,s,r),r}executeValueGetterWithoutValueCache(e,t,n,i){var r;const s=dt(this.gos,{data:t,node:i,column:n,colDef:n.getColDef(),getValue:this.getValueCallback.bind(this,i)});let o;return typeof e=="function"?o=e(s):o=(r=this.expressionSvc)==null?void 0:r.evaluate(e,s),o}getValueCallback(e,t){const n=this.colModel.getColDefCol(t);return n?this.getValue(n,e):null}getKeyForNode(e,t){const n=this.getValue(e,t),i=e.getColDef().keyCreator;let s=n;if(i){const o=dt(this.gos,{value:n,colDef:e.getColDef(),column:e,node:t,data:t.data});s=i(o)}return typeof s=="string"||s==null||(s=String(s),s==="[object Object]"&&xe(121)),s}},ste={moduleName:"CommunityCore",version:$e,beans:[sQ,JY,cX,AK,Hee,SJ,XX,xQ,TK,See,bee,$ee,ite,nQ,JX,iQ,hX,jee,oX,rX,BQ],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:XY,destroy:QY,isDestroyed:eZ,getGridOption:tZ,setGridOption:nZ,updateGridOptions:K1,isModuleRegistered:iZ},dependsOn:[nX,eJ,aJ,BA,MQ,RJ,LQ,Bee,tte,VQ,wee,Fee,xee,GQ,uX,iX,ete,xJ,Aee]},HA={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},yw=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],ote={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:yw,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...yw,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...yw,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},rte={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function ate(e,t){const n=[];for(const i of Array.isArray(e)?e:[e]){const s=ote[i];if(s)for(const o of s){const r=rte[o];(!r||r===t)&&n.push(o)}else n.push(i)}return n}var GA=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
108
+
109
+ import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
110
+
111
+ ModuleRegistry.registerModules([ AllCommunityModule ]);
112
+ `,lte=e=>{const t=e.map(i=>`import { ${md(i)} } from '${HA[i]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(i=>i==="IntegratedCharts"||i==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
113
+ ${t.join(`
114
+ `)}
115
+
116
+ ModuleRegistry.registerModules([ ${e.map(i=>md(i,!0)).join(", ")} ]);
117
+
118
+ For more info see: ${$l}/modules/`};function md(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function ute(e,t){const n=t.filter(o=>o==="IntegratedCharts"||o==="Sparklines");let i="";return!(globalThis==null?void 0:globalThis.agCharts)&&n.length>0?i=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
119
+ `:t.some(o=>HA[o])&&(i=i+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
120
+ `),i}function $A({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var WA=({reasonOrId:e,moduleName:t,gridScoped:n,gridId:i,rowModelType:s,additionalText:o,isUmd:r})=>{const a=ate(t,s),l=typeof e=="string"?e:fte[e];if(r)return ute(l,a);const u=a.filter(h=>h==="IntegratedCharts"||h==="Sparklines"),c=u.length>0?`${u.map(h=>md(h)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(h=>md(h)).join(", "):md(a[0])} is not registered${n?" for gridId: "+i:""}. ${c} Check if you have registered the module:
121
+ `}
122
+ ${lte(a)}`+(o?`
123
+
124
+ ${o}`:"")},zA=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
125
+
126
+ import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
127
+ import { ModuleRegistry } from 'ag-grid-community';
128
+ import { ${e} } from 'ag-grid-enterprise';
129
+
130
+ ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
131
+ `,cte=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,dte={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e==null?void 0:e.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e==null?void 0:e.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:n})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",n],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions:
132
+ "alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.
133
+ Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
134
+ To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}
135
+ ${cte(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:n,pageSizeOptions:i})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${n?"":" the default"} paginationPageSizeSelector=[${i==null?void 0:i.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:n,jsComps:i})=>{const s=[],o=[...Object.keys(n??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(i??[]).filter(a=>!!i[a])],r=gy({inputValue:t,allSuggestions:o,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return s.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
136
+ `),r.length>0&&s.push(` Did you mean: [${r.slice(0,3)}]?
137
+ `),s.push("If using a custom component check it has been registered correctly."),s},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${$l}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{const n=gy({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,n.length>0?` Did you mean: [${n.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join(`
138
+ `)},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
139
+ Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:n})=>["duplicate group keys for row data, keys should be unique",e,t,...n??[]],187:({rowId:e,firstData:t,secondData:n})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",n],188:e=>`getRowId callback must be provided for Server Side Row Model ${(e==null?void 0:e.feature)||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:WA,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${$l}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,229:({index:e})=>["invalid row index for ensureIndexVisible: ",e],230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
140
+ Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows.
141
+ Your code probably called a grid API method while the grid was in the render stage.
142
+ To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
143
+ To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e==null?void 0:e.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>zA("IntegratedChartsModule"),258:()=>zA("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:n,gridId:i,rowModelType:s})=>WA({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:iu[t],gridId:i,gridScoped:n,rowModelType:s}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${$l}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>GA(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:$A,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`};function hte(e,t){const n=dte[e];if(!n)return[`Missing error text for error id ${e}!`];const i=n(t),o=`
144
+ See ${Y_(e,t)}`;return Array.isArray(i)?i.concat(o):[i,o]}var fte={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},UA=new WeakMap,jA=new WeakMap;function pte(e,t,n){if(!t)return Kt(11),{};let i;{const o=En({tag:"div"});o.style.height="100%",e.appendChild(o),e=o,i=()=>e.remove()}return new mte().create(e,t,o=>{const r=new YY(e);o.createBean(r)},void 0,n,i)}var gte=1,mte=class{create(e,t,n,i,s,o){const r=WC.applyGlobalGridOptions(t),a=r.gridId??String(gte++),l=this.getRegisteredModules(s,a,r.rowModelType),u=this.createBeansList(r.rowModelType,l,a),c=this.createProvidedBeans(e,r,s);if(!u)return;const h={providedBeanInstances:c,beanClasses:u,id:a,beanInitComparator:IY,beanDestroyComparator:kY,derivedBeans:[PY],destroyCallback:()=>{jA.delete(g),UA.delete(e),k8(a),o==null||o()}},p=new u9(h);this.registerModuleFeatures(p,l),n(p),p.getBean("syncSvc").start(),i==null||i(p);const g=p.getBean("gridApi");return UA.set(e,g),jA.set(g,e),g}getRegisteredModules(e,t,n){var i;return Zc(ste,void 0,!0),(i=e==null?void 0:e.modules)==null||i.forEach(s=>Zc(s,t)),O8(t,KA(n))}registerModuleFeatures(e,t){const n=e.getBean("registry"),i=e.getBean("apiFunctionSvc");for(const s of t){n.registerModule(s);const o=s.apiFunctions;if(o){const r=Object.keys(o);for(const a of r)i==null||i.addFunction(a,o[a])}}}createProvidedBeans(e,t,n){let i=n?n.frameworkOverrides:null;on(i)&&(i=new _Y);const s={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:n?n.globalListener:null,globalSyncListener:n?n.globalSyncListener:null,frameworkOverrides:i};return n!=null&&n.providedBeanInstances&&Object.assign(s,n.providedBeanInstances),s}createBeansList(e,t,n){const i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},s=KA(e),o=i[s];if(!o){Jc(201,{rowModelType:s},`Unknown rowModelType ${s}.`);return}if(!L8()){Jc(272,void 0,GA());return}if(!e){const a=Object.entries(i).filter(([l,u])=>zC(u,n,l));if(a.length==1){const[l,u]=a[0];if(l!==s){const c={moduleName:u,rowModelType:l};Jc(275,c,$A(c));return}}}if(!zC(o,n,s)){Jc(200,{reasonOrId:`rowModelType = '${s}'`,moduleName:o,gridScoped:UC(),gridId:n,rowModelType:s},`Missing module ${o}Module for rowModelType ${s}.`);return}const r=new Set;for(const a of t)for(const l of a.beans??[])r.add(l);return Array.from(r)}};function KA(e){return e??"clientSide"}function Dr(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Ap(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function vte(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Cte=class extends ge{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?w8(t):b8(e.get("localeText"))}};function yte(e,t=!1){const n=[],i=[],s=[],o=[],r=[],a=[],l=[],u=[],c=[];let d=0;for(let h=0;h<e.length;h++){const{colId:p,sort:g,sortIndex:C,rowGroup:v,rowGroupIndex:S,aggFunc:R,pivot:E,pivotIndex:y,pinned:b,hide:F,width:x,flex:V}=e[h];c.push(p),g&&(n[C??d++]={colId:p,sort:g}),v&&(i[S??0]=p),typeof R=="string"&&s.push({colId:p,aggFunc:R}),E&&(o[y??0]=p),b&&(b==="right"?a:r).push(p),F&&l.push(p),(V!=null||x)&&u.push({colId:p,flex:V??void 0,width:x})}return{sort:n.length?{sortModel:ww(n)}:void 0,rowGroup:i.length?{groupColIds:ww(i)}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:o.length||t?{pivotMode:t,pivotColIds:ww(o)}:void 0,columnPinning:r.length||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:u.length?{columnSizingModel:u}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}function ww(e){return e.filter(t=>t!=null)}function wte(e){const t=[];for(const{groupId:n,open:i}of e)i&&t.push(n);return t.length?{openColumnGroupIds:t}:void 0}function bw(e){return e.get("tooltipShowMode")==="whenTruncated"}function bte(e,t){if(typeof e!="number")return"";const n=t(),i=n("thousandSeparator",","),s=n("decimalSeparator",".");return e.toString().replace(".",s).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var Ste=class extends ge{getFileName(e){const t=this.getDefaultFileExtension();return e!=null&&e.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},Ete=class{constructor(e){const{colModel:t,rowGroupColsSvc:n,colNames:i,valueSvc:s,gos:o,processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u}=e;this.colModel=t,this.rowGroupColsSvc=n,this.colNames=i,this.valueSvc=s,this.gos=o,this.processCellCallback=r,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=u}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,n,i,s){var h;const o=t===0&&nP(this.gos,s,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||s.group)&&(e.isRowGroupDisplayed(((h=s.rowGroupColumn)==null?void 0:h.getColId())??"")||o))return{value:this.processRowGroupCallback(dt(this.gos,{column:e,node:s}))??""};if(this.processCellCallback)return{value:this.processCellCallback(dt(this.gos,{accumulatedRowIndex:n,column:e,node:s,value:this.valueSvc.getValueForDisplay(e,s,void 0,void 0).value,type:i,parseValue:p=>this.valueSvc.parseValue(e,s,p,this.valueSvc.getValue(e,s,void 0)),formatValue:p=>this.valueSvc.formatValue(e,s,p)??p}))??""};const r=this.gos.get("treeData"),a=this.valueSvc,l=s.level===-1&&s.footer,u=e.colDef.showRowGroup===!0&&(s.group||r);if(!l&&(o||u)){let p="",g=s;for(;g&&g.level!==-1;){const{value:C,valueFormatted:v}=a.getValueForDisplay(o?void 0:e,g,!0,!0);p=` -> ${v??C??""}${p}`,g=g.parent}return{value:p,valueFormatted:p}}const{value:c,valueFormatted:d}=a.getValueForDisplay(e,s,!0,!0);return{value:c??"",valueFormatted:d}}getHeaderName(e,t){return e?e(dt(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}};function Rte(e,t){const n=document.defaultView||window;if(!n){xe(52);return}const i=document.createElement("a"),s=n.URL.createObjectURL(t);i.setAttribute("href",s),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:n})),i.remove(),n.setTimeout(()=>{n.URL.revokeObjectURL(s)},0)}var Dte={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},wi="clientSide",Xn="serverSide",au="infinite",Fte={onGroupExpandedOrCollapsed:[wi],refreshClientSideRowModel:[wi],isRowDataEmpty:[wi],forEachLeafNode:[wi],forEachNodeAfterFilter:[wi],forEachNodeAfterFilterAndSort:[wi],resetRowHeights:[wi,Xn],applyTransaction:[wi],applyTransactionAsync:[wi],flushAsyncTransactions:[wi],getBestCostNodeSelection:[wi],getServerSideSelectionState:[Xn],setServerSideSelectionState:[Xn],applyServerSideTransaction:[Xn],applyServerSideTransactionAsync:[Xn],applyServerSideRowData:[Xn],retryServerSideLoads:[Xn],flushServerSideAsyncTransactions:[Xn],refreshServerSide:[Xn],getServerSideGroupLevelState:[Xn],refreshInfiniteCache:[au],purgeInfiniteCache:[au],getInfiniteRowCount:[au],isLastRowIndexKnown:[au,Xn],expandAll:[wi,Xn],collapseAll:[wi,Xn],onRowHeightChanged:[wi,Xn],setRowCount:[au,Xn],getCacheBlockState:[au,Xn]},Tte={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function xte(e,t,n){const i=Tte[e];if(i){const{version:o,new:r,old:a,message:l}=i,u=a??e;return(...c)=>{const d=r?`Please use ${r} instead. `:"";return Yc(`Since ${o} api.${u} is deprecated. ${d}${l??""}`),t.apply(t,c)}}const s=Fte[e];return s?(...o)=>{const r=n.rowModel.getType();if(!s.includes(r)){Hl(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,o)}:t}var _te={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},Pte={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},Ate={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},Ite=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),kte=class extends ge{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,B8(hte)}warnOnInitialPropertyUpdate(e,t){e==="api"&&Dte[t]&&xe(22,{key:t})}processGridOptions(e){this.processOptions(e,DQ())}validateApiFunction(e,t){return xte(e,t,this.beans)}missingUserComponent(e,t,n,i){const s=iu[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):xe(101,{propertyName:e,componentName:t,agGridDefaults:n,jsComps:i})}missingDynamicBean(e){const t=_te[e];return t?Js(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){Mte.has(e)&&xe(10,{eventType:e})}validateIcon(e){if(Ite.has(e)&&xe(43,{iconName:e}),Pte[e])return;const t=Ate[e];if(t){Kt(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:UC(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}xe(134,{iconName:e})}isProvidedUserComp(e){return!!iu[e]}validateColDef(e){this.processOptions(e,pQ())}processOptions(e,t){const{validations:n,deprecations:i,allProperties:s,propertyExceptions:o,objectName:r,docsUrl:a}=t;s&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...o??[],...Object.keys(i)],s,r,a);const l=new Set;if(Object.keys(e).forEach(c=>{const d=i[c];if(d){const{message:R,version:E}=d;l.add(`As of v${E}, ${String(c)} is deprecated. ${R??""}`)}const h=e[c];if(h==null||h===!1)return;const p=n[c];if(!p)return;const{dependencies:g,validate:C,supportedRowModels:v,expectedType:S}=p;if(S){const R=typeof h;if(R!==S){l.add(`${String(c)} should be of type '${S}' but received '${R}' (${h}).`);return}}if(v){const R=this.gridOptions.rowModelType??"clientSide";if(!v.includes(R)){l.add(`${String(c)} is not supported with the '${R}' row model. It is only valid with: ${v.join(", ")}.`);return}}if(g){const R=this.checkForRequiredDependencies(c,g,e);if(R){l.add(R);return}}if(C){const R=C(e,this.gridOptions,this.beans);if(R){l.add(R);return}}}),l.size>0)for(const c of l)Yc(c)}checkForRequiredDependencies(e,t,n){const s=Object.entries(t).filter(([o,r])=>{const a=n[o];return!r.required.includes(a)});return s.length===0?null:s.map(([o,r])=>`'${String(e)}' requires '${o}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
145
+ `)}checkProperties(e,t,n,i,s){const o=["__ob__","__v_skip","__metadata__"],r=Ote(Object.getOwnPropertyNames(e),[...o,...t,...n],n),a=Object.keys(r);for(const l of a){const u=r[l];let c=`invalid ${i} property '${l}' did you mean any of these: ${u.slice(0,8).join(", ")}.`;n.includes("context")&&(c+=`
146
+ If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Yc(c)}if(a.length>0&&s){const l=this.beans.frameworkOverrides.getDocLink(s);Yc(`to see all the valid ${i} properties please check: ${l}`)}}};function Ote(e,t,n){const i={},s=e.filter(o=>!t.some(r=>r===o));if(s.length>0)for(const o of s)i[o]=gy({inputValue:o,allSuggestions:n}).values;return i}var Mte=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),Lte={moduleName:"Validation",version:$e,beans:[kte]};function qA(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var Nte=class extends ge{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){var n;const t=!!((n=this.filterManager)!=null&&n.isChildFilterPresent());this.filterNodes(t,e)}filterNodes(e,t){const n=(i,s)=>{i.hasChildren()&&e&&!s?i.childrenAfterFilter=i.childrenAfterGroup.filter(o=>{const r=o.childrenAfterFilter&&o.childrenAfterFilter.length>0,a=o.data&&this.filterManager.doesRowPassFilter({rowNode:o});return r||a}):i.childrenAfterFilter=i.childrenAfterGroup,qA(i)};if(this.doingTreeDataFiltering()){const i=(o,r)=>{if(o.childrenAfterGroup)for(let a=0;a<o.childrenAfterGroup.length;a++){const l=o.childrenAfterGroup[a],u=r||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?i(o.childrenAfterGroup[a],u):n(l,u)}n(o,r)},s=o=>i(o,!1);t.executeFromRootNode(s)}else{const i=s=>n(s,!1);t.forEachChangedNodeDepthFirst(i,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},Vte=class extends Uy{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,n,i,s){this.comp=e;const o=nd(this,this.beans.context,s);this.eButtonShowMainFilter=n,this.eFloatingFilterBody=i,this.setGui(t,o),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(o),this.setupLeft(o),this.setupHover(o),this.setupFocus(o),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(o),this.setupUi(),o.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(o);const r=()=>this.onColDefChanged(o);o.addManagedListeners(this.column,{colDefChanged:r}),o.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&r()}}),o.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,n=e.colDef;return dt(t.gos,{colDef:n,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,n=!!e.floatingFilter;this.active=t&&n}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=is("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new eu(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();Bl(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){var r;const{beans:t}=this;if(un(t)===this.eGui)return;const s=Fa(t,this.eGui,null,e.shiftKey);if(s){(r=t.headerNavigation)==null||r.scrollToColumn(this.column),e.preventDefault(),s.focus();return}const o=this.findNextColumnWithFloatingFilter(e.shiftKey);o&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:o},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let n=this.column;do if(n=e?t.getColBefore(n):t.getColAfter(n),!n)break;while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case se.UP:case se.DOWN:case se.LEFT:case se.RIGHT:if(t)return;_a(e);case se.ENTER:t&&Da(this.eGui)&&e.preventDefault();break;case se.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const n=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&Ca(e.relatedTarget,"ag-floating-filter");if(n&&i&&e.target===this.eGui){const s=this.lastFocusEvent,o=!!(s&&s.key===se.TAB);if(s&&o){const r=s.shiftKey;Da(this.eGui,r)}}this.focusThis()}setupHover(e){var t;(t=this.beans.colHover)==null||t.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new zy(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){var e;this.suppressFilterButton=!((e=this.beans.menuSvc)!=null&&e.isFloatingFilterButtonEnabled(this.column)),this.highlightFilterButtonWhenActive=!Li(this.gos)}setupUserComp(){var t;if(!this.active)return;const e=(t=this.beans.colFilter)==null?void 0:t.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){var t;const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;(t=this.beans.menuSvc)==null||t.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:n,gos:i}=this,s=o=>{if((o==null?void 0:o.source)==="filterDestroyed"&&(!this.isAlive()||!(t!=null&&t.isAlive())))return;const r=this.comp.getFloatingFilterComp();r&&r.then(a=>{if(a){if(i.get("enableFilterHandlers")){const c=o;let d="filter";c!=null&&c.afterFloatingFilter?d="ui":c!=null&&c.afterDataChange?d="dataChanged":(o==null?void 0:o.source)==="api"&&(d="api"),this.updateFloatingFilterParams(this.userCompDetails,d);return}const l=t==null?void 0:t.getCurrentFloatingFilterParentModel(n),u=o?{...o,columns:o.columns??[],source:o.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,u)}})};[this.destroySyncListener]=e.addManagedListeners(n,{filterChanged:s}),t!=null&&t.isFilterActive(n)&&s(null)}setupWidth(e){const t=()=>{const n=`${this.column.getActualWidth()}px`;this.comp.setWidth(n)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){var e;if(!this.suppressFilterButton&&this.comp){const t=!!((e=this.beans.filterManager)!=null&&e.isFilterAllowed(this.column));this.comp.setButtonWrapperDisplayed(t),this.highlightFilterButtonWhenActive&&t&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const n=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.beans.colFilter,s=this.active?i==null?void 0:i.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,o=this.comp.getFloatingFilterComp();!o||!s?this.updateCompDetails(e,s,n):o.then(r=>{!r||i!=null&&i.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,n):this.updateFloatingFilterParams(s,"colDef")})}updateCompDetails(e,t,n){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),n&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){var i;if(!e)return;let n=e.params;(i=this.comp.getFloatingFilterComp())==null||i.then(s=>{var o;typeof(s==null?void 0:s.refresh)=="function"&&(this.gos.get("enableFilterHandlers")&&(n={...n,model:Nn(((o=this.beans.colFilter)==null?void 0:o.model)??{},this.column.getColId()),source:t}),s.refresh(n))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function Bte(e,t){var i;const n=e.colModel.getCol(t);if(!n){Kt(12,{colKey:t});return}(i=e.menuSvc)==null||i.showColumnMenu({column:n,positionBy:"auto"})}function Hte(e){var t;(t=e.menuSvc)==null||t.hidePopupMenu()}var Gte={moduleName:"SharedMenu",version:$e,beans:[Xq],apiFunctions:{showColumnMenu:Bte,hidePopupMenu:Hte}},$te=class extends y9{postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getDefaultPopupParent(){return this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:n,event:i}=e,s=t.getBoundingClientRect(),o=this.getParentRect();this.setAlignedTo(t,n);let r=!1;const a=()=>{const l=this.keepXYWithinBounds(n,s.top-o.top,0),u=n.clientWidth>0?n.clientWidth:200;r||(n.style.minWidth=`${u}px`,r=!0);const d=o.right-o.left-u;let h;return this.gos.get("enableRtl")?(h=g(),h<0&&(h=p(),this.setAlignedStyles(n,"left")),h>d&&(h=0,this.setAlignedStyles(n,"right"))):(h=p(),h>d&&(h=g(),this.setAlignedStyles(n,"right")),h<0&&(h=0,this.setAlignedStyles(n,"left"))),{x:h,y:l};function p(){return s.right-o.left-2}function g(){return s.left-o.left-u}};this.positionPopup({ePopup:n,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e,"subMenu",n,t,i instanceof MouseEvent?i:void 0)})}callPostProcessPopup(e,t,n,i,s){const o=this.gos.getCallback("postProcessPopup");if(o){const{column:r,rowNode:a}=e;o({column:r,rowNode:a,ePopup:n,type:t,eventSource:i,mouseEvent:s})}}getActivePopups(){return this.popupList.map(e=>e.element)}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const n of this.popupList)t.applyThemeClasses(n.wrapper)}}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return Go(e)}},Ip={moduleName:"Popup",version:$e,beans:[$te]},Wte=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function zte(e){const t=e.filterManager;return!!(t!=null&&t.isColumnFilterPresent())||!!(t!=null&&t.isAggregateFilterPresent())}function Ute(e,t){var n;return((n=e.filterManager)==null?void 0:n.getColumnFilterInstance(t))??Promise.resolve(void 0)}function jte(e,t){var i;const n=e.colModel.getColDefCol(t);if(n)return(i=e.colFilter)==null?void 0:i.destroyFilter(n,"api")}function Kte(e,t){e.frameworkOverrides.wrapIncoming(()=>{var n;return(n=e.filterManager)==null?void 0:n.setFilterModel(t)})}function qte(e){var t;return((t=e.filterManager)==null?void 0:t.getFilterModel())??{}}function Yte(e,t,n){const{gos:i,colModel:s,colFilter:o}=e;n&&!i.get("enableFilterHandlers")&&(xe(288),n=!1);const r=s.getColDefCol(t);return r?(o==null?void 0:o.getModelForColumn(r,n))??null:null}function Zte(e,t,n){var i;return((i=e.filterManager)==null?void 0:i.setColumnFilterModel(t,n))??Promise.resolve()}function Jte(e,t){var i;const n=e.colModel.getCol(t);if(!n){Kt(12,{colKey:t});return}(i=e.menuSvc)==null||i.showFilterMenu({column:n,containerType:"columnFilter",positionBy:"auto"})}function Xte(e){var t;(t=e.menuSvc)==null||t.hideFilterMenu()}function Qte(e,t){var i;const n=e.colModel.getCol(t);if(!n){Kt(12,{colKey:t});return}return(i=e.colFilter)==null?void 0:i.getHandler(n,!0)}function ene(e,t){const{colModel:n,colFilter:i,gos:s}=e;if(!s.get("enableFilterHandlers")){xe(287);return}const{colId:o,action:r}=t;if(o){const a=n.getColById(o);a&&(i==null||i.updateModel(a,r))}else i==null||i.updateAllModels(r)}var tne={filterHandler:()=>({doesFilterPass:()=>!0})},nne=class extends ge{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...o1},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){var n,i;this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});const e=this.gos,t={...((i=(n=e.get("initialState"))==null?void 0:n.filter)==null?void 0:i.filterModel)??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",n){const{colModel:i,dataTypeSvc:s,filterManager:o}=this.beans;if(s!=null&&s.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const r=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((u,c)=>{const d=e[c];r.push(this.setModelOnFilterWrapper(u,d)),l.delete(c)}),l.forEach(u=>{const c=i.getColDefCol(u)||i.getCol(u);if(!c){xe(62,{colId:u});return}if(!c.isFilterAllowed()){xe(63,{colId:u});return}const d=this.getOrCreateFilterWrapper(c,!0);if(!d){xe(64,{colId:u});return}r.push(this.setModelOnFilterWrapper(d,e[u],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{r.push(this.setModelOnFilterWrapper(l,null))});gn.all(r).then(()=>{const l=this.getModel(!0),u=[];this.allColumnFilters.forEach((c,d)=>{const h=a?a[d]:null,p=l?l[d]:null;Vc(h,p)||u.push(c.column)}),u.length>0?o==null||o.onFilterChanged({columns:u,source:t}):n&&this.updateActive("filterChanged")})}getModel(e){var o;const t={},{allColumnFilters:n,initialModel:i,beans:{colModel:s}}=this;if(n.forEach((r,a)=>{const l=this.getModelFromFilterWrapper(r);ze(l)&&(t[a]=l)}),!e)for(const r of Object.keys(i)){const a=i[r];ze(a)&&!n.has(r)&&((o=s.getCol(r))!=null&&o.isFilterAllowed())&&(t[r]=a)}return t}setState(e,t,n="api"){if(this.state.clear(),t)for(const i of Object.keys(t)){const s=t[i];this.state.set(i,{model:Nn(this.model,i),state:s})}this.setModel(e,n,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let n=!1;return e.forEach((i,s)=>{const o=i.state;o!=null&&(n=!0,t[s]=o)}),n?t:void 0}getModelFromFilterWrapper(e){const n=e.column.getColId();if(e.isHandler)return Nn(this.model,n);const i=e.filter;return i?typeof i.getModel!="function"?(xe(66),null):i.getModel():Nn(this.initialModel,n)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=u=>u?u.isFilterActive?u.isFilterActive():(xe(67),!1):!1,{colModel:t,gos:n}=this.beans,i=!!YC(n),s=u=>{if(!u.isPrimary())return!0;const d=!t.isPivotActive();return!u.isValueActive()||!d?!1:t.isPivotMode()?!0:i},o=[],r=[],a=(u,c,d)=>{c&&(s(u)?o.push(d):r.push(d))},l=[];return this.allColumnFilters.forEach(u=>{const c=u.column,d=c.getColId();if(u.isHandler)l.push(gn.resolve().then(()=>{a(c,this.isHandlerActive(c),{colId:d,isHandler:!0,handler:u.handler,handlerParams:u.handlerParams})}));else{const h=br(u);h&&l.push(h.then(p=>{a(c,e(p),{colId:d,isHandler:!1,comp:p})}))}}),gn.all(l).then(()=>{this.activeAggregateFilters=o,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){var i;const n=[];return this.allColumnFilters.forEach(s=>{const o=s.column;if(s.isHandler)n.push(gn.resolve().then(()=>{this.setColFilterActive(o,this.isHandlerActive(o),e,t)}));else{const r=br(s);r&&n.push(r.then(a=>{this.setColFilterActive(o,a.isFilterActive(),e,t)}))}}),(i=this.beans.groupFilter)==null||i.updateFilterFlags(e,t),gn.all(n)}doFiltersPass(e,t,n){const{data:i,aggData:s}=e,o=n?this.activeAggregateFilters:this.activeColumnFilters,r=n?s:i,a=this.model;for(let l=0;l<o.length;l++){const u=o[l],{colId:c,isHandler:d}=u;if(c!==t)if(d){const{handler:h,handlerParams:p}=u;if(!h.doesFilterPass({node:e,data:r,model:Nn(a,c),handlerParams:p}))return!1}else{const h=u.comp;if(typeof h.doesFilterPass!="function"){Kt(91);continue}if(!h.doesFilterPass({node:e,data:r}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t!=null&&t.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:n}=this.beans,i=()=>{this.isAlive()&&(n==null||n.onFilterChanged(e))};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:n}=e,i=t==null?void 0:t.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",n).then(()=>{this.allColumnFilters.forEach(s=>{var a,l,u;const{column:o,isHandler:r}=s;i!==o.getColId()&&(r&&((l=(a=s.handler).onAnyFilterChanged)==null||l.call(a)),(u=br(s,r))==null||u.then(c=>{typeof(c==null?void 0:c.onAnyFilterChanged)=="function"&&c.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(n=>{var o,r;const i=n.isHandler;i&&((r=(o=n.handler).onNewRowsLoaded)==null||r.call(o));const s=br(n,i);s&&t.push(s.then(a=>{var l;(l=a.onNewRowsLoaded)==null||l.call(a)}))}),gn.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:n,colModel:i}=this.beans;return(s,o)=>{const r=o?i.getCol(o):e;return r?n.getValue(r,s,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t!=null&&t.isHandler)return this.isHandlerActive(e);const n=t==null?void 0:t.filter;return n?n.isFilterActive():Nn(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=ze(Nn(this.model,e.getColId()));if(t)return t;const n=this.beans.groupFilter;return n!=null&&n.isGroupFilter(e)?n.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?br(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const n=br(t);return n?n.then(i=>({comp:i,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const n=this.getOrCreateFilterWrapper(e,t);return n!=null&&n.isHandler?n.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let n=this.cachedFilter(e);return!n&&t&&(n=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,n)),n}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>{var n;return(n=this.beans.dataTypeSvc)==null?void 0:n.getBaseDataType(e)},t)}getDefaultFilterFromDataType(e,t=!1){return tK(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":W9(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,n,i,s,o){const r=()=>{const u=this.createFilterCompParams(e,s,o),c=i(u,s);return s7(this.beans.userCompFactory,t,c,n)},a=r();return a?{compDetails:a,createFilterUi:u=>(u?r():a).newAgStackInstance()}:null}createFilterInstance(e,t,n,i){var d,h;const s=this.beans.selectableFilter;s!=null&&s.isSelectable(t)&&(t=s.getFilterDef(e,t));const{handler:o,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,n)??{},l=this.createFilterComp(e,t,n,i,!!o,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:o,handlerGenerator:a,handlerParams:r};const{compDetails:u,createFilterUi:c}=l;return this.isGlobalButtons&&((h=(d=u.params)==null?void 0:d.buttons)!=null&&h.length||xe(281,{colId:e.getColId()})),{compDetails:u,handler:o,handlerGenerator:a,handlerParams:r,createFilterUi:c}}createBaseFilterParams(e,t){const{filterManager:n,rowModel:i}=this.beans;return dt(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:s=>(n==null?void 0:n.doesRowPassOtherFilters(e.getColId(),s))??!0,rowModel:i})}createFilterCompParams(e,t,n,i){const s=this.filterChangedCallbackFactory(e),o=this.createBaseFilterParams(e,i);if(o.filterChangedCallback=s,o.filterModifiedCallback=i?()=>{}:r=>this.filterModified(e,r),t){const r=o,a=e.getColId(),l=Nn(this.model,a);r.model=l,r.state=this.state.get(a)??{model:l},r.onModelChange=(u,c)=>{this.updateStoredModel(a,u),this.refreshHandlerAndUi(e,u,"ui",!1,c).then(()=>{s({...c,source:"columnFilter"})})},r.onStateChange=u=>{this.updateState(e,u),this.updateOrRefreshFilterUi(e)},r.onAction=(u,c,d)=>{this.updateModel(e,u,c),this.dispatchLocalEvent({type:"filterAction",column:e,action:u,event:d})},r.getHandler=()=>this.getHandler(e,!0),r.onUiChange=u=>this.filterUiChanged(e,u),r.source=n}return o}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,n){const i=t(),s={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(n),s}createFilterWrapper(e){var a;const{compDetails:t,handler:n,handlerGenerator:i,handlerParams:s,createFilterUi:o}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),l=>l),r=e.getColId();if(n)return delete this.initialModel[r],(a=n.init)==null||a.call(n,{...s,source:"init",model:Nn(this.model,r)}),{column:e,isHandler:!0,handler:n,handlerGenerator:i,handlerParams:s,filterUi:this.createFilterUiForHandler(t,o)};if(o){const l={column:e,filterUi:null,isHandler:!1};return l.filterUi=this.createFilterUiLegacy(t,o,u=>{l.filter=u??void 0}),l}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,n){var p;const{gos:i,frameworkOverrides:s,registry:o}=this.beans;let r;const a=g=>{const C=g.filter;if(DP(C)){const v=C.handler;return v||(r=C.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof C=="string"?C:void 0},l=i.get("enableFilterHandlers"),u=l?a(t):void 0,c=g=>()=>this.createBean(o.createDynamicBean(g,!0));let d,h;if(typeof u=="string"){const g=(p=i.get("filterHandlers"))==null?void 0:p[u];g!=null?d=g:A9.has(u)&&(d=c(u),h=u)}else d=u;if(!d){let g;const{compName:C,jsComp:v,fwComp:S}=PP(s,t);C?g=C:v==null&&S==null&&t.filter===!0&&(g=n),h=this.handlerMap[g],h&&(d=c(h))}return d?{filterHandler:d,handlerNameOrCallback:r??h}:l?(bn(i)&&xe(277,{colId:e.getColId()}),tne):void 0}createHandler(e,t,n){const i=this.createHandlerFunc(e,t,n);if(!i)return;const s=ty(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:o,filterHandler:r}=i,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,s);return{handler:a,handlerParams:l,handlerGenerator:o??r}}createHandlerFromFunc(e,t,n){const i=e.getColDef(),s=t(dt(this.gos,{column:e,colDef:i})),o=this.createHandlerParams(e,n);return{handler:s,handlerParams:o}}createHandlerParams(e,t){const n=e.getColDef(),i=e.getColId(),s=this.filterChangedCallbackFactory(e);return dt(this.gos,{colDef:n,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:o=>{var r;return((r=this.beans.filterManager)==null?void 0:r.doesRowPassOtherFilters(i,o))??!0},onModelChange:(o,r)=>{this.updateStoredModel(i,o),this.refreshHandlerAndUi(e,o,"handler",!1,r).then(()=>{s({...r,source:"columnFilter"})})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:n,groupFilter:i}=this.beans;this.allColumnFilters.forEach((o,r)=>{let a;o.column.isPrimary()?a=t.getColDefCol(r):a=t.getCol(r),!(a&&a===o.column)&&(e.push(o.column),this.disposeFilterWrapper(o,"columnChanged"),this.disposeColumnListener(r))});const s=i&&e.every(o=>i.isGroupFilter(o));e.length>0&&!s&&(n==null||n.onFilterChanged({columns:e,source:"api"}))}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const n=this.beans.groupFilter;return n!=null&&n.isGroupFilter(e)?n.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:n,frameworkOverrides:i,selectableFilter:s}=this.beans,o=h=>{const p=this.getOrCreateFilterUi(e);p!=null&&p.then(g=>{h(sd(g))})},r=e.getColDef(),a=s!=null&&s.isSelectable(r)?s.getFilterDef(e,r):r,l=q9(i,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",u=this.gos.get("enableFilterHandlers"),c=ty(n,a,this.createFilterCompParams(e,u,"init",!0)),d=dt(this.gos,{column:e,filterParams:c,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:o,showParentFilter:t});if(u){const h=d,p=e.getColId(),g=this.filterChangedCallbackFactory(e);h.onUiChange=C=>this.floatingFilterUiChanged(e,C),h.model=Nn(this.model,p),h.onModelChange=(C,v)=>{this.updateStoredModel(p,C),this.refreshHandlerAndUi(e,C,"floating",!0,v).then(()=>{g({...v,source:"columnFilter"})})},h.getHandler=()=>this.getHandler(e,!0),h.source="init"}return u7(n,r,d,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,n,i){const s="paramsUpdated";if(e.isHandler){const o=t.getColId();delete this.initialModel[o],this.state.delete(o);const r=e.filterUi,a=this.createFilterUiForHandler(n,i);e.filterUi=a;const l=this.eventSvc;r!=null&&r.created?r.promise.then(u=>{this.destroyBean(u),l.dispatchEvent({type:"filterDestroyed",source:s,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:s,column:t})}else this.destroyFilter(t,s)}destroyFilter(e,t="api"){const n=e.getColId(),i=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialModel[n],i&&this.disposeFilterWrapper(i,t).then(s=>{var o;s&&this.isAlive()&&((o=this.beans.filterManager)==null||o.onFilterChanged({columns:[e],source:"api"}))})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let n=!1;const{column:i,isHandler:s,filterUi:o}=e,r=i.getColId();s&&(n=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const a=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(o){if(o.created)return o.promise.then(l=>(n=s?n:!!(l!=null&&l.isFilterActive()),this.destroyBean(l),a(),n));a()}return gn.resolve(n)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:(t==null?void 0:t.source)??"columnFilter"})}}filterParamsChanged(e,t="api"){var v,S,R,E,y,b;const n=this.allColumnFilters.get(e);if(!n)return;const i=this.beans,s=n.column,o=s.getColDef(),r=s.isFilterAllowed(),a=this.getDefaultFilter(s),l=i.selectableFilter,u=l!=null&&l.isSelectable(o)?l.getFilterDef(s,o):o,c=r?this.createHandlerFunc(s,u,this.getDefaultFilter(s)):void 0,d=!!c,h=n.isHandler;if(h!=d){this.destroyFilter(s,"paramsUpdated");return}const{compDetails:p,createFilterUi:g}=(r?this.createFilterComp(s,u,a,F=>F,d,"colDef"):null)??{compDetails:null,createFilterUi:null},C=(p==null?void 0:p.params)??ty(i.userCompFactory,u,this.createFilterCompParams(s,d,"colDef"));if(h){const F=(c==null?void 0:c.handlerNameOrCallback)??(c==null?void 0:c.filterHandler),x=Nn(this.model,e);if(n.handlerGenerator!=F){const V=n.handler,{handler:I,handlerParams:M}=this.createHandlerFromFunc(s,c.filterHandler,C);n.handler=I,n.handlerParams=M,n.handlerGenerator=F,delete this.model[e],(v=I.init)==null||v.call(I,{...M,source:"init",model:null}),this.destroyBean(V),x!=null&&((S=this.beans.filterManager)==null||S.onFilterChanged({columns:[s],source:t}))}else{const V=this.createHandlerParams(s,p==null?void 0:p.params);n.handlerParams=V,(E=(R=n.handler).refresh)==null||E.call(R,{...V,source:"colDef",model:x})}}if(this.areFilterCompsDifferent(((y=n.filterUi)==null?void 0:y.compDetails)??null,p)||!n.filterUi||!p){this.destroyFilterUi(n,s,p,g);return}n.filterUi.filterParams=C,(b=br(n,h))==null||b.then(F=>{(F!=null&&F.refresh?F.refresh(C):!0)===!1?this.destroyFilterUi(n,s,p,g):this.dispatchLocalEvent({type:"filterParamsChanged",column:s,params:C})})}refreshHandlerAndUi(e,t,n,i,s){const o=this.cachedFilter(e);if(!o)return i&&this.getOrCreateFilterWrapper(e,!0),gn.resolve();if(!o.isHandler)return gn.resolve();const{filterUi:r,handler:a,handlerParams:l}=o;return I9(()=>{if(r){const{created:u,filterParams:c}=r;if(u)return r.promise.then(d=>d?{filter:d,filterParams:c}:void 0);r.refreshed=!0}return gn.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},n,s)}setColumnFilterWrapper(e,t){const n=e.getColId();this.allColumnFilters.set(n,t),this.allColumnListeners.set(n,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(n)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:n}=e,{componentClass:i}=t;return!(n===i||(n==null?void 0:n.render)&&(i==null?void 0:i.render)&&n.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const n=this.getOrCreateFilterUi(t);return n?new Promise(i=>{n.then(s=>{i(sd(s))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:n})=>{this.setModelForColumn(e,t).then(()=>n())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:i,model:s}=this,o=e.getColId(),r=i.get(o);return r?r.model??null:Nn(s,o)}const n=this.cachedFilter(e);return n?this.getModelFromFilterWrapper(n):null}setModelForColumn(e,t){var n;if((n=this.beans.dataTypeSvc)!=null&&n.isPendingInference){let i=()=>{};const s=new Promise(o=>{i=o});return this.columnModelUpdates.push({key:e,model:t,resolve:i}),s}return new Promise(i=>{this.setModelForColumnLegacy(e,t).then(s=>i(s))})}getStateForColumn(e){return this.state.get(e)??{model:Nn(this.model,e)}}setModelForColumnLegacy(e,t){const n=this.beans.colModel.getColDefCol(e),i=n?this.getOrCreateFilterWrapper(n,!0):null;return i?this.setModelOnFilterWrapper(i,t):gn.resolve()}setColDefPropsForDataType(e,t,n){var c;const i=e.filter,s=i===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):i;if(typeof s!="string")return;let o,r;const a=this.beans,{filterParams:l,filterValueGetter:u}=e;s==="agMultiColumnFilter"?{filterParams:o,filterValueGetter:r}=((c=a.multiFilter)==null?void 0:c.getParamsForDataType(l,u,t,n))??{}:{filterParams:o,filterValueGetter:r}=H9(s,l,u,t,n,a,this.getLocaleTextFunc()),e.filterParams=o,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,n,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",n)),e.dispatchColEvent("filterChanged",n,i)}setModelOnFilterWrapper(e,t,n){return new gn(i=>{if(e.isHandler){const o=e.column,r=o.getColId(),a=this.model[r];if(this.updateStoredModel(r,t),n&&t===a){i();return}this.refreshHandlerAndUi(o,t,"api").then(()=>i());return}const s=br(e);if(s){s.then(o=>{if(typeof(o==null?void 0:o.setModel)!="function"){xe(65),i();return}(o.setModel(t)||gn.resolve()).then(()=>i())});return}i()})}updateStoredModel(e,t){ze(t)?this.model[e]=t:delete this.model[e];const n=this.state.get(e),i={model:t,state:n==null?void 0:n.state};this.state.set(e,i)}filterModified(e,t){var n;(n=this.getOrCreateFilterUi(e))==null||n.then(i=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:i,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,n){var r;const i=e.getColId(),s=this.cachedFilter(e),o=()=>s==null?void 0:s.filterUi;l1(t,o,()=>Nn(this.model,i),()=>this.state.get(i),a=>this.updateState(e,a),a=>{var l,u;return(u=(l=o())==null?void 0:l.filterParams)==null?void 0:u.onModelChange(a,n)},s!=null&&s.isHandler?(r=s.handler.processModelToApply)==null?void 0:r.bind(s.handler):void 0)}updateAllModels(e,t){const n=[];this.allColumnFilters.forEach((i,s)=>{var r;const o=this.beans.colModel.getColDefCol(s);o&&l1(e,()=>i.filterUi,()=>Nn(this.model,s),()=>this.state.get(s),a=>this.updateState(o,a),a=>{this.updateStoredModel(s,a),this.dispatchLocalEvent({type:"filterAction",column:o,action:e}),n.push(this.refreshHandlerAndUi(o,a,"ui"))},i!=null&&i.isHandler?(r=i.handler.processModelToApply)==null?void 0:r.bind(i.handler):void 0)}),n.length&&gn.all(n).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();a1(()=>{var n;return(n=this.cachedFilter(e))==null?void 0:n.filterUi},()=>Nn(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:n}=this;for(const s of n)if(s.source==="COLUMN_MENU")return!1;let i=!1;for(const s of e.keys()){const o=e.get(s);if(o.valid===!1)return!1;(o.model??null)!==Nn(t,s)&&(i=!0)}return i}hasUnappliedModel(e){var i;const{model:t,state:n}=this;return(((i=n.get(e))==null?void 0:i.model)??null)!==Nn(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const n=this.beans.filterPanelSvc;return n!=null&&n.isActive?!!n.getState(e.getColId()):!1}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function ine(e){var t;return!!((t=e.filterManager)!=null&&t.isAnyFilterPresent())}function sne(e,t="api"){var n;(n=e.filterManager)==null||n.onFilterChanged({source:t})}var one=class extends ge{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:n}=this;this.alwaysPassFilter=n.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=n.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,n="api"){var i;this.isAdvFilterEnabled()||(i=this.colFilter)==null||i.setState(e,t,n)}setFilterModel(e,t="api",n){var i;if(this.isAdvFilterEnabled()){n||this.warnAdvFilters();return}(i=this.colFilter)==null||i.setModel(e,t)}getFilterModel(){var e;return((e=this.colFilter)==null?void 0:e.getModel())??{}}getFilterState(){var e;return(e=this.colFilter)==null?void 0:e.getState()}isColumnFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isFilterPresent())}isAggregateFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isAggFilterPresent())}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){var t,n;e?(t=this.colFilter)!=null&&t.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):(n=this.advancedFilter)!=null&&n.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){var e;return!!((e=this.advancedFilter)!=null&&e.isEnabled())}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){YC(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:n,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):gn.resolve()).then(()=>{var o;const s={source:t,type:"filterChanged",columns:i};n&&ci(s,n),this.eventSvc.dispatchEvent(s),(o=this.colFilter)==null||o.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){var e;return!!((e=this.colFilter)!=null&&e.isSuppressFlashingCellsBecauseFiltering())}isQuickFilterPresent(){var e;return!!((e=this.quickFilter)!=null&&e.isFilterPresent())}updateAggFiltering(){this.aggFiltering=!!YC(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){var n;const{rowNode:t}=e;return(n=this.alwaysPassFilter)!=null&&n.call(this,t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){var n;const{rowNode:t}=e;return(n=this.alwaysPassFilter)!=null&&n.call(this,t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){var t;return this.isAdvFilterEnabled()?!1:!!((t=this.colFilter)!=null&&t.isFilterAllowed(e))}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){var n;if(this.isAdvFilterEnabled()){if((n=this.beans.dataTypeSvc)!=null&&n.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){var e;return this.isAdvFilterEnabled()?!1:!!((e=this.colFilter)!=null&&e.hasFloatingFilters())}getColumnFilterInstance(e){var t;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):((t=this.colFilter)==null?void 0:t.getFilterInstance(e))??Promise.resolve(void 0)}warnAdvFilters(){xe(68)}setupAdvFilterHeaderComp(e){var t;(t=this.advancedFilter)==null||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){var n;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):((n=this.colFilter)==null?void 0:n.setModelForColumn(e,t))??Promise.resolve()}},rne=class extends ge{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){var e;(e=this.hidePopup)==null||e.call(this)}showMenuAfterMouseEvent(e,t,n,i){e&&!e.isColumn||this.showPopup(e,s=>{var o;(o=this.popupSvc)==null||o.positionPopupUnderMouseEvent({column:e,type:n,mouseEvent:t,ePopup:s})},n,t.target,Li(this.gos),i)}showMenuAfterButtonClick(e,t,n,i){if(e&&!e.isColumn)return;let s=-1,o="left";const r=Li(this.gos);!r&&this.gos.get("enableRtl")&&(s=1,o="right");const a=r?void 0:4*s,l=r?void 0:4;this.showPopup(e,u=>{var c;(c=this.popupSvc)==null||c.positionPopupByComponent({type:n,eventSource:t,ePopup:u,nudgeX:a,nudgeY:l,alignSide:o,keepWithinBounds:!0,position:"under",column:e})},n,t,r,i)}showPopup(e,t,n,i,s,o){var C;const r=e?this.createBean(new V9(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!(r!=null&&r.hasFilter())||!e){Kt(57);return}const a=En({tag:"div",cls:`ag-menu${s?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:v=>this.trapFocusWithin(v,a)}),a.appendChild(r==null?void 0:r.getGui());let l;const u=()=>r==null?void 0:r.afterGuiDetached(),c=nK(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,d=v=>{I1(e,!1,"contextMenu");const S=v instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),S&&i&&qs(i)){const R=NP(i);R==null||R.focus({preventScroll:!0})}u(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,n,e),o==null||o()},h=this.getLocaleTextFunc(),p=s&&n!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),g=(C=this.popupSvc)==null?void 0:C.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:d,positionCallback:()=>t(a),anchorToElement:c,ariaLabel:p});g&&(this.hidePopup=l=g.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:n,hidePopup:l})}),I1(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,n,e)}trapFocusWithin(e,t){e.key!==se.TAB||e.defaultPrevented||Fa(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Da(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,n){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:n??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},ane=class extends ge{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,n){if(!t)return;const i=e.getColDef(),{selectableFilter:s,valueSvc:o}=this.beans,r=n??(s==null?void 0:s.getFilterValueGetter(e.getColId()))??i.filterValueGetter;return r?this.executeFilterValueGetter(r,t.data,e,t,i):o.getValue(e,t)}executeFilterValueGetter(e,t,n,i,s){const{expressionSvc:o,valueSvc:r}=this.beans,a=dt(this.gos,{data:t,node:i,column:n,colDef:s,getValue:r.getValueCallback.bind(r,i)});return typeof e=="function"?e(a):o==null?void 0:o.evaluate(e,a)}},lne={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},une=class extends $t{constructor(){super(lne,[op]),this.eFloatingFilterText=We}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const n=e,i=n.getHandler();if(i.getModelAsString){const s=i.getModelAsString(n.model);this.eFloatingFilterText.setValue(s)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const n=t.getModelAsString(e);this.eFloatingFilterText.setValue(n)}})}refresh(e){this.init(e)}},Sw=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const n=e.filterOptions??t;this.filterOptions!==n&&(this.filterOptions=n,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const n=[["displayKey"],["displayName"],["predicate","test"]],i=s=>s.some(o=>t[o]!=null)?!0:(xe(72,{keys:s}),!1);if(!n.every(i)){this.filterOptions=e.filter(s=>s===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const n=t[0];if(typeof n=="string")return n;if(n.displayKey)return n.displayKey;xe(73)}else xe(74)}getCustomOption(e){return this.customFilterOptions[e]}};function vd(e,t,n){return n==null?e.splice(t):e.splice(t,n)}function kp(e){return e==null||typeof e=="string"&&e.trim().length===0}function cne(e){return e==="AND"||e==="OR"?e:"AND"}function dne(e,t,n){if(e==null)return;const{predicate:i}=e;if(i!=null&&!t.some(s=>s==null))return i(t,n)}function hne(e,t){let n=e.length;return n>t&&(e.splice(t),xe(78),n=t),n}function Cd(e,t){const n=t.getCustomOption(e);if(n){const{numberOfInputs:s}=n;return s??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}var Ew=class extends K9{constructor(e,t,n){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=n,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new Sw;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=cne(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions();const t=this.getGui();this.isReadOnly()?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,n)=>{const i=n===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const n=!e.operator,i=!t.operator;if(!n&&i||n&&!i)return!1;let o;if(n){const r=e,a=t;o=this.areSimpleModelsEqual(r,a)}else{const r=e,a=t;o=r.operator===a.operator&&vr(r.conditions,a.conditions,(l,u)=>this.areSimpleModelsEqual(l,u))}return o}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),gn.resolve();if(e.operator){const i=e;let s=i.conditions;s==null&&(s=[],xe(77));const o=hne(s,this.maxNumConditions),r=this.getNumConditions();if(o<r)this.removeConditionsAndOperators(o);else if(o>r)for(let l=r;l<o;l++)this.createJoinOperatorPanel(),this.createOption();const a=i.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),s.forEach((l,u)=>{this.eTypes[u].setValue(l.type,!0),this.setConditionIntoUi(l,u)})}else{const i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),gn.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(xe(79),t=1),this.maxNumConditions=t;let n=e.numAlwaysVisibleConditions??1;n<1&&(xe(80),n=1),n>t&&(xe(81),n=t),this.numAlwaysVisibleConditions=n}createOption(){const e=this.getGui(),t=this.createManagedBean(new wy);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const n=this.createEValue();this.eConditionBodies.push(n),e.appendChild(n),this.putOptionsIntoDropdown(t),this.resetType(t);const i=this.getNumConditions()-1;this.forEachPositionInput(i,s=>this.resetInput(s)),this.addChangedListeners(t,i)}createJoinOperatorPanel(){const e=En({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),n=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const i=this.eJoinPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,s),this.resetJoinOperatorOr(n,i,s),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(e,t,n){const i=this.createManagedBean(new R7);e.push(i);const s="ag-filter-condition-operator";return i.addCss(s),i.addCss(`${s}-${n}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const n of t)e.addOption(n);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?e=n:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const n=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<n){this.removeConditionsAndOperators(n+1);const i=e+1,s=n-i;s>0&&this.removeConditionsAndOperators(i,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,s)=>{const o=this.isConditionDisabled(s,e);i.setDisabled(o||this.filterListOptions.length<=1),s===1&&($c(this.eJoinPanels[0],o),this.eJoinAnds[0].setDisabled(o),this.eJoinOrs[0].setDisabled(o))}),this.eConditionBodies.forEach((i,s)=>{rn(i,this.isConditionBodyVisible(s))});const n=(t??this.getJoinOperator())==="OR";for(const i of this.eJoinAnds)i.setValue(!n,!0);for(const i of this.eJoinOrs)i.setValue(n,!0);this.forEachInput((i,s,o,r)=>{this.setElementDisplayed(i,s<r),this.setElementDisabled(i,this.isConditionDisabled(o,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:n,eConditionBodies:i,eJoinPanels:s,eJoinAnds:o,eJoinOrs:r}=this;this.removeComponents(n,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(s,a,t),this.removeComponents(o,a,t),this.removeComponents(r,a,t)}removeElements(e,t,n){const i=vd(e,t,n);for(const s of i)Es(s)}removeComponents(e,t,n){const i=vd(e,t,n);for(const s of i)Es(s.getGui()),this.destroyBean(s)}afterGuiAttached(e){var t;if(super.afterGuiAttached(e),this.resetPlaceholder(),!(e!=null&&e.suppressFocus)){let n;if(!this.isReadOnly()){const i=this.getInputs(0)[0];i instanceof Ta&&this.isConditionBodyVisible(0)?n=i.getInputElement():n=(t=this.eTypes[0])==null?void 0:t.getFocusableElement()}(n??this.getGui()).focus({preventScroll:!0})}}afterGuiDetached(){var r;super.afterGuiDetached();const e=this.params;if((r=this.beans.colFilter)!=null&&r.shouldKeepStateOnDetach(e.column))return;e.onStateChange({model:e.model});let t=-1,n=-1,i=!1;const s=this.getJoinOperator();for(let a=this.getNumConditions()-1;a>=0;a--)if(this.isConditionUiComplete(a))t===-1&&(t=a,n=a);else{const l=a>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(a-1),u=a<t;(l||u)&&(this.removeConditionsAndOperators(a,1),i=!0,u&&n--)}let o=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),o=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),o=!0),o&&this.updateConditionStatusesAndValues(n,s),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getModelAsString(e){var t,n;return((n=(t=this.params.getHandler())==null?void 0:t.getModelAsString)==null?void 0:n.call(t,e))??""}getPlaceholderText(e,t){let n=this.translate(e);if(typeof this.filterPlaceholder=="function"){const i=this.eTypes[t].getValue(),s=this.translate(i);n=this.filterPlaceholder({filterOptionKey:i,filterOption:s,placeholder:n})}else typeof this.filterPlaceholder=="string"&&(n=this.filterPlaceholder);return n}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,n,i,s)=>{if(!(t instanceof Ta))return;const o=n===0&&s>1?"inRangeStart":n===0?"filterOoo":"inRangeEnd",r=n===0&&s>1?e("ariaFilterFromValue","Filter from value"):n===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(o,i)),t.setInputAriaLabel(r)})}setElementValue(e,t,n){e instanceof Ta&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){EP(e)&&rn(e.getGui(),t)}setElementDisabled(e,t){EP(e)&&$c(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Ta&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,n)=>{this.forEachPositionTypeInput(n,t,e)})}forEachPositionInput(e,t){const n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}forEachPositionTypeInput(e,t,n){const i=Cd(t,this.optionsFactory),s=this.getInputs(e);for(let o=0;o<s.length;o++){const r=s[o];r!=null&&n(r,o,e,i)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return Cd(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(n=>n==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,n)=>this.resetJoinOperatorAnd(t,n,this.joinOperatorId+n)),this.eJoinOrs.forEach((t,n)=>this.resetJoinOperatorOr(t,n,this.joinOperatorId+n)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const n=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(n).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),n)}resetJoinOperatorOr(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),n)}resetJoinOperator(e,t,n,i,s){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(i),t)}updateJoinOperatorsDisabled(){const e=(t,n)=>this.updateJoinOperatorDisabled(t,n);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const n=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((i,s,o)=>{o===t&&this.setElementValue(i,n[s]!=null?n[s]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,n,i)=>{this.setElementValue(t,n===0&&i===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,n=>{this.attachElementOnChange(n,this.listener)}))}hasInvalidInputs(){return!1}isReadOnly(){return!!this.params.readOnly}},YA=class{constructor(e,t,n,i,s,o){this.alive=!0,this.context=e,this.eParent=s;const r=o7(t,n,i);r&&r.newAgStackInstance().then(a=>{var c,d;if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;s.appendChild(a.getGui()),(c=a==null?void 0:a.afterGuiAttached)==null||c.call(a);const{tempValue:l,disabled:u}=this;l&&a.setDate(l),u!=null&&((d=a.setDisabled)==null||d.call(a,u)),o==null||o(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){var n;const t=this.dateComp;t?(n=t.setDisabled)==null||n.call(t,e):this.disabled=e}setDisplayed(e){rn(this.eParent,e)}setInputPlaceholder(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.setInputPlaceholder)==null||n.call(t,e)}setInputAriaLabel(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.setInputAriaLabel)==null||n.call(t,e)}afterGuiAttached(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.afterGuiAttached)==null||n.call(t,e)}updateParams(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.refresh)==null||n.call(t,e)}},Rw=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function ZA(e,t){const{dateFrom:n,dateTo:i,type:s}=e||{};return[n&&Ci(n,void 0,!0)||null,i&&Ci(i,void 0,!0)||null].slice(0,Cd(s,t))}var JA=1e3,XA=1/0,fne=class extends Ew{constructor(){super("dateFilter",ZA,Rw),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=JA,this.maxValidYear=XA,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,u)=>{const c=e[l];if(c!=null)if(isNaN(c))xe(82,{param:l});else return c==null?u:Number(c);return u},n=t("minValidYear",JA),i=t("maxValidYear",XA);this.minValidYear=n,this.maxValidYear=i,n>i&&xe(83);const{minValidDate:s,maxValidDate:o}=e,r=s instanceof Date?s:Ci(s);this.minValidDate=r;const a=o instanceof Date?o:Ci(o);this.maxValidDate=a,r&&a&&r>a&&xe(84)}createDateCompWrapper(e){const{beans:{userCompFactory:t,context:n,gos:i},params:s}=this,o=new YA(n,t,s.colDef,dt(i,{onDateChanged:()=>this.onUiChanged(),filterParams:s,location:"filter"}),e);return this.addDestroyFunc(()=>o.destroy()),o}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=En({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,n,i){const s=En({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(s),e.appendChild(s),n.push(this.createDateCompWrapper(s))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),vd(this.eConditionPanelsFrom,e,t),vd(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){const i=vd(e,t,n);for(const s of i)s.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:n,minValidYear:i,maxValidYear:s}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<i)return!1;if(n){if(e>n)return!1}else if(e.getUTCFullYear()>s)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((n,i,s,o)=>{s!==e||!t||i>=o||(t=t&&this.isValidDateValue(n.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={},i=this.getValues(e),s=this.params.useIsoSeparator?"T":" ";return i.length>0&&(n.dateFrom=Ni(i[0],!0,s)),i.length>1&&(n.dateTo=Ni(i[1],!0,s)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...n}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),n=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.setInputAriaLabel(n)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,s,o)=>{i<o&&t.push(n.getDate())}),t}translate(e){return e==="lessThan"?super.translate("before"):e==="greaterThan"?super.translate("after"):super.translate(e)}},QA=class extends ge{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,n=new Sw;this.optionsFactory=n,n.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(n,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,n=this.optionsFactory;n.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:n,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:n}=t,i=[];if(n){const r=t;i.push(...r.conditions??[])}else i.push(t);const s=n&&n==="OR"?"some":"every",o=this.params.getValue(e.node);return i[s](r=>this.individualConditionPasses(e,r,o))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:n,maxNumConditions:i}}=e;if(t==null)return;let o=p1(t)?t.conditions:[t];const r=(n==null?void 0:n.map(c=>typeof c=="string"?c:c.displayKey))??this.defaultOptions;if(!(!o||o.every(c=>r.find(d=>d===c.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const u=this.filterType;if((o&&!o.every(c=>c.filterType===u)||t.filterType!==u)&&(o=o.map(c=>({...c,filterType:u})),l=!0),typeof i=="number"&&o&&o.length>i&&(o=o.slice(0,i),l=!0),l){const c=o.length>1?{...t,filterType:u,conditions:o}:{...o[0],filterType:u};this.params={...e,model:c},e.onModelChange(c)}}individualConditionPasses(e,t,n){const i=this.optionsFactory,s=this.mapValuesFromModel(t,i),o=i.getCustomOption(t.type),r=dne(o,s,n);return r??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,n,t,e))}},eI=class extends QA{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:n,includeBlanksInGreaterThan:i,includeBlanksInLessThan:s,includeBlanksInRange:o}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(n)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(s)return!0;break;case"inRange":if(o)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,n){const i=n.type;if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const s=this.comparator(),o=e[0]!=null?s(e[0],t):0;switch(i){case"equals":return o===0;case"notEqual":return o!==0;case"greaterThan":return o>0;case"greaterThanOrEqual":return o>=0;case"lessThan":return o<0;case"lessThanOrEqual":return o<=0;case"inRange":{const r=s(e[1],t);return this.params.filterParams.inRangeInclusive?o>=0&&r<=0:o>0&&r<0}case"blank":return kp(t);case"notBlank":return!kp(t);default:return xe(76,{filterModelType:i}),!0}}},tI={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},pne={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Dw=class extends ge{constructor(e,t,n){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=n}getModelAsString(e,t){const n=this.getLocaleTextFunc(),i=t==="filterToolPanel";if(!e)return i?Sr(this,"filterSummaryInactive"):null;if(e.operator!=null){const o=e,a=(o.conditions??[]).map(u=>this.getModelAsString(u,t)),l=o.operator==="AND"?"andCondition":"orCondition";return a.join(` ${Sr(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return i?Sr(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):n(e.type,e.type);{const o=e,r=this.optionsFactory.getCustomOption(o.type),{displayKey:a,displayName:l,numberOfInputs:u}=r||{};return a&&l&&u===0?n(a,l):this.conditionToString(o,i,o.type==="inRange"||u===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:n}=e;this.optionsFactory=t,this.filterParams=n}conditionForToolPanel(e,t,n,i,s,o){let r;const a=this.getTypeKey(e);return a&&(r=Sr(this,a)),s&&o&&(r=this.getLocaleTextFunc()(s,o)),r!=null?t?`${r} ${Sr(this,"filterSummaryInRangeValues",[n(),i()])}`:`${r} ${n()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},nI=class extends Dw{constructor(e,t){super(e,t,n=>{const{dataTypeSvc:i,valueSvc:s}=this.beans,o=t.column,r=i==null?void 0:i.getDateFormatterFunction(o),a=r?r(n??void 0):n;return s.formatValue(o,null,a)}),this.filterTypeKeys=tI}conditionToString(e,t,n,i,s){const{type:o}=e,r=Ci(e.dateFrom),a=Ci(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,u=t?this.formatValue.bind(this):h=>py(h,l),c=()=>r!==null?u(r):"null",d=()=>a!==null?u(a):"null";if(t){const h=this.conditionForToolPanel(o,n,c,d,i,s);if(h!=null)return h}return n?`${c()}-${d()}`:r!=null?u(r):`${o}`}};function gne(e,t){const n=t;return n<e?-1:n>e?1:0}var mne=class extends eI{constructor(){super(ZA,Rw),this.filterType="date",this.FilterModelFormatterClass=nI}comparator(){return this.params.filterParams.comparator??gne}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}},iI=class extends $t{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let n;t?n=e.conditions[0]:n=e,this.lastType=n.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const n=e;return this.isTypeEditable(n.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const n=e;this.onModelUpdated(n.model)}}setParams(e){const t=new Sw;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const n=this.optionsFactory.defaultOption;t||(this.lastType=n),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(n);this.setEditable(i)}refresh(e){this.params=e;const t=e,n=this.reactive;if((!n||t.source==="colDef")&&this.updateParams(e),n){const{source:i,model:s}=t;if(i==="dataChanged"||i==="ui")return;this.onModelUpdated(s)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t!=null&&t.afterFloatingFilter||t!=null&&t.afterDataChange||this.onModelUpdated(e)}hasSingleInput(e){var n;const t=(n=this.optionsFactory.getCustomOption(e))==null?void 0:n.numberOfInputs;return t==null||t==1}isTypeEditable(e){const t=["inRange","empty","blank","notBlank"];return!!e&&!this.readOnly&&this.hasSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},vne={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},Cne=class extends iI{constructor(){super(vne,[op]),this.eReadOnlyText=We,this.eDateWrapper=We,this.FilterModelFormatterClass=nI,this.filterType="date",this.defaultOptions=Rw}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const n=e?Ci(e.dateFrom):null;this.dateComp.setDate(n),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){rn(this.eDateWrapper,e),rn(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const n=t.model,i=Ni(e),s=i==null?null:{...n??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:i};t.onModelChange(s,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t==null||t.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=_y(e,this.defaultDebounceMs);return dt(this.gos,{onDateChanged:$n(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:n,params:i}=this;this.dateComp=new YA(e,t,i.column.getColDef(),this.getDateComponentParams(),n,s=>{s.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},yne={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},wne=class extends $t{constructor(){super(yne,[op]),this.eDateInput=We,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){var h;const t=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=n&&Cr();const{minValidYear:i,maxValidYear:s,minValidDate:o,maxValidDate:r,buttons:a,includeTime:l,colDef:u}=e.filterParams||{},c=this.beans.dataTypeSvc,d=l??((h=c==null?void 0:c.getDateIncludesTimeFlag)==null?void 0:h.call(c,u.cellDataType))??!1;if(n?d?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text",o&&i&&xe(85),r&&s&&xe(86),o&&r){const[p,g]=[o,r].map(C=>C instanceof Date?C:Ci(C));p&&g&&p.getTime()>g.getTime()&&xe(87)}o?o instanceof Date?t.min=py(o):t.min=o:i&&(t.min=`${i}-01-01`),r?r instanceof Date?t.max=py(r):t.max=r:s&&(t.max=`${s}-12-31`),this.isApply=e.location==="floatingFilter"&&!!(a!=null&&a.includes("apply"))}refresh(e){this.params=e,this.setParams(e)}getDate(){return Ci(this.eDateInput.getValue())}setDate(e){var i;const t=this.params.filterParams.colDef.cellDataType,n=((i=this.beans.dataTypeSvc)==null?void 0:i.getDateIncludesTimeFlag(t))??!1;this.eDateInput.setValue(Ni(e,n))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e!=null&&e.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){var t;return((t=e==null?void 0:e.filterParams)==null?void 0:t.browserDatePicker)??!0}},Fw=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function Tw(e){const{allowedCharPattern:t}=e??{};return t??null}function xw(e){return e==null||isNaN(e)?null:e}function sI(e,t){const{filter:n,filterTo:i,type:s}=e||{};return[xw(n),xw(i)].slice(0,Cd(s,t))}var bne=class extends Ew{constructor(){super("numberFilter",sI,Fw),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}setElementValue(e,t,n){const{numberFormatter:i}=this.params,s=!n&&i?i(t??null):t;super.setElementValue(e,s)}createEValue(){const e=Tw(this.params),t=En({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,n,i){const s=this.createManagedBean(i?new xa({allowedCharPattern:i}):new yy);s.addCss(`ag-filter-${n}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeEValues(e,t){const n=i=>this.removeComponents(i,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,s,o)=>{i<o&&t.push(xw(this.stringToFloat(n.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}stringToFloat(e){if(typeof e=="number")return e;let t=Io(e);t!=null&&t.trim()===""&&(t=null);const n=this.params.numberParser;return n?n(t):t==null||t.trim()==="-"?null:Number.parseFloat(t)}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}},oI=class extends Dw{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=tI}conditionToString(e,t,n,i,s){const{filter:o,filterTo:r,type:a}=e,l=this.formatValue.bind(this);if(t){const u=this.conditionForToolPanel(a,n,()=>l(o),()=>l(r),i,s);if(u!=null)return u}return n?`${l(o)}-${l(r)}`:o!=null?l(o):`${a}`}},Sne=class extends eI{constructor(){super(sI,Fw),this.filterType="number",this.FilterModelFormatterClass=oI}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},rI=class extends ge{constructor(e){super(),this.params=e,this.eInput=We,this.onValueChanged=()=>{}}setupGui(e){var i;this.eInput=this.createManagedBean(new xa((i=this.params)==null?void 0:i.config));const t=this.eInput.getGui();e.appendChild(t);const n=s=>this.onValueChanged(s);this.addManagedListeners(t,{input:n,keydown:n})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:n}=this;n.setInputAriaLabel(e),t!==void 0&&n.setAutoComplete(t)}};function _w(e){const t=e==null?void 0:e.trim();return t===""?e:t}function aI(e,t){const{filter:n,filterTo:i,type:s}=e||{};return[n||null,i||null].slice(0,Cd(s,t))}var Ene={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},lI=class extends iI{constructor(){super(...arguments),this.eFloatingFilterInputContainer=We,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(Ene)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const t=e.browserAutoComplete??!1,{inputSvc:n,defaultDebounceMs:i,readOnly:s}=this;if(n.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=cp(e.filterParams),!s){const o=_y(e.filterParams,i),r=$n(this,this.syncUpWithParentFilter.bind(this),o);n.setValueChangedListener(r)}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,n=t.getValue();Gn(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(n,!0)}syncUpWithParentFilter(e){const t=e.key===se.ENTER,n=this.reactive;if(n&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:i,params:s,lastType:o}=this;let r=i.getValue();if(s.filterParams.trimInput&&(r=_w(r),i.setValue(r,!0)),n){const a=s,l=a.model,u=this.convertValue(r),c=u==null?null:{...l??{filterType:this.filterType,type:o??this.optionsFactory.defaultOption},filter:u};a.onModelChange(c,{afterFloatingFilter:!0})}else s.parentFilterInstance(a=>{a==null||a.onFloatingFilterChanged(o||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},Rne=class extends ge{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new yy),this.eTextInput=this.createManagedBean(new xa),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),n=this.eTextInput.getGui();e.appendChild(t),e.appendChild(n),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(n,i=>this.onValueChanged(i))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},Dne=class extends lI{constructor(){super(...arguments),this.FilterModelFormatterClass=oI,this.filterType="number",this.defaultOptions=Fw}updateParams(e){Tw(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=Tw(e.filterParams),this.allowedCharPattern?this.createManagedBean(new rI({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new Rne)}convertValue(e){return e?Number(e):null}},Pw=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],Fne=class extends Ew{constructor(){super("textFilter",aI,Pw),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,i,s,o)=>{i<o&&t.push(Io(n.getValue()))}),t}createEValue(){const e=En({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:n}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,n,"to"),e}createFromToElement(e,t,n){const i=this.createManagedBean(new xa);i.addCss(`ag-filter-${n}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeEValues(e,t){const n=o=>this.removeComponents(o,e,t),{eValuesFrom:i,eValuesTo:s}=this;n(i),n(s)}},uI=class extends Dw{constructor(){super(...arguments),this.filterTypeKeys=pne}conditionToString(e,t,n,i,s){const{filter:o,filterTo:r,type:a}=e;if(t){const l=c=>()=>Sr(this,"filterSummaryTextQuote",[c]),u=this.conditionForToolPanel(a,n,l(o),l(r),i,s);if(u!=null)return u}return n?`${o}-${r}`:o!=null?`${o}`:`${a}`}},Tne=({filterOption:e,value:t,filterText:n})=>{if(n==null)return!1;switch(e){case"contains":return t.includes(n);case"notContains":return!t.includes(n);case"equals":return t===n;case"notEqual":return t!=n;case"startsWith":return t.indexOf(n)===0;case"endsWith":{const i=t.lastIndexOf(n);return i>=0&&i===t.length-n.length}default:return!1}},xne=e=>e,_ne=e=>e==null?null:e.toString().toLowerCase(),Pne=class extends QA{constructor(){super(aI,Pw),this.filterType="text",this.FilterModelFormatterClass=uI}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??Tne,this.formatter=t.textFormatter??(t.caseSensitive?xne:_ne)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,n,i){const s=e.map(h=>this.formatter(h))||[],o=this.formatter(t),{api:r,colDef:a,column:l,context:u,filterParams:{textFormatter:c}}=this.params;if(n.type==="blank")return kp(t);if(n.type==="notBlank")return!kp(t);const d={api:r,colDef:a,column:l,context:u,node:i.node,data:i.data,filterOption:n.type,value:o,textFormatter:c};return s.some(h=>this.matcher({...d,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=n=>{const i={...n},{filter:s,filterTo:o}=n;return s&&(i.filter=_w(s)??null),o&&(i.filterTo=_w(o)??null),i};return p1(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},Ane=class extends lI{constructor(){super(...arguments),this.FilterModelFormatterClass=uI,this.filterType="text",this.defaultOptions=Pw}createFloatingFilterInputService(){return this.createManagedBean(new rI)}};function Ine(e){var t;return!!((t=e.quickFilter)!=null&&t.isFilterPresent())}function kne(e){var t;return(t=e.quickFilter)==null?void 0:t.getText()}function One(e){var t;(t=e.quickFilter)==null||t.resetCache()}var Mne=class extends ge{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",n=>this.setFilter(n.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){var l;const{autoColSvc:e,colModel:t,gos:n,pivotResultCols:i}=this.beans,s=t.isPivotMode(),o=e==null?void 0:e.getColumns(),r=t.getColDefCols();let a=(s&&!n.get("applyQuickFilterBeforePivotOrAgg")?(l=i==null?void 0:i.getPivotResultCols())==null?void 0:l.list:r)??[];o&&(a=a.concat(o)),this.colsToUse=n.get("includeHiddenColumnsInQuickFilter")?a:a.filter(u=>u.isVisible()||u.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(n=>t?this.doesRowPassCache(e,n):this.doesRowPassNoCache(e,n))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return ze(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){xe(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),n=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,n&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(n=>{const i=this.getTextForColumn(n,e);return ze(i)&&i.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let n;e?(this.checkGenerateAggText(t),n=t.quickFilterAggregateText):n=this.getAggText(t);const{quickFilterParts:i,matcher:s}=this;return s(i,n)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let n=this.beans.filterValueSvc.getValue(e,t);const i=e.getColDef();if(i.getQuickFilterText){const s=dt(this.gos,{value:n,node:t,data:t.data,column:e,colDef:i});n=i.getQuickFilterText(s)}return ze(n)?n.toString().toUpperCase():null}getAggText(e){const t=[];for(const n of this.colsToUse){const i=this.getTextForColumn(n,e);ze(i)&&t.push(i)}return t.join(`
147
+ `)}},Lne={moduleName:"ClientSideRowModelFilter",version:$e,rowModels:["clientSide"],beans:[Nte]},Aw={moduleName:"FilterCore",version:$e,beans:[one],apiFunctions:{isAnyFilterPresent:ine,onFilterChanged:sne},css:[Wte],dependsOn:[Lne]},cI={moduleName:"FilterValue",version:$e,beans:[ane]},Op={moduleName:"ColumnFilter",version:$e,beans:[nne,rne],dynamicBeans:{headerFilterCellCtrl:Vte},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:zte,getColumnFilterInstance:Ute,destroyFilter:jte,setFilterModel:Kte,getFilterModel:qte,getColumnFilterModel:Yte,setColumnFilterModel:Zte,showColumnFilter:Jte,hideColumnFilter:Xte,getColumnFilterHandler:Qte,doFilterAction:ene},dependsOn:[Aw,Ip,cI,Gte]},Nne={moduleName:"CustomFilter",version:$e,userComponents:{agReadOnlyFloatingFilter:une},dependsOn:[Op]},Vne={moduleName:"TextFilter",version:$e,dependsOn:[Op],userComponents:{agTextColumnFilter:{classImp:Fne,params:{useForm:!0}},agTextColumnFloatingFilter:Ane},dynamicBeans:{agTextColumnFilterHandler:Pne}},Bne={moduleName:"NumberFilter",version:$e,dependsOn:[Op],userComponents:{agNumberColumnFilter:{classImp:bne,params:{useForm:!0}},agNumberColumnFloatingFilter:Dne},dynamicBeans:{agNumberColumnFilterHandler:Sne}},Hne={moduleName:"DateFilter",version:$e,dependsOn:[Op],userComponents:{agDateColumnFilter:{classImp:fne,params:{useForm:!0}},agDateInput:wne,agDateColumnFloatingFilter:Cne},dynamicBeans:{agDateColumnFilterHandler:mne}},Gne={moduleName:"QuickFilterCore",version:$e,rowModels:["clientSide"],beans:[Mne],dependsOn:[Aw,cI]},$ne={moduleName:"QuickFilter",version:$e,apiFunctions:{isQuickFilterPresent:Ine,getQuickFilter:kne,resetQuickFilter:One},dependsOn:[Gne]},Wne={moduleName:"ExternalFilter",version:$e,dependsOn:[Aw]},zne=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",Iw=(e,t,n)=>{var a,l,u;const{editModelSvc:i}=e,s=(l=(a=i==null?void 0:i.getCellValidationModel())==null?void 0:a.getCellValidation(t))==null?void 0:l.errorMessages,o=(u=i==null?void 0:i.getRowValidationModel().getRowValidation(t))==null?void 0:u.errorMessages,r=s||o;return r!=null&&r.length?r.join(n("tooltipValidationErrorSeparator",". ")):void 0},Une=class extends ge{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,n,i){e&&t.destroyBean(e);const s=this.gos,o=bw(s),{column:r,eGui:a}=t,l=r.getColDef();!i&&o&&!l.headerComponent&&(i=Bf(()=>a.querySelector(".ag-header-cell-text")));const u="header",d=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),h=n??d,p={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>{var C;return n??((C=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:C.call(l,dt(s,{location:u,colDef:l,column:r,value:h,valueFormatted:d})))??(l==null?void 0:l.headerTooltip)},shouldDisplayTooltip:i,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let g=this.createTooltipFeature(p);return g&&(g=t.createBean(g),t.setRefreshFunction("tooltip",()=>g.refreshTooltip())),g}setupHeaderGroupTooltip(e,t,n,i){e&&t.destroyBean(e);const s=this.gos,o=bw(s),{column:r,eGui:a}=t,l=r.getColGroupDef();!i&&o&&!(l!=null&&l.headerGroupComponent)&&(i=Bf(()=>a.querySelector(".ag-header-group-text")));const u="headerGroup",d=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),h=n??d,p={getGui:()=>a,getLocation:()=>u,getTooltipValue:()=>{var C;return n??((C=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:C.call(l,dt(s,{location:u,colDef:l,column:r,value:h,valueFormatted:d})))??(l==null?void 0:l.headerTooltip)},shouldDisplayTooltip:i,getAdditionalParams:()=>{const C={column:r};return l&&(C.colDef=l),C}},g=this.createTooltipFeature(p);return g&&t.createBean(g)}enableCellTooltipFeature(e,t,n){const{beans:i}=this,{gos:s,editSvc:o}=i,{column:r,rowNode:a}=e;let l="cell";const u=()=>{const p=!!!(o!=null&&o.isEditing(e))&&Iw(i,e,this.getLocaleTextFunc());if(p)return l="cellEditor",p;l="cell";const g=r.getColDef(),C=a.data;if(g.tooltipField&&ze(C))return fd(C,g.tooltipField,r.isTooltipFieldContainsDots());const v=g.tooltipValueGetter;return v?v(dt(s,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},c=bw(s);n||(c&&!e.isCellRenderer()?n=()=>{const h=!!(o!=null&&o.isEditing(e));if(!h&&Iw(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const C=Bf(()=>{const v=e.eGui;return v.children.length===0?v:v.querySelector(".ag-cell-value")});return!h&&C()}:n=()=>!(o!=null&&o.isEditing(e)));const d={getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:t!=null?()=>t:u,shouldDisplayTooltip:n,getAdditionalParams:()=>({column:r,colDef:r.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(d,i)}setupFullWidthRowTooltip(e,t,n,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>n,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},o=this.beans,r=o.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(s,o);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){var a,l;const{beans:n}=this,{context:i}=n,s=((a=t.getValidationElement)==null?void 0:a.call(t,!0))||!((l=t.isPopup)!=null&&l.call(t))&&e.eGui;if(!s)return;const o={getGui:()=>s,getTooltipValue:()=>Iw(n,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var g,C;const{editModelSvc:u}=n,c=(g=u==null?void 0:u.getRowValidationModel())==null?void 0:g.getRowValidationMap(),d=(C=u==null?void 0:u.getCellValidationModel())==null?void 0:C.getCellValidationMap(),h=!!c&&c.size>0,p=!!d&&d.size>0;return h||p}},r=this.createTooltipFeature(o,n);if(r)return e.createBean(r,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=ze(t.tooltipField)||ze(t.tooltipValueGetter)||ze(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},jne=class extends m9{createTooltipComp(e,t){const n=l7(this.beans.userCompFactory,e);n==null||n.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){var e;(e=this.onColumnMovedEventCallback)==null||e.call(this),this.onColumnMovedEventCallback=void 0}},dI={moduleName:"Tooltip",version:$e,beans:[Une],dynamicBeans:{tooltipFeature:JP,highlightTooltipFeature:v9,tooltipStateManager:jne},userComponents:{agTooltipComponent:w9},dependsOn:[Ip],css:[zne]},lu=class{constructor(e){this.cellValueChanges=e}},kw=class extends lu{constructor(e,t,n,i){super(e),this.initialRange=t,this.finalRange=n,this.ranges=i}},Kne=10,hI=class{constructor(e){this.actionStack=[],this.maxStackSize=e||Kne,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},qne=class extends ge{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},n=this.activeCellEdit!==null&&q1(this.activeCellEdit,t),i=this.activeRowEdit!==null&&vZ(this.activeRowEdit,t);if(!(n||i||this.isPasting||this.isRangeInAction))return;const{rowPinned:o,rowIndex:r,column:a,oldValue:l,value:u}=e,c={rowPinned:o,rowIndex:r,columnId:a.getColId(),newValue:u,oldValue:l};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const n=e.get("undoRedoCellEditingLimit");if(n<=0)return;this.undoStack=new hI(n),this.redoStack=new hI(n),this.addListeners();const i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:s=>{s.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,s=>{this.gridBodyCtrl=s.gridBodyCtrl})}getCurrentUndoStackSize(){var e;return((e=this.undoStack)==null?void 0:e.getCurrentStackSize())??0}getCurrentRedoStackSize(){var e;return((e=this.redoStack)==null?void 0:e.getCurrentStackSize())??0}undo(e){const{eventSvc:t,undoStack:n,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});const s=this.undoRedo(n,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:s})}redo(e){const{eventSvc:t,undoStack:n,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});const s=this.undoRedo(i,n,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:s})}undoRedo(e,t,n,i,s){if(!e)return!1;const o=e.pop();return o!=null&&o.cellValueChanges?(this.processAction(o,r=>r[i],s),o instanceof kw?this.processRange(o.ranges||[o[n]]):this.processCell(o.cellValueChanges),t.push(o),!0):!1}processAction(e,t,n){for(const i of e.cellValueChanges){const{rowIndex:s,rowPinned:o,columnId:r}=i,a={rowIndex:s,rowPinned:o},l=$o(this.beans,a);l.displayed&&l.setDataValue(r,t(i),n)}}processRange(e){let t;const n=this.beans.rangeSvc;n.removeAllCellRanges(!0),e.forEach((i,s)=>{if(!i)return;const o=i.startRow,r=i.endRow;s===e.length-1&&(t={rowPinned:o.rowPinned,rowIndex:o.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:o.rowIndex,rowStartPinned:o.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:i.startColumn,columns:i.columns};n.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:n,rowPinned:i}=t,s={rowIndex:n,rowPinned:i},o=$o(this.beans,s),r={rowPinned:t.rowPinned,rowIndex:o.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:n,rowPinned:i}=e,{colModel:s,focusSvc:o,rangeSvc:r}=this.beans,a=s.getCol(n);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const u={rowIndex:t,column:a,rowPinned:i};o.setFocusedCell({...u,forceBrowserFocus:!0}),r==null||r.setRangeToCell(u)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new lu(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const n=new lu(this.cellValueChanges);this.pushActionsToUndoStack(n)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new lu(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new kw(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:n}=this.beans;t&&Oo(n)?e=new kw(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new lu(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),(t==null?void 0:t.length)===0))return;const n=new lu(t??[]);this.pushActionsToUndoStack(n),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},Yne=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",Zne={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},Jne=class extends bp{constructor(){super(Zne,[Cy]),this.eEditor=We}initialiseEditor(e){const t=e.value??void 0,n=this.eEditor;n.setValue(t),n.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(n,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),n=Mf(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${n})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,n=this.getValue();return t?t({value:n,internalErrors:null,cellEditorParams:e}):null}},Mp=class extends bp{constructor(e){super(),this.cellEditorInput=e,this.eEditor=We}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:n}=this,{cellStartedEdit:i,eventKey:s,suppressPreventDefault:o}=e;n.getInputElement().setAttribute("title",""),t.init(n,e);let r,a=!0;i?(this.focusAfterAttached=!0,s===se.BACKSPACE||s===se.DELETE?r="":s&&s.length===1?o?a=!1:r=s:(r=t.getStartValue(),s!==se.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&r!=null&&n.setStartValue(r),this.addGuiEventListener("keydown",l=>{const{key:u}=l;(u===se.PAGE_UP||u===se.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){var i,s;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Cr()||t.getFocusableElement().focus();const n=t.getInputElement();this.highlightAllOnFocus?n.select():(s=(i=this.cellEditorInput).setCaret)==null||s.call(i)}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},Xne={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Qne=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return Xne}getAgComponents(){return[BP]}init(e,t){var r,a;this.eEditor=e,this.params=t;const{min:n,max:i,step:s,colDef:o}=t;n!=null&&e.setMin(n),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((a=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:a.call(r,o.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:n}=this,{min:i,max:s,getValidationErrors:o}=n;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const l=i instanceof Date?i:new Date(i);if(t<l){const u=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${u}`,[u]))}}if(s){const l=s instanceof Date?s:new Date(s);if(t>l){const u=l.toLocaleDateString();r.push(a("maxDateValidation",`Date must be before ${u}`,[u]))}}}return r.length||(r=null),o?o({value:t,cellEditorParams:n,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,n=e.getDate();return!ze(n)&&!ze(t.value)?t.value:n??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Ni(e,this.includeTime??!1)}},eie=class extends Mp{constructor(){super(new Qne(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},tie={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},nie=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return tie}getAgComponents(){return[BP]}init(e,t){var r,a;this.eEditor=e,this.params=t;const{min:n,max:i,step:s,colDef:o}=t;n!=null&&e.setMin(n),i!=null&&e.setMax(i),s!=null&&e.setStep(s),this.includeTime=t.includeTime??((a=(r=this.getDataTypeService())==null?void 0:r.getDateIncludesTimeFlag)==null?void 0:a.call(r,o.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,n=e.getInputElement().value,i=this.formatDate(this.parseDate(n??void 0)),{min:s,max:o,getValidationErrors:r}=t;let a=[];if(i){const l=new Date(i),u=this.getLocaleTextFunc();if(s){const c=new Date(s);if(l<c){const d=c.toLocaleDateString();a.push(u("minDateValidation",`Date must be after ${d}`,[d]))}}if(o){const c=new Date(o);if(l>c){const d=c.toLocaleDateString();a.push(u("maxDateValidation",`Date must be before ${d}`,[d]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,n=this.formatDate(t.getDate());return!ze(n)&&!ze(e.value)?e.value:e.parseValue(n??"")}getStartValue(){return Ni(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):Ci(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Ni(e??null,this.includeTime??!1)??void 0}},iie=class extends Mp{constructor(){super(new nie(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},sie={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},oie=class extends bp{constructor(){super(sie,[F7]),this.eEditor=We}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:n,eventKey:i,maxLength:s,cols:o,rows:r}=e;this.focusAfterAttached=n,t.getInputElement().setAttribute("title",""),t.setMaxLength(s||200).setCols(o||60).setRows(r||10);let a;n?(this.focusAfterAttached=!0,i===se.BACKSPACE||i===se.DELETE?a="":i&&i.length===1?a=i:(a=this.getStartValue(e),i!==se.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return(t==null?void 0:t.toString())??t}onKeyDown(e){const t=e.key;(t===se.LEFT||t===se.UP||t===se.RIGHT||t===se.DOWN||e.shiftKey&&t===se.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:n}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),n&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:n}=t,i=e.getValue();return!ze(i)&&!ze(n)?n:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,i=this.getLocaleTextFunc(),s=this.getValue();let o=[];return typeof s=="string"&&t!=null&&s.length>t&&o.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),o.length||(o=null),n?n({value:s,internalErrors:o,cellEditorParams:e}):o}},rie={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},aie=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return rie}getAgComponents(){return[T7]}init(e,t){this.eEditor=e,this.params=t;const{max:n,min:i,precision:s,step:o}=t;n!=null&&e.setMax(n),i!=null&&e.setMin(i),s!=null&&e.setPrecision(s),o!=null&&e.setStep(o);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:n,getValidationErrors:i}=e,o=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let a=[];return typeof o=="number"&&(t!=null&&o<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),n!=null&&o>n&&a.push(r("maxValueValidation",`Must be less than or equal to ${n}.`,[String(n)]))),a.length||(a=null),i?i({value:o,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===se.UP||e.key===se.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();if(!ze(n)&&!ze(t.value))return t.value;let i=t.parseValue(n);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){Cr()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},lie=class extends Mp{constructor(){super(new aie(()=>this.getLocaleTextFunc()))}},uie={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},cie=class extends bp{constructor(){super(uie,[V7]),this.eEditor=We,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:n,gos:i}=this,{values:s,value:o,eventKey:r}=e;if(on(s)){xe(58);return}this.startedByEnter=r!=null?r===se.ENTER:!1;let a=!1;s.forEach(d=>{const h={value:d},p=n.formatValue(e.column,null,d),g=p!=null;h.text=g?p:d,t.addOption(h),a=a||o===d}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:u,valueListMaxHeight:c}=e;l!=null&&t.setPickerGap(l),c!=null&&t.setPickerMaxHeight(c),u!=null&&t.setPickerMaxWidth(u),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:n}=e,i=this.getValue();let s=[];if(t&&!t.includes(i)){const o=this.getLocaleTextFunc();s.push(o("invalidSelectionValidation","Invalid selection."))}else s=null;return n?n({value:i,internalErrors:s,cellEditorParams:e}):s}},die={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},hie=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return die}getAgComponents(){return[op]}init(e,t){this.eEditor=e,this.params=t;const n=t.maxLength;n!=null&&e.setMaxLength(n)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,i=this.getValue(),s=this.getLocaleTextFunc();let o=[];return t!=null&&typeof i=="string"&&i.length>t&&o.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),o.length||(o=null),n?n({value:i,cellEditorParams:e,internalErrors:o}):o}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();return!ze(n)&&!ze(t.value)?t.value:t.parseValue(n)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){Cr()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),n=ze(t)&&t.length||0;n&&e.getInputElement().setSelectionRange(n,n)}},fI=class extends Mp{constructor(){super(new hie(()=>this.getLocaleTextFunc()))}};function fie(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function pie(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function pI(e,t,n="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,n),"ensureVisible")}function gI(e,t,n){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,n),"ensureVisible")}function gie(e,t,n=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,n),"ensureVisible")}function mie(e){var t;(t=e.undoRedo)==null||t.undo("api")}function vie(e){var t;(t=e.undoRedo)==null||t.redo("api")}function Cie(e,t){var n;return(n=e.editModelSvc)==null?void 0:n.getEditRowDataValue(t,{checkSiblings:!0})}function yie(e){var i;const t=(i=e.editModelSvc)==null?void 0:i.getEditMap(),n=[];return t==null||t.forEach((s,o)=>{const{rowIndex:r,rowPinned:a}=o;s.forEach((l,u)=>{const{editorValue:c,pendingValue:d,sourceValue:h,state:p}=l,g=Wo(l);let C=c??d;C===os&&(C=void 0);const v={newValue:C,oldValue:h,state:p,column:u,colId:u.getColId(),colKey:u.getColId(),rowIndex:r,rowPinned:a};(p==="editing"||p==="changed"&&g)&&n.push(v)})}),n}function wie(e,t=!1){var i;const{editSvc:n}=e;if(n!=null&&n.isBatchEditing()){if(t)for(const s of((i=e.editModelSvc)==null?void 0:i.getEditPositions())??[])s.state==="editing"&&n.revertSingleCellEdit(s);else ka(e,{persist:!0});ou(e,void 0,{cancel:t})}else n==null||n.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function bie(e,t){var i;const n=cn(e,t);return((i=e.editSvc)==null?void 0:i.isEditing(n))??!1}function Sie(e,t){const{key:n,colKey:i,rowIndex:s,rowPinned:o}=t,{editSvc:r,colModel:a}=e,l=a.getCol(i);if(!l){xe(12,{colKey:i});return}const c=$o(e,{rowIndex:s,rowPinned:o||null});if(!c){xe(290,{rowIndex:s,rowPinned:o});return}if(!l.isCellEditable(c))return;o==null&&gI(e,s),pI(e,i),r==null||r.startEditing({rowNode:c,column:l},{event:n?new KeyboardEvent("keydown",{key:n}):void 0,source:"api"})}function Eie(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}function Rie(e){var t;return((t=e.undoRedo)==null?void 0:t.getCurrentUndoStackSize())??0}function Die(e){var t;return((t=e.undoRedo)==null?void 0:t.getCurrentRedoStackSize())??0}var Fie={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},Tie=class extends ny{constructor(e){super(Fie),this.params=e}postConstruct(){Sa(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,n=i=>{Ny(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:n})}};function xie(e,{column:t},n,i,s="ui"){var u;if(n instanceof KeyboardEvent&&(n.key===se.TAB||n.key===se.ENTER||n.key===se.F2||n.key===se.BACKSPACE&&i))return!0;if((n==null?void 0:n.shiftKey)&&((u=e.rangeSvc)==null?void 0:u.getCellRanges().length)!=0)return!1;const r=t==null?void 0:t.getColDef(),a=_ie(e.gos,r),l=n==null?void 0:n.type;return l==="click"&&(n==null?void 0:n.detail)===1&&a===1||l==="dblclick"&&(n==null?void 0:n.detail)===2&&a===2?!0:s==="api"?i??!1:!1}function _ie(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t!=null&&t.singleClickEdit?1:2}function Ow(e,{rowNode:t,column:n},i="ui"){const s=n.getColDef().editable,o=e.editModelSvc;return n.isColumnFunc(t,s)||!!o&&o.hasEdits({rowNode:t,column:n},{withOpenEditor:!0})}function Pie(e,t,n="ui"){const i=Ow(e,t,n);return i===!0||n==="ui"?i:e.colModel.getCols().some(o=>Ow(e,{rowNode:t.rowNode,column:o},n))}var Lp=(e,t=!1)=>{if(e!==void 0)return Wo(e)||t&&e.state==="editing"};function mI(e,t,n=!1){var i;return Lp((i=e.editModelSvc)==null?void 0:i.getEdit(t),n)}var vI=(e,t,n)=>{if(e)for(let i=0,s=e.length;i<s;++i){const o=e[i];if(o.data&&(Lp(t==null?void 0:t.getEdit({rowNode:o,column:n}))||Lp(t==null?void 0:t.getEdit({rowNode:o.pinnedSibling,column:n})))||vI(o.childrenAfterGroup,t,n))return!0}};function CI(e,t){const{column:n,rowNode:i}=t;return e.gos.get("groupTotalRow")&&!(i!=null&&i.footer)?!1:vI(i==null?void 0:i.childrenAfterGroup,e.editModelSvc,n)}function yI(e,{rowNode:t,column:n}){var i;if(t=t.pinnedSibling,!!t)return Lp((i=e.editModelSvc)==null?void 0:i.getEdit({rowNode:t,column:n}))}var Aie=class extends ge{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){var s;const{cellCtrl:e,editSvc:t,beans:n}=this;if(t!=null&&t.isBatchEditing()&&t.isEditing()){const o=mI(n,e)||CI(n,e)||yI(n,e);this.applyBatchingStyle(o)}else this.applyBatchingStyle(!1);const i=!!((s=this.editModelSvc)!=null&&s.getCellValidationModel().hasCellValidation(this.cellCtrl));this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){var t;this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&((t=this.editSvc)==null?void 0:t.isBatchEditing()))??!1)}},Iie=class extends ge{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var r;const{rowCtrl:e,editModelSvc:t,beans:n}=this;let i=e.rowNode,s=t==null?void 0:t.getEditRow(i);const o=(r=this.editModelSvc)==null?void 0:r.getRowValidationModel().hasRowValidation({rowNode:i});if(!s&&i.pinnedSibling&&(i=i.pinnedSibling,s=t==null?void 0:t.getEditRow(i)),s){const a=Array.from(s.keys()).some(l=>{const u={rowNode:i,column:l};return mI(n,u,!0)||CI(n,u)||yI(n,u)});this.applyStyle(o,a);return}this.applyStyle(o)}applyStyle(e=!1,t=!1){var s,o;const n=((s=this.editSvc)==null?void 0:s.isBatchEditing())??!1,i=this.gos.get("editType")==="fullRow";(o=this.rowCtrl)==null||o.forEachGui(void 0,({rowComp:r})=>{r.toggleCss("ag-row-editing",i&&t),r.toggleCss("ag-row-batch-edit",i&&t&&n),r.toggleCss("ag-row-inline-editing",t),r.toggleCss("ag-row-not-inline-editing",!t),r.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},kie=({rowModel:e,pinnedRowModel:t,editModelSvc:n},i)=>{const s=new Set;e.forEachNode(o=>i.has(o)&&s.add(o)),t==null||t.forEachPinnedRow("top",o=>i.has(o)&&s.add(o)),t==null||t.forEachPinnedRow("bottom",o=>i.has(o)&&s.add(o));for(const o of i)s.has(o)||n.removeEdits({rowNode:o});return s},Oie=({editModelSvc:e},t,n)=>{var i;for(const s of t)(i=e==null?void 0:e.getEditRow(s))==null||i.forEach((o,r)=>!n.has(r)&&e.removeEdits({rowNode:s,column:r}))},Mie=e=>()=>{const t=new Set(e.colModel.getCols()),n=e.editModelSvc.getEditMap(!0),i=new Set(n.keys());Oie(e,kie(e,i),t)},Lie=new Set(["undo","redo","paste","bulk","rangeSvc"]),Nie=new Set(["ui","api"]),wI={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},Vie=new Set(Object.keys(wI)),Bie=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Np={cancel:!0,source:"api"},Hie={cancel:!1,source:"api"},uu={checkSiblings:!0},yd={force:!0,suppressFlash:!0},Gie=class extends ge{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,Np),this.createStrategy(i)});const t=Mie(e),n=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Np):this.isEditing()&&(this.isBatchEditing()?ou(e,this.model.getEditPositions()):this.stopEditing(void 0,Hie)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:n,filterChanged:n,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,Np)):(this.stopEditing(void 0,Np),this.batch=!1)}createStrategy(e){const{beans:t,gos:n,strategy:i}=this,s=bI(n,e);if(i){if(i.beanName===s)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,n,i="ui"){const s=xie(this.beans,e,t,n,i);return s&&(this.strategy??(this.strategy=this.createStrategy())),s}shouldStopEditing(e,t,n="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldStop(e,t,n))??null}shouldCancelEditing(e,t,n="ui"){var i;return((i=this.strategy)==null?void 0:i.shouldCancel(e,t,n))??null}validateEdit(){return nee(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??uu)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){const{startedEdit:n=!0,event:i=null,source:s="ui",ignoreEventKey:o=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const a=cn(this.beans,e);if(a&&!a.comp){a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=this.shouldStartEditing(e,i,n,s);if(l===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&!t.continueEditing&&this.stopEditing(void 0,{source:s}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start({position:e,event:i,source:s,ignoreEventKey:o,startedEdit:n,silent:r})}stopEditing(e,t){var v,S,R;const{event:n,cancel:i,source:s="ui",forceCancel:o,forceStop:r}=t||{},{beans:a,model:l}=this;if(Vie.has(s)&&this.isBatchEditing())return this.bulkRefresh(e),!1;const u=this.committing?wI[s]:s;if(!(this.committing||this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,uu))||!this.strategy||this.stopping)return!1;this.stopping=!0;const d=cn(a,e);d&&(d.onEditorAttachedFuncs=[]);let h=l.getEditMap(!0),p=!1;const g=!i&&(!!this.shouldStopEditing(e,n,u)||this.committing&&!this.batch)||(r??!1),C=i&&!!this.shouldCancelEditing(e,n,u)||(o??!1);if(g||C){ka(a,{persist:!0,isCancelling:C||i,isStopping:g});const E=l.getEditMap(),y=this.processEdits(E,i,s);(v=this.strategy)==null||v.stop(i,n);for(const b of y)l.clearEditValue(b);this.bulkRefresh(void 0,h);for(const b of l.getEditPositions(E)){const F=cn(a,b),x=Wo(b);F==null||F.refreshCell({force:!0,suppressFlash:!x})}h=E,p||(p=g)}else if(n instanceof KeyboardEvent&&this.batch&&((S=this.strategy)!=null&&S.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const{key:E}=n,y=E===se.ENTER,b=E===se.ESCAPE,F=E===se.TAB;(y||F||b)&&(y||F?ka(a,{persist:!0}):b&&this.revertSingleCellEdit(d),this.isBatchEditing()?(R=this.strategy)==null||R.cleanupEditors():ou(a,l.getEditPositions(),{event:n,cancel:b}),n.preventDefault(),this.bulkRefresh(e,h,{suppressFlash:!0}),h=l.getEditMap())}else ka(a,{persist:!0}),h=l.getEditMap();return p&&e&&this.model.removeEdits(e),this.navigateAfterEdit(t,d==null?void 0:d.cellPosition),fw(a),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),C&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(h.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),p&&g&&this.dispatchBatchEvent("batchEditingStopped",h)),this.stopping=!1,p}navigateAfterEdit(e,t){var u;if(!e||!t)return;const{event:n,suppressNavigateAfterEdit:i}=e;if(!(n instanceof KeyboardEvent)||i)return;const{key:o,shiftKey:r}=n,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(o!==se.ENTER||!a)return;const l=r?se.UP:se.DOWN;(u=this.beans.navigation)==null||u.navigateToNextCell(null,l,t,!1)}processEdits(e,t=!1,n){const i=Array.from(e.keys()),s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,o=[];for(const r of i){const a=e.get(r);for(const l of a.keys()){const u=a.get(l),c={rowNode:r,column:l},d=Wo(u);!t&&d&&!s&&(this.setNodeDataValue(r,l,u.pendingValue,void 0,n)||o.push(c))}}return o}setNodeDataValue(e,t,n,i,s="edit"){const{beans:o}=this,r=cn(o,{rowNode:e,column:t}),a=Nie.has(s)?"edit":s;r&&(r.suppressRefreshCell=!0),this.commitNextEdit();const l=e.setDataValue(t,n,a);return r&&(r.suppressRefreshCell=!1),i&&(r==null||r.refreshCell(yd)),l}setEditMap(e,t){var i;this.strategy??(this.strategy=this.createStrategy()),(i=this.strategy)==null||i.setEditMap(e,t),this.bulkRefresh();let n=yd;t!=null&&t.forceRefreshOfEditCellsOnly&&(n={...$ie(e),...yd}),this.beans.rowRenderer.refreshCells(n)}dispatchEditValuesChanged({rowNode:e,column:t},n={}){if(!e||!t||!n)return;const{pendingValue:i,sourceValue:s}=n,{rowIndex:o,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:o,rowPinned:r,column:t,source:"api",data:a,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,n={}){var a;const{beans:i,gos:s}=this,{editModelSvc:o,rowModel:r}=i;bn(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),n):t&&((a=o==null?void 0:o.getEditMap(!1))==null||a.forEach((l,u)=>{for(const c of l.keys())this.refCell({rowNode:u,column:c},l.get(c),n)})))}refCell({rowNode:e,column:t},n,i={}){var d,h,p;const{beans:s,gos:o}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const u=e.sibling;u&&a.add(u);let c=e.parent;for(;c;)(d=c.sibling)!=null&&d.footer&&o.get("groupTotalRow")||!c.parent&&c.sibling&&o.get("grandTotalRow")?a.add(c.sibling):a.add(c),c=c.parent;for(const g of r)this.dispatchEditValuesChanged({rowNode:g,column:t},n);for(const g of r)(h=cn(s,{rowNode:g,column:t}))==null||h.refreshCell(i);for(const g of a)(p=cn(s,{rowNode:g,column:t}))==null||p.refreshCell(i)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{rowNode:n}=e,{gos:i,beans:s}=this;if(n.group){if(i.get("treeData")){if(!n.data&&!i.get("enableGroupEdit"))return!1}else if(!i.get("enableGroupEdit"))return!1}const o=bI(i)==="fullRow"?Pie(s,e,t):Ow(s,e,t);return o&&(this.strategy??(this.strategy=this.createStrategy())),o}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,n=!0){var i,s,o,r;if(this.hasValidationErrors(e)){const a=cn(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((i=t==null?void 0:t.preventDefault)==null||i.call(t),n&&(!(a!=null&&a.hasBrowserFocus())&&(a==null||a.focusCell()),(r=(o=(s=a==null?void 0:a.comp)==null?void 0:s.getCellEditor())==null?void 0:o.focusIn)==null||r.call(o)),"block-stop"):(a&&this.revertSingleCellEdit(a),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var i,s,o,r;const n=cn(this.beans,e);(i=n==null?void 0:n.comp)!=null&&i.getCellEditor()&&(ou(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),su(this.beans,e,{silent:!0}),Oa(this.beans),n==null||n.refreshCell(yd),t&&(n==null||n.focusCell(),(r=(o=(s=n==null?void 0:n.comp)==null?void 0:s.getCellEditor())==null?void 0:o.focusIn)==null||r.call(o)))}hasValidationErrors(e){var i;Oa(this.beans);const t=cn(this.beans,e);t&&(t.refreshCell(yd),(i=t.rowCtrl.rowEditStyleFeature)==null||i.applyRowStyles());let n=!1;return e!=null&&e.rowNode?(n||(n=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(n||(n=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(n||(n=this.model.getCellValidationModel().getCellValidationMap().size>0),n||(n=this.model.getRowValidationModel().getRowValidationMap().size>0)),n}moveToNextCell(e,t,n,i="ui"){var a;let s;const o=this.isEditing(),r=o&&this.checkNavWithValidation(void 0,n)==="block-stop";return e instanceof ru&&o&&(s=(a=this.strategy)==null?void 0:a.moveToNextEditingCell(e,t,n,i,r)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!r&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},n=!0){if(!e||!t)return;let i=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const r=this.model.getEdit({rowNode:s,column:t});r&&(i=r)}const o=n?(i==null?void 0:i.editorValue)??(i==null?void 0:i.pendingValue):i==null?void 0:i.pendingValue;return o===os||!i?(i==null?void 0:i.sourceValue)??this.valueSvc.getValue(t,e,!1,"api"):o}addStopEditingWhenGridLosesFocus(e){ZQ(this,this.beans,e)}createPopupEditorWrapper(e){return new Tie(e)}commitNextEdit(){this.committing=!0}setDataValue(e,t,n){var i;try{if((!this.isEditing()||this.committing)&&!Bie.has(n))return;const{beans:s}=this;this.strategy??(this.strategy=this.createStrategy());const o=this.isBatchEditing()?"ui":this.committing?n??"api":"api";if(!n||Lie.has(n))return xp(s,e,t,n,void 0,{persist:!0}),this.setNodeDataValue(e.rowNode,e.column,t,!0,n);const r=this.model.getEdit(e);if(r){if(r.pendingValue===t)return!1;if(r.sourceValue!==t)return xp(s,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:o,suppressNavigateAfterEdit:!0}),!0;if(r.sourceValue===t)return(i=s.editModelSvc)==null||i.removeEdits(e),this.dispatchEditValuesChanged(e,{...r,pendingValue:t}),!0}return xp(s,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:o,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){QQ(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,uu))return;const{rowNode:i,column:s}=e,{compDetails:o,valueToDisplay:r}=t;if(o){const{params:l}=o;return l.data=this.model.getEditRowDataValue(i,uu),{compDetails:o}}const a=this.model.getEditRow(e.rowNode,uu);if(r!==void 0&&(a!=null&&a.has(s)))return{valueToDisplay:this.valueSvc.getValue(s,i)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,n,i){var s;(s=this.strategy)==null||s.dispatchCellEvent(e,t,n,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return dt(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},n){var u,c;if(!n||n.length===0)return;const{beans:i,rangeSvc:s,valueSvc:o}=this;ka(i,{persist:!0});const r=this.model.getEditMap(!0),a=(c=(u=r.get(e))==null?void 0:u.get(t))==null?void 0:c.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),n.forEach(d=>{if(s==null||s.forEachRowInRange(d,h=>{const p=$o(i,h);if(p===void 0)return;const g=r.get(p)??new Map;for(const C of d.columns)if(C&&this.isCellEditable({rowNode:p,column:C},"api")){const v=o.getValue(C,p,!0,"api");let S=o.parseValue(C,p??null,a,v);Number.isNaN(S)&&(S=null),g.set(C,{editorValue:void 0,pendingValue:S,sourceValue:v,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}g.size>0&&r.set(p,g)}),this.setEditMap(r),this.batch){this.cleanupEditors(),fw(i),this.bulkRefresh();return}this.commitNextEdit(),this.stopEditing(void 0,{source:"bulk"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const l=cn(i,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new Aie(e,t)}createRowStyleFeature(e,t){return new Iie(e,t)}setEditingCells(e,t){const{beans:n}=this,{colModel:i,valueSvc:s}=n,o=new Map;for(let{colId:r,column:a,colKey:l,rowIndex:u,rowPinned:c,newValue:d,state:h}of e){const p=r?i.getCol(r):l?i.getCol(l):a;if(!p)continue;const g=$o(n,{rowIndex:u,rowPinned:c});if(!g)continue;const C=s.getValue(p,g,!0,"api");if(!(t!=null&&t.forceRefreshOfEditCellsOnly)&&!Wo({pendingValue:d,sourceValue:C})&&h!=="editing")continue;let v=o.get(g);v||(v=new Map,o.set(g,v)),d===void 0&&(d=os),v.set(p,{editorValue:void 0,pendingValue:d,sourceValue:C,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(o,t)}onCellFocused(e){var o;const t=cn(this.beans,e);if(!t||!this.isEditing(t,uu))return;const n=this.model.getEdit(t);if(!n||!Wo(n))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(o=this.beans.ariaAnnounce)==null||o.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return cn(this.beans,e)}};function $ie(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function bI(e,t){return t??e.get("editType")??"singleCell"}var SI=class extends ge{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const n=e.previousParams,{editSvc:i,beans:s}=this,o=e.type==="cellFocused"?e.sourceEvent:null;n&&(t=cn(s,n));const{gos:r,editModelSvc:a}=s,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:u,rowIndex:c,rowPinned:d}=e,h={column:u,rowNode:$o(s,{rowIndex:c,rowPinned:d})},p=r.get("invalidEditValueMode")==="block";if(p)return;const g=!p,C=!!(a!=null&&a.getCellValidationModel().hasCellValidation(h)),v=g&&C;(n||l?i.stopEditing(void 0,{cancel:v,source:l&&g?"api":void 0,event:o}):!0)||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}stop(e,t){var s,o;const n=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(const r of n){i.all.push(r);const a=this.model.getCellValidationModel().getCellValidation(r);if((((s=a==null?void 0:a.errorMessages)==null?void 0:s.length)??0)>0){i.fail.push(r);continue}i.pass.push(r)}if(e)for(const r of n)_p(this.beans,r,{cancel:e}),this.model.stop(r);else{const r=this.processValidationResults(i);if(r.destroy.length>0)for(const a of r.destroy)_p(this.beans,a,{event:t,cancel:e}),this.model.stop(a);if(r.keep.length>0)for(const a of r.keep){const l=cn(this.beans,a);(o=this.editSvc)!=null&&o.cellEditingInvalidCommitBlocks()||l&&this.editSvc.revertSingleCellEdit(l)}}return!0}cleanupEditors({rowNode:e}={},t){ka(this.beans,{persist:!1});const n=this.model.getEditPositions(),i=[];if(e)for(const s of n)s.rowNode!==e&&i.push(s);else for(const s of n)i.push(s);ou(this.beans,i),fw(this.beans,t)}setFocusOutOnEditor(e){var t,n,i;(i=(n=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:n.focusOut)==null||i.call(n)}setFocusInOnEditor(e){const t=e.comp,n=t==null?void 0:t.getCellEditor();if(n!=null&&n.focusIn)n.focusIn();else{const i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>{var s,o;return(o=(s=t==null?void 0:t.getCellEditor())==null?void 0:s.focusIn)==null?void 0:o.call(s)})}}setupEditors(e){const{event:t,ignoreEventKey:n=!1,startedEdit:i,position:s,cells:o=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!n&&t.key||void 0;XQ(this.beans,o,s,r,t,i)}dispatchCellEvent(e,t,n,i){const s=cn(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,n),...i})}dispatchRowEvent(e,t,n){if(n)return;const i=dw(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,n="ui"){const i=this.editSvc.isBatchEditing();return i&&n==="api"?!0:i&&(n==="ui"||n==="edit")?!1:n==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===se.ENTER:null}shouldCancel(e,t,n="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===se.ESCAPE||i&&n==="api"||n==="api")}setEditMap(e,t){var i;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const n=[];if(e.forEach((s,o)=>{s.forEach((r,a)=>{r.state==="editing"&&n.push({...r,rowNode:o,column:a})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(i=this.model)==null||i.setEditMap(e),n.length>0){const s=n.at(-1),o=s.pendingValue===os?void 0:s.pendingValue;this.start({position:s,event:new KeyboardEvent("keydown",{key:o}),source:"api"});const r=cn(this.beans,s);r&&this.setFocusInOnEditor(r)}}destroy(){this.cleanupEditors(),super.destroy()}},Wie=class extends SI{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,n="ui"){const{rowNode:i}=e||{};if(!dw(this.beans,{rowNode:this.rowNode}))return!0;const o=super.shouldStop({rowNode:this.rowNode},t,n);return o!==null?o:this.rowNode?i!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:n,startedEdit:i,event:s,ignoreEventKey:o}=e,{rowNode:r}=t;this.rowNode!==r&&super.cleanupEditors(t);const a=this.beans.visibleCols.allCols,l=[],u=[];for(const c of a)c.isCellEditable(r)&&u.push(c);if(u.length!=0){this.dispatchRowEvent({rowNode:r},"rowEditingStarted",n),this.startedRows.push(r);for(const c of u){const d={rowNode:r,column:c};l.push(d),this.model.hasEdits(d)||this.model.start(d)}this.rowNode=r,this.setupEditors({cells:l,position:t,startedEdit:i,event:s,ignoreEventKey:o})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var s;const{rowNode:n}=this;if(n&&!this.model.hasRowEdits(n))return!1;const i=[];if(e||this.model.getEditMap().forEach((o,r)=>{if(!(!o||o.size===0)){for(const a of o.values())if(Wo(a)){i.push(r);break}}}),Oa(this.beans),!e&&((s=this.editSvc)==null?void 0:s.checkNavWithValidation({rowNode:n}))==="block-stop")return!1;super.stop(e,t);for(const o of i)this.dispatchRowEvent({rowNode:o},"rowValueChanged");return this.cleanupEditors({rowNode:n},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,n=e.previousParams;if((n==null?void 0:n.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;const i=cn(this.beans,n);this.gos.get("invalidEditValueMode")==="block"&&i&&(this.model.getCellValidationModel().getCellValidation(i)||this.model.getRowValidationModel().getRowValidation(i))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const n of this.startedRows)this.dispatchRowEvent({rowNode:n},"rowEditingStopped");this.startedRows.length=0}moveToNextEditingCell(e,t,n,i="ui",s=!1){var h,p,g,C;const o=e.cellPosition;let r;this.model.suspend(!0);try{r=(h=this.beans.navigation)==null?void 0:h.findNextCellToFocusOn(o,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,l=e.isCellEditable(),u=r.isCellEditable(),c=a&&o.rowIndex===a.rowIndex&&o.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const d=this.gos.get("suppressStartEditOnTab");return u&&!s?d?r.focusCell(!0,n):((p=r.comp)!=null&&p.getCellEditor()||su(this.beans,r,{event:n,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,n)):(u&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,n)),!c&&!s&&((g=this.editSvc)==null||g.stopEditing({rowNode:e.rowNode},{event:n}),this.cleanupEditors(r,!0),d?r.focusCell(!0,n):this.editSvc.startEditing(r,{startedEdit:!0,event:n,source:i,ignoreEventKey:!0})),(C=e.rowCtrl)==null||C.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:n},i)=>{var o;if(n!=="editing")return;const s=cn(this.beans,{rowNode:t,column:i});s&&!((o=s.comp)!=null&&o.getCellEditor())&&su(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},zie=class extends SI{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,n="ui"){const i=super.shouldStop(e,t,n);if(i!==null)return i;const{rowNode:s,column:o}=e||{};return(!this.rowNode||!this.column)&&s&&o?null:this.rowNode!==s||this.column!==o}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:n,event:i,ignoreEventKey:s}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:n,event:i,ignoreEventKey:s})}dispatchRowEvent(e,t,n){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:n}=this.beans,{rowIndex:i,column:s,rowPinned:o}=e,r=$o(this.beans,{rowIndex:i,rowPinned:o}),a=hw(s),l=t.getCol(a),u=e.previousParams;if(u){const c=hw(u.column);if((u==null?void 0:u.rowIndex)===i&&c===a&&(u==null?void 0:u.rowPinned)===o)return}n!=null&&n.isEditing({rowNode:r,column:l},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,n,i="ui",s=!1){var g,C,v,S,R,E;const o=this.beans.focusSvc.getFocusedCell();o&&(e=nu(this.beans,o)??e);const r=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),s||(e.eGui.focus(),(C=this.editSvc)==null||C.stopEditing(e,{source:(g=this.editSvc)!=null&&g.isBatchEditing()?"ui":"api",event:n}));try{a=(v=this.beans.navigation)==null?void 0:v.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const u=a.cellPosition,c=e.isCellEditable(),d=a.isCellEditable(),h=u&&r.rowIndex===u.rowIndex&&r.rowPinned===u.rowPinned;c&&!s&&this.setFocusOutOnEditor(e);const p=this.gos.get("suppressStartEditOnTab");if(!h&&!s&&(super.cleanupEditors(a,!0),p?a.focusCell(!0,n):this.editSvc.startEditing(a,{startedEdit:!0,event:n,source:i,ignoreEventKey:!0})),d&&!s){if(a.focusCell(!1,n),p)a.focusCell(!0,n);else if(!((S=a.comp)!=null&&S.getCellEditor())){const y=(R=this.editSvc)==null?void 0:R.isEditing(a,{withOpenEditor:!0});su(this.beans,a,{event:n,cellStartedEdit:!0,silent:y}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else d&&s&&this.setFocusInOnEditor(a),a.focusCell(!0,n);return(E=e.rowCtrl)==null||E.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},Fr={moduleName:"EditCore",version:$e,beans:[YQ,Gie],apiFunctions:{getEditingCells:yie,getEditRowValues:Cie,getCellEditorInstances:JQ,startEditingCell:Sie,stopEditing:wie,isEditing:bie,validateEdit:Eie},dynamicBeans:{singleCell:zie,fullRow:Wie},dependsOn:[Ip,dI],css:[Yne]},Uie={moduleName:"UndoRedoEdit",version:$e,beans:[qne],apiFunctions:{undoCellEditing:mie,redoCellEditing:vie,getCurrentUndoSize:Rie,getCurrentRedoSize:Die},dependsOn:[Fr]},jie={moduleName:"TextEditor",version:$e,userComponents:{agCellEditor:fI,agTextCellEditor:fI},dependsOn:[Fr]},Kie={moduleName:"NumberEditor",version:$e,userComponents:{agNumberCellEditor:{classImp:lie}},dependsOn:[Fr]},qie={moduleName:"DateEditor",version:$e,userComponents:{agDateCellEditor:eie,agDateStringCellEditor:iie},dependsOn:[Fr]},Yie={moduleName:"CheckboxEditor",version:$e,userComponents:{agCheckboxCellEditor:Jne},dependsOn:[Fr]},Zie={moduleName:"SelectEditor",version:$e,userComponents:{agSelectCellEditor:cie},dependsOn:[Fr]},Jie={moduleName:"LargeTextEditor",version:$e,userComponents:{agLargeTextCellEditor:oie},dependsOn:[Fr]},Xie={moduleName:"CustomEditor",version:$e,dependsOn:[Fr]},Qie=class extends ge{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Kl(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),cK(e))}createColumns(e,t){var h,p;const n=()=>{var g;Xf(this.beans,(g=this.columns)==null?void 0:g.tree),this.columns=null},i=e.treeDepth,o=(((h=this.columns)==null?void 0:h.treeDepth)??-1)==i,r=this.generateSelectionCols();if(uK(r,((p=this.columns)==null?void 0:p.list)??[])&&o)return;n();const{colGroupSvc:l}=this.beans,u=(l==null?void 0:l.findDepth(e.tree))??0,c=(l==null?void 0:l.balanceTreeForAutoCols(r,u))??[];this.columns={list:r,tree:c,treeDepth:u,map:{}},t(g=>{if(!g)return null;const C=g.filter(v=>!Lo(v));return[...r,...C]})}updateColumns(e){var n;const t=Kl(e.source);for(const i of((n=this.columns)==null?void 0:n.list)??[]){const s=this.createSelectionColDef(e.currentValue);i.setColDef(s,null,t),Ds(this.beans,{state:[{...s,colId:i.getColId()}]},t)}}getColumn(e){var t;return((t=this.columns)==null?void 0:t.list.find(n=>td(n,e)))??null}getColumns(){var e;return((e=this.columns)==null?void 0:e.list)??null}isSelectionColumnEnabled(){var r,a;const{gos:e,beans:t}=this,n=e.get("rowSelection");if(typeof n!="object"||!wa(e))return!1;const i=(((a=(r=t.autoColSvc)==null?void 0:r.getColumns())==null?void 0:a.length)??0)>0;if(n.checkboxLocation==="autoGroupColumn"&&i)return!1;const s=!!jl(n),o=jf(n);return s||o}createSelectionColDef(e){const{gos:t}=this,n=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:s,spanRows:o,...r}=n??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(a,l,u,c){const d=u.isSelected(),h=c.isSelected();return d===h?0:d?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...r,colId:cP,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const n=new Ea(e,null,t,!1);return this.createBean(n),[n]}onSelectionOptionsChanged(e,t,n){const i=t&&typeof t!="string"?jl(t):void 0,s=e&&typeof e!="string"?jl(e):void 0,o=i!==s,r=t&&typeof t!="string"?jf(t):void 0,a=e&&typeof e!="string"?jf(e):void 0,l=r!==a,u=Kf(e),c=Kf(t);(o||l||u!==c)&&this.beans.colModel.refreshAll(n)}destroy(){var e;Xf(this.beans,(e=this.columns)==null?void 0:e.tree),super.destroy()}refreshVisibility(e,t,n){var l,u;if(!((l=this.columns)!=null&&l.list.length))return;const i=e.length+t.length+n.length;if(i===0)return;const s=this.columns.list[0];if(!s.isVisible())return;const o=()=>{let c;switch(s.pinned){case"left":case!0:c=e;break;case"right":c=n;break;default:c=t}c&&Rs(c,s)};(((u=this.beans.rowNumbersSvc)==null?void 0:u.getColumn(dP))?2:1)===i&&o()}};function ese(e,t){var r;if(!t.nodes.every(a=>a.rowPinned&&!cd(a)?(xe(59),!1):a.id===void 0?(xe(60),!1):!0))return;const{nodes:i,source:s,newValue:o}=t;(r=e.selectionSvc)==null||r.setNodesSelected({nodes:i,source:s??"api",newValue:o})}function tse(e,t,n="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:n,selectAll:t})}function nse(e,t,n="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:n,selectAll:t})}function ise(e,t="apiSelectAllFiltered"){var n;(n=e.selectionSvc)==null||n.selectAllRowNodes({source:t,selectAll:"filtered"})}function sse(e,t="apiSelectAllFiltered"){var n;(n=e.selectionSvc)==null||n.deselectAllRowNodes({source:t,selectAll:"filtered"})}function ose(e,t="apiSelectAllCurrentPage"){var n;(n=e.selectionSvc)==null||n.selectAllRowNodes({source:t,selectAll:"currentPage"})}function rse(e,t="apiSelectAllCurrentPage"){var n;(n=e.selectionSvc)==null||n.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function ase(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function lse(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}var use=class extends SY{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=qf(e),this.groupSelectsDescendants=Qc(e),this.groupSelectsFiltered=Yf(e)==="filteredDescendants",this.masterSelectsDetail=oP(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=Qc(e),n=qf(e),i=Yf(e)==="filteredDescendants";this.masterSelectsDetail=oP(e)==="detail",(t!==this.groupSelectsDescendants||i!==this.groupSelectsFiltered||n!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,this.mode=n)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,n){if(this.isRowSelectionBlocked(t))return 0;const i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,n);if(i==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in i)return i.reset?this.resetNodes():this.selectRange(i.deselect,!1,n),this.selectRange(i.select,!0,n);{const s=i.checkFilteredNodes?RI(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:s,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:n})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:n,nodes:i,event:s,source:o,keepDescendants:r=!1}){var u;if(i.length===0)return 0;const{gos:a}=this;if(!wa(a)&&e)return xe(132),0;if(i.length>1&&!this.isMultiSelect())return xe(130),0;let l=0;for(let c=0;c<i.length;c++){const d=i[c],h=cu(d);if(h.rowPinned&&!cd(h)){xe(59);continue}if(h.id===void 0){xe(60);continue}this.groupSelectsFiltered&&h.group&&!a.get("treeData")||this.selectRowNode(h,e,s,o)&&(this.detailSelection.delete(h.id),l++),this.groupSelectsDescendants&&((u=h.childrenAfterGroup)!=null&&u.length)&&(l+=this.selectChildren(h,e,o))}return n||(i.length===1&&o==="api"&&this.selectionCtx.setRoot(cu(i[0])),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(cu(i[0]),r,o)),l>0&&(this.updateGroupsFromChildrenSelections(o),this.dispatchSelectionChanged(o))),l}selectRange(e,t,n){let i=0;return e.forEach(s=>{const o=cu(s);if(o.group&&this.groupSelectsDescendants)return;this.selectRowNode(o,t,void 0,n)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n)),i}selectChildren(e,t,n){const i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:n,nodes:i}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((n,i)=>{e(n)&&t.set(i,n)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:n,rowModel:i}=this.beans;if(!bn(n))return!1;const s=i.rootNode;if(!s)return!1;t||(t=new hd(!0,s),t.active=!1);let o=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==s){const a=this.calculateSelectedFromChildren(r);o=this.selectRowNode(r,a===null?!1:a,void 0,e)||o}}),o}clearOtherNodes(e,t,n){const i=new Map;let s=0;return this.selectedNodes.forEach(o=>{const r=o.id==e.id;if((t?!dse(e,o):!0)&&!r){const l=this.selectedNodes.get(o.id);s+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:n}),this.groupSelectsDescendants&&o.parent&&i.set(o.parent.id,o.parent)}}),i.forEach(o=>{const r=this.calculateSelectedFromChildren(o);this.selectRowNode(o,r===null?!1:r,void 0,n)}),s}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new wr(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!bn(e))return;const n=t.getTopLevelNodes();if(n===null)return;const i=[];function s(o){for(let r=0,a=o.length;r<a;r++){const l=o[r];l.isSelected()?i.push(l):l.group&&l.childrenAfterGroup&&s(l.childrenAfterGroup)}}return s(n),i}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const n=bn(this.gos);let i=!1;const s=o=>{const r=this.selectRowNode(cu(o),!1,void 0,e);i||(i=r)};if(t==="currentPage"||t==="filtered"){if(!n){Kt(102);return}this.getNodesToSelect(t).forEach(s)}else this.selectedNodes.forEach(s),this.reset(e);if(this.selectionCtx.selectAll=!1,n&&this.groupSelectsDescendants){const o=this.updateGroupsFromChildrenSelections(e);i||(i=o)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,n=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&n++)}),{selectedCount:t,notSelectedCount:n}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:n}=this.getSelectedCounts(e);return EI(t,n)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],n=s=>t.push(s);if(e==="currentPage")return this.forEachNodeOnPage(s=>{if(!s.group){n(s);return}if(!s.expanded&&!s.footer){const o=r=>{var a;n(r),(a=r.childrenAfterFilter)==null||a.forEach(o)};o(s);return}this.groupSelectsDescendants||n(s)}),t;const i=this.beans.rowModel;return e==="filtered"?(i.forEachNodeAfterFilter(n),t):(i.forEachNode(n),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:n}=this.beans,i=t.getFirstRow(),s=t.getLastRow();for(let o=i;o<=s;o++){const r=n.getRow(o);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:n}=this;if(!wa(t)){xe(132);return}if(Z8(t)&&!Xc(t)){xe(130);return}if(!this.canSelectAll())return;const{source:i,selectAll:s}=e;let o=!1;if(this.getNodesToSelect(s).forEach(r=>{const a=this.selectRowNode(cu(r),!0,void 0,i);o||(o=a)}),n.selectAll=!0,bn(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(i);o||(o=r)}o&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,n){if(e||(e=[]),!Array.isArray(e)){Kt(103);return}const i=new Set(e),s=[];this.beans.rowModel.forEachNode(o=>{i.has(o.id)&&s.push(o)}),n&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:s,source:t})}canSelectAll(){return bn(this.beans.gos)}updateSelectable(e){var l;const{gos:t,rowModel:n}=this.beans;if(!wa(t))return;const i="selectableChanged",s=e!==void 0,o=bn(t)&&this.groupSelectsDescendants,r=[],a=u=>{var d;if(s&&!u.group)return;if(o&&u.group){const h=((d=u.childrenAfterGroup)==null?void 0:d.some(p=>p.selectable))??!1;this.setRowSelectable(u,h,!0);return}!this.updateRowSelectable(u,!0)&&u.isSelected()&&r.push(u)};if(o){if(e===void 0){const u=n.rootNode;e=u?new hd(!1,u):void 0}e==null||e.forEachChangedNodeDepthFirst(a,!s,!s)}else n.forEachNode(a);r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:i}),!s&&o&&((l=this.updateGroupsFromChildrenSelections)==null||l.call(this,i))}updateSelectableAfterGrouping(e){var t;this.updateSelectable(e),this.groupSelectsDescendants&&((t=this.updateGroupsFromChildrenSelections)!=null&&t.call(this,"rowGroupChanged",e))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){var o,r;if(!this.masterSelectsDetail)return;const n=(r=(o=e.detailNode)==null?void 0:o.detailGridInfo)==null?void 0:r.api;if(!n)return;const i=cse(n);if(e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!i){const a=this.detailSelection.get(e.id)??new Set;for(const l of n.getSelectedNodes())a.add(l.id);this.detailSelection.set(e.id,a)}}setDetailSelectionState(e,t,n){if(this.masterSelectsDetail){if(!Xc(t)){xe(269);return}switch(e.isSelected()){case!0:{n.selectAll();break}case!1:{n.deselectAll();break}case void 0:{const i=this.detailSelection.get(e.id);if(i){const s=[];for(const o of i){const r=n.getRowNode(o);r&&s.push(r)}n.setNodesSelected({nodes:s,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function cu(e){return cd(e)?e.pinnedSibling:e.footer?e.sibling:e}function cse(e){let t=0,n=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&n++}),EI(t,n)}function EI(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function dse(e,t){let n=t.parent;for(;n;){if(n===e)return!0;n=n.parent}return!1}function RI(e){var i;const t=e.isSelected()===!1,n=((i=e.childrenAfterFilter)==null?void 0:i.some(RI))??!1;return t||n}var hse={moduleName:"SharedRowSelection",version:$e,beans:[Qie],apiFunctions:{setNodesSelected:ese,selectAll:tse,deselectAll:nse,selectAllFiltered:ise,deselectAllFiltered:sse,selectAllOnCurrentPage:ose,deselectAllOnCurrentPage:rse,getSelectedNodes:ase,getSelectedRows:lse}},fse={moduleName:"RowSelection",version:$e,rowModels:["clientSide","infinite","viewport"],beans:[use],dependsOn:[hse]};function pse(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function gse(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function DI(e){var t;(t=e.rowModel)==null||t.onRowHeightChanged()}function FI(e){var t,n;if((t=e.rowAutoHeight)!=null&&t.active){xe(3);return}(n=e.rowModel)==null||n.resetRowHeights()}function mse(e,t,n){var s,o;const i=vte(e);if(i){if(((s=e.rowGroupColsSvc)==null?void 0:s.columns.length)===0){if(t<0){Kt(238);return}i.setRowCount(t,n);return}Kt(28);return}(o=Ap(e))==null||o.setRowCount(t,n)}function vse(e){var t;return Wl(e.gos)?e.rowModel.getBlockStates():((t=e.rowNodeBlockLoader)==null?void 0:t.getBlockState())??{}}function Cse(e){return e.rowModel.isLastRowIndexKnown()}var yse={moduleName:"CsrmSsrmSharedApi",version:$e,apiFunctions:{expandAll:pse,collapseAll:gse}},wse={moduleName:"RowModelSharedApi",version:$e,apiFunctions:{onRowHeightChanged:DI,resetRowHeights:FI}},bse={moduleName:"SsrmInfiniteSharedApi",version:$e,apiFunctions:{setRowCount:mse,getCacheBlockState:vse,isLastRowIndexKnown:Cse}},Sse=class extends ge{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(i=>{var o;if(!i){Kt(18),t||Kt(20);return}if(this.isGridApi(i))return i;const s=i;return"current"in s?(o=s.current)==null?void 0:o.api:(s.api||Kt(19),s.api)}).filter(i=>!!i&&!i.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const n=[];return e.columns?e.columns.forEach(i=>{n.push(t(i))}):e.column&&n.push(t(e.column)),n}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":xe(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const n of e.columnGroups){let i=null;n&&(i=t.getProvidedColGroup(n.getGroupId())),!(n&&!i)&&t.setColumnGroupOpened(i,n.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let n=null;const i=this.beans,{colResize:s,ctrlsSvc:o,colModel:r}=i;if(t&&(n=r.getColDefCol(t.getColId())),t&&!n)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const d=e.api.getColumnState().map(h=>({colId:h.colId}));Ds(i,{state:d,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const d=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));Ds(i,{state:d},"alignedGridChanged")}break;case"columnPinned":{const d=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));Ds(i,{state:d},"alignedGridChanged")}break;case"columnResized":{const c=e,d={};for(const h of a)d[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of c.flexColumns??[])d[h.getId()]&&delete d[h.getId()];s==null||s.setColumnWidths(Object.values(d),!1,c.finished,"alignedGridChanged");break}}const u=o.getGridBodyCtrl().isVerticalScrollShowing();for(const c of this.getAlignedGridApis())c.setGridOption("alwaysShowVerticalScroll",u)}},Ese={moduleName:"AlignedGrids",version:$e,beans:[Sse],dependsOn:[cA]},Rse=class extends ge{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},TI(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){const{selectionSvc:t,pinnedRowModel:n,groupStage:i}=this.beans;t==null||t.reset("rowDataChanged"),n!=null&&n.isManual()&&n.reset(),this.dispatchRowDataUpdateStarted(e),this.allNodesMap=Object.create(null),this.nextId=0;const s=TI(this.rootNode),o=new Array(e.length);s._leafs=o;let r=0;const a=i==null?void 0:i.getNestedDataGetter(),l=a?new Set:null,u=(c,d)=>{const h=c.level+1;for(let p=0,g=d.length;p<g;++p){const C=d[p];if(!C)continue;const v=this.createRowNode(C,h);if(v.sourceRowIndex=r,o[r++]=v,l&&!l.has(C)){l.add(C),v.treeParent=c;const S=a(C);S&&u(v,S)}}};u(s,e),o.length=r}setImmutableRowData(e,t){var S;const{rootNode:n,gos:i}=this;this.dispatchRowDataUpdateStarted(t);const s=Ul(i),o=e.changedRowNodes,{adds:r,updates:a}=o,l=new Set,u=[],c=(S=this.beans.groupStage)==null?void 0:S.getNestedDataGetter();let d=i.get("suppressMaintainUnsortedOrder")?void 0:!1,h=-1,p=!1;const g=(R,E)=>{if(!d&&d!==void 0){const y=R.sourceRowIndex;d=y<=h,h=y}R.data!==E&&(R.updateData(E),r.has(R)||a.add(R),!R.selectable&&R.isSelected()&&u.push(R))},C=(R,E,y)=>{for(let b=0,F=E.length;b<F;++b){const x=E[b];if(!x)continue;let V=this.getRowNode(s({data:x,level:y}));if(V?(g(V,x),p||(p=!!c&&V.treeParent!==R)):(V=this.createRowNode(x,y),r.add(V)),!c||l.has(V)){l.add(V);continue}l.add(V),V.treeParent=R;const I=c(x);I&&C(V,I,y+1)}};C(n,t,0);const v=this.deleteUnusedNodes(l,o,u)||d||r.size>0;if(v){const R=n._leafs??(n._leafs=[]);d===void 0?_se(R,l,o):xse(R,l)&&(o.reordered=!0)}(v||p||a.size)&&(e.rowDataUpdated=!0,this.deselect(u))}deleteUnusedNodes(e,{removals:t},n){const i=this.rootNode._leafs;for(let s=0,o=i.length;s<o;s++){const r=i[s];e.has(r)||(t.add(r),r.isSelected()&&n.push(r),this.deleteNode(r))}return t.size>0}updateRowData(e,t){var a;if(this.dispatchRowDataUpdateStarted(e.add),(a=this.beans.groupStage)!=null&&a.getNestedDataGetter())return xe(268),{remove:[],update:[],add:[]};const n=[],i=Ul(this.gos),s=this.executeRemove(i,e,t,n),o=this.executeUpdate(i,e,t,n),r=this.executeAdd(e,t);return this.deselect(n),{remove:s,update:o,add:r}}executeRemove(e,{remove:t},{adds:n,updates:i,removals:s},o){const r=this.rootNode._leafs,a=r==null?void 0:r.length,l=t==null?void 0:t.length;if(!l||!a)return[];let u=0,c=a,d=0,h;const p=new Array(l);for(let g=0;g<l;++g){const C=this.lookupNode(e,t[g]);if(!C)continue;const v=C.sourceRowIndex;v<c&&(c=v),v>d&&(d=v),C.isSelected()&&o.push(C),this.deleteNode(C),n.delete(C)?(h??(h=new Set),h.add(C)):(i.delete(C),s.add(C)),p[u++]=C}return p.length=u,u&&Tse(r,c,d,s,h),p}executeUpdate(e,{update:t},{adds:n,updates:i},s){const o=t==null?void 0:t.length;if(!o)return[];const r=new Array(o);let a=0;for(let l=0;l<o;l++){const u=t[l],c=this.lookupNode(e,u);c&&(c.updateData(u),!c.selectable&&c.isSelected()&&s.push(c),r[a++]=c,n.has(c)||i.add(c))}return r.length=a,r}executeAdd(e,t){var n;const i=(n=this.rootNode)._leafs??(n._leafs=[]),s=i.length,o=e.add,r=o==null?void 0:o.length;if(!r)return[];const a=s+r;let l=this.sanitizeAddIndex(i,e.addIndex);if(l<s){for(let d=s-1,h=a-1;d>=l;--d){const p=i[d];p.sourceRowIndex=h,i[h--]=p}t.reordered=!0}i.length=a;const u=new Array(r),c=t.adds;for(let d=0;d<r;d++){const h=this.createRowNode(o[d],0);c.add(h),h.sourceRowIndex=l,i[l]=h,u[d]=h,l++}return u}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e!=null&&e.length?e[0]:null})}deselect(e){var i;const t="rowDataChanged",n=this.beans.selectionSvc;e.length&&(n==null||n.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t})),(i=n==null?void 0:n.updateGroupsFromChildrenSelections)==null||i.call(n,t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:(n==null?void 0:n.getSelectedNodes())??null,serverSideState:null})}createRowNode(e,t){const n=new wr(this.beans);n.parent=this.rootNode,n.level=t,n.group=!1,n.expanded=!1,n.setDataAndId(e,String(this.nextId++));const i=n.id,s=this.allNodesMap;return s[i]&&xe(2,{nodeId:i}),s[i]=n,n}deleteNode(e){var s;e.clearRowTopAndRowIndex();const t=e.id,n=this.allNodesMap;n[t]===e&&delete n[t];const i=e.pinnedSibling;i&&((s=this.beans.pinnedRowModel)==null||s.pinRow(i,null))}lookupNode(e,t){if(!e)return Fse(this.rootNode._leafs,t);const n=e({data:t,level:0}),i=this.allNodesMap[n];return i||(Kt(4,{id:n}),null)}sanitizeAddIndex(e,t){const n=e.length;if(typeof t!="number"||t<0||t>=n||Number.isNaN(t))return n;t=Math.ceil(t);const i=this.gos;return t>0&&i.get("treeData")&&i.get("getDataPath")&&(t=Dse(e,t)),t}},Dse=(e,t)=>{for(let n=0,i=e.length;n<i;n++){const s=e[n];if((s==null?void 0:s.rowIndex)==t-1)return n+1}return t},TI=e=>{var r;e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",((r=e._leafs)==null?void 0:r.length)!==0&&(e._leafs=[]);const t=[],n=[],i=[],s=[];e.childrenAfterGroup=t,e.childrenAfterSort=n,e.childrenAfterAggFilter=i,e.childrenAfterFilter=s;const o=e.sibling;return o&&(o.childrenAfterGroup=t,o.childrenAfterSort=n,o.childrenAfterAggFilter=i,o.childrenAfterFilter=s,o.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},Fse=(e,t)=>{if(e)for(let n=0,i=e.length;n<i;n++){const s=e[n];if(s.data===t)return s}return Kt(5,{data:t}),null},Tse=(e,t,n,i,s)=>{t=Math.max(0,t);for(let o=t,r=e.length;o<r;++o){const a=e[o];o<=n&&(i.has(a)||s!=null&&s.has(a))||(a.sourceRowIndex=t,e[t++]=a)}e.length=t},xse=(e,t)=>{const n=t.size;e.length=n;let i=0,s=!1,o=!1;for(const r of t){const a=r.sourceRowIndex;a===i?o||(o=s):(a>=0?o=!0:s=!0,r.sourceRowIndex=i,e[i]=r),++i}return o},_se=(e,t,{removals:n,adds:i})=>{const s=e.length;e.length=t.size;let o=0;for(let r=0;r<s;++r){const a=e[r];n.has(a)||(o!==r&&(a.sourceRowIndex=o,e[o]=a),++o)}for(const r of i)r.sourceRowIndex<0&&(r.sourceRowIndex=o,e[o++]=r);e.length=o},xI=e=>{const t=e.childrenAfterSort,n=e.sibling;if(n&&(n.childrenAfterSort=t),!!t)for(let i=0,s=t.length-1;i<=s;i++){const o=t[i],r=i===0,a=i===s;o.firstChild!==r&&(o.firstChild=r,o.dispatchRowEvent("firstChildChanged")),o.lastChild!==a&&(o.lastChild=a,o.dispatchRowEvent("lastChildChanged")),o.childIndex!==i&&(o.childIndex=i,o.dispatchRowEvent("childIndexChanged"))}},Pse=class extends ge{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e){const t=this.beans.sortSvc.getSortOptions(),n=t.length>0&&!!e.changedRowNodes&&this.gos.get("deltaSort");this.sort(t,n,e.changedRowNodes,e.changedPath)}sort(e,t,n,i){const{gos:s,colModel:o,rowGroupColsSvc:r,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:u}=this.beans,c=s.get("groupMaintainOrder"),d=o.getCols().some(R=>R.isRowGroupActive()),h=r==null?void 0:r.columns,p=o.isPivotMode(),g=s.getCallback("postSortRows");let C=!1,v;const S=R=>{var F,x;const E=p&&R.leafGroup;let y=c&&d&&!R.leafGroup;y&&(v??(v=this.shouldSortContainsGroupCols(e)),y&&(y=!v));let b=null;if(y){let V=!1;if(h){const I=R.level+1;I<h.length&&(V=h[I].getSort()===null)}V||(b=kse(R))}else!e.length||E||(t&&n?b=Ase(a,R,n,i,e):b=a.doFullSort(R.childrenAfterAggFilter,e));if(b||(b=((F=R.childrenAfterAggFilter)==null?void 0:F.slice(0))??[]),C||(C=((x=R.childrenAfterSort)==null?void 0:x[0])!==b[0]),R.childrenAfterSort=b,xI(R),g){const V={nodes:R.childrenAfterSort};g(V)}};if(i==null||i.forEachChangedNodeDepthFirst(S),C&&s.get("groupHideOpenParents")){const R=u==null?void 0:u.getShowRowGroupCols();R!=null&&R.length&&l.refreshCells({columns:R,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(Xs(this.gos)){for(let n=0;n<t;++n){const i=e[n].column;if(i.isPrimary()&&i.isRowGroupActive())return!0}return!1}for(let n=0;n<t;++n)if(e[n].column.getColDef().showRowGroup)return!0;return!1}},Ase=(e,t,n,i,s)=>{const o=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(o,s);const a=new Set,l=[],{updates:u,adds:c}=n;for(let h=0,p=o.length;h<p;++h){const g=o[h];u.has(g)||c.has(g)||i&&!i.canSkip(g)?l.push({currentPos:l.length,rowNode:g}):a.add(g)}const d=r.filter(h=>a.has(h)).map((h,p)=>({currentPos:p,rowNode:h}));return l.sort((h,p)=>e.compareRowNodes(s,h,p)),Ise(e,s,l,d)},Ise=(e,t,n,i)=>{let s=0,o=0;const r=n.length,a=i.length,l=new Array(r+a);let u=0;for(;s<r&&o<a;){const c=n[s],d=i[o];e.compareRowNodes(t,c,d)<0?(l[u++]=c.rowNode,++s):(l[u++]=d.rowNode,++o)}for(;s<r;)l[u++]=n[s++].rowNode;for(;o<a;)l[u++]=i[o++].rowNode;return l},kse=e=>{const t=e.childrenAfterSort,n=e.childrenAfterAggFilter,i=t==null?void 0:t.length,s=n==null?void 0:n.length;if(!i||!s)return null;const o=new Array(s),r=new Set;for(let l=0;l<s;++l)r.add(n[l]);let a=0;for(let l=0;l<i;++l){const u=t[l];r.delete(u)&&(o[a++]=u)}if(r.size===0&&a===i)return t;for(const l of r)o[a++]=l;return o.length=a,o},Ose=class extends ge{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=[],this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=$n(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new wr(e);this.rootNode=t,this.nodeManager=this.createBean(new Rse(t));const n=this.refreshModel.bind(this,{step:"group"}),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:n,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:n,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,n=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(i=>!!i);this.stages=n;for(let i=n.length-1;i>=0;--i)for(const s of n[i].refreshProps)t.set(s,i);this.addManagedPropertyListeners([...t.keys()],i=>{var o;const s=(o=i.changeSet)==null?void 0:o.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,n,i){let s,o=!1;do{s=!1;const r=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(r,n),u=Math.min(a,i);for(let c=l;c<=u;c++){const d=this.getRow(c);if(d.rowHeightEstimated){const h=gr(this.beans,d);d.setRowHeight(h.height),s=!0,o=!0}}s&&this.setRowTopAndRowIndex()}while(s);return o}onPropChange(e){const{nodeManager:t,gos:n,beans:i}=this,s=i.groupStage;if(!t)return;const o=new Set(e),r=s==null?void 0:s.onPropChange(o);let a;o.has("rowData")?a=n.get("rowData"):r&&(a=s==null?void 0:s.extractData()),a&&!Array.isArray(a)&&(a=null,xe(1));const l={step:"nothing",changedProps:o};a&&(!r&&!this.isEmpty()&&a.length>0&&n.exists("getRowId")&&!n.get("resetRowDataOnUpdate")?(l.keepRenderedRows=!0,l.animate=!n.get("suppressAnimationFrame"),l.changedRowNodes=new Ep,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0));const u=l.rowDataUpdated?"group":this.getRefreshedStage(e);u&&(l.step=u,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:n}=this,i=t.length;let s=i;for(let o=0,r=e.length;o<r&&s;++o)s=Math.min(s,n.get(e[o])??s);return s<i?t[s].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:n}=this,i=t.environment.getDefaultRowHeight();let s=0;const o=Wn(this.gos,"normal");for(let r=0,a=n.length;r<a;++r){const l=n[r],u=l.id;if(u!=null&&(e==null||e.add(u)),l.rowHeight==null){const c=gr(t,l,o,i);l.setRowHeight(c.height,c.estimated)}l.setRowTop(s),l.setRowIndex(r),s+=l.rowHeight}}clearRowTopAndRowIndex(e,t){const n=e.active,i=r=>{(r==null?void 0:r.id)!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},s=r=>{i(r),i(r.detailNode),i(r.sibling);const a=r.childrenAfterGroup;if(!r.hasChildren()||!a)return;const l=r.level==-1;if(!(n&&!l&&!r.expanded))for(let c=0,d=a.length;c<d;++c)s(a[c])},o=this.rootNode;o&&s(o)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){var s,o;const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const i=(s=e.sibling)!=null&&s.displayed?1:0;return(((o=e.childrenAfterSort)==null?void 0:o.length)??0)+i}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:n,rowsToDisplay:i}=this;if(!n||!i.length||i[0]===n)return e;const o=n.childrenAfterSort,r=l=>{let u=o[l];if(this.gos.get("groupHideOpenParents"))for(;u.expanded&&u.childrenAfterSort&&u.childrenAfterSort.length>0;)u=u.childrenAfterSort[0];return u.rowIndex},a=t.footerSvc;return a?a==null?void 0:a.getTopDisplayIndex(i,e,o,r):r(e)}getTopLevelIndexFromDisplayedIndex(e){var a;const{rootNode:t,rowsToDisplay:n}=this;if(!t||!n.length||n[0]===t)return e;let s=this.getRow(e);s.footer&&(s=s.sibling);let o=s.parent;for(;o&&o!==t;)s=o,o=s.parent;const r=((a=t.childrenAfterSort)==null?void 0:a.indexOf(s))??-1;return r>=0?r:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:zl(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const i=t.length===0||t.some(s=>s.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:zl(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:zl(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new hd(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:n,rowDataUpdated:i}=e;return!(!t||n||!i||t.removals.size||t.adds.size)}refreshModel(e){var u,c;const{nodeManager:t,beans:n,eventSvc:i,started:s,refreshingModel:o}=this;if(!t)return;const r=!!e.rowDataUpdated,a=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&r));if(s&&r&&i.dispatchEvent({type:"rowDataUpdated"}),!s||o||n.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)){this.rowDataUpdatedPending||(this.rowDataUpdatedPending=r);return}switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.refreshingModel=!0,(u=n.masterDetailSvc)==null||u.refreshModel(e),r&&e.step!=="group"&&((c=n.colFilter)==null||c.refreshModel()),e.step){case"group":this.doGrouping(e);case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(e.changedRowNodes,a);case"map":this.doRowsToDisplay()}const l=new Set;this.setRowTopAndRowIndex(l),this.clearRowTopAndRowIndex(a,l),this.refreshingModel=!1,i.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){var e,t,n;return!((t=(e=this.rootNode)==null?void 0:e._leafs)!=null&&t.length)||!((n=this.beans.colModel)!=null&&n.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let n=!1,i=!1;const s=[],o=Qc(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(i)return;if(n&&(r===t||r===e)&&(i=!0,o&&r.group)){_I(s,r);return}if(!n){if(r!==t&&r!==e)return;n=!0,t===e&&(i=!0)}(!r.group||!o)&&s.push(r)}),s}getTopLevelNodes(){var e;return((e=this.rootNode)==null?void 0:e.childrenAfterGroup)??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,n=t.length;if(this.isEmpty()||n===0)return-1;let i=0,s=n-1;if(e<=0)return 0;if(t[s].rowTop<=e)return s;let r=-1,a=-1;for(;;){const l=Math.floor((i+s)/2),u=t[l];if(this.isRowInPixel(u,e)||(u.rowTop<e?i=l+1:u.rowTop>e&&(s=l-1),r===i&&a===s))return l;r=i,a=s}}isRowInPixel(e,t){const n=e.rowTop,i=n+e.rowHeight;return n<=t&&i>t}forEachLeafNode(e){var n;const t=(n=this.rootNode)==null?void 0:n._leafs;if(t)for(let i=0,s=t.length;i<s;++i)e(t[i],i)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let n=0,i=t.length;n<i;++n)e(t[n],n)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterSort)}forEachPivotNode(e,t,n){const{colModel:i,rowGroupColsSvc:s}=this.beans;if(!i.isPivotMode())return;if(!(s!=null&&s.columns.length)){e(this.rootNode,0);return}const o=n?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[o])}depthFirstSearchRowNodes(e,t=!1,n=o=>o.childrenAfterGroup,i=this.rootNode,s=0){let o=s;if(!i)return o;const r=i===this.rootNode;if(r||e(i,o++),i.hasChildren()&&!i.footer){const a=n(i);if(a){const l=this.beans.footerSvc;o=(l==null?void 0:l.addTotalRows(o,i,e,t,r,"top"))??o;for(const u of a)o=this.depthFirstSearchRowNodes(e,t,n,u,o);return(l==null?void 0:l.addTotalRows(o,i,e,t,r,"bottom"))??o}}return o}doAggregate(e){var n;const t=this.rootNode;t&&((n=this.beans.aggStage)==null||n.execute({rowNode:t,changedPath:e}))}doFilterAggregates(e){const t=this.rootNode,n=this.beans.filterAggStage;if(n){n.execute({rowNode:t,changedPath:e});return}t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const n=this.beans.sortStage;if(n){n.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t});return}t.forEachChangedNodeDepthFirst(i=>{i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),xI(i)})}doGrouping(e){var s;const t=this.rootNode,n=this.beans.groupStage,i=n==null?void 0:n.execute({rowNode:t,changedRowNodes:e.changedRowNodes,changedPath:e.changedPath,afterColumnsChanged:!!e.afterColumnsChanged});if(i===void 0){const o=t._leafs;t.childrenAfterGroup=o,t.updateHasChildren();const r=t.sibling;r&&(r.childrenAfterGroup=o)}(i||e.rowDataUpdated)&&((s=this.beans.colFilter)==null||s.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute({rowNode:this.rootNode,changedPath:e});return}e.forEachChangedNodeDepthFirst(n=>{n.childrenAfterFilter=n.childrenAfterGroup,qA(n)},!0)}doPivot(e){var t;(t=this.beans.pivotStage)==null||t.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){var i,s;const t=(i=this.nodeManager)==null?void 0:i.getRowNode(e);return typeof t=="object"?t:typeof e=="string"&&e.indexOf(Fy)===0?(s=this.beans.groupStage)==null?void 0:s.getNode(e):void 0}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const n=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),n)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var a;const{nodeManager:e,beans:t,eventSvc:n,asyncTransactions:i}=this;if(!e)return;(a=t.valueCache)==null||a.onDataChanged();const s=[],o=[],r=new Ep;for(const{rowDataTransaction:l,callback:u}of i??[]){this.rowNodesCountReady=!0;const c=e.updateRowData(l,r);s.push(c),u&&o.push(u.bind(null,c))}this.commitTransactions(r),o.length>0&&setTimeout(()=>{for(let l=0,u=o.length;l<u;l++)o[l]()},0),s.length>0&&n.dispatchEvent({type:"asyncTransactionsFlushed",results:s}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){var s;const t=this.nodeManager;if(!t)return null;(s=this.beans.valueCache)==null||s.onDataChanged(),this.rowNodesCountReady=!0;const n=new Ep,i=t.updateRowData(e,n);return this.commitTransactions(n),i}commitTransactions(e){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{beans:e,rootNode:t}=this,n=e.flattenStage;if(n){this.rowsToDisplay=n.execute({rowNode:t});return}const i=this.rootNode.childrenAfterSort??[];for(const s of i)s.setUiLevel(0);this.rowsToDisplay=i}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const n=e.sibling;n==null||n.setRowHeight(n.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const n=t.detailNode;n==null||n.setRowHeight(n.rowHeight,!0);const i=t.sibling;i==null||i.setRowHeight(i.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){var t;e.rowHeightChanged&&!((t=this.beans.rowAutoHeight)!=null&&t.active)&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},_I=(e,t)=>{const n=t.childrenAfterGroup;if(n)for(let i=0,s=n.length;i<s;++i){const o=n[i];o.data&&e.push(o),o.group&&_I(e,o)}};function Mse(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function Lse(e,t){const n=Dr(e);n&&((!t||t==="everything")&&(t="group"),n.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function Nse(e){var t;return((t=Dr(e))==null?void 0:t.isEmpty())??!0}function Vse(e,t){var n;(n=Dr(e))==null||n.forEachLeafNode(t)}function Bse(e,t){var n;(n=Dr(e))==null||n.forEachNodeAfterFilter(t)}function Hse(e,t){var n;(n=Dr(e))==null||n.forEachNodeAfterFilterAndSort(t)}function Gse(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var n;return(n=Dr(e))==null?void 0:n.updateRowData(t)})}function $se(e,t,n){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=Dr(e))==null?void 0:i.batchUpdateRowData(t,n)})}function Wse(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=Dr(e))==null?void 0:t.flushAsyncTransactions()})}function zse(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}var Use={moduleName:"ClientSideRowModel",version:$e,rowModels:["clientSide"],beans:[Ose,Pse],dependsOn:[BA]},jse={moduleName:"ClientSideRowModelApi",version:$e,apiFunctions:{onGroupExpandedOrCollapsed:Mse,refreshClientSideRowModel:Lse,isRowDataEmpty:Nse,forEachLeafNode:Vse,forEachNodeAfterFilter:Bse,forEachNodeAfterFilterAndSort:Hse,applyTransaction:Gse,applyTransactionAsync:$se,flushAsyncTransactions:Wse,getBestCostNodeSelection:zse,resetRowHeights:FI,onRowHeightChanged:DI},dependsOn:[yse,wse]},Kse=class extends ge{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:n,columnKeys:i,skipRowGroups:s,exportRowNumbers:o}=t,r=this.getColumnsToExport({allColumns:n,skipRowGroups:s,columnKeys:i,exportRowNumbers:o});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,n,i){var g;const s=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,u=!!i.footer,c=i.allChildrenCount===1&&((g=i.childrenAfterGroup)==null?void 0:g.length)===1&&q8(this.gos,i);if(!l&&!u&&(t.skipRowGroups||c||a)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&i.rowPinned==="top"||t.skipPinnedBottom&&i.rowPinned==="bottom"||i.stub||i.level===-1&&!l&&!u||s(dt(this.gos,{node:i})))return;const p=e.onNewBodyRow(i);if(n.forEach((C,v)=>{p.onColumn(C,v,i)}),t.getCustomContentBelowRow){const C=t.getCustomContentBelowRow(dt(this.gos,{node:i}));C&&e.addCustomContent(C)}}appendContent(e){return t=>{const n=e.appendContent;return n&&t.addCustomContent(n),t}}prependContent(e){return t=>{const n=e.prependContent;return n&&t.addCustomContent(n),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return n=>{if(!e.skipColumnGroupHeaders){const i=new SP,{colGroupSvc:s}=this.beans,o=s?s.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(o,n,e.processGroupHeaderCallback)}return n}}exportHeaders(e,t){return n=>{if(!e.skipColumnHeaders){const i=n.onNewHeaderRow();t.forEach((s,o)=>{i.onColumn(s,o,void 0)})}return n}}processPinnedTopRows(e,t){return n=>{var s,o;const i=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(r=>r.rowPinned==="top").sort((r,a)=>r.rowIndex-a.rowIndex).map(r=>{var a;return(a=this.pinnedRowModel)==null?void 0:a.getPinnedTopRow(r.rowIndex)}).forEach(i):(s=this.pinnedRowModel)!=null&&s.isManual()||(o=this.pinnedRowModel)==null||o.forEachPinnedRow("top",i),n}}processRows(e,t){return n=>{var u;const i=this.rowModel,s=bn(this.gos),o=Wl(this.gos),r=!s&&e.onlySelected,a=this.processRow.bind(this,n,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(c=>c.rowPinned==null).sort((c,d)=>c.rowIndex-d.rowIndex).map(c=>i.getRow(c.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())s?i.forEachPivotNode(a,!0,l==="filteredAndSorted"):o?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);else if(e.onlySelectedAllPages||r){const c=((u=this.beans.selectionSvc)==null?void 0:u.getSelectedNodes())??[];this.replicateSortedOrder(c),c.forEach(a)}else l==="all"?i.forEachNode(a):s||o?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);return n}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:n}=this.beans;if(!t||!n)return;const i=t.getSortOptions(),s=(o,r)=>{var a,l;return o.rowIndex!=null&&r.rowIndex!=null?o.rowIndex-r.rowIndex:o.level===r.level?((a=o.parent)==null?void 0:a.id)===((l=r.parent)==null?void 0:l.id)?n.compareRowNodes(i,{rowNode:o,currentPos:o.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):s(o.parent,r.parent):o.level>r.level?s(o.parent,r):s(o,r.parent)};e.sort(s)}processPinnedBottomRows(e,t){return n=>{var s,o;const i=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(r=>r.rowPinned==="bottom").sort((r,a)=>r.rowIndex-a.rowIndex).map(r=>{var a;return(a=this.pinnedRowModel)==null?void 0:a.getPinnedBottomRow(r.rowIndex)}).forEach(i):(s=this.pinnedRowModel)!=null&&s.isManual()||(o=this.pinnedRowModel)==null||o.forEachPinnedRow("bottom",i),n}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:n=!1,exportRowNumbers:i=!1,columnKeys:s}=e,{colModel:o,gos:r,visibleCols:a}=this,l=o.isPivotMode(),u=h=>Lo(h)?!1:!No(h)||i;if(s!=null&&s.length)return o.getColsForKeys(s).filter(u);const c=r.get("treeData");let d=[];return t&&!l?d=o.getCols():d=a.allCols,d=d.filter(h=>u(h)&&(n&&!c?!XC(h):!0)),d}recursivelyAddHeaderGroups(e,t,n){const i=[];for(const s of e){const o=s;if(o.getChildren)for(const r of o.getChildren()??[])i.push(r)}e.length>0&&Sn(e[0])&&this.doAddHeaderHeader(t,e,n),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,n)}doAddHeaderHeader(e,t,n){const i=e.onNewHeaderGroupingRow();let s=0;for(const o of t){const r=o;let a;n?a=n(dt(this.gos,{columnGroup:r})):a=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const u=(r.isExpandable()?r.getLeafColumns():[]).reduce((c,d,h,p)=>{let g=Zt(c);return d.getColumnGroupShow()==="open"?(!g||g[1]!=null)&&(g=[h],c.push(g)):g&&g[1]==null&&(g[1]=h-1),h===p.length-1&&g&&g[1]==null&&(g[1]=h),c},[]);i.onColumn(r,a||"",s++,r.getLeafColumns().length-1,u)}}},qse={moduleName:"SharedExport",version:$e,beans:[Kse]},PI=`\r
148
+ `,Yse=class extends Ete{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,PI),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,i){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,n){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue(e,t,t,"csv",n);this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(xe(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=PI),this.isFirstLine=!1}},Zse=class extends Ste{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){xe(51);return}const t=this.getMergedParams(e),n=this.getData(t),i=new Blob(["\uFEFF",n],{type:"text/plain"}),s=typeof t.fileName=="function"?t.fileName(dt(this.gos,{})):t.fileName;Rte(this.getFileName(s),i)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:n,rowGroupColsSvc:i,valueSvc:s,gos:o}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:u,suppressQuotes:c,columnSeparator:d}=e;return new Yse({colModel:t,colNames:n,valueSvc:s,gos:o,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:u||void 0,suppressQuotes:c||!1,columnSeparator:d||",",rowGroupColsSvc:i})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function Jse(e,t){var n;return(n=e.csvCreator)==null?void 0:n.getDataAsCsv(t)}function Xse(e,t){var n;(n=e.csvCreator)==null||n.exportDataAsCsv(t)}var Qse={moduleName:"CsvExport",version:$e,beans:[Zse],apiFunctions:{getDataAsCsv:Jse,exportDataAsCsv:Xse},dependsOn:[qse]},eoe=class extends ge{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state="needsLoading",this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:n,beans:i,rowNodes:s}=this;for(let o=0;o<e;o++){const r=n+o,a=new wr(i);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),s.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:i}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:i}}}setDataAndId(e,t,n){ze(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(on(this.params.datasource.getRows)){xe(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:i,filterModel:s},gos:o}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:i,filterModel:s,context:dt(o,{}).context}}forEachNode(e,t,n){this.rowNodes.forEach((i,s)=>{this.startRow+s<n&&e(i,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){const{rowNodes:t,beans:n}=this;t.forEach((s,o)=>{const r=e.rowData?e.rowData[o]:void 0;!s.id&&s.alreadyRendered&&r&&(t[o]=new wr(n),t[o].setRowIndex(s.rowIndex),t[o].setRowTop(s.rowTop),t[o].setRowHeight(s.rowHeight),s.clearRowTopAndRowIndex()),this.setDataAndId(t[o],r,this.startRow+o)});const i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},toe=2,noe=class extends ge{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let i=this.blocks[n];if(!i){if(t)return;i=this.createBlock(n)}return i.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new eoe(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(pr(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),n=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(n);const i=this.params.maxBlocksInCache>0,s=i?this.params.maxBlocksInCache-1:null,o=toe-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=o,u=i?a>=s:!1;if(l||u){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:i}=e;return t.rowIndex>=n&&t.rowIndex<i}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:n,overflowSize:i}=this.params,o=(e.id+1)*n+i;this.rowCount<o&&(this.rowCount=o)}}setRowCount(e,t){this.rowCount=e,ze(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(n,i)=>n.id-i.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let i=-1,s=!1;const o={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(s&&i+1!==l.id){r=!0;continue}i=l.id,l.forEachNode(u=>{const c=u===e||u===t;(s||c)&&n.push(u),c&&(s=!s)},o,this.rowCount)}return r||s?[]:n}},ioe=class extends ge{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new wr(e);this.rootNode=t,t.level=-1,this.rowHeight=ba(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=ba(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t;let e;this.cacheParams?e=!Vc(this.cacheParams.sortModel,((t=this.beans.sortSvc)==null?void 0:t.getSortModel())??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){var n;return((n=this.infiniteCache)==null?void 0:n.getRowNodesInRange(e,t))??[]}reset(){var n;if(!this.datasource)return;Ul(this.gos)!=null||(n=this.beans.selectionSvc)==null||n.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:i,eventSvc:s,gos:o}=e;this.cacheParams={datasource:this.datasource,filterModel:(t==null?void 0:t.getFilterModel())??{},sortModel:(n==null?void 0:n.getSortModel())??[],rowNodeBlockLoader:i,initialRowCount:o.get("infiniteInitialRowCount"),maxBlocksInCache:o.get("maxBlocksInCache"),rowHeight:ba(e),overflowSize:o.get("cacheOverflowSize"),blockSize:o.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new noe(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(n=>{n.id===e&&(t=n)}),t}forEachNode(e){var t;(t=this.infiniteCache)==null||t.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){var e;(e=this.infiniteCache)==null||e.refreshCache()}purgeCache(){var e;(e=this.infiniteCache)==null||e.purgeCache()}isLastRowIndexKnown(){var e;return((e=this.infiniteCache)==null?void 0:e.isLastRowIndexKnown())??!1}setRowCount(e,t){var n;(n=this.infiniteCache)==null||n.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function soe(e){var t;(t=Ap(e))==null||t.refreshCache()}function ooe(e){var t;(t=Ap(e))==null||t.purgeCache()}function roe(e){var t;return(t=Ap(e))==null?void 0:t.getRowCount()}var aoe=class extends ge{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Y8(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=$n(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Rs(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){pr(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(n=>n.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const n of t)n.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:n,state:i}=t.getBlockStateJson();e[n]=i}),e}printCacheStatus(){pr(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},loe={moduleName:"InfiniteRowModelCore",version:$e,rowModels:["infinite"],beans:[ioe,aoe]},uoe={moduleName:"InfiniteRowModel",version:$e,apiFunctions:{refreshInfiniteCache:soe,purgeInfiniteCache:ooe,getInfiniteRowCount:roe},dependsOn:[loe,bse]},coe="↑",doe="↓",hoe={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},foe=class extends $t{constructor(){super(hoe),this.eValue=We,this.eDelta=We,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),i=e.formatValue(n),s=ze(i)?i:n,o=t>=0,r=this.eDelta;o?r.textContent=coe+s:r.textContent=doe+s,r.classList.toggle("ag-value-change-delta-up",o),r.classList.toggle("ag-value-change-delta-down",!o)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),Gn(this.eDelta)}refresh(e,t=!1){var u;const{value:n,valueFormatted:i}=e,{eValue:s,lastValue:o,beans:r}=this;if(n===o||(ze(i)?s.textContent=i:ze(n)?s.textContent=n:Gn(s),(u=r.filterManager)!=null&&u.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return o&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},poe=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",goe={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},moe=class extends $t{constructor(){super(goe),this.eCurrent=We,this.refreshCount=0,this.registerCSS(poe)}init(e){this.refresh(e,!0)}addSlideAnimation(){var s;this.refreshCount++;const e=this.refreshCount;(s=this.ePrevious)==null||s.remove();const{beans:t,eCurrent:n}=this,i=En({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=n.textContent,this.getGui().insertBefore(i,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{var o;e===this.refreshCount&&((o=this.ePrevious)==null||o.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let n=e.value;if(on(n)&&(n=""),n===this.lastValue||(s=this.beans.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const i=this.eCurrent;return ze(e.valueFormatted)?i.textContent=e.valueFormatted:ze(e.value)?i.textContent=n:Gn(i),!0}},voe=class extends ge{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,n=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const o=Date.now(),r=o+n,a=o+n+i,l={phase:"flash",flashEndTime:r,fadeEndTime:a};s.set(e,l);const u=`ag-cell-${t}`,c=`${u}-animation`,{comp:d,eGui:{style:h}}=e;d.toggleCss(u,!0),d.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),n)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const i=this.animations[n],s=`ag-cell-${n}`,o=`${s}-animation`;for(const[r,a]of i){if(!r.isAlive()||!r.comp){i.delete(r);continue}const{phase:l,flashEndTime:u,fadeEndTime:c}=a,d=l==="flash"?u:c;if(!(e+15>=d)){t=Math.min(d,t??1/0);continue}const{comp:p,eGui:{style:g}}=r;switch(l){case"flash":p.toggleCss(s,!1),p.toggleCss(o,!0),g.transition=`background-color ${c-u}ms`,g.transitionDelay=`${u-e}ms`,t=Math.min(c,t??1/0),a.phase="fade";break;case"fade":p.toggleCss(s,!1),p.toggleCss(o,!1),g.removeProperty("transition"),g.removeProperty("transition-delay"),i.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const n=gZ(e.cellPosition);t.cells[n]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function Coe(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(i,t)})}var yoe={moduleName:"HighlightChanges",version:$e,beans:[voe],userComponents:{agAnimateShowChangeCellRenderer:foe,agAnimateSlideCellRenderer:moe},apiFunctions:{flashCells:Coe}};function woe(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function boe(e,t,n){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,n)}function AI(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=Soe(e)),e.version=$e,e}function Soe(e){return e.cellSelection=Eoe(e,"rangeSelection"),e}function Eoe(e,t){if(e&&typeof e=="object")return e[t]}var Roe=class extends ge{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=$n(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=$n(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=$n(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=bn(e);const i=AI(e.get("initialState")??{}),s=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;const o=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>o(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&(n==null||n.hideColumns("columnState"));const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:u})=>{u==="gridInitializing"&&(r(),o(()=>{this.setupStateOnColumnsInitialised(i,!!s),n==null||n.revealColumns("columnState")}))},rowCountReady:()=>{a==null||a(),o(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l==null||l(),o(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=AI(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const i="api",s=t?new Set(t):void 0;this.setGridReadyState(n,i,s),this.setColumnsInitialisedState(n,i,!!s,s),this.setRowCountState(n,i,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,i,s),this.stopSuppressEvents(i)})}setGridReadyState(e,t,n){var i,s;t==="api"&&!(n!=null&&n.has("sideBar"))&&((s=(i=this.beans.sideBar)==null?void 0:i.comp)==null||s.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,n,i){this.setColumnState(e,t,n,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:n("aggregation"),columnMoved:n("columnOrder"),columnPinned:n("columnPinning"),columnResized:n("columnSizing"),columnVisible:n("columnVisibility"),columnPivotChanged:n("pivot"),columnPivotModeChanged:n("pivot"),columnRowGroupChanged:n("rowGroup"),sortChanged:n("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,n){const{filter:i,rowGroupExpansion:s,ssrmRowGroupExpansion:o,rowSelection:r,pagination:a}=e,l=(c,d)=>!(n!=null&&n.has(c))&&(d||t==="api");l("filter",i)&&this.setFilterState(i),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(o,s,t),l("rowSelection",r)&&this.setRowSelectionState(r,t),l("pagination",a)&&this.setPaginationState(a,t);const u=this.updateCachedState.bind(this);u("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(u("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),u("rowGroupExpansion",void 0)):(u("rowGroupExpansion",this.getRowGroupExpansionState()),u("ssrmRowGroupExpansion",void 0)),u("rowSelection",this.getRowSelectionState()),u("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},i=()=>t("filter",this.getFilterState()),{gos:s,colFilter:o}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),o&&this.addManagedListeners(o,{filterStateChanged:i})}setFirstDataRenderedState(e,t,n){const{scroll:i,cellSelection:s,focusedCell:o,columnOrder:r,rowPinning:a}=e,l=(d,h)=>!(n!=null&&n.has(d))&&(h||t==="api");l("focusedCell",o)&&this.setFocusedCellState(o),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",i)&&this.setScrollState(i),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!(r!=null&&r.orderedColIds),t);const u=this.updateCachedState.bind(this);u("sideBar",this.getSideBarState()),u("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();u("rangeSelection",c),u("cellSelection",c),u("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:i=>{if(i.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return yte(ep(e),e.colModel.isPivotMode())}setColumnState(e,t,n,i){const{sort:s,rowGroup:o,aggregation:r,pivot:a,columnPinning:l,columnVisibility:u,columnSizing:c,columnOrder:d}=e;let h=!1;const p=(P,N)=>{const ie=!(i!=null&&i.has(P))&&!!(N||t==="api");return h||(h=ie),ie},g={},C=P=>{let N=g[P];return N||(N={colId:P},g[P]=N,N)},v={},S=p("sort",s);S&&(s==null||s.sortModel.forEach(({colId:P,sort:N},ie)=>{const ve=C(P);ve.sort=N,ve.sortIndex=ie})),(S||!n)&&(v.sort=null,v.sortIndex=null);const R=p("rowGroup",o);R&&(o==null||o.groupColIds.forEach((P,N)=>{const ie=C(P);ie.rowGroup=!0,ie.rowGroupIndex=N})),(R||!n)&&(v.rowGroup=null,v.rowGroupIndex=null);const E=p("aggregation",r);E&&(r==null||r.aggregationModel.forEach(({colId:P,aggFunc:N})=>{C(P).aggFunc=N})),(E||!n)&&(v.aggFunc=null);const y=p("pivot",a);y&&(a==null||a.pivotColIds.forEach((P,N)=>{const ie=C(P);ie.pivot=!0,ie.pivotIndex=N}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(y||!n)&&(v.pivot=null,v.pivotIndex=null);const b=p("columnPinning",l);if(b){for(const P of(l==null?void 0:l.leftColIds)??[])C(P).pinned="left";for(const P of(l==null?void 0:l.rightColIds)??[])C(P).pinned="right"}(b||!n)&&(v.pinned=null);const F=p("columnVisibility",u);if(F)for(const P of(u==null?void 0:u.hiddenColIds)??[])C(P).hide=!0;(F||!n)&&(v.hide=null);const x=p("columnSizing",c);if(x)for(const{colId:P,flex:N,width:ie}of(c==null?void 0:c.columnSizingModel)??[]){const ve=C(P);ve.flex=N??null,ve.width=ie}(x||!n)&&(v.flex=null);const V=d==null?void 0:d.orderedColIds,I=!!(V!=null&&V.length)&&!(i!=null&&i.has("columnOrder")),M=I?V.map(P=>C(P)):Object.values(g);(M.length||h)&&(this.columnStates=M,Ds(this.beans,{state:M,applyOrder:I,defaultState:v},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:o,colGroupSvc:r}=s;if(o!=null&&o.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)o.getPivotResultCol(l.colId)&&a.push(l);Ds(s,{state:a,applyOrder:e},t)}i&&(r==null||r.setColumnGroupState(i,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return wte(t)}setColumnGroupState(e,t,n){var a;const i=this.beans.colGroupSvc;if(!i||n!=null&&n.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:l})=>{const u=s.has(l);return u&&s.delete(l),{groupId:l,open:u}});for(const l of s)r.push({groupId:l,open:!0});r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const n=e==null?void 0:e.getFilterState(),i=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||i||n?{filterModel:t,columnFilterState:n,advancedFilterModel:i}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:n,columnFilterState:i,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(n!==void 0||i!==void 0)&&(t==null||t.setFilterState(n??null,i??null,"columnFilter")),s!==void 0&&(t==null||t.setAdvFilterModel(s??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(n=>{const{id:i,type:s,startRow:o,endRow:r,columns:a,startColumn:l}=n;return{id:i,type:s,startRow:o,endRow:r,colIds:a.map(u=>u.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:n,colModel:i,visibleCols:s}=this.beans;if(!Oo(t)||!n)return;const o=[];for(const r of(e==null?void 0:e.cellRanges)??[]){const a=[];for(const u of r.colIds){const c=i.getCol(u);c&&a.push(c)}if(!a.length)continue;let l=i.getCol(r.startColId);if(!l){const u=s.allCols,c=new Set(a);l=u.find(d=>c.has(d))}o.push({...r,columns:a,startColumn:l})}n.setCellRanges(o)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:n}=(e==null?void 0:e.getVScrollPosition())??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:o,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{var a;r.get("center").setCenterViewportScrollLeft(n),(a=r.getScrollFeature())==null||a.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),o==null||o.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:n,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:s,rowPinned:o}=e;t.setFocusedCell({column:n.getCol(i),rowIndex:s,rowPinned:o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!i))return{page:n,pageSize:i}}setPaginationState(e,t){const{pagination:n,gos:i}=this.beans;if(!n)return;const{pageSize:s,page:o}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";s&&!i.get("paginationAutoPageSize")&&n.setPageSize(s,r?"initialState":"pageSizeSelector"),typeof o=="number"&&(r?n.setPage(o):n.goToPage(o))}getRowSelectionState(){var i;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((i=t==null?void 0:t.toggledNodes)!=null&&i.length)?void 0:t}setRowSelectionState(e,t){var n;(n=this.beans.selectionSvc)==null||n.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t,n){const i=this.beans.expansionSvc;if(!i)return;const s=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};i.setExpansionState(s,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const i=this.cachedState;for(const s of Object.keys(t)){const o=t[s];Vc(o,i[s])||(n=!0)}this.cachedState={...i,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),Vc(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},Doe={moduleName:"GridState",version:$e,beans:[Roe],apiFunctions:{getState:woe,setState:boe}};function Foe(e){return e.rowModel.isLastRowIndexKnown()}function Toe(e){var t;return((t=e.pagination)==null?void 0:t.getPageSize())??100}function xoe(e){var t;return((t=e.pagination)==null?void 0:t.getCurrentPage())??0}function _oe(e){var t;return((t=e.pagination)==null?void 0:t.getTotalPages())??1}function Poe(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function Aoe(e){var t;(t=e.pagination)==null||t.goToNextPage()}function Ioe(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function koe(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function Ooe(e){var t;(t=e.pagination)==null||t.goToLastPage()}function Moe(e,t){var n;(n=e.pagination)==null||n.goToPage(t)}var Loe=class extends ge{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,n=()=>{const i=Math.max(ba(t),1),s=Math.floor(e/i);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?$n(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},wd="paginationPageSizeSelector",Noe={tag:"span",cls:"ag-paging-page-size"},Voe=class extends $t{constructor(){super(Noe),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(wd,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){Gn(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(wd)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const s=this.gos.exists("paginationPageSize"),o=this.gos.get(wd)!==!0;xe(94,{pageSizeSet:s,pageSizesSet:o,pageSizeOptions:e,paginationPageSizeOption:t}),o||xe(95,{paginationPageSizeOption:t,paginationPageSizeSelector:wd}),e.unshift("")}const i=String(n?"":t);this.selectPageSizeComp?(vr(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),i=n("pageSizeSelectorLabel","Page Size:"),s=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new wy).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(wd);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((n,i)=>n-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},Boe={selector:"AG-PAGE-SIZE-SELECTOR",component:Voe},Hoe=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",Goe=class extends W1{constructor(){super(),this.btFirst=We,this.btPrevious=We,this.btNext=We,this.btLast=We,this.lbRecordCount=We,this.lbFirstRowOnPage=We,this.lbLastRowOnPage=We,this.lbCurrent=We,this.lbTotal=We,this.pageSizeComp=We,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(Hoe)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[Boe]);const{btFirst:t,btPrevious:n,btNext:i,btLast:s}=this;this.activateTabIndex([t,n,i,s]),t.insertAdjacentElement("afterbegin",is(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",is(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",is(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",is(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:o=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(o):Mq(this.beans,o),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:i=>{(i.key===se.ENTER||i.key===se.SPACE)&&(i.preventDefault(),n())}})}Oq(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):bte(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),s=e===n-1;this.nextButtonDisabled=s||i,this.lastButtonDisabled=!t||i||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Yj(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),i=e?n:null,s=this.pagination.getCurrentPage(),o=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=o*s+1,a=r+o-1,e&&a>i&&(a=i));const l=r+o-1,u=!e&&n<l,c=this.formatNumber(r);this.lbFirstRowOnPage.textContent=c;let d;const h=this.getLocaleTextFunc();u?d=h("pageLastRowUnknown","?"):d=this.formatNumber(a),this.lbLastRowOnPage.textContent=d;const g=t>0?s+1:0,C=this.formatNumber(g);this.lbCurrent.textContent=C;let v,S;if(e)v=this.formatNumber(t),S=this.formatNumber(i);else{const R=h("more","more");v=R,S=R}this.lbTotal.textContent=v,this.lbRecordCount.textContent=S,this.announceAriaStatus(c,d,S,C,v)}announceAriaStatus(e,t,n,i,s){var d,h;const o=this.getLocaleTextFunc(),r=o("page","Page"),a=o("to","to"),l=o("of","of"),u=`${e} ${a} ${t} ${l} ${n}`,c=`${r} ${i} ${l} ${s}`;u!==this.ariaRowStatus&&(this.ariaRowStatus=u,(d=this.ariaAnnounce)==null||d.announceValue(u,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,(h=this.ariaAnnounce)==null||h.announceValue(c,"paginationPage"))}},$oe={selector:"AG-PAGINATION",component:Goe},Woe=class extends ge{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return $oe}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:n}=this.beans;n!=null&&n.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){var n,i;if(!this.active)return;let t=e;this.paginateChildRows||(t=((i=(n=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:i.call(n,e))??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return ze(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:ze(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:ze(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:ze(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const n=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}n!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const n=this.pageSize,i=t-1;this.totalPages=Math.floor(i/n)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,o=n*s;let r=n*(s+1)-1;if(r>i&&(r=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(o),r===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:n}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:i,keepRenderedRows:t})}},zoe={moduleName:"Pagination",version:$e,beans:[Woe,Loe],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:Foe,paginationGetPageSize:Toe,paginationGetCurrentPage:xoe,paginationGetTotalPages:_oe,paginationGetRowCount:Poe,paginationGoToNextPage:Aoe,paginationGoToPreviousPage:Ioe,paginationGoToFirstPage:koe,paginationGoToLastPage:Ooe,paginationGoToPage:Moe},dependsOn:[Ip]};function Uoe(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function II(e,t,n,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&II(e,t.parent,n,i,s),t.setExpanded(n,void 0,s))}function joe(e,t){return e.rowModel.getRowNode(t)}function Koe(e,t,n,i){e.rowRenderer.addRenderedRowListener(t,n,i)}function qoe(e){return e.rowRenderer.getRenderedNodes()}function Yoe(e,t,n){e.rowModel.forEachNode(t,n)}function Zoe(e){return e.rowRenderer.firstRenderedRow}function Joe(e){return e.rowRenderer.lastRenderedRow}function Xoe(e,t){return e.rowModel.getRow(t)}function Qoe(e){return e.rowModel.getRowCount()}var ere={moduleName:"RowApi",version:$e,apiFunctions:{redrawRows:Uoe,setRowNodeExpanded:II,getRowNode:joe,addRenderedRowListener:Koe,getRenderedNodes:qoe,forEachNode:Yoe,getFirstDisplayedRowIndex:Zoe,getLastDisplayedRowIndex:Joe,getDisplayedRowAtIndex:Xoe,getDisplayedRowCount:Qoe}},tre={moduleName:"ScrollApi",version:$e,apiFunctions:{getVerticalPixelRange:fie,getHorizontalPixelRange:pie,ensureColumnVisible:pI,ensureIndexVisible:gI,ensureNodeVisible:gie}};function nre(e,t,n){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;n===null?i.removeAttribute(s):i.setAttribute(s,n)}function ire(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function sre(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function ore(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function rre(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function are(e){return{rowHeight:ba(e),headerHeight:ad(e)}}function lre(e,t={}){var o;const n=[];for(const r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const a=r.getCellRenderer();a!=null&&n.push(sd(a))}if((o=t.columns)!=null&&o.length)return n;const i=[],s=vw(t.rowNodes);for(const r of e.rowRenderer.getAllRowCtrls()){if(s&&!Cw(r.rowNode,s)||!r.isFullWidth())continue;const a=r.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const u=a[l];u!=null&&i.push(sd(u))}}return[...i,...n]}var ure={moduleName:"RenderApi",version:$e,apiFunctions:{setGridAriaProperty:nre,refreshCells:ire,refreshHeader:sre,isAnimationFrameQueueEmpty:ore,flushAllAnimationFrames:rre,getSizesForCurrentTheme:are,getCellRendererInstances:lre}};function cre(e,t){var n,i;typeof t=="number"?(n=e.colAutosize)==null||n.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function kI({colAutosize:e,visibleCols:t},n,i){Array.isArray(n)?e==null||e.autoSizeCols({colKeys:n,skipHeader:i,source:"api"}):e==null||e.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function dre(e,t){var n;t&&typeof t=="object"?kI(e,t):(n=e.colAutosize)==null||n.autoSizeAllColumns({source:"api",skipHeader:t})}var hre=class extends ge{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){var n;const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let i=!1;const s=t.type;if(s==="fitGridWidth"||s==="fitProvidedWidth")i=!0;else if(s==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const o=e.get("rowData");i=o!=null&&o.length>0&&bn(e)}i&&((n=this.beans.colDelayRenderSvc)==null||n.hideColumns(s))}}autoSizeCols(e){const{eventSvc:t,visibleCols:n}=this.beans;this.innerAutoSizeCols(e).then(i=>{var u;const s=c=>ql(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return s(i);const o=OI(this.beans),r=c=>n.leftCols.some(d=>td(d,c)),a=c=>n.rightCols.some(d=>td(d,c)),l=e.colKeys.filter(c=>!Lo(c)&&!No(c)&&!r(c)&&!a(c));this.sizeColumnsToFit(o,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:(u=e.columnLimits)==null?void 0:u.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),s(i)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:i,skipHeader:s,skipHeaderGroups:o,stopAtGroup:r,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:u=[],source:c="api"}=e,{animationFrameSvc:d,renderStatus:h,colModel:p,autoWidthCalc:g,visibleCols:C}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;const v=new Set;let S=-1;const R=Object.fromEntries(u.map(({colId:b,...F})=>[b,F])),E=s??this.gos.get("skipHeaderOnAutoSize"),y=o??E;for(;S!==0;){S=0;const b=[];for(const F of i){if(!F||lK(F))continue;const x=p.getCol(F);if(!x||v.has(x))continue;const V=g.getPreferredWidthForColumn(x,E);if(V>0){const I=R[x.colId]??{};I.minWidth??(I.minWidth=l),I.maxWidth??(I.maxWidth=a);const M=fre(x,V,I);x.setActualWidth(M,c),v.add(x),S++}b.push(x)}b.length&&C.refresh(c)}y||this.autoSizeColumnGroupsByColumns(i,c,r),t(v)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:i,ctrlsSvc:s}=this.beans,o=new Set,r=i.getColsForKeys(e);for(const l of r){let u=l.getParent();for(;u&&u!=n;)u.isPadding()||o.add(u),u=u.getParent()}let a;for(const l of o){for(const u of s.getHeaderRowContainerCtrls())if(a=u.getHeaderCtrlForColumn(l),a)break;a==null||a.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const n=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",i);const s=new Aa(e);return s.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),s.destroy()}}addColumnGroupResize(e,t,n){const i=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const o=[],r=t.getDisplayedLeafColumns();for(const a of r)a.getColDef().suppressAutoSize||o.push(a.getColId());o.length>0&&this.autoSizeCols({colKeys:o,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=OI(this.beans);if(n>0){this.sizeColumnsToFit(n,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):xe(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,i){var g,C;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,i));return}const s={};for(const{key:v,...S}of(i==null?void 0:i.columnLimits)??[])s[typeof v=="string"?v:v.getColId()]=S;const o=this.beans.visibleCols.allCols;if(e<=0||!o.length)return;const r=Mo(o);if(i!=null&&i.onlyScaleUp&&r>e||e===r&&o.every(S=>{if(S.colDef.suppressSizeToFit)return!0;const R=s==null?void 0:s[S.getId()],E=(R==null?void 0:R.minWidth)??(i==null?void 0:i.defaultMinWidth),y=(R==null?void 0:R.maxWidth)??(i==null?void 0:i.defaultMaxWidth),b=S.getActualWidth();return(E==null||b>=E)&&(y==null||b<=y)}))return;const l=[],u=[];for(const v of o){const S=((g=i==null?void 0:i.colKeys)==null?void 0:g.some(R=>td(v,R)))??!0;v.getColDef().suppressSizeToFit||!S?u.push(v):l.push(v)}const c=l.slice(0);let d=!1;const h=v=>{Rs(l,v),u.push(v)};for(const v of l){v.resetActualWidth(t);const S=s==null?void 0:s[v.getId()],R=(S==null?void 0:S.minWidth)??(i==null?void 0:i.defaultMinWidth),E=(S==null?void 0:S.maxWidth)??(i==null?void 0:i.defaultMaxWidth),y=v.getActualWidth();typeof R=="number"&&y<R?v.setActualWidth(R,t,!0):typeof E=="number"&&y>E&&v.setActualWidth(E,t,!0)}for(;!d;){d=!0;const v=e-Mo(u);if(v<=0)for(const S of l){const R=((C=s==null?void 0:s[S.getId()])==null?void 0:C.minWidth)??(i==null?void 0:i.defaultMinWidth)??S.minWidth;S.setActualWidth(R,t,!0)}else{const S=v/Mo(l);let R=v;for(let E=l.length-1;E>=0;E--){const y=l[E],b=s==null?void 0:s[y.getId()],F=(b==null?void 0:b.minWidth)??(i==null?void 0:i.defaultMinWidth),x=(b==null?void 0:b.maxWidth)??(i==null?void 0:i.defaultMaxWidth),V=y.getMinWidth(),I=y.getMaxWidth(),M=typeof F=="number"&&F>V?F:V,P=typeof x=="number"&&x<I?x:I;let N=Math.round(y.getActualWidth()*S);N<M?(N=M,h(y),d=!1):N>P?(N=P,h(y),d=!1):E===0&&(N=R),y.setActualWidth(N,t,!0),R-=N}}}for(const v of c)v.fireColumnWidthChangedEvent(t);const p=this.beans.visibleCols;p.setLeftValues(t),p.updateBodyWidths(),!n&&ql(this.eventSvc,c,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get("autoSizeStrategy");(n==null?void 0:n.type)!=="fitGridWidth"&&(n==null?void 0:n.type)!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const i=n.type;if(i==="fitGridWidth"){const{columnLimits:s,defaultMinWidth:o,defaultMaxWidth:r}=n,a=s==null?void 0:s.map(({colId:l,minWidth:u,maxWidth:c})=>({key:l,minWidth:u,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:o,defaultMaxWidth:r,columnLimits:a})}else i==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t==null||t.revealColumns(i)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var i;if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),(i=this.beans.colDelayRenderSvc)==null||i.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function fre(e,t,n={}){const i=n.minWidth??e.getMinWidth();t<i&&(t=i);const s=n.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}function OI({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),s=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return Wc(n.eGridBody)-s}var pre={moduleName:"ColumnAutoSize",version:$e,beans:[hre],apiFunctions:{sizeColumnsToFit:cre,autoSizeColumns:kI,autoSizeAllColumns:dre},dependsOn:[rA]},gre=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function mre(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function vre(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function Cre(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t)}function yre(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedBottomRow(t)}function wre(e,t,n){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,n)}var bre={moduleName:"PinnedRow",version:$e,beans:[vY],css:[gre],apiFunctions:{getPinnedTopRowCount:mre,getPinnedBottomRowCount:vre,getPinnedTopRow:Cre,getPinnedBottomRow:yre,forEachPinnedRow:wre},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},Sre=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){var n;const e=(n=this.firstNode.__autoHeights)==null?void 0:n[this.col.getColId()];if(e==null)return;let t=0;for(const i of this.spannedNodes)i!==this.lastNode&&(t+=i.rowHeight);return e-t}},Ere=class extends ge{constructor(e){super(),this.column=e}buildCache(e){var E;const{column:t,beans:{gos:n,pinnedRowModel:i,rowModel:s,valueSvc:o,pagination:r}}=this,{colDef:a}=t,l=this.getNodeMap(e),u=new Map,c=n.getCallback("isFullWidthRow"),d=a.equals,h=a.spanRows,p=typeof h=="function";let g=null,C=null,v;const S=(y,b)=>{g=y,C=null,v=b},R=y=>{const b=!y.isExpandable()&&!y.group&&!y.detail&&(c?!c({rowNode:y}):!0);if(y.rowIndex==null||!b){S(null,null);return}if(g==null||y.level!==g.level||y.footer||C&&y.rowIndex-1!==(C==null?void 0:C.getLastNode().rowIndex)){S(y,o.getValue(t,y));return}const F=o.getValue(t,y);if(p){const x=dt(n,{valueA:v,nodeA:g,valueB:F,nodeB:y,column:t,colDef:a});if(!h(x)){S(y,F);return}}else if(d?!d(v,F):v!==F){S(y,F);return}if(!C){const x=l==null?void 0:l.get(g);(x==null?void 0:x.firstNode)===g?(x.reset(),C=x):C=new Sre(t,g),u.set(g,C)}C.addSpannedNode(y),u.set(y,C)};switch(e){case"center":(E=s.forEachDisplayedNode)==null||E.call(s,y=>{(!r||r.isRowInPage(y.rowIndex))&&R(y)}),this.centerValueNodeMap=u;break;case"top":i==null||i.forEachPinnedRow("top",R),this.topValueNodeMap=u;break;case"bottom":i==null||i.forEachPinnedRow("bottom",R),this.bottomValueNodeMap=u;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},Rre=class extends ge{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=$n(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=$n(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const n=this.createManagedBean(new Ere(e));this.spanningColumns.set(e,n),n.buildCache("top"),n.buildCache("bottom"),n.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:n}=this.beans,i=e.column,s=e.rowIndex,o=this.spanningColumns.get(i);if(!o)return;let r;switch(e.rowPinned){case"top":r=t==null?void 0:t.getPinnedTopRow(s);break;case"bottom":r=t==null?void 0:t.getPinnedBottomRow(s);break;default:r=n.getRow(s)}if(r)return o.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[n,i]of this.spanningColumns)if(i.isCellSpanning(e)){const s=i.getCellSpan(e);t(n,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},Dre=class extends ru{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,n,i,s,o,r){this.eWrapper=n,super.setComp(e,t,n,i,s,o,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Of(e,t.rowIndex)}setAriaRowSpan(){e8(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(wp(t)){this.focusedCellPosition=void 0;return}const n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},Fre=class extends Pp{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new Dre(t,this,this.beans)}isCorrectCtrlForSpan(e){var i;const t=(i=this.beans.rowSpanSvc)==null?void 0:i.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},Tre=class extends ge{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,n=this.getCtrlsMap(e),i=n.size,s=this.getAllRelevantRowControls(e),o=new Map;let r=!1;for(const l of s)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(u,c)=>{if(o.has(c.firstNode))return;const d=n.get(c.firstNode);if(d){o.set(c.firstNode,d),n.delete(c.firstNode);return}r=!0;const h=new Fre(c.firstNode,this.beans,!1,!1,!1);o.set(c.firstNode,h)}));this.setCtrlsMap(e,o);const a=o.size===i;if(!(!r&&a)){for(const l of n.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,n=t==null?void 0:t.getCellSpanByPosition(e);if(!n)return;const i=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(i)return i.getAllCellCtrls().find(s=>s.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},xre={moduleName:"CellSpan",version:$e,beans:[Rre,Tre]},_re=class extends ge{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,n=e.colDef,i=n.cellClassRules,s=this.getCellClassParams(e,n);gw(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,s,o=>t.toggleCss(o,!0),o=>t.toggleCss(o,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let i;if(typeof n=="function"){const s=this.getCellClassParams(e,t);i=n(s)}else i=n;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,i=this.getCellClassParams(e,n);for(const o of this.staticClasses)t.toggleCss(o,!1);const s=this.beans.cellStyles.getStaticCellClasses(n,i);this.staticClasses=s;for(const o of s)t.toggleCss(o,!0)}getCellClassParams(e,t){const{value:n,rowNode:i}=this.cellCtrl;return dt(this.beans.gos,{value:n,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},Pre=class extends ge{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,i){gw(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,i),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let i;return typeof n=="function"?i=n(t):i=n,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e,t){return new _re(e,t)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(s=>{n(s)})}},Are={moduleName:"CellStyle",version:$e,beans:[Pre]},Ire={moduleName:"RowStyle",version:$e,beans:[vee]};function kre(e,t){var n;return!!((n=e.colHover)!=null&&n.isHovered(t))}var Ore=class extends ge{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:i,gos:s,element:o,columns:r}=this,a=i.colHover;if(n??!!s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(o,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)});else{for(const u of this.destroyManagedListeners)u();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},Mre="ag-column-hover",Lre=class extends ge{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,n){const i=()=>{const s=this.isHovered(n);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(Mre,n)}addHeaderFilterColumnHoverListener(e,t,n,i){this.createHoverFeature(e,[n],i);const s=()=>{const o=this.isHovered(n);t.toggleCss("ag-column-hover",o)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,n){e.createManagedBean(new Ore(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},Nre={moduleName:"ColumnHover",version:$e,beans:[Lre],apiFunctions:{isColumnHovered:kre}},Vre=class extends ge{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addListener(e,t){var o;const n=((o=this.wrapSvc)==null?void 0:o.wrap(e,t))??t,i=!Tp.has(e),s=i?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(n),this.eventSvc.addListener(e,n,i)}removeListener(e,t){var o,r;const n=((o=this.wrapSvc)==null?void 0:o.unwrap(e,t))??t,i=this.asyncListeners.get(e),s=!!(i!=null&&i.delete(n));s||(r=this.syncListeners.get(e))==null||r.delete(n),this.eventSvc.removeListener(e,n,s)}addGlobalListener(e){var o;const t=((o=this.wrapSvc)==null?void 0:o.wrapGlobal(e))??e,n=(r,a)=>{Tp.has(r)&&t(r,a)},i=(r,a)=>{Tp.has(r)||t(r,a)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:i});const s=this.eventSvc;s.addGlobalListener(n,!1),s.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:i}=this,s=(n==null?void 0:n.unwrapGlobal(e))??e;if(i.has(s)){const{syncListener:r,asyncListener:a}=i.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((n,i)=>{n.forEach(s=>this.eventSvc.removeListener(i,s,t)),n.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const n of e)this.eventSvc.removeGlobalListener(n,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:n,asyncListener:i})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function Bre(e,t,n){var i;(i=e.apiEventSvc)==null||i.addListener(t,n)}function Hre(e,t,n){var i;(i=e.apiEventSvc)==null||i.removeListener(t,n)}function Gre(e,t){var n;(n=e.apiEventSvc)==null||n.addGlobalListener(t)}function $re(e,t){var n;(n=e.apiEventSvc)==null||n.removeGlobalListener(t)}var Wre={moduleName:"EventApi",version:$e,apiFunctions:{addEventListener:Bre,addGlobalListener:Gre,removeEventListener:Hre,removeGlobalListener:$re},beans:[Vre]},zre={moduleName:"Locale",version:$e,beans:[Cte]},Ure=class extends ge{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=$n(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var a,l,u,c;const{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:i}=this.beans,s=e.autoHeightCols;let o=!1;const r=d=>{var g;const h=d.__autoHeights;let p=gr(this.beans,d).height;for(const C of s){let v=h==null?void 0:h[C.getColId()];const S=n==null?void 0:n.getCellSpan(C,d);if(S){if(S.getLastNode()!==d)continue;if(v=(g=n==null?void 0:n.getCellSpan(C,d))==null?void 0:g.getLastNodeAutoHeight(),!v)return}if(v==null){if(this.colSpanSkipCell(C,d))continue;return}p=Math.max(v,p)}p!==d.rowHeight&&(d.setRowHeight(p),o=!0)};(a=i==null?void 0:i.forEachPinnedRow)==null||a.call(i,"top",r),(l=i==null?void 0:i.forEachPinnedRow)==null||l.call(i,"bottom",r),(u=t.forEachDisplayedNode)==null||u.call(t,r),o&&((c=t.onRowHeightChanged)==null||c.call(t))}setRowAutoHeight(e,t,n){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[n.getId()];return}const i=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:i,visibleCols:s}=this.beans;if(!n.colSpanActive)return!1;let o=[];switch(e.getPinned()){case"left":o=s.getLeftColsForRow(t);break;case"right":o=s.getRightColsForRow(t);break;case null:o=i.getColsWithinViewport(t);break}return!o.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:s,column:o}=e,r=this.beans,a=c=>{var R;if((R=this.beans.editSvc)!=null&&R.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:p,borderTopWidth:g}=ya(i),C=d+h+p+g,S=t.offsetHeight+C;if(c<5){const E=Ln(r),y=!(E!=null&&E.contains(t)),b=S==0;if(y||b){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,S,o)},l=()=>a(0);l();const u=hr(r,t,l);return n.addDestroyFunc(()=>{u(),this.setRowAutoHeight(s,void 0,o)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(s=>s.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const i of t){const s=n.__autoHeights[i.getColId()];if(!s||n.rowHeight<s)return!1}}return!0}},jre={moduleName:"RowAutoHeight",version:$e,beans:[Ure]},Kre={moduleName:"AllCommunity",version:$e,dependsOn:[Use,Qse,uoe,Lte,jie,Kie,qie,Yie,Zie,Jie,Xie,Uie,Vne,Bne,Hne,Nne,$ne,Wne,Doe,Ese,zoe,cA,ere,tre,ure,pre,AZ,bre,fse,Qee,Are,Nre,Ire,Wre,nte,yoe,dI,zre,jre,PZ,jse,xre]};let MI=!1;MI||(V8.registerModules([Kre]),MI=!0);class qre{constructor(t,n){ln(this,"gridApi",null);ln(this,"container");ln(this,"config");ln(this,"eventListeners",new Map);this.container=t,this.config=n}init(){if(this.gridApi)throw new Error("Grid already initialized");const{onGridReady:t,onCellClicked:n,onCellFocused:i,onRowSelected:s,...o}=this.config,r={...o,onGridReady:a=>{this.gridApi=a.api,t&&t(a)},onCellClicked:a=>{n&&n(a)},onCellFocused:a=>{i&&i(a)},onRowSelected:a=>{s&&s(a)}};return this.gridApi=pte(this.container,r),this.gridApi}updateRowData(t){this.gridApi&&this.gridApi.setGridOption("rowData",t)}updateColumnDefs(t){this.gridApi&&this.gridApi.setGridOption("columnDefs",t)}updateDatasource(t){this.gridApi&&this.gridApi.setGridOption("datasource",t)}refreshInfiniteCache(){this.gridApi&&this.gridApi.refreshInfiniteCache()}sizeColumnsToFit(){this.gridApi&&this.gridApi.sizeColumnsToFit()}deselectAll(){this.gridApi&&this.gridApi.deselectAll()}getSelectedRows(){var t;return((t=this.gridApi)==null?void 0:t.getSelectedRows())||[]}setQuickFilterText(t){this.gridApi&&this.gridApi.setGridOption("quickFilterText",t)}getColumnState(){var t;return(t=this.gridApi)==null?void 0:t.getColumnState()}addEventListener(t,n){if(!this.gridApi)throw new Error("Grid not initialized");this.eventListeners.has(t)||this.eventListeners.set(t,new Set),this.eventListeners.get(t).add(n),this.gridApi.addEventListener(t,n)}addRow(t,n="bottom"){if(this.gridApi){const i={add:[t],addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(i),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}addRows(t,n="bottom"){if(this.gridApi&&t.length>0){const i={add:t,addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(i),n==="bottom"){const s=this.gridApi.getDisplayedRowCount();s>0&&this.gridApi.ensureIndexVisible(s-1,"bottom")}}}destroy(){this.gridApi&&(this.eventListeners.forEach((t,n)=>{t.forEach(i=>{var s;(s=this.gridApi)==null||s.removeEventListener(n,i)})}),this.eventListeners.clear(),this.gridApi.destroy(),this.gridApi=null)}getApi(){return this.gridApi}}const Yre=mA.withParams({accentColor:"var(--primary-color)",backgroundColor:"#ffffff",borderColor:"#e5e7eb",borderRadius:4,browserColorScheme:"light",chromeBackgroundColor:"#f9fafb",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#111827",headerBackgroundColor:"#fff",headerFontSize:14,headerFontWeight:600,headerTextColor:"#374151",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4}),Zre=300,Jre=ct({__name:"AgTable",props:{statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},components:{},editType:{},suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:{type:Function},invalidEditValueMode:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},advancedFilterParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:{},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:{},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:{},pinnedTopRowData:{},pinnedBottomRowData:{},enableRowPinning:{type:[Boolean,String]},isRowPinnable:{type:Function},isRowPinned:{type:Function},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},reactiveCustomComponents:{type:Boolean},renderingMode:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},onToolPanelVisibleChanged:{type:Function},onToolPanelSizeChanged:{type:Function},onColumnMenuVisibleChanged:{type:Function},onContextMenuVisibleChanged:{type:Function},onCutStart:{type:Function},onCutEnd:{type:Function},onPasteStart:{type:Function},onPasteEnd:{type:Function},onColumnVisible:{type:Function},onColumnPinned:{type:Function},onColumnResized:{type:Function},onColumnMoved:{type:Function},onColumnValueChanged:{type:Function},onColumnPivotModeChanged:{type:Function},onColumnPivotChanged:{type:Function},onColumnGroupOpened:{type:Function},onNewColumnsLoaded:{type:Function},onGridColumnsChanged:{type:Function},onDisplayedColumnsChanged:{type:Function},onVirtualColumnsChanged:{type:Function},onColumnEverythingChanged:{type:Function},onColumnsReset:{type:Function},onColumnHeaderMouseOver:{type:Function},onColumnHeaderMouseLeave:{type:Function},onColumnHeaderClicked:{type:Function},onColumnHeaderContextMenu:{type:Function},onComponentStateChanged:{type:Function},onCellValueChanged:{type:Function},onCellEditRequest:{type:Function},onRowValueChanged:{type:Function},onCellEditingStarted:{type:Function},onCellEditingStopped:{type:Function},onRowEditingStarted:{type:Function},onRowEditingStopped:{type:Function},onBulkEditingStarted:{type:Function},onBulkEditingStopped:{type:Function},onBatchEditingStarted:{type:Function},onBatchEditingStopped:{type:Function},onUndoStarted:{type:Function},onUndoEnded:{type:Function},onRedoStarted:{type:Function},onRedoEnded:{type:Function},onCellSelectionDeleteStart:{type:Function},onCellSelectionDeleteEnd:{type:Function},onRangeDeleteStart:{type:Function},onRangeDeleteEnd:{type:Function},onFillStart:{type:Function},onFillEnd:{type:Function},onFilterOpened:{type:Function},onFilterChanged:{type:Function},onFilterModified:{type:Function},onFilterUiChanged:{type:Function},onFloatingFilterUiChanged:{type:Function},onAdvancedFilterBuilderVisibleChanged:{type:Function},onFindChanged:{type:Function},onChartCreated:{type:Function},onChartRangeSelectionChanged:{type:Function},onChartOptionsChanged:{type:Function},onChartDestroyed:{type:Function},onCellKeyDown:{type:Function},onGridReady:{type:Function},onGridPreDestroyed:{type:Function},onFirstDataRendered:{type:Function},onGridSizeChanged:{type:Function},onModelUpdated:{type:Function},onVirtualRowRemoved:{type:Function},onViewportChanged:{type:Function},onBodyScroll:{type:Function},onBodyScrollEnd:{type:Function},onDragStarted:{type:Function},onDragStopped:{type:Function},onDragCancelled:{type:Function},onStateUpdated:{type:Function},onPaginationChanged:{type:Function},onRowDragEnter:{type:Function},onRowDragMove:{type:Function},onRowDragLeave:{type:Function},onRowDragEnd:{type:Function},onRowDragCancel:{type:Function},isRowValidDropPosition:{type:Function},onRowResizeStarted:{type:Function},onRowResizeEnded:{type:Function},onColumnRowGroupChanged:{type:Function},onRowGroupOpened:{type:Function},onExpandOrCollapseAll:{type:Function},onPivotMaxColumnsExceeded:{type:Function},onPinnedRowDataChanged:{type:Function},onPinnedRowsChanged:{type:Function},onRowDataUpdated:{type:Function},onAsyncTransactionsFlushed:{type:Function},onStoreRefreshed:{type:Function},onHeaderFocused:{type:Function},onCellClicked:{type:Function},onCellDoubleClicked:{type:Function},onCellFocused:{type:Function},onCellMouseOver:{type:Function},onCellMouseOut:{type:Function},onCellMouseDown:{type:Function},onRowClicked:{type:Function},onRowDoubleClicked:{type:Function},onRowSelected:{type:Function},onSelectionChanged:{type:Function},onCellContextMenu:{type:Function},onRangeSelectionChanged:{type:Function},onCellSelectionChanged:{type:Function},onTooltipShow:{type:Function},onTooltipHide:{type:Function},onSortChanged:{type:Function},height:{},isSorting:{type:Boolean}},emits:["onGridReady","row-clicked","cell-clicked","cell-focused","row-selected"],setup(e,{expose:t,emit:n}){const i=e,s=n,o=oe(null),r=oe(null),a=G(()=>({width:"100%",height:i.height||"500px"})),l=G(()=>({...i,theme:Yre}));function u(){if(!o.value){console.warn("Grid container element not found");return}const v={...l.value,height:i.height};r.value=new qre(o.value,v),r.value.init(),c()}function c(){var S;const v=((S=r.value)==null?void 0:S.getApi())??null;s("onGridReady",v)}function d(v){var S;v&&((S=r.value)==null||S.updateColumnDefs(v))}function h(){var v;(v=r.value)==null||v.destroy(),r.value=null}function p(){var v;return((v=r.value)==null?void 0:v.getApi())||void 0}function g(){return r.value||null}wt(()=>i.columnDefs,v=>{d(v)}),pi(()=>{h()}),t({gridApi:p,gridManager:g});const C=To(()=>{var v,S;(S=(v=r.value)==null?void 0:v.getApi())==null||S.sizeColumnsToFit()},Zre);return Kn(()=>{u(),window.addEventListener("resize",C)}),pi(()=>{h(),window.removeEventListener("resize",C)}),(v,S)=>(j(),Ce("div",{ref_key:"gridContainerRef",ref:o,style:hn(a.value),class:z(["ag-theme-quartz",["ag-table-container",i.isSorting?"is-sorting":""]])},null,6))}});class Xre{constructor(){ln(this,"eGui");ln(this,"eCheckbox");ln(this,"params");ln(this,"selectionChangedListener");ln(this,"isUpdating",!1);ln(this,"handleCellClick",t=>{t.target!==this.eCheckbox&&(t.stopPropagation(),t.preventDefault(),this.eCheckbox.checked=!this.eCheckbox.checked,this.handleCheckboxChange())});ln(this,"handleCheckboxChange",async()=>{if(this.isUpdating)return;this.isUpdating=!0;const t=this.eCheckbox.checked,n=this.params.node.isSelected();if(this.params.node.setSelected(t),this.params.onSelectionChanged)try{await this.params.onSelectionChanged(this.params.data,t)}catch(i){console.error("Failed to update selection:",i),this.eCheckbox.checked=n||!1,this.params.node.setSelected(n||!1)}this.isUpdating=!1})}init(t){this.params=t,this.eGui=document.createElement("div"),this.eGui.className="custom-checkbox-cell",this.eGui.style.cssText=`
149
+ cursor: pointer;
150
+ display: flex;
151
+ align-items: center;
152
+ justify-content: flex-start;
153
+ width: 100%;
154
+ height: 100%;
155
+ padding: 8px;
156
+ `,this.eCheckbox=document.createElement("input"),this.eCheckbox.type="checkbox",this.eCheckbox.checked=!!t.node.isSelected(),this.eCheckbox.style.cssText=`
157
+ cursor: pointer;
158
+ pointer-events: auto;
159
+ width: 16px;
160
+ height: 16px;
161
+ margin: 0;
162
+ `,this.selectionChangedListener=()=>{this.syncCheckboxWithRow()},t.node.addEventListener("rowSelected",this.selectionChangedListener),this.eGui.addEventListener("click",this.handleCellClick),this.eCheckbox.addEventListener("change",this.handleCheckboxChange),this.eGui.appendChild(this.eCheckbox)}syncCheckboxWithRow(){if(!this.isUpdating&&this.eCheckbox){const t=!!this.params.node.isSelected();this.eCheckbox.checked!==t&&(this.eCheckbox.checked=t)}}getGui(){return this.eGui}refresh(t){return this.params=t,this.syncCheckboxWithRow(),!0}destroy(){this.selectionChangedListener&&this.params.node.removeEventListener("rowSelected",this.selectionChangedListener),this.eGui.removeEventListener("click",this.handleCellClick),this.eCheckbox.removeEventListener("change",this.handleCheckboxChange)}}function du(e){return g_(e)}const Qre=()=>[...[{headerName:"Scene name",field:"name",sortable:!1,filter:!1,fieldComponentType:"name",editable:!1,pinned:"left",headerComponent:du(ga)},{headerName:"Assignee",field:"assignees",sortable:!1,filter:!1,fieldComponentType:"assignee",editable:!0,headerComponent:du(ga)},{headerName:"Status",field:"status",sortable:!1,filter:!1,editable:!0,fieldComponentType:"status",headerComponent:du(ga)},{headerName:"Date Range",field:"dateRange",fieldComponentType:"dateRange",sortable:!1,editable:!0,filter:!1,headerComponent:du(ga)},{headerName:"Last Updated",field:"lastUpdated",sortable:!1,filter:!1,fieldComponentType:"text",headerComponent:du(ga),cellRendererParams:n=>{var i,s,o;return{...n,value:(i=n==null?void 0:n.data)==null?void 0:i.lastUpdated.value,tooltip:((o=(s=n==null?void 0:n.data)==null?void 0:s.lastUpdated)==null?void 0:o.tooltip)||void 0,readOnly:!0}}},{headerName:"Completed on",field:"completedOn",sortable:!1,filter:!1,fieldComponentType:"text",headerComponent:du(ga),cellRendererParams:n=>{var i,s,o;return{...n,value:(i=n==null?void 0:n.data)==null?void 0:i.completedOn.value,tooltip:((o=(s=n==null?void 0:n.data)==null?void 0:s.completedOn)==null?void 0:o.tooltip)||void 0,readOnly:!0}}}].map(n=>ma.fromType(n.fieldComponentType,n))],Vp={WIDTH:60,HEADER_CLASS:"ag-checkbox-header"},eae=()=>({field:"__checkboxSelection",width:Vp.WIDTH,minWidth:Vp.WIDTH,maxWidth:Vp.WIDTH,pinned:"left",lockPosition:!0,suppressMovable:!0,suppressColumnsToolPanel:!0,editable:!1,sortable:!1,filter:!1,resizable:!1,headerClass:Vp.HEADER_CLASS,headerComponent:kf(W4),cellRenderer:Xre}),LI={headerName:"",field:"options",sortable:!1,filter:!1,editable:!0,fieldComponentType:"more",pinned:"right",lockPosition:!0,suppressMovable:!0};function tae(e,t){let n=null;return function(...i){n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,i)},t)}}const nae=(e,t)=>{const{getCachedValue:n,setCachedValue:i}=ac({dbName:"item_table_column_configs",storeName:"column_configs"}),s=async()=>{const u=await n(t);if(u&&typeof u=="string")try{return JSON.parse(u)}catch(c){return console.error("Failed to parse cached column config:",c),null}return null},o=oe([]),r=eae(),a=async u=>{const c=await s(),d=Qre(),h=ma.fromType(LI.fieldComponentType,LI),g=((u==null?void 0:u.map(x=>({headerName:x.name,field:`metric_${x.id}`,editable:!1,sortable:!0,filter:!1,flex:1,minWidth:120,context:x,hide:!(x.is_primary||x.is_point_metric),cellClass:"ag-cell-optimized",headerComponent:kf(ga),fieldComponentType:"metric",headerComponentParams:()=>({type:x.format_type})})))||[]).map(x=>ma.fromType("metric",x)),C=[r,...d,...g,h],v=C.filter(x=>x.pinned==="left"),S=C.filter(x=>x.pinned==="right"),R=C.filter(x=>!x.pinned);if(!c||c.length===0){o.value=C;return}const E=new Map(R.map(x=>[x.field,x])),y=[];for(const x of c)if(x.field&&E.has(x.field)){const V=E.get(x.field);y.push({...V,hide:x.hide,width:x.width,pinned:x.pinned}),E.delete(x.field)}const b=Array.from(E.values()),F=[...y,...b];o.value=[...v,...F,...S]};wt(e,u=>a(u),{immediate:!0});const l=tae(u=>{const d=u.filter(h=>!h.pinned).map(h=>({field:h.field,hide:h.hide,width:h.width,pinned:h.pinned}));i(t,JSON.stringify(d))},500);return wt(o,u=>{u&&u.length>0&&l(u)},{deep:!0}),{columnDefs:o,checkboxColumn:r}};function NI(e,t){return function(){return e.apply(t,arguments)}}const{toString:iae}=Object.prototype,{getPrototypeOf:Mw}=Object,{iterator:Bp,toStringTag:VI}=Symbol,Hp=(e=>t=>{const n=iae.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ts=e=>(e=e.toLowerCase(),t=>Hp(t)===e),Gp=e=>t=>typeof t===e,{isArray:hu}=Array,fu=Gp("undefined");function bd(e){return e!==null&&!fu(e)&&e.constructor!==null&&!fu(e.constructor)&&bi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const BI=Ts("ArrayBuffer");function sae(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&BI(e.buffer),t}const oae=Gp("string"),bi=Gp("function"),HI=Gp("number"),Sd=e=>e!==null&&typeof e=="object",rae=e=>e===!0||e===!1,$p=e=>{if(Hp(e)!=="object")return!1;const t=Mw(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(VI in e)&&!(Bp in e)},aae=e=>{if(!Sd(e)||bd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},lae=Ts("Date"),uae=Ts("File"),cae=Ts("Blob"),dae=Ts("FileList"),hae=e=>Sd(e)&&bi(e.pipe),fae=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bi(e.append)&&((t=Hp(e))==="formdata"||t==="object"&&bi(e.toString)&&e.toString()==="[object FormData]"))},pae=Ts("URLSearchParams"),[gae,mae,vae,Cae]=["ReadableStream","Request","Response","Headers"].map(Ts),yae=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ed(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),hu(e))for(i=0,s=e.length;i<s;i++)t.call(null,e[i],i,e);else{if(bd(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),r=o.length;let a;for(i=0;i<r;i++)a=o[i],t.call(null,e[a],a,e)}}function GI(e,t){if(bd(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i=n.length,s;for(;i-- >0;)if(s=n[i],t===s.toLowerCase())return s;return null}const Ma=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$I=e=>!fu(e)&&e!==Ma;function Lw(){const{caseless:e,skipUndefined:t}=$I(this)&&this||{},n={},i=(s,o)=>{const r=e&&GI(n,o)||o;$p(n[r])&&$p(s)?n[r]=Lw(n[r],s):$p(s)?n[r]=Lw({},s):hu(s)?n[r]=s.slice():(!t||!fu(s))&&(n[r]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&Ed(arguments[s],i);return n}const wae=(e,t,n,{allOwnKeys:i}={})=>(Ed(t,(s,o)=>{n&&bi(s)?e[o]=NI(s,n):e[o]=s},{allOwnKeys:i}),e),bae=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Sae=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Eae=(e,t,n,i)=>{let s,o,r;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)r=s[o],(!i||i(r,e,t))&&!a[r]&&(t[r]=e[r],a[r]=!0);e=n!==!1&&Mw(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rae=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},Dae=e=>{if(!e)return null;if(hu(e))return e;let t=e.length;if(!HI(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Fae=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Mw(Uint8Array)),Tae=(e,t)=>{const i=(e&&e[Bp]).call(e);let s;for(;(s=i.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},xae=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},_ae=Ts("HTMLFormElement"),Pae=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),WI=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Aae=Ts("RegExp"),zI=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Ed(n,(s,o)=>{let r;(r=t(s,o,e))!==!1&&(i[o]=r||s)}),Object.defineProperties(e,i)},Iae=e=>{zI(e,(t,n)=>{if(bi(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(bi(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},kae=(e,t)=>{const n={},i=s=>{s.forEach(o=>{n[o]=!0})};return hu(e)?i(e):i(String(e).split(t)),n},Oae=()=>{},Mae=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Lae(e){return!!(e&&bi(e.append)&&e[VI]==="FormData"&&e[Bp])}const Nae=e=>{const t=new Array(10),n=(i,s)=>{if(Sd(i)){if(t.indexOf(i)>=0)return;if(bd(i))return i;if(!("toJSON"in i)){t[s]=i;const o=hu(i)?[]:{};return Ed(i,(r,a)=>{const l=n(r,s+1);!fu(l)&&(o[a]=l)}),t[s]=void 0,o}}return i};return n(e,0)},Vae=Ts("AsyncFunction"),Bae=e=>e&&(Sd(e)||bi(e))&&bi(e.then)&&bi(e.catch),UI=((e,t)=>e?setImmediate:t?((n,i)=>(Ma.addEventListener("message",({source:s,data:o})=>{s===Ma&&o===n&&i.length&&i.shift()()},!1),s=>{i.push(s),Ma.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",bi(Ma.postMessage)),Hae=typeof queueMicrotask<"u"?queueMicrotask.bind(Ma):typeof A<"u"&&A.nextTick||UI,ce={isArray:hu,isArrayBuffer:BI,isBuffer:bd,isFormData:fae,isArrayBufferView:sae,isString:oae,isNumber:HI,isBoolean:rae,isObject:Sd,isPlainObject:$p,isEmptyObject:aae,isReadableStream:gae,isRequest:mae,isResponse:vae,isHeaders:Cae,isUndefined:fu,isDate:lae,isFile:uae,isBlob:cae,isRegExp:Aae,isFunction:bi,isStream:hae,isURLSearchParams:pae,isTypedArray:Fae,isFileList:dae,forEach:Ed,merge:Lw,extend:wae,trim:yae,stripBOM:bae,inherits:Sae,toFlatObject:Eae,kindOf:Hp,kindOfTest:Ts,endsWith:Rae,toArray:Dae,forEachEntry:Tae,matchAll:xae,isHTMLForm:_ae,hasOwnProperty:WI,hasOwnProp:WI,reduceDescriptors:zI,freezeMethods:Iae,toObjectSet:kae,toCamelCase:Pae,noop:Oae,toFiniteNumber:Mae,findKey:GI,global:Ma,isContextDefined:$I,isSpecCompliantForm:Lae,toJSONObject:Nae,isAsyncFn:Vae,isThenable:Bae,setImmediate:UI,asap:Hae,isIterable:e=>e!=null&&bi(e[Bp])};function Dt(e,t,n,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status?s.status:null)}ce.inherits(Dt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ce.toJSONObject(this.config),code:this.code,status:this.status}}});const jI=Dt.prototype,KI={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{KI[e]={value:e}}),Object.defineProperties(Dt,KI),Object.defineProperty(jI,"isAxiosError",{value:!0}),Dt.from=(e,t,n,i,s,o)=>{const r=Object.create(jI);ce.toFlatObject(e,r,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return Dt.call(r,a,l,n,i,s),e&&r.cause==null&&Object.defineProperty(r,"cause",{value:e,configurable:!0}),r.name=e&&e.name||"Error",o&&Object.assign(r,o),r};const Gae=null;function Nw(e){return ce.isPlainObject(e)||ce.isArray(e)}function qI(e){return ce.endsWith(e,"[]")?e.slice(0,-2):e}function YI(e,t,n){return e?e.concat(t).map(function(s,o){return s=qI(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function $ae(e){return ce.isArray(e)&&!e.some(Nw)}const Wae=ce.toFlatObject(ce,{},null,function(t){return/^is[A-Z]/.test(t)});function Wp(e,t,n){if(!ce.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ce.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,v){return!ce.isUndefined(v[C])});const i=n.metaTokens,s=n.visitor||c,o=n.dots,r=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&ce.isSpecCompliantForm(t);if(!ce.isFunction(s))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(ce.isDate(g))return g.toISOString();if(ce.isBoolean(g))return g.toString();if(!l&&ce.isBlob(g))throw new Dt("Blob is not supported. Use a Buffer instead.");return ce.isArrayBuffer(g)||ce.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,C,v){let S=g;if(g&&!v&&typeof g=="object"){if(ce.endsWith(C,"{}"))C=i?C:C.slice(0,-2),g=JSON.stringify(g);else if(ce.isArray(g)&&$ae(g)||(ce.isFileList(g)||ce.endsWith(C,"[]"))&&(S=ce.toArray(g)))return C=qI(C),S.forEach(function(E,y){!(ce.isUndefined(E)||E===null)&&t.append(r===!0?YI([C],y,o):r===null?C:C+"[]",u(E))}),!1}return Nw(g)?!0:(t.append(YI(v,C,o),u(g)),!1)}const d=[],h=Object.assign(Wae,{defaultVisitor:c,convertValue:u,isVisitable:Nw});function p(g,C){if(!ce.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+C.join("."));d.push(g),ce.forEach(g,function(S,R){(!(ce.isUndefined(S)||S===null)&&s.call(t,S,ce.isString(R)?R.trim():R,C,h))===!0&&p(S,C?C.concat(R):[R])}),d.pop()}}if(!ce.isObject(e))throw new TypeError("data must be an object");return p(e),t}function ZI(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Vw(e,t){this._pairs=[],e&&Wp(e,this,t)}const JI=Vw.prototype;JI.append=function(t,n){this._pairs.push([t,n])},JI.toString=function(t){const n=t?function(i){return t.call(this,i,ZI)}:ZI;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function zae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function XI(e,t,n){if(!t)return e;const i=n&&n.encode||zae;ce.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(t,n):o=ce.isURLSearchParams(t)?t.toString():new Vw(t,n).toString(i),o){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class QI{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ce.forEach(this.handlers,function(i){i!==null&&t(i)})}}const ek={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Uae={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Vw,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Bw=typeof window<"u"&&typeof document<"u",Hw=typeof navigator=="object"&&navigator||void 0,jae=Bw&&(!Hw||["ReactNative","NativeScript","NS"].indexOf(Hw.product)<0),Kae=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qae=Bw&&window.location.href||"http://localhost",Qn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Bw,hasStandardBrowserEnv:jae,hasStandardBrowserWebWorkerEnv:Kae,navigator:Hw,origin:qae},Symbol.toStringTag,{value:"Module"})),...Uae};function Yae(e,t){return Wp(e,new Qn.classes.URLSearchParams,{visitor:function(n,i,s,o){return Qn.isNode&&ce.isBuffer(n)?(this.append(i,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Zae(e){return ce.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Jae(e){const t={},n=Object.keys(e);let i;const s=n.length;let o;for(i=0;i<s;i++)o=n[i],t[o]=e[o];return t}function tk(e){function t(n,i,s,o){let r=n[o++];if(r==="__proto__")return!0;const a=Number.isFinite(+r),l=o>=n.length;return r=!r&&ce.isArray(s)?s.length:r,l?(ce.hasOwnProp(s,r)?s[r]=[s[r],i]:s[r]=i,!a):((!s[r]||!ce.isObject(s[r]))&&(s[r]=[]),t(n,i,s[r],o)&&ce.isArray(s[r])&&(s[r]=Jae(s[r])),!a)}if(ce.isFormData(e)&&ce.isFunction(e.entries)){const n={};return ce.forEachEntry(e,(i,s)=>{t(Zae(i),s,n,0)}),n}return null}function Xae(e,t,n){if(ce.isString(e))try{return(t||JSON.parse)(e),ce.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const Rd={transitional:ek,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,o=ce.isObject(t);if(o&&ce.isHTMLForm(t)&&(t=new FormData(t)),ce.isFormData(t))return s?JSON.stringify(tk(t)):t;if(ce.isArrayBuffer(t)||ce.isBuffer(t)||ce.isStream(t)||ce.isFile(t)||ce.isBlob(t)||ce.isReadableStream(t))return t;if(ce.isArrayBufferView(t))return t.buffer;if(ce.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Yae(t,this.formSerializer).toString();if((a=ce.isFileList(t))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Wp(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Xae(t)):t}],transformResponse:[function(t){const n=this.transitional||Rd.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(ce.isResponse(t)||ce.isReadableStream(t))return t;if(t&&ce.isString(t)&&(i&&!this.responseType||s)){const r=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(r)throw a.name==="SyntaxError"?Dt.from(a,Dt.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qn.classes.FormData,Blob:Qn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ce.forEach(["delete","get","head","post","put","patch"],e=>{Rd.headers[e]={}});const Qae=ce.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ele=e=>{const t={};let n,i,s;return e&&e.split(`
163
+ `).forEach(function(r){s=r.indexOf(":"),n=r.substring(0,s).trim().toLowerCase(),i=r.substring(s+1).trim(),!(!n||t[n]&&Qae[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},nk=Symbol("internals");function Dd(e){return e&&String(e).trim().toLowerCase()}function zp(e){return e===!1||e==null?e:ce.isArray(e)?e.map(zp):String(e)}function tle(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const nle=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Gw(e,t,n,i,s){if(ce.isFunction(i))return i.call(this,t,n);if(s&&(t=n),!!ce.isString(t)){if(ce.isString(i))return t.indexOf(i)!==-1;if(ce.isRegExp(i))return i.test(t)}}function ile(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function sle(e,t){const n=ce.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(s,o,r){return this[i].call(this,t,s,o,r)},configurable:!0})})}let Si=class{constructor(t){t&&this.set(t)}set(t,n,i){const s=this;function o(a,l,u){const c=Dd(l);if(!c)throw new Error("header name must be a non-empty string");const d=ce.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=zp(a))}const r=(a,l)=>ce.forEach(a,(u,c)=>o(u,c,l));if(ce.isPlainObject(t)||t instanceof this.constructor)r(t,n);else if(ce.isString(t)&&(t=t.trim())&&!nle(t))r(ele(t),n);else if(ce.isObject(t)&&ce.isIterable(t)){let a={},l,u;for(const c of t){if(!ce.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?ce.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}r(a,n)}else t!=null&&o(n,t,i);return this}get(t,n){if(t=Dd(t),t){const i=ce.findKey(this,t);if(i){const s=this[i];if(!n)return s;if(n===!0)return tle(s);if(ce.isFunction(n))return n.call(this,s,i);if(ce.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Dd(t),t){const i=ce.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||Gw(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let s=!1;function o(r){if(r=Dd(r),r){const a=ce.findKey(i,r);a&&(!n||Gw(i,i[a],a,n))&&(delete i[a],s=!0)}}return ce.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let i=n.length,s=!1;for(;i--;){const o=n[i];(!t||Gw(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,i={};return ce.forEach(this,(s,o)=>{const r=ce.findKey(i,o);if(r){n[r]=zp(s),delete n[o];return}const a=t?ile(o):String(o).trim();a!==o&&delete n[o],n[a]=zp(s),i[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ce.forEach(this,(i,s)=>{i!=null&&i!==!1&&(n[s]=t&&ce.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
164
+ `)}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(s=>i.set(s)),i}static accessor(t){const i=(this[nk]=this[nk]={accessors:{}}).accessors,s=this.prototype;function o(r){const a=Dd(r);i[a]||(sle(s,r),i[a]=!0)}return ce.isArray(t)?t.forEach(o):o(t),this}};Si.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ce.reduceDescriptors(Si.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}}),ce.freezeMethods(Si);function $w(e,t){const n=this||Rd,i=t||n,s=Si.from(i.headers);let o=i.data;return ce.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function ik(e){return!!(e&&e.__CANCEL__)}function pu(e,t,n){Dt.call(this,e??"canceled",Dt.ERR_CANCELED,t,n),this.name="CanceledError"}ce.inherits(pu,Dt,{__CANCEL__:!0});function sk(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new Dt("Request failed with status code "+n.status,[Dt.ERR_BAD_REQUEST,Dt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ole(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function rle(e,t){e=e||10;const n=new Array(e),i=new Array(e);let s=0,o=0,r;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=i[o];r||(r=u),n[s]=l,i[s]=u;let d=o,h=0;for(;d!==s;)h+=n[d++],d=d%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-r<t)return;const p=c&&u-c;return p?Math.round(h*1e3/p):void 0}}function ale(e,t){let n=0,i=1e3/t,s,o;const r=(u,c=Date.now())=>{n=c,s=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=i?r(u,c):(s=u,o||(o=setTimeout(()=>{o=null,r(s)},i-d)))},()=>s&&r(s)]}const Up=(e,t,n=3)=>{let i=0;const s=rle(50,250);return ale(o=>{const r=o.loaded,a=o.lengthComputable?o.total:void 0,l=r-i,u=s(l),c=r<=a;i=r;const d={loaded:r,total:a,progress:a?r/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-r)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},ok=(e,t)=>{const n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},rk=e=>(...t)=>ce.asap(()=>e(...t)),lle=Qn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Qn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Qn.origin),Qn.navigator&&/(msie|trident)/i.test(Qn.navigator.userAgent)):()=>!0,ule=Qn.hasStandardBrowserEnv?{write(e,t,n,i,s,o,r){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];ce.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),ce.isString(i)&&a.push(`path=${i}`),ce.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),ce.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 cle(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function dle(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ak(e,t,n){let i=!cle(t);return e&&(i||n==!1)?dle(e,t):t}const lk=e=>e instanceof Si?{...e}:e;function La(e,t){t=t||{};const n={};function i(u,c,d,h){return ce.isPlainObject(u)&&ce.isPlainObject(c)?ce.merge.call({caseless:h},u,c):ce.isPlainObject(c)?ce.merge({},c):ce.isArray(c)?c.slice():c}function s(u,c,d,h){if(ce.isUndefined(c)){if(!ce.isUndefined(u))return i(void 0,u,d,h)}else return i(u,c,d,h)}function o(u,c){if(!ce.isUndefined(c))return i(void 0,c)}function r(u,c){if(ce.isUndefined(c)){if(!ce.isUndefined(u))return i(void 0,u)}else return i(void 0,c)}function a(u,c,d){if(d in t)return i(u,c);if(d in e)return i(void 0,u)}const l={url:o,method:o,data:o,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:(u,c,d)=>s(lk(u),lk(c),d,!0)};return ce.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||s,h=d(e[c],t[c],c);ce.isUndefined(h)&&d!==a||(n[c]=h)}),n}const uk=e=>{const t=La({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:o,headers:r,auth:a}=t;if(t.headers=r=Si.from(r),t.url=XI(ak(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&r.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),ce.isFormData(n)){if(Qn.hasStandardBrowserEnv||Qn.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if(ce.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,d])=>{u.includes(c.toLowerCase())&&r.set(c,d)})}}if(Qn.hasStandardBrowserEnv&&(i&&ce.isFunction(i)&&(i=i(t)),i||i!==!1&&lle(t.url))){const l=s&&o&&ule.read(o);l&&r.set(s,l)}return t},hle=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,i){const s=uk(e);let o=s.data;const r=Si.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,h,p,g;function C(){p&&p(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function S(){if(!v)return;const E=Si.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),b={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:E,config:e,request:v};sk(function(x){n(x),C()},function(x){i(x),C()},b),v=null}"onloadend"in v?v.onloadend=S:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(S)},v.onabort=function(){v&&(i(new Dt("Request aborted",Dt.ECONNABORTED,e,v)),v=null)},v.onerror=function(y){const b=y&&y.message?y.message:"Network Error",F=new Dt(b,Dt.ERR_NETWORK,e,v);F.event=y||null,i(F),v=null},v.ontimeout=function(){let y=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const b=s.transitional||ek;s.timeoutErrorMessage&&(y=s.timeoutErrorMessage),i(new Dt(y,b.clarifyTimeoutError?Dt.ETIMEDOUT:Dt.ECONNABORTED,e,v)),v=null},o===void 0&&r.setContentType(null),"setRequestHeader"in v&&ce.forEach(r.toJSON(),function(y,b){v.setRequestHeader(b,y)}),ce.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),a&&a!=="json"&&(v.responseType=s.responseType),u&&([h,g]=Up(u,!0),v.addEventListener("progress",h)),l&&v.upload&&([d,p]=Up(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",p)),(s.cancelToken||s.signal)&&(c=E=>{v&&(i(!E||E.type?new pu(null,e,v):E),v.abort(),v=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const R=ole(s.url);if(R&&Qn.protocols.indexOf(R)===-1){i(new Dt("Unsupported protocol "+R+":",Dt.ERR_BAD_REQUEST,e));return}v.send(o||null)})},fle=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let i=new AbortController,s;const o=function(u){if(!s){s=!0,a();const c=u instanceof Error?u:this.reason;i.abort(c instanceof Dt?c:new pu(c instanceof Error?c.message:c))}};let r=t&&setTimeout(()=>{r=null,o(new Dt(`timeout ${t} of ms exceeded`,Dt.ETIMEDOUT))},t);const a=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:l}=i;return l.unsubscribe=()=>ce.asap(a),l}},ple=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let i=0,s;for(;i<n;)s=i+t,yield e.slice(i,s),i=s},gle=async function*(e,t){for await(const n of mle(e))yield*ple(n,t)},mle=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()}},ck=(e,t,n,i)=>{const s=gle(e,t);let o=0,r,a=l=>{r||(r=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let h=o+=d;n(h)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},dk=64*1024,{isFunction:jp}=ce,vle=(({Request:e,Response:t})=>({Request:e,Response:t}))(ce.global),{ReadableStream:hk,TextEncoder:fk}=ce.global,pk=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Cle=e=>{e=ce.merge.call({skipUndefined:!0},vle,e);const{fetch:t,Request:n,Response:i}=e,s=t?jp(t):typeof fetch=="function",o=jp(n),r=jp(i);if(!s)return!1;const a=s&&jp(hk),l=s&&(typeof fk=="function"?(g=>C=>g.encode(C))(new fk):async g=>new Uint8Array(await new n(g).arrayBuffer())),u=o&&a&&pk(()=>{let g=!1;const C=new n(Qn.origin,{body:new hk,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!C}),c=r&&a&&pk(()=>ce.isReadableStream(new i("").body)),d={stream:c&&(g=>g.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!d[g]&&(d[g]=(C,v)=>{let S=C&&C[g];if(S)return S.call(C);throw new Dt(`Response type '${g}' is not supported`,Dt.ERR_NOT_SUPPORT,v)})});const h=async g=>{if(g==null)return 0;if(ce.isBlob(g))return g.size;if(ce.isSpecCompliantForm(g))return(await new n(Qn.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(ce.isArrayBufferView(g)||ce.isArrayBuffer(g))return g.byteLength;if(ce.isURLSearchParams(g)&&(g=g+""),ce.isString(g))return(await l(g)).byteLength},p=async(g,C)=>{const v=ce.toFiniteNumber(g.getContentLength());return v??h(C)};return async g=>{let{url:C,method:v,data:S,signal:R,cancelToken:E,timeout:y,onDownloadProgress:b,onUploadProgress:F,responseType:x,headers:V,withCredentials:I="same-origin",fetchOptions:M}=uk(g),P=t||fetch;x=x?(x+"").toLowerCase():"text";let N=fle([R,E&&E.toAbortSignal()],y),ie=null;const ve=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let Be;try{if(F&&u&&v!=="get"&&v!=="head"&&(Be=await p(V,S))!==0){let Ae=new n(C,{method:"POST",body:S,duplex:"half"}),Ie;if(ce.isFormData(S)&&(Ie=Ae.headers.get("content-type"))&&V.setContentType(Ie),Ae.body){const[Ve,ot]=ok(Be,Up(rk(F)));S=ck(Ae.body,dk,Ve,ot)}}ce.isString(I)||(I=I?"include":"omit");const ee=o&&"credentials"in n.prototype,U={...M,signal:N,method:v.toUpperCase(),headers:V.normalize().toJSON(),body:S,duplex:"half",credentials:ee?I:void 0};ie=o&&new n(C,U);let L=await(o?P(ie,M):P(C,U));const $=c&&(x==="stream"||x==="response");if(c&&(b||$&&ve)){const Ae={};["status","statusText","headers"].forEach(tt=>{Ae[tt]=L[tt]});const Ie=ce.toFiniteNumber(L.headers.get("content-length")),[Ve,ot]=b&&ok(Ie,Up(rk(b),!0))||[];L=new i(ck(L.body,dk,Ve,()=>{ot&&ot(),ve&&ve()}),Ae)}x=x||"text";let re=await d[ce.findKey(d,x)||"text"](L,g);return!$&&ve&&ve(),await new Promise((Ae,Ie)=>{sk(Ae,Ie,{data:re,headers:Si.from(L.headers),status:L.status,statusText:L.statusText,config:g,request:ie})})}catch(ee){throw ve&&ve(),ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)?Object.assign(new Dt("Network Error",Dt.ERR_NETWORK,g,ie),{cause:ee.cause||ee}):Dt.from(ee,ee&&ee.code,g,ie)}}},yle=new Map,gk=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:s}=t,o=[i,s,n];let r=o.length,a=r,l,u,c=yle;for(;a--;)l=o[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:Cle(t)),c=u;return u};gk();const Ww={http:Gae,xhr:hle,fetch:{get:gk}};ce.forEach(Ww,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mk=e=>`- ${e}`,wle=e=>ce.isFunction(e)||e===null||e===!1;function ble(e,t){e=ce.isArray(e)?e:[e];const{length:n}=e;let i,s;const o={};for(let r=0;r<n;r++){i=e[r];let a;if(s=i,!wle(i)&&(s=Ww[(a=String(i)).toLowerCase()],s===void 0))throw new Dt(`Unknown adapter '${a}'`);if(s&&(ce.isFunction(s)||(s=s.get(t))))break;o[a||"#"+r]=s}if(!s){const r=Object.entries(o).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?r.length>1?`since :
165
+ `+r.map(mk).join(`
166
+ `):" "+mk(r[0]):"as no adapter specified";throw new Dt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const vk={getAdapter:ble,adapters:Ww};function zw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pu(null,e)}function Ck(e){return zw(e),e.headers=Si.from(e.headers),e.data=$w.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),vk.getAdapter(e.adapter||Rd.adapter,e)(e).then(function(i){return zw(e),i.data=$w.call(e,e.transformResponse,i),i.headers=Si.from(i.headers),i},function(i){return ik(i)||(zw(e),i&&i.response&&(i.response.data=$w.call(e,e.transformResponse,i.response),i.response.headers=Si.from(i.response.headers))),Promise.reject(i)})}const yk="1.13.2",Kp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Kp[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const wk={};Kp.transitional=function(t,n,i){function s(o,r){return"[Axios v"+yk+"] Transitional option '"+o+"'"+r+(i?". "+i:"")}return(o,r,a)=>{if(t===!1)throw new Dt(s(r," has been removed"+(n?" in "+n:"")),Dt.ERR_DEPRECATED);return n&&!wk[r]&&(wk[r]=!0,console.warn(s(r," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,r,a):!0}},Kp.spelling=function(t){return(n,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function Sle(e,t,n){if(typeof e!="object")throw new Dt("options must be an object",Dt.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let s=i.length;for(;s-- >0;){const o=i[s],r=t[o];if(r){const a=e[o],l=a===void 0||r(a,o,e);if(l!==!0)throw new Dt("option "+o+" must be "+l,Dt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Dt("Unknown option "+o,Dt.ERR_BAD_OPTION)}}const qp={assertOptions:Sle,validators:Kp},ro=qp.validators;let Na=class{constructor(t){this.defaults=t||{},this.interceptors={request:new QI,response:new QI}}async request(t,n){try{return await this._request(t,n)}catch(i){if(i instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{i.stack?o&&!String(i.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(i.stack+=`
167
+ `+o):i.stack=o}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=La(this.defaults,n);const{transitional:i,paramsSerializer:s,headers:o}=n;i!==void 0&&qp.assertOptions(i,{silentJSONParsing:ro.transitional(ro.boolean),forcedJSONParsing:ro.transitional(ro.boolean),clarifyTimeoutError:ro.transitional(ro.boolean)},!1),s!=null&&(ce.isFunction(s)?n.paramsSerializer={serialize:s}:qp.assertOptions(s,{encode:ro.function,serialize:ro.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),qp.assertOptions(n,{baseUrl:ro.spelling("baseURL"),withXsrfToken:ro.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r=o&&ce.merge(o.common,o[n.method]);o&&ce.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=Si.concat(r,o);const a=[];let l=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(n)===!1||(l=l&&C.synchronous,a.unshift(C.fulfilled,C.rejected))});const u=[];this.interceptors.response.forEach(function(C){u.push(C.fulfilled,C.rejected)});let c,d=0,h;if(!l){const g=[Ck.bind(this),void 0];for(g.unshift(...a),g.push(...u),h=g.length,c=Promise.resolve(n);d<h;)c=c.then(g[d++],g[d++]);return c}h=a.length;let p=n;for(;d<h;){const g=a[d++],C=a[d++];try{p=g(p)}catch(v){C.call(this,v);break}}try{c=Ck.call(this,p)}catch(g){return Promise.reject(g)}for(d=0,h=u.length;d<h;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=La(this.defaults,t);const n=ak(t.baseURL,t.url,t.allowAbsoluteUrls);return XI(n,t.params,t.paramsSerializer)}};ce.forEach(["delete","get","head","options"],function(t){Na.prototype[t]=function(n,i){return this.request(La(i||{},{method:t,url:n,data:(i||{}).data}))}}),ce.forEach(["post","put","patch"],function(t){function n(i){return function(o,r,a){return this.request(La(a||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}Na.prototype[t]=n(),Na.prototype[t+"Form"]=n(!0)});let Ele=class iO{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const i=this;this.promise.then(s=>{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](s);i._listeners=null}),this.promise.then=s=>{let o;const r=new Promise(a=>{i.subscribe(a),o=a}).then(s);return r.cancel=function(){i.unsubscribe(o)},r},t(function(o,r,a){i.reason||(i.reason=new pu(o,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 iO(function(s){t=s}),cancel:t}}};function Rle(e){return function(n){return e.apply(null,n)}}function Dle(e){return ce.isObject(e)&&e.isAxiosError===!0}const Uw={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(Uw).forEach(([e,t])=>{Uw[t]=e});function bk(e){const t=new Na(e),n=NI(Na.prototype.request,t);return ce.extend(n,Na.prototype,t,{allOwnKeys:!0}),ce.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return bk(La(e,s))},n}const Rn=bk(Rd);Rn.Axios=Na,Rn.CanceledError=pu,Rn.CancelToken=Ele,Rn.isCancel=ik,Rn.VERSION=yk,Rn.toFormData=Wp,Rn.AxiosError=Dt,Rn.Cancel=Rn.CanceledError,Rn.all=function(t){return Promise.all(t)},Rn.spread=Rle,Rn.isAxiosError=Dle,Rn.mergeConfig=La,Rn.AxiosHeaders=Si,Rn.formToJSON=e=>tk(ce.isHTMLForm(e)?new FormData(e):e),Rn.getAdapter=vk.getAdapter,Rn.HttpStatusCode=Uw,Rn.default=Rn;const{Axios:Hfe,AxiosError:Gfe,CanceledError:$fe,isCancel:Wfe,CancelToken:zfe,VERSION:Ufe,all:jfe,Cancel:Kfe,isAxiosError:Fle,spread:qfe,toFormData:Yfe,AxiosHeaders:Zfe,HttpStatusCode:Jfe,formToJSON:Xfe,getAdapter:Qfe,mergeConfig:epe}=Rn,Tle=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},xle=6e4,_le=(()=>{const e=Rn.create({timeout:xle,headers:{"Content-Type":"application/json"}});return e.interceptors.request.use(t=>{const n=Tle("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 Fd extends Error{constructor(t,n,i,s,o){super(t),this.name="ApiError",this.statusCode=n,this.code=i,this.details=s,this.type=o,Object.setPrototypeOf(this,Fd.prototype)}}const Td=e=>{var t,n;if(Fle(e)){const i=(t=e.response)==null?void 0:t.status,s=(n=e.response)==null?void 0:n.data,o=(s==null?void 0:s.message)||e.message||"An unexpected error occurred",r=(s==null?void 0:s.code)||e.code,a=(s==null?void 0:s.details)||s;let l="UNKNOWN";return!i||e.code==="ERR_NETWORK"||e.code==="ECONNABORTED"?l=e.code==="ECONNABORTED"?"TIMEOUT":"NETWORK":i>=500?l="SERVER":i===_l.UNAUTHORIZED||i===_l.FORBIDDEN?l="AUTH":i===_l.UNPROCESSABLE_ENTITY||i===_l.BAD_REQUEST?l="VALIDATION":i>=_l.BAD_REQUEST&&(l="CLIENT"),new Fd(o,i,r,a,l)}return e instanceof Error?new Fd(e.message,void 0,void 0,void 0,"UNKNOWN"):new Fd("An unknown error occurred",void 0,void 0,void 0,"UNKNOWN")};class Ple{constructor(){this.axios=_le}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(([s,o])=>{o!=null&&o!==""&&(Array.isArray(o)?o.forEach(r=>n.append(s,String(r))):typeof o=="object"?n.append(s,JSON.stringify(o)):n.append(s,String(o)))});const i=n.toString();return i?`?${i}`:""}async get(t="",n,i){try{const s=this.buildUrl(t),o=n?this.buildQueryParams(n):"";return(await this.axios.get(`${s}${o}`,i)).data}catch(s){throw Td(s)}}async post(t="",n,i,s){try{const o=this.buildUrl(t),r=n?this.buildQueryParams(n):"";return(await this.axios.post(`${o}${r}`,i,s)).data}catch(o){throw Td(o)}}async put(t="",n,i){try{const s=this.buildUrl(t);return(await this.axios.put(s,n,i)).data}catch(s){throw Td(s)}}async patch(t="",n,i){try{const s=this.buildUrl(t);return(await this.axios.patch(s,n,i)).data}catch(s){throw Td(s)}}async delete(t="",n,i){try{const s=this.buildUrl(t);return(await this.axios.delete(s,{data:n,...i})).data}catch(s){throw Td(s)}}}class Ale extends Ple{async getAll(t){const n={page:(t==null?void 0:t.page)||1,per_page:(t==null?void 0:t.pageSize)||(t==null?void 0:t.perPage)||20};return t!=null&&t.orderBy&&(n.order_by=t.orderBy),t!=null&&t.sortBy&&(n.sort_by=t.sortBy),t!=null&&t.include&&(n.include=t.include),t!=null&&t.search&&(n.q=t.search),t!=null&&t.q&&(n.q=t.q),t!=null&&t.fields&&(n.fields=t.fields.join(",")),Object.entries(t||{}).forEach(([i,s])=>{["page","pageSize","perPage","orderBy","sortBy","include","search","fields","q"].includes(i)||(n[i]=s)}),this.get("",n)}}class Sk extends Ale{constructor(t){super(),this.apiConfig=t}generateUrl(t,n){let i=t;return Object.entries(n).forEach(([s,o])=>{i=i.replace(`{${s}}`,o)}),i}async getAllItem_cursor(t){var r;const n=t.workspaceId,i=this.generateUrl(this.apiConfig.list_cursor.url,{workspaceId:n}),s={ws_code:n,entity_ids:((r=t.entityIds)==null?void 0:r.join(","))||"",cursor:t.cursor||void 0,per_page:t.pageSize||t.perPage||20,offset:t.offset||void 0,name_like:t.search||t.q,include_signature:1,include:"last_updated_by,property",include_permission:"{include_permission}"},o=t.sortBy;return this.post(i,s,{sort_by:o})}async getAssignedUser(t){const n=this.generateUrl(this.apiConfig.assignedUser.url,{workspaceId:t.workspaceId}),i={item_ids:t.item_ids||[],metric_ids:t.metric_ids||[]},s={per_page:t.per_page};return await this.post(n,s,i)}async getMetricList({workspaceId:t,entityId:n}){const i=this.generateUrl(this.apiConfig.metricList.url,{workspaceId:t,entityId:n});return this.get(i,{status_ed:1,include:"metric_type",per_page:20})}async getMetricValues({workspaceId:t,item_ids:n,per_page:i,metric_ids:s}){const o=this.generateUrl(this.apiConfig.metricValues.url,{workspaceId:t}),r={item_ids:n,metric_ids:s};return this.post(o,{per_page:i},r)}async multipleAssignableUser(t){const n=t.workspaceId,i=t.itemIds,s=this.generateUrl(this.apiConfig.multipleAssignableUser.url,{workspaceId:n}),o={page:t.page||1,per_page:t.perPage,display_name_like:t.q||"",item_ids:i||[]};return this.post(s,{},o)}async getAssignableUsers(t){const n=t.workspaceId,i=this.generateUrl(this.apiConfig.assignableUser.url,{workspaceId:n,itemId:t.itemId}),s={page:t.page||1,per_page:t.perPage,display_name_like:t.q||""};return this.get(i,s)}async getAssignableStatus(t){const n=t.workspaceId,i=this.generateUrl(this.apiConfig.assignableStatus.url,{workspaceId:n}),s={item_ids:t.itemIds||[],page:t.page||1,per_page:t.perPage||10,name_like:t.name_like||""};return this.post(i,{},s)}async updateSceneName({workspaceId:t,entityId:n,itemId:i,name:s}){const o=this.generateUrl(this.apiConfig.item.url,{workspaceId:t,itemId:i}),r={id:i,entity_id:n,name:s,inlcude:"item_user_roles"};return this.put(o,r)}async deleteScene(t,n,i){const s=this.generateUrl(this.apiConfig.delete_item.url,{workspaceId:t,entityId:n,itemId:i}),o={id:i,entity_id:n};return this.delete(s,o)}async deleteThumbnail(t,n){const i=this.generateUrl(this.apiConfig.bulkUpdate.url,{workspaceId:t}),s={ids:n,data:{clear_thumbnail:1}};return this.put(i,s)}async deleteRendition(t,n,i=!1){const s=this.generateUrl(this.apiConfig.delete_rendition.url,{workspaceId:t}),o={item_ids:n,delete_all:i?1:0};return this.delete(s,o)}async archiveScene(t,n,i){const s=this.generateUrl(this.apiConfig.archive_item.url,{workspaceId:t,entityId:n}),o={ids:i,status:0};return this.put(s,o)}async changeStatus(t,n,i){const s=this.generateUrl(this.apiConfig.bulkUpdate.url,{workspaceId:t}),o={ids:n,data:{template_flow_status_id:i}};return this.put(s,o)}async changeDate({workspaceId:t,itemIds:n,startDate:i,dueDate:s}){const o=this.generateUrl(this.apiConfig.bulkUpdate.url,{workspaceId:t}),r={ids:n,data:{start_date:i,due_date:s}};return this.put(o,r)}async updateAssignee(t,n,i){const s=this.generateUrl(this.apiConfig.assigneeReplace.url,{workspaceId:t}),o={item_ids:n,ws_user_role_ids:i};return this.post(s,o)}async removeAssignee(t,n,i){const s=this.generateUrl(this.apiConfig.removeAssignee.url,{workspaceId:t}),o={item_ids:n,ws_user_role_ids:i};return this.delete(s,o)}async replaceAssignee(t,n,i){const s=this.generateUrl(this.apiConfig.assigneeReplace.url,{workspaceId:t}),o={item_ids:n,ws_user_role_ids:i};return this.post(s,{replace:1},o)}async addAssignee(t,n,i){const s=this.generateUrl(this.apiConfig.assigneeReplace.url,{workspaceId:t}),o={item_ids:n,ws_user_role_ids:i};return this.post(s,{},o)}async unAssignAll(t,n,i){const s=this.generateUrl(this.apiConfig.unAssignAll.url,{workspaceId:t,entityId:n}),o={item_ids:i,ws_user_role_ids:[]};return this.delete(s,o)}async createNewScene({workspaceId:t,entityId:n,name:i}){const s=this.generateUrl(this.apiConfig.createNewScene.url,{workspaceId:t}),o={entity_id:n,name:i};return this.post(s,{},o)}async updateItemStatus({workspaceId:t,itemIds:n,statusId:i}){const s=this.generateUrl(this.apiConfig.bulkUpdate.url,{workspaceId:t}),o={ids:n,data:{template_flow_status_id:i}};return this.put(s,o)}async getUserInformation(t,n){const i=this.generateUrl(this.apiConfig.basicInfor.url,{workspaceId:t,userId:n});return await this.get(i,{})}async bulkDeleteItems(t,n){const i=this.generateUrl(this.apiConfig.bulkDelete.url,{workspaceId:t}),s={ids:n};return this.delete(i,s)}async bulkArchiveItems(t,n){const i=this.generateUrl(this.apiConfig.bulkArchive.url,{workspaceId:t}),s={ids:n,status:0};return this.put(i,s)}}const Ek={ROWS_PER_PAGE:50,MIN_CACHE_BLOCKS:5,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},Ile=e=>{const t=Ti(),n=t==null?void 0:t.appContext.config.globalProperties.apiConfig,i=new Sk(n),s=Ps({}),o=oe([]),r=oe(!1),a=oe(null),l=oe(null),u=oe(1),c=oe(20),{setCachedUsers:d}=P3(),h=E=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",status_eq:1,include_permission:"{include_permission}",include_permission_names:!0,q:E}),p=async(E,y)=>{var I,M;if(!E.length||!y.length)return[];const x=BG(E,500).map(async P=>{try{return(await i.getMetricValues({workspaceId:e.value.workspaceId,item_ids:P,per_page:P.length*y.length,metric_ids:y})).data.map(ie=>{const ve=new Map(ie.item_metrics.map(ee=>[ee.metric_id,ee.value])),Be=Object.fromEntries(y.map(ee=>[ee,ve.get(ee)??null]));return{item_id:ie.id,metricValues:Be}})}catch(N){return console.error("Failed to fetch a chunk of metric values:",N),[]}}),V=await Promise.all(x);return(M=(I=e.value).setMetricValues)==null||M.call(I,V.flat(),new Set(E),y),V.flat()},g=async E=>{var y,b;if(!E.length){console.warn("getAssignedUsers: Empty itemIds");return}try{const F=await i.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:E,per_page:Ek.ROWS_PER_PAGE}),x=F.data.flatMap(M=>M.assignees);d(x);const V=new Map(F.data.map(M=>[M.id,M.assignees])),I=E.map(M=>({id:M,assignees:V.get(M)||[]}));(b=(y=e.value).setItemAssignees)==null||b.call(y,I)}catch(F){console.error("Failed to fetch assigned users:",F)}};return{items:o,loading:r,error:a,pagination:l,currentPage:u,pageSize:c,cusorMap:s,fetchItems:async E=>{const{cursor:y,offset:b,size:F,searchQuery:x}=E;let V=[];r.value=!0,a.value=null;try{const I=await i.getAllItem_cursor({cursor:y||void 0,offset:b||void 0,pageSize:F||c.value,...h(x),sortBy:E.sort_by});return o.value=I.data,l.value=I.meta,u.value=I.meta.current_page||0,V=I.data.map(M=>M.id),I}catch(I){throw a.value=I,console.error("Failed to fetch items (cursor):",I),I}finally{r.value=!1,g(V),e.value.metricIds.length&&p(V,e.value.metricIds)}},getAssignableUsers:async E=>{try{return await i.getAssignableUsers({workspaceId:e.value.workspaceId,itemId:E,perPage:Ek.ROWS_PER_PAGE})}catch(y){throw console.error("Failed to fetch assignable users:",y),y}},getAssignableStatus:async E=>{try{return await i.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:E})}catch(y){throw console.error("Failed to fetch assignable status:",y),y}},getMetricList:async E=>{try{return await i.getMetricList({workspaceId:e.value.workspaceId,entityId:E})}catch(y){throw console.error("Failed to fetch metric list:",y),y}},getMetricValues:p,getAssignedUsers:g}};function kle(){const e=Ps({isCreating:!1,name:"",error:void 0});return{newItemData:e,validateNewItem:()=>{const s=e.name.trim();s.length===0?e.error="Name cannot be empty":s.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}}}function Ole(e){return{setItemAssignees:i=>{const s=e.value;if(!s)return;const o=[];i.forEach(r=>{const a=s.getRowNode(r.id);a&&a.data&&(a.data.assignees=W3(r.assignees.map(l=>({id:l.id,name:l.display_name||"",profile_image:l.profile_image||null,color:l.color||{bgColor:"#CCCCCC",textColor:"#000000"},initial:l.initial||"",email:""}))),o.push(a))}),o.length>0&&s.refreshCells({rowNodes:o,columns:["assignees"],force:!0})},setMetricValues:(i,s,o)=>{const r=e.value;if(!r)return;const a=new Map(Array.from(s).map(u=>[u,new Map(o.map(c=>[c,null]))]));i.forEach(u=>{a.get(u.item_id),Object.entries(u.metricValues).forEach(([c,d])=>{var h;(h=a.get(u.item_id))==null||h.set(c,d)})});const l=Array.from(a.entries()).map(([u,c])=>{const d=r.getRowNode(u);return d&&d.data?(c.forEach((h,p)=>{const g=`metric_${p}`;d.data[g]=h}),d):null});l.length>0&&r.refreshCells({rowNodes:l,columns:Array.from(o).map(u=>`metric_${u}`),force:!0})}}}function Mle(e,t,n){return{async getRows(i){try{const s=Math.floor(i.startRow/t)+1,{rows:o,total:r}=await e({page:s,pageSize:t,filterText:n(),sort_by:i.sortModel});let a=-1;Number.isFinite(r)?a=r:o.length<t&&(a=i.startRow+o.length),i.context={pageSize:t,text:n()},i.successCallback(o,a)}catch(s){console.error("Datasource fetch error:",s),i.failCallback()}finally{}}}}function Lle(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:i,gridApi:s,columnDefs:o,fetcher:r}=e,a=oe(!0),l=()=>{n.value=!n.value,s.value&&setTimeout(()=>{var g;(g=s.value)==null||g.sizeColumnsToFit()},300)},u=g=>{if(a.value=!1,s.value=g,!g)return null;const{sizeColumnsToFit:C,addEventListener:v,setGridOption:S}=g;if(C==null||C(),!r)return console.error("Fetcher function is undefined"),null;const R=Mle(r,e.perPage,()=>i.value);return S==null||S("datasource",R),v==null||v("selectionChanged",()=>{t.value=g.getSelectedRows()}),v==null||v("columnMoved",()=>{var F;const E=(F=g.getColumnState())==null?void 0:F.map(x=>x.colId),y=o.value.reduce((x,V)=>(V.field&&x&&(x[V.field]=V),x),{}),b=E.map(x=>y[x]).filter(Boolean);o.value=b}),g||null},c=g=>{var C;if(g!==void 0&&(i.value=g),(C=s.value)==null||C.deselectAll(),t.value=[],a.value=!0,!s.value||!r){console.error("Grid API or fetcher is not available"),a.value=!1;return}s.value.purgeInfiniteCache(),s.value.ensureIndexVisible(0,"top"),setTimeout(()=>{a.value=!1},300)},d=()=>{var g;(g=s.value)==null||g.deselectAll(),t.value=[]},h=g=>{o.value=g},p=To(g=>{c(g)},Fc);return{isLoading:a,toggleSidebar:l,onGridReady:u,onSearch:p,handleUnSelect:d,updateTableConfig:h}}const Nle={changelog:{"1.0.1":{date:"2024-06-20",changes:["Fixed styling issues for archived and deleted rows."]},"1.0.0":{date:"2024-06-15",changes:["Initial release of the Item Table package."]},"0.0.1-alpha.8":{date:"2024-06-10",changes:["Improved performance of row updates.","Added support for custom cell renderers.","Add row hover effect for better UX.","Add loading skeleton for filter","Beta release with core functionalities implemented."]},"0.0.1-alpha.9":{date:"2024-06-05",changes:["Add row selection feature.","Fix bug with column resizing.","Optimize rendering for large datasets.","Implement getLog function to retrieve changelog entries based on version.","Display app version and changelog in the Item Table component tooltip.","Clean up unused autocomplete and memoized config composables.","Update styles for better consistency and readability."]}}},Vle=e=>{var t;return(t=Object.entries(Nle.changelog).find(([n,i])=>n===e))==null?void 0:t[1].changes},Ble=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
168
+ <rect width="32" height="32" rx="4" fill="#CCF3EB"/>
169
+ <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"/>
170
+ </svg>
171
+ `,Hle=Et(ct({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const{addNotification:n}=d_(),i={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},s=[{label:"Create manually",value:"new_scene",iconName:"Plus",type:"icon"},{label:"Import from CSV or Excel",value:"import_scenes",iconName:"FileImport",type:"icon",disabled:!1},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",iconName:"FilePen",type:"icon",disabled:!0}],o=e;ma.initialize({wrapVueCellRenderer:kf,wrapVueCellEditor:g_});const r=oe(null),a=oe([]),l=oe(0),u=oe(!1),c=oe(""),d=oe(),h=oe(""),p=oe(!1),g=Ps({totalItems:0}),C=oe(new Set),v=oe(new Map),{apiServices:S}=Gs(!1,o),{columnDefs:R,checkboxColumn:E}=nae(d,o.entityId),{setItemAssignees:y,setMetricValues:b}=Ole(r),{newItemData:F,validateNewItem:x,openNewItemForm:V,closeNewItemForm:I}=kle(),M=G(()=>c.value.length>0),P=G(()=>!1),N=G(mf),ie=G(()=>R.value.filter(pe=>{var le;return((le=pe.field)==null?void 0:le.startsWith("metric_"))&&!pe.hide}).map(pe=>{var le;return((le=pe.field)==null?void 0:le.replace("metric_",""))||""}));qr("timezone",N);const ve=G(()=>({autoFetch:!1,workspaceId:o.workspaceId,entityId:o.entityId,metricIds:ie.value,setItemAssignees:y,setMetricValues:b})),{fetchItems:Be,getMetricList:ee,cusorMap:U,getMetricValues:L}=Ile(ve),$=(pe,le,Ke)=>pe===1?le:Ke,re=G(()=>{const pe=$(g.totalItems,"scene","scenes"),le=$(l.value,"scene","scenes");return{visible:`${l.value} ${pe}`,total:`${g.totalItems} ${le}`}}),Ae=pe=>{const le=pe.data.map(Ke=>KF(Ke,N.value));return le.forEach(Ke=>{C.value.add(String(Ke.id)),v.value.set(String(Ke.id),{})}),le},Ie=(pe,le)=>{var Ke,Qe,Ft;g.totalItems=pe.meta.total??0,(Ke=pe.meta.next)!=null&&Ke.cursor&&(U[le+1]=pe.meta.next.cursor),h.value=pe.meta["X-Tsr-content-sha256"]||"",pe.meta.total===0?(Qe=r.value)==null||Qe.showNoRowsOverlay():(Ft=r.value)==null||Ft.hideOverlay()},Ve=h_(),{sortingAPIConfiguration:ot,isSortingRunning:tt}=TC(Ve),ht=async({page:pe,pageSize:le,filterText:Ke})=>{const Qe=U[pe],Ft=!Qe&&pe>1?(pe-1)*le:void 0,en=ot.value;en.length>0&&(tt.value=!0);try{const Yt=await Be({cursor:Qe,size:le,searchQuery:Ke,offset:Ft,sort_by:en});if(!Yt)return{rows:[],total:0};const On=Ae(Yt);return Ie(Yt,pe),{rows:On,total:g.totalItems}}catch(Yt){return console.error("Failed to fetch items:",Yt),{rows:[],total:0}}finally{tt.value=!1}},{isLoading:xt,toggleSidebar:qt,onGridReady:Je,handleUnSelect:Cn,onSearch:Wt}=Lle({selectRowData:oe([]),isSidebarOpen:u,quickFilterText:c,gridApi:r,columnDefs:R,perPage:i.ROWS_PER_PAGE,fetcher:ht}),_t=G(()=>({blockLoadDebounceMillis:Fc,columnDefs:R.value,rowModelType:"infinite",cacheBlockSize:i.ROWS_PER_PAGE,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:i.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!0,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:i.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:O,noRowsOverlayComponent:kf(Rj),noRowsOverlayComponentParams:()=>({isSearching:M.value,isFiltering:P.value}),defaultColDef:{editable:!0,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:pe=>pe.data.id,getRowClass:pe=>{if(!pe.data)return["row-empty"];const le=["row-highlight"];return pe.data.id||le.push("row-inactive"),pe.data.isDeleted&&le.push("row-deleted"),pe.data.isArchived&&le.push("row-archived"),le},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:o.workspaceId,entityId:o.entityId,apiServices:S.value,sorting:tt.value}}));function O(){if(!r.value)return;const pe=r.value.getCacheBlockState();if(!pe)return;const le=Object.values(pe).reduce((Ke,Qe)=>(Qe==null?void 0:Qe.pageStatus)==="loaded"?Ke+(Qe.endRow-Qe.startRow):Ke,0);l.value=Math.min(le,g.totalItems)}wt(()=>ot,()=>{r.value&&(h.value="",C.value.clear(),r.value.deselectAll(),Object.keys(U).forEach(pe=>delete U[Number(pe)]),r.value.refreshInfiniteCache())},{deep:!0}),wt(tt,pe=>{r.value&&(pe||setTimeout(()=>{var le;(le=r.value)==null||le.redrawRows()},100))});const W=oe(),ue=()=>{var pe;(pe=W.value)==null||pe.open()},Fe=()=>{r.value&&(h.value="",C.value.clear(),Object.keys(U).forEach(pe=>delete U[Number(pe)]),r.value.refreshInfiniteCache())},we=oe(),Ee=G(()=>{var le;const pe=sessionStorage.getItem("ITEM_TABLE_APP_VERSION")||"";return`
172
+ <div>${pe}</div>
173
+ <ul>${(le=Vle(pe))==null?void 0:le.map(Ke=>`<li>${Ke}</li>`).join("")}</ul>`});function ke(pe){pe==="new_scene"?(V(),In(()=>{we.value&&we.value.focus()})):pe==="import_scenes"&&ue()}const Pe=pe=>{const le=Je(pe);return le&&(le.addEventListener("modelUpdated",O),le.addEventListener("bodyScroll",()=>le.stopEditing())),le==null||le.sizeColumnsToFit(),le},Te=(pe,le)=>{if(!r.value)return;const Ke=r.value.getRowNode(pe);Ke?(r.value.ensureIndexVisible(Number(Ke.rowIndex),"middle"),r.value.flashCells({rowNodes:[Ke],flashDuration:3e3,fadeDuration:1e3})):r.value.ensureIndexVisible(g.totalItems-1,"bottom")},Re=async pe=>{let le;if(!(!S.value||!pe.trim())){I(),xt.value=!0;try{le=await S.value.createNewScene({workspaceId:o.workspaceId,entityId:o.entityId,name:pe}),Fe()}catch(Ke){console.error("Error creating new scene:",Ke)}finally{xt.value=!1,le!=null&&le.id&&n({id:String(le==null?void 0:le.id),message:`${pe} created successfully`,actions:[{label:"Focus",variant:"secondary",action:()=>{Te(String(le==null?void 0:le.id))}},{label:"Scene Hub",variant:"primary",action:()=>{const Ke=gs({type:"scene_hub",config:{ws_code:o.workspaceId,baseDomain:sessionStorage.getItem("URL_BASE")||"app.arbocollab.com",scene_id:String(le==null?void 0:le.id)}}).url;window.open(Ke,"_blank")},btnIcon:"CustomSceneHub"}],icon:Ble,type:"interactive"})}}};wt(()=>[o.entityId,o.workspaceId],async([pe,le])=>{if(!(!pe||!le)){xt.value=!0;try{const Ke=await ee(pe);d.value=Ke.data}catch(Ke){console.error("Failed to initialize metric list:",Ke),d.value=[]}finally{xt.value=!1}}},{immediate:!0,deep:!0}),wt(ie,(pe,le)=>{const Ke=pe.filter(Qe=>!(le!=null&&le.includes(Qe)));Ke.length>0&&L(Array.from(C.value),Ke).then(Qe=>{b(Qe,C.value,Ke)})},{immediate:!0,deep:!0}),wt(h,(pe,le)=>{p.value=!!(le&&pe&&le!==pe)}),t({refreshTable:Fe});const st=G(()=>ot.value&&ot.value.length>0),He=()=>{Ve.clearSorting()};return(pe,le)=>{const Ke=wS("tooltip");return j(),Xe(Z(_4),{"is-sidebar-open":u.value,onCloseSidebar:Z(qt),onSidebarClear:Z(qt),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:Z(qt)},{"header-left":De(()=>[me("h1",{class:z(pe.$style.tableTitle)},"Scenes",2),ye(Z(Jv),{variant:["primary"],options:s,onSelect:ke,onHandleClick:le[1]||(le[1]=Qe=>ke("new_scene"))},{prefix:De(()=>[ye(Z(gt),{variant:["primary"],onClick:le[0]||(le[0]=Qe=>ke("new_scene")),label:"New"})]),_:1}),ut((j(),Xe(Z(gt),{variant:["tertiary","icon"]},{default:De(()=>[ye(Z(lt),{src:"InfoCircle",size:"14"})]),_:1})),[[Ke,{content:Ee.value,html:!0,placement:"bottom",trigger:"click"}]])]),"header-actions":De(()=>[st.value?(j(),Xe(Z(gt),{key:0,variant:"tertiary",label:" Clear sorting",onClick:He},{prefix:De(()=>[ye(Z(lt),{src:"Xmark",size:"12"})]),_:1})):at("",!0),ye(Z(Kv),{modelValue:c.value,"onUpdate:modelValue":le[2]||(le[2]=Qe=>c.value=Qe),onSearch:Z(Wt),class:z(pe.$style.itemSearchBox),onClear:le[3]||(le[3]=Qe=>Z(Wt)(""))},null,8,["modelValue","onSearch","class"]),ye(Z(UF),{status:Z(xt)?"busy":"online",size:10,"status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":p.value},{default:De(()=>[ye(Z(gt),{variant:"secondary",onClick:Fe},{prefix:De(()=>[ye(Z(lt),{src:"ArrowsRotate",size:"14"})]),default:De(()=>[le[9]||(le[9]=bt(" Refresh ",-1))]),_:1})]),_:1},8,["status","show-badge"]),ye(Z(Sj),{modelValue:Z(R),"onUpdate:modelValue":le[4]||(le[4]=Qe=>Ht(R)?R.value=Qe:null),checkboxColumn:Z(E)},null,8,["modelValue","checkboxColumn"])]),grid:De(({availableHeight:Qe})=>[ye(Z(Jre),fn({ref:"agGrid"},_t.value,{height:Qe+"px",isSorting:Z(tt),onOnGridReady:Pe,onSelectionChanged:le[5]||(le[5]=Ft=>a.value=Ft.api.getSelectedRows().map(en=>en.id))}),null,16,["height","isSorting"])]),footer:De(()=>[me("div",{class:z(pe.$style.tableFooter)},[me("div",{class:z(pe.$style.footerStart)},[ye(Z(lt),{src:"Eye",size:"14"}),me("span",null,[le[10]||(le[10]=bt(" Visibles: ",-1)),me("b",null,yt(re.value.visible),1)])],2),me("div",{class:z(pe.$style.footerStart)},[ye(Z(lt),{src:"List",size:"14"}),me("span",null,[le[11]||(le[11]=bt(" Total: ",-1)),me("b",null,yt(re.value.total),1)])],2)],2)]),"new-row":De(()=>[Z(F).isCreating?(j(),Ce("div",{key:0,class:z(pe.$style.newRow)},[ye(Z(JF),{ref_key:"newSceneInputRef",ref:we,modelValue:Z(F).name,"onUpdate:modelValue":le[6]||(le[6]=Qe=>Z(F).name=Qe),onChange:Z(x),onEnter:le[7]||(le[7]=Qe=>Re(Z(F).name)),placeholder:"Enter name",focused:!0},{clear:De(()=>[Z(F).name.length==0?(j(),Xe(Z(lt),{key:0,src:"Pen",color:"#f7941d",size:14})):at("",!0)]),_:1},8,["modelValue","onChange"]),ye(Z(gt),{onClick:le[8]||(le[8]=Qe=>Re(Z(F).name)),disabled:!!Z(F).error||!Z(F).name.trim()},{prefix:De(()=>[ye(Z(lt),{src:"Plus",size:"14"})]),default:De(()=>[le[12]||(le[12]=bt(" Create ",-1))]),_:1},8,["disabled"]),ye(Z(gt),{variant:["secondary","icon"],onClick:Z(I)},{prefix:De(()=>[ye(Z(lt),{src:"XMarkSolid",size:"14"})]),_:1},8,["onClick"])],2)):at("",!0)]),"bulk-update-actions":De(()=>{var Qe;return[!u.value&&a.value.length>0?(j(),Xe(Z(m4),{key:0,selectRowData:((Qe=r.value)==null?void 0:Qe.getSelectedRows())||[],"workspace-id":o.workspaceId,"entity-id":o.entityId,"grid-api":r.value,onUnselect:Z(Cn)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect"])):at("",!0)]}),snackbar:De(()=>[ye(Z(yj))]),popup:De(()=>[ye(Aj,{ref_key:"popupCreateSceneRef",ref:W},null,512)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"])}}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1xbuf_1",tableFooter:"_tableFooter_1xbuf_7",footerStart:"_footerStart_1xbuf_17",newRow:"_newRow_1xbuf_25","warning-text":"_warning-text_1xbuf_43","has-error":"_has-error_1xbuf_48",itemSearchBox:"_itemSearchBox_1xbuf_52"}}]]),Rk="0.0.1-alpha.10",Gle={key:0},$le=Et(ct({__name:"app",setup(e){const t=G(()=>n.id.length===0||n.workspaceId.length===0),n=Ps({id:"",workspaceId:"",apiConfig:{}});zg(()=>{sessionStorage.setItem("ITEM_TABLE_APP_VERSION",Rk);try{const o=Ti();if(!o)throw new Error("Current instance is null");n.id=(o==null?void 0:o.appContext.config.globalProperties.id)||"",n.workspaceId=(o==null?void 0:o.appContext.config.globalProperties.workspaceId)||sessionStorage.getItem("ws.code")||"",n.apiConfig=(o==null?void 0:o.appContext.config.globalProperties.apiConfig)||{},o.appContext.config.globalProperties.apiServices=new Sk(n.apiConfig)}catch(o){console.error("Error getting current instance:",o)}});const i=G(()=>n.id),s=G(()=>n.workspaceId);return qr("workspaceId",s),qr("entityId",i),(o,r)=>(j(),Ce("div",{class:z(o.$style.dashboardPluginWrapper)},[t.value?(j(),Ce("span",Gle," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):i.value?(j(),Xe(Z(Hle),{key:1,entityId:i.value,workspaceId:s.value},null,8,["entityId","workspaceId"])):at("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),jw=async(e={},t={})=>{const n=U0($le);console.log("Initializing Dashboard with version:",Rk),console.log("Initializing Dashboard with config:",e);const i=pj();n.use(i);const s=["apiConfig","workspaceId","id"],o={};return Object.entries(e).forEach(([r,a])=>{a!==void 0&&(n.config.globalProperties[r]=a,o[r]=a,s.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=o,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)},n};typeof window<"u"&&(window.arboDashboard=jw),tn.default=jw,tn.initDashboard=jw,Object.defineProperties(tn,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});