@arbocollab/arbo-plugin-item-table 0.0.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -0
- package/lib/es/index.es.js +71093 -0
- package/lib/favicon.ico +0 -0
- package/lib/style.css +1 -0
- package/lib/sw.js +44 -0
- package/lib/umd/index.umd.js +155 -0
- package/package.json +62 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
(function(Qt,I){typeof exports=="object"&&typeof module<"u"?I(exports):typeof define=="function"&&define.amd?define(["exports"],I):(Qt=typeof globalThis<"u"?globalThis:Qt||self,I(Qt.arboDashBoard={}))})(this,function(Qt){"use strict";var Yue=Object.defineProperty;var Zue=(Qt,I,fi)=>I in Qt?Yue(Qt,I,{enumerable:!0,configurable:!0,writable:!0,value:fi}):Qt[I]=fi;var rn=(Qt,I,fi)=>Zue(Qt,typeof I!="symbol"?I+"":I,fi);var ek,tk;var I={env:{}};/**
|
|
2
|
+
* @vue/shared v3.5.25
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/function fi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const kt=I.env.NODE_ENV!=="production"?Object.freeze({}):{},Ha=I.env.NODE_ENV!=="production"?Object.freeze([]):[],Rn=()=>{},sb=()=>!1,Su=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Od=e=>e.startsWith("onUpdate:"),Xt=Object.assign,ug=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},kk=Object.prototype.hasOwnProperty,Ot=(e,t)=>kk.call(e,t),et=Array.isArray,Ir=e=>Eu(e)==="[object Map]",Md=e=>Eu(e)==="[object Set]",ob=e=>Eu(e)==="[object Date]",rt=e=>typeof e=="function",en=e=>typeof e=="string",ss=e=>typeof e=="symbol",Mt=e=>e!==null&&typeof e=="object",cg=e=>(Mt(e)||rt(e))&&rt(e.then)&&rt(e.catch),rb=Object.prototype.toString,Eu=e=>rb.call(e),dg=e=>Eu(e).slice(8,-1),ab=e=>Eu(e)==="[object Object]",Ld=e=>en(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ru=fi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ok=fi("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Nd=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Mk=/-\w/g,zn=Nd(e=>e.replace(Mk,t=>t.slice(1).toUpperCase())),Lk=/\B([A-Z])/g,xs=Nd(e=>e.replace(Lk,"-$1").toLowerCase()),_r=Nd(e=>e.charAt(0).toUpperCase()+e.slice(1)),kr=Nd(e=>e?`on${_r(e)}`:""),ii=(e,t)=>!Object.is(e,t),Ga=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Vd=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},hg=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Nk=e=>{const t=en(e)?Number(e):NaN;return isNaN(t)?e:t};let lb;const Du=()=>lb||(lb=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Dn(e){if(et(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],s=en(i)?Gk(i):Dn(i);if(s)for(const o in s)t[o]=s[o]}return t}else if(en(e)||Mt(e))return e}const Vk=/;(?![^(]*\))/g,Bk=/:([^]+)/,Hk=/\/\*[^]*?\*\//g;function Gk(e){const t={};return e.replace(Hk,"").split(Vk).forEach(n=>{if(n){const i=n.split(Bk);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function Kt(e){let t="";if(en(e))t=e;else if(et(e))for(let n=0;n<e.length;n++){const i=Kt(e[n]);i&&(t+=i+" ")}else if(Mt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Wk="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",zk="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",$k="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",Uk=fi(Wk),jk=fi(zk),Kk=fi($k),qk=fi("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function ub(e){return!!e||e===""}function Yk(e,t){if(e.length!==t.length)return!1;let n=!0;for(let i=0;n&&i<e.length;i++)n=Bd(e[i],t[i]);return n}function Bd(e,t){if(e===t)return!0;let n=ob(e),i=ob(t);if(n||i)return n&&i?e.getTime()===t.getTime():!1;if(n=ss(e),i=ss(t),n||i)return e===t;if(n=et(e),i=et(t),n||i)return n&&i?Yk(e,t):!1;if(n=Mt(e),i=Mt(t),n||i){if(!n||!i)return!1;const s=Object.keys(e).length,o=Object.keys(t).length;if(s!==o)return!1;for(const r in e){const a=e.hasOwnProperty(r),l=t.hasOwnProperty(r);if(a&&!l||!a&&l||!Bd(e[r],t[r]))return!1}}return String(e)===String(t)}function cb(e,t){return e.findIndex(n=>Bd(n,t))}const db=e=>!!(e&&e.__v_isRef===!0),mt=e=>en(e)?e:e==null?"":et(e)||Mt(e)&&(e.toString===rb||!rt(e.toString))?db(e)?mt(e.value):JSON.stringify(e,hb,2):String(e),hb=(e,t)=>db(t)?hb(e,t.value):Ir(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,s],o)=>(n[fg(i,o)+" =>"]=s,n),{})}:Md(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>fg(n))}:ss(t)?fg(t):Mt(t)&&!et(t)&&!ab(t)?String(t):t,fg=(e,t="")=>{var n;return ss(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function Zk(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:((typeof e!="number"||!Number.isFinite(e))&&I.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 bi(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let $n;class fb{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=$n,!t&&$n&&(this.index=($n.scopes||($n.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=$n;try{return $n=this,t()}finally{$n=n}}else I.env.NODE_ENV!=="production"&&bi("cannot run an inactive effect scope.")}on(){++this._on===1&&(this.prevScope=$n,$n=this)}off(){this._on>0&&--this._on===0&&($n=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 fb(e)}function gb(){return $n}function Jk(e,t=!1){$n?$n.cleanups.push(e):I.env.NODE_ENV!=="production"&&!t&&bi("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Gt;const pg=new WeakSet;class mb{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,$n&&$n.active&&$n.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,pg.has(this)&&(pg.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Cb(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Eb(this),wb(this);const t=Gt,n=os;Gt=this,os=!0;try{return this.fn()}finally{I.env.NODE_ENV!=="production"&&Gt!==this&&bi("Active effect was not restored correctly - this is likely a Vue internal bug."),yb(this),Gt=t,os=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Cg(t);this.deps=this.depsTail=void 0,Eb(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?pg.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){vg(this)&&this.run()}get dirty(){return vg(this)}}let vb=0,Fu,xu;function Cb(e,t=!1){if(e.flags|=8,t){e.next=xu,xu=e;return}e.next=Fu,Fu=e}function gg(){vb++}function mg(){if(--vb>0)return;if(xu){let t=xu;for(xu=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Fu;){let t=Fu;for(Fu=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 wb(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function yb(e){let t,n=e.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),Cg(i),Qk(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}e.deps=t,e.depsTail=n}function vg(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(bb(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function bb(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||!vg(e))))return;e.flags|=2;const t=e.dep,n=Gt,i=os;Gt=e,os=!0;try{wb(e);const s=e.fn(e._value);(t.version===0||ii(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Gt=n,os=i,yb(e),e.flags&=-3}}function Cg(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),I.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)Cg(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Qk(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let os=!0;const Sb=[];function rs(){Sb.push(os),os=!1}function as(){const e=Sb.pop();os=e===void 0?!0:e}function Eb(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Gt;Gt=void 0;try{t()}finally{Gt=n}}}let Tu=0;class Xk{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 Hd{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,I.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!Gt||!os||Gt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Gt)n=this.activeLink=new Xk(Gt,this),Gt.deps?(n.prevDep=Gt.depsTail,Gt.depsTail.nextDep=n,Gt.depsTail=n):Gt.deps=Gt.depsTail=n,Rb(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=Gt.depsTail,n.nextDep=void 0,Gt.depsTail.nextDep=n,Gt.depsTail=n,Gt.deps===n&&(Gt.deps=i)}return I.env.NODE_ENV!=="production"&&Gt.onTrack&&Gt.onTrack(Xt({effect:Gt},t)),n}trigger(t){this.version++,Tu++,this.notify(t)}notify(t){gg();try{if(I.env.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(Xt({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{mg()}}}function Rb(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)Rb(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),I.env.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const Gd=new WeakMap,Or=Symbol(I.env.NODE_ENV!=="production"?"Object iterate":""),wg=Symbol(I.env.NODE_ENV!=="production"?"Map keys iterate":""),Pu=Symbol(I.env.NODE_ENV!=="production"?"Array iterate":"");function Pn(e,t,n){if(os&&Gt){let i=Gd.get(e);i||Gd.set(e,i=new Map);let s=i.get(n);s||(i.set(n,s=new Hd),s.map=i,s.key=n),I.env.NODE_ENV!=="production"?s.track({target:e,type:t,key:n}):s.track()}}function Ts(e,t,n,i,s,o){const r=Gd.get(e);if(!r){Tu++;return}const a=l=>{l&&(I.env.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:i,oldValue:s,oldTarget:o}):l.trigger())};if(gg(),t==="clear")r.forEach(a);else{const l=et(e),u=l&&Ld(n);if(l&&n==="length"){const c=Number(i);r.forEach((d,h)=>{(h==="length"||h===Pu||!ss(h)&&h>=c)&&a(d)})}else switch((n!==void 0||r.has(void 0))&&a(r.get(n)),u&&a(r.get(Pu)),t){case"add":l?u&&a(r.get("length")):(a(r.get(Or)),Ir(e)&&a(r.get(wg)));break;case"delete":l||(a(r.get(Or)),Ir(e)&&a(r.get(wg)));break;case"set":Ir(e)&&a(r.get(Or));break}}mg()}function eO(e,t){const n=Gd.get(e);return n&&n.get(t)}function Wa(e){const t=dt(e);return t===e?t:(Pn(t,"iterate",Pu),Un(e)?t:t.map(us))}function Wd(e){return Pn(e=dt(e),"iterate",Pu),e}function zo(e,t){return ls(e)?Li(e)?$a(us(t)):$a(t):us(t)}const tO={__proto__:null,[Symbol.iterator](){return yg(this,Symbol.iterator,e=>zo(this,e))},concat(...e){return Wa(this).concat(...e.map(t=>et(t)?Wa(t):t))},entries(){return yg(this,"entries",e=>(e[1]=zo(this,e[1]),e))},every(e,t){return ao(this,"every",e,t,void 0,arguments)},filter(e,t){return ao(this,"filter",e,t,n=>n.map(i=>zo(this,i)),arguments)},find(e,t){return ao(this,"find",e,t,n=>zo(this,n),arguments)},findIndex(e,t){return ao(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ao(this,"findLast",e,t,n=>zo(this,n),arguments)},findLastIndex(e,t){return ao(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ao(this,"forEach",e,t,void 0,arguments)},includes(...e){return bg(this,"includes",e)},indexOf(...e){return bg(this,"indexOf",e)},join(e){return Wa(this).join(e)},lastIndexOf(...e){return bg(this,"lastIndexOf",e)},map(e,t){return ao(this,"map",e,t,void 0,arguments)},pop(){return Au(this,"pop")},push(...e){return Au(this,"push",e)},reduce(e,...t){return Db(this,"reduce",e,t)},reduceRight(e,...t){return Db(this,"reduceRight",e,t)},shift(){return Au(this,"shift")},some(e,t){return ao(this,"some",e,t,void 0,arguments)},splice(...e){return Au(this,"splice",e)},toReversed(){return Wa(this).toReversed()},toSorted(e){return Wa(this).toSorted(e)},toSpliced(...e){return Wa(this).toSpliced(...e)},unshift(...e){return Au(this,"unshift",e)},values(){return yg(this,"values",e=>zo(this,e))}};function yg(e,t,n){const i=Wd(e),s=i[t]();return i!==e&&!Un(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const nO=Array.prototype;function ao(e,t,n,i,s,o){const r=Wd(e),a=r!==e&&!Un(e),l=r[t];if(l!==nO[t]){const d=l.apply(e,o);return a?us(d):d}let u=n;r!==e&&(a?u=function(d,h){return n.call(this,zo(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 Db(e,t,n,i){const s=Wd(e);let o=n;return s!==e&&(Un(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,zo(e,a),l,e)}),s[t](o,...i)}function bg(e,t,n){const i=dt(e);Pn(i,"iterate",Pu);const s=i[t](...n);return(s===-1||s===!1)&&za(n[0])?(n[0]=dt(n[0]),i[t](...n)):s}function Au(e,t,n=[]){rs(),gg();const i=dt(e)[t].apply(e,n);return mg(),as(),i}const iO=fi("__proto__,__v_isRef,__isVue"),Fb=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ss));function sO(e){ss(e)||(e=String(e));const t=dt(this);return Pn(t,"has",e),t.hasOwnProperty(e)}class xb{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?Ob:kb:o?_b:Ib).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const r=et(t);if(!s){let l;if(r&&(l=tO[n]))return l;if(n==="hasOwnProperty")return sO}const a=Reflect.get(t,n,Wt(t)?t:i);if((ss(n)?Fb.has(n):iO(n))||(s||Pn(t,"get",n),o))return a;if(Wt(a)){const l=r&&Ld(n)?a:a.value;return s&&Mt(l)?Eg(l):l}return Mt(a)?s?Eg(a):lo(a):a}}class Tb extends xb{constructor(t=!1){super(!1,t)}set(t,n,i,s){let o=t[n];const r=et(t)&&Ld(n);if(!this._isShallow){const u=ls(o);if(!Un(i)&&!ls(i)&&(o=dt(o),i=dt(i)),!r&&Wt(o)&&!Wt(i))return u?(I.env.NODE_ENV!=="production"&&bi(`Set operation on key "${String(n)}" failed: target is readonly.`,t[n]),!0):(o.value=i,!0)}const a=r?Number(n)<t.length:Ot(t,n),l=Reflect.set(t,n,i,Wt(t)?t:s);return t===dt(s)&&(a?ii(i,o)&&Ts(t,"set",n,i,o):Ts(t,"add",n,i)),l}deleteProperty(t,n){const i=Ot(t,n),s=t[n],o=Reflect.deleteProperty(t,n);return o&&i&&Ts(t,"delete",n,void 0,s),o}has(t,n){const i=Reflect.has(t,n);return(!ss(n)||!Fb.has(n))&&Pn(t,"has",n),i}ownKeys(t){return Pn(t,"iterate",et(t)?"length":Or),Reflect.ownKeys(t)}}class Pb extends xb{constructor(t=!1){super(!0,t)}set(t,n){return I.env.NODE_ENV!=="production"&&bi(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return I.env.NODE_ENV!=="production"&&bi(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const oO=new Tb,rO=new Pb,aO=new Tb(!0),lO=new Pb(!0),Sg=e=>e,zd=e=>Reflect.getPrototypeOf(e);function uO(e,t,n){return function(...i){const s=this.__v_raw,o=dt(s),r=Ir(o),a=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,u=s[e](...i),c=n?Sg:t?$a:us;return!t&&Pn(o,"iterate",l?wg:Or),{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 $d(e){return function(...t){if(I.env.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";bi(`${_r(e)} operation ${n}failed: target is readonly.`,dt(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function cO(e,t){const n={get(s){const o=this.__v_raw,r=dt(o),a=dt(s);e||(ii(s,a)&&Pn(r,"get",s),Pn(r,"get",a));const{has:l}=zd(r),u=t?Sg:e?$a:us;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&&Pn(dt(s),"iterate",Or),s.size},has(s){const o=this.__v_raw,r=dt(o),a=dt(s);return e||(ii(s,a)&&Pn(r,"has",s),Pn(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=dt(a),u=t?Sg:e?$a:us;return!e&&Pn(l,"iterate",Or),a.forEach((c,d)=>s.call(o,u(c),u(d),r))}};return Xt(n,e?{add:$d("add"),set:$d("set"),delete:$d("delete"),clear:$d("clear")}:{add(s){!t&&!Un(s)&&!ls(s)&&(s=dt(s));const o=dt(this);return zd(o).has.call(o,s)||(o.add(s),Ts(o,"add",s,s)),this},set(s,o){!t&&!Un(o)&&!ls(o)&&(o=dt(o));const r=dt(this),{has:a,get:l}=zd(r);let u=a.call(r,s);u?I.env.NODE_ENV!=="production"&&Ab(r,a,s):(s=dt(s),u=a.call(r,s));const c=l.call(r,s);return r.set(s,o),u?ii(o,c)&&Ts(r,"set",s,o,c):Ts(r,"add",s,o),this},delete(s){const o=dt(this),{has:r,get:a}=zd(o);let l=r.call(o,s);l?I.env.NODE_ENV!=="production"&&Ab(o,r,s):(s=dt(s),l=r.call(o,s));const u=a?a.call(o,s):void 0,c=o.delete(s);return l&&Ts(o,"delete",s,void 0,u),c},clear(){const s=dt(this),o=s.size!==0,r=I.env.NODE_ENV!=="production"?Ir(s)?new Map(s):new Set(s):void 0,a=s.clear();return o&&Ts(s,"clear",void 0,void 0,r),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=uO(s,e,t)}),n}function Ud(e,t){const n=cO(e,t);return(i,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?i:Reflect.get(Ot(n,s)&&s in i?n:i,s,o)}const dO={get:Ud(!1,!1)},hO={get:Ud(!1,!0)},fO={get:Ud(!0,!1)},pO={get:Ud(!0,!0)};function Ab(e,t,n){const i=dt(n);if(i!==n&&t.call(e,i)){const s=dg(e);bi(`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 Ib=new WeakMap,_b=new WeakMap,kb=new WeakMap,Ob=new WeakMap;function gO(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function mO(e){return e.__v_skip||!Object.isExtensible(e)?0:gO(dg(e))}function lo(e){return ls(e)?e:jd(e,!1,oO,dO,Ib)}function vO(e){return jd(e,!1,aO,hO,_b)}function Eg(e){return jd(e,!0,rO,fO,kb)}function Ps(e){return jd(e,!0,lO,pO,Ob)}function jd(e,t,n,i,s){if(!Mt(e))return I.env.NODE_ENV!=="production"&&bi(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=mO(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 Li(e){return ls(e)?Li(e.__v_raw):!!(e&&e.__v_isReactive)}function ls(e){return!!(e&&e.__v_isReadonly)}function Un(e){return!!(e&&e.__v_isShallow)}function za(e){return e?!!e.__v_raw:!1}function dt(e){const t=e&&e.__v_raw;return t?dt(t):e}function $o(e){return!Ot(e,"__v_skip")&&Object.isExtensible(e)&&Vd(e,"__v_skip",!0),e}const us=e=>Mt(e)?lo(e):e,$a=e=>Mt(e)?Eg(e):e;function Wt(e){return e?e.__v_isRef===!0:!1}function fe(e){return Mb(e,!1)}function CO(e){return Mb(e,!0)}function Mb(e,t){return Wt(e)?e:new wO(e,t)}class wO{constructor(t,n){this.dep=new Hd,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:dt(t),this._value=n?t:us(t),this.__v_isShallow=n}get value(){return I.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||Un(t)||ls(t);t=i?t:dt(t),ii(t,n)&&(this._rawValue=t,this._value=i?t:us(t),I.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function le(e){return Wt(e)?e.value:e}const yO={get:(e,t,n)=>t==="__v_raw"?e:le(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const s=e[t];return Wt(s)&&!Wt(n)?(s.value=n,!0):Reflect.set(e,t,n,i)}};function Lb(e){return Li(e)?e:new Proxy(e,yO)}class bO{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Hd,{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 SO(e){return new bO(e)}function Rg(e){I.env.NODE_ENV!=="production"&&!za(e)&&bi("toRefs() expects a reactive object but received a plain one.");const t=et(e)?new Array(e.length):{};for(const n in e)t[n]=Nb(e,n);return t}class EO{constructor(t,n,i){this._object=t,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._raw=dt(t);let s=!0,o=t;if(!et(t)||!Ld(String(n)))do s=!za(o)||Un(o);while(s&&(o=o.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=le(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Wt(this._raw[this._key])){const n=this._object[this._key];if(Wt(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return eO(this._raw,this._key)}}class RO{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 uo(e,t,n){return Wt(e)?e:rt(e)?new RO(e):Mt(e)&&arguments.length>1?Nb(e,t,n):fe(e)}function Nb(e,t,n){return new EO(e,t,n)}class DO{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Hd(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)&&Gt!==this)return Cb(this,!0),!0;I.env.NODE_ENV}get value(){const t=I.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return bb(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):I.env.NODE_ENV!=="production"&&bi("Write operation failed: computed value is readonly")}}function FO(e,t,n=!1){let i,s;rt(e)?i=e:(i=e.get,s=e.set);const o=new DO(i,s,n);return I.env.NODE_ENV,o}const Kd={},qd=new WeakMap;let Mr;function xO(e,t=!1,n=Mr){if(n){let i=qd.get(n);i||qd.set(n,i=[]),i.push(e)}else I.env.NODE_ENV!=="production"&&!t&&bi("onWatcherCleanup() was called when there was no active watcher to associate with.")}function TO(e,t,n=kt){const{immediate:i,deep:s,once:o,scheduler:r,augmentJob:a,call:l}=n,u=R=>{(n.onWarn||bi)("Invalid watch source: ",R,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=R=>s?R:Un(R)||s===!1||s===0?co(R,1):co(R);let d,h,p,g,C=!1,v=!1;if(Wt(e)?(h=()=>e.value,C=Un(e)):Li(e)?(h=()=>c(e),C=!0):et(e)?(v=!0,C=e.some(R=>Li(R)||Un(R)),h=()=>e.map(R=>{if(Wt(R))return R.value;if(Li(R))return c(R);if(rt(R))return l?l(R,2):R();I.env.NODE_ENV!=="production"&&u(R)})):rt(e)?t?h=l?()=>l(e,2):e:h=()=>{if(p){rs();try{p()}finally{as()}}const R=Mr;Mr=d;try{return l?l(e,3,[g]):e(g)}finally{Mr=R}}:(h=Rn,I.env.NODE_ENV!=="production"&&u(e)),t&&s){const R=h,x=s===!0?1/0:s;h=()=>co(R(),x)}const b=gb(),S=()=>{d.stop(),b&&b.active&&ug(b.effects,d)};if(o&&t){const R=t;t=(...x)=>{R(...x),S()}}let D=v?new Array(e.length).fill(Kd):Kd;const w=R=>{if(!(!(d.flags&1)||!d.dirty&&!R))if(t){const x=d.run();if(s||C||(v?x.some((T,H)=>ii(T,D[H])):ii(x,D))){p&&p();const T=Mr;Mr=d;try{const H=[x,D===Kd?void 0:v&&D[0]===Kd?[]:D,g];D=x,l?l(t,3,H):t(...H)}finally{Mr=T}}}else d.run()};return a&&a(w),d=new mb(h),d.scheduler=r?()=>r(w,!1):w,g=R=>xO(R,!1,d),p=d.onStop=()=>{const R=qd.get(d);if(R){if(l)l(R,4);else for(const x of R)x();qd.delete(d)}},I.env.NODE_ENV!=="production"&&(d.onTrack=n.onTrack,d.onTrigger=n.onTrigger),t?i?w(!0):D=d.run():r?r(w.bind(null,!0),!0):d.run(),S.pause=d.pause.bind(d),S.resume=d.resume.bind(d),S.stop=S,S}function co(e,t=1/0,n){if(t<=0||!Mt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Wt(e))co(e.value,t,n);else if(et(e))for(let i=0;i<e.length;i++)co(e[i],t,n);else if(Md(e)||Ir(e))e.forEach(i=>{co(i,t,n)});else if(ab(e)){for(const i in e)co(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&co(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 Lr=[];function Yd(e){Lr.push(e)}function Zd(){Lr.pop()}let Dg=!1;function Ie(e,...t){if(Dg)return;Dg=!0,rs();const n=Lr.length?Lr[Lr.length-1].component:null,i=n&&n.appContext.config.warnHandler,s=PO();if(i)Ua(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 <${Uu(n,o.type)}>`).join(`
|
|
14
|
+
`),s]);else{const o=[`[Vue warn]: ${e}`,...t];s.length&&o.push(`
|
|
15
|
+
`,...AO(s)),console.warn(...o)}as(),Dg=!1}function PO(){let e=Lr[Lr.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 AO(e){const t=[];return e.forEach((n,i)=>{t.push(...i===0?[]:[`
|
|
16
|
+
`],...IO(n))}),t}function IO({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",i=e.component?e.component.parent==null:!1,s=` at <${Uu(e.component,e.type,i)}`,o=">"+n;return e.props?[s,..._O(e.props),o]:[s+o]}function _O(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(i=>{t.push(...Vb(i,e[i]))}),n.length>3&&t.push(" ..."),t}function Vb(e,t,n){return en(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Wt(t)?(t=Vb(e,dt(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):rt(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=dt(t),n?t:[`${e}=`,t])}function kO(e,t){I.env.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?Ie(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&Ie(`${t} is NaN - the duration expression might be incorrect.`))}const Fg={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 Ua(e,t,n,i){try{return i?e(...i):e()}catch(s){Iu(s,t,n)}}function cs(e,t,n,i){if(rt(e)){const s=Ua(e,t,n,i);return s&&cg(s)&&s.catch(o=>{Iu(o,t,n)}),s}if(et(e)){const s=[];for(let o=0;o<e.length;o++)s.push(cs(e[o],t,n,i));return s}else I.env.NODE_ENV!=="production"&&Ie(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function Iu(e,t,n,i=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||kt;if(t){let a=t.parent;const l=t.proxy,u=I.env.NODE_ENV!=="production"?Fg[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){rs(),Ua(o,null,10,[e,l,u]),as();return}}OO(e,n,s,i,r)}function OO(e,t,n,i=!0,s=!1){if(I.env.NODE_ENV!=="production"){const o=Fg[t];if(n&&Yd(n),Ie(`Unhandled error${o?` during execution of ${o}`:""}`),n&&Zd(),i)throw e;console.error(e)}else{if(s)throw e;console.error(e)}}const si=[];let As=-1;const ja=[];let Uo=null,Ka=0;const Bb=Promise.resolve();let Jd=null;const MO=100;function _n(e){const t=Jd||Bb;return e?t.then(this?e.bind(this):e):t}function LO(e){let t=As+1,n=si.length;for(;t<n;){const i=t+n>>>1,s=si[i],o=_u(s);o<e||o===e&&s.flags&2?t=i+1:n=i}return t}function Qd(e){if(!(e.flags&1)){const t=_u(e),n=si[si.length-1];!n||!(e.flags&2)&&t>=_u(n)?si.push(e):si.splice(LO(t),0,e),e.flags|=1,Hb()}}function Hb(){Jd||(Jd=Bb.then(zb))}function xg(e){et(e)?ja.push(...e):Uo&&e.id===-1?Uo.splice(Ka+1,0,e):e.flags&1||(ja.push(e),e.flags|=1),Hb()}function Gb(e,t,n=As+1){for(I.env.NODE_ENV!=="production"&&(t=t||new Map);n<si.length;n++){const i=si[n];if(i&&i.flags&2){if(e&&i.id!==e.uid||I.env.NODE_ENV!=="production"&&Tg(t,i))continue;si.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Wb(e){if(ja.length){const t=[...new Set(ja)].sort((n,i)=>_u(n)-_u(i));if(ja.length=0,Uo){Uo.push(...t);return}for(Uo=t,I.env.NODE_ENV!=="production"&&(e=e||new Map),Ka=0;Ka<Uo.length;Ka++){const n=Uo[Ka];I.env.NODE_ENV!=="production"&&Tg(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}Uo=null,Ka=0}}const _u=e=>e.id==null?e.flags&2?-1:1/0:e.id;function zb(e){I.env.NODE_ENV!=="production"&&(e=e||new Map);const t=I.env.NODE_ENV!=="production"?n=>Tg(e,n):Rn;try{for(As=0;As<si.length;As++){const n=si[As];if(n&&!(n.flags&8)){if(I.env.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Ua(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;As<si.length;As++){const n=si[As];n&&(n.flags&=-2)}As=-1,si.length=0,Wb(e),Jd=null,(si.length||ja.length)&&zb(e)}}function Tg(e,t){const n=e.get(t)||0;if(n>MO){const i=t.i,s=i&&Xg(i.type);return Iu(`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 Is=!1;const Xd=new Map;I.env.NODE_ENV!=="production"&&(Du().__VUE_HMR_RUNTIME__={createRecord:Pg($b),rerender:Pg(BO),reload:Pg(HO)});const Nr=new Map;function NO(e){const t=e.type.__hmrId;let n=Nr.get(t);n||($b(t,e.type),n=Nr.get(t)),n.instances.add(e)}function VO(e){Nr.get(e.type.__hmrId).instances.delete(e)}function $b(e,t){return Nr.has(e)?!1:(Nr.set(e,{initialDef:eh(t),instances:new Set}),!0)}function eh(e){return KS(e)?e.__vccOpts:e}function BO(e,t){const n=Nr.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(i=>{t&&(i.render=t,eh(i.type).render=t),i.renderCache=[],Is=!0,i.job.flags&8||i.update(),Is=!1}))}function HO(e,t){const n=Nr.get(e);if(!n)return;t=eh(t),Ub(n.initialDef,t);const i=[...n.instances];for(let s=0;s<i.length;s++){const o=i[s],r=eh(o.type);let a=Xd.get(r);a||(r!==n.initialDef&&Ub(r,t),Xd.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?Qd(()=>{o.job.flags&8||(Is=!0,o.parent.update(),Is=!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)}xg(()=>{Xd.clear()})}function Ub(e,t){Xt(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Pg(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 ds,ku=[],Ag=!1;function Ou(e,...t){ds?ds.emit(e,...t):Ag||ku.push({event:e,args:t})}function Ig(e,t){var n,i;ds=e,ds?(ds.enabled=!0,ku.forEach(({event:s,args:o})=>ds.emit(s,...o)),ku=[]):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=>{Ig(o,t)}),setTimeout(()=>{ds||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ag=!0,ku=[])},3e3)):(Ag=!0,ku=[])}function GO(e,t){Ou("app:init",e,t,{Fragment:Ft,Text:Qa,Comment:ri,Static:Hu})}function WO(e){Ou("app:unmount",e)}const zO=_g("component:added"),jb=_g("component:updated"),$O=_g("component:removed"),UO=e=>{ds&&typeof ds.cleanupBuffer=="function"&&!ds.cleanupBuffer(e)&&$O(e)};function _g(e){return t=>{Ou(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const jO=Kb("perf:start"),KO=Kb("perf:end");function Kb(e){return(t,n,i)=>{Ou(e,t.appContext.app,t.uid,t,n,i)}}function qO(e,t,n){Ou("component:emit",e.appContext.app,e,t,n)}let Fn=null,qb=null;function th(e){const t=Fn;return Fn=e,qb=e&&e.type.__scopeId||null,t}function ke(e,t=Fn,n){if(!t||e._n)return e;const i=(...s)=>{i._d&&LS(-1);const o=th(t);let r;try{r=e(...s)}finally{th(o),i._d&&LS(1)}return I.env.NODE_ENV!=="production"&&jb(t),r};return i._n=!0,i._c=!0,i._d=!0,i}function Yb(e){Ok(e)&&Ie("Do not use built-in directive ids as custom directive id: "+e)}function ut(e,t){if(Fn===null)return I.env.NODE_ENV!=="production"&&Ie("withDirectives can only be used inside render functions."),e;const n=vh(Fn),i=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[o,r,a,l=kt]=t[s];o&&(rt(o)&&(o={mounted:o,updated:o}),o.deep&&co(r),i.push({dir:o,instance:n,value:r,oldValue:void 0,arg:a,modifiers:l}))}return e}function Vr(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&&(rs(),cs(l,n,8,[e.el,a,e,t]),as())}}const YO=Symbol("_vte"),ZO=e=>e.__isTeleport,Br=Symbol("_leaveCb"),nh=Symbol("_enterCb");function JO(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Si(()=>{e.isMounted=!0}),hs(()=>{e.isUnmounting=!0}),e}const Ni=[Function,Array],QO={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ni,onEnter:Ni,onAfterEnter:Ni,onEnterCancelled:Ni,onBeforeLeave:Ni,onLeave:Ni,onAfterLeave:Ni,onLeaveCancelled:Ni,onBeforeAppear:Ni,onAppear:Ni,onAfterAppear:Ni,onAppearCancelled:Ni};function XO(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 kg(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:b,onAfterAppear:S,onAppearCancelled:D}=t,w=String(e.key),R=XO(n,e),x=(N,A)=>{N&&cs(N,i,9,A)},T=(N,A)=>{const _=A[1];x(N,A),et(N)?N.every(V=>V.length<=1)&&_():N.length<=1&&_()},H={mode:r,persisted:a,beforeEnter(N){let A=l;if(!n.isMounted)if(o)A=v||l;else return;N[Br]&&N[Br](!0);const _=R[w];_&&el(e,_)&&_.el[Br]&&_.el[Br](),x(A,[N])},enter(N){let A=u,_=c,V=d;if(!n.isMounted)if(o)A=b||u,_=S||c,V=D||d;else return;let ie=!1;const me=N[nh]=Te=>{ie||(ie=!0,Te?x(V,[N]):x(_,[N]),H.delayedLeave&&H.delayedLeave(),N[nh]=void 0)};A?T(A,[N,me]):me()},leave(N,A){const _=String(e.key);if(N[nh]&&N[nh](!0),n.isUnmounting)return A();x(h,[N]);let V=!1;const ie=N[Br]=me=>{V||(V=!0,A(),me?x(C,[N]):x(g,[N]),N[Br]=void 0,R[_]===e&&delete R[_])};R[_]=e,p?T(p,[N,ie]):ie()},clone(N){return kg(N,t,n,i)}};return H}function Mu(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Mu(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 Zb(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===Ft?(r.patchFlag&128&&s++,i=i.concat(Zb(r.children,t,a))):(t||r.type!==ri)&&i.push(a!=null?po(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 rt(e)?Xt({name:e.name},t,{setup:e}):e}function Jb(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Qb=new WeakSet,ih=new WeakMap;function Lu(e,t,n,i,s=!1){if(et(e)){e.forEach((C,v)=>Lu(C,t&&(et(t)?t[v]:t),n,i,s));return}if(qa(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Lu(e,t,n,i.component.subTree);return}const o=i.shapeFlag&4?vh(i.component):i.el,r=s?null:o,{i:a,r:l}=e;if(I.env.NODE_ENV!=="production"&&!a){Ie("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===kt?a.refs={}:a.refs,d=a.setupState,h=dt(d),p=d===kt?sb:C=>I.env.NODE_ENV!=="production"&&(Ot(h,C)&&!Wt(h[C])&&Ie(`Template ref "${C}" used on a non-ref value. It will not work in the production build.`),Qb.has(h[C]))?!1:Ot(h,C),g=C=>I.env.NODE_ENV==="production"||!Qb.has(C);if(u!=null&&u!==l){if(Xb(t),en(u))c[u]=null,p(u)&&(d[u]=null);else if(Wt(u)){g(u)&&(u.value=null);const C=t;C.k&&(c[C.k]=null)}}if(rt(l))Ua(l,a,12,[r,c]);else{const C=en(l),v=Wt(l);if(C||v){const b=()=>{if(e.f){const S=C?p(l)?d[l]:c[l]:g(l)||!e.k?l.value:c[e.k];if(s)et(S)&&ug(S,o);else if(et(S))S.includes(o)||S.push(o);else if(C)c[l]=[o],p(l)&&(d[l]=c[l]);else{const D=[o];g(l)&&(l.value=D),e.k&&(c[e.k]=D)}}else C?(c[l]=r,p(l)&&(d[l]=r)):v?(g(l)&&(l.value=r),e.k&&(c[e.k]=r)):I.env.NODE_ENV!=="production"&&Ie("Invalid template ref type:",l,`(${typeof l})`)};if(r){const S=()=>{b(),ih.delete(e)};S.id=-1,ih.set(e,S),Ri(S,n)}else Xb(e),b()}else I.env.NODE_ENV!=="production"&&Ie("Invalid template ref type:",l,`(${typeof l})`)}}function Xb(e){const t=ih.get(e);t&&(t.flags|=8,ih.delete(e))}Du().requestIdleCallback,Du().cancelIdleCallback;const qa=e=>!!e.type.__asyncLoader,Og=e=>e.type.__isKeepAlive;function eM(e,t){eS(e,"a",t)}function tM(e,t){eS(e,"da",t)}function eS(e,t,n=xn){const i=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(sh(t,i,n),n){let s=n.parent;for(;s&&s.parent;)Og(s.parent.vnode)&&nM(i,t,n,s),s=s.parent}}function nM(e,t,n,i){const s=sh(t,e,i,!0);Ya(()=>{ug(i[t],s)},n)}function sh(e,t,n=xn,i=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{rs();const a=zu(n),l=cs(t,n,e,r);return a(),as(),l});return i?s.unshift(o):s.push(o),o}else if(I.env.NODE_ENV!=="production"){const s=kr(Fg[e].replace(/ hook$/,""));Ie(`${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 ho=e=>(t,n=xn)=>{(!$u||e==="sp")&&sh(e,(...i)=>t(...i),n)},Mg=ho("bm"),Si=ho("m"),tS=ho("bu"),nS=ho("u"),hs=ho("bum"),Ya=ho("um"),iM=ho("sp"),sM=ho("rtg"),oM=ho("rtc");function rM(e,t=xn){sh("ec",e,t)}const oh="components",aM="directives";function rh(e,t){return Lg(oh,e,!0,t)||e}const iS=Symbol.for("v-ndc");function lM(e){return en(e)?Lg(oh,e,!1)||e:e||iS}function Nu(e){return Lg(aM,e)}function Lg(e,t,n=!0,i=!1){const s=Fn||xn;if(s){const o=s.type;if(e===oh){const a=Xg(o,!1);if(a&&(a===t||a===zn(t)||a===_r(zn(t))))return o}const r=sS(s[e]||o[e],t)||sS(s.appContext[e],t);if(!r&&i)return o;if(I.env.NODE_ENV!=="production"&&n&&!r){const a=e===oh?`
|
|
17
|
+
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`:"";Ie(`Failed to resolve ${e.slice(0,-1)}: ${t}${a}`)}return r}else I.env.NODE_ENV!=="production"&&Ie(`resolve${_r(e.slice(0,-1))} can only be used in render() or setup().`)}function sS(e,t){return e&&(e[t]||e[zn(t)]||e[_r(zn(t))])}function An(e,t,n,i){let s;const o=n,r=et(e);if(r||en(e)){const a=r&&Li(e);let l=!1,u=!1;a&&(l=!Un(e),u=ls(e),e=Wd(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?$a(us(e[c])):us(e[c]):e[c],c,void 0,o)}else if(typeof e=="number"){I.env.NODE_ENV!=="production"&&!Number.isInteger(e)&&Ie(`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(Mt(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 oS(e,t){for(let n=0;n<t.length;n++){const i=t[n];if(et(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 Rt(e,t,n={},i,s){if(Fn.ce||Fn.parent&&qa(Fn.parent)&&Fn.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),X(),tt(Ft,null,[Ee("slot",n,i&&i())],u?-2:64)}let o=e[t];I.env.NODE_ENV!=="production"&&o&&o.length>1&&(Ie("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),X();const r=o&&rS(o(n)),a=n.key||r&&r.key,l=tt(Ft,{key:(a&&!ss(a)?a:`_${t}`)+(!r&&i?"_fb":"")},r||(i?i():[]),r&&e._===1?64:-2);return!s&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function rS(e){return e.some(t=>Wu(t)?!(t.type===ri||t.type===Ft&&!rS(t.children)):!0)?e:null}const Ng=e=>e?WS(e)?vh(e):Ng(e.parent):null,Hr=Xt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>I.env.NODE_ENV!=="production"?Ps(e.props):e.props,$attrs:e=>I.env.NODE_ENV!=="production"?Ps(e.attrs):e.attrs,$slots:e=>I.env.NODE_ENV!=="production"?Ps(e.slots):e.slots,$refs:e=>I.env.NODE_ENV!=="production"?Ps(e.refs):e.refs,$parent:e=>Ng(e.parent),$root:e=>Ng(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>dS(e),$forceUpdate:e=>e.f||(e.f=()=>{Qd(e.update)}),$nextTick:e=>e.n||(e.n=_n.bind(e.proxy)),$watch:e=>DM.bind(e)}),Vg=e=>e==="_"||e==="$",Bg=(e,t)=>e!==kt&&!e.__isScriptSetup&&Ot(e,t),aS={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(I.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(Bg(i,t))return r[t]=1,i[t];if(s!==kt&&Ot(s,t))return r[t]=2,s[t];if(Ot(o,t))return r[t]=3,o[t];if(n!==kt&&Ot(n,t))return r[t]=4,n[t];Hg&&(r[t]=0)}}const u=Hr[t];let c,d;if(u)return t==="$attrs"?(Pn(e.attrs,"get",""),I.env.NODE_ENV!=="production"&&hh()):I.env.NODE_ENV!=="production"&&t==="$slots"&&Pn(e,"get",t),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(n!==kt&&Ot(n,t))return r[t]=4,n[t];if(d=l.config.globalProperties,Ot(d,t))return d[t];I.env.NODE_ENV!=="production"&&Fn&&(!en(t)||t.indexOf("__v")!==0)&&(s!==kt&&Vg(t[0])&&Ot(s,t)?Ie(`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===Fn&&Ie(`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 Bg(s,t)?(s[t]=n,!0):I.env.NODE_ENV!=="production"&&s.__isScriptSetup&&Ot(s,t)?(Ie(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):i!==kt&&Ot(i,t)?(i[t]=n,!0):Ot(e.props,t)?(I.env.NODE_ENV!=="production"&&Ie(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(I.env.NODE_ENV!=="production"&&Ie(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(I.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!==kt&&a[0]!=="$"&&Ot(e,a)||Bg(t,a)||Ot(o,a)||Ot(i,a)||Ot(Hr,a)||Ot(s.config.globalProperties,a)||(l=r.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ot(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};I.env.NODE_ENV!=="production"&&(aS.ownKeys=e=>(Ie("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 uM(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(Hr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>Hr[n](e),set:Rn})}),t}function cM(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:Rn})})}function dM(e){const{ctx:t,setupState:n}=e;Object.keys(dt(n)).forEach(i=>{if(!n.__isScriptSetup){if(Vg(i[0])){Ie(`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:Rn})}})}function ah(){return hM("useSlots").slots}function hM(e){const t=Vi();return I.env.NODE_ENV!=="production"&&!t&&Ie(`${e}() called without active instance.`),t.setupContext||(t.setupContext=jS(t))}function lh(e){return et(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function lS(e,t){return!e||!t?e||t:et(e)&&et(t)?e.concat(t):Xt({},lh(e),lh(t))}function fM(){const e=Object.create(null);return(t,n)=>{e[n]?Ie(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let Hg=!0;function pM(e){const t=dS(e),n=e.proxy,i=e.ctx;Hg=!1,t.beforeCreate&&uS(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:b,beforeUnmount:S,destroyed:D,unmounted:w,render:R,renderTracked:x,renderTriggered:T,errorCaptured:H,serverPrefetch:N,expose:A,inheritAttrs:_,components:V,directives:ie,filters:me}=t,Te=I.env.NODE_ENV!=="production"?fM():null;if(I.env.NODE_ENV!=="production"){const[z]=e.propsOptions;if(z)for(const M in z)Te("Props",M)}if(u&&gM(u,i,Te),r)for(const z in r){const M=r[z];rt(M)?(I.env.NODE_ENV!=="production"?Object.defineProperty(i,z,{value:M.bind(n),configurable:!0,enumerable:!0,writable:!0}):i[z]=M.bind(n),I.env.NODE_ENV!=="production"&&Te("Methods",z)):I.env.NODE_ENV!=="production"&&Ie(`Method "${z}" has type "${typeof M}" in the component definition. Did you reference the function correctly?`)}if(s){I.env.NODE_ENV!=="production"&&!rt(s)&&Ie("The data option must be a function. Plain object usage is no longer supported.");const z=s.call(n,n);if(I.env.NODE_ENV!=="production"&&cg(z)&&Ie("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Mt(z))I.env.NODE_ENV!=="production"&&Ie("data() should return an object.");else if(e.data=lo(z),I.env.NODE_ENV!=="production")for(const M in z)Te("Data",M),Vg(M[0])||Object.defineProperty(i,M,{configurable:!0,enumerable:!0,get:()=>z[M],set:Rn})}if(Hg=!0,o)for(const z in o){const M=o[z],L=rt(M)?M.bind(n,n):rt(M.get)?M.get.bind(n,n):Rn;I.env.NODE_ENV!=="production"&&L===Rn&&Ie(`Computed property "${z}" has no getter.`);const ne=!rt(M)&&rt(M.set)?M.set.bind(n):I.env.NODE_ENV!=="production"?()=>{Ie(`Write operation failed: computed property "${z}" is readonly.`)}:Rn,we=W({get:L,set:ne});Object.defineProperty(i,z,{enumerable:!0,configurable:!0,get:()=>we.value,set:Ae=>we.value=Ae}),I.env.NODE_ENV!=="production"&&Te("Computed",z)}if(a)for(const z in a)cS(a[z],i,n,z);if(l){const z=rt(l)?l.call(n):l;Reflect.ownKeys(z).forEach(M=>{Wr(M,z[M])})}c&&uS(c,e,"c");function q(z,M){et(M)?M.forEach(L=>z(L.bind(n))):M&&z(M.bind(n))}if(q(Mg,d),q(Si,h),q(tS,p),q(nS,g),q(eM,C),q(tM,v),q(rM,H),q(oM,x),q(sM,T),q(hs,S),q(Ya,w),q(iM,N),et(A))if(A.length){const z=e.exposed||(e.exposed={});A.forEach(M=>{Object.defineProperty(z,M,{get:()=>n[M],set:L=>n[M]=L,enumerable:!0})})}else e.exposed||(e.exposed={});R&&e.render===Rn&&(e.render=R),_!=null&&(e.inheritAttrs=_),V&&(e.components=V),ie&&(e.directives=ie),N&&Jb(e)}function gM(e,t,n=Rn){et(e)&&(e=Gg(e));for(const i in e){const s=e[i];let o;Mt(s)?"default"in s?o=Ei(s.from||i,s.default,!0):o=Ei(s.from||i):o=Ei(s),Wt(o)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[i]=o,I.env.NODE_ENV!=="production"&&n("Inject",i)}}function uS(e,t,n){cs(et(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function cS(e,t,n,i){let s=i.includes(".")?gS(n,i):()=>n[i];if(en(e)){const o=t[e];rt(o)?Dt(s,o):I.env.NODE_ENV!=="production"&&Ie(`Invalid watch handler specified by key "${e}"`,o)}else if(rt(e))Dt(s,e.bind(n));else if(Mt(e))if(et(e))e.forEach(o=>cS(o,t,n,i));else{const o=rt(e.handler)?e.handler.bind(n):t[e.handler];rt(o)?Dt(s,o,e):I.env.NODE_ENV!=="production"&&Ie(`Invalid watch handler specified by key "${e.handler}"`,o)}else I.env.NODE_ENV!=="production"&&Ie(`Invalid watch option: "${i}"`,e)}function dS(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=>uh(l,u,r,!0)),uh(l,t,r)),Mt(t)&&o.set(t,l),l}function uh(e,t,n,i=!1){const{mixins:s,extends:o}=t;o&&uh(e,o,n,!0),s&&s.forEach(r=>uh(e,r,n,!0));for(const r in t)if(i&&r==="expose")I.env.NODE_ENV!=="production"&&Ie('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=mM[r]||n&&n[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const mM={data:hS,props:fS,emits:fS,methods:Vu,computed:Vu,beforeCreate:oi,created:oi,beforeMount:oi,mounted:oi,beforeUpdate:oi,updated:oi,beforeDestroy:oi,beforeUnmount:oi,destroyed:oi,unmounted:oi,activated:oi,deactivated:oi,errorCaptured:oi,serverPrefetch:oi,components:Vu,directives:Vu,watch:CM,provide:hS,inject:vM};function hS(e,t){return t?e?function(){return Xt(rt(e)?e.call(this,this):e,rt(t)?t.call(this,this):t)}:t:e}function vM(e,t){return Vu(Gg(e),Gg(t))}function Gg(e){if(et(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function oi(e,t){return e?[...new Set([].concat(e,t))]:t}function Vu(e,t){return e?Xt(Object.create(null),e,t):t}function fS(e,t){return e?et(e)&&et(t)?[...new Set([...e,...t])]:Xt(Object.create(null),lh(e),lh(t??{})):t}function CM(e,t){if(!e)return t;if(!t)return e;const n=Xt(Object.create(null),e);for(const i in t)n[i]=oi(e[i],t[i]);return n}function pS(){return{app:null,config:{isNativeTag:sb,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 yM(e,t){return function(i,s=null){rt(i)||(i=Xt({},i)),s!=null&&!Mt(s)&&(I.env.NODE_ENV!=="production"&&Ie("root props passed to app.mount() must be an object."),s=null);const o=pS(),r=new WeakSet,a=[];let l=!1;const u=o.app={_uid:wM++,_component:i,_props:s,_container:null,_context:o,_instance:null,version:YS,get config(){return o.config},set config(c){I.env.NODE_ENV!=="production"&&Ie("app.config cannot be replaced. Modify individual options instead.")},use(c,...d){return r.has(c)?I.env.NODE_ENV!=="production"&&Ie("Plugin has already been applied to target app."):c&&rt(c.install)?(r.add(c),c.install(u,...d)):rt(c)?(r.add(c),c(u,...d)):I.env.NODE_ENV!=="production"&&Ie('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return o.mixins.includes(c)?I.env.NODE_ENV!=="production"&&Ie("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):o.mixins.push(c),u},component(c,d){return I.env.NODE_ENV!=="production"&&Qg(c,o.config),d?(I.env.NODE_ENV!=="production"&&o.components[c]&&Ie(`Component "${c}" has already been registered in target app.`),o.components[c]=d,u):o.components[c]},directive(c,d){return I.env.NODE_ENV!=="production"&&Yb(c),d?(I.env.NODE_ENV!=="production"&&o.directives[c]&&Ie(`Directive "${c}" has already been registered in target app.`),o.directives[c]=d,u):o.directives[c]},mount(c,d,h){if(l)I.env.NODE_ENV!=="production"&&Ie("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{I.env.NODE_ENV!=="production"&&c.__vue_app__&&Ie("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||Ee(i,s);return p.appContext=o,h===!0?h="svg":h===!1&&(h=void 0),I.env.NODE_ENV!=="production"&&(o.reload=()=>{const g=po(p);g.el=null,e(g,c,h)}),e(p,c,h),l=!0,u._container=c,c.__vue_app__=u,I.env.NODE_ENV!=="production"&&(u._instance=p.component,GO(u,YS)),vh(p.component)}},onUnmount(c){I.env.NODE_ENV!=="production"&&typeof c!="function"&&Ie(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(cs(a,u._instance,16),e(null,u._container),I.env.NODE_ENV!=="production"&&(u._instance=null,WO(u)),delete u._container.__vue_app__):I.env.NODE_ENV!=="production"&&Ie("Cannot unmount an app that is not mounted.")},provide(c,d){return I.env.NODE_ENV!=="production"&&c in o.provides&&(Ot(o.provides,c)?Ie(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`):Ie(`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=Gr;Gr=u;try{return c()}finally{Gr=d}}};return u}}let Gr=null;function Wr(e,t){if(I.env.NODE_ENV!=="production"&&(!xn||xn.isMounted)&&Ie("provide() can only be used inside setup()."),xn){let n=xn.provides;const i=xn.parent&&xn.parent.provides;i===n&&(n=xn.provides=Object.create(i)),n[e]=t}}function Ei(e,t,n=!1){const i=Vi();if(i||Gr){let s=Gr?Gr._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&&rt(t)?t.call(i&&i.proxy):t;I.env.NODE_ENV!=="production"&&Ie(`injection "${String(e)}" not found.`)}else I.env.NODE_ENV!=="production"&&Ie("inject() can only be used inside setup() or functional components.")}function Wg(){return!!(Vi()||Gr)}const bM=Symbol.for("v-scx"),SM=()=>{{const e=Ei(bM);return e||I.env.NODE_ENV!=="production"&&Ie("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function EM(e,t){return ch(e,null,t)}function RM(e,t){return ch(e,null,I.env.NODE_ENV!=="production"?Xt({},t,{flush:"sync"}):{flush:"sync"})}function Dt(e,t,n){return I.env.NODE_ENV!=="production"&&!rt(t)&&Ie("`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."),ch(e,t,n)}function ch(e,t,n=kt){const{immediate:i,deep:s,flush:o,once:r}=n;I.env.NODE_ENV!=="production"&&!t&&(i!==void 0&&Ie('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&Ie('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&Ie('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Xt({},n);I.env.NODE_ENV!=="production"&&(a.onWarn=Ie);const l=t&&i||!t&&o!=="post";let u;if($u){if(o==="sync"){const p=SM();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=Rn,p.resume=Rn,p.pause=Rn,p}}const c=xn;a.call=(p,g,C)=>cs(p,c,g,C);let d=!1;o==="post"?a.scheduler=p=>{Ri(p,c&&c.suspense)}:o!=="sync"&&(d=!0,a.scheduler=(p,g)=>{g?p():Qd(p)}),a.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const h=TO(e,t,a);return $u&&(u?u.push(h):l&&h()),h}function DM(e,t,n){const i=this.proxy,s=en(e)?e.includes(".")?gS(i,e):()=>i[e]:e.bind(i,i);let o;rt(t)?o=t:(o=t.handler,n=t);const r=zu(this),a=ch(s,o.bind(i),n);return r(),a}function gS(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 FM(e,t,n=kt){const i=Vi();if(I.env.NODE_ENV!=="production"&&!i)return Ie("useModel() called without active instance."),fe();const s=zn(t);if(I.env.NODE_ENV!=="production"&&!i.propsOptions[0][s])return Ie(`useModel() called with prop "${t}" which is not declared.`),fe();const o=xs(t),r=mS(e,s),a=SO((l,u)=>{let c,d=kt,h;return RM(()=>{const p=e[s];ii(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(!ii(g,c)&&!(d!==kt&&ii(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),ii(p,g)&&ii(p,d)&&!ii(g,h)&&u(),d=p,h=g}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?r||kt:a,done:!1}:{done:!0}}}},a}const mS=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${zn(t)}Modifiers`]||e[`${xs(t)}Modifiers`];function xM(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||kt;if(I.env.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(kr(zn(t))in d))&&Ie(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${kr(zn(t))}" prop.`);else{const h=c[t];rt(h)&&(h(...n)||Ie(`Invalid event arguments: event validation failed for event "${t}".`))}}let s=n;const o=t.startsWith("update:"),r=o&&mS(i,t.slice(7));if(r&&(r.trim&&(s=n.map(c=>en(c)?c.trim():c)),r.number&&(s=n.map(hg))),I.env.NODE_ENV!=="production"&&qO(e,t,s),I.env.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&i[kr(c)]&&Ie(`Event "${c}" is emitted in component ${Uu(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=kr(t)]||i[a=kr(zn(t))];!l&&o&&(l=i[a=kr(xs(t))]),l&&cs(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,cs(u,e,6,s)}}const TM=new WeakMap;function vS(e,t,n=!1){const i=n?TM:t.emitsCache,s=i.get(e);if(s!==void 0)return s;const o=e.emits;let r={},a=!1;if(!rt(e)){const l=u=>{const c=vS(u,t,!0);c&&(a=!0,Xt(r,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(Mt(e)&&i.set(e,null),null):(et(o)?o.forEach(l=>r[l]=null):Xt(r,o),Mt(e)&&i.set(e,r),r)}function dh(e,t){return!e||!Su(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ot(e,t[0].toLowerCase()+t.slice(1))||Ot(e,xs(t))||Ot(e,t))}let zg=!1;function hh(){zg=!0}function CS(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=th(e);let b,S;I.env.NODE_ENV!=="production"&&(zg=!1);try{if(n.shapeFlag&4){const R=s||i,x=I.env.NODE_ENV!=="production"&&p.__isScriptSetup?new Proxy(R,{get(T,H,N){return Ie(`Property '${String(H)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(T,H,N)}}):R;b=fs(u.call(x,R,c,I.env.NODE_ENV!=="production"?Ps(d):d,p,h,g)),S=a}else{const R=t;I.env.NODE_ENV!=="production"&&a===d&&hh(),b=fs(R.length>1?R(I.env.NODE_ENV!=="production"?Ps(d):d,I.env.NODE_ENV!=="production"?{get attrs(){return hh(),Ps(a)},slots:r,emit:l}:{attrs:a,slots:r,emit:l}):R(I.env.NODE_ENV!=="production"?Ps(d):d,null)),S=t.props?a:PM(a)}}catch(R){Gu.length=0,Iu(R,e,1),b=Ee(ri)}let D=b,w;if(I.env.NODE_ENV!=="production"&&b.patchFlag>0&&b.patchFlag&2048&&([D,w]=wS(b)),S&&C!==!1){const R=Object.keys(S),{shapeFlag:x}=D;if(R.length){if(x&7)o&&R.some(Od)&&(S=AM(S,o)),D=po(D,S,!1,!0);else if(I.env.NODE_ENV!=="production"&&!zg&&D.type!==ri){const T=Object.keys(a),H=[],N=[];for(let A=0,_=T.length;A<_;A++){const V=T[A];Su(V)?Od(V)||H.push(V[2].toLowerCase()+V.slice(3)):N.push(V)}N.length&&Ie(`Extraneous non-props attributes (${N.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`),H.length&&Ie(`Extraneous non-emits event listeners (${H.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&&(I.env.NODE_ENV!=="production"&&!yS(D)&&Ie("Runtime directive used on component with non-element root node. The directives will not function as intended."),D=po(D,null,!1,!0),D.dirs=D.dirs?D.dirs.concat(n.dirs):n.dirs),n.transition&&(I.env.NODE_ENV!=="production"&&!yS(D)&&Ie("Component inside <Transition> renders non-element root node that cannot be animated."),Mu(D,n.transition)),I.env.NODE_ENV!=="production"&&w?w(D):b=D,th(v),b}const wS=e=>{const t=e.children,n=e.dynamicChildren,i=$g(t,!1);if(i){if(I.env.NODE_ENV!=="production"&&i.patchFlag>0&&i.patchFlag&2048)return wS(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[fs(i),r]};function $g(e,t=!0){let n;for(let i=0;i<e.length;i++){const s=e[i];if(Wu(s)){if(s.type!==ri||s.children==="v-if"){if(n)return;if(n=s,I.env.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return $g(n.children)}}else return}return n}const PM=e=>{let t;for(const n in e)(n==="class"||n==="style"||Su(n))&&((t||(t={}))[n]=e[n]);return t},AM=(e,t)=>{const n={};for(const i in e)(!Od(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n},yS=e=>e.shapeFlag&7||e.type===ri;function IM(e,t,n){const{props:i,children:s,component:o}=e,{props:r,children:a,patchFlag:l}=t,u=o.emitsOptions;if(I.env.NODE_ENV!=="production"&&(s||a)&&Is||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]&&!dh(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]&&!dh(n,o))return!0}return!1}function _M({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 SS={},ES=()=>Object.create(SS),RS=e=>Object.getPrototypeOf(e)===SS;function kM(e,t,n,i=!1){const s={},o=ES();e.propsDefaults=Object.create(null),DS(e,t,s,o);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);I.env.NODE_ENV!=="production"&&TS(t||{},s,e),n?e.props=i?s:vO(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function OM(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function MM(e,t,n,i){const{props:s,attrs:o,vnode:{patchFlag:r}}=e,a=dt(s),[l]=e.propsOptions;let u=!1;if(!(I.env.NODE_ENV!=="production"&&OM(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(dh(e.emitsOptions,h))continue;const p=t[h];if(l)if(Ot(o,h))p!==o[h]&&(o[h]=p,u=!0);else{const g=zn(h);s[g]=Ug(l,a,g,p,e,!1)}else p!==o[h]&&(o[h]=p,u=!0)}}}else{DS(e,t,s,o)&&(u=!0);let c;for(const d in a)(!t||!Ot(t,d)&&((c=xs(d))===d||!Ot(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=Ug(l,a,d,void 0,e,!0)):delete s[d]);if(o!==a)for(const d in o)(!t||!Ot(t,d))&&(delete o[d],u=!0)}u&&Ts(e.attrs,"set",""),I.env.NODE_ENV!=="production"&&TS(t||{},s,e)}function DS(e,t,n,i){const[s,o]=e.propsOptions;let r=!1,a;if(t)for(let l in t){if(Ru(l))continue;const u=t[l];let c;s&&Ot(s,c=zn(l))?!o||!o.includes(c)?n[c]=u:(a||(a={}))[c]=u:dh(e.emitsOptions,l)||(!(l in i)||u!==i[l])&&(i[l]=u,r=!0)}if(o){const l=dt(n),u=a||kt;for(let c=0;c<o.length;c++){const d=o[c];n[d]=Ug(s,l,d,u[d],e,!Ot(u,d))}}return r}function Ug(e,t,n,i,s,o){const r=e[n];if(r!=null){const a=Ot(r,"default");if(a&&i===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&rt(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 LM=new WeakMap;function FS(e,t,n=!1){const i=n?LM:t.propsCache,s=i.get(e);if(s)return s;const o=e.props,r={},a=[];let l=!1;if(!rt(e)){const c=d=>{l=!0;const[h,p]=FS(d,t,!0);Xt(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 Mt(e)&&i.set(e,Ha),Ha;if(et(o))for(let c=0;c<o.length;c++){I.env.NODE_ENV!=="production"&&!en(o[c])&&Ie("props must be strings when using array syntax.",o[c]);const d=zn(o[c]);xS(d)&&(r[d]=kt)}else if(o){I.env.NODE_ENV!=="production"&&!Mt(o)&&Ie("invalid props options",o);for(const c in o){const d=zn(c);if(xS(d)){const h=o[c],p=r[d]=et(h)||rt(h)?{type:h}:Xt({},h),g=p.type;let C=!1,v=!0;if(et(g))for(let b=0;b<g.length;++b){const S=g[b],D=rt(S)&&S.name;if(D==="Boolean"){C=!0;break}else D==="String"&&(v=!1)}else C=rt(g)&&g.name==="Boolean";p[0]=C,p[1]=v,(C||Ot(p,"default"))&&a.push(d)}}}const u=[r,a];return Mt(e)&&i.set(e,u),u}function xS(e){return e[0]!=="$"&&!Ru(e)?!0:(I.env.NODE_ENV!=="production"&&Ie(`Invalid prop name: "${e}" is a reserved property.`),!1)}function NM(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function TS(e,t,n){const i=dt(t),s=n.propsOptions[0],o=Object.keys(e).map(r=>zn(r));for(const r in s){let a=s[r];a!=null&&VM(r,i[r],a,I.env.NODE_ENV!=="production"?Ps(i):i,!o.includes(r))}}function VM(e,t,n,i,s){const{type:o,required:r,validator:a,skipCheck:l}=n;if(r&&s){Ie('Missing required prop: "'+e+'"');return}if(!(t==null&&!r)){if(o!=null&&o!==!0&&!l){let u=!1;const c=et(o)?o:[o],d=[];for(let h=0;h<c.length&&!u;h++){const{valid:p,expectedType:g}=HM(t,c[h]);d.push(g||""),u=p}if(!u){Ie(GM(e,t,d));return}}a&&!a(t,i)&&Ie('Invalid prop: custom validator check failed for prop "'+e+'".')}}const BM=fi("String,Number,Boolean,Function,Symbol,BigInt");function HM(e,t){let n;const i=NM(t);if(i==="null")n=e===null;else if(BM(i)){const s=typeof e;n=s===i.toLowerCase(),!n&&s==="object"&&(n=e instanceof t)}else i==="Object"?n=Mt(e):i==="Array"?n=et(e):n=e instanceof t;return{valid:n,expectedType:i}}function GM(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(_r).join(" | ")}`;const s=n[0],o=dg(t),r=PS(t,s),a=PS(t,o);return n.length===1&&AS(s)&&!WM(s,o)&&(i+=` with value ${r}`),i+=`, got ${o} `,AS(o)&&(i+=`with value ${a}.`),i}function PS(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function AS(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function WM(...e){return e.some(t=>t.toLowerCase()==="boolean")}const jg=e=>e==="_"||e==="_ctx"||e==="$stable",Kg=e=>et(e)?e.map(fs):[fs(e)],zM=(e,t,n)=>{if(t._n)return t;const i=ke((...s)=>(I.env.NODE_ENV!=="production"&&xn&&!(n===null&&Fn)&&!(n&&n.root!==xn.root)&&Ie(`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.`),Kg(t(...s))),n);return i._c=!1,i},IS=(e,t,n)=>{const i=e._ctx;for(const s in e){if(jg(s))continue;const o=e[s];if(rt(o))t[s]=zM(s,o,i);else if(o!=null){I.env.NODE_ENV!=="production"&&Ie(`Non-function value encountered for slot "${s}". Prefer function slots for better performance.`);const r=Kg(o);t[s]=()=>r}}},_S=(e,t)=>{I.env.NODE_ENV!=="production"&&!Og(e.vnode)&&Ie("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Kg(t);e.slots.default=()=>n},qg=(e,t,n)=>{for(const i in t)(n||!jg(i))&&(e[i]=t[i])},$M=(e,t,n)=>{const i=e.slots=ES();if(e.vnode.shapeFlag&32){const s=t._;s?(qg(i,t,n),n&&Vd(i,"_",s,!0)):IS(t,i)}else t&&_S(e,t)},UM=(e,t,n)=>{const{vnode:i,slots:s}=e;let o=!0,r=kt;if(i.shapeFlag&32){const a=t._;a?I.env.NODE_ENV!=="production"&&Is?(qg(s,t,n),Ts(e,"set","$slots")):n&&a===1?o=!1:qg(s,t,n):(o=!t.$stable,IS(t,s)),r=t}else t&&(_S(e,t),r={default:1});if(o)for(const a in s)!jg(a)&&r[a]==null&&delete s[a]};let Bu,fo;function Za(e,t){e.appContext.config.performance&&fh()&&fo.mark(`vue-${t}-${e.uid}`),I.env.NODE_ENV!=="production"&&jO(e,t,fh()?fo.now():Date.now())}function Ja(e,t){if(e.appContext.config.performance&&fh()){const n=`vue-${t}-${e.uid}`,i=n+":end",s=`<${Uu(e,e.type)}> ${t}`;fo.mark(i),fo.measure(s,n,i),fo.clearMeasures(s),fo.clearMarks(n),fo.clearMarks(i)}I.env.NODE_ENV!=="production"&&KO(e,t,fh()?fo.now():Date.now())}function fh(){return Bu!==void 0||(typeof window<"u"&&window.performance?(Bu=!0,fo=window.performance):Bu=!1),Bu}function jM(){const e=[];if(I.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 Ri=JM;function KM(e){return qM(e)}function qM(e,t){jM();const n=Du();n.__VUE__=!0,I.env.NODE_ENV!=="production"&&Ig(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=Rn,insertStaticContent:g}=e,C=(O,$,ue,se=null,j=null,re=null,Fe=void 0,De=null,be=I.env.NODE_ENV!=="production"&&Is?!1:!!$.dynamicChildren)=>{if(O===$)return;O&&!el(O,$)&&(se=Jt(O),Le(O,j,re,!0),O=null),$.patchFlag===-2&&(be=!1,$.dynamicChildren=null);const{type:Se,ref:Qe,shapeFlag:Ve}=$;switch(Se){case Qa:v(O,$,ue,se);break;case ri:b(O,$,ue,se);break;case Hu:O==null?S($,ue,se,Fe):I.env.NODE_ENV!=="production"&&D(O,$,ue,Fe);break;case Ft:ie(O,$,ue,se,j,re,Fe,De,be);break;default:Ve&1?x(O,$,ue,se,j,re,Fe,De,be):Ve&6?me(O,$,ue,se,j,re,Fe,De,be):Ve&64||Ve&128?Se.process(O,$,ue,se,j,re,Fe,De,be,Ut):I.env.NODE_ENV!=="production"&&Ie("Invalid VNode type:",Se,`(${typeof Se})`)}Qe!=null&&j?Lu(Qe,O&&O.ref,re,$||O,!$):Qe==null&&O&&O.ref!=null&&Lu(O.ref,null,re,O,!0)},v=(O,$,ue,se)=>{if(O==null)i($.el=a($.children),ue,se);else{const j=$.el=O.el;$.children!==O.children&&u(j,$.children)}},b=(O,$,ue,se)=>{O==null?i($.el=l($.children||""),ue,se):$.el=O.el},S=(O,$,ue,se)=>{[O.el,O.anchor]=g(O.children,$,ue,se,O.el,O.anchor)},D=(O,$,ue,se)=>{if($.children!==O.children){const j=h(O.anchor);R(O),[$.el,$.anchor]=g($.children,ue,j,se)}else $.el=O.el,$.anchor=O.anchor},w=({el:O,anchor:$},ue,se)=>{let j;for(;O&&O!==$;)j=h(O),i(O,ue,se),O=j;i($,ue,se)},R=({el:O,anchor:$})=>{let ue;for(;O&&O!==$;)ue=h(O),s(O),O=ue;s($)},x=(O,$,ue,se,j,re,Fe,De,be)=>{if($.type==="svg"?Fe="svg":$.type==="math"&&(Fe="mathml"),O==null)T($,ue,se,j,re,Fe,De,be);else{const Se=O.el&&O.el._isVueCE?O.el:null;try{Se&&Se._beginPatch(),A(O,$,j,re,Fe,De,be)}finally{Se&&Se._endPatch()}}},T=(O,$,ue,se,j,re,Fe,De)=>{let be,Se;const{props:Qe,shapeFlag:Ve,transition:Xe,dirs:it}=O;if(be=O.el=r(O.type,re,Qe&&Qe.is,Qe),Ve&8?c(be,O.children):Ve&16&&N(O.children,be,null,se,j,Yg(O,re),Fe,De),it&&Vr(O,null,se,"created"),H(be,O,O.scopeId,Fe,se),Qe){for(const Tt in Qe)Tt!=="value"&&!Ru(Tt)&&o(be,Tt,null,Qe[Tt],re,se);"value"in Qe&&o(be,"value",null,Qe.value,re),(Se=Qe.onVnodeBeforeMount)&&_s(Se,se,O)}I.env.NODE_ENV!=="production"&&(Vd(be,"__vnode",O,!0),Vd(be,"__vueParentComponent",se,!0)),it&&Vr(O,null,se,"beforeMount");const vt=YM(j,Xe);vt&&Xe.beforeEnter(be),i(be,$,ue),((Se=Qe&&Qe.onVnodeMounted)||vt||it)&&Ri(()=>{Se&&_s(Se,se,O),vt&&Xe.enter(be),it&&Vr(O,null,se,"mounted")},j)},H=(O,$,ue,se,j)=>{if(ue&&p(O,ue),se)for(let re=0;re<se.length;re++)p(O,se[re]);if(j){let re=j.subTree;if(I.env.NODE_ENV!=="production"&&re.patchFlag>0&&re.patchFlag&2048&&(re=$g(re.children)||re),$===re||MS(re.type)&&(re.ssContent===$||re.ssFallback===$)){const Fe=j.vnode;H(O,Fe,Fe.scopeId,Fe.slotScopeIds,j.parent)}}},N=(O,$,ue,se,j,re,Fe,De,be=0)=>{for(let Se=be;Se<O.length;Se++){const Qe=O[Se]=De?jo(O[Se]):fs(O[Se]);C(null,Qe,$,ue,se,j,re,Fe,De)}},A=(O,$,ue,se,j,re,Fe)=>{const De=$.el=O.el;I.env.NODE_ENV!=="production"&&(De.__vnode=$);let{patchFlag:be,dynamicChildren:Se,dirs:Qe}=$;be|=O.patchFlag&16;const Ve=O.props||kt,Xe=$.props||kt;let it;if(ue&&zr(ue,!1),(it=Xe.onVnodeBeforeUpdate)&&_s(it,ue,$,O),Qe&&Vr($,O,ue,"beforeUpdate"),ue&&zr(ue,!0),I.env.NODE_ENV!=="production"&&Is&&(be=0,Fe=!1,Se=null),(Ve.innerHTML&&Xe.innerHTML==null||Ve.textContent&&Xe.textContent==null)&&c(De,""),Se?(_(O.dynamicChildren,Se,De,ue,se,Yg($,j),re),I.env.NODE_ENV!=="production"&&ph(O,$)):Fe||L(O,$,De,null,ue,se,Yg($,j),re,!1),be>0){if(be&16)V(De,Ve,Xe,ue,j);else if(be&2&&Ve.class!==Xe.class&&o(De,"class",null,Xe.class,j),be&4&&o(De,"style",Ve.style,Xe.style,j),be&8){const vt=$.dynamicProps;for(let Tt=0;Tt<vt.length;Tt++){const It=vt[Tt],bn=Ve[It],un=Xe[It];(un!==bn||It==="value")&&o(De,It,bn,un,j,ue)}}be&1&&O.children!==$.children&&c(De,$.children)}else!Fe&&Se==null&&V(De,Ve,Xe,ue,j);((it=Xe.onVnodeUpdated)||Qe)&&Ri(()=>{it&&_s(it,ue,$,O),Qe&&Vr($,O,ue,"updated")},se)},_=(O,$,ue,se,j,re,Fe)=>{for(let De=0;De<$.length;De++){const be=O[De],Se=$[De],Qe=be.el&&(be.type===Ft||!el(be,Se)||be.shapeFlag&198)?d(be.el):ue;C(be,Se,Qe,null,se,j,re,Fe,!0)}},V=(O,$,ue,se,j)=>{if($!==ue){if($!==kt)for(const re in $)!Ru(re)&&!(re in ue)&&o(O,re,$[re],null,j,se);for(const re in ue){if(Ru(re))continue;const Fe=ue[re],De=$[re];Fe!==De&&re!=="value"&&o(O,re,De,Fe,j,se)}"value"in ue&&o(O,"value",$.value,ue.value,j)}},ie=(O,$,ue,se,j,re,Fe,De,be)=>{const Se=$.el=O?O.el:a(""),Qe=$.anchor=O?O.anchor:a("");let{patchFlag:Ve,dynamicChildren:Xe,slotScopeIds:it}=$;I.env.NODE_ENV!=="production"&&(Is||Ve&2048)&&(Ve=0,be=!1,Xe=null),it&&(De=De?De.concat(it):it),O==null?(i(Se,ue,se),i(Qe,ue,se),N($.children||[],ue,Qe,j,re,Fe,De,be)):Ve>0&&Ve&64&&Xe&&O.dynamicChildren?(_(O.dynamicChildren,Xe,ue,j,re,Fe,De),I.env.NODE_ENV!=="production"?ph(O,$):($.key!=null||j&&$===j.subTree)&&ph(O,$,!0)):L(O,$,ue,Qe,j,re,Fe,De,be)},me=(O,$,ue,se,j,re,Fe,De,be)=>{$.slotScopeIds=De,O==null?$.shapeFlag&512?j.ctx.activate($,ue,se,Fe,be):Te($,ue,se,j,re,Fe,be):q(O,$,be)},Te=(O,$,ue,se,j,re,Fe)=>{const De=O.component=iL(O,se,j);if(I.env.NODE_ENV!=="production"&&De.type.__hmrId&&NO(De),I.env.NODE_ENV!=="production"&&(Yd(O),Za(De,"mount")),Og(O)&&(De.ctx.renderer=Ut),I.env.NODE_ENV!=="production"&&Za(De,"init"),oL(De,!1,Fe),I.env.NODE_ENV!=="production"&&Ja(De,"init"),I.env.NODE_ENV!=="production"&&Is&&(O.el=null),De.asyncDep){if(j&&j.registerDep(De,z,Fe),!O.el){const be=De.subTree=Ee(ri);b(null,be,$,ue),O.placeholder=be.el}}else z(De,O,$,ue,j,re,Fe);I.env.NODE_ENV!=="production"&&(Zd(),Ja(De,"mount"))},q=(O,$,ue)=>{const se=$.component=O.component;if(IM(O,$,ue))if(se.asyncDep&&!se.asyncResolved){I.env.NODE_ENV!=="production"&&Yd($),M(se,$,ue),I.env.NODE_ENV!=="production"&&Zd();return}else se.next=$,se.update();else $.el=O.el,se.vnode=$},z=(O,$,ue,se,j,re,Fe)=>{const De=()=>{if(O.isMounted){let{next:Ve,bu:Xe,u:it,parent:vt,vnode:Tt}=O;{const Qn=kS(O);if(Qn){Ve&&(Ve.el=Tt.el,M(O,Ve,Fe)),Qn.asyncDep.then(()=>{O.isUnmounted||De()});return}}let It=Ve,bn;I.env.NODE_ENV!=="production"&&Yd(Ve||O.vnode),zr(O,!1),Ve?(Ve.el=Tt.el,M(O,Ve,Fe)):Ve=Tt,Xe&&Ga(Xe),(bn=Ve.props&&Ve.props.onVnodeBeforeUpdate)&&_s(bn,vt,Ve,Tt),zr(O,!0),I.env.NODE_ENV!=="production"&&Za(O,"render");const un=CS(O);I.env.NODE_ENV!=="production"&&Ja(O,"render");const Wn=O.subTree;O.subTree=un,I.env.NODE_ENV!=="production"&&Za(O,"patch"),C(Wn,un,d(Wn.el),Jt(Wn),O,j,re),I.env.NODE_ENV!=="production"&&Ja(O,"patch"),Ve.el=un.el,It===null&&_M(O,un.el),it&&Ri(it,j),(bn=Ve.props&&Ve.props.onVnodeUpdated)&&Ri(()=>_s(bn,vt,Ve,Tt),j),I.env.NODE_ENV!=="production"&&jb(O),I.env.NODE_ENV!=="production"&&Zd()}else{let Ve;const{el:Xe,props:it}=$,{bm:vt,m:Tt,parent:It,root:bn,type:un}=O,Wn=qa($);zr(O,!1),vt&&Ga(vt),!Wn&&(Ve=it&&it.onVnodeBeforeMount)&&_s(Ve,It,$),zr(O,!0);{bn.ce&&bn.ce._def.shadowRoot!==!1&&bn.ce._injectChildStyle(un),I.env.NODE_ENV!=="production"&&Za(O,"render");const Qn=O.subTree=CS(O);I.env.NODE_ENV!=="production"&&Ja(O,"render"),I.env.NODE_ENV!=="production"&&Za(O,"patch"),C(null,Qn,ue,se,O,j,re),I.env.NODE_ENV!=="production"&&Ja(O,"patch"),$.el=Qn.el}if(Tt&&Ri(Tt,j),!Wn&&(Ve=it&&it.onVnodeMounted)){const Qn=$;Ri(()=>_s(Ve,It,Qn),j)}($.shapeFlag&256||It&&qa(It.vnode)&&It.vnode.shapeFlag&256)&&O.a&&Ri(O.a,j),O.isMounted=!0,I.env.NODE_ENV!=="production"&&zO(O),$=ue=se=null}};O.scope.on();const be=O.effect=new mb(De);O.scope.off();const Se=O.update=be.run.bind(be),Qe=O.job=be.runIfDirty.bind(be);Qe.i=O,Qe.id=O.uid,be.scheduler=()=>Qd(Qe),zr(O,!0),I.env.NODE_ENV!=="production"&&(be.onTrack=O.rtc?Ve=>Ga(O.rtc,Ve):void 0,be.onTrigger=O.rtg?Ve=>Ga(O.rtg,Ve):void 0),Se()},M=(O,$,ue)=>{$.component=O;const se=O.vnode.props;O.vnode=$,O.next=null,MM(O,$.props,se,ue),UM(O,$.children,ue),rs(),Gb(O),as()},L=(O,$,ue,se,j,re,Fe,De,be=!1)=>{const Se=O&&O.children,Qe=O?O.shapeFlag:0,Ve=$.children,{patchFlag:Xe,shapeFlag:it}=$;if(Xe>0){if(Xe&128){we(Se,Ve,ue,se,j,re,Fe,De,be);return}else if(Xe&256){ne(Se,Ve,ue,se,j,re,Fe,De,be);return}}it&8?(Qe&16&&Ht(Se,j,re),Ve!==Se&&c(ue,Ve)):Qe&16?it&16?we(Se,Ve,ue,se,j,re,Fe,De,be):Ht(Se,j,re,!0):(Qe&8&&c(ue,""),it&16&&N(Ve,ue,se,j,re,Fe,De,be))},ne=(O,$,ue,se,j,re,Fe,De,be)=>{O=O||Ha,$=$||Ha;const Se=O.length,Qe=$.length,Ve=Math.min(Se,Qe);let Xe;for(Xe=0;Xe<Ve;Xe++){const it=$[Xe]=be?jo($[Xe]):fs($[Xe]);C(O[Xe],it,ue,null,j,re,Fe,De,be)}Se>Qe?Ht(O,j,re,!0,!1,Ve):N($,ue,se,j,re,Fe,De,be,Ve)},we=(O,$,ue,se,j,re,Fe,De,be)=>{let Se=0;const Qe=$.length;let Ve=O.length-1,Xe=Qe-1;for(;Se<=Ve&&Se<=Xe;){const it=O[Se],vt=$[Se]=be?jo($[Se]):fs($[Se]);if(el(it,vt))C(it,vt,ue,null,j,re,Fe,De,be);else break;Se++}for(;Se<=Ve&&Se<=Xe;){const it=O[Ve],vt=$[Xe]=be?jo($[Xe]):fs($[Xe]);if(el(it,vt))C(it,vt,ue,null,j,re,Fe,De,be);else break;Ve--,Xe--}if(Se>Ve){if(Se<=Xe){const it=Xe+1,vt=it<Qe?$[it].el:se;for(;Se<=Xe;)C(null,$[Se]=be?jo($[Se]):fs($[Se]),ue,vt,j,re,Fe,De,be),Se++}}else if(Se>Xe)for(;Se<=Ve;)Le(O[Se],j,re,!0),Se++;else{const it=Se,vt=Se,Tt=new Map;for(Se=vt;Se<=Xe;Se++){const qe=$[Se]=be?jo($[Se]):fs($[Se]);qe.key!=null&&(I.env.NODE_ENV!=="production"&&Tt.has(qe.key)&&Ie("Duplicate keys found during update:",JSON.stringify(qe.key),"Make sure keys are unique."),Tt.set(qe.key,Se))}let It,bn=0;const un=Xe-vt+1;let Wn=!1,Qn=0;const pe=new Array(un);for(Se=0;Se<un;Se++)pe[Se]=0;for(Se=it;Se<=Ve;Se++){const qe=O[Se];if(bn>=un){Le(qe,j,re,!0);continue}let ft;if(qe.key!=null)ft=Tt.get(qe.key);else for(It=vt;It<=Xe;It++)if(pe[It-vt]===0&&el(qe,$[It])){ft=It;break}ft===void 0?Le(qe,j,re,!0):(pe[ft-vt]=Se+1,ft>=Qn?Qn=ft:Wn=!0,C(qe,$[ft],ue,null,j,re,Fe,De,be),bn++)}const ve=Wn?ZM(pe):Ha;for(It=ve.length-1,Se=un-1;Se>=0;Se--){const qe=vt+Se,ft=$[qe],Et=$[qe+1],_e=qe+1<Qe?Et.el||Et.placeholder:se;pe[Se]===0?C(null,ft,ue,_e,j,re,Fe,De,be):Wn&&(It<0||Se!==ve[It]?Ae(ft,ue,_e,2):It--)}}},Ae=(O,$,ue,se,j=null)=>{const{el:re,type:Fe,transition:De,children:be,shapeFlag:Se}=O;if(Se&6){Ae(O.component.subTree,$,ue,se);return}if(Se&128){O.suspense.move($,ue,se);return}if(Se&64){Fe.move(O,$,ue,Ut);return}if(Fe===Ft){i(re,$,ue);for(let Ve=0;Ve<be.length;Ve++)Ae(be[Ve],$,ue,se);i(O.anchor,$,ue);return}if(Fe===Hu){w(O,$,ue);return}if(se!==2&&Se&1&&De)if(se===0)De.beforeEnter(re),i(re,$,ue),Ri(()=>De.enter(re),j);else{const{leave:Ve,delayLeave:Xe,afterLeave:it}=De,vt=()=>{O.ctx.isUnmounted?s(re):i(re,$,ue)},Tt=()=>{re._isLeaving&&re[Br](!0),Ve(re,()=>{vt(),it&&it()})};Xe?Xe(re,vt,Tt):Tt()}else i(re,$,ue)},Le=(O,$,ue,se=!1,j=!1)=>{const{type:re,props:Fe,ref:De,children:be,dynamicChildren:Se,shapeFlag:Qe,patchFlag:Ve,dirs:Xe,cacheIndex:it}=O;if(Ve===-2&&(j=!1),De!=null&&(rs(),Lu(De,null,ue,O,!0),as()),it!=null&&($.renderCache[it]=void 0),Qe&256){$.ctx.deactivate(O);return}const vt=Qe&1&&Xe,Tt=!qa(O);let It;if(Tt&&(It=Fe&&Fe.onVnodeBeforeUnmount)&&_s(It,$,O),Qe&6)ht(O.component,ue,se);else{if(Qe&128){O.suspense.unmount(ue,se);return}vt&&Vr(O,null,$,"beforeUnmount"),Qe&64?O.type.remove(O,$,ue,Ut,se):Se&&!Se.hasOnce&&(re!==Ft||Ve>0&&Ve&64)?Ht(Se,$,ue,!1,!0):(re===Ft&&Ve&384||!j&&Qe&16)&&Ht(be,$,ue),se&&nt(O)}(Tt&&(It=Fe&&Fe.onVnodeUnmounted)||vt)&&Ri(()=>{It&&_s(It,$,O),vt&&Vr(O,null,$,"unmounted")},ue)},nt=O=>{const{type:$,el:ue,anchor:se,transition:j}=O;if($===Ft){I.env.NODE_ENV!=="production"&&O.patchFlag>0&&O.patchFlag&2048&&j&&!j.persisted?O.children.forEach(Fe=>{Fe.type===ri?s(Fe.el):nt(Fe)}):Je(ue,se);return}if($===Hu){R(O);return}const re=()=>{s(ue),j&&!j.persisted&&j.afterLeave&&j.afterLeave()};if(O.shapeFlag&1&&j&&!j.persisted){const{leave:Fe,delayLeave:De}=j,be=()=>Fe(ue,re);De?De(O.el,re,be):be()}else re()},Je=(O,$)=>{let ue;for(;O!==$;)ue=h(O),s(O),O=ue;s($)},ht=(O,$,ue)=>{I.env.NODE_ENV!=="production"&&O.type.__hmrId&&VO(O);const{bum:se,scope:j,job:re,subTree:Fe,um:De,m:be,a:Se}=O;OS(be),OS(Se),se&&Ga(se),j.stop(),re&&(re.flags|=8,Le(Fe,O,$,ue)),De&&Ri(De,$),Ri(()=>{O.isUnmounted=!0},$),I.env.NODE_ENV!=="production"&&UO(O)},Ht=(O,$,ue,se=!1,j=!1,re=0)=>{for(let Fe=re;Fe<O.length;Fe++)Le(O[Fe],$,ue,se,j)},Jt=O=>{if(O.shapeFlag&6)return Jt(O.component.subTree);if(O.shapeFlag&128)return O.suspense.next();const $=h(O.anchor||O.el),ue=$&&$[YO];return ue?h(ue):$};let Ke=!1;const yn=(O,$,ue)=>{O==null?$._vnode&&Le($._vnode,null,null,!0):C($._vnode||null,O,$,null,null,null,ue),$._vnode=O,Ke||(Ke=!0,Gb(),Wb(),Ke=!1)},Ut={p:C,um:Le,m:Ae,r:nt,mt:Te,mc:N,pc:L,pbc:_,n:Jt,o:e};return{render:yn,hydrate:void 0,createApp:yM(yn)}}function Yg({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 zr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function YM(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ph(e,t,n=!1){const i=e.children,s=t.children;if(et(i)&&et(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]=jo(s[o]),a.el=r.el),!n&&a.patchFlag!==-2&&ph(r,a)),a.type===Qa&&a.patchFlag!==-1&&(a.el=r.el),a.type===ri&&!a.el&&(a.el=r.el),I.env.NODE_ENV!=="production"&&a.el&&(a.el.__vnode=a)}}function ZM(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 kS(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:kS(t)}function OS(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const MS=e=>e.__isSuspense;function JM(e,t){t&&t.pendingBranch?et(e)?t.effects.push(...e):t.effects.push(e):xg(e)}const Ft=Symbol.for("v-fgt"),Qa=Symbol.for("v-txt"),ri=Symbol.for("v-cmt"),Hu=Symbol.for("v-stc"),Gu=[];let ai=null;function X(e=!1){Gu.push(ai=e?null:[])}function QM(){Gu.pop(),ai=Gu[Gu.length-1]||null}let Xa=1;function LS(e,t=!1){Xa+=e,e<0&&ai&&t&&(ai.hasOnce=!0)}function NS(e){return e.dynamicChildren=Xa>0?ai||Ha:null,QM(),Xa>0&&ai&&ai.push(e),e}function ye(e,t,n,i,s,o){return NS(Pe(e,t,n,i,s,o,!0))}function tt(e,t,n,i,s){return NS(Ee(e,t,n,i,s,!0))}function Wu(e){return e?e.__v_isVNode===!0:!1}function el(e,t){if(I.env.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=Xd.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 XM=(...e)=>BS(...e),VS=({key:e})=>e??null,gh=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?en(e)||Wt(e)||rt(e)?{i:Fn,r:e,k:t,f:!!n}:e:null);function Pe(e,t=null,n=null,i=0,s=null,o=e===Ft?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&VS(t),ref:t&&gh(t),scopeId:qb,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:Fn};return a?(Zg(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=en(n)?8:16),I.env.NODE_ENV!=="production"&&l.key!==l.key&&Ie("VNode created with invalid key (NaN). VNode type:",l.type),Xa>0&&!r&&ai&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&ai.push(l),l}const Ee=I.env.NODE_ENV!=="production"?XM:BS;function BS(e,t=null,n=null,i=0,s=null,o=!1){if((!e||e===iS)&&(I.env.NODE_ENV!=="production"&&!e&&Ie(`Invalid vnode type when creating vnode: ${e}.`),e=ri),Wu(e)){const a=po(e,t,!0);return n&&Zg(a,n),Xa>0&&!o&&ai&&(a.shapeFlag&6?ai[ai.indexOf(e)]=a:ai.push(a)),a.patchFlag=-2,a}if(KS(e)&&(e=e.__vccOpts),t){t=eL(t);let{class:a,style:l}=t;a&&!en(a)&&(t.class=Kt(a)),Mt(l)&&(za(l)&&!et(l)&&(l=Xt({},l)),t.style=Dn(l))}const r=en(e)?1:MS(e)?128:ZO(e)?64:Mt(e)?4:rt(e)?2:0;return I.env.NODE_ENV!=="production"&&r&4&&za(e)&&(e=dt(e),Ie("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)),Pe(e,t,n,i,s,r,o,!0)}function eL(e){return e?za(e)||RS(e)?Xt({},e):e:null}function po(e,t,n=!1,i=!1){const{props:s,ref:o,patchFlag:r,children:a,transition:l}=e,u=t?gn(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&VS(u),ref:t&&t.ref?n&&o?et(o)?o.concat(gh(t)):[o,gh(t)]:gh(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:I.env.NODE_ENV!=="production"&&r===-1&&et(a)?a.map(HS):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ft?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&&po(e.ssContent),ssFallback:e.ssFallback&&po(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&i&&Mu(c,l.clone(c)),c}function HS(e){const t=po(e);return et(e.children)&&(t.children=e.children.map(HS)),t}function wt(e=" ",t=0){return Ee(Qa,null,e,t)}function at(e="",t=!1){return t?(X(),tt(ri,null,e)):Ee(ri,null,e)}function fs(e){return e==null||typeof e=="boolean"?Ee(ri):et(e)?Ee(Ft,null,e.slice()):Wu(e)?jo(e):Ee(Qa,null,String(e))}function jo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:po(e)}function Zg(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(et(t))n=16;else if(typeof t=="object")if(i&65){const s=t.default;s&&(s._c&&(s._d=!1),Zg(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!RS(t)?t._ctx=Fn:s===3&&Fn&&(Fn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else rt(t)?(t={default:t,_ctx:Fn},n=32):(t=String(t),i&64?(n=16,t=[wt(t)]):n=8);e.children=t,e.shapeFlag|=n}function gn(...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=Kt([t.class,i.class]));else if(s==="style")t.style=Dn([t.style,i.style]);else if(Su(s)){const o=t[s],r=i[s];r&&o!==r&&!(et(o)&&o.includes(r))&&(t[s]=o?[].concat(o,r):r)}else s!==""&&(t[s]=i[s])}return t}function _s(e,t,n,i=null){cs(e,t,7,[n,i])}const tL=pS();let nL=0;function iL(e,t,n){const i=e.type,s=(t?t.appContext:e.appContext)||tL,o={uid:nL++,vnode:e,type:i,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new fb(!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:FS(i,s),emitsOptions:vS(i,s),emit:null,emitted:null,propsDefaults:kt,inheritAttrs:i.inheritAttrs,ctx:kt,data:kt,props:kt,attrs:kt,slots:kt,refs:kt,setupState:kt,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 I.env.NODE_ENV!=="production"?o.ctx=uM(o):o.ctx={_:o},o.root=t?t.root:o,o.emit=xM.bind(null,o),e.ce&&e.ce(o),o}let xn=null;const Vi=()=>xn||Fn;let mh,Jg;{const e=Du(),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)}};mh=t("__VUE_INSTANCE_SETTERS__",n=>xn=n),Jg=t("__VUE_SSR_SETTERS__",n=>$u=n)}const zu=e=>{const t=xn;return mh(e),e.scope.on(),()=>{e.scope.off(),mh(t)}},GS=()=>{xn&&xn.scope.off(),mh(null)},sL=fi("slot,component");function Qg(e,{isNativeTag:t}){(sL(e)||t(e))&&Ie("Do not use built-in or reserved HTML elements as component id: "+e)}function WS(e){return e.vnode.shapeFlag&4}let $u=!1;function oL(e,t=!1,n=!1){t&&Jg(t);const{props:i,children:s}=e.vnode,o=WS(e);kM(e,i,o,t),$M(e,s,n||t);const r=o?rL(e,t):void 0;return t&&Jg(!1),r}function rL(e,t){const n=e.type;if(I.env.NODE_ENV!=="production"){if(n.name&&Qg(n.name,e.appContext.config),n.components){const s=Object.keys(n.components);for(let o=0;o<s.length;o++)Qg(s[o],e.appContext.config)}if(n.directives){const s=Object.keys(n.directives);for(let o=0;o<s.length;o++)Yb(s[o])}n.compilerOptions&&aL()&&Ie('"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,aS),I.env.NODE_ENV!=="production"&&cM(e);const{setup:i}=n;if(i){rs();const s=e.setupContext=i.length>1?jS(e):null,o=zu(e),r=Ua(i,e,0,[I.env.NODE_ENV!=="production"?Ps(e.props):e.props,s]),a=cg(r);if(as(),o(),(a||e.sp)&&!qa(e)&&Jb(e),a){if(r.then(GS,GS),t)return r.then(l=>{zS(e,l,t)}).catch(l=>{Iu(l,e,0)});if(e.asyncDep=r,I.env.NODE_ENV!=="production"&&!e.suspense){const l=Uu(e,n);Ie(`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 zS(e,r,t)}else $S(e,t)}function zS(e,t,n){rt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Mt(t)?(I.env.NODE_ENV!=="production"&&Wu(t)&&Ie("setup() should not return VNodes directly - return a render function instead."),I.env.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Lb(t),I.env.NODE_ENV!=="production"&&dM(e)):I.env.NODE_ENV!=="production"&&t!==void 0&&Ie(`setup() should return an object. Received: ${t===null?"null":typeof t}`),$S(e,n)}const aL=()=>!0;function $S(e,t,n){const i=e.type;e.render||(e.render=i.render||Rn);{const s=zu(e);rs();try{pM(e)}finally{as(),s()}}I.env.NODE_ENV!=="production"&&!i.render&&e.render===Rn&&!t&&(i.template?Ie('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".'):Ie("Component is missing template or render function: ",i))}const US=I.env.NODE_ENV!=="production"?{get(e,t){return hh(),Pn(e,"get",""),e[t]},set(){return Ie("setupContext.attrs is readonly."),!1},deleteProperty(){return Ie("setupContext.attrs is readonly."),!1}}:{get(e,t){return Pn(e,"get",""),e[t]}};function lL(e){return new Proxy(e.slots,{get(t,n){return Pn(e,"get","$slots"),t[n]}})}function jS(e){const t=n=>{if(I.env.NODE_ENV!=="production"&&(e.exposed&&Ie("expose() should be called only once per setup()."),n!=null)){let i=typeof n;i==="object"&&(et(n)?i="array":Wt(n)&&(i="ref")),i!=="object"&&Ie(`expose() should be passed a plain object, received ${i}.`)}e.exposed=n||{}};if(I.env.NODE_ENV!=="production"){let n,i;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,US))},get slots(){return i||(i=lL(e))},get emit(){return(s,...o)=>e.emit(s,...o)},expose:t})}else return{attrs:new Proxy(e.attrs,US),slots:e.slots,emit:e.emit,expose:t}}function vh(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Lb($o(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Hr)return Hr[n](e)},has(t,n){return n in t||n in Hr}})):e.proxy}const uL=/(?:^|[-_])\w/g,cL=e=>e.replace(uL,t=>t.toUpperCase()).replace(/[-_]/g,"");function Xg(e,t=!0){return rt(e)?e.displayName||e.name:e.name||t&&e.__name}function Uu(e,t,n=!1){let i=Xg(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?cL(i):n?"App":"Anonymous"}function KS(e){return rt(e)&&"__vccOpts"in e}const W=(e,t)=>{const n=FO(e,t,$u);if(I.env.NODE_ENV!=="production"){const i=Vi();i&&i.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function dL(){if(I.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(!Mt(d))return null;if(d.__isVue)return["div",e,"VueInstance"];if(Wt(d)){rs();const h=d.value;return as(),["div",{},["span",e,c(d)],"<",a(h),">"]}else{if(Li(d))return["div",{},["span",e,Un(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${ls(d)?" (readonly)":""}`];if(ls(d))return["div",{},["span",e,Un(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",dt(d.props))),d.setupState!==kt&&h.push(r("setup",d.setupState)),d.data!==kt&&h.push(r("data",dt(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=Xt({},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]:Mt(d)?["object",{object:h?dt(d):d}]:["span",n,String(d)]}function l(d,h){const p=d.type;if(rt(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(et(g)&&g.includes(h)||Mt(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 Un(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}function qS(e,t,n,i){const s=n[i];if(s&&hL(s,e))return s;const o=t();return o.memo=e.slice(),o.cacheIndex=i,n[i]=o}function hL(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let i=0;i<n.length;i++)if(ii(n[i],t[i]))return!1;return Xa>0&&ai&&ai.push(e),!0}const YS="3.5.25",ps=I.env.NODE_ENV!=="production"?Ie:Rn;I.env.NODE_ENV,I.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 em;const ZS=typeof window<"u"&&window.trustedTypes;if(ZS)try{em=ZS.createPolicy("vue",{createHTML:e=>e})}catch(e){I.env.NODE_ENV!=="production"&&ps(`Error creating trusted types policy: ${e}`)}const JS=em?e=>em.createHTML(e):e=>e,fL="http://www.w3.org/2000/svg",pL="http://www.w3.org/1998/Math/MathML",go=typeof document<"u"?document:null,QS=go&&go.createElement("template"),gL={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"?go.createElementNS(fL,e):t==="mathml"?go.createElementNS(pL,e):n?go.createElement(e,{is:n}):go.createElement(e);return e==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:e=>go.createTextNode(e),createComment:e=>go.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>go.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{QS.innerHTML=JS(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const a=QS.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]}},Ko="transition",ju="animation",tl=Symbol("_vtc"),XS={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},mL=Xt({},QO,XS),$r=(e,t=[])=>{et(e)?e.forEach(n=>n(...t)):e&&e(...t)},e0=e=>e?et(e)?e.some(t=>t.length>1):e.length>1:!1;function vL(e){const t={};for(const V in e)V in XS||(t[V]=e[V]);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=CL(s),C=g&&g[0],v=g&&g[1],{onBeforeEnter:b,onEnter:S,onEnterCancelled:D,onLeave:w,onLeaveCancelled:R,onBeforeAppear:x=b,onAppear:T=S,onAppearCancelled:H=D}=t,N=(V,ie,me,Te)=>{V._enterCancelled=Te,qo(V,ie?c:a),qo(V,ie?u:r),me&&me()},A=(V,ie)=>{V._isLeaving=!1,qo(V,d),qo(V,p),qo(V,h),ie&&ie()},_=V=>(ie,me)=>{const Te=V?T:S,q=()=>N(ie,V,me);$r(Te,[ie,q]),t0(()=>{qo(ie,V?l:o),ks(ie,V?c:a),e0(Te)||n0(ie,i,C,q)})};return Xt(t,{onBeforeEnter(V){$r(b,[V]),ks(V,o),ks(V,r)},onBeforeAppear(V){$r(x,[V]),ks(V,l),ks(V,u)},onEnter:_(!1),onAppear:_(!0),onLeave(V,ie){V._isLeaving=!0;const me=()=>A(V,ie);ks(V,d),V._enterCancelled?(ks(V,h),nm(V)):(nm(V),ks(V,h)),t0(()=>{V._isLeaving&&(qo(V,d),ks(V,p),e0(w)||n0(V,i,v,me))}),$r(w,[V,me])},onEnterCancelled(V){N(V,!1,void 0,!0),$r(D,[V])},onAppearCancelled(V){N(V,!0,void 0,!0),$r(H,[V])},onLeaveCancelled(V){A(V),$r(R,[V])}})}function CL(e){if(e==null)return null;if(Mt(e))return[tm(e.enter),tm(e.leave)];{const t=tm(e);return[t,t]}}function tm(e){const t=Nk(e);return I.env.NODE_ENV!=="production"&&kO(t,"<transition> explicit duration"),t}function ks(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[tl]||(e[tl]=new Set)).add(t)}function qo(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const n=e[tl];n&&(n.delete(t),n.size||(e[tl]=void 0))}function t0(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let wL=0;function n0(e,t,n,i){const s=e._endId=++wL,o=()=>{s===e._endId&&i()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=i0(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 i0(e,t){const n=window.getComputedStyle(e),i=g=>(n[g]||"").split(", "),s=i(`${Ko}Delay`),o=i(`${Ko}Duration`),r=s0(s,o),a=i(`${ju}Delay`),l=i(`${ju}Duration`),u=s0(a,l);let c=null,d=0,h=0;t===Ko?r>0&&(c=Ko,d=r,h=o.length):t===ju?u>0&&(c=ju,d=u,h=l.length):(d=Math.max(r,u),c=d>0?r>u?Ko:ju:null,h=c?c===Ko?o.length:l.length:0);const p=c===Ko&&/\b(?:transform|all)(?:,|$)/.test(i(`${Ko}Property`).toString());return{type:c,timeout:d,propCount:h,hasTransform:p}}function s0(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>o0(n)+o0(e[i])))}function o0(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function nm(e){return(e?e.ownerDocument:document).body.offsetHeight}function yL(e,t,n){const i=e[tl];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ch=Symbol("_vod"),r0=Symbol("_vsh"),Ur={name:"show",beforeMount(e,{value:t},{transition:n}){e[Ch]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ku(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),Ku(e,!0),i.enter(e)):i.leave(e,()=>{Ku(e,!1)}):Ku(e,t))},beforeUnmount(e,{value:t}){Ku(e,t)}};function Ku(e,t){e.style.display=t?e[Ch]:"none",e[r0]=!t}const a0=Symbol(I.env.NODE_ENV!=="production"?"CSS_VAR_TEXT":"");function bL(e){const t=Vi();if(!t){I.env.NODE_ENV!=="production"&&ps("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))};I.env.NODE_ENV!=="production"&&(t.getCssVars=()=>e(t.proxy));const i=()=>{const s=e(t.proxy);t.ce?wh(t.ce,s):im(t.subTree,s),n(s)};tS(()=>{xg(i)}),Si(()=>{Dt(i,Rn,{flush:"post"});const s=new MutationObserver(i);s.observe(t.subTree.el.parentNode,{childList:!0}),Ya(()=>s.disconnect())})}function im(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{im(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)wh(e.el,t);else if(e.type===Ft)e.children.forEach(n=>im(n,t));else if(e.type===Hu){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=Zk(t[s]);n.setProperty(`--${s}`,o),i+=`--${s}: ${o};`}n[a0]=i}}const SL=/(?:^|;)\s*display\s*:/;function EL(e,t,n){const i=e.style,s=en(n);let o=!1;if(n&&!s){if(t)if(en(t))for(const r of t.split(";")){const a=r.slice(0,r.indexOf(":")).trim();n[a]==null&&yh(i,a,"")}else for(const r in t)n[r]==null&&yh(i,r,"");for(const r in n)r==="display"&&(o=!0),yh(i,r,n[r])}else if(s){if(t!==n){const r=i[a0];r&&(n+=";"+r),i.cssText=n,o=SL.test(n)}}else t&&e.removeAttribute("style");Ch in e&&(e[Ch]=o?i.display:"",e[r0]&&(i.display="none"))}const RL=/[^\\];\s*$/,l0=/\s*!important$/;function yh(e,t,n){if(et(n))n.forEach(i=>yh(e,t,i));else if(n==null&&(n=""),I.env.NODE_ENV!=="production"&&RL.test(n)&&ps(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const i=DL(e,t);l0.test(n)?e.setProperty(xs(i),n.replace(l0,""),"important"):e[i]=n}}const u0=["Webkit","Moz","ms"],sm={};function DL(e,t){const n=sm[t];if(n)return n;let i=zn(t);if(i!=="filter"&&i in e)return sm[t]=i;i=_r(i);for(let s=0;s<u0.length;s++){const o=u0[s]+i;if(o in e)return sm[t]=o}return t}const c0="http://www.w3.org/1999/xlink";function d0(e,t,n,i,s,o=qk(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(c0,t.slice(6,t.length)):e.setAttributeNS(c0,t,n):n==null||o&&!ub(n)?e.removeAttribute(t):e.setAttribute(t,o?"":ss(n)?String(n):n)}function h0(e,t,n,i,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?JS(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=ub(n):n==null&&a==="string"?(n="",r=!0):a==="number"&&(n=0,r=!0)}try{e[t]=n}catch(a){I.env.NODE_ENV!=="production"&&!r&&ps(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,a)}r&&e.removeAttribute(s||t)}function jr(e,t,n,i){e.addEventListener(t,n,i)}function FL(e,t,n,i){e.removeEventListener(t,n,i)}const f0=Symbol("_vei");function xL(e,t,n,i,s=null){const o=e[f0]||(e[f0]={}),r=o[t];if(i&&r)r.value=I.env.NODE_ENV!=="production"?g0(i,t):i;else{const[a,l]=TL(t);if(i){const u=o[t]=IL(I.env.NODE_ENV!=="production"?g0(i,t):i,s);jr(e,a,u,l)}else r&&(FL(e,a,r,l),o[t]=void 0)}}const p0=/(?:Once|Passive|Capture)$/;function TL(e){let t;if(p0.test(e)){t={};let i;for(;i=e.match(p0);)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 om=0;const PL=Promise.resolve(),AL=()=>om||(PL.then(()=>om=0),om=Date.now());function IL(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;cs(_L(i,n.value),t,5,[i])};return n.value=e,n.attached=AL(),n}function g0(e,t){return rt(e)||et(e)?e:(ps(`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}.`),Rn)}function _L(e,t){if(et(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 m0=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,kL=(e,t,n,i,s,o)=>{const r=s==="svg";t==="class"?yL(e,i,r):t==="style"?EL(e,n,i):Su(t)?Od(t)||xL(e,t,n,i,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):OL(e,t,i,r))?(h0(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&d0(e,t,i,r,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!en(i))?h0(e,zn(t),i,o,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),d0(e,t,i,r))};function OL(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&m0(t)&&rt(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 m0(t)&&en(n)?!1:t in e}const v0=new WeakMap,C0=new WeakMap,bh=Symbol("_moveCb"),w0=Symbol("_enterCb"),ML=(e=>(delete e.props.mode,e))({name:"TransitionGroup",props:Xt({},mL,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Vi(),i=JO();let s,o;return nS(()=>{if(!s.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!BL(s[0].el,n.vnode.el,r)){s=[];return}s.forEach(LL),s.forEach(NL);const a=s.filter(VL);nm(n.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;ks(u,r),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[bh]=h=>{h&&h.target!==u||(!h||h.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[bh]=null,qo(u,r))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const r=dt(e),a=vL(r);let l=r.tag||Ft;if(s=[],o)for(let u=0;u<o.length;u++){const c=o[u];c.el&&c.el instanceof Element&&(s.push(c),Mu(c,kg(c,a,i,n)),v0.set(c,{left:c.el.offsetLeft,top:c.el.offsetTop}))}o=t.default?Zb(t.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null?Mu(c,kg(c,a,i,n)):I.env.NODE_ENV!=="production"&&c.type!==Qa&&ps("<TransitionGroup> children must be keyed.")}return Ee(l,null,o)}}});function LL(e){const t=e.el;t[bh]&&t[bh](),t[w0]&&t[w0]()}function NL(e){C0.set(e,{left:e.el.offsetLeft,top:e.el.offsetTop})}function VL(e){const t=v0.get(e),n=C0.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 BL(e,t,n){const i=e.cloneNode(),s=e[tl];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}=i0(i);return o.removeChild(i),r}const Sh=e=>{const t=e.props["onUpdate:modelValue"]||!1;return et(t)?n=>Ga(t,n):t};function HL(e){e.target.composing=!0}function y0(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const nl=Symbol("_assign");function b0(e,t,n){return t&&(e=e.trim()),n&&(e=hg(e)),e}const GL={created(e,{modifiers:{lazy:t,trim:n,number:i}},s){e[nl]=Sh(s);const o=i||s.props&&s.props.type==="number";jr(e,t?"change":"input",r=>{r.target.composing||e[nl](b0(e.value,n,o))}),(n||o)&&jr(e,"change",()=>{e.value=b0(e.value,n,o)}),t||(jr(e,"compositionstart",HL),jr(e,"compositionend",y0),jr(e,"change",y0))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:s,number:o}},r){if(e[nl]=Sh(r),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?hg(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))}},WL={deep:!0,created(e,t,n){e[nl]=Sh(n),jr(e,"change",()=>{const i=e._modelValue,s=zL(e),o=e.checked,r=e[nl];if(et(i)){const a=cb(i,s),l=a!==-1;if(o&&!l)r(i.concat(s));else if(!o&&l){const u=[...i];u.splice(a,1),r(u)}}else if(Md(i)){const a=new Set(i);o?a.add(s):a.delete(s),r(a)}else r(E0(e,o))})},mounted:S0,beforeUpdate(e,t,n){e[nl]=Sh(n),S0(e,t,n)}};function S0(e,{value:t,oldValue:n},i){e._modelValue=t;let s;if(et(t))s=cb(t,i.props.value)>-1;else if(Md(t))s=t.has(i.props.value);else{if(t===n)return;s=Bd(t,E0(e,!0))}e.checked!==s&&(e.checked=s)}function zL(e){return"_value"in e?e._value:e.value}function E0(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const $L=["ctrl","shift","alt","meta"],UL={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)=>$L.some(n=>e[`${n}Key`]&&!t.includes(n))},qt=(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=UL[t[r]];if(a&&a(s,t))return}return e(s,...o)})},jL={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},R0=(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||jL[r]===o))return e(s)})},KL=Xt({patchProp:kL},gL);let D0;function F0(){return D0||(D0=KM(KL))}const x0=(...e)=>{F0().render(...e)},T0=(...e)=>{const t=F0().createApp(...e);I.env.NODE_ENV!=="production"&&(YL(t),ZL(t));const{mount:n}=t;return t.mount=i=>{const s=JL(i);if(!s)return;const o=t._component;!rt(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,qL(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t};function qL(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function YL(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>Uk(t)||jk(t)||Kk(t),writable:!1})}function ZL(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){ps("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 ps(i),n},set(){ps(i)}})}}function JL(e){if(en(e)){const t=document.querySelector(e);return I.env.NODE_ENV!=="production"&&!t&&ps(`Failed to mount app: mount target selector "${e}" returned null.`),t}return I.env.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&ps('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 QL(){dL()}I.env.NODE_ENV!=="production"&&QL();const XL=["type","disabled","primary","readonly","menu-item","secondary","tertiary","text-btn","danger","icon","size","rounded"],eN=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}},emits:["handleClick"],setup(e,{emit:t}){const n=e,i=t,s=W(()=>Array.isArray(n.variant)?n.variant:[n.variant]),o=W(()=>s.value.includes("primary")),r=W(()=>s.value.includes("secondary")),a=W(()=>s.value.includes("tertiary")),l=W(()=>s.value.includes("text")),u=W(()=>s.value.includes("danger")),c=W(()=>s.value.includes("icon")),d=W(()=>s.value.includes("menu-item")),h=W(()=>n.readOnly===!0),p=W(()=>typeof n.size=="string"?n.size:null),g=W(()=>typeof n.size=="number"?{"--default-height":`${n.size}px`,"--button-size":`${n.size}px`}:{}),C=w=>{var R;n.disabled||(i("handleClick",w),(R=n.action)==null||R.call(n))},v=ah(),b=w=>!!v[w],S=W(()=>b("prefix")),D=W(()=>b("suffix"));return(w,R)=>(X(),ye("button",{class:Kt(["ab-table-button",[{"has-prefix":S.value,"has-suffix":D.value,"highlight-on-hover":e.highlightOnHover,"has-border":e.border,"read-only":e.readOnly||void 0}]]),type:e.type,disabled:e.disabled||void 0,primary:o.value||void 0,readonly:h.value,"menu-item":d.value||void 0,secondary:r.value||void 0,tertiary:a.value||void 0,"text-btn":l.value||void 0,danger:u.value||void 0,icon:c.value||void 0,size:p.value||void 0,rounded:e.rounded||void 0,style:Dn(g.value),onClick:C},[Rt(w.$slots,"prefix",{},void 0,!0),Rt(w.$slots,"default",{},()=>[wt(mt(e.label),1)],!0),Rt(w.$slots,"suffix",{},void 0,!0)],14,XL))}}),St=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},gt=St(eN,[["__scopeId","data-v-3462407d"]]);var P0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tN(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A0={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(P0,function(){var n=function(f,m){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,E){y.__proto__=E}||function(y,E){for(var F in E)Object.prototype.hasOwnProperty.call(E,F)&&(y[F]=E[F])})(f,m)},i=function(){return(i=Object.assign||function(f){for(var m,y=1,E=arguments.length;y<E;y++)for(var F in m=arguments[y])Object.prototype.hasOwnProperty.call(m,F)&&(f[F]=m[F]);return f}).apply(this,arguments)};function s(f,m,y){for(var E,F=0,P=m.length;F<P;F++)!E&&F in m||((E=E||Array.prototype.slice.call(m,0,F))[F]=m[F]);return f.concat(E||Array.prototype.slice.call(m))}var o=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:P0,r=Object.keys,a=Array.isArray;function l(f,m){return typeof m!="object"||r(m).forEach(function(y){f[y]=m[y]}),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(y){g(f,y,m[y])})}var p=Object.defineProperty;function g(f,m,y,E){p(f,m,l(y&&d(y,"get")&&typeof y.get=="function"?{get:y.get,set:y.set,configurable:!0}:{value:y,configurable:!0,writable:!0},E))}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,b=[].slice;function S(f,m,y){return b.call(f,m,y)}function D(f,m){return m(f)}function w(f){if(!f)throw new Error("Assertion Failed")}function R(f){o.setImmediate?setImmediate(f):setTimeout(f,0)}function x(f,m){if(typeof m=="string"&&d(f,m))return f[m];if(!m)return f;if(typeof m!="string"){for(var y=[],E=0,F=m.length;E<F;++E){var P=x(f,m[E]);y.push(P)}return y}var k=m.indexOf(".");if(k!==-1){var B=f[m.substr(0,k)];return B==null?void 0:x(B,m.substr(k+1))}}function T(f,m,y){if(f&&m!==void 0&&!("isFrozen"in Object&&Object.isFrozen(f)))if(typeof m!="string"&&"length"in m){w(typeof y!="string"&&"length"in y);for(var E=0,F=m.length;E<F;++E)T(f,m[E],y[E])}else{var P,k,B=m.indexOf(".");B!==-1?(P=m.substr(0,B),(k=m.substr(B+1))===""?y===void 0?a(f)&&!isNaN(parseInt(P))?f.splice(P,1):delete f[P]:f[P]=y:T(B=!(B=f[P])||!d(f,P)?f[P]={}:B,k,y)):y===void 0?a(f)&&!isNaN(parseInt(m))?f.splice(m,1):delete f[m]:f[m]=y}}function H(f){var m,y={};for(m in f)d(f,m)&&(y[m]=f[m]);return y}var N=[].concat;function A(f){return N.apply([],f)}var Ho="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(A([8,16,32,64].map(function(f){return["Int","Uint","Float"].map(function(m){return m+f+"Array"})}))).filter(function(f){return o[f]}),_=new Set(Ho.map(function(f){return o[f]})),V=null;function ie(f){return V=new WeakMap,f=function m(y){if(!y||typeof y!="object")return y;var E=V.get(y);if(E)return E;if(a(y)){E=[],V.set(y,E);for(var F=0,P=y.length;F<P;++F)E.push(m(y[F]))}else if(_.has(y.constructor))E=y;else{var k,B=u(y);for(k in E=B===Object.prototype?{}:Object.create(B),V.set(y,E),y)d(y,k)&&(E[k]=m(y[k]))}return E}(f),V=null,f}var me={}.toString;function Te(f){return me.call(f).slice(8,-1)}var q=typeof Symbol<"u"?Symbol.iterator:"@@iterator",z=typeof q=="symbol"?function(f){var m;return f!=null&&(m=f[q])&&m.apply(f)}:function(){return null};function M(f,m){return m=f.indexOf(m),0<=m&&f.splice(m,1),0<=m}var L={};function ne(f){var m,y,E,F;if(arguments.length===1){if(a(f))return f.slice();if(this===L&&typeof f=="string")return[f];if(F=z(f)){for(y=[];!(E=F.next()).done;)y.push(E.value);return y}if(f==null)return[f];if(typeof(m=f.length)!="number")return[f];for(y=new Array(m);m--;)y[m]=f[m];return y}for(m=arguments.length,y=new Array(m);m--;)y[m]=arguments[m];return y}var we=typeof Symbol<"u"?function(f){return f[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},Xe=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],is=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Xe),Ae={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 Le(f,m){this.name=f,this.message=m}function nt(f,m){return f+". Errors: "+Object.keys(m).map(function(y){return m[y].toString()}).filter(function(y,E,F){return F.indexOf(y)===E}).join(`
|
|
30
|
+
`)}function Je(f,m,y,E){this.failures=m,this.failedKeys=E,this.successCount=y,this.message=nt(f,m)}function ht(f,m){this.name="BulkError",this.failures=Object.keys(m).map(function(y){return m[y]}),this.failuresByPos=m,this.message=nt(f,this.failures)}C(Le).from(Error).extend({toString:function(){return this.name+": "+this.message}}),C(Je).from(Le),C(ht).from(Le);var Ht=is.reduce(function(f,m){return f[m]=m+"Error",f},{}),Jt=Le,Ke=is.reduce(function(f,m){var y=m+"Error";function E(F,P){this.name=y,F?typeof F=="string"?(this.message="".concat(F).concat(P?`
|
|
31
|
+
`+P:""),this.inner=P||null):typeof F=="object"&&(this.message="".concat(F.name," ").concat(F.message),this.inner=F):(this.message=Ae[m]||y,this.inner=null)}return C(E).from(Jt),f[m]=E,f},{});Ke.Syntax=SyntaxError,Ke.Type=TypeError,Ke.Range=RangeError;var yn=Xe.reduce(function(f,m){return f[m+"Error"]=Ke[m],f},{}),Ut=is.reduce(function(f,m){return["Syntax","Type","Range"].indexOf(m)===-1&&(f[m+"Error"]=Ke[m]),f},{});function xt(){}function O(f){return f}function $(f,m){return f==null||f===O?m:function(y){return m(f(y))}}function ue(f,m){return function(){f.apply(this,arguments),m.apply(this,arguments)}}function se(f,m){return f===xt?m:function(){var y=f.apply(this,arguments);y!==void 0&&(arguments[0]=y);var E=this.onsuccess,F=this.onerror;this.onsuccess=null,this.onerror=null;var P=m.apply(this,arguments);return E&&(this.onsuccess=this.onsuccess?ue(E,this.onsuccess):E),F&&(this.onerror=this.onerror?ue(F,this.onerror):F),P!==void 0?P:y}}function j(f,m){return f===xt?m:function(){f.apply(this,arguments);var y=this.onsuccess,E=this.onerror;this.onsuccess=this.onerror=null,m.apply(this,arguments),y&&(this.onsuccess=this.onsuccess?ue(y,this.onsuccess):y),E&&(this.onerror=this.onerror?ue(E,this.onerror):E)}}function re(f,m){return f===xt?m:function(y){var E=f.apply(this,arguments);l(y,E);var F=this.onsuccess,P=this.onerror;return this.onsuccess=null,this.onerror=null,y=m.apply(this,arguments),F&&(this.onsuccess=this.onsuccess?ue(F,this.onsuccess):F),P&&(this.onerror=this.onerror?ue(P,this.onerror):P),E===void 0?y===void 0?void 0:y:l(E,y)}}function Fe(f,m){return f===xt?m:function(){return m.apply(this,arguments)!==!1&&f.apply(this,arguments)}}function De(f,m){return f===xt?m:function(){var y=f.apply(this,arguments);if(y&&typeof y.then=="function"){for(var E=this,F=arguments.length,P=new Array(F);F--;)P[F]=arguments[F];return y.then(function(){return m.apply(E,P)})}return m.apply(this,arguments)}}Ut.ModifyError=Je,Ut.DexieError=Le,Ut.BulkError=ht;var be=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Se(f){be=f}var Qe={},Ve=100,Ho=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]}(),Xe=Ho[0],is=Ho[1],Ho=Ho[2],is=is&&is.then,it=Xe&&Xe.constructor,vt=!!Ho,Tt=function(f,m){qe.push([f,m]),bn&&(queueMicrotask(Sr),bn=!1)},It=!0,bn=!0,un=[],Wn=[],Qn=O,pe={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:xt,pgp:!1,env:{},finalize:xt},ve=pe,qe=[],ft=0,Et=[];function _e(f){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var m=this._PSD=ve;if(typeof f!="function"){if(f!==Qe)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 y(E,F){try{F(function(P){if(E._state===null){if(P===E)throw new TypeError("A promise cannot be resolved with itself.");var k=E._lib&&Er();P&&typeof P.then=="function"?y(E,function(B,U){P instanceof _e?P._then(B,U):P.then(B,U)}):(E._state=!0,E._value=P,io(E)),k&&so()}},gu.bind(null,E))}catch(P){gu(E,P)}}(this,f)}var Xn={get:function(){var f=ve,m=zp;function y(E,F){var P=this,k=!f.global&&(f!==ve||m!==zp),B=k&&!Fr(),U=new _e(function(Y,Q){ka(P,new Vo(ik(E,f,k,B),ik(F,f,k,B),Y,Q,f))});return this._consoleTask&&(U._consoleTask=this._consoleTask),U}return y.prototype=Qe,y},set:function(f){g(this,"then",f&&f.prototype===Qe?Xn:{get:function(){return f},set:Xn.set})}};function Vo(f,m,y,E,F){this.onFulfilled=typeof f=="function"?f:null,this.onRejected=typeof m=="function"?m:null,this.resolve=y,this.reject=E,this.psd=F}function gu(f,m){var y,E;Wn.push(m),f._state===null&&(y=f._lib&&Er(),m=Qn(m),f._state=!1,f._value=m,E=f,un.some(function(F){return F._value===E._value})||un.push(E),io(f),y&&so())}function io(f){var m=f._listeners;f._listeners=[];for(var y=0,E=m.length;y<E;++y)ka(f,m[y]);var F=f._PSD;--F.ref||F.finalize(),ft===0&&(++ft,Tt(function(){--ft==0&&Rr()},[]))}function ka(f,m){if(f._state!==null){var y=f._state?m.onFulfilled:m.onRejected;if(y===null)return(f._state?m.resolve:m.reject)(f._value);++m.psd.ref,++ft,Tt(mu,[y,f,m])}else f._listeners.push(m)}function mu(f,m,y){try{var E,F=m._value;!m._state&&Wn.length&&(Wn=[]),E=be&&m._consoleTask?m._consoleTask.run(function(){return f(F)}):f(F),m._state||Wn.indexOf(F)!==-1||function(P){for(var k=un.length;k;)if(un[--k]._value===P._value)return un.splice(k,1)}(m),y.resolve(E)}catch(P){y.reject(P)}finally{--ft==0&&Rr(),--y.psd.ref||y.psd.finalize()}}function Sr(){Oa(pe,function(){Er()&&so()})}function Er(){var f=It;return bn=It=!1,f}function so(){var f,m,y;do for(;0<qe.length;)for(f=qe,qe=[],y=f.length,m=0;m<y;++m){var E=f[m];E[0].apply(null,E[1])}while(0<qe.length);bn=It=!0}function Rr(){var f=un;un=[],f.forEach(function(E){E._PSD.onunhandled.call(null,E._value,E)});for(var m=Et.slice(0),y=m.length;y;)m[--y]()}function Hp(f){return new _e(Qe,!1,f)}function cn(f,m){var y=ve;return function(){var E=Er(),F=ve;try{return xr(y,!0),f.apply(this,arguments)}catch(P){m&&m(P)}finally{xr(F,!1),E&&so()}}}h(_e.prototype,{then:Xn,_then:function(f,m){ka(this,new Vo(null,null,f,m,ve))},catch:function(f){if(arguments.length===1)return this.then(null,f);var m=f,y=arguments[1];return typeof m=="function"?this.then(null,function(E){return(E instanceof m?y:Hp)(E)}):this.then(null,function(E){return(E&&E.name===m?y:Hp)(E)})},finally:function(f){return this.then(function(m){return _e.resolve(f()).then(function(){return m})},function(m){return _e.resolve(f()).then(function(){return Hp(m)})})},timeout:function(f,m){var y=this;return f<1/0?new _e(function(E,F){var P=setTimeout(function(){return F(new Ke.Timeout(m))},f);y.then(E,F).finally(clearTimeout.bind(null,P))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&g(_e.prototype,Symbol.toStringTag,"Dexie.Promise"),pe.env=nk(),h(_e,{all:function(){var f=ne.apply(null,arguments).map($p);return new _e(function(m,y){f.length===0&&m([]);var E=f.length;f.forEach(function(F,P){return _e.resolve(F).then(function(k){f[P]=k,--E||m(f)},y)})})},resolve:function(f){return f instanceof _e?f:f&&typeof f.then=="function"?new _e(function(m,y){f.then(m,y)}):new _e(Qe,!0,f)},reject:Hp,race:function(){var f=ne.apply(null,arguments).map($p);return new _e(function(m,y){f.map(function(E){return _e.resolve(E).then(m,y)})})},PSD:{get:function(){return ve},set:function(f){return ve=f}},totalEchoes:{get:function(){return zp}},newPSD:Dr,usePSD:Oa,scheduler:{get:function(){return Tt},set:function(f){Tt=f}},rejectionMapper:{get:function(){return Qn},set:function(f){Qn=f}},follow:function(f,m){return new _e(function(y,E){return Dr(function(F,P){var k=ve;k.unhandleds=[],k.onunhandled=P,k.finalize=ue(function(){var B,U=this;B=function(){U.unhandleds.length===0?F():P(U.unhandleds[0])},Et.push(function Y(){B(),Et.splice(Et.indexOf(Y),1)}),++ft,Tt(function(){--ft==0&&Rr()},[])},k.finalize),f()},m,y,E)})}}),it&&(it.allSettled&&g(_e,"allSettled",function(){var f=ne.apply(null,arguments).map($p);return new _e(function(m){f.length===0&&m([]);var y=f.length,E=new Array(y);f.forEach(function(F,P){return _e.resolve(F).then(function(k){return E[P]={status:"fulfilled",value:k}},function(k){return E[P]={status:"rejected",reason:k}}).then(function(){return--y||m(E)})})})}),it.any&&typeof AggregateError<"u"&&g(_e,"any",function(){var f=ne.apply(null,arguments).map($p);return new _e(function(m,y){f.length===0&&y(new AggregateError([]));var E=f.length,F=new Array(E);f.forEach(function(P,k){return _e.resolve(P).then(function(B){return m(B)},function(B){F[k]=B,--E||y(new AggregateError(F))})})})}),it.withResolvers&&(_e.withResolvers=it.withResolvers));var Ln={awaits:0,echoes:0,id:0},Fue=0,Gp=[],Wp=0,zp=0,xue=0;function Dr(f,m,y,E){var F=ve,P=Object.create(F);return P.parent=F,P.ref=0,P.global=!1,P.id=++xue,pe.env,P.env=vt?{Promise:_e,PromiseProp:{value:_e,configurable:!0,writable:!0},all:_e.all,race:_e.race,allSettled:_e.allSettled,any:_e.any,resolve:_e.resolve,reject:_e.reject}:{},m&&l(P,m),++F.ref,P.finalize=function(){--this.parent.ref||this.parent.finalize()},E=Oa(P,f,y,E),P.ref===0&&P.finalize(),E}function vu(){return Ln.id||(Ln.id=++Fue),++Ln.awaits,Ln.echoes+=Ve,Ln.id}function Fr(){return!!Ln.awaits&&(--Ln.awaits==0&&(Ln.id=0),Ln.echoes=Ln.awaits*Ve,!0)}function $p(f){return Ln.echoes&&f&&f.constructor===it?(vu(),f.then(function(m){return Fr(),m},function(m){return Fr(),Sn(m)})):f}function Tue(){var f=Gp[Gp.length-1];Gp.pop(),xr(f,!1)}function xr(f,m){var y,E=ve;(m?!Ln.echoes||Wp++&&f===ve:!Wp||--Wp&&f===ve)||queueMicrotask(m?(function(F){++zp,Ln.echoes&&--Ln.echoes!=0||(Ln.echoes=Ln.awaits=Ln.id=0),Gp.push(ve),xr(F,!0)}).bind(null,f):Tue),f!==ve&&(ve=f,E===pe&&(pe.env=nk()),vt&&(y=pe.env.Promise,m=f.env,(E.global||f.global)&&(Object.defineProperty(o,"Promise",m.PromiseProp),y.all=m.all,y.race=m.race,y.resolve=m.resolve,y.reject=m.reject,m.allSettled&&(y.allSettled=m.allSettled),m.any&&(y.any=m.any))))}function nk(){var f=o.Promise;return vt?{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 Oa(f,m,y,E,F){var P=ve;try{return xr(f,!0),m(y,E,F)}finally{xr(P,!1)}}function ik(f,m,y,E){return typeof f!="function"?f:function(){var F=ve;y&&vu(),xr(m,!0);try{return f.apply(this,arguments)}finally{xr(F,!1),E&&queueMicrotask(Fr)}}}function Ay(f){Promise===it&&Ln.echoes===0?Wp===0?f():enqueueNativeMicroTask(f):setTimeout(f,0)}(""+is).indexOf("[native code]")===-1&&(vu=Fr=xt);var Sn=_e.reject,Ma="",Bo="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",sk="String expected.",Cu=[],Up="__dbnames",Iy="readonly",_y="readwrite";function La(f,m){return f?m?function(){return f.apply(this,arguments)&&m.apply(this,arguments)}:f:m}var ok={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function jp(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 rk(){throw Ke.Type()}function _t(f,m){try{var y=ak(f),E=ak(m);if(y!==E)return y==="Array"?1:E==="Array"?-1:y==="binary"?1:E==="binary"?-1:y==="string"?1:E==="string"?-1:y==="Date"?1:E!=="Date"?NaN:-1;switch(y){case"number":case"Date":case"string":return m<f?1:f<m?-1:0;case"binary":return function(F,P){for(var k=F.length,B=P.length,U=k<B?k:B,Y=0;Y<U;++Y)if(F[Y]!==P[Y])return F[Y]<P[Y]?-1:1;return k===B?0:k<B?-1:1}(lk(f),lk(m));case"Array":return function(F,P){for(var k=F.length,B=P.length,U=k<B?k:B,Y=0;Y<U;++Y){var Q=_t(F[Y],P[Y]);if(Q!==0)return Q}return k===B?0:k<B?-1:1}(f,m)}}catch{}return NaN}function ak(f){var m=typeof f;return m!="object"?m:ArrayBuffer.isView(f)?"binary":(f=Te(f),f==="ArrayBuffer"?"binary":f)}function lk(f){return f instanceof Uint8Array?f:ArrayBuffer.isView(f)?new Uint8Array(f.buffer,f.byteOffset,f.byteLength):new Uint8Array(f)}var uk=(on.prototype._trans=function(f,m,y){var E=this._tx||ve.trans,F=this.name,P=be&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(f==="readonly"?"read":"write"," ").concat(this.name));function k(Y,Q,G){if(!G.schema[F])throw new Ke.NotFound("Table "+F+" not part of transaction");return m(G.idbtrans,G)}var B=Er();try{var U=E&&E.db._novip===this.db._novip?E===ve.trans?E._promise(f,k,y):Dr(function(){return E._promise(f,k,y)},{trans:E,transless:ve.transless||ve}):function Y(Q,G,te,K){if(Q.idbdb&&(Q._state.openComplete||ve.letThrough||Q._vip)){var J=Q._createTransaction(G,te,Q._dbSchema);try{J.create(),Q._state.PR1398_maxLoop=3}catch(ee){return ee.name===Ht.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,G,te,K)})):Sn(ee)}return J._promise(G,function(ee,Z){return Dr(function(){return ve.trans=J,K(ee,Z,J)})}).then(function(ee){if(G==="readwrite")try{J.idbtrans.commit()}catch{}return G==="readonly"?ee:J._completion.then(function(){return ee})})}if(Q._state.openComplete)return Sn(new Ke.DatabaseClosed(Q._state.dbOpenError));if(!Q._state.isBeingOpened){if(!Q._state.autoOpen)return Sn(new Ke.DatabaseClosed);Q.open().catch(xt)}return Q._state.dbReadyPromise.then(function(){return Y(Q,G,te,K)})}(this.db,f,[this.name],k);return P&&(U._consoleTask=P,U=U.catch(function(Y){return console.trace(Y),Sn(Y)})),U}finally{B&&so()}},on.prototype.get=function(f,m){var y=this;return f&&f.constructor===Object?this.where(f).first(m):f==null?Sn(new Ke.Type("Invalid argument to Table.get()")):this._trans("readonly",function(E){return y.core.get({trans:E,key:f}).then(function(F){return y.hook.reading.fire(F)})}).then(m)},on.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 y=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 U=0;U<m.length;++U)if(m.indexOf(B.keyPath[U])===-1)return!1;return!0}return!1}).sort(function(B,U){return B.keyPath.length-U.keyPath.length})[0];if(y&&this.db._maxKey!==Ma){var P=y.keyPath.slice(0,m.length);return this.where(P).equals(P.map(function(U){return f[U]}))}!y&&be&&console.warn("The query ".concat(JSON.stringify(f)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(m.join("+"),"]"));var E=this.schema.idxByName;function F(B,U){return _t(B,U)===0}var k=m.reduce(function(G,U){var Y=G[0],Q=G[1],G=E[U],te=f[U];return[Y||G,Y||!G?La(Q,G&&G.multi?function(K){return K=x(K,U),a(K)&&K.some(function(J){return F(te,J)})}:function(K){return F(te,x(K,U))}):Q]},[null,null]),P=k[0],k=k[1];return P?this.where(P.name).equals(f[P.keyPath]).filter(k):y?this.filter(k):this.where(m).equals("")},on.prototype.filter=function(f){return this.toCollection().and(f)},on.prototype.count=function(f){return this.toCollection().count(f)},on.prototype.offset=function(f){return this.toCollection().offset(f)},on.prototype.limit=function(f){return this.toCollection().limit(f)},on.prototype.each=function(f){return this.toCollection().each(f)},on.prototype.toArray=function(f){return this.toCollection().toArray(f)},on.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},on.prototype.orderBy=function(f){return new this.db.Collection(new this.db.WhereClause(this,a(f)?"[".concat(f.join("+"),"]"):f))},on.prototype.reverse=function(){return this.toCollection().reverse()},on.prototype.mapToClass=function(f){var m,y=this.db,E=this.name;function F(){return m!==null&&m.apply(this,arguments)||this}(this.schema.mappedClass=f).prototype instanceof rk&&(function(U,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=U}n(U,Y),U.prototype=Y===null?Object.create(Y):(Q.prototype=Y.prototype,new Q)}(F,m=f),Object.defineProperty(F.prototype,"db",{get:function(){return y},enumerable:!1,configurable:!0}),F.prototype.table=function(){return E},f=F);for(var P=new Set,k=f.prototype;k;k=u(k))Object.getOwnPropertyNames(k).forEach(function(U){return P.add(U)});function B(U){if(!U)return U;var Y,Q=Object.create(f.prototype);for(Y in U)if(!P.has(Y))try{Q[Y]=U[Y]}catch{}return Q}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=B,this.hook("reading",B),f},on.prototype.defineClass=function(){return this.mapToClass(function(f){l(this,f)})},on.prototype.add=function(f,m){var y=this,E=this.schema.primKey,F=E.auto,P=E.keyPath,k=f;return P&&F&&(k=jp(P)(f)),this._trans("readwrite",function(B){return y.core.mutate({trans:B,type:"add",keys:m!=null?[m]:null,values:[k]})}).then(function(B){return B.numFailures?_e.reject(B.failures[0]):B.lastResult}).then(function(B){if(P)try{T(f,P,B)}catch{}return B})},on.prototype.update=function(f,m){return typeof f!="object"||a(f)?this.where(":id").equals(f).modify(m):(f=x(f,this.schema.primKey.keyPath),f===void 0?Sn(new Ke.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(f).modify(m))},on.prototype.put=function(f,m){var y=this,E=this.schema.primKey,F=E.auto,P=E.keyPath,k=f;return P&&F&&(k=jp(P)(f)),this._trans("readwrite",function(B){return y.core.mutate({trans:B,type:"put",values:[k],keys:m!=null?[m]:null})}).then(function(B){return B.numFailures?_e.reject(B.failures[0]):B.lastResult}).then(function(B){if(P)try{T(f,P,B)}catch{}return B})},on.prototype.delete=function(f){var m=this;return this._trans("readwrite",function(y){return m.core.mutate({trans:y,type:"delete",keys:[f]})}).then(function(y){return y.numFailures?_e.reject(y.failures[0]):void 0})},on.prototype.clear=function(){var f=this;return this._trans("readwrite",function(m){return f.core.mutate({trans:m,type:"deleteRange",range:ok})}).then(function(m){return m.numFailures?_e.reject(m.failures[0]):void 0})},on.prototype.bulkGet=function(f){var m=this;return this._trans("readonly",function(y){return m.core.getMany({keys:f,trans:y}).then(function(E){return E.map(function(F){return m.hook.reading.fire(F)})})})},on.prototype.bulkAdd=function(f,m,y){var E=this,F=Array.isArray(m)?m:void 0,P=(y=y||(F?void 0:m))?y.allKeys:void 0;return this._trans("readwrite",function(k){var Y=E.schema.primKey,B=Y.auto,Y=Y.keyPath;if(Y&&F)throw new Ke.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(F&&F.length!==f.length)throw new Ke.InvalidArgument("Arguments objects and keys must have the same length");var U=f.length,Y=Y&&B?f.map(jp(Y)):f;return E.core.mutate({trans:k,type:"add",keys:F,values:Y,wantResults:P}).then(function(J){var G=J.numFailures,te=J.results,K=J.lastResult,J=J.failures;if(G===0)return P?te:K;throw new ht("".concat(E.name,".bulkAdd(): ").concat(G," of ").concat(U," operations failed"),J)})})},on.prototype.bulkPut=function(f,m,y){var E=this,F=Array.isArray(m)?m:void 0,P=(y=y||(F?void 0:m))?y.allKeys:void 0;return this._trans("readwrite",function(k){var Y=E.schema.primKey,B=Y.auto,Y=Y.keyPath;if(Y&&F)throw new Ke.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(F&&F.length!==f.length)throw new Ke.InvalidArgument("Arguments objects and keys must have the same length");var U=f.length,Y=Y&&B?f.map(jp(Y)):f;return E.core.mutate({trans:k,type:"put",keys:F,values:Y,wantResults:P}).then(function(J){var G=J.numFailures,te=J.results,K=J.lastResult,J=J.failures;if(G===0)return P?te:K;throw new ht("".concat(E.name,".bulkPut(): ").concat(G," of ").concat(U," operations failed"),J)})})},on.prototype.bulkUpdate=function(f){var m=this,y=this.core,E=f.map(function(k){return k.key}),F=f.map(function(k){return k.changes}),P=[];return this._trans("readwrite",function(k){return y.getMany({trans:k,keys:E,cache:"clone"}).then(function(B){var U=[],Y=[];f.forEach(function(G,te){var K=G.key,J=G.changes,ee=B[te];if(ee){for(var Z=0,ae=Object.keys(J);Z<ae.length;Z++){var de=ae[Z],he=J[de];if(de===m.schema.primKey.keyPath){if(_t(he,K)!==0)throw new Ke.Constraint("Cannot update primary key in bulkUpdate()")}else T(ee,de,he)}P.push(te),U.push(K),Y.push(ee)}});var Q=U.length;return y.mutate({trans:k,type:"put",keys:U,values:Y,updates:{keys:E,changeSpecs:F}}).then(function(G){var te=G.numFailures,K=G.failures;if(te===0)return Q;for(var J=0,ee=Object.keys(K);J<ee.length;J++){var Z,ae=ee[J],de=P[Number(ae)];de!=null&&(Z=K[ae],delete K[ae],K[de]=Z)}throw new ht("".concat(m.name,".bulkUpdate(): ").concat(te," of ").concat(Q," operations failed"),K)})})})},on.prototype.bulkDelete=function(f){var m=this,y=f.length;return this._trans("readwrite",function(E){return m.core.mutate({trans:E,type:"delete",keys:f})}).then(function(k){var F=k.numFailures,P=k.lastResult,k=k.failures;if(F===0)return P;throw new ht("".concat(m.name,".bulkDelete(): ").concat(F," of ").concat(y," operations failed"),k)})},on);function on(){}function Rd(f){function m(k,B){if(B){for(var U=arguments.length,Y=new Array(U-1);--U;)Y[U-1]=arguments[U];return y[k].subscribe.apply(null,Y),f}if(typeof k=="string")return y[k]}var y={};m.addEventType=P;for(var E=1,F=arguments.length;E<F;++E)P(arguments[E]);return m;function P(k,B,U){if(typeof k!="object"){var Y;B=B||Fe;var Q={subscribers:[],fire:U=U||xt,subscribe:function(G){Q.subscribers.indexOf(G)===-1&&(Q.subscribers.push(G),Q.fire=B(Q.fire,G))},unsubscribe:function(G){Q.subscribers=Q.subscribers.filter(function(te){return te!==G}),Q.fire=Q.subscribers.reduce(B,U)}};return y[k]=m[k]=Q}r(Y=k).forEach(function(G){var te=Y[G];if(a(te))P(G,Y[G][0],Y[G][1]);else{if(te!=="asap")throw new Ke.InvalidArgument("Invalid event config");var K=P(G,O,function(){for(var J=arguments.length,ee=new Array(J);J--;)ee[J]=arguments[J];K.subscribers.forEach(function(Z){R(function(){Z.apply(null,ee)})})})}})}}function Dd(f,m){return C(m).from({prototype:f}),m}function wu(f,m){return!(f.filter||f.algorithm||f.or)&&(m?f.justLimit:!f.replayFilter)}function ky(f,m){f.filter=La(f.filter,m)}function Oy(f,m,y){var E=f.replayFilter;f.replayFilter=E?function(){return La(E(),m())}:m,f.justLimit=y&&!E}function Kp(f,m){if(f.isPrimKey)return m.primaryKey;var y=m.getIndexByKeyPath(f.index);if(!y)throw new Ke.Schema("KeyPath "+f.index+" on object store "+m.name+" is not indexed");return y}function ck(f,m,y){var E=Kp(f,m.schema);return m.openCursor({trans:y,values:!f.keysOnly,reverse:f.dir==="prev",unique:!!f.unique,query:{index:E,range:f.range}})}function qp(f,m,y,E){var F=f.replayFilter?La(f.filter,f.replayFilter()):f.filter;if(f.or){var P={},k=function(B,U,Y){var Q,G;F&&!F(U,Y,function(te){return U.stop(te)},function(te){return U.fail(te)})||((G=""+(Q=U.primaryKey))=="[object ArrayBuffer]"&&(G=""+new Uint8Array(Q)),d(P,G)||(P[G]=!0,m(B,U,Y)))};return Promise.all([f.or._iterate(k,y),dk(ck(f,E,y),f.algorithm,k,!f.keysOnly&&f.valueMapper)])}return dk(ck(f,E,y),La(f.algorithm,F),m,!f.keysOnly&&f.valueMapper)}function dk(f,m,y,E){var F=cn(E?function(P,k,B){return y(E(P),k,B)}:y);return f.then(function(P){if(P)return P.start(function(){var k=function(){return P.continue()};m&&!m(P,function(B){return k=B},function(B){P.stop(B),k=xt},function(B){P.fail(B),k=xt})||F(P.value,P,function(B){return k=B}),k()})})}var Ho=Symbol(),Fd=(hk.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 y=this.remove;if(a(y))return a(f)?f.filter(function(E){return!y.includes(E)}).sort():[];if(typeof y=="number")return Number(f)-y;if(typeof y=="bigint")try{return BigInt(f)-y}catch{return BigInt(0)-y}throw new TypeError("Invalid subtrahend ".concat(y))}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},hk);function hk(f){Object.assign(this,f)}var Pue=(Nt.prototype._read=function(f,m){var y=this._ctx;return y.error?y.table._trans(null,Sn.bind(null,y.error)):y.table._trans("readonly",f).then(m)},Nt.prototype._write=function(f){var m=this._ctx;return m.error?m.table._trans(null,Sn.bind(null,m.error)):m.table._trans("readwrite",f,"locked")},Nt.prototype._addAlgorithm=function(f){var m=this._ctx;m.algorithm=La(m.algorithm,f)},Nt.prototype._iterate=function(f,m){return qp(this._ctx,f,m,this._ctx.table.core)},Nt.prototype.clone=function(f){var m=Object.create(this.constructor.prototype),y=Object.create(this._ctx);return f&&l(y,f),m._ctx=y,m},Nt.prototype.raw=function(){return this._ctx.valueMapper=null,this},Nt.prototype.each=function(f){var m=this._ctx;return this._read(function(y){return qp(m,f,y,m.table.core)})},Nt.prototype.count=function(f){var m=this;return this._read(function(y){var E=m._ctx,F=E.table.core;if(wu(E,!0))return F.count({trans:y,query:{index:Kp(E,F.schema),range:E.range}}).then(function(k){return Math.min(k,E.limit)});var P=0;return qp(E,function(){return++P,!1},y,F).then(function(){return P})}).then(f)},Nt.prototype.sortBy=function(f,m){var y=f.split(".").reverse(),E=y[0],F=y.length-1;function P(U,Y){return Y?P(U[y[Y]],Y-1):U[E]}var k=this._ctx.dir==="next"?1:-1;function B(U,Y){return _t(P(U,F),P(Y,F))*k}return this.toArray(function(U){return U.sort(B)}).then(m)},Nt.prototype.toArray=function(f){var m=this;return this._read(function(y){var E=m._ctx;if(E.dir==="next"&&wu(E,!0)&&0<E.limit){var F=E.valueMapper,P=Kp(E,E.table.core.schema);return E.table.core.query({trans:y,limit:E.limit,values:!0,query:{index:P,range:E.range}}).then(function(B){return B=B.result,F?B.map(F):B})}var k=[];return qp(E,function(B){return k.push(B)},y,E.table.core).then(function(){return k})},f)},Nt.prototype.offset=function(f){var m=this._ctx;return f<=0||(m.offset+=f,wu(m)?Oy(m,function(){var y=f;return function(E,F){return y===0||(y===1?--y:F(function(){E.advance(y),y=0}),!1)}}):Oy(m,function(){var y=f;return function(){return--y<0}})),this},Nt.prototype.limit=function(f){return this._ctx.limit=Math.min(this._ctx.limit,f),Oy(this._ctx,function(){var m=f;return function(y,E,F){return--m<=0&&E(F),0<=m}},!0),this},Nt.prototype.until=function(f,m){return ky(this._ctx,function(y,E,F){return!f(y.value)||(E(F),m)}),this},Nt.prototype.first=function(f){return this.limit(1).toArray(function(m){return m[0]}).then(f)},Nt.prototype.last=function(f){return this.reverse().first(f)},Nt.prototype.filter=function(f){var m;return ky(this._ctx,function(y){return f(y.value)}),(m=this._ctx).isMatch=La(m.isMatch,f),this},Nt.prototype.and=function(f){return this.filter(f)},Nt.prototype.or=function(f){return new this.db.WhereClause(this._ctx.table,f,this)},Nt.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Nt.prototype.desc=function(){return this.reverse()},Nt.prototype.eachKey=function(f){var m=this._ctx;return m.keysOnly=!m.isMatch,this.each(function(y,E){f(E.key,E)})},Nt.prototype.eachUniqueKey=function(f){return this._ctx.unique="unique",this.eachKey(f)},Nt.prototype.eachPrimaryKey=function(f){var m=this._ctx;return m.keysOnly=!m.isMatch,this.each(function(y,E){f(E.primaryKey,E)})},Nt.prototype.keys=function(f){var m=this._ctx;m.keysOnly=!m.isMatch;var y=[];return this.each(function(E,F){y.push(F.key)}).then(function(){return y}).then(f)},Nt.prototype.primaryKeys=function(f){var m=this._ctx;if(m.dir==="next"&&wu(m,!0)&&0<m.limit)return this._read(function(E){var F=Kp(m,m.table.core.schema);return m.table.core.query({trans:E,values:!1,limit:m.limit,query:{index:F,range:m.range}})}).then(function(E){return E.result}).then(f);m.keysOnly=!m.isMatch;var y=[];return this.each(function(E,F){y.push(F.primaryKey)}).then(function(){return y}).then(f)},Nt.prototype.uniqueKeys=function(f){return this._ctx.unique="unique",this.keys(f)},Nt.prototype.firstKey=function(f){return this.limit(1).keys(function(m){return m[0]}).then(f)},Nt.prototype.lastKey=function(f){return this.reverse().firstKey(f)},Nt.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 ky(this._ctx,function(F){var E=F.primaryKey.toString(),F=d(m,E);return m[E]=!0,!F}),this},Nt.prototype.modify=function(f){var m=this,y=this._ctx;return this._write(function(E){var F,P,k;k=typeof f=="function"?f:(F=r(f),P=F.length,function(Z){for(var ae=!1,de=0;de<P;++de){var he=F[de],Ce=f[he],Oe=x(Z,he);Ce instanceof Fd?(T(Z,he,Ce.execute(Oe)),ae=!0):Oe!==Ce&&(T(Z,he,Ce),ae=!0)}return ae});var B=y.table.core,G=B.schema.primaryKey,U=G.outbound,Y=G.extractKey,Q=200,G=m.db._options.modifyChunkSize;G&&(Q=typeof G=="object"?G[B.name]||G["*"]||200:G);function te(Z,he){var de=he.failures,he=he.numFailures;J+=Z-he;for(var Ce=0,Oe=r(de);Ce<Oe.length;Ce++){var ze=Oe[Ce];K.push(de[ze])}}var K=[],J=0,ee=[];return m.clone().primaryKeys().then(function(Z){function ae(he){var Ce=Math.min(Q,Z.length-he);return B.getMany({trans:E,keys:Z.slice(he,he+Ce),cache:"immutable"}).then(function(Oe){for(var ze=[],Me=[],Ne=U?[]:null,$e=[],We=0;We<Ce;++We){var Ye=Oe[We],bt={value:ie(Ye),primKey:Z[he+We]};k.call(bt,bt.value,bt)!==!1&&(bt.value==null?$e.push(Z[he+We]):U||_t(Y(Ye),Y(bt.value))===0?(Me.push(bt.value),U&&Ne.push(Z[he+We])):($e.push(Z[he+We]),ze.push(bt.value)))}return Promise.resolve(0<ze.length&&B.mutate({trans:E,type:"add",values:ze}).then(function(Pt){for(var At in Pt.failures)$e.splice(parseInt(At),1);te(ze.length,Pt)})).then(function(){return(0<Me.length||de&&typeof f=="object")&&B.mutate({trans:E,type:"put",keys:Ne,values:Me,criteria:de,changeSpec:typeof f!="function"&&f,isAdditionalChunk:0<he}).then(function(Pt){return te(Me.length,Pt)})}).then(function(){return(0<$e.length||de&&f===My)&&B.mutate({trans:E,type:"delete",keys:$e,criteria:de,isAdditionalChunk:0<he}).then(function(Pt){return te($e.length,Pt)})}).then(function(){return Z.length>he+Ce&&ae(he+Q)})})}var de=wu(y)&&y.limit===1/0&&(typeof f!="function"||f===My)&&{index:y.index,range:y.range};return ae(0).then(function(){if(0<K.length)throw new Je("Error modifying one or more objects",K,J,ee);return Z.length})})})},Nt.prototype.delete=function(){var f=this._ctx,m=f.range;return wu(f)&&(f.isPrimKey||m.type===3)?this._write(function(y){var E=f.table.core.schema.primaryKey,F=m;return f.table.core.count({trans:y,query:{index:E,range:F}}).then(function(P){return f.table.core.mutate({trans:y,type:"deleteRange",range:F}).then(function(k){var B=k.failures;if(k.lastResult,k.results,k=k.numFailures,k)throw new Je("Could not delete some values",Object.keys(B).map(function(U){return B[U]}),P-k);return P-k})})}):this.modify(My)},Nt);function Nt(){}var My=function(f,m){return m.value=null};function Aue(f,m){return f<m?-1:f===m?0:1}function Iue(f,m){return m<f?-1:f===m?0:1}function Oi(f,m,y){return f=f instanceof pk?new f.Collection(f):f,f._ctx.error=new(y||TypeError)(m),f}function yu(f){return new f.Collection(f,function(){return fk("")}).limit(0)}function Yp(f,m,y,E){var F,P,k,B,U,Y,Q,G=y.length;if(!y.every(function(J){return typeof J=="string"}))return Oi(f,sk);function te(J){F=J==="next"?function(Z){return Z.toUpperCase()}:function(Z){return Z.toLowerCase()},P=J==="next"?function(Z){return Z.toLowerCase()}:function(Z){return Z.toUpperCase()},k=J==="next"?Aue:Iue;var ee=y.map(function(Z){return{lower:P(Z),upper:F(Z)}}).sort(function(Z,ae){return k(Z.lower,ae.lower)});B=ee.map(function(Z){return Z.upper}),U=ee.map(function(Z){return Z.lower}),Q=(Y=J)==="next"?"":E}te("next"),f=new f.Collection(f,function(){return Tr(B[0],U[G-1]+E)}),f._ondirectionchange=function(J){te(J)};var K=0;return f._addAlgorithm(function(J,ee,Z){var ae=J.key;if(typeof ae!="string")return!1;var de=P(ae);if(m(de,U,K))return!0;for(var he=null,Ce=K;Ce<G;++Ce){var Oe=function(ze,Me,Ne,$e,We,Ye){for(var bt=Math.min(ze.length,$e.length),Pt=-1,At=0;At<bt;++At){var Mi=Me[At];if(Mi!==$e[At])return We(ze[At],Ne[At])<0?ze.substr(0,At)+Ne[At]+Ne.substr(At+1):We(ze[At],$e[At])<0?ze.substr(0,At)+$e[At]+Ne.substr(At+1):0<=Pt?ze.substr(0,Pt)+Me[Pt]+Ne.substr(Pt+1):null;We(ze[At],Mi)<0&&(Pt=At)}return bt<$e.length&&Ye==="next"?ze+Ne.substr(ze.length):bt<ze.length&&Ye==="prev"?ze.substr(0,Ne.length):Pt<0?null:ze.substr(0,Pt)+$e[Pt]+Ne.substr(Pt+1)}(ae,de,B[Ce],U[Ce],k,Y);Oe===null&&he===null?K=Ce+1:(he===null||0<k(he,Oe))&&(he=Oe)}return ee(he!==null?function(){J.continue(he+Q)}:Z),!1}),f}function Tr(f,m,y,E){return{type:2,lower:f,upper:m,lowerOpen:y,upperOpen:E}}function fk(f){return{type:1,lower:f,upper:f}}var pk=(Object.defineProperty(Nn.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Nn.prototype.between=function(f,m,y,E){y=y!==!1,E=E===!0;try{return 0<this._cmp(f,m)||this._cmp(f,m)===0&&(y||E)&&(!y||!E)?yu(this):new this.Collection(this,function(){return Tr(f,m,!y,!E)})}catch{return Oi(this,Bo)}},Nn.prototype.equals=function(f){return f==null?Oi(this,Bo):new this.Collection(this,function(){return fk(f)})},Nn.prototype.above=function(f){return f==null?Oi(this,Bo):new this.Collection(this,function(){return Tr(f,void 0,!0)})},Nn.prototype.aboveOrEqual=function(f){return f==null?Oi(this,Bo):new this.Collection(this,function(){return Tr(f,void 0,!1)})},Nn.prototype.below=function(f){return f==null?Oi(this,Bo):new this.Collection(this,function(){return Tr(void 0,f,!1,!0)})},Nn.prototype.belowOrEqual=function(f){return f==null?Oi(this,Bo):new this.Collection(this,function(){return Tr(void 0,f)})},Nn.prototype.startsWith=function(f){return typeof f!="string"?Oi(this,sk):this.between(f,f+Ma,!0,!0)},Nn.prototype.startsWithIgnoreCase=function(f){return f===""?this.startsWith(f):Yp(this,function(m,y){return m.indexOf(y[0])===0},[f],Ma)},Nn.prototype.equalsIgnoreCase=function(f){return Yp(this,function(m,y){return m===y[0]},[f],"")},Nn.prototype.anyOfIgnoreCase=function(){var f=ne.apply(L,arguments);return f.length===0?yu(this):Yp(this,function(m,y){return y.indexOf(m)!==-1},f,"")},Nn.prototype.startsWithAnyOfIgnoreCase=function(){var f=ne.apply(L,arguments);return f.length===0?yu(this):Yp(this,function(m,y){return y.some(function(E){return m.indexOf(E)===0})},f,Ma)},Nn.prototype.anyOf=function(){var f=this,m=ne.apply(L,arguments),y=this._cmp;try{m.sort(y)}catch{return Oi(this,Bo)}if(m.length===0)return yu(this);var E=new this.Collection(this,function(){return Tr(m[0],m[m.length-1])});E._ondirectionchange=function(P){y=P==="next"?f._ascending:f._descending,m.sort(y)};var F=0;return E._addAlgorithm(function(P,k,B){for(var U=P.key;0<y(U,m[F]);)if(++F===m.length)return k(B),!1;return y(U,m[F])===0||(k(function(){P.continue(m[F])}),!1)}),E},Nn.prototype.notEqual=function(f){return this.inAnyRange([[-1/0,f],[f,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Nn.prototype.noneOf=function(){var f=ne.apply(L,arguments);if(f.length===0)return new this.Collection(this);try{f.sort(this._ascending)}catch{return Oi(this,Bo)}var m=f.reduce(function(y,E){return y?y.concat([[y[y.length-1][1],E]]):[[-1/0,E]]},null);return m.push([f[f.length-1],this.db._maxKey]),this.inAnyRange(m,{includeLowers:!1,includeUppers:!1})},Nn.prototype.inAnyRange=function(ae,m){var y=this,E=this._cmp,F=this._ascending,P=this._descending,k=this._min,B=this._max;if(ae.length===0)return yu(this);if(!ae.every(function(de){return de[0]!==void 0&&de[1]!==void 0&&F(de[0],de[1])<=0}))return Oi(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Ke.InvalidArgument);var U=!m||m.includeLowers!==!1,Y=m&&m.includeUppers===!0,Q,G=F;function te(de,he){return G(de[0],he[0])}try{(Q=ae.reduce(function(de,he){for(var Ce=0,Oe=de.length;Ce<Oe;++Ce){var ze=de[Ce];if(E(he[0],ze[1])<0&&0<E(he[1],ze[0])){ze[0]=k(ze[0],he[0]),ze[1]=B(ze[1],he[1]);break}}return Ce===Oe&&de.push(he),de},[])).sort(te)}catch{return Oi(this,Bo)}var K=0,J=Y?function(de){return 0<F(de,Q[K][1])}:function(de){return 0<=F(de,Q[K][1])},ee=U?function(de){return 0<P(de,Q[K][0])}:function(de){return 0<=P(de,Q[K][0])},Z=J,ae=new this.Collection(this,function(){return Tr(Q[0][0],Q[Q.length-1][1],!U,!Y)});return ae._ondirectionchange=function(de){G=de==="next"?(Z=J,F):(Z=ee,P),Q.sort(te)},ae._addAlgorithm(function(de,he,Ce){for(var Oe,ze=de.key;Z(ze);)if(++K===Q.length)return he(Ce),!1;return!J(Oe=ze)&&!ee(Oe)||(y._cmp(ze,Q[K][1])===0||y._cmp(ze,Q[K][0])===0||he(function(){G===F?de.continue(Q[K][0]):de.continue(Q[K][1])}),!1)}),ae},Nn.prototype.startsWithAnyOf=function(){var f=ne.apply(L,arguments);return f.every(function(m){return typeof m=="string"})?f.length===0?yu(this):this.inAnyRange(f.map(function(m){return[m,m+Ma]})):Oi(this,"startsWithAnyOf() only works with strings")},Nn);function Nn(){}function oo(f){return cn(function(m){return xd(m),f(m.target.error),!1})}function xd(f){f.stopPropagation&&f.stopPropagation(),f.preventDefault&&f.preventDefault()}var Td="storagemutated",Ly="x-storagemutated-1",Pr=Rd(null,Td),_ue=(ro.prototype._lock=function(){return w(!ve.global),++this._reculock,this._reculock!==1||ve.global||(ve.lockOwnerFor=this),this},ro.prototype._unlock=function(){if(w(!ve.global),--this._reculock==0)for(ve.global||(ve.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var f=this._blockedFuncs.shift();try{Oa(f[1],f[0])}catch{}}return this},ro.prototype._locked=function(){return this._reculock&&ve.lockOwnerFor!==this},ro.prototype.create=function(f){var m=this;if(!this.mode)return this;var y=this.db.idbdb,E=this.db._state.dbOpenError;if(w(!this.idbtrans),!f&&!y)switch(E&&E.name){case"DatabaseClosedError":throw new Ke.DatabaseClosed(E);case"MissingAPIError":throw new Ke.MissingAPI(E.message,E);default:throw new Ke.OpenFailed(E)}if(!this.active)throw new Ke.TransactionInactive;return w(this._completion._state===null),(f=this.idbtrans=f||(this.db.core||y).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=cn(function(F){xd(F),m._reject(f.error)}),f.onabort=cn(function(F){xd(F),m.active&&m._reject(new Ke.Abort(f.error)),m.active=!1,m.on("abort").fire(F)}),f.oncomplete=cn(function(){m.active=!1,m._resolve(),"mutatedParts"in f&&Pr.storagemutated.fire(f.mutatedParts)}),this},ro.prototype._promise=function(f,m,y){var E=this;if(f==="readwrite"&&this.mode!=="readwrite")return Sn(new Ke.ReadOnly("Transaction is readonly"));if(!this.active)return Sn(new Ke.TransactionInactive);if(this._locked())return new _e(function(P,k){E._blockedFuncs.push([function(){E._promise(f,m,y).then(P,k)},ve])});if(y)return Dr(function(){var P=new _e(function(k,B){E._lock();var U=m(k,B,E);U&&U.then&&U.then(k,B)});return P.finally(function(){return E._unlock()}),P._lib=!0,P});var F=new _e(function(P,k){var B=m(P,k,E);B&&B.then&&B.then(P,k)});return F._lib=!0,F},ro.prototype._root=function(){return this.parent?this.parent._root():this},ro.prototype.waitFor=function(f){var m,y=this._root(),E=_e.resolve(f);y._waitingFor?y._waitingFor=y._waitingFor.then(function(){return E}):(y._waitingFor=E,y._waitingQueue=[],m=y.idbtrans.objectStore(y.storeNames[0]),function P(){for(++y._spinCount;y._waitingQueue.length;)y._waitingQueue.shift()();y._waitingFor&&(m.get(-1/0).onsuccess=P)}());var F=y._waitingFor;return new _e(function(P,k){E.then(function(B){return y._waitingQueue.push(cn(P.bind(null,B)))},function(B){return y._waitingQueue.push(cn(k.bind(null,B)))}).finally(function(){y._waitingFor===F&&(y._waitingFor=null)})})},ro.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Ke.Abort))},ro.prototype.table=function(f){var m=this._memoizedTables||(this._memoizedTables={});if(d(m,f))return m[f];var y=this.schema[f];if(!y)throw new Ke.NotFound("Table "+f+" not part of transaction");return y=new this.db.Table(f,y,this),y.core=this.db.core.table(f),m[f]=y},ro);function ro(){}function Ny(f,m,y,E,F,P,k){return{name:f,keyPath:m,unique:y,multi:E,auto:F,compound:P,src:(y&&!k?"&":"")+(E?"*":"")+(F?"++":"")+gk(m)}}function gk(f){return typeof f=="string"?f:f?"["+[].join.call(f,"+")+"]":""}function Vy(f,m,y){return{name:f,primKey:m,indexes:y,mappedClass:null,idxByName:(E=function(F){return[F.name,F]},y.reduce(function(F,P,k){return k=E(P,k),k&&(F[k[0]]=k[1]),F},{}))};var E}var Pd=function(f){try{return f.only([[]]),Pd=function(){return[[]]},[[]]}catch{return Pd=function(){return Ma},Ma}};function By(f){return f==null?function(){}:typeof f=="string"?(m=f).split(".").length===1?function(y){return y[m]}:function(y){return x(y,m)}:function(y){return x(y,f)};var m}function mk(f){return[].slice.call(f)}var kue=0;function Ad(f){return f==null?":id":typeof f=="string"?f:"[".concat(f.join("+"),"]")}function Oue(f,m,U){function E(Z){if(Z.type===3)return null;if(Z.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var K=Z.lower,J=Z.upper,ee=Z.lowerOpen,Z=Z.upperOpen;return K===void 0?J===void 0?null:m.upperBound(J,!!Z):J===void 0?m.lowerBound(K,!!ee):m.bound(K,J,!!ee,!!Z)}function F(te){var K,J=te.name;return{name:J,schema:te,mutate:function(ee){var Z=ee.trans,ae=ee.type,de=ee.keys,he=ee.values,Ce=ee.range;return new Promise(function(Oe,ze){Oe=cn(Oe);var Me=Z.objectStore(J),Ne=Me.keyPath==null,$e=ae==="put"||ae==="add";if(!$e&&ae!=="delete"&&ae!=="deleteRange")throw new Error("Invalid operation type: "+ae);var We,Ye=(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(Ye===0)return Oe({numFailures:0,failures:{},results:[],lastResult:void 0});function bt(hi){++Mi,xd(hi)}var Pt=[],At=[],Mi=0;if(ae==="deleteRange"){if(Ce.type===4)return Oe({numFailures:Mi,failures:At,results:[],lastResult:void 0});Ce.type===3?Pt.push(We=Me.clear()):Pt.push(We=Me.delete(E(Ce)))}else{var Ne=$e?Ne?[he,de]:[he,null]:[de,null],Ct=Ne[0],ti=Ne[1];if($e)for(var ni=0;ni<Ye;++ni)Pt.push(We=ti&&ti[ni]!==void 0?Me[ae](Ct[ni],ti[ni]):Me[ae](Ct[ni])),We.onerror=bt;else for(ni=0;ni<Ye;++ni)Pt.push(We=Me[ae](Ct[ni])),We.onerror=bt}function lg(hi){hi=hi.target.result,Pt.forEach(function(Ba,ib){return Ba.error!=null&&(At[ib]=Ba.error)}),Oe({numFailures:Mi,failures:At,results:ae==="delete"?de:Pt.map(function(Ba){return Ba.result}),lastResult:hi})}We.onerror=function(hi){bt(hi),lg(hi)},We.onsuccess=lg})},getMany:function(ee){var Z=ee.trans,ae=ee.keys;return new Promise(function(de,he){de=cn(de);for(var Ce,Oe=Z.objectStore(J),ze=ae.length,Me=new Array(ze),Ne=0,$e=0,We=function(Pt){Pt=Pt.target,Me[Pt._pos]=Pt.result,++$e===Ne&&de(Me)},Ye=oo(he),bt=0;bt<ze;++bt)ae[bt]!=null&&((Ce=Oe.get(ae[bt]))._pos=bt,Ce.onsuccess=We,Ce.onerror=Ye,++Ne);Ne===0&&de(Me)})},get:function(ee){var Z=ee.trans,ae=ee.key;return new Promise(function(de,he){de=cn(de);var Ce=Z.objectStore(J).get(ae);Ce.onsuccess=function(Oe){return de(Oe.target.result)},Ce.onerror=oo(he)})},query:(K=Y,function(ee){return new Promise(function(Z,ae){Z=cn(Z);var de,he,Ce,Ne=ee.trans,Oe=ee.values,ze=ee.limit,We=ee.query,Me=ze===1/0?void 0:ze,$e=We.index,We=We.range,Ne=Ne.objectStore(J),$e=$e.isPrimaryKey?Ne:Ne.index($e.name),We=E(We);if(ze===0)return Z({result:[]});K?((Me=Oe?$e.getAll(We,Me):$e.getAllKeys(We,Me)).onsuccess=function(Ye){return Z({result:Ye.target.result})},Me.onerror=oo(ae)):(de=0,he=!Oe&&"openKeyCursor"in $e?$e.openKeyCursor(We):$e.openCursor(We),Ce=[],he.onsuccess=function(Ye){var bt=he.result;return bt?(Ce.push(Oe?bt.value:bt.primaryKey),++de===ze?Z({result:Ce}):void bt.continue()):Z({result:Ce})},he.onerror=oo(ae))})}),openCursor:function(ee){var Z=ee.trans,ae=ee.values,de=ee.query,he=ee.reverse,Ce=ee.unique;return new Promise(function(Oe,ze){Oe=cn(Oe);var $e=de.index,Me=de.range,Ne=Z.objectStore(J),Ne=$e.isPrimaryKey?Ne:Ne.index($e.name),$e=he?Ce?"prevunique":"prev":Ce?"nextunique":"next",We=!ae&&"openKeyCursor"in Ne?Ne.openKeyCursor(E(Me),$e):Ne.openCursor(E(Me),$e);We.onerror=oo(ze),We.onsuccess=cn(function(Ye){var bt,Pt,At,Mi,Ct=We.result;Ct?(Ct.___id=++kue,Ct.done=!1,bt=Ct.continue.bind(Ct),Pt=(Pt=Ct.continuePrimaryKey)&&Pt.bind(Ct),At=Ct.advance.bind(Ct),Mi=function(){throw new Error("Cursor not stopped")},Ct.trans=Z,Ct.stop=Ct.continue=Ct.continuePrimaryKey=Ct.advance=function(){throw new Error("Cursor not started")},Ct.fail=cn(ze),Ct.next=function(){var ti=this,ni=1;return this.start(function(){return ni--?ti.continue():ti.stop()}).then(function(){return ti})},Ct.start=function(ti){function ni(){if(We.result)try{ti()}catch(hi){Ct.fail(hi)}else Ct.done=!0,Ct.start=function(){throw new Error("Cursor behind last entry")},Ct.stop()}var lg=new Promise(function(hi,Ba){hi=cn(hi),We.onerror=oo(Ba),Ct.fail=Ba,Ct.stop=function(ib){Ct.stop=Ct.continue=Ct.continuePrimaryKey=Ct.advance=Mi,hi(ib)}});return We.onsuccess=cn(function(hi){We.onsuccess=ni,ni()}),Ct.continue=bt,Ct.continuePrimaryKey=Pt,Ct.advance=At,ni(),lg},Oe(Ct)):Oe(null)},ze)})},count:function(ee){var Z=ee.query,ae=ee.trans,de=Z.index,he=Z.range;return new Promise(function(Ce,Oe){var ze=ae.objectStore(J),Me=de.isPrimaryKey?ze:ze.index(de.name),ze=E(he),Me=ze?Me.count(ze):Me.count();Me.onsuccess=cn(function(Ne){return Ce(Ne.target.result)}),Me.onerror=oo(Oe)})}}}var P,k,B,Q=(k=U,B=mk((P=f).objectStoreNames),{schema:{name:P.name,tables:B.map(function(te){return k.objectStore(te)}).map(function(te){var K=te.keyPath,Z=te.autoIncrement,J=a(K),ee={},Z={name:te.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:K==null,compound:J,keyPath:K,autoIncrement:Z,unique:!0,extractKey:By(K)},indexes:mk(te.indexNames).map(function(ae){return te.index(ae)}).map(function(Ce){var de=Ce.name,he=Ce.unique,Oe=Ce.multiEntry,Ce=Ce.keyPath,Oe={name:de,compound:a(Ce),keyPath:Ce,unique:he,multiEntry:Oe,extractKey:By(Ce)};return ee[Ad(Ce)]=Oe}),getIndexByKeyPath:function(ae){return ee[Ad(ae)]}};return ee[":id"]=Z.primaryKey,K!=null&&(ee[Ad(K)]=Z.primaryKey),Z})},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)}),U=Q.schema,Y=Q.hasGetAll,Q=U.tables.map(F),G={};return Q.forEach(function(te){return G[te.name]=te}),{stack:"dbcore",transaction:f.transaction.bind(f),table:function(te){if(!G[te])throw new Error("Table '".concat(te,"' not found"));return G[te]},MIN_KEY:-1/0,MAX_KEY:Pd(m),schema:U}}function Mue(f,m,y,E){var F=y.IDBKeyRange;return y.indexedDB,{dbcore:(E=Oue(m,F,E),f.dbcore.reduce(function(P,k){return k=k.create,i(i({},P),k(P))},E))}}function Zp(f,E){var y=E.db,E=Mue(f._middlewares,y,f._deps,E);f.core=E.dbcore,f.tables.forEach(function(F){var P=F.name;f.core.schema.tables.some(function(k){return k.name===P})&&(F.core=f.core.table(P),f[P]instanceof f.Table&&(f[P].core=F.core))})}function Jp(f,m,y,E){y.forEach(function(F){var P=E[F];m.forEach(function(k){var B=function U(Y,Q){return v(Y,Q)||(Y=u(Y))&&U(Y,Q)}(k,F);(!B||"value"in B&&B.value===void 0)&&(k===f.Transaction.prototype||k instanceof f.Transaction?g(k,F,{get:function(){return this.table(F)},set:function(U){p(this,F,{value:U,writable:!0,configurable:!0,enumerable:!0})}}):k[F]=new f.Table(F,P))})})}function Hy(f,m){m.forEach(function(y){for(var E in y)y[E]instanceof f.Table&&delete y[E]})}function Lue(f,m){return f._cfg.version-m._cfg.version}function Nue(f,m,y,E){var F=f._dbSchema;y.objectStoreNames.contains("$meta")&&!F.$meta&&(F.$meta=Vy("$meta",Ck("")[0],[]),f._storeNames.push("$meta"));var P=f._createTransaction("readwrite",f._storeNames,F);P.create(y),P._completion.catch(E);var k=P._reject.bind(P),B=ve.transless||ve;Dr(function(){return ve.trans=P,ve.transless=B,m!==0?(Zp(f,y),Y=m,((U=P).storeNames.includes("$meta")?U.table("$meta").get("version").then(function(Q){return Q??Y}):_e.resolve(Y)).then(function(Q){return te=Q,K=P,J=y,ee=[],Q=(G=f)._versions,Z=G._dbSchema=Xp(0,G.idbdb,J),(Q=Q.filter(function(ae){return ae._cfg.version>=te})).length!==0?(Q.forEach(function(ae){ee.push(function(){var de=Z,he=ae._cfg.dbschema;eg(G,de,J),eg(G,he,J),Z=G._dbSchema=he;var Ce=Gy(de,he);Ce.add.forEach(function($e){Wy(J,$e[0],$e[1].primKey,$e[1].indexes)}),Ce.change.forEach(function($e){if($e.recreate)throw new Ke.Upgrade("Not yet support for changing primary key");var We=J.objectStore($e.name);$e.add.forEach(function(Ye){return Qp(We,Ye)}),$e.change.forEach(function(Ye){We.deleteIndex(Ye.name),Qp(We,Ye)}),$e.del.forEach(function(Ye){return We.deleteIndex(Ye)})});var Oe=ae._cfg.contentUpgrade;if(Oe&&ae._cfg.version>te){Zp(G,J),K._memoizedTables={};var ze=H(he);Ce.del.forEach(function($e){ze[$e]=de[$e]}),Hy(G,[G.Transaction.prototype]),Jp(G,[G.Transaction.prototype],r(ze),ze),K.schema=ze;var Me,Ne=we(Oe);return Ne&&vu(),Ce=_e.follow(function(){var $e;(Me=Oe(K))&&Ne&&($e=Fr.bind(null,null),Me.then($e,$e))}),Me&&typeof Me.then=="function"?_e.resolve(Me):Ce.then(function(){return Me})}}),ee.push(function(de){var he,Ce,Oe=ae._cfg.dbschema;he=Oe,Ce=de,[].slice.call(Ce.db.objectStoreNames).forEach(function(ze){return he[ze]==null&&Ce.db.deleteObjectStore(ze)}),Hy(G,[G.Transaction.prototype]),Jp(G,[G.Transaction.prototype],G._storeNames,G._dbSchema),K.schema=G._dbSchema}),ee.push(function(de){G.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(G.idbdb.version/10)===ae._cfg.version?(G.idbdb.deleteObjectStore("$meta"),delete G._dbSchema.$meta,G._storeNames=G._storeNames.filter(function(he){return he!=="$meta"})):de.objectStore("$meta").put(ae._cfg.version,"version"))})}),function ae(){return ee.length?_e.resolve(ee.shift()(K.idbtrans)).then(ae):_e.resolve()}().then(function(){vk(Z,J)})):_e.resolve();var G,te,K,J,ee,Z}).catch(k)):(r(F).forEach(function(Q){Wy(y,Q,F[Q].primKey,F[Q].indexes)}),Zp(f,y),void _e.follow(function(){return f.on.populate.fire(P)}).catch(k));var U,Y})}function Vue(f,m){vk(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 y=Xp(0,f.idbdb,m);eg(f,f._dbSchema,m);for(var E=0,F=Gy(y,f._dbSchema).change;E<F.length;E++){var P=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(U){be&&console.debug("Dexie upgrade patch: Creating missing index ".concat(k.name,".").concat(U.src)),Qp(B,U)})}(F[E]);if(typeof P=="object")return P.value}}function Gy(f,m){var y,E={del:[],add:[],change:[]};for(y in f)m[y]||E.del.push(y);for(y in m){var F=f[y],P=m[y];if(F){var k={name:y,def:P,recreate:!1,del:[],add:[],change:[]};if(""+(F.primKey.keyPath||"")!=""+(P.primKey.keyPath||"")||F.primKey.auto!==P.primKey.auto)k.recreate=!0,E.change.push(k);else{var B=F.idxByName,U=P.idxByName,Y=void 0;for(Y in B)U[Y]||k.del.push(Y);for(Y in U){var Q=B[Y],G=U[Y];Q?Q.src!==G.src&&k.change.push(G):k.add.push(G)}(0<k.del.length||0<k.add.length||0<k.change.length)&&E.change.push(k)}}else E.add.push([y,P])}return E}function Wy(f,m,y,E){var F=f.db.createObjectStore(m,y.keyPath?{keyPath:y.keyPath,autoIncrement:y.auto}:{autoIncrement:y.auto});return E.forEach(function(P){return Qp(F,P)}),F}function vk(f,m){r(f).forEach(function(y){m.db.objectStoreNames.contains(y)||(be&&console.debug("Dexie: Creating missing table",y),Wy(m,y,f[y].primKey,f[y].indexes))})}function Qp(f,m){f.createIndex(m.name,m.keyPath,{unique:m.unique,multiEntry:m.multi})}function Xp(f,m,y){var E={};return S(m.objectStoreNames,0).forEach(function(F){for(var P=y.objectStore(F),k=Ny(gk(Y=P.keyPath),Y||"",!0,!1,!!P.autoIncrement,Y&&typeof Y!="string",!0),B=[],U=0;U<P.indexNames.length;++U){var Q=P.index(P.indexNames[U]),Y=Q.keyPath,Q=Ny(Q.name,Y,!!Q.unique,!!Q.multiEntry,!1,Y&&typeof Y!="string",!1);B.push(Q)}E[F]=Vy(F,k,B)}),E}function eg(f,m,y){for(var E=y.db.objectStoreNames,F=0;F<E.length;++F){var P=E[F],k=y.objectStore(P);f._hasGetAll="getAll"in k;for(var B=0;B<k.indexNames.length;++B){var U=k.indexNames[B],Y=k.index(U).keyPath,Q=typeof Y=="string"?Y:"["+S(Y).join("+")+"]";!m[P]||(Y=m[P].idxByName[Q])&&(Y.name=U,delete m[P].idxByName[Q],m[P].idxByName[U]=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 Ck(f){return f.split(",").map(function(m,y){var E=(m=m.trim()).replace(/([&*]|\+\+)/g,""),F=/^\[/.test(E)?E.match(/^\[(.*)\]$/)[1].split("+"):E;return Ny(E,F||null,/\&/.test(m),/\*/.test(m),/\+\+/.test(m),a(F),y===0)})}var Bue=(tg.prototype._parseStoresSpec=function(f,m){r(f).forEach(function(y){if(f[y]!==null){var E=Ck(f[y]),F=E.shift();if(F.unique=!0,F.multi)throw new Ke.Schema("Primary key cannot be multi-valued");E.forEach(function(P){if(P.auto)throw new Ke.Schema("Only primary key can be marked as autoIncrement (++)");if(!P.keyPath)throw new Ke.Schema("Index must have a name and cannot be an empty string")}),m[y]=Vy(y,F,E)}})},tg.prototype.stores=function(y){var m=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,y):y;var y=m._versions,E={},F={};return y.forEach(function(P){l(E,P._cfg.storesSource),F=P._cfg.dbschema={},P._parseStoresSpec(E,F)}),m._dbSchema=F,Hy(m,[m._allTables,m,m.Transaction.prototype]),Jp(m,[m._allTables,m,m.Transaction.prototype,this._cfg.tables],r(F),F),m._storeNames=r(F),this},tg.prototype.upgrade=function(f){return this._cfg.contentUpgrade=De(this._cfg.contentUpgrade||xt,f),this},tg);function tg(){}function zy(f,m){var y=f._dbNamesDB;return y||(y=f._dbNamesDB=new Go(Up,{addons:[],indexedDB:f,IDBKeyRange:m})).version(1).stores({dbnames:"name"}),y.table("dbnames")}function $y(f){return f&&typeof f.databases=="function"}function Uy(f){return Dr(function(){return ve.letThrough=!0,f()})}function jy(f){return!("from"in f)}var ei=function(f,m){if(!this){var y=new ei;return f&&"d"in f&&l(y,f),y}l(this,arguments.length?{d:1,from:f,to:1<arguments.length?m:f}:{d:0})};function Id(f,m,y){var E=_t(m,y);if(!isNaN(E)){if(0<E)throw RangeError();if(jy(f))return l(f,{from:m,to:y,d:1});var F=f.l,E=f.r;if(_t(y,f.from)<0)return F?Id(F,m,y):f.l={from:m,to:y,d:1,l:null,r:null},yk(f);if(0<_t(m,f.to))return E?Id(E,m,y):f.r={from:m,to:y,d:1,l:null,r:null},yk(f);_t(m,f.from)<0&&(f.from=m,f.l=null,f.d=E?E.d+1:1),0<_t(y,f.to)&&(f.to=y,f.r=null,f.d=f.l?f.l.d+1:1),y=!f.r,F&&!f.l&&_d(f,F),E&&y&&_d(f,E)}}function _d(f,m){jy(m)||function y(E,U){var P=U.from,k=U.to,B=U.l,U=U.r;Id(E,P,k),B&&y(E,B),U&&y(E,U)}(f,m)}function wk(f,m){var y=ng(m),E=y.next();if(E.done)return!1;for(var F=E.value,P=ng(f),k=P.next(F.from),B=k.value;!E.done&&!k.done;){if(_t(B.from,F.to)<=0&&0<=_t(B.to,F.from))return!0;_t(F.from,B.from)<0?F=(E=y.next(B.from)).value:B=(k=P.next(F.from)).value}return!1}function ng(f){var m=jy(f)?null:{s:0,n:f};return{next:function(y){for(var E=0<arguments.length;m;)switch(m.s){case 0:if(m.s=1,E)for(;m.n.l&&_t(y,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,!E||_t(y,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 yk(f){var m,y,E=(((m=f.r)===null||m===void 0?void 0:m.d)||0)-(((y=f.l)===null||y===void 0?void 0:y.d)||0),F=1<E?"r":E<-1?"l":"";F&&(m=F=="r"?"l":"r",y=i({},f),E=f[F],f.from=E.from,f.to=E.to,f[F]=E[F],y[F]=E[m],(f[m]=y).d=bk(y)),f.d=bk(f)}function bk(y){var m=y.r,y=y.l;return(m?y?Math.max(m.d,y.d):m.d:y?y.d:0)+1}function ig(f,m){return r(m).forEach(function(y){f[y]?_d(f[y],m[y]):f[y]=function E(F){var P,k,B={};for(P in F)d(F,P)&&(k=F[P],B[P]=!k||typeof k!="object"||_.has(k.constructor)?k:E(k));return B}(m[y])}),f}function Ky(f,m){return f.all||m.all||Object.keys(f).some(function(y){return m[y]&&wk(m[y],f[y])})}h(ei.prototype,((is={add:function(f){return _d(this,f),this},addKey:function(f){return Id(this,f,f),this},addKeys:function(f){var m=this;return f.forEach(function(y){return Id(m,y,y)}),this},hasKey:function(f){var m=ng(this).next(f).value;return m&&_t(m.from,f)<=0&&0<=_t(m.to,f)}})[q]=function(){return ng(this)},is));var Na={},qy={},Yy=!1;function sg(f){ig(qy,f),Yy||(Yy=!0,setTimeout(function(){Yy=!1,Zy(qy,!(qy={}))},0))}function Zy(f,m){m===void 0&&(m=!1);var y=new Set;if(f.all)for(var E=0,F=Object.values(Na);E<F.length;E++)Sk(k=F[E],f,y,m);else for(var P in f){var k,B=/^idb\:\/\/(.*)\/(.*)\//.exec(P);B&&(P=B[1],B=B[2],(k=Na["idb://".concat(P,"/").concat(B)])&&Sk(k,f,y,m))}y.forEach(function(U){return U()})}function Sk(f,m,y,E){for(var F=[],P=0,k=Object.entries(f.queries.query);P<k.length;P++){for(var B=k[P],U=B[0],Y=[],Q=0,G=B[1];Q<G.length;Q++){var te=G[Q];Ky(m,te.obsSet)?te.subscribers.forEach(function(Z){return y.add(Z)}):E&&Y.push(te)}E&&F.push([U,Y])}if(E)for(var K=0,J=F;K<J.length;K++){var ee=J[K],U=ee[0],Y=ee[1];f.queries.query[U]=Y}}function Hue(f){var m=f._state,y=f._deps.indexedDB;if(m.isBeingOpened||f.idbdb)return m.dbReadyPromise.then(function(){return m.dbOpenError?Sn(m.dbOpenError):f});m.isBeingOpened=!0,m.dbOpenError=null,m.openComplete=!1;var E=m.openCanceller,F=Math.round(10*f.verno),P=!1;function k(){if(m.openCanceller!==E)throw new Ke.DatabaseClosed("db.open() was cancelled")}function B(){return new _e(function(te,K){if(k(),!y)throw new Ke.MissingAPI;var J=f.name,ee=m.autoSchema||!F?y.open(J):y.open(J,F);if(!ee)throw new Ke.MissingAPI;ee.onerror=oo(K),ee.onblocked=cn(f._fireOnBlocked),ee.onupgradeneeded=cn(function(Z){var ae;Q=ee.transaction,m.autoSchema&&!f._options.allowEmptyDB?(ee.onerror=xd,Q.abort(),ee.result.close(),(ae=y.deleteDatabase(J)).onsuccess=ae.onerror=cn(function(){K(new Ke.NoSuchDatabase("Database ".concat(J," doesnt exist")))})):(Q.onerror=oo(K),Z=Z.oldVersion>Math.pow(2,62)?0:Z.oldVersion,G=Z<1,f.idbdb=ee.result,P&&Vue(f,Q),Nue(f,Z/10,Q,K))},K),ee.onsuccess=cn(function(){Q=null;var Z,ae,de,he,Ce,Oe=f.idbdb=ee.result,ze=S(Oe.objectStoreNames);if(0<ze.length)try{var Me=Oe.transaction((he=ze).length===1?he[0]:he,"readonly");if(m.autoSchema)ae=Oe,de=Me,(Z=f).verno=ae.version/10,de=Z._dbSchema=Xp(0,ae,de),Z._storeNames=S(ae.objectStoreNames,0),Jp(Z,[Z._allTables],r(de),de);else if(eg(f,f._dbSchema,Me),((Ce=Gy(Xp(0,(Ce=f).idbdb,Me),Ce._dbSchema)).add.length||Ce.change.some(function(Ne){return Ne.add.length||Ne.change.length}))&&!P)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."),Oe.close(),F=Oe.version+1,P=!0,te(B());Zp(f,Me)}catch{}Cu.push(f),Oe.onversionchange=cn(function(Ne){m.vcFired=!0,f.on("versionchange").fire(Ne)}),Oe.onclose=cn(function(Ne){f.on("close").fire(Ne)}),G&&(Ce=f._deps,Me=J,Oe=Ce.indexedDB,Ce=Ce.IDBKeyRange,$y(Oe)||Me===Up||zy(Oe,Ce).put({name:Me}).catch(xt)),te()},K)}).catch(function(te){switch(te==null?void 0:te.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<F)return F=0,B()}return _e.reject(te)})}var U,Y=m.dbReadyResolve,Q=null,G=!1;return _e.race([E,(typeof navigator>"u"?_e.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(te){function K(){return indexedDB.databases().finally(te)}U=setInterval(K,100),K()}).finally(function(){return clearInterval(U)}):Promise.resolve()).then(B)]).then(function(){return k(),m.onReadyBeingFired=[],_e.resolve(Uy(function(){return f.on.ready.fire(f.vip)})).then(function te(){if(0<m.onReadyBeingFired.length){var K=m.onReadyBeingFired.reduce(De,xt);return m.onReadyBeingFired=[],_e.resolve(Uy(function(){return K(f.vip)})).then(te)}})}).finally(function(){m.openCanceller===E&&(m.onReadyBeingFired=null,m.isBeingOpened=!1)}).catch(function(te){m.dbOpenError=te;try{Q&&Q.abort()}catch{}return E===m.openCanceller&&f._close(),Sn(te)}).finally(function(){m.openComplete=!0,Y()}).then(function(){var te;return G&&(te={},f.tables.forEach(function(K){K.schema.indexes.forEach(function(J){J.name&&(te["idb://".concat(f.name,"/").concat(K.name,"/").concat(J.name)]=new ei(-1/0,[[[]]]))}),te["idb://".concat(f.name,"/").concat(K.name,"/")]=te["idb://".concat(f.name,"/").concat(K.name,"/:dels")]=new ei(-1/0,[[[]]])}),Pr(Td).fire(te),Zy(te,!0)),f})}function Jy(f){function m(P){return f.next(P)}var y=F(m),E=F(function(P){return f.throw(P)});function F(P){return function(U){var B=P(U),U=B.value;return B.done?U:U&&typeof U.then=="function"?U.then(y,E):a(U)?Promise.all(U).then(y,E):y(U)}}return F(m)()}function og(f,m,y){for(var E=a(f)?f.slice():[f],F=0;F<y;++F)E.push(m);return E}var Gue={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(f){return i(i({},f),{table:function(m){var y=f.table(m),E=y.schema,F={},P=[];function k(G,te,K){var J=Ad(G),ee=F[J]=F[J]||[],Z=G==null?0:typeof G=="string"?1:G.length,ae=0<te,ae=i(i({},K),{name:ae?"".concat(J,"(virtual-from:").concat(K.name,")"):K.name,lowLevelIndex:K,isVirtual:ae,keyTail:te,keyLength:Z,extractKey:By(G),unique:!ae&&K.unique});return ee.push(ae),ae.isPrimaryKey||P.push(ae),1<Z&&k(Z===2?G[0]:G.slice(0,Z-1),te+1,K),ee.sort(function(de,he){return de.keyTail-he.keyTail}),ae}m=k(E.primaryKey.keyPath,0,E.primaryKey),F[":id"]=[m];for(var B=0,U=E.indexes;B<U.length;B++){var Y=U[B];k(Y.keyPath,0,Y)}function Q(G){var te,K=G.query.index;return K.isVirtual?i(i({},G),{query:{index:K.lowLevelIndex,range:(te=G.query.range,K=K.keyTail,{type:te.type===1?2:te.type,lower:og(te.lower,te.lowerOpen?f.MAX_KEY:f.MIN_KEY,K),lowerOpen:!0,upper:og(te.upper,te.upperOpen?f.MIN_KEY:f.MAX_KEY,K),upperOpen:!0})}}):G}return i(i({},y),{schema:i(i({},E),{primaryKey:m,indexes:P,getIndexByKeyPath:function(G){return(G=F[Ad(G)])&&G[0]}}),count:function(G){return y.count(Q(G))},query:function(G){return y.query(Q(G))},openCursor:function(G){var te=G.query.index,K=te.keyTail,J=te.isVirtual,ee=te.keyLength;return J?y.openCursor(Q(G)).then(function(ae){return ae&&Z(ae)}):y.openCursor(G);function Z(ae){return Object.create(ae,{continue:{value:function(de){de!=null?ae.continue(og(de,G.reverse?f.MAX_KEY:f.MIN_KEY,K)):G.unique?ae.continue(ae.key.slice(0,ee).concat(G.reverse?f.MIN_KEY:f.MAX_KEY,K)):ae.continue()}},continuePrimaryKey:{value:function(de,he){ae.continuePrimaryKey(og(de,f.MAX_KEY,K),he)}},primaryKey:{get:function(){return ae.primaryKey}},key:{get:function(){var de=ae.key;return ee===1?de[0]:de.slice(0,ee)}},value:{get:function(){return ae.value}}})}}})}})}};function Qy(f,m,y,E){return y=y||{},E=E||"",r(f).forEach(function(F){var P,k,B;d(m,F)?(P=f[F],k=m[F],typeof P=="object"&&typeof k=="object"&&P&&k?(B=Te(P))!==Te(k)?y[E+F]=m[F]:B==="Object"?Qy(P,k,y,E+F+"."):P!==k&&(y[E+F]=m[F]):P!==k&&(y[E+F]=m[F])):y[E+F]=void 0}),r(m).forEach(function(F){d(f,F)||(y[E+F]=m[F])}),y}function Xy(f,m){return m.type==="delete"?m.keys:m.keys||m.values.map(f.extractKey)}var Wue={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(f){return i(i({},f),{table:function(m){var y=f.table(m),E=y.schema.primaryKey;return i(i({},y),{mutate:function(F){var P=ve.trans,k=P.table(m).hook,B=k.deleting,U=k.creating,Y=k.updating;switch(F.type){case"add":if(U.fire===xt)break;return P._promise("readwrite",function(){return Q(F)},!0);case"put":if(U.fire===xt&&Y.fire===xt)break;return P._promise("readwrite",function(){return Q(F)},!0);case"delete":if(B.fire===xt)break;return P._promise("readwrite",function(){return Q(F)},!0);case"deleteRange":if(B.fire===xt)break;return P._promise("readwrite",function(){return function G(te,K,J){return y.query({trans:te,values:!1,query:{index:E,range:K},limit:J}).then(function(ee){var Z=ee.result;return Q({type:"delete",keys:Z,trans:te}).then(function(ae){return 0<ae.numFailures?Promise.reject(ae.failures[0]):Z.length<J?{failures:[],numFailures:0,lastResult:void 0}:G(te,i(i({},K),{lower:Z[Z.length-1],lowerOpen:!0}),J)})})}(F.trans,F.range,1e4)},!0)}return y.mutate(F);function Q(G){var te,K,J,ee=ve.trans,Z=G.keys||Xy(E,G);if(!Z)throw new Error("Keys missing");return(G=G.type==="add"||G.type==="put"?i(i({},G),{keys:Z}):i({},G)).type!=="delete"&&(G.values=s([],G.values)),G.keys&&(G.keys=s([],G.keys)),te=y,J=Z,((K=G).type==="add"?Promise.resolve([]):te.getMany({trans:K.trans,keys:J,cache:"immutable"})).then(function(ae){var de=Z.map(function(he,Ce){var Oe,ze,Me,Ne=ae[Ce],$e={onerror:null,onsuccess:null};return G.type==="delete"?B.fire.call($e,he,Ne,ee):G.type==="add"||Ne===void 0?(Oe=U.fire.call($e,he,G.values[Ce],ee),he==null&&Oe!=null&&(G.keys[Ce]=he=Oe,E.outbound||T(G.values[Ce],E.keyPath,he))):(Oe=Qy(Ne,G.values[Ce]),(ze=Y.fire.call($e,Oe,he,Ne,ee))&&(Me=G.values[Ce],Object.keys(ze).forEach(function(We){d(Me,We)?Me[We]=ze[We]:T(Me,We,ze[We])}))),$e});return y.mutate(G).then(function(he){for(var Ce=he.failures,Oe=he.results,ze=he.numFailures,he=he.lastResult,Me=0;Me<Z.length;++Me){var Ne=(Oe||Z)[Me],$e=de[Me];Ne==null?$e.onerror&&$e.onerror(Ce[Me]):$e.onsuccess&&$e.onsuccess(G.type==="put"&&ae[Me]?G.values[Me]:Ne)}return{failures:Ce,results:Oe,numFailures:ze,lastResult:he}}).catch(function(he){return de.forEach(function(Ce){return Ce.onerror&&Ce.onerror(he)}),Promise.reject(he)})})}}})}})}};function Ek(f,m,y){try{if(!m||m.keys.length<f.length)return null;for(var E=[],F=0,P=0;F<m.keys.length&&P<f.length;++F)_t(m.keys[F],f[P])===0&&(E.push(y?ie(m.values[F]):m.values[F]),++P);return E.length===f.length?E:null}catch{return null}}var zue={stack:"dbcore",level:-1,create:function(f){return{table:function(m){var y=f.table(m);return i(i({},y),{getMany:function(E){if(!E.cache)return y.getMany(E);var F=Ek(E.keys,E.trans._cache,E.cache==="clone");return F?_e.resolve(F):y.getMany(E).then(function(P){return E.trans._cache={keys:E.keys,values:E.cache==="clone"?ie(P):P},P})},mutate:function(E){return E.type!=="add"&&(E.trans._cache=null),y.mutate(E)}})}}}};function Rk(f,m){return f.trans.mode==="readonly"&&!!f.subscr&&!f.trans.explicit&&f.trans.db._options.cache!=="disabled"&&!m.schema.primaryKey.outbound}function Dk(f,m){switch(f){case"query":return m.values&&!m.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var $ue={stack:"dbcore",level:0,name:"Observability",create:function(f){var m=f.schema.name,y=new ei(f.MIN_KEY,f.MAX_KEY);return i(i({},f),{transaction:function(E,F,P){if(ve.subscr&&F!=="readonly")throw new Ke.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(ve.querier));return f.transaction(E,F,P)},table:function(E){var F=f.table(E),P=F.schema,k=P.primaryKey,G=P.indexes,B=k.extractKey,U=k.outbound,Y=k.autoIncrement&&G.filter(function(K){return K.compound&&K.keyPath.includes(k.keyPath)}),Q=i(i({},F),{mutate:function(K){function J(We){return We="idb://".concat(m,"/").concat(E,"/").concat(We),he[We]||(he[We]=new ei)}var ee,Z,ae,de=K.trans,he=K.mutatedParts||(K.mutatedParts={}),Ce=J(""),Oe=J(":dels"),ze=K.type,$e=K.type==="deleteRange"?[K.range]:K.type==="delete"?[K.keys]:K.values.length<50?[Xy(k,K).filter(function(We){return We}),K.values]:[],Me=$e[0],Ne=$e[1],$e=K.trans._cache;return a(Me)?(Ce.addKeys(Me),($e=ze==="delete"||Me.length===Ne.length?Ek(Me,$e):null)||Oe.addKeys(Me),($e||Ne)&&(ee=J,Z=$e,ae=Ne,P.indexes.forEach(function(We){var Ye=ee(We.name||"");function bt(At){return At!=null?We.extractKey(At):null}function Pt(At){return We.multiEntry&&a(At)?At.forEach(function(Mi){return Ye.addKey(Mi)}):Ye.addKey(At)}(Z||ae).forEach(function(At,ti){var Ct=Z&&bt(Z[ti]),ti=ae&&bt(ae[ti]);_t(Ct,ti)!==0&&(Ct!=null&&Pt(Ct),ti!=null&&Pt(ti))})}))):Me?(Ne={from:(Ne=Me.lower)!==null&&Ne!==void 0?Ne:f.MIN_KEY,to:(Ne=Me.upper)!==null&&Ne!==void 0?Ne:f.MAX_KEY},Oe.add(Ne),Ce.add(Ne)):(Ce.add(y),Oe.add(y),P.indexes.forEach(function(We){return J(We.name).add(y)})),F.mutate(K).then(function(We){return!Me||K.type!=="add"&&K.type!=="put"||(Ce.addKeys(We.results),Y&&Y.forEach(function(Ye){for(var bt=K.values.map(function(Ct){return Ye.extractKey(Ct)}),Pt=Ye.keyPath.findIndex(function(Ct){return Ct===k.keyPath}),At=0,Mi=We.results.length;At<Mi;++At)bt[At][Pt]=We.results[At];J(Ye.name).addKeys(bt)})),de.mutatedParts=ig(de.mutatedParts||{},he),We})}}),G=function(J){var ee=J.query,J=ee.index,ee=ee.range;return[J,new ei((J=ee.lower)!==null&&J!==void 0?J:f.MIN_KEY,(ee=ee.upper)!==null&&ee!==void 0?ee:f.MAX_KEY)]},te={get:function(K){return[k,new ei(K.key)]},getMany:function(K){return[k,new ei().addKeys(K.keys)]},count:G,query:G,openCursor:G};return r(te).forEach(function(K){Q[K]=function(J){var ee=ve.subscr,Z=!!ee,ae=Rk(ve,F)&&Dk(K,J)?J.obsSet={}:ee;if(Z){var de=function(Ne){return Ne="idb://".concat(m,"/").concat(E,"/").concat(Ne),ae[Ne]||(ae[Ne]=new ei)},he=de(""),Ce=de(":dels"),ee=te[K](J),Z=ee[0],ee=ee[1];if((K==="query"&&Z.isPrimaryKey&&!J.values?Ce:de(Z.name||"")).add(ee),!Z.isPrimaryKey){if(K!=="count"){var Oe=K==="query"&&U&&J.values&&F.query(i(i({},J),{values:!1}));return F[K].apply(this,arguments).then(function(Ne){if(K==="query"){if(U&&J.values)return Oe.then(function(bt){return bt=bt.result,he.addKeys(bt),Ne});var $e=J.values?Ne.result.map(B):Ne.result;(J.values?he:Ce).addKeys($e)}else if(K==="openCursor"){var We=Ne,Ye=J.values;return We&&Object.create(We,{key:{get:function(){return Ce.addKey(We.primaryKey),We.key}},primaryKey:{get:function(){var bt=We.primaryKey;return Ce.addKey(bt),bt}},value:{get:function(){return Ye&&he.addKey(We.primaryKey),We.value}}})}return Ne})}Ce.add(y)}}return F[K].apply(this,arguments)}}),Q}})}};function Fk(f,m,y){if(y.numFailures===0)return m;if(m.type==="deleteRange")return null;var E=m.keys?m.keys.length:"values"in m&&m.values?m.values.length:1;return y.numFailures===E?null:(m=i({},m),a(m.keys)&&(m.keys=m.keys.filter(function(F,P){return!(P in y.failures)})),"values"in m&&a(m.values)&&(m.values=m.values.filter(function(F,P){return!(P in y.failures)})),m)}function eb(f,m){return y=f,((E=m).lower===void 0||(E.lowerOpen?0<_t(y,E.lower):0<=_t(y,E.lower)))&&(f=f,(m=m).upper===void 0||(m.upperOpen?_t(f,m.upper)<0:_t(f,m.upper)<=0));var y,E}function xk(f,m,te,E,F,P){if(!te||te.length===0)return f;var k=m.query.index,B=k.multiEntry,U=m.query.range,Y=E.schema.primaryKey.extractKey,Q=k.extractKey,G=(k.lowLevelIndex||k).extractKey,te=te.reduce(function(K,J){var ee=K,Z=[];if(J.type==="add"||J.type==="put")for(var ae=new ei,de=J.values.length-1;0<=de;--de){var he,Ce=J.values[de],Oe=Y(Ce);ae.hasKey(Oe)||(he=Q(Ce),(B&&a(he)?he.some(function(We){return eb(We,U)}):eb(he,U))&&(ae.addKey(Oe),Z.push(Ce)))}switch(J.type){case"add":var ze=new ei().addKeys(m.values?K.map(function(Ye){return Y(Ye)}):K),ee=K.concat(m.values?Z.filter(function(Ye){return Ye=Y(Ye),!ze.hasKey(Ye)&&(ze.addKey(Ye),!0)}):Z.map(function(Ye){return Y(Ye)}).filter(function(Ye){return!ze.hasKey(Ye)&&(ze.addKey(Ye),!0)}));break;case"put":var Me=new ei().addKeys(J.values.map(function(Ye){return Y(Ye)}));ee=K.filter(function(Ye){return!Me.hasKey(m.values?Y(Ye):Ye)}).concat(m.values?Z:Z.map(function(Ye){return Y(Ye)}));break;case"delete":var Ne=new ei().addKeys(J.keys);ee=K.filter(function(Ye){return!Ne.hasKey(m.values?Y(Ye):Ye)});break;case"deleteRange":var $e=J.range;ee=K.filter(function(Ye){return!eb(Y(Ye),$e)})}return ee},f);return te===f?f:(te.sort(function(K,J){return _t(G(K),G(J))||_t(Y(K),Y(J))}),m.limit&&m.limit<1/0&&(te.length>m.limit?te.length=m.limit:f.length===m.limit&&te.length<m.limit&&(F.dirty=!0)),P?Object.freeze(te):te)}function Tk(f,m){return _t(f.lower,m.lower)===0&&_t(f.upper,m.upper)===0&&!!f.lowerOpen==!!m.lowerOpen&&!!f.upperOpen==!!m.upperOpen}function Uue(f,m){return function(y,E,F,P){if(y===void 0)return E!==void 0?-1:0;if(E===void 0)return 1;if((E=_t(y,E))===0){if(F&&P)return 0;if(F)return 1;if(P)return-1}return E}(f.lower,m.lower,f.lowerOpen,m.lowerOpen)<=0&&0<=function(y,E,F,P){if(y===void 0)return E!==void 0?1:0;if(E===void 0)return-1;if((E=_t(y,E))===0){if(F&&P)return 0;if(F)return-1;if(P)return 1}return E}(f.upper,m.upper,f.upperOpen,m.upperOpen)}function jue(f,m,y,E){f.subscribers.add(y),E.addEventListener("abort",function(){var F,P;f.subscribers.delete(y),f.subscribers.size===0&&(F=f,P=m,setTimeout(function(){F.subscribers.size===0&&M(P,F)},3e3))})}var Kue={stack:"dbcore",level:0,name:"Cache",create:function(f){var m=f.schema.name;return i(i({},f),{transaction:function(y,E,F){var P,k,B=f.transaction(y,E,F);return E==="readwrite"&&(k=(P=new AbortController).signal,F=function(U){return function(){if(P.abort(),E==="readwrite"){for(var Y=new Set,Q=0,G=y;Q<G.length;Q++){var te=G[Q],K=Na["idb://".concat(m,"/").concat(te)];if(K){var J=f.table(te),ee=K.optimisticOps.filter(function(Ye){return Ye.trans===B});if(B._explicit&&U&&B.mutatedParts)for(var Z=0,ae=Object.values(K.queries.query);Z<ae.length;Z++)for(var de=0,he=(ze=ae[Z]).slice();de<he.length;de++)Ky((Me=he[de]).obsSet,B.mutatedParts)&&(M(ze,Me),Me.subscribers.forEach(function(Ye){return Y.add(Ye)}));else if(0<ee.length){K.optimisticOps=K.optimisticOps.filter(function(Ye){return Ye.trans!==B});for(var Ce=0,Oe=Object.values(K.queries.query);Ce<Oe.length;Ce++)for(var ze,Me,Ne,$e=0,We=(ze=Oe[Ce]).slice();$e<We.length;$e++)(Me=We[$e]).res!=null&&B.mutatedParts&&(U&&!Me.dirty?(Ne=Object.isFrozen(Me.res),Ne=xk(Me.res,Me.req,ee,J,Me,Ne),Me.dirty?(M(ze,Me),Me.subscribers.forEach(function(Ye){return Y.add(Ye)})):Ne!==Me.res&&(Me.res=Ne,Me.promise=_e.resolve({result:Ne}))):(Me.dirty&&M(ze,Me),Me.subscribers.forEach(function(Ye){return Y.add(Ye)})))}}}Y.forEach(function(Ye){return Ye()})}}},B.addEventListener("abort",F(!1),{signal:k}),B.addEventListener("error",F(!1),{signal:k}),B.addEventListener("complete",F(!0),{signal:k})),B},table:function(y){var E=f.table(y),F=E.schema.primaryKey;return i(i({},E),{mutate:function(P){var k=ve.trans;if(F.outbound||k.db._options.cache==="disabled"||k.explicit||k.idbtrans.mode!=="readwrite")return E.mutate(P);var B=Na["idb://".concat(m,"/").concat(y)];return B?(k=E.mutate(P),P.type!=="add"&&P.type!=="put"||!(50<=P.values.length||Xy(F,P).some(function(U){return U==null}))?(B.optimisticOps.push(P),P.mutatedParts&&sg(P.mutatedParts),k.then(function(U){0<U.numFailures&&(M(B.optimisticOps,P),(U=Fk(0,P,U))&&B.optimisticOps.push(U),P.mutatedParts&&sg(P.mutatedParts))}),k.catch(function(){M(B.optimisticOps,P),P.mutatedParts&&sg(P.mutatedParts)})):k.then(function(U){var Y=Fk(0,i(i({},P),{values:P.values.map(function(Q,G){var te;return U.failures[G]?Q:(Q=(te=F.keyPath)!==null&&te!==void 0&&te.includes(".")?ie(Q):i({},Q),T(Q,F.keyPath,U.results[G]),Q)})}),U);B.optimisticOps.push(Y),queueMicrotask(function(){return P.mutatedParts&&sg(P.mutatedParts)})}),k):E.mutate(P)},query:function(P){if(!Rk(ve,E)||!Dk("query",P))return E.query(P);var k=((Y=ve.trans)===null||Y===void 0?void 0:Y.db._options.cache)==="immutable",G=ve,B=G.requery,U=G.signal,Y=function(J,ee,Z,ae){var de=Na["idb://".concat(J,"/").concat(ee)];if(!de)return[];if(!(ee=de.queries[Z]))return[null,!1,de,null];var he=ee[(ae.query?ae.query.index.name:null)||""];if(!he)return[null,!1,de,null];switch(Z){case"query":var Ce=he.find(function(Oe){return Oe.req.limit===ae.limit&&Oe.req.values===ae.values&&Tk(Oe.req.query.range,ae.query.range)});return Ce?[Ce,!0,de,he]:[he.find(function(Oe){return("limit"in Oe.req?Oe.req.limit:1/0)>=ae.limit&&(!ae.values||Oe.req.values)&&Uue(Oe.req.query.range,ae.query.range)}),!1,de,he];case"count":return Ce=he.find(function(Oe){return Tk(Oe.req.query.range,ae.query.range)}),[Ce,!!Ce,de,he]}}(m,y,"query",P),Q=Y[0],G=Y[1],te=Y[2],K=Y[3];return Q&&G?Q.obsSet=P.obsSet:(G=E.query(P).then(function(J){var ee=J.result;if(Q&&(Q.res=ee),k){for(var Z=0,ae=ee.length;Z<ae;++Z)Object.freeze(ee[Z]);Object.freeze(ee)}else J.result=ie(ee);return J}).catch(function(J){return K&&Q&&M(K,Q),Promise.reject(J)}),Q={obsSet:P.obsSet,promise:G,subscribers:new Set,type:"query",req:P,dirty:!1},K?K.push(Q):(K=[Q],(te=te||(Na["idb://".concat(m,"/").concat(y)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[P.query.index.name||""]=K)),jue(Q,K,B,U),Q.promise.then(function(J){return{result:xk(J.result,P,te==null?void 0:te.optimisticOps,E,Q,k)}})}})}})}};function rg(f,m){return new Proxy(f,{get:function(y,E,F){return E==="db"?m:Reflect.get(y,E,F)}})}var Go=(En.prototype.version=function(f){if(isNaN(f)||f<.1)throw new Ke.Type("Given version is not a positive number");if(f=Math.round(10*f)/10,this.idbdb||this._state.isBeingOpened)throw new Ke.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,f);var m=this._versions,y=m.filter(function(E){return E._cfg.version===f})[0];return y||(y=new this.Version(f),m.push(y),m.sort(Lue),y.stores({}),this._state.autoSchema=!1,y)},En.prototype._whenReady=function(f){var m=this;return this.idbdb&&(this._state.openComplete||ve.letThrough||this._vip)?f():new _e(function(y,E){if(m._state.openComplete)return E(new Ke.DatabaseClosed(m._state.dbOpenError));if(!m._state.isBeingOpened){if(!m._state.autoOpen)return void E(new Ke.DatabaseClosed);m.open().catch(xt)}m._state.dbReadyPromise.then(y,E)}).then(f)},En.prototype.use=function(f){var m=f.stack,y=f.create,E=f.level,F=f.name;return F&&this.unuse({stack:m,name:F}),f=this._middlewares[m]||(this._middlewares[m]=[]),f.push({stack:m,create:y,level:E??10,name:F}),f.sort(function(P,k){return P.level-k.level}),this},En.prototype.unuse=function(f){var m=f.stack,y=f.name,E=f.create;return m&&this._middlewares[m]&&(this._middlewares[m]=this._middlewares[m].filter(function(F){return E?F.create!==E:!!y&&F.name!==y})),this},En.prototype.open=function(){var f=this;return Oa(pe,function(){return Hue(f)})},En.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 _e(function(y){f.dbReadyResolve=y}),f.openCanceller=new _e(function(y,E){f.cancelOpen=E}))},En.prototype.close=function(y){var m=(y===void 0?{disableAutoOpen:!0}:y).disableAutoOpen,y=this._state;m?(y.isBeingOpened&&y.cancelOpen(new Ke.DatabaseClosed),this._close(),y.autoOpen=!1,y.dbOpenError=new Ke.DatabaseClosed):(this._close(),y.autoOpen=this._options.autoOpen||y.isBeingOpened,y.openComplete=!1,y.dbOpenError=null)},En.prototype.delete=function(f){var m=this;f===void 0&&(f={disableAutoOpen:!0});var y=0<arguments.length&&typeof arguments[0]!="object",E=this._state;return new _e(function(F,P){function k(){m.close(f);var B=m._deps.indexedDB.deleteDatabase(m.name);B.onsuccess=cn(function(){var U,Y,Q;U=m._deps,Y=m.name,Q=U.indexedDB,U=U.IDBKeyRange,$y(Q)||Y===Up||zy(Q,U).delete(Y).catch(xt),F()}),B.onerror=oo(P),B.onblocked=m._fireOnBlocked}if(y)throw new Ke.InvalidArgument("Invalid closeOptions argument to db.delete()");E.isBeingOpened?E.dbReadyPromise.then(k):k()})},En.prototype.backendDB=function(){return this.idbdb},En.prototype.isOpen=function(){return this.idbdb!==null},En.prototype.hasBeenClosed=function(){var f=this._state.dbOpenError;return f&&f.name==="DatabaseClosed"},En.prototype.hasFailed=function(){return this._state.dbOpenError!==null},En.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(En.prototype,"tables",{get:function(){var f=this;return r(this._allTables).map(function(m){return f._allTables[m]})},enumerable:!1,configurable:!0}),En.prototype.transaction=function(){var f=(function(m,y,E){var F=arguments.length;if(F<2)throw new Ke.InvalidArgument("Too few arguments");for(var P=new Array(F-1);--F;)P[F-1]=arguments[F];return E=P.pop(),[m,A(P),E]}).apply(this,arguments);return this._transaction.apply(this,f)},En.prototype._transaction=function(f,m,y){var E=this,F=ve.trans;F&&F.db===this&&f.indexOf("!")===-1||(F=null);var P,k,B=f.indexOf("?")!==-1;f=f.replace("!","").replace("?","");try{if(k=m.map(function(Y){if(Y=Y instanceof E.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===Iy)P=Iy;else{if(f!="rw"&&f!=_y)throw new Ke.InvalidArgument("Invalid transaction mode: "+f);P=_y}if(F){if(F.mode===Iy&&P===_y){if(!B)throw new Ke.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");F=null}F&&k.forEach(function(Y){if(F&&F.storeNames.indexOf(Y)===-1){if(!B)throw new Ke.SubTransaction("Table "+Y+" not included in parent transaction.");F=null}}),B&&F&&!F.active&&(F=null)}}catch(Y){return F?F._promise(null,function(Q,G){G(Y)}):Sn(Y)}var U=(function Y(Q,G,te,K,J){return _e.resolve().then(function(){var ee=ve.transless||ve,Z=Q._createTransaction(G,te,Q._dbSchema,K);if(Z.explicit=!0,ee={trans:Z,transless:ee},K)Z.idbtrans=K.idbtrans;else try{Z.create(),Z.idbtrans._explicit=!0,Q._state.PR1398_maxLoop=3}catch(he){return he.name===Ht.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,G,te,null,J)})):Sn(he)}var ae,de=we(J);return de&&vu(),ee=_e.follow(function(){var he;(ae=J.call(Z,Z))&&(de?(he=Fr.bind(null,null),ae.then(he,he)):typeof ae.next=="function"&&typeof ae.throw=="function"&&(ae=Jy(ae)))},ee),(ae&&typeof ae.then=="function"?_e.resolve(ae).then(function(he){return Z.active?he:Sn(new Ke.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):ee.then(function(){return ae})).then(function(he){return K&&Z._resolve(),Z._completion.then(function(){return he})}).catch(function(he){return Z._reject(he),Sn(he)})})}).bind(null,this,P,k,F,y);return F?F._promise(P,U,"lock"):ve.trans?Oa(ve.transless,function(){return E._whenReady(U)}):this._whenReady(U)},En.prototype.table=function(f){if(!d(this._allTables,f))throw new Ke.InvalidTable("Table ".concat(f," does not exist"));return this._allTables[f]},En);function En(f,m){var y=this;this._middlewares={},this.verno=0;var E=En.dependencies;this._options=m=i({addons:En.addons,autoOpen:!0,indexedDB:E.indexedDB,IDBKeyRange:E.IDBKeyRange,cache:"cloned"},m),this._deps={indexedDB:m.indexedDB,IDBKeyRange:m.IDBKeyRange},E=m.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var F,P,k,B,U,Y={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:xt,dbReadyPromise:null,cancelOpen:xt,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:m.autoOpen};Y.dbReadyPromise=new _e(function(G){Y.dbReadyResolve=G}),Y.openCanceller=new _e(function(G,te){Y.cancelOpen=te}),this._state=Y,this.name=f,this.on=Rd(this,"populate","blocked","versionchange","close",{ready:[De,xt]}),this.on.ready.subscribe=D(this.on.ready.subscribe,function(G){return function(te,K){En.vip(function(){var J,ee=y._state;ee.openComplete?(ee.dbOpenError||_e.resolve().then(te),K&&G(te)):ee.onReadyBeingFired?(ee.onReadyBeingFired.push(te),K&&G(te)):(G(te),J=y,K||G(function Z(){J.on.ready.unsubscribe(te),J.on.ready.unsubscribe(Z)}))})}}),this.Collection=(F=this,Dd(Pue.prototype,function(ae,Z){this.db=F;var K=ok,J=null;if(Z)try{K=Z()}catch(de){J=de}var ee=ae._ctx,Z=ee.table,ae=Z.hook.reading.fire;this._ctx={table:Z,index:ee.index,isPrimKey:!ee.index||Z.schema.primKey.keyPath&&ee.index===Z.schema.primKey.name,range:K,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:J,or:ee.or,valueMapper:ae!==O?ae:null}})),this.Table=(P=this,Dd(uk.prototype,function(G,te,K){this.db=P,this._tx=K,this.name=G,this.schema=te,this.hook=P._allTables[G]?P._allTables[G].hook:Rd(null,{creating:[se,xt],reading:[$,O],updating:[re,xt],deleting:[j,xt]})})),this.Transaction=(k=this,Dd(_ue.prototype,function(G,te,K,J,ee){var Z=this;this.db=k,this.mode=G,this.storeNames=te,this.schema=K,this.chromeTransactionDurability=J,this.idbtrans=null,this.on=Rd(this,"complete","error","abort"),this.parent=ee||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 _e(function(ae,de){Z._resolve=ae,Z._reject=de}),this._completion.then(function(){Z.active=!1,Z.on.complete.fire()},function(ae){var de=Z.active;return Z.active=!1,Z.on.error.fire(ae),Z.parent?Z.parent._reject(ae):de&&Z.idbtrans&&Z.idbtrans.abort(),Sn(ae)})})),this.Version=(B=this,Dd(Bue.prototype,function(G){this.db=B,this._cfg={version:G,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(U=this,Dd(pk.prototype,function(G,te,K){if(this.db=U,this._ctx={table:G,index:te===":id"?null:te,or:K},this._cmp=this._ascending=_t,this._descending=function(J,ee){return _t(ee,J)},this._max=function(J,ee){return 0<_t(J,ee)?J:ee},this._min=function(J,ee){return _t(J,ee)<0?J:ee},this._IDBKeyRange=U._deps.IDBKeyRange,!this._IDBKeyRange)throw new Ke.MissingAPI})),this.on("versionchange",function(G){0<G.newVersion?console.warn("Another connection wants to upgrade database '".concat(y.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(y.name,"'. Closing db now to resume the delete request.")),y.close({disableAutoOpen:!1})}),this.on("blocked",function(G){!G.newVersion||G.newVersion<G.oldVersion?console.warn("Dexie.delete('".concat(y.name,"') was blocked")):console.warn("Upgrade '".concat(y.name,"' blocked by other connection holding version ").concat(G.oldVersion/10))}),this._maxKey=Pd(m.IDBKeyRange),this._createTransaction=function(G,te,K,J){return new y.Transaction(G,te,K,y._options.chromeTransactionDurability,J)},this._fireOnBlocked=function(G){y.on("blocked").fire(G),Cu.filter(function(te){return te.name===y.name&&te!==y&&!te._state.vcFired}).map(function(te){return te.on("versionchange").fire(G)})},this.use(zue),this.use(Kue),this.use($ue),this.use(Gue),this.use(Wue);var Q=new Proxy(this,{get:function(G,te,K){if(te==="_vip")return!0;if(te==="table")return function(ee){return rg(y.table(ee),Q)};var J=Reflect.get(G,te,K);return J instanceof uk?rg(J,Q):te==="tables"?J.map(function(ee){return rg(ee,Q)}):te==="_createTransaction"?function(){return rg(J.apply(this,arguments),Q)}:J}});this.vip=Q,E.forEach(function(G){return G(y)})}var ag,is=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",que=(tb.prototype.subscribe=function(f,m,y){return this._subscribe(f&&typeof f!="function"?f:{next:f,error:m,complete:y})},tb.prototype[is]=function(){return this},tb);function tb(f){this._subscribe=f}try{ag={indexedDB:o.indexedDB||o.mozIndexedDB||o.webkitIndexedDB||o.msIndexedDB,IDBKeyRange:o.IDBKeyRange||o.webkitIDBKeyRange}}catch{ag={indexedDB:null,IDBKeyRange:null}}function Pk(f){var m,y=!1,E=new que(function(F){var P=we(f),k,B=!1,U={},Y={},Q={get closed(){return B},unsubscribe:function(){B||(B=!0,k&&k.abort(),G&&Pr.storagemutated.unsubscribe(K))}};F.start&&F.start(Q);var G=!1,te=function(){return Ay(J)},K=function(ee){ig(U,ee),Ky(Y,U)&&te()},J=function(){var ee,Z,ae;!B&&ag.indexedDB&&(U={},ee={},k&&k.abort(),k=new AbortController,ae=function(de){var he=Er();try{P&&vu();var Ce=Dr(f,de);return Ce=P?Ce.finally(Fr):Ce}finally{he&&so()}}(Z={subscr:ee,signal:k.signal,requery:te,querier:f,trans:null}),Promise.resolve(ae).then(function(de){y=!0,m=de,B||Z.signal.aborted||(U={},function(he){for(var Ce in he)if(d(he,Ce))return;return 1}(Y=ee)||G||(Pr(Td,K),G=!0),Ay(function(){return!B&&F.next&&F.next(de)}))},function(de){y=!1,["DatabaseClosedError","AbortError"].includes(de==null?void 0:de.name)||B||Ay(function(){B||F.error&&F.error(de)})}))};return setTimeout(te,0),Q});return E.hasValue=function(){return y},E.getValue=function(){return m},E}var Va=Go;function nb(f){var m=Ar;try{Ar=!0,Pr.storagemutated.fire(f),Zy(f,!0)}finally{Ar=m}}h(Va,i(i({},Ut),{delete:function(f){return new Va(f,{addons:[]}).delete()},exists:function(f){return new Va(f,{addons:[]}).open().then(function(m){return m.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(f){try{return m=Va.dependencies,y=m.indexedDB,m=m.IDBKeyRange,($y(y)?Promise.resolve(y.databases()).then(function(E){return E.map(function(F){return F.name}).filter(function(F){return F!==Up})}):zy(y,m).toCollection().primaryKeys()).then(f)}catch{return Sn(new Ke.MissingAPI)}var m,y},defineClass:function(){return function(f){l(this,f)}},ignoreTransaction:function(f){return ve.trans?Oa(ve.transless,f):f()},vip:Uy,async:function(f){return function(){try{var m=Jy(f.apply(this,arguments));return m&&typeof m.then=="function"?m:_e.resolve(m)}catch(y){return Sn(y)}}},spawn:function(f,m,y){try{var E=Jy(f.apply(y,m||[]));return E&&typeof E.then=="function"?E:_e.resolve(E)}catch(F){return Sn(F)}},currentTransaction:{get:function(){return ve.trans||null}},waitFor:function(f,m){return m=_e.resolve(typeof f=="function"?Va.ignoreTransaction(f):f).timeout(m||6e4),ve.trans?ve.trans.waitFor(m):m},Promise:_e,debug:{get:function(){return be},set:function(f){Se(f)}},derive:C,extend:l,props:h,override:D,Events:Rd,on:Pr,liveQuery:Pk,extendObservabilitySet:ig,getByKeyPath:x,setByKeyPath:T,delByKeyPath:function(f,m){typeof m=="string"?T(f,m,void 0):"length"in m&&[].map.call(m,function(y){T(f,y,void 0)})},shallowClone:H,deepClone:ie,getObjectDiff:Qy,cmp:_t,asap:R,minKey:-1/0,addons:[],connections:Cu,errnames:Ht,dependencies:ag,cache:Na,semVer:"4.0.10",version:"4.0.10".split(".").map(function(f){return parseInt(f)}).reduce(function(f,m,y){return f+m/Math.pow(10,2*y)})})),Va.maxKey=Pd(Va.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Pr(Td,function(f){Ar||(f=new CustomEvent(Ly,{detail:f}),Ar=!0,dispatchEvent(f),Ar=!1)}),addEventListener(Ly,function(f){f=f.detail,Ar||nb(f)}));var bu,Ar=!1,Ak=function(){};return typeof BroadcastChannel<"u"&&((Ak=function(){(bu=new BroadcastChannel(Ly)).onmessage=function(f){return f.data&&nb(f.data)}})(),typeof bu.unref=="function"&&bu.unref(),Pr(Td,function(f){Ar||bu.postMessage(f)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(f){if(!Go.disableBfCache&&f.persisted){be&&console.debug("Dexie: handling persisted pagehide"),bu!=null&&bu.close();for(var m=0,y=Cu;m<y.length;m++)y[m].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(f){!Go.disableBfCache&&f.persisted&&(be&&console.debug("Dexie: handling persisted pageshow"),Ak(),nb({all:new ei(-1/0,[[]])}))})),_e.rejectionMapper=function(f,m){return!f||f instanceof Le||f instanceof TypeError||f instanceof SyntaxError||!f.name||!yn[f.name]?f:(m=new yn[f.name](m||f.message,f),"stack"in f&&g(m,"stack",{get:function(){return this.inner.stack}}),m)},Se(be),i(Go,Object.freeze({__proto__:null,Dexie:Go,liveQuery:Pk,Entity:rk,cmp:_t,PropModSymbol:Ho,PropModification:Fd,replacePrefix:function(f,m){return new Fd({replacePrefix:[f,m]})},add:function(f){return new Fd({add:f})},remove:function(f){return new Fd({remove:f})},default:Go,RangeSet:ei,mergeRanges:_d,rangesOverlap:wk}),{default:Go}),Go})})(A0);var nN=A0.exports;const rm=tN(nN),I0=Symbol.for("Dexie"),qu=globalThis[I0]||(globalThis[I0]=rm);if(rm.semVer!==qu.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${rm.semVer} and ${qu.semVer}`);const{liveQuery:ece,mergeRanges:tce,rangesOverlap:nce,RangeSet:ice,cmp:sce,Entity:oce,PropModSymbol:rce,PropModification:ace,replacePrefix:lce,add:uce,remove:cce}=qu;class _0 extends qu{constructor(n){super(n);rn(this,"icons");rn(this,"visuals");rn(this,"users");rn(this,"columns");rn(this,"general");this.version(1).stores({icons:"key",visuals:"key",users:"key",columns:"key",general:"key"})}getTable(n){return this[n]?this[n]:(console.warn(`Store "${n}" not found. Using "general" store as fallback.`),this.general)}}const Eh=new Map,iN=async e=>{if(!Eh.has(e)){const t=new _0(e);try{await t.open(),Eh.set(e,t)}catch(n){console.error("Failed to open database, attempting to delete and recreate:",n);try{await qu.delete(e);const i=new _0(e);await i.open(),Eh.set(e,i)}catch(i){throw console.error("Failed to delete and recreate database:",i),i}}}return Eh.get(e)},Yu=({dbName:e,storeName:t})=>{const n=async()=>(await iN(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}}}},sN="AvatarCache",oN="images",rN=()=>{const{getCachedValue:e,setCachedValue:t}=Yu({dbName:sN,storeName:oN});return{getCachedImage:async s=>{const o=await e(s);return!o||!(o instanceof Blob)?null:URL.createObjectURL(o)},setCachedImage:async(s,o)=>{await t(s,o)}}},Zu=new Map,Os=new Map,il=new Map,aN=5*60*1e3,k0=100;function lN(){const e=Date.now(),t=[];il.forEach((n,i)=>{e-n>aN&&t.push(i)}),t.forEach(n=>{Zu.delete(n),il.delete(n),Os.delete(n)})}function uN(){if(il.size<=k0)return;const e=Array.from(il.entries()).sort((n,i)=>n[1]-i[1]);e.slice(0,e.length-k0).forEach(([n])=>{Zu.delete(n),il.delete(n),Os.delete(n)})}const cN=(e,t)=>{const n=Os.get(e);return n==null||n.forEach(i=>i(t)),Os.delete(e),t};async function dN({userId:e,avatarUrl:t,cacheInterface:n,onLoadingChange:i}){const s=await n.getCachedImage(e),o=Zu.has(e),r=Os.has(e);if(s)return cN(e,s);if(lN(),o)return new Promise(u=>{r||Os.set(e,[]),Os.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),il.set(e,Date.now()),setTimeout(()=>{Zu.delete(e),uN()},100)}})();Zu.set(e,a);const l=await a;return Os.has(e)&&(Os.get(e).forEach(c=>c(l)),Os.delete(e)),l}const hN=["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"],fN=["UploadInProgress"],Rh={},O0=(e,t,n,i)=>{const s=fe(""),o=fe(""),r=fe(!0),a=W(()=>`${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,b)=>{const S=await i(a.value);if(S&&S instanceof Blob&&S.size>0||S&&typeof S=="string")return S;if(b in Rh)return await Rh[b];const D=(async()=>{try{const w=await fetch(v,{cache:"no-cache"});if(!w.ok)throw new Error("Failed to fetch visual");const R=w.headers.get("Content-Type")||"";let x;if(R.includes("svg")||R.includes("xml")){const T=await w.text();if(T.trim()){if(x=c(T),!x.size)throw new Error("Empty image blob")}else throw new Error("Empty SVG content")}else if(R.match(/image\/(jpeg|jpg|png|gif|webp)/)){if(x=await w.blob(),!x.size)throw new Error("Empty image blob")}else throw new Error(`Unsupported content type: ${R}`);return await n(a.value,x),x}catch(w){return console.error("Error fetching visual:",w),new Blob}})();return Rh[b]=D,D.finally(()=>{delete Rh[b]}),await D},p=async v=>{r.value=!0;try{const b=sessionStorage.getItem("ASSET_URL")||"https://arbodev.s3.ap-south-1.amazonaws.com",S={icon:`${b}/icon/tess/TESSRAPP_Icon_${v}`,visual:`${b}/icon/visual/TESSRAPP_Visual_${v}`,ratting:`${b}/icon/tess/rating/TESSRAPP_Icon_${v}_Outline`,flag:`${b}/icon/flags/4x3/${v}`},D=hN.includes(v)?"png":fN.includes(v)?"gif":"svg",w=`${S[t]}.${D}`,R=await h(w,a.value);typeof R!="string"&&R.size>0&&((R.type.includes("svg")||R.type.includes("xml"))&&(o.value=await d(R)),s.value=l(R))}catch(b){console.error("Error fetching remote visual:",b)}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=W(()=>{const{size:v,color:b}=e.value;if(!o.value)return"";let S=o.value;return S=S.replace(/width="[^"]*"/,`width="${v}"`),S=S.replace(/height="[^"]*"/,`height="${v}"`),S=S.replace(/fill="[^"]*"/g,`fill="${b}"`),S});return Ya(()=>{s.value&&u(s.value)}),Dt(()=>e,v=>{g()},{deep:!0,immediate:!0}),{svgContent:C,url:s,loading:r}},pN=["innerHTML"],gN="IconCache",mN="icons",ot=St(ct({__name:"Icon",props:{src:{},source:{default:"remote"},size:{default:24},color:{default:"currentColor"}},setup(e){bL(l=>({v18c15d4e:l.size+"px"}));const t=e,{getCachedValue:n,setCachedValue:i}=Yu({dbName:gN,storeName:mN}),s=W(()=>t.source==="rating"?"ratting":"icon"),o=W(()=>({name:t.src,size:Number(t.size),color:t.color})),{svgContent:r,loading:a}=O0(o,s.value,i,n);return(l,u)=>(X(),ye("div",{class:Kt(["icon-wrapper",{loading:le(a)}]),innerHTML:le(r),style:Dn({color:e.color})},null,14,pN))}}),[["__scopeId","data-v-c97a1e9b"]]);function Vn(e,t){vN(e)&&(e="100%");const n=CN(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 Dh(e){return Math.min(1,Math.max(0,e))}function vN(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function CN(e){return typeof e=="string"&&e.indexOf("%")!==-1}function M0(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Fh(e){return Number(e)<=1?`${Number(e)*100}%`:e}function Kr(e){return e.length===1?"0"+e:String(e)}function wN(e,t,n){return{r:Vn(e,255)*255,g:Vn(t,255)*255,b:Vn(n,255)*255}}function L0(e,t,n){e=Vn(e,255),t=Vn(t,255),n=Vn(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 am(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 yN(e,t,n){let i,s,o;if(e=Vn(e,360),t=Vn(t,100),n=Vn(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=am(a,r,e+1/3),s=am(a,r,e),o=am(a,r,e-1/3)}return{r:i*255,g:s*255,b:o*255}}function N0(e,t,n){e=Vn(e,255),t=Vn(t,255),n=Vn(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 bN(e,t,n){e=Vn(e,360)*6,t=Vn(t,100),n=Vn(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 V0(e,t,n,i){const s=[Kr(Math.round(e).toString(16)),Kr(Math.round(t).toString(16)),Kr(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 SN(e,t,n,i,s){const o=[Kr(Math.round(e).toString(16)),Kr(Math.round(t).toString(16)),Kr(Math.round(n).toString(16)),Kr(RN(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 EN(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 B0(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 RN(e){return Math.round(parseFloat(e)*255).toString(16)}function H0(e){return Di(e)/255}function Di(e){return parseInt(e,16)}function DN(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}const lm={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 FN(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=xN(e)),typeof e=="object"&&(Fi(e.r)&&Fi(e.g)&&Fi(e.b)?(t=wN(e.r,e.g,e.b),r=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Fi(e.h)&&Fi(e.s)&&Fi(e.v)?(i=Fh(e.s),s=Fh(e.v),t=bN(e.h,i,s),r=!0,a="hsv"):Fi(e.h)&&Fi(e.s)&&Fi(e.l)?(i=Fh(e.s),o=Fh(e.l),t=yN(e.h,i,o),r=!0,a="hsl"):Fi(e.c)&&Fi(e.m)&&Fi(e.y)&&Fi(e.k)&&(t=EN(e.c,e.m,e.y,e.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=M0(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 Yo="(?:"+"[-\\+]?\\d*\\.\\d+%?"+")|(?:"+"[-\\+]?\\d+%?"+")",um="[\\s|\\(]+("+Yo+")[,|\\s]+("+Yo+")[,|\\s]+("+Yo+")\\s*\\)?",xh="[\\s|\\(]+("+Yo+")[,|\\s]+("+Yo+")[,|\\s]+("+Yo+")[,|\\s]+("+Yo+")\\s*\\)?",Bi={CSS_UNIT:new RegExp(Yo),rgb:new RegExp("rgb"+um),rgba:new RegExp("rgba"+xh),hsl:new RegExp("hsl"+um),hsla:new RegExp("hsla"+xh),hsv:new RegExp("hsv"+um),hsva:new RegExp("hsva"+xh),cmyk:new RegExp("cmyk"+xh),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 xN(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(lm[e])e=lm[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=Bi.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Bi.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Bi.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Bi.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Bi.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Bi.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Bi.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=Bi.hex8.exec(e),n?{r:Di(n[1]),g:Di(n[2]),b:Di(n[3]),a:H0(n[4]),format:t?"name":"hex8"}:(n=Bi.hex6.exec(e),n?{r:Di(n[1]),g:Di(n[2]),b:Di(n[3]),format:t?"name":"hex"}:(n=Bi.hex4.exec(e),n?{r:Di(n[1]+n[1]),g:Di(n[2]+n[2]),b:Di(n[3]+n[3]),a:H0(n[4]+n[4]),format:t?"name":"hex8"}:(n=Bi.hex3.exec(e),n?{r:Di(n[1]+n[1]),g:Di(n[2]+n[2]),b:Di(n[3]+n[3]),format:t?"name":"hex"}:!1))))))))))}function Fi(e){return typeof e=="number"?!Number.isNaN(e):Bi.CSS_UNIT.test(e)}class dn{constructor(t="",n={}){if(t instanceof dn)return t;typeof t=="number"&&(t=DN(t)),this.originalInput=t;const i=FN(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=M0(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=N0(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=N0(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=L0(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=L0(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 V0(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return SN(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(Vn(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(Vn(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{...B0(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:n,y:i,k:s}=B0(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="#"+V0(this.r,this.g,this.b,!1);for(const[n,i]of Object.entries(lm))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 dn(this.toString())}lighten(t=10){const n=this.toHsl();return n.l+=t/100,n.l=Dh(n.l),new dn(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 dn(n)}darken(t=10){const n=this.toHsl();return n.l-=t/100,n.l=Dh(n.l),new dn(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=Dh(n.s),new dn(n)}saturate(t=10){const n=this.toHsl();return n.s+=t/100,n.s=Dh(n.s),new dn(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 dn(n)}mix(t,n=50){const i=this.toRgb(),s=new dn(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 dn(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 dn(i));return o}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new dn(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 dn({h:i,s,v:o})),o=(o+a)%1;return r}splitcomplement(){const t=this.toHsl(),{h:n}=t;return[this,new dn({h:(n+72)%360,s:t.s,l:t.l}),new dn({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){const n=this.toRgb(),i=new dn(t).toRgb(),s=n.a+i.a*(1-n.a);return new dn({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 dn({h:(i+r*o)%360,s:n.s,l:n.l}));return s}equals(t){const n=new dn(t);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function cm(e){return new dn(e||"").isValid}function G0(e,t){const{c1:n,c2:i}={c1:new dn(e),c2:new dn(t)};return n.equals(i)}const TN=(e,t=3,n=1e3)=>{const i=fe(0),s=fe(!1),o=fe(!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)),console.log(`Retry attempt ${i.value}`),r();throw s.value=!0,a}};return{retry:r,currentAttempt:i,isErrorRetry:s,isRetrying:o}},PN={key:0,class:"skeleton-loader"},AN={key:0,class:"short-label"},IN=["src","alt"],_N={class:"action"},Th=St(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=W(()=>({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}=rN(),o=fe(""),r=fe(!1),a=fe(null),l=W(()=>{if(!t.isUseShortLabel)return"";const{initial:w,name:R}=n.value;if(typeof w=="string"&&w.trim())return w.trim();if(!R||typeof R!="string"||!R.trim())return"";const x=R.trim().split(/\s+/).filter(Boolean);return x.length===1?x[0].slice(0,2).toUpperCase():(x[0][0]+x[1][0]).toUpperCase()}),u=W(()=>n.value.profile_image?"image":(t.isUseShortLabel,"text")),c=W(()=>{var x;const R=((x=n.value.color)==null?void 0:x.bgColor)||"#CCCCCC";return cm(R)?R:"#CCCCCC"}),d=W(()=>{var x;const R=((x=n.value.color)==null?void 0:x.textColor)||"#FFFFFF";return cm(R)?R:"#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 w=a.value;try{const R=await dN({userId:n.value.id,avatarUrl:n.value.profile_image,cacheInterface:{getCachedImage:i,setCachedImage:s},onLoadingChange:x=>{w.signal.aborted||(r.value=x)}});if(w.signal.aborted||(o.value=R),R.length===0)throw console.warn("Loaded avatar image is empty, displaying initials instead."),new Error("Empty image source")}catch(R){w.signal.aborted||(console.error("Failed to load avatar:",R),o.value="",D())}},{retry:p,isErrorRetry:g,isRetrying:C}=TN(h,3,2e3),v=W(()=>({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})),b=Dt(()=>n.value.id,p,{immediate:!0});hs(()=>{b(),a.value&&(a.value.abort(),a.value=null),o.value&&o.value.startsWith("blob:")&&URL.revokeObjectURL(o.value),o.value="",r.value=!1});const S=fe(!1),D=()=>{o.value="",S.value=!0};return(w,R)=>(X(),ye("div",{class:Kt(["avatar-wrapper",{me:e.isMe,loading:r.value,disabled:e.disabled,readOnly:t.readOnly}]),style:Dn(v.value)},[r.value||le(C)?(X(),ye("div",PN)):(X(),ye(Ft,{key:1},[u.value==="text"||le(g)||S.value?(X(),ye("div",AN,mt(l.value),1)):o.value.length>0||n.value.profile_image?(X(),ye("img",{key:1,src:o.value||n.value.profile_image||"",alt:n.value.name||"Avatar",loading:"lazy"},null,8,IN)):at("",!0)],64)),Rt(w.$slots,"action",{},()=>[Pe("div",_N,[Ee(ot,{src:"Xmark",source:"remote",size:"8"})])],!0)],6))}}),[["__scopeId","data-v-cfbabc4d"]]),kN={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"},Ms=({type:e,config:t})=>{const n=[];try{const i=kN[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 W0=typeof global=="object"&&global&&global.Object===Object&&global,ON=typeof self=="object"&&self&&self.Object===Object&&self,gs=W0||ON||Function("return this")(),Hi=gs.Symbol,z0=Object.prototype,MN=z0.hasOwnProperty,LN=z0.toString,Ju=Hi?Hi.toStringTag:void 0;function NN(e){var t=MN.call(e,Ju),n=e[Ju];try{e[Ju]=void 0;var i=!0}catch{}var s=LN.call(e);return i&&(t?e[Ju]=n:delete e[Ju]),s}var VN=Object.prototype,BN=VN.toString;function HN(e){return BN.call(e)}var GN="[object Null]",WN="[object Undefined]",$0=Hi?Hi.toStringTag:void 0;function sl(e){return e==null?e===void 0?WN:GN:$0&&$0 in Object(e)?NN(e):HN(e)}function mo(e){return e!=null&&typeof e=="object"}var zN="[object Symbol]";function Ph(e){return typeof e=="symbol"||mo(e)&&sl(e)==zN}function $N(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 Gi=Array.isArray,U0=Hi?Hi.prototype:void 0,j0=U0?U0.toString:void 0;function K0(e){if(typeof e=="string")return e;if(Gi(e))return $N(e,K0)+"";if(Ph(e))return j0?j0.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var UN=/\s/;function jN(e){for(var t=e.length;t--&&UN.test(e.charAt(t)););return t}var KN=/^\s+/;function qN(e){return e&&e.slice(0,jN(e)+1).replace(KN,"")}function Zo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var q0=NaN,YN=/^[-+]0x[0-9a-f]+$/i,ZN=/^0b[01]+$/i,JN=/^0o[0-7]+$/i,QN=parseInt;function dm(e){if(typeof e=="number")return e;if(Ph(e))return q0;if(Zo(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Zo(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qN(e);var n=ZN.test(e);return n||JN.test(e)?QN(e.slice(2),n?2:8):YN.test(e)?q0:+e}var Y0=1/0,XN=17976931348623157e292;function eV(e){if(!e)return e===0?e:0;if(e=dm(e),e===Y0||e===-Y0){var t=e<0?-1:1;return t*XN}return e===e?e:0}function tV(e){var t=eV(e),n=t%1;return t===t?n?t-n:t:0}function hm(e){return e}var nV="[object AsyncFunction]",iV="[object Function]",sV="[object GeneratorFunction]",oV="[object Proxy]";function Z0(e){if(!Zo(e))return!1;var t=sl(e);return t==iV||t==sV||t==nV||t==oV}var fm=gs["__core-js_shared__"],J0=function(){var e=/[^.]+$/.exec(fm&&fm.keys&&fm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function rV(e){return!!J0&&J0 in e}var aV=Function.prototype,lV=aV.toString;function qr(e){if(e!=null){try{return lV.call(e)}catch{}try{return e+""}catch{}}return""}var uV=/[\\^$.*+?()[\]{}|]/g,cV=/^\[object .+?Constructor\]$/,dV=Function.prototype,hV=Object.prototype,fV=dV.toString,pV=hV.hasOwnProperty,gV=RegExp("^"+fV.call(pV).replace(uV,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mV(e){if(!Zo(e)||rV(e))return!1;var t=Z0(e)?gV:cV;return t.test(qr(e))}function vV(e,t){return e==null?void 0:e[t]}function Yr(e,t){var n=vV(e,t);return mV(n)?n:void 0}var pm=Yr(gs,"WeakMap"),Q0=Object.create,CV=function(){function e(){}return function(t){if(!Zo(t))return{};if(Q0)return Q0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function wV(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 yV(){}var bV=800,SV=16,EV=Date.now;function RV(e){var t=0,n=0;return function(){var i=EV(),s=SV-(i-n);if(n=i,s>0){if(++t>=bV)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function DV(e){return function(){return e}}var Ah=function(){try{var e=Yr(Object,"defineProperty");return e({},"",{}),e}catch{}}(),FV=Ah?function(e,t){return Ah(e,"toString",{configurable:!0,enumerable:!1,value:DV(t),writable:!0})}:hm,xV=RV(FV);function TV(e,t){for(var n=-1,i=e==null?0:e.length;++n<i&&t(e[n],n,e)!==!1;);return e}function PV(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 AV(e){return e!==e}function IV(e,t,n){for(var i=n-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function _V(e,t,n){return t===t?IV(e,t,n):PV(e,AV,n)}function kV(e,t){var n=e==null?0:e.length;return!!n&&_V(e,t,0)>-1}var OV=9007199254740991,MV=/^(?:0|[1-9]\d*)$/;function X0(e,t){var n=typeof e;return t=t??OV,!!t&&(n=="number"||n!="symbol"&&MV.test(e))&&e>-1&&e%1==0&&e<t}function LV(e,t,n){t=="__proto__"&&Ah?Ah(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function gm(e,t){return e===t||e!==e&&t!==t}var NV=Object.prototype,VV=NV.hasOwnProperty;function BV(e,t,n){var i=e[t];(!(VV.call(e,t)&&gm(i,n))||n===void 0&&!(t in e))&&LV(e,t,n)}var eE=Math.max;function HV(e,t,n){return t=eE(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,o=eE(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),wV(e,this,a)}}function GV(e,t){return xV(HV(e,t,hm),e+"")}var WV=9007199254740991;function mm(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=WV}function vm(e){return e!=null&&mm(e.length)&&!Z0(e)}var zV=Object.prototype;function Cm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||zV;return e===n}function $V(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}var UV="[object Arguments]";function tE(e){return mo(e)&&sl(e)==UV}var nE=Object.prototype,jV=nE.hasOwnProperty,KV=nE.propertyIsEnumerable,Ih=tE(function(){return arguments}())?tE:function(e){return mo(e)&&jV.call(e,"callee")&&!KV.call(e,"callee")};function qV(){return!1}var iE=typeof Qt=="object"&&Qt&&!Qt.nodeType&&Qt,sE=iE&&typeof module=="object"&&module&&!module.nodeType&&module,YV=sE&&sE.exports===iE,oE=YV?gs.Buffer:void 0,ZV=oE?oE.isBuffer:void 0,Qu=ZV||qV,JV="[object Arguments]",QV="[object Array]",XV="[object Boolean]",eB="[object Date]",tB="[object Error]",nB="[object Function]",iB="[object Map]",sB="[object Number]",oB="[object Object]",rB="[object RegExp]",aB="[object Set]",lB="[object String]",uB="[object WeakMap]",cB="[object ArrayBuffer]",dB="[object DataView]",hB="[object Float32Array]",fB="[object Float64Array]",pB="[object Int8Array]",gB="[object Int16Array]",mB="[object Int32Array]",vB="[object Uint8Array]",CB="[object Uint8ClampedArray]",wB="[object Uint16Array]",yB="[object Uint32Array]",tn={};tn[hB]=tn[fB]=tn[pB]=tn[gB]=tn[mB]=tn[vB]=tn[CB]=tn[wB]=tn[yB]=!0,tn[JV]=tn[QV]=tn[cB]=tn[XV]=tn[dB]=tn[eB]=tn[tB]=tn[nB]=tn[iB]=tn[sB]=tn[oB]=tn[rB]=tn[aB]=tn[lB]=tn[uB]=!1;function bB(e){return mo(e)&&mm(e.length)&&!!tn[sl(e)]}function wm(e){return function(t){return e(t)}}var rE=typeof Qt=="object"&&Qt&&!Qt.nodeType&&Qt,Xu=rE&&typeof module=="object"&&module&&!module.nodeType&&module,SB=Xu&&Xu.exports===rE,ym=SB&&W0.process,ol=function(){try{var e=Xu&&Xu.require&&Xu.require("util").types;return e||ym&&ym.binding&&ym.binding("util")}catch{}}(),aE=ol&&ol.isTypedArray,bm=aE?wm(aE):bB,EB=Object.prototype,RB=EB.hasOwnProperty;function DB(e,t){var n=Gi(e),i=!n&&Ih(e),s=!n&&!i&&Qu(e),o=!n&&!i&&!s&&bm(e),r=n||i||s||o,a=r?$V(e.length,String):[],l=a.length;for(var u in e)RB.call(e,u)&&!(r&&(u=="length"||s&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||X0(u,l)))&&a.push(u);return a}function lE(e,t){return function(n){return e(t(n))}}var FB=lE(Object.keys,Object),xB=Object.prototype,TB=xB.hasOwnProperty;function uE(e){if(!Cm(e))return FB(e);var t=[];for(var n in Object(e))TB.call(e,n)&&n!="constructor"&&t.push(n);return t}function cE(e){return vm(e)?DB(e):uE(e)}var PB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,AB=/^\w*$/;function Sm(e,t){if(Gi(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ph(e)?!0:AB.test(e)||!PB.test(e)||t!=null&&e in Object(t)}var ec=Yr(Object,"create");function IB(){this.__data__=ec?ec(null):{},this.size=0}function _B(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var kB="__lodash_hash_undefined__",OB=Object.prototype,MB=OB.hasOwnProperty;function LB(e){var t=this.__data__;if(ec){var n=t[e];return n===kB?void 0:n}return MB.call(t,e)?t[e]:void 0}var NB=Object.prototype,VB=NB.hasOwnProperty;function BB(e){var t=this.__data__;return ec?t[e]!==void 0:VB.call(t,e)}var HB="__lodash_hash_undefined__";function GB(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ec&&t===void 0?HB:t,this}function Zr(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])}}Zr.prototype.clear=IB,Zr.prototype.delete=_B,Zr.prototype.get=LB,Zr.prototype.has=BB,Zr.prototype.set=GB;function WB(){this.__data__=[],this.size=0}function _h(e,t){for(var n=e.length;n--;)if(gm(e[n][0],t))return n;return-1}var zB=Array.prototype,$B=zB.splice;function UB(e){var t=this.__data__,n=_h(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():$B.call(t,n,1),--this.size,!0}function jB(e){var t=this.__data__,n=_h(t,e);return n<0?void 0:t[n][1]}function KB(e){return _h(this.__data__,e)>-1}function qB(e,t){var n=this.__data__,i=_h(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}function vo(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])}}vo.prototype.clear=WB,vo.prototype.delete=UB,vo.prototype.get=jB,vo.prototype.has=KB,vo.prototype.set=qB;var tc=Yr(gs,"Map");function YB(){this.size=0,this.__data__={hash:new Zr,map:new(tc||vo),string:new Zr}}function ZB(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 ZB(t)?n[typeof t=="string"?"string":"hash"]:n.map}function JB(e){var t=kh(this,e).delete(e);return this.size-=t?1:0,t}function QB(e){return kh(this,e).get(e)}function XB(e){return kh(this,e).has(e)}function eH(e,t){var n=kh(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}function Co(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])}}Co.prototype.clear=YB,Co.prototype.delete=JB,Co.prototype.get=QB,Co.prototype.has=XB,Co.prototype.set=eH;var tH="Expected a function";function Em(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(tH);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(Em.Cache||Co),n}Em.Cache=Co;var nH=500;function iH(e){var t=Em(e,function(i){return n.size===nH&&n.clear(),i}),n=t.cache;return t}var sH=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oH=/\\(\\)?/g,rH=iH(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(sH,function(n,i,s,o){t.push(s?o.replace(oH,"$1"):i||n)}),t});function aH(e){return e==null?"":K0(e)}function dE(e,t){return Gi(e)?e:Sm(e,t)?[e]:rH(aH(e))}function Oh(e){if(typeof e=="string"||Ph(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function hE(e,t){t=dE(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[Oh(t[n++])];return n&&n==i?e:void 0}function lH(e,t,n){var i=e==null?void 0:hE(e,t);return i===void 0?n:i}function fE(e,t){for(var n=-1,i=t.length,s=e.length;++n<i;)e[s+n]=t[n];return e}var pE=Hi?Hi.isConcatSpreadable:void 0;function uH(e){return Gi(e)||Ih(e)||!!(pE&&e&&e[pE])}function cH(e,t,n,i,s){var o=-1,r=e.length;for(n||(n=uH),s||(s=[]);++o<r;){var a=e[o];n(a)&&fE(s,a)}return s}var dH=lE(Object.getPrototypeOf,Object);function hH(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 fH=Math.ceil,pH=Math.max;function gH(e,t,n){t===void 0?t=1:t=pH(tV(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var s=0,o=0,r=Array(fH(i/t));s<i;)r[o++]=hH(e,s,s+=t);return r}function mH(){this.__data__=new vo,this.size=0}function vH(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function CH(e){return this.__data__.get(e)}function wH(e){return this.__data__.has(e)}var yH=200;function bH(e,t){var n=this.__data__;if(n instanceof vo){var i=n.__data__;if(!tc||i.length<yH-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Co(i)}return n.set(e,t),this.size=n.size,this}function Ls(e){var t=this.__data__=new vo(e);this.size=t.size}Ls.prototype.clear=mH,Ls.prototype.delete=vH,Ls.prototype.get=CH,Ls.prototype.has=wH,Ls.prototype.set=bH;var gE=typeof Qt=="object"&&Qt&&!Qt.nodeType&&Qt,mE=gE&&typeof module=="object"&&module&&!module.nodeType&&module,SH=mE&&mE.exports===gE,vE=SH?gs.Buffer:void 0;vE&&vE.allocUnsafe;function EH(e,t){return e.slice()}function RH(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 DH(){return[]}var FH=Object.prototype,xH=FH.propertyIsEnumerable,CE=Object.getOwnPropertySymbols,TH=CE?function(e){return e==null?[]:(e=Object(e),RH(CE(e),function(t){return xH.call(e,t)}))}:DH;function PH(e,t,n){var i=t(e);return Gi(e)?i:fE(i,n(e))}function Rm(e){return PH(e,cE,TH)}var Dm=Yr(gs,"DataView"),Fm=Yr(gs,"Promise"),rl=Yr(gs,"Set"),wE="[object Map]",AH="[object Object]",yE="[object Promise]",bE="[object Set]",SE="[object WeakMap]",EE="[object DataView]",IH=qr(Dm),_H=qr(tc),kH=qr(Fm),OH=qr(rl),MH=qr(pm),Wi=sl;(Dm&&Wi(new Dm(new ArrayBuffer(1)))!=EE||tc&&Wi(new tc)!=wE||Fm&&Wi(Fm.resolve())!=yE||rl&&Wi(new rl)!=bE||pm&&Wi(new pm)!=SE)&&(Wi=function(e){var t=sl(e),n=t==AH?e.constructor:void 0,i=n?qr(n):"";if(i)switch(i){case IH:return EE;case _H:return wE;case kH:return yE;case OH:return bE;case MH:return SE}return t});var LH=Object.prototype,NH=LH.hasOwnProperty;function VH(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&NH.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Mh=gs.Uint8Array;function xm(e){var t=new e.constructor(e.byteLength);return new Mh(t).set(new Mh(e)),t}function BH(e,t){var n=xm(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var HH=/\w*$/;function GH(e){var t=new e.constructor(e.source,HH.exec(e));return t.lastIndex=e.lastIndex,t}var RE=Hi?Hi.prototype:void 0,DE=RE?RE.valueOf:void 0;function WH(e){return DE?Object(DE.call(e)):{}}function zH(e,t){var n=xm(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}var $H="[object Boolean]",UH="[object Date]",jH="[object Map]",KH="[object Number]",qH="[object RegExp]",YH="[object Set]",ZH="[object String]",JH="[object Symbol]",QH="[object ArrayBuffer]",XH="[object DataView]",eG="[object Float32Array]",tG="[object Float64Array]",nG="[object Int8Array]",iG="[object Int16Array]",sG="[object Int32Array]",oG="[object Uint8Array]",rG="[object Uint8ClampedArray]",aG="[object Uint16Array]",lG="[object Uint32Array]";function uG(e,t,n){var i=e.constructor;switch(t){case QH:return xm(e);case $H:case UH:return new i(+e);case XH:return BH(e);case eG:case tG:case nG:case iG:case sG:case oG:case rG:case aG:case lG:return zH(e);case jH:return new i;case KH:case ZH:return new i(e);case qH:return GH(e);case YH:return new i;case JH:return WH(e)}}function cG(e){return typeof e.constructor=="function"&&!Cm(e)?CV(dH(e)):{}}var dG="[object Map]";function hG(e){return mo(e)&&Wi(e)==dG}var FE=ol&&ol.isMap,fG=FE?wm(FE):hG,pG="[object Set]";function gG(e){return mo(e)&&Wi(e)==pG}var xE=ol&&ol.isSet,mG=xE?wm(xE):gG,TE="[object Arguments]",vG="[object Array]",CG="[object Boolean]",wG="[object Date]",yG="[object Error]",PE="[object Function]",bG="[object GeneratorFunction]",SG="[object Map]",EG="[object Number]",AE="[object Object]",RG="[object RegExp]",DG="[object Set]",FG="[object String]",xG="[object Symbol]",TG="[object WeakMap]",PG="[object ArrayBuffer]",AG="[object DataView]",IG="[object Float32Array]",_G="[object Float64Array]",kG="[object Int8Array]",OG="[object Int16Array]",MG="[object Int32Array]",LG="[object Uint8Array]",NG="[object Uint8ClampedArray]",VG="[object Uint16Array]",BG="[object Uint32Array]",Yt={};Yt[TE]=Yt[vG]=Yt[PG]=Yt[AG]=Yt[CG]=Yt[wG]=Yt[IG]=Yt[_G]=Yt[kG]=Yt[OG]=Yt[MG]=Yt[SG]=Yt[EG]=Yt[AE]=Yt[RG]=Yt[DG]=Yt[FG]=Yt[xG]=Yt[LG]=Yt[NG]=Yt[VG]=Yt[BG]=!0,Yt[yG]=Yt[PE]=Yt[TG]=!1;function Lh(e,t,n,i,s,o){var r;if(r!==void 0)return r;if(!Zo(e))return e;var a=Gi(e);if(a)r=VH(e);else{var l=Wi(e),u=l==PE||l==bG;if(Qu(e))return EH(e);if(l==AE||l==TE||u&&!s)r=u?{}:cG(e);else{if(!Yt[l])return s?e:{};r=uG(e,l)}}o||(o=new Ls);var c=o.get(e);if(c)return c;o.set(e,r),mG(e)?e.forEach(function(p){r.add(Lh(p,t,n,p,e,o))}):fG(e)&&e.forEach(function(p,g){r.set(g,Lh(p,t,n,g,e,o))});var d=Rm,h=a?void 0:d(e);return TV(h||e,function(p,g){h&&(g=p,p=e[g]),BV(r,g,Lh(p,t,n,g,e,o))}),r}var HG=1,GG=4;function WG(e){return Lh(e,HG|GG)}var zG="__lodash_hash_undefined__";function $G(e){return this.__data__.set(e,zG),this}function UG(e){return this.__data__.has(e)}function nc(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Co;++t<n;)this.add(e[t])}nc.prototype.add=nc.prototype.push=$G,nc.prototype.has=UG;function jG(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 IE(e,t){return e.has(t)}var KG=1,qG=2;function _E(e,t,n,i,s,o){var r=n&KG,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&qG?new nc: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(!jG(t,function(b,S){if(!IE(p,S)&&(g===b||s(g,b,n,i,o)))return p.push(S)})){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 YG(e){var t=-1,n=Array(e.size);return e.forEach(function(i,s){n[++t]=[s,i]}),n}function Tm(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n}var ZG=1,JG=2,QG="[object Boolean]",XG="[object Date]",e2="[object Error]",t2="[object Map]",n2="[object Number]",i2="[object RegExp]",s2="[object Set]",o2="[object String]",r2="[object Symbol]",a2="[object ArrayBuffer]",l2="[object DataView]",kE=Hi?Hi.prototype:void 0,Pm=kE?kE.valueOf:void 0;function u2(e,t,n,i,s,o,r){switch(n){case l2:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case a2:return!(e.byteLength!=t.byteLength||!o(new Mh(e),new Mh(t)));case QG:case XG:case n2:return gm(+e,+t);case e2:return e.name==t.name&&e.message==t.message;case i2:case o2:return e==t+"";case t2:var a=YG;case s2:var l=i&ZG;if(a||(a=Tm),e.size!=t.size&&!l)return!1;var u=r.get(e);if(u)return u==t;i|=JG,r.set(e,t);var c=_E(a(e),a(t),i,s,o,r);return r.delete(e),c;case r2:if(Pm)return Pm.call(e)==Pm.call(t)}return!1}var c2=1,d2=Object.prototype,h2=d2.hasOwnProperty;function f2(e,t,n,i,s,o){var r=n&c2,a=Rm(e),l=a.length,u=Rm(t),c=u.length;if(l!=c&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in t:h2.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 b=e[h],S=t[h];if(i)var D=r?i(S,b,h,t,e,o):i(b,S,h,e,t,o);if(!(D===void 0?b===S||s(b,S,n,i,o):D)){C=!1;break}v||(v=h=="constructor")}if(C&&!v){var w=e.constructor,R=t.constructor;w!=R&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof R=="function"&&R instanceof R)&&(C=!1)}return o.delete(e),o.delete(t),C}var p2=1,OE="[object Arguments]",ME="[object Array]",Nh="[object Object]",g2=Object.prototype,LE=g2.hasOwnProperty;function m2(e,t,n,i,s,o){var r=Gi(e),a=Gi(t),l=r?ME:Wi(e),u=a?ME:Wi(t);l=l==OE?Nh:l,u=u==OE?Nh:u;var c=l==Nh,d=u==Nh,h=l==u;if(h&&Qu(e)){if(!Qu(t))return!1;r=!0,c=!1}if(h&&!c)return o||(o=new Ls),r||bm(e)?_E(e,t,n,i,s,o):u2(e,t,l,n,i,s,o);if(!(n&p2)){var p=c&&LE.call(e,"__wrapped__"),g=d&&LE.call(t,"__wrapped__");if(p||g){var C=p?e.value():e,v=g?t.value():t;return o||(o=new Ls),s(C,v,n,i,o)}}return h?(o||(o=new Ls),f2(e,t,n,i,s,o)):!1}function Am(e,t,n,i,s){return e===t?!0:e==null||t==null||!mo(e)&&!mo(t)?e!==e&&t!==t:m2(e,t,n,i,Am,s)}var v2=1,C2=2;function w2(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 Ls,d;if(!(d===void 0?Am(u,l,v2|C2,i,c):d))return!1}}return!0}function NE(e){return e===e&&!Zo(e)}function y2(e){for(var t=cE(e),n=t.length;n--;){var i=t[n],s=e[i];t[n]=[i,s,NE(s)]}return t}function VE(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function b2(e){var t=y2(e);return t.length==1&&t[0][2]?VE(t[0][0],t[0][1]):function(n){return n===e||w2(n,e,t)}}function S2(e,t){return e!=null&&t in Object(e)}function E2(e,t,n){t=dE(t,e);for(var i=-1,s=t.length,o=!1;++i<s;){var r=Oh(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&&mm(s)&&X0(r,s)&&(Gi(e)||Ih(e)))}function R2(e,t){return e!=null&&E2(e,t,S2)}var D2=1,F2=2;function x2(e,t){return Sm(e)&&NE(t)?VE(Oh(e),t):function(n){var i=lH(n,e);return i===void 0&&i===t?R2(n,e):Am(t,i,D2|F2)}}function T2(e){return function(t){return t==null?void 0:t[e]}}function P2(e){return function(t){return hE(t,e)}}function A2(e){return Sm(e)?T2(Oh(e)):P2(e)}function I2(e){return typeof e=="function"?e:e==null?hm:typeof e=="object"?Gi(e)?x2(e[0],e[1]):b2(e):A2(e)}var Im=function(){return gs.Date.now()},_2="Expected a function",k2=Math.max,O2=Math.min;function ic(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(_2);t=dm(t)||0,Zo(n)&&(c=!!n.leading,d="maxWait"in n,o=d?k2(dm(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(x){var T=i,H=s;return i=s=void 0,u=x,r=e.apply(H,T),r}function g(x){return u=x,a=setTimeout(b,t),c?p(x):r}function C(x){var T=x-l,H=x-u,N=t-T;return d?O2(N,o-H):N}function v(x){var T=x-l,H=x-u;return l===void 0||T>=t||T<0||d&&H>=o}function b(){var x=Im();if(v(x))return S(x);a=setTimeout(b,C(x))}function S(x){return a=void 0,h&&i?p(x):(i=s=void 0,r)}function D(){a!==void 0&&clearTimeout(a),u=0,i=l=s=a=void 0}function w(){return a===void 0?r:S(Im())}function R(){var x=Im(),T=v(x);if(i=arguments,s=this,l=x,T){if(a===void 0)return g(l);if(d)return clearTimeout(a),a=setTimeout(b,t),p(l)}return a===void 0&&(a=setTimeout(b,t)),r}return R.cancel=D,R.flush=w,R}function BE(e){return mo(e)&&vm(e)}function M2(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var L2="[object Map]",N2="[object Set]",V2=Object.prototype,B2=V2.hasOwnProperty;function H2(e){if(e==null)return!0;if(vm(e)&&(Gi(e)||typeof e=="string"||typeof e.splice=="function"||Qu(e)||bm(e)||Ih(e)))return!e.length;var t=Wi(e);if(t==L2||t==N2)return!e.size;if(Cm(e))return!uE(e).length;for(var n in e)if(B2.call(e,n))return!1;return!0}var G2=1/0,W2=rl&&1/Tm(new rl([,-0]))[1]==G2?function(e){return new rl(e)}:yV,z2=200;function $2(e,t,n){var i=-1,s=kV,o=e.length,r=!0,a=[],l=a;if(o>=z2){var u=t?null:W2(e);if(u)return Tm(u);r=!1,s=IE,l=new nc}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 Vh=GV(function(e){var t=M2(e);return BE(t)&&(t=void 0),$2(cH(e,1,BE),I2(t))});const Ns=(e,t)=>{const n=Vi();return{apiServices:W(()=>{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})}},HE=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}),U2=e=>{var D;const t=fe(((D=e.value)==null?void 0:D.map(w=>w.id))??[]),n=fe([]),i=W(()=>{var T,H;const w=new Set(((T=e.value)==null?void 0:T.map(N=>N.id))??[]),R=((H=e.value)==null?void 0:H.map(N=>({...HE(N),selected:!0})))??[],x=n.value.filter(N=>!w.has(N.id));return Vh(R,x,"id")}),s=fe(!1),o=uo(e,"workspaceId"),r=uo(e,"entityId"),a=uo(e,"id"),l=uo(e,"ids"),u=e.updateRowData,c=fe([]),{apiServices:d}=Ns(!!e.params,e),h=w=>{const R=i.value.find(x=>x.id===w);return R==null?void 0:R.data},p=async()=>{var R,x;if(s.value||!d.value)return;s.value=!0;const w=(R=l.value)!=null&&R.length?l.value:[String(a.value)];try{await((x=d.value)==null?void 0:x.unAssignAll(String(o.value),String(r.value),w)),u({assignees:[],type:"removeAll"})}catch(T){console.error("Failed to unassign all:",T)}finally{s.value=!1,t.value=[]}},g=async w=>{var x,T;if(s.value||!d.value)return;s.value=!0;const R=(x=l.value)!=null&&x.length?l.value:[String(a.value)];try{const H=await((T=d.value)==null?void 0:T.replaceAssignee(String(o.value),R,[w]));if((H==null?void 0:H.message)!=="Done")throw new Error("Failed to replace assignees")}catch(H){console.error("Failed to replace assignees:",H)}finally{s.value=!1,t.value=[w];const H=h(w);H&&u({assignees:[H],type:"overwrite"})}},C=async w=>{var x,T,H,N;if(s.value||!d.value)return;s.value=!0;const R=(x=l.value)!=null&&x.length?l.value:[String(a.value)];try{const A=await((T=d.value)==null?void 0:T.addAssignee(String(o.value),R,[w]));if((A==null?void 0:A.message)!=="Done")throw new Error("Failed to add assignee")}catch(A){console.error("Failed to add assignee:",A);return}finally{s.value=!1,t.value.push(w);const A=h(w);if(A){const _=(N=(H=e.params)==null?void 0:H.api.getRowNode(String(e.id)))==null?void 0:N.data,V=(_==null?void 0:_.assignees)||[],ie=Vh([...V||[],A],"id");u({assignees:ie,type:"add"})}}},v=async w=>{var x,T,H,N;if(s.value||!d.value)return;s.value=!0;const R=(x=l.value)!=null&&x.length?l.value:[String(a.value)];try{const A=await((T=d.value)==null?void 0:T.removeAssignee(String(o.value),R,[w]));if((A==null?void 0:A.message)!=="Done")throw new Error("Failed to removeAssignee")}catch(A){console.error("Failed to remove assignee:",A);return}finally{s.value=!1;const A=(N=(H=e.params)==null?void 0:H.api.getRowNode(String(e.id)))==null?void 0:N.data;t.value=t.value.filter(V=>V!==w);const _=((A==null?void 0:A.assignees)||[]).filter(V=>V.id!==w);u({assignees:_,type:"remove"})}};return{isSubmitting:s,options:c,unAssignAll:p,replaceAssignees:g,addAssignee:C,removeAssignee:v,handleSelect:w=>{t.value.includes(String(w.id))?v(String(w.id)):C(String(w.id))},openPeopleInsight:w=>{if(!w||!o.value)return;const R=Ms({type:"people_insight",config:{user_id:w,ws_code:o.value,baseDomain:sessionStorage.getItem("BASE_URL")||""}}).url;window.open(R,"_blank")},assigneeList:n,mergedOptions:i,selectedUserIds:t}};var pi="top",zi="bottom",$i="right",gi="left",_m="auto",sc=[pi,zi,$i,gi],al="start",oc="end",j2="clippingParents",GE="viewport",rc="popper",K2="reference",WE=sc.reduce(function(e,t){return e.concat([t+"-"+al,t+"-"+oc])},[]),zE=[].concat(sc,[_m]).reduce(function(e,t){return e.concat([t,t+"-"+al,t+"-"+oc])},[]),q2="beforeRead",Y2="read",Z2="afterRead",J2="beforeMain",Q2="main",X2="afterMain",eW="beforeWrite",tW="write",nW="afterWrite",iW=[q2,Y2,Z2,J2,Q2,X2,eW,tW,nW];function Vs(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 Jr(e){var t=xi(e).Element;return e instanceof t||e instanceof Element}function Ui(e){var t=xi(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function km(e){if(typeof ShadowRoot>"u")return!1;var t=xi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function sW(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];!Ui(o)||!Vs(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 oW(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},{});!Ui(s)||!Vs(s)||(Object.assign(s.style,a),Object.keys(o).forEach(function(l){s.removeAttribute(l)}))})}}const $E={name:"applyStyles",enabled:!0,phase:"write",fn:sW,effect:oW,requires:["computeStyles"]};function Bs(e){return e.split("-")[0]}var Qr=Math.max,Bh=Math.min,ll=Math.round;function Om(){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 UE(){return!/^((?!chrome|android).)*safari/i.test(Om())}function ul(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var i=e.getBoundingClientRect(),s=1,o=1;t&&Ui(e)&&(s=e.offsetWidth>0&&ll(i.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ll(i.height)/e.offsetHeight||1);var r=Jr(e)?xi(e):window,a=r.visualViewport,l=!UE()&&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 Mm(e){var t=ul(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 jE(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&km(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function wo(e){return xi(e).getComputedStyle(e)}function rW(e){return["table","td","th"].indexOf(Vs(e))>=0}function Jo(e){return((Jr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hh(e){return Vs(e)==="html"?e:e.assignedSlot||e.parentNode||(km(e)?e.host:null)||Jo(e)}function KE(e){return!Ui(e)||wo(e).position==="fixed"?null:e.offsetParent}function aW(e){var t=/firefox/i.test(Om()),n=/Trident/i.test(Om());if(n&&Ui(e)){var i=wo(e);if(i.position==="fixed")return null}var s=Hh(e);for(km(s)&&(s=s.host);Ui(s)&&["html","body"].indexOf(Vs(s))<0;){var o=wo(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 ac(e){for(var t=xi(e),n=KE(e);n&&rW(n)&&wo(n).position==="static";)n=KE(n);return n&&(Vs(n)==="html"||Vs(n)==="body"&&wo(n).position==="static")?t:n||aW(e)||t}function Lm(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function lc(e,t,n){return Qr(e,Bh(t,n))}function lW(e,t,n){var i=lc(e,t,n);return i>n?n:i}function qE(){return{top:0,right:0,bottom:0,left:0}}function YE(e){return Object.assign({},qE(),e)}function ZE(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var uW=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,YE(typeof t!="number"?t:ZE(t,sc))};function cW(e){var t,n=e.state,i=e.name,s=e.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=Bs(n.placement),l=Lm(a),u=[gi,$i].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!r)){var d=uW(s.padding,n),h=Mm(o),p=l==="y"?pi:gi,g=l==="y"?zi:$i,C=n.rects.reference[c]+n.rects.reference[l]-r[l]-n.rects.popper[c],v=r[l]-n.rects.reference[l],b=ac(o),S=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,D=C/2-v/2,w=d[p],R=S-h[c]-d[g],x=S/2-h[c]/2+D,T=lc(w,x,R),H=l;n.modifiersData[i]=(t={},t[H]=T,t.centerOffset=T-x,t)}}function dW(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)||jE(t.elements.popper,s)&&(t.elements.arrow=s))}const hW={name:"arrow",enabled:!0,phase:"main",fn:cW,effect:dW,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function cl(e){return e.split("-")[1]}var fW={top:"auto",right:"auto",bottom:"auto",left:"auto"};function pW(e,t){var n=e.x,i=e.y,s=t.devicePixelRatio||1;return{x:ll(n*s)/s||0,y:ll(i*s)/s||0}}function JE(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 b=r.hasOwnProperty("x"),S=r.hasOwnProperty("y"),D=gi,w=pi,R=window;if(u){var x=ac(n),T="clientHeight",H="clientWidth";if(x===xi(n)&&(x=Jo(n),wo(x).position!=="static"&&a==="absolute"&&(T="scrollHeight",H="scrollWidth")),x=x,s===pi||(s===gi||s===$i)&&o===oc){w=zi;var N=d&&x===R&&R.visualViewport?R.visualViewport.height:x[T];C-=N-i.height,C*=l?1:-1}if(s===gi||(s===pi||s===zi)&&o===oc){D=$i;var A=d&&x===R&&R.visualViewport?R.visualViewport.width:x[H];p-=A-i.width,p*=l?1:-1}}var _=Object.assign({position:a},u&&fW),V=c===!0?pW({x:p,y:C},xi(n)):{x:p,y:C};if(p=V.x,C=V.y,l){var ie;return Object.assign({},_,(ie={},ie[w]=S?"0":"",ie[D]=b?"0":"",ie.transform=(R.devicePixelRatio||1)<=1?"translate("+p+"px, "+C+"px)":"translate3d("+p+"px, "+C+"px, 0)",ie))}return Object.assign({},_,(t={},t[w]=S?C+"px":"",t[D]=b?p+"px":"",t.transform="",t))}function gW(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:Bs(t.placement),variation:cl(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,JE(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,JE(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 mW={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:gW,data:{}};var Gh={passive:!0};function vW(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,Gh)}),a&&l.addEventListener("resize",n.update,Gh),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Gh)}),a&&l.removeEventListener("resize",n.update,Gh)}}const CW={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:vW,data:{}};var wW={left:"right",right:"left",bottom:"top",top:"bottom"};function Wh(e){return e.replace(/left|right|bottom|top/g,function(t){return wW[t]})}var yW={start:"end",end:"start"};function QE(e){return e.replace(/start|end/g,function(t){return yW[t]})}function Nm(e){var t=xi(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Vm(e){return ul(Jo(e)).left+Nm(e).scrollLeft}function bW(e,t){var n=xi(e),i=Jo(e),s=n.visualViewport,o=i.clientWidth,r=i.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var u=UE();(u||!u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Vm(e),y:l}}function SW(e){var t,n=Jo(e),i=Nm(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+Vm(e),l=-i.scrollTop;return wo(s||n).direction==="rtl"&&(a+=Qr(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Bm(e){var t=wo(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function XE(e){return["html","body","#document"].indexOf(Vs(e))>=0?e.ownerDocument.body:Ui(e)&&Bm(e)?e:XE(Hh(e))}function uc(e,t){var n;t===void 0&&(t=[]);var i=XE(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=xi(i),r=s?[o].concat(o.visualViewport||[],Bm(i)?i:[]):i,a=t.concat(r);return s?a:a.concat(uc(Hh(r)))}function Hm(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function EW(e,t){var n=ul(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 eR(e,t,n){return t===GE?Hm(bW(e,n)):Jr(t)?EW(t,n):Hm(SW(Jo(e)))}function RW(e){var t=uc(Hh(e)),n=["absolute","fixed"].indexOf(wo(e).position)>=0,i=n&&Ui(e)?ac(e):e;return Jr(i)?t.filter(function(s){return Jr(s)&&jE(s,i)&&Vs(s)!=="body"}):[]}function DW(e,t,n,i){var s=t==="clippingParents"?RW(e):[].concat(t),o=[].concat(s,[n]),r=o[0],a=o.reduce(function(l,u){var c=eR(e,u,i);return l.top=Qr(c.top,l.top),l.right=Bh(c.right,l.right),l.bottom=Bh(c.bottom,l.bottom),l.left=Qr(c.left,l.left),l},eR(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 tR(e){var t=e.reference,n=e.element,i=e.placement,s=i?Bs(i):null,o=i?cl(i):null,r=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(s){case pi:l={x:r,y:t.y-n.height};break;case zi:l={x:r,y:t.y+t.height};break;case $i:l={x:t.x+t.width,y:a};break;case gi:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var u=s?Lm(s):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case al:l[u]=l[u]-(t[c]/2-n[c]/2);break;case oc:l[u]=l[u]+(t[c]/2-n[c]/2);break}}return l}function cc(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?j2:a,u=n.rootBoundary,c=u===void 0?GE:u,d=n.elementContext,h=d===void 0?rc:d,p=n.altBoundary,g=p===void 0?!1:p,C=n.padding,v=C===void 0?0:C,b=YE(typeof v!="number"?v:ZE(v,sc)),S=h===rc?K2:rc,D=e.rects.popper,w=e.elements[g?S:h],R=DW(Jr(w)?w:w.contextElement||Jo(e.elements.popper),l,c,r),x=ul(e.elements.reference),T=tR({reference:x,element:D,placement:s}),H=Hm(Object.assign({},D,T)),N=h===rc?H:x,A={top:R.top-N.top+b.top,bottom:N.bottom-R.bottom+b.bottom,left:R.left-N.left+b.left,right:N.right-R.right+b.right},_=e.modifiersData.offset;if(h===rc&&_){var V=_[s];Object.keys(A).forEach(function(ie){var me=[$i,zi].indexOf(ie)>=0?1:-1,Te=[pi,zi].indexOf(ie)>=0?"y":"x";A[ie]+=V[Te]*me})}return A}function FW(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?zE:l,c=cl(i),d=c?a?WE:WE.filter(function(g){return cl(g)===c}):sc,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]=cc(e,{placement:C,boundary:s,rootBoundary:o,padding:r})[Bs(C)],g},{});return Object.keys(p).sort(function(g,C){return p[g]-p[C]})}function xW(e){if(Bs(e)===_m)return[];var t=Wh(e);return[QE(e),t,QE(t)]}function TW(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,b=Bs(v),S=b===v,D=l||(S||!g?[Wh(v)]:xW(v)),w=[v].concat(D).reduce(function(nt,Je){return nt.concat(Bs(Je)===_m?FW(t,{placement:Je,boundary:c,rootBoundary:d,padding:u,flipVariations:g,allowedAutoPlacements:C}):Je)},[]),R=t.rects.reference,x=t.rects.popper,T=new Map,H=!0,N=w[0],A=0;A<w.length;A++){var _=w[A],V=Bs(_),ie=cl(_)===al,me=[pi,zi].indexOf(V)>=0,Te=me?"width":"height",q=cc(t,{placement:_,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),z=me?ie?$i:gi:ie?zi:pi;R[Te]>x[Te]&&(z=Wh(z));var M=Wh(z),L=[];if(o&&L.push(q[V]<=0),a&&L.push(q[z]<=0,q[M]<=0),L.every(function(nt){return nt})){N=_,H=!1;break}T.set(_,L)}if(H)for(var ne=g?3:1,we=function(Je){var ht=w.find(function(Ht){var Jt=T.get(Ht);if(Jt)return Jt.slice(0,Je).every(function(Ke){return Ke})});if(ht)return N=ht,"break"},Ae=ne;Ae>0;Ae--){var Le=we(Ae);if(Le==="break")break}t.placement!==N&&(t.modifiersData[i]._skip=!0,t.placement=N,t.reset=!0)}}const PW={name:"flip",enabled:!0,phase:"main",fn:TW,requiresIfExists:["offset"],data:{_skip:!1}};function nR(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 iR(e){return[pi,$i,zi,gi].some(function(t){return e[t]>=0})}function AW(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,r=cc(t,{elementContext:"reference"}),a=cc(t,{altBoundary:!0}),l=nR(r,i),u=nR(a,s,o),c=iR(l),d=iR(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 IW={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:AW};function _W(e,t,n){var i=Bs(e),s=[gi,pi].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,[gi,$i].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function kW(e){var t=e.state,n=e.options,i=e.name,s=n.offset,o=s===void 0?[0,0]:s,r=zE.reduce(function(c,d){return c[d]=_W(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 OW={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:kW};function MW(e){var t=e.state,n=e.name;t.modifiersData[n]=tR({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const LW={name:"popperOffsets",enabled:!0,phase:"read",fn:MW,data:{}};function NW(e){return e==="x"?"y":"x"}function VW(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=cc(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),b=Bs(t.placement),S=cl(t.placement),D=!S,w=Lm(b),R=NW(w),x=t.modifiersData.popperOffsets,T=t.rects.reference,H=t.rects.popper,N=typeof C=="function"?C(Object.assign({},t.rects,{placement:t.placement})):C,A=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(x){if(o){var ie,me=w==="y"?pi:gi,Te=w==="y"?zi:$i,q=w==="y"?"height":"width",z=x[w],M=z+v[me],L=z-v[Te],ne=p?-H[q]/2:0,we=S===al?T[q]:H[q],Ae=S===al?-H[q]:-T[q],Le=t.elements.arrow,nt=p&&Le?Mm(Le):{width:0,height:0},Je=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:qE(),ht=Je[me],Ht=Je[Te],Jt=lc(0,T[q],nt[q]),Ke=D?T[q]/2-ne-Jt-ht-A.mainAxis:we-Jt-ht-A.mainAxis,yn=D?-T[q]/2+ne+Jt+Ht+A.mainAxis:Ae+Jt+Ht+A.mainAxis,Ut=t.elements.arrow&&ac(t.elements.arrow),xt=Ut?w==="y"?Ut.clientTop||0:Ut.clientLeft||0:0,O=(ie=_==null?void 0:_[w])!=null?ie:0,$=z+Ke-O-xt,ue=z+yn-O,se=lc(p?Bh(M,$):M,z,p?Qr(L,ue):L);x[w]=se,V[w]=se-z}if(a){var j,re=w==="x"?pi:gi,Fe=w==="x"?zi:$i,De=x[R],be=R==="y"?"height":"width",Se=De+v[re],Qe=De-v[Fe],Ve=[pi,gi].indexOf(b)!==-1,Xe=(j=_==null?void 0:_[R])!=null?j:0,it=Ve?Se:De-T[be]-H[be]-Xe+A.altAxis,vt=Ve?De+T[be]+H[be]-Xe-A.altAxis:Qe,Tt=p&&Ve?lW(it,De,vt):lc(p?it:Se,De,p?vt:Qe);x[R]=Tt,V[R]=Tt-De}t.modifiersData[i]=V}}const BW={name:"preventOverflow",enabled:!0,phase:"main",fn:VW,requiresIfExists:["offset"]};function HW(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function GW(e){return e===xi(e)||!Ui(e)?Nm(e):HW(e)}function WW(e){var t=e.getBoundingClientRect(),n=ll(t.width)/e.offsetWidth||1,i=ll(t.height)/e.offsetHeight||1;return n!==1||i!==1}function zW(e,t,n){n===void 0&&(n=!1);var i=Ui(t),s=Ui(t)&&WW(t),o=Jo(t),r=ul(e,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((Vs(t)!=="body"||Bm(o))&&(a=GW(t)),Ui(t)?(l=ul(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Vm(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function $W(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 UW(e){var t=$W(e);return iW.reduce(function(n,i){return n.concat(t.filter(function(s){return s.phase===i}))},[])}function jW(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function KW(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 sR={placement:"bottom",modifiers:[],strategy:"absolute"};function oR(){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 qW(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,s=t.defaultOptions,o=s===void 0?sR:s;return function(a,l,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},sR,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],h=!1,p={state:c,setOptions:function(b){var S=typeof b=="function"?b(c.options):b;C(),c.options=Object.assign({},o,c.options,S),c.scrollParents={reference:Jr(a)?uc(a):a.contextElement?uc(a.contextElement):[],popper:uc(l)};var D=UW(KW([].concat(i,c.options.modifiers)));return c.orderedModifiers=D.filter(function(w){return w.enabled}),g(),p.update()},forceUpdate:function(){if(!h){var b=c.elements,S=b.reference,D=b.popper;if(oR(S,D)){c.rects={reference:zW(S,ac(D),c.options.strategy==="fixed"),popper:Mm(D)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(A){return c.modifiersData[A.name]=Object.assign({},A.data)});for(var w=0;w<c.orderedModifiers.length;w++){if(c.reset===!0){c.reset=!1,w=-1;continue}var R=c.orderedModifiers[w],x=R.fn,T=R.options,H=T===void 0?{}:T,N=R.name;typeof x=="function"&&(c=x({state:c,options:H,name:N,instance:p})||c)}}}},update:jW(function(){return new Promise(function(v){p.forceUpdate(),v(c)})}),destroy:function(){C(),h=!0}};if(!oR(a,l))return p;p.setOptions(u).then(function(v){!h&&u.onFirstUpdate&&u.onFirstUpdate(v)});function g(){c.orderedModifiers.forEach(function(v){var b=v.name,S=v.options,D=S===void 0?{}:S,w=v.effect;if(typeof w=="function"){var R=w({state:c,name:b,instance:p,options:D}),x=function(){};d.push(R||x)}})}function C(){d.forEach(function(v){return v()}),d=[]}return p}}var YW=[CW,LW,mW,$E,OW,PW,BW,hW,IW],ZW=qW({defaultModifiers:YW}),JW="tippy-box",rR="tippy-content",QW="tippy-backdrop",aR="tippy-arrow",lR="tippy-svg-arrow",Xr={passive:!0,capture:!0},uR=function(){return document.body};function XW(e,t){return{}.hasOwnProperty.call(e,t)}function Gm(e,t,n){if(Array.isArray(e)){var i=e[t];return i??(Array.isArray(n)?n[t]:n)}return e}function Wm(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function cR(e,t){return typeof e=="function"?e.apply(void 0,t):e}function dR(e,t){if(t===0)return e;var n;return function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)}}function ez(e,t){var n=Object.assign({},e);return t.forEach(function(i){delete n[i]}),n}function tz(e){return e.split(/\s+/).filter(Boolean)}function dl(e){return[].concat(e)}function hR(e,t){e.indexOf(t)===-1&&e.push(t)}function nz(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function iz(e){return e.split("-")[0]}function zh(e){return[].slice.call(e)}function fR(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function dc(){return document.createElement("div")}function hc(e){return["Element","Fragment"].some(function(t){return Wm(e,t)})}function sz(e){return Wm(e,"NodeList")}function oz(e){return Wm(e,"MouseEvent")}function rz(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function az(e){return hc(e)?[e]:sz(e)?zh(e):Array.isArray(e)?e:zh(document.querySelectorAll(e))}function zm(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function pR(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function lz(e){var t,n=dl(e),i=n[0];return i!=null&&(t=i.ownerDocument)!=null&&t.body?i.ownerDocument:document}function uz(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=iz(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,b=o.left-n+p>l,S=n-o.right-g>l;return C||v||b||S})}function $m(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(s){e[i](s,n)})}function gR(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 Hs={isTouch:!1},mR=0;function cz(){Hs.isTouch||(Hs.isTouch=!0,window.performance&&document.addEventListener("mousemove",vR))}function vR(){var e=performance.now();e-mR<20&&(Hs.isTouch=!1,document.removeEventListener("mousemove",vR)),mR=e}function dz(){var e=document.activeElement;if(rz(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function hz(){document.addEventListener("touchstart",cz,Xr),window.addEventListener("blur",dz)}var fz=typeof window<"u"&&typeof document<"u",pz=fz?!!window.msCrypto:!1;function hl(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 CR(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function gz(e){return CR(`
|
|
32
|
+
%ctippy.js
|
|
33
|
+
|
|
34
|
+
%c`+CR(e)+`
|
|
35
|
+
|
|
36
|
+
%c👷 This is a development-only message. It will be removed in production.
|
|
37
|
+
`)}function wR(e){return[gz(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var fc;I.env.NODE_ENV!=="production"&&mz();function mz(){fc=new Set}function yo(e,t){if(e&&!fc.has(t)){var n;fc.add(t),(n=console).warn.apply(n,wR(t))}}function Um(e,t){if(e&&!fc.has(t)){var n;fc.add(t),(n=console).error.apply(n,wR(t))}}function vz(e){var t=!e,n=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;Um(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),Um(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var yR={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Cz={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ti=Object.assign({appendTo:uR,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},yR,Cz),wz=Object.keys(Ti),yz=function(t){I.env.NODE_ENV!=="production"&&ER(t,[]);var n=Object.keys(t);n.forEach(function(i){Ti[i]=t[i]})};function bR(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=Ti[o])!=null?a:r}return i},{});return Object.assign({},e,n)}function bz(e,t){var n=t?Object.keys(bR(Object.assign({},Ti,{plugins:t}))):wz,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 SR(e,t){var n=Object.assign({},t,{content:cR(t.content,[e])},t.ignoreAttributes?{}:bz(e,t.plugins));return n.aria=Object.assign({},Ti.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 ER(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=Object.keys(e);n.forEach(function(i){var s=ez(Ti,Object.keys(yR)),o=!XW(s,i);o&&(o=t.filter(function(r){return r.name===i}).length===0),yo(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.",`
|
|
38
|
+
|
|
39
|
+
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
40
|
+
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Sz=function(){return"innerHTML"};function jm(e,t){e[Sz()]=t}function RR(e){var t=dc();return e===!0?t.className=aR:(t.className=lR,hc(e)?t.appendChild(e):jm(t,e)),t}function DR(e,t){hc(t.content)?(jm(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?jm(e,t.content):e.textContent=t.content)}function Km(e){var t=e.firstElementChild,n=zh(t.children);return{box:t,content:n.find(function(i){return i.classList.contains(rR)}),arrow:n.find(function(i){return i.classList.contains(aR)||i.classList.contains(lR)}),backdrop:n.find(function(i){return i.classList.contains(QW)})}}function FR(e){var t=dc(),n=dc();n.className=JW,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=dc();i.className=rR,i.setAttribute("data-state","hidden"),DR(i,e.props),t.appendChild(n),n.appendChild(i),s(e.props,e.props);function s(o,r){var a=Km(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)&&DR(u,e.props),r.arrow?c?o.arrow!==r.arrow&&(l.removeChild(c),l.appendChild(RR(r.arrow))):l.appendChild(RR(r.arrow)):c&&l.removeChild(c)}return{popper:t,onUpdate:s}}FR.$$tippy=!0;var Ez=1,$h=[],qm=[];function Rz(e,t){var n=SR(e,Object.assign({},Ti,bR(fR(t)))),i,s,o,r=!1,a=!1,l=!1,u=!1,c,d,h,p=[],g=dR($,n.interactiveDebounce),C,v=Ez++,b=null,S=nz(n.plugins),D={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},w={id:v,reference:e,popper:dc(),popperInstance:b,props:n,state:D,plugins:S,clearDelayTimeouts:it,setProps:vt,setContent:Tt,show:It,hide:bn,hideWithInteractivity:un,enable:Ve,disable:Xe,unmount:Wn,destroy:Qn};if(!n.render)return I.env.NODE_ENV!=="production"&&Um(!0,"render() function has not been supplied."),w;var R=n.render(w),x=R.popper,T=R.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+w.id,w.popper=x,e._tippy=w,x._tippy=w;var H=S.map(function(pe){return pe.fn(w)}),N=e.hasAttribute("aria-expanded");return Ut(),ne(),z(),M("onCreate",[w]),n.showOnCreate&&Se(),x.addEventListener("mouseenter",function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()}),x.addEventListener("mouseleave",function(){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&me().addEventListener("mousemove",g)}),w;function A(){var pe=w.props.touch;return Array.isArray(pe)?pe:[pe,0]}function _(){return A()[0]==="hold"}function V(){var pe;return!!((pe=w.props.render)!=null&&pe.$$tippy)}function ie(){return C||e}function me(){var pe=ie().parentNode;return pe?lz(pe):document}function Te(){return Km(x)}function q(pe){return w.state.isMounted&&!w.state.isVisible||Hs.isTouch||c&&c.type==="focus"?0:Gm(w.props.delay,pe?0:1,Ti.delay)}function z(pe){pe===void 0&&(pe=!1),x.style.pointerEvents=w.props.interactive&&!pe?"":"none",x.style.zIndex=""+w.props.zIndex}function M(pe,ve,qe){if(qe===void 0&&(qe=!0),H.forEach(function(Et){Et[pe]&&Et[pe].apply(Et,ve)}),qe){var ft;(ft=w.props)[pe].apply(ft,ve)}}function L(){var pe=w.props.aria;if(pe.content){var ve="aria-"+pe.content,qe=x.id,ft=dl(w.props.triggerTarget||e);ft.forEach(function(Et){var _e=Et.getAttribute(ve);if(w.state.isVisible)Et.setAttribute(ve,_e?_e+" "+qe:qe);else{var Xn=_e&&_e.replace(qe,"").trim();Xn?Et.setAttribute(ve,Xn):Et.removeAttribute(ve)}})}}function ne(){if(!(N||!w.props.aria.expanded)){var pe=dl(w.props.triggerTarget||e);pe.forEach(function(ve){w.props.interactive?ve.setAttribute("aria-expanded",w.state.isVisible&&ve===ie()?"true":"false"):ve.removeAttribute("aria-expanded")})}}function we(){me().removeEventListener("mousemove",g),$h=$h.filter(function(pe){return pe!==g})}function Ae(pe){if(!(Hs.isTouch&&(l||pe.type==="mousedown"))){var ve=pe.composedPath&&pe.composedPath()[0]||pe.target;if(!(w.props.interactive&&gR(x,ve))){if(dl(w.props.triggerTarget||e).some(function(qe){return gR(qe,ve)})){if(Hs.isTouch||w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[w,pe]);w.props.hideOnClick===!0&&(w.clearDelayTimeouts(),w.hide(),a=!0,setTimeout(function(){a=!1}),w.state.isMounted||ht())}}}function Le(){l=!0}function nt(){l=!1}function Je(){var pe=me();pe.addEventListener("mousedown",Ae,!0),pe.addEventListener("touchend",Ae,Xr),pe.addEventListener("touchstart",nt,Xr),pe.addEventListener("touchmove",Le,Xr)}function ht(){var pe=me();pe.removeEventListener("mousedown",Ae,!0),pe.removeEventListener("touchend",Ae,Xr),pe.removeEventListener("touchstart",nt,Xr),pe.removeEventListener("touchmove",Le,Xr)}function Ht(pe,ve){Ke(pe,function(){!w.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&ve()})}function Jt(pe,ve){Ke(pe,ve)}function Ke(pe,ve){var qe=Te().box;function ft(Et){Et.target===qe&&($m(qe,"remove",ft),ve())}if(pe===0)return ve();$m(qe,"remove",d),$m(qe,"add",ft),d=ft}function yn(pe,ve,qe){qe===void 0&&(qe=!1);var ft=dl(w.props.triggerTarget||e);ft.forEach(function(Et){Et.addEventListener(pe,ve,qe),p.push({node:Et,eventType:pe,handler:ve,options:qe})})}function Ut(){_()&&(yn("touchstart",O,{passive:!0}),yn("touchend",ue,{passive:!0})),tz(w.props.trigger).forEach(function(pe){if(pe!=="manual")switch(yn(pe,O),pe){case"mouseenter":yn("mouseleave",ue);break;case"focus":yn(pz?"focusout":"blur",se);break;case"focusin":yn("focusout",se);break}})}function xt(){p.forEach(function(pe){var ve=pe.node,qe=pe.eventType,ft=pe.handler,Et=pe.options;ve.removeEventListener(qe,ft,Et)}),p=[]}function O(pe){var ve,qe=!1;if(!(!w.state.isEnabled||j(pe)||a)){var ft=((ve=c)==null?void 0:ve.type)==="focus";c=pe,C=pe.currentTarget,ne(),!w.state.isVisible&&oz(pe)&&$h.forEach(function(Et){return Et(pe)}),pe.type==="click"&&(w.props.trigger.indexOf("mouseenter")<0||r)&&w.props.hideOnClick!==!1&&w.state.isVisible?qe=!0:Se(pe),pe.type==="click"&&(r=!qe),qe&&!ft&&Qe(pe)}}function $(pe){var ve=pe.target,qe=ie().contains(ve)||x.contains(ve);if(!(pe.type==="mousemove"&&qe)){var ft=be().concat(x).map(function(Et){var _e,Xn=Et._tippy,Vo=(_e=Xn.popperInstance)==null?void 0:_e.state;return Vo?{popperRect:Et.getBoundingClientRect(),popperState:Vo,props:n}:null}).filter(Boolean);uz(ft,pe)&&(we(),Qe(pe))}}function ue(pe){var ve=j(pe)||w.props.trigger.indexOf("click")>=0&&r;if(!ve){if(w.props.interactive){w.hideWithInteractivity(pe);return}Qe(pe)}}function se(pe){w.props.trigger.indexOf("focusin")<0&&pe.target!==ie()||w.props.interactive&&pe.relatedTarget&&x.contains(pe.relatedTarget)||Qe(pe)}function j(pe){return Hs.isTouch?_()!==pe.type.indexOf("touch")>=0:!1}function re(){Fe();var pe=w.props,ve=pe.popperOptions,qe=pe.placement,ft=pe.offset,Et=pe.getReferenceClientRect,_e=pe.moveTransition,Xn=V()?Km(x).arrow:null,Vo=Et?{getBoundingClientRect:Et,contextElement:Et.contextElement||ie()}:e,gu={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(mu){var Sr=mu.state;if(V()){var Er=Te(),so=Er.box;["placement","reference-hidden","escaped"].forEach(function(Rr){Rr==="placement"?so.setAttribute("data-placement",Sr.placement):Sr.attributes.popper["data-popper-"+Rr]?so.setAttribute("data-"+Rr,""):so.removeAttribute("data-"+Rr)}),Sr.attributes.popper={}}}},io=[{name:"offset",options:{offset:ft}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!_e}},gu];V()&&Xn&&io.push({name:"arrow",options:{element:Xn,padding:3}}),io.push.apply(io,(ve==null?void 0:ve.modifiers)||[]),w.popperInstance=ZW(Vo,x,Object.assign({},ve,{placement:qe,onFirstUpdate:h,modifiers:io}))}function Fe(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function De(){var pe=w.props.appendTo,ve,qe=ie();w.props.interactive&&pe===uR||pe==="parent"?ve=qe.parentNode:ve=cR(pe,[qe]),ve.contains(x)||ve.appendChild(x),w.state.isMounted=!0,re(),I.env.NODE_ENV!=="production"&&yo(w.props.interactive&&pe===Ti.appendTo&&qe.nextElementSibling!==x,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
|
|
41
|
+
|
|
42
|
+
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
|
|
43
|
+
|
|
44
|
+
`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
|
|
45
|
+
|
|
46
|
+
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function be(){return zh(x.querySelectorAll("[data-tippy-root]"))}function Se(pe){w.clearDelayTimeouts(),pe&&M("onTrigger",[w,pe]),Je();var ve=q(!0),qe=A(),ft=qe[0],Et=qe[1];Hs.isTouch&&ft==="hold"&&Et&&(ve=Et),ve?i=setTimeout(function(){w.show()},ve):w.show()}function Qe(pe){if(w.clearDelayTimeouts(),M("onUntrigger",[w,pe]),!w.state.isVisible){ht();return}if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(pe.type)>=0&&r)){var ve=q(!1);ve?s=setTimeout(function(){w.state.isVisible&&w.hide()},ve):o=requestAnimationFrame(function(){w.hide()})}}function Ve(){w.state.isEnabled=!0}function Xe(){w.hide(),w.state.isEnabled=!1}function it(){clearTimeout(i),clearTimeout(s),cancelAnimationFrame(o)}function vt(pe){if(I.env.NODE_ENV!=="production"&&yo(w.state.isDestroyed,hl("setProps")),!w.state.isDestroyed){M("onBeforeUpdate",[w,pe]),xt();var ve=w.props,qe=SR(e,Object.assign({},ve,fR(pe),{ignoreAttributes:!0}));w.props=qe,Ut(),ve.interactiveDebounce!==qe.interactiveDebounce&&(we(),g=dR($,qe.interactiveDebounce)),ve.triggerTarget&&!qe.triggerTarget?dl(ve.triggerTarget).forEach(function(ft){ft.removeAttribute("aria-expanded")}):qe.triggerTarget&&e.removeAttribute("aria-expanded"),ne(),z(),T&&T(ve,qe),w.popperInstance&&(re(),be().forEach(function(ft){requestAnimationFrame(ft._tippy.popperInstance.forceUpdate)})),M("onAfterUpdate",[w,pe])}}function Tt(pe){w.setProps({content:pe})}function It(){I.env.NODE_ENV!=="production"&&yo(w.state.isDestroyed,hl("show"));var pe=w.state.isVisible,ve=w.state.isDestroyed,qe=!w.state.isEnabled,ft=Hs.isTouch&&!w.props.touch,Et=Gm(w.props.duration,0,Ti.duration);if(!(pe||ve||qe||ft)&&!ie().hasAttribute("disabled")&&(M("onShow",[w],!1),w.props.onShow(w)!==!1)){if(w.state.isVisible=!0,V()&&(x.style.visibility="visible"),z(),Je(),w.state.isMounted||(x.style.transition="none"),V()){var _e=Te(),Xn=_e.box,Vo=_e.content;zm([Xn,Vo],0)}h=function(){var io;if(!(!w.state.isVisible||u)){if(u=!0,x.offsetHeight,x.style.transition=w.props.moveTransition,V()&&w.props.animation){var ka=Te(),mu=ka.box,Sr=ka.content;zm([mu,Sr],Et),pR([mu,Sr],"visible")}L(),ne(),hR(qm,w),(io=w.popperInstance)==null||io.forceUpdate(),M("onMount",[w]),w.props.animation&&V()&&Jt(Et,function(){w.state.isShown=!0,M("onShown",[w])})}},De()}}function bn(){I.env.NODE_ENV!=="production"&&yo(w.state.isDestroyed,hl("hide"));var pe=!w.state.isVisible,ve=w.state.isDestroyed,qe=!w.state.isEnabled,ft=Gm(w.props.duration,1,Ti.duration);if(!(pe||ve||qe)&&(M("onHide",[w],!1),w.props.onHide(w)!==!1)){if(w.state.isVisible=!1,w.state.isShown=!1,u=!1,r=!1,V()&&(x.style.visibility="hidden"),we(),ht(),z(!0),V()){var Et=Te(),_e=Et.box,Xn=Et.content;w.props.animation&&(zm([_e,Xn],ft),pR([_e,Xn],"hidden"))}L(),ne(),w.props.animation?V()&&Ht(ft,w.unmount):w.unmount()}}function un(pe){I.env.NODE_ENV!=="production"&&yo(w.state.isDestroyed,hl("hideWithInteractivity")),me().addEventListener("mousemove",g),hR($h,g),g(pe)}function Wn(){I.env.NODE_ENV!=="production"&&yo(w.state.isDestroyed,hl("unmount")),w.state.isVisible&&w.hide(),w.state.isMounted&&(Fe(),be().forEach(function(pe){pe._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x),qm=qm.filter(function(pe){return pe!==w}),w.state.isMounted=!1,M("onHidden",[w]))}function Qn(){I.env.NODE_ENV!=="production"&&yo(w.state.isDestroyed,hl("destroy")),!w.state.isDestroyed&&(w.clearDelayTimeouts(),w.unmount(),xt(),delete e._tippy,w.state.isDestroyed=!0,M("onDestroy",[w]))}}function fl(e,t){t===void 0&&(t={});var n=Ti.plugins.concat(t.plugins||[]);I.env.NODE_ENV!=="production"&&(vz(e),ER(t,n)),hz();var i=Object.assign({},t,{plugins:n}),s=az(e);if(I.env.NODE_ENV!=="production"){var o=hc(i.content),r=s.length>1;yo(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.",`
|
|
47
|
+
|
|
48
|
+
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
|
|
49
|
+
|
|
50
|
+
`,`1) content: element.innerHTML
|
|
51
|
+
`,"2) content: () => element.cloneNode(true)"].join(" "))}var a=s.reduce(function(l,u){var c=u&&Rz(u,i);return c&&l.push(c),l},[]);return hc(e)?a[0]:a}fl.defaultProps=Ti,fl.setDefaultProps=yz,fl.currentInput=Hs,Object.assign({},$E,{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)}}),fl.setDefaultProps({render:FR});const Dz={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 Fz(e){return e.value?"$el"in e.value?e.value.$el:e.value:null}function bo(e={}){const t={...Dz,...e},n=fe(null),i=fe(null),s=fe(null),o=fe(!1),r=(...C)=>{t.debug&&console.log("[useTippyComposable]",...C)},a=()=>{s.value&&(r("Destroying Tippy instance"),s.value.destroy(),s.value=null,o.value=!1)},l=C=>{const{showOnInit:v,alwaysShow:b,showArrow:S,debug:D,...w}=t;return{...w,content:C,theme:t.theme,trigger:b?"manual":t.trigger,placement:t.placement,interactive:t.interactive,appendTo:t.appendTo,arrow:S,animation:"fade",onShow:R=>{if(r("onShow",{label:R.reference.textContent}),o.value=!0,e.onShow)return e.onShow(R)},onHide:R=>{if(r("onHide",{label:R.reference.textContent}),b)return r("Hide prevented by alwaysShow option"),!1;if(o.value=!1,e.onHide)return e.onHide(R)},onClickOutside:(R,x)=>{var T;if(r("onClickOutside",{target:(T=x.target)==null?void 0:T.tagName,label:R.reference.textContent}),e.onClickOutside)return e.onClickOutside(R,x);b||R.hide()},popperOptions:t.popperOptions||{modifiers:[{name:"computeStyles",options:{gpuAcceleration:!1}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{fallbackPlacements:["top","bottom","left","right"]}}]}}},u=()=>{var b;a();const C=Fz(n),v=i.value;if(!C||!v){r("Cannot initialize: missing trigger or popup element",{hasTrigger:!!C,hasPopup:!!v});return}v.style.display==="none"&&(v.style.display="");try{const S=l(v),D=fl(C,S);s.value=Array.isArray(D)?D[0]:D,r("Tippy instance created",{config:S}),(t.showOnInit||t.alwaysShow)&&((b=s.value)==null||b.show())}catch(S){console.error("[useTippyComposable] Failed to create Tippy instance:",S)}},c=()=>{s.value?(r("Showing tooltip"),s.value.show()):r("Cannot show: instance not initialized")},d=()=>{if(t.alwaysShow){r("Hide prevented by alwaysShow option");return}s.value?(r("Hiding tooltip"),s.value.hide()):r("Cannot hide: instance not initialized")},h=()=>{o.value?d():c()},p=C=>{s.value&&(s.value.setContent(C),r("Content updated"))},g=C=>{s.value&&(s.value.setProps(C),r("Props updated",C))};return Dt([n,i],u,{flush:"post"}),hs(()=>{r("Component unmounting, destroying Tippy"),a()}),{instance:s,isVisible:o,show:c,hide:d,toggle:h,triggerRef:n,popupRef:i,destroyTippy:a,setContent:p,setProps:g}}const xR=(e,t)=>{const n=fe("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 ea extends Error{}class xz extends ea{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Tz extends ea{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Pz extends ea{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class pl extends ea{}class TR extends ea{constructor(t){super(`Invalid unit ${t}`)}}class jn extends ea{}class Qo extends ea{constructor(){super("Zone is an abstract class")}}const je="numeric",ms="short",Pi="long",Uh={year:je,month:je,day:je},PR={year:je,month:ms,day:je},Az={year:je,month:ms,day:je,weekday:ms},AR={year:je,month:Pi,day:je},IR={year:je,month:Pi,day:je,weekday:Pi},_R={hour:je,minute:je},kR={hour:je,minute:je,second:je},OR={hour:je,minute:je,second:je,timeZoneName:ms},MR={hour:je,minute:je,second:je,timeZoneName:Pi},LR={hour:je,minute:je,hourCycle:"h23"},NR={hour:je,minute:je,second:je,hourCycle:"h23"},VR={hour:je,minute:je,second:je,hourCycle:"h23",timeZoneName:ms},BR={hour:je,minute:je,second:je,hourCycle:"h23",timeZoneName:Pi},HR={year:je,month:je,day:je,hour:je,minute:je},GR={year:je,month:je,day:je,hour:je,minute:je,second:je},WR={year:je,month:ms,day:je,hour:je,minute:je},zR={year:je,month:ms,day:je,hour:je,minute:je,second:je},Iz={year:je,month:ms,day:je,weekday:ms,hour:je,minute:je},$R={year:je,month:Pi,day:je,hour:je,minute:je,timeZoneName:ms},UR={year:je,month:Pi,day:je,hour:je,minute:je,second:je,timeZoneName:ms},jR={year:je,month:Pi,day:je,weekday:Pi,hour:je,minute:je,timeZoneName:Pi},KR={year:je,month:Pi,day:je,weekday:Pi,hour:je,minute:je,second:je,timeZoneName:Pi};class pc{get type(){throw new Qo}get name(){throw new Qo}get ianaName(){return this.name}get isUniversal(){throw new Qo}offsetName(t,n){throw new Qo}formatOffset(t,n){throw new Qo}offset(t){throw new Qo}equals(t){throw new Qo}get isValid(){throw new Qo}}let Ym=null;class jh extends pc{static get instance(){return Ym===null&&(Ym=new jh),Ym}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return wD(t,n,i)}formatOffset(t,n){return Cc(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const Zm=new Map;function _z(e){let t=Zm.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"}),Zm.set(e,t)),t}const kz={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Oz(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 Mz(e,t){const n=e.formatToParts(t),i=[];for(let s=0;s<n.length;s++){const{type:o,value:r}=n[s],a=kz[o];o==="era"?i[a]=r:pt(a)||(i[a]=parseInt(r,10))}return i}const Jm=new Map;class So extends pc{static create(t){let n=Jm.get(t);return n===void 0&&Jm.set(t,n=new So(t)),n}static resetCache(){Jm.clear(),Zm.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=So.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return wD(t,n,i,this.name)}formatOffset(t,n){return Cc(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const i=_z(this.name);let[s,o,r,a,l,u,c]=i.formatToParts?Mz(i,n):Oz(i,n);a==="BC"&&(s=-Math.abs(s)+1);const h=Jh({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 qR={};function Lz(e,t={}){const n=JSON.stringify([e,t]);let i=qR[n];return i||(i=new Intl.ListFormat(e,t),qR[n]=i),i}const Qm=new Map;function Xm(e,t={}){const n=JSON.stringify([e,t]);let i=Qm.get(n);return i===void 0&&(i=new Intl.DateTimeFormat(e,t),Qm.set(n,i)),i}const ev=new Map;function Nz(e,t={}){const n=JSON.stringify([e,t]);let i=ev.get(n);return i===void 0&&(i=new Intl.NumberFormat(e,t),ev.set(n,i)),i}const tv=new Map;function Vz(e,t={}){const{base:n,...i}=t,s=JSON.stringify([e,i]);let o=tv.get(s);return o===void 0&&(o=new Intl.RelativeTimeFormat(e,t),tv.set(s,o)),o}let gc=null;function Bz(){return gc||(gc=new Intl.DateTimeFormat().resolvedOptions().locale,gc)}const nv=new Map;function YR(e){let t=nv.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),nv.set(e,t)),t}const iv=new Map;function Hz(e){let t=iv.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...ZR,...t}),iv.set(e,t)}return t}function Gz(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=Xm(e).resolvedOptions(),s=e}catch{const l=e.substring(0,n);i=Xm(l).resolvedOptions(),s=l}const{numberingSystem:o,calendar:r}=i;return[s,o,r]}}function Wz(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function zz(e){const t=[];for(let n=1;n<=12;n++){const i=Ue.utc(2009,n,1);t.push(e(i))}return t}function $z(e){const t=[];for(let n=1;n<=7;n++){const i=Ue.utc(2016,11,13+n);t.push(e(i))}return t}function Kh(e,t,n,i){const s=e.listingMode();return s==="error"?null:s==="en"?n(t):i(t)}function Uz(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||YR(e.locale).numberingSystem==="latn"}class jz{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=Nz(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):hv(t,3);return Tn(n,this.padTo)}}}class Kz{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&&So.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=Xm(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 qz{constructor(t,n,i){this.opts={style:"long",...i},!n&&gD()&&(this.rtf=Vz(t,i))}format(t,n){return this.rtf?this.rtf.format(t,n):m$(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const ZR={firstDay:1,minimalDays:4,weekend:[6,7]};class zt{static fromOpts(t){return zt.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,i,s,o=!1){const r=t||fn.defaultLocale,a=r||(o?"en-US":Bz()),l=n||fn.defaultNumberingSystem,u=i||fn.defaultOutputCalendar,c=cv(s)||fn.defaultWeekSettings;return new zt(a,l,u,c,r)}static resetCache(){gc=null,Qm.clear(),ev.clear(),tv.clear(),nv.clear(),iv.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:i,weekSettings:s}={}){return zt.create(t,n,i,s)}constructor(t,n,i,s,o){const[r,a,l]=Gz(t);this.locale=r,this.numberingSystem=n||a||null,this.outputCalendar=i||l||null,this.weekSettings=s,this.intl=Wz(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=Uz(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:zt.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,cv(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 Kh(this,t,SD,()=>{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]=zz(r)}return this.monthsCache[o][t]})}weekdays(t,n=!1){return Kh(this,t,DD,()=>{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 Kh(this,void 0,()=>FD,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ue.utc(2016,11,13,9),Ue.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Kh(this,t,xD,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[Ue.utc(-40,1,1),Ue.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 jz(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new Kz(t,this.intl,n)}relFormatter(t={}){return new qz(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Lz(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||YR(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:mD()?Hz(this.locale):ZR}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 sv=null;class li extends pc{static get utcInstance(){return sv===null&&(sv=new li(0)),sv}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(Qh(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Cc(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Cc(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Cc(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 Yz extends pc{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 Xo(e,t){if(pt(e)||e===null)return t;if(e instanceof pc)return e;if(t$(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?jh.instance:n==="utc"||n==="gmt"?li.utcInstance:li.parseSpecifier(n)||So.create(e)}else return er(e)?li.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new Yz(e)}const ov={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},JR={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]},Zz=ov.hanidec.replace(/[\[|\]]/g,"").split("");function Jz(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(ov.hanidec)!==-1)t+=Zz.indexOf(e[n]);else for(const s in JR){const[o,r]=JR[s];i>=o&&i<=r&&(t+=i-o)}}return parseInt(t,10)}else return t}const rv=new Map;function Qz(){rv.clear()}function vs({numberingSystem:e},t=""){const n=e||"latn";let i=rv.get(n);i===void 0&&(i=new Map,rv.set(n,i));let s=i.get(t);return s===void 0&&(s=new RegExp(`${ov[n]}${t}`),i.set(t,s)),s}let QR=()=>Date.now(),XR="system",eD=null,tD=null,nD=null,iD=60,sD,oD=null;class fn{static get now(){return QR}static set now(t){QR=t}static set defaultZone(t){XR=t}static get defaultZone(){return Xo(XR,jh.instance)}static get defaultLocale(){return eD}static set defaultLocale(t){eD=t}static get defaultNumberingSystem(){return tD}static set defaultNumberingSystem(t){tD=t}static get defaultOutputCalendar(){return nD}static set defaultOutputCalendar(t){nD=t}static get defaultWeekSettings(){return oD}static set defaultWeekSettings(t){oD=cv(t)}static get twoDigitCutoffYear(){return iD}static set twoDigitCutoffYear(t){iD=t%100}static get throwOnInvalid(){return sD}static set throwOnInvalid(t){sD=t}static resetCaches(){zt.resetCache(),So.resetCache(),Ue.resetCache(),Qz()}}class Cs{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const rD=[0,31,59,90,120,151,181,212,243,273,304,334],aD=[0,31,60,91,121,152,182,213,244,274,305,335];function ji(e,t){return new Cs("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function av(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 lD(e,t,n){return n+(mc(e)?aD:rD)[t-1]}function uD(e,t){const n=mc(e)?aD:rD,i=n.findIndex(o=>o<t),s=t-n[i];return{month:i+1,day:s}}function lv(e,t){return(e-t+7)%7+1}function qh(e,t=4,n=1){const{year:i,month:s,day:o}=e,r=lD(i,s,o),a=lv(av(i,s,o),n);let l=Math.floor((r-a+14-t)/7),u;return l<1?(u=i-1,l=vc(u,t,n)):l>vc(i,t,n)?(u=i+1,l=1):u=i,{weekYear:u,weekNumber:l,weekday:a,...ef(e)}}function cD(e,t=4,n=1){const{weekYear:i,weekNumber:s,weekday:o}=e,r=lv(av(i,1,t),n),a=ml(i);let l=s*7+o-r-7+t,u;l<1?(u=i-1,l+=ml(u)):l>a?(u=i+1,l-=ml(i)):u=i;const{month:c,day:d}=uD(u,l);return{year:u,month:c,day:d,...ef(e)}}function uv(e){const{year:t,month:n,day:i}=e,s=lD(t,n,i);return{year:t,ordinal:s,...ef(e)}}function dD(e){const{year:t,ordinal:n}=e,{month:i,day:s}=uD(t,n);return{year:t,month:i,day:s,...ef(e)}}function hD(e,t){if(!pt(e.localWeekday)||!pt(e.localWeekNumber)||!pt(e.localWeekYear)){if(!pt(e.weekday)||!pt(e.weekNumber)||!pt(e.weekYear))throw new pl("Cannot mix locale-based week fields with ISO-based week fields");return pt(e.localWeekday)||(e.weekday=e.localWeekday),pt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),pt(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 Xz(e,t=4,n=1){const i=Yh(e.weekYear),s=Ki(e.weekNumber,1,vc(e.weekYear,t,n)),o=Ki(e.weekday,1,7);return i?s?o?!1:ji("weekday",e.weekday):ji("week",e.weekNumber):ji("weekYear",e.weekYear)}function e$(e){const t=Yh(e.year),n=Ki(e.ordinal,1,ml(e.year));return t?n?!1:ji("ordinal",e.ordinal):ji("year",e.year)}function fD(e){const t=Yh(e.year),n=Ki(e.month,1,12),i=Ki(e.day,1,Zh(e.year,e.month));return t?n?i?!1:ji("day",e.day):ji("month",e.month):ji("year",e.year)}function pD(e){const{hour:t,minute:n,second:i,millisecond:s}=e,o=Ki(t,0,23)||t===24&&n===0&&i===0&&s===0,r=Ki(n,0,59),a=Ki(i,0,59),l=Ki(s,0,999);return o?r?a?l?!1:ji("millisecond",s):ji("second",i):ji("minute",n):ji("hour",t)}function pt(e){return typeof e>"u"}function er(e){return typeof e=="number"}function Yh(e){return typeof e=="number"&&e%1===0}function t$(e){return typeof e=="string"}function n$(e){return Object.prototype.toString.call(e)==="[object Date]"}function gD(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function mD(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function i$(e){return Array.isArray(e)?e:[e]}function vD(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 s$(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function gl(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function cv(e){if(e==null)return null;if(typeof e!="object")throw new jn("Week settings must be an object");if(!Ki(e.firstDay,1,7)||!Ki(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Ki(t,1,7)))throw new jn("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Ki(e,t,n){return Yh(e)&&e>=t&&e<=n}function o$(e,t){return e-t*Math.floor(e/t)}function Tn(e,t=2){const n=e<0;let i;return n?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function tr(e){if(!(pt(e)||e===null||e===""))return parseInt(e,10)}function ta(e){if(!(pt(e)||e===null||e===""))return parseFloat(e)}function dv(e){if(!(pt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function hv(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 mc(e){return e%4===0&&(e%100!==0||e%400===0)}function ml(e){return mc(e)?366:365}function Zh(e,t){const n=o$(t-1,12)+1,i=e+(t-n)/12;return n===2?mc(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Jh(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 CD(e,t,n){return-lv(av(e,1,t),n)+t-1}function vc(e,t=4,n=1){const i=CD(e,t,n),s=CD(e+1,t,n);return(ml(e)-i+s)/7}function fv(e){return e>99?e:e>fn.twoDigitCutoffYear?1900+e:2e3+e}function wD(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 Qh(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 yD(e){const t=Number(e);if(typeof e=="boolean"||e===""||!Number.isFinite(t))throw new jn(`Invalid unit value ${e}`);return t}function Xh(e,t){const n={};for(const i in e)if(gl(e,i)){const s=e[i];if(s==null)continue;n[t(i)]=yD(s)}return n}function Cc(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}${Tn(n,2)}:${Tn(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${Tn(n,2)}${Tn(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ef(e){return s$(e,["hour","minute","second","millisecond"])}const r$=["January","February","March","April","May","June","July","August","September","October","November","December"],bD=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],a$=["J","F","M","A","M","J","J","A","S","O","N","D"];function SD(e){switch(e){case"narrow":return[...a$];case"short":return[...bD];case"long":return[...r$];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 ED=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],RD=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],l$=["M","T","W","T","F","S","S"];function DD(e){switch(e){case"narrow":return[...l$];case"short":return[...RD];case"long":return[...ED];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const FD=["AM","PM"],u$=["Before Christ","Anno Domini"],c$=["BC","AD"],d$=["B","A"];function xD(e){switch(e){case"narrow":return[...d$];case"short":return[...c$];case"long":return[...u$];default:return null}}function h$(e){return FD[e.hour<12?0:1]}function f$(e,t){return DD(t)[e.weekday-1]}function p$(e,t){return SD(t)[e.month-1]}function g$(e,t){return xD(t)[e.year<0?0:1]}function m$(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 TD(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const v$={D:Uh,DD:PR,DDD:AR,DDDD:IR,t:_R,tt:kR,ttt:OR,tttt:MR,T:LR,TT:NR,TTT:VR,TTTT:BR,f:HR,ff:WR,fff:$R,ffff:jR,F:GR,FF:zR,FFF:UR,FFFF:KR};class Kn{static create(t,n={}){return new Kn(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 v$[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 Tn(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?h$(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(p,g)=>i?p$(t,p):o(g?{month:p}:{month:p,day:"numeric"},"month"),u=(p,g)=>i?f$(t,p):o(g?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),c=p=>{const g=Kn.macroTokenToFormatOpts(p);return g?this.formatWithSystemDefault(t,g):p},d=p=>i?g$(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 TD(Kn.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=Kn.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 TD(r,o(l,u))}}const PD=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function vl(...e){const t=e.reduce((n,i)=>n+i.source,"");return RegExp(`^${t}$`)}function Cl(...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 wl(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 AD(...e){return(t,n)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=tr(t[n+s]);return[i,null,n+s]}}const ID=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,C$=`(?:${ID.source}?(?:\\[(${PD.source})\\])?)?`,pv=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,_D=RegExp(`${pv.source}${C$}`),gv=RegExp(`(?:[Tt]${_D.source})?`),w$=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,y$=/(\d{4})-?W(\d\d)(?:-?(\d))?/,b$=/(\d{4})-?(\d{3})/,S$=AD("weekYear","weekNumber","weekDay"),E$=AD("year","ordinal"),R$=/(\d{4})-(\d\d)-(\d\d)/,kD=RegExp(`${pv.source} ?(?:${ID.source}|(${PD.source}))?`),D$=RegExp(`(?: ${kD.source})?`);function yl(e,t,n){const i=e[t];return pt(i)?n:tr(i)}function F$(e,t){return[{year:yl(e,t),month:yl(e,t+1,1),day:yl(e,t+2,1)},null,t+3]}function bl(e,t){return[{hours:yl(e,t,0),minutes:yl(e,t+1,0),seconds:yl(e,t+2,0),milliseconds:dv(e[t+3])},null,t+4]}function wc(e,t){const n=!e[t]&&!e[t+1],i=Qh(e[t+1],e[t+2]),s=n?null:li.instance(i);return[{},s,t+3]}function yc(e,t){const n=e[t]?So.create(e[t]):null;return[{},n,t+1]}const x$=RegExp(`^T?${pv.source}$`),T$=/^-?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 P$(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(ta(n)),months:h(ta(i)),weeks:h(ta(s)),days:h(ta(o)),hours:h(ta(r)),minutes:h(ta(a)),seconds:h(ta(l),l==="-0"),milliseconds:h(dv(u),d)}]}const A$={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?fv(tr(t)):tr(t),month:bD.indexOf(n)+1,day:tr(i),hour:tr(s),minute:tr(o)};return r&&(a.second=tr(r)),e&&(a.weekday=e.length>3?ED.indexOf(e)+1:RD.indexOf(e)+1),a}const I$=/^(?:(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 _$(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=A$[l]:u?p=0:p=Qh(c,d),[h,new li(p)]}function k$(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const O$=/^(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$/,M$=/^(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$/,L$=/^(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 OD(e){const[,t,n,i,s,o,r,a]=e;return[mv(t,s,i,n,o,r,a),li.utcInstance]}function N$(e){const[,t,n,i,s,o,r,a]=e;return[mv(t,a,n,i,s,o,r),li.utcInstance]}const V$=vl(w$,gv),B$=vl(y$,gv),H$=vl(b$,gv),G$=vl(_D),MD=Cl(F$,bl,wc,yc),W$=Cl(S$,bl,wc,yc),z$=Cl(E$,bl,wc,yc),$$=Cl(bl,wc,yc);function U$(e){return wl(e,[V$,MD],[B$,W$],[H$,z$],[G$,$$])}function j$(e){return wl(k$(e),[I$,_$])}function K$(e){return wl(e,[O$,OD],[M$,OD],[L$,N$])}function q$(e){return wl(e,[T$,P$])}const Y$=Cl(bl);function Z$(e){return wl(e,[x$,Y$])}const J$=vl(R$,D$),Q$=vl(kD),X$=Cl(bl,wc,yc);function eU(e){return wl(e,[J$,MD],[Q$,X$])}const LD="Invalid Duration",ND={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}},tU={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},...ND},qi=146097/400,Sl=146097/4800,nU={years:{quarters:4,months:12,weeks:qi/7,days:qi,hours:qi*24,minutes:qi*24*60,seconds:qi*24*60*60,milliseconds:qi*24*60*60*1e3},quarters:{months:3,weeks:qi/28,days:qi/4,hours:qi*24/4,minutes:qi*24*60/4,seconds:qi*24*60*60/4,milliseconds:qi*24*60*60*1e3/4},months:{weeks:Sl/7,days:Sl,hours:Sl*24,minutes:Sl*24*60,seconds:Sl*24*60*60,milliseconds:Sl*24*60*60*1e3},...ND},na=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],iU=na.slice(0).reverse();function Eo(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 Lt(i)}function VD(e,t){let n=t.milliseconds??0;for(const i of iU.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function BD(e,t){const n=VD(e,t)<0?-1:1;na.reduceRight((i,s)=>{if(pt(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),na.reduce((i,s)=>{if(pt(t[s]))return i;if(i){const o=t[i]%1;t[i]-=o,t[s]+=o*e[i][s]}return s},null)}function HD(e){const t={};for(const[n,i]of Object.entries(e))i!==0&&(t[n]=i);return t}class Lt{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let i=n?nU:tU;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||zt.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,n){return Lt.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new jn(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Lt({values:Xh(t,Lt.normalizeUnit),loc:zt.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(er(t))return Lt.fromMillis(t);if(Lt.isDuration(t))return t;if(typeof t=="object")return Lt.fromObject(t);throw new jn(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[i]=q$(t);return i?Lt.fromObject(i,n):Lt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[i]=Z$(t);return i?Lt.fromObject(i,n):Lt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new jn("need to specify a reason the Duration is invalid");const i=t instanceof Cs?t:new Cs(t,n);if(fn.throwOnInvalid)throw new Pz(i);return new Lt({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 TR(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?Kn.create(this.loc,i).formatDurationFromString(this,t):LD}toHuman(t={}){if(!this.isValid)return LD;const n=t.showZeros!==!1,i=na.map(s=>{const o=this.values[s];return pt(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+=hv(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},Ue.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?VD(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Lt.fromDurationLike(t),i={};for(const s of na)(gl(n.values,s)||gl(this.values,s))&&(i[s]=n.get(s)+this.get(s));return Eo(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const n=Lt.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]=yD(t(this.values[i],i));return Eo(this,{values:n},!0)}get(t){return this[Lt.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Xh(t,Lt.normalizeUnit)};return Eo(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 Eo(this,r)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return BD(this.matrix,t),Eo(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=HD(this.normalize().shiftToAll().toObject());return Eo(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(r=>Lt.normalizeUnit(r));const n={},i={},s=this.toObject();let o;for(const r of na)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;er(s[r])&&(a+=s[r]);const l=Math.trunc(a);n[r]=l,i[r]=(a*1e3-l*1e3)/1e3}else er(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 BD(this.matrix,n),Eo(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 Eo(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;const t=HD(this.values);return Eo(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 na)if(!n(this.values[i],t.values[i]))return!1;return!0}}const El="Invalid Interval";function sU(e,t){return!e||!e.isValid?pn.invalid("missing or invalid start"):!t||!t.isValid?pn.invalid("missing or invalid end"):t<e?pn.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 pn{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 jn("need to specify a reason the Interval is invalid");const i=t instanceof Cs?t:new Cs(t,n);if(fn.throwOnInvalid)throw new Tz(i);return new pn({invalid:i})}static fromDateTimes(t,n){const i=Ec(t),s=Ec(n),o=sU(i,s);return o??new pn({start:i,end:s})}static after(t,n){const i=Lt.fromDurationLike(n),s=Ec(t);return pn.fromDateTimes(s,s.plus(i))}static before(t,n){const i=Lt.fromDurationLike(n),s=Ec(t);return pn.fromDateTimes(s.minus(i),s)}static fromISO(t,n){const[i,s]=(t||"").split("/",2);if(i&&s){let o,r;try{o=Ue.fromISO(i,n),r=o.isValid}catch{r=!1}let a,l;try{a=Ue.fromISO(s,n),l=a.isValid}catch{l=!1}if(r&&l)return pn.fromDateTimes(o,a);if(r){const u=Lt.fromISO(s,n);if(u.isValid)return pn.after(o,u)}else if(l){const u=Lt.fromISO(i,n);if(u.isValid)return pn.before(a,u)}}return pn.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?pn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Ec).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(pn.fromDateTimes(s,a)),s=a,o+=1}return i}splitBy(t){const n=Lt.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(pn.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:pn.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 pn.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(pn.fromDateTimes(n,l.time)),n=null);return pn.merge(s)}difference(...t){return pn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:El}[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=Uh,n={}){return this.isValid?Kn.create(this.s.loc.clone(n),t).formatInterval(this):El}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:El}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:El}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:El}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:El}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Lt.invalid(this.invalidReason)}mapEndpoints(t){return pn.fromDateTimes(t(this.s),t(this.e))}}class Rl{static hasDST(t=fn.defaultZone){const n=Ue.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return So.isValidZone(t)}static normalizeZone(t){return Xo(t,fn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||zt.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||zt.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||zt.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||zt.create(n,i,o)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||zt.create(n,i,o)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||zt.create(n,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||zt.create(n,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return zt.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return zt.create(n,null,"gregory").eras(t)}static features(){return{relative:gD(),localeWeek:mD()}}}function GD(e,t){const n=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(Lt.fromMillis(i).as("days"))}function oU(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=GD(l,u);return(c-c%7)/7}],["days",GD]],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 rU(e,t,n,i){let[s,o,r,a]=oU(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=Lt.fromObject(o,i);return u.length>0?Lt.fromMillis(l,i).shiftTo(...u).plus(c):c}const aU="missing Intl.DateTimeFormat.formatToParts support";function Vt(e,t=n=>n){return{regex:e,deser:([n])=>t(Jz(n))}}const WD="[ ]",zD=new RegExp(WD,"g");function lU(e){return e.replace(/\./g,"\\.?").replace(zD,WD)}function $D(e){return e.replace(/\./g,"").replace(zD," ").toLowerCase()}function ws(e,t){return e===null?null:{regex:RegExp(e.map(lU).join("|")),deser:([n])=>e.findIndex(i=>$D(n)===$D(i))+t}}function UD(e,t){return{regex:e,deser:([,n,i])=>Qh(n,i),groups:t}}function tf(e){return{regex:e,deser:([t])=>t}}function uU(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function cU(e,t){const n=vs(t),i=vs(t,"{2}"),s=vs(t,"{3}"),o=vs(t,"{4}"),r=vs(t,"{6}"),a=vs(t,"{1,2}"),l=vs(t,"{1,3}"),u=vs(t,"{1,6}"),c=vs(t,"{1,9}"),d=vs(t,"{2,4}"),h=vs(t,"{4,6}"),p=v=>({regex:RegExp(uU(v.val)),deser:([b])=>b,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 Vt(u);case"yy":return Vt(d,fv);case"yyyy":return Vt(o);case"yyyyy":return Vt(h);case"yyyyyy":return Vt(r);case"M":return Vt(a);case"MM":return Vt(i);case"MMM":return ws(t.months("short",!0),1);case"MMMM":return ws(t.months("long",!0),1);case"L":return Vt(a);case"LL":return Vt(i);case"LLL":return ws(t.months("short",!1),1);case"LLLL":return ws(t.months("long",!1),1);case"d":return Vt(a);case"dd":return Vt(i);case"o":return Vt(l);case"ooo":return Vt(s);case"HH":return Vt(i);case"H":return Vt(a);case"hh":return Vt(i);case"h":return Vt(a);case"mm":return Vt(i);case"m":return Vt(a);case"q":return Vt(a);case"qq":return Vt(i);case"s":return Vt(a);case"ss":return Vt(i);case"S":return Vt(l);case"SSS":return Vt(s);case"u":return tf(c);case"uu":return tf(a);case"uuu":return Vt(n);case"a":return ws(t.meridiems(),0);case"kkkk":return Vt(o);case"kk":return Vt(d,fv);case"W":return Vt(a);case"WW":return Vt(i);case"E":case"c":return Vt(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 UD(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return UD(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return tf(/[a-z_+-/]{1,256}?/i);case" ":return tf(/[^\S\n\r]/);default:return p(v)}})(e)||{invalidReason:aU};return C.token=e,C}const dU={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 hU(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=dU[r];if(typeof a=="object"&&(a=a[o]),a)return{literal:!1,val:a}}function fU(e){return[`^${e.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,e]}function pU(e,t,n){const i=e.match(t);if(i){const s={};let o=1;for(const r in n)if(gl(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 gU(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 pt(e.z)||(n=So.create(e.z)),pt(e.Z)||(n||(n=new li(e.Z)),i=e.Z),pt(e.q)||(e.M=(e.q-1)*3+1),pt(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),pt(e.u)||(e.S=dv(e.u)),[Object.keys(e).reduce((o,r)=>{const a=t(r);return a&&(o[a]=e[r]),o},{}),n,i]}let vv=null;function mU(){return vv||(vv=Ue.fromMillis(1555555555555)),vv}function vU(e,t){if(e.literal)return e;const n=Kn.macroTokenToFormatOpts(e.val),i=YD(n,t);return i==null||i.includes(void 0)?e:i}function jD(e,t){return Array.prototype.concat(...e.map(n=>vU(n,t)))}class KD{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=jD(Kn.parseFormat(n),t),this.units=this.tokens.map(i=>cU(i,t)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){const[i,s]=fU(this.units);this.regex=RegExp(i,"i"),this.handlers=s}}explainFromTokens(t){if(this.isValid){const[n,i]=pU(t,this.regex,this.handlers),[s,o,r]=i?gU(i):[null,null,void 0];if(gl(i,"a")&&gl(i,"H"))throw new pl("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 qD(e,t,n){return new KD(e,n).explainFromTokens(t)}function CU(e,t,n){const{result:i,zone:s,specificOffset:o,invalidReason:r}=qD(e,t,n);return[i,s,o,r]}function YD(e,t){if(!e)return null;const i=Kn.create(t,e).dtFormatter(mU()),s=i.formatToParts(),o=i.resolvedOptions();return s.map(r=>hU(r,e,o))}const Cv="Invalid DateTime",ZD=864e13;function bc(e){return new Cs("unsupported zone",`the zone "${e.name}" is not supported`)}function wv(e){return e.weekData===null&&(e.weekData=qh(e.c)),e.weekData}function yv(e){return e.localWeekData===null&&(e.localWeekData=qh(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function ia(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Ue({...n,...t,old:n})}function JD(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 nf(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 sf(e,t,n){return JD(Jh(e),t,n)}function QD(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,Zh(i,s))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},r=Lt.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=Jh(o);let[l,u]=JD(a,n,e.zone);return r!==0&&(l+=r,u=e.zone.offset(l)),{ts:l,o:u}}function Dl(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=Ue.fromObject(e,{...n,zone:l,specificOffset:o});return r?u:u.setZone(a)}else return Ue.invalid(new Cs("unparsable",`the input "${s}" can't be parsed as ${i}`))}function of(e,t,n=!0){return e.isValid?Kn.create(zt.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function bv(e,t,n){const i=e.c.year>9999||e.c.year<0;let s="";if(i&&e.c.year>=0&&(s+="+"),s+=Tn(e.c.year,i?6:4),n==="year")return s;if(t){if(s+="-",s+=Tn(e.c.month),n==="month")return s;s+="-"}else if(s+=Tn(e.c.month),n==="month")return s;return s+=Tn(e.c.day),s}function XD(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+=Tn(e.c.hour),r==="hour")break;if(t){if(l+=":",l+=Tn(e.c.minute),r==="minute")break;a&&(l+=":",l+=Tn(e.c.second))}else{if(l+=Tn(e.c.minute),r==="minute")break;a&&(l+=Tn(e.c.second))}if(r==="second")break;a&&(!i||e.c.millisecond!==0)&&(l+=".",l+=Tn(e.c.millisecond,3))}return s&&(e.isOffsetFixed&&e.offset===0&&!o?l+="Z":e.o<0?(l+="-",l+=Tn(Math.trunc(-e.o/60)),l+=":",l+=Tn(Math.trunc(-e.o%60))):(l+="+",l+=Tn(Math.trunc(e.o/60)),l+=":",l+=Tn(Math.trunc(e.o%60)))),o&&(l+="["+e.zone.ianaName+"]"),l}const eF={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},wU={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},yU={ordinal:1,hour:0,minute:0,second:0,millisecond:0},rf=["year","month","day","hour","minute","second","millisecond"],bU=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],SU=["year","ordinal","hour","minute","second","millisecond"];function af(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 TR(e);return t}function tF(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return af(e)}}function EU(e){if(Sc===void 0&&(Sc=fn.now()),e.type!=="iana")return e.offset(Sc);const t=e.name;let n=Sv.get(t);return n===void 0&&(n=e.offset(Sc),Sv.set(t,n)),n}function nF(e,t){const n=Xo(t.zone,fn.defaultZone);if(!n.isValid)return Ue.invalid(bc(n));const i=zt.fromObject(t);let s,o;if(pt(e.year))s=fn.now();else{for(const l of rf)pt(e[l])&&(e[l]=eF[l]);const r=fD(e)||pD(e);if(r)return Ue.invalid(r);const a=EU(n);[s,o]=sf(e,a,n)}return new Ue({ts:s,zone:n,loc:i,o})}function iF(e,t,n){const i=pt(n.round)?!0:n.round,s=pt(n.rounding)?"trunc":n.rounding,o=(a,l)=>(a=hv(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 sF(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 Sc;const Sv=new Map;class Ue{constructor(t){const n=t.zone||fn.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new Cs("invalid input"):null)||(n.isValid?null:bc(n));this.ts=pt(t.ts)?fn.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=er(t.o)&&!t.old?t.o:n.offset(this.ts);s=nf(this.ts,a),i=Number.isNaN(s.year)?new Cs("invalid input"):null,s=i?null:s,o=i?null:a}this._zone=n,this.loc=t.loc||zt.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=s,this.o=o,this.isLuxonDateTime=!0}static now(){return new Ue({})}static local(){const[t,n]=sF(arguments),[i,s,o,r,a,l,u]=n;return nF({year:i,month:s,day:o,hour:r,minute:a,second:l,millisecond:u},t)}static utc(){const[t,n]=sF(arguments),[i,s,o,r,a,l,u]=n;return t.zone=li.utcInstance,nF({year:i,month:s,day:o,hour:r,minute:a,second:l,millisecond:u},t)}static fromJSDate(t,n={}){const i=n$(t)?t.valueOf():NaN;if(Number.isNaN(i))return Ue.invalid("invalid input");const s=Xo(n.zone,fn.defaultZone);return s.isValid?new Ue({ts:i,zone:s,loc:zt.fromObject(n)}):Ue.invalid(bc(s))}static fromMillis(t,n={}){if(er(t))return t<-ZD||t>ZD?Ue.invalid("Timestamp out of range"):new Ue({ts:t,zone:Xo(n.zone,fn.defaultZone),loc:zt.fromObject(n)});throw new jn(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(er(t))return new Ue({ts:t*1e3,zone:Xo(n.zone,fn.defaultZone),loc:zt.fromObject(n)});throw new jn("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const i=Xo(n.zone,fn.defaultZone);if(!i.isValid)return Ue.invalid(bc(i));const s=zt.fromObject(n),o=Xh(t,tF),{minDaysInFirstWeek:r,startOfWeek:a}=hD(o,s),l=fn.now(),u=pt(n.specificOffset)?i.offset(l):n.specificOffset,c=!pt(o.ordinal),d=!pt(o.year),h=!pt(o.month)||!pt(o.day),p=d||h,g=o.weekYear||o.weekNumber;if((p||c)&&g)throw new pl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&c)throw new pl("Can't mix ordinal dates with month/day");const C=g||o.weekday&&!p;let v,b,S=nf(l,u);C?(v=bU,b=wU,S=qh(S,r,a)):c?(v=SU,b=yU,S=uv(S)):(v=rf,b=eF);let D=!1;for(const A of v){const _=o[A];pt(_)?D?o[A]=b[A]:o[A]=S[A]:D=!0}const w=C?Xz(o,r,a):c?e$(o):fD(o),R=w||pD(o);if(R)return Ue.invalid(R);const x=C?cD(o,r,a):c?dD(o):o,[T,H]=sf(x,u,i),N=new Ue({ts:T,zone:i,o:H,loc:s});return o.weekday&&p&&t.weekday!==N.weekday?Ue.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${N.toISO()}`):N.isValid?N:Ue.invalid(N.invalid)}static fromISO(t,n={}){const[i,s]=U$(t);return Dl(i,s,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[i,s]=j$(t);return Dl(i,s,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[i,s]=K$(t);return Dl(i,s,n,"HTTP",n)}static fromFormat(t,n,i={}){if(pt(t)||pt(n))throw new jn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:o=null}=i,r=zt.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0}),[a,l,u,c]=CU(r,t,n);return c?Ue.invalid(c):Dl(a,l,i,`format ${n}`,t,u)}static fromString(t,n,i={}){return Ue.fromFormat(t,n,i)}static fromSQL(t,n={}){const[i,s]=eU(t);return Dl(i,s,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new jn("need to specify a reason the DateTime is invalid");const i=t instanceof Cs?t:new Cs(t,n);if(fn.throwOnInvalid)throw new xz(i);return new Ue({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const i=YD(t,zt.fromObject(n));return i?i.map(s=>s?s.val:null).join(""):null}static expandFormat(t,n={}){return jD(Kn.parseFormat(t),zt.fromObject(n)).map(s=>s.val).join("")}static resetCache(){Sc=void 0,Sv.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?wv(this).weekYear:NaN}get weekNumber(){return this.isValid?wv(this).weekNumber:NaN}get weekday(){return this.isValid?wv(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?yv(this).weekday:NaN}get localWeekNumber(){return this.isValid?yv(this).weekNumber:NaN}get localWeekYear(){return this.isValid?yv(this).weekYear:NaN}get ordinal(){return this.isValid?uv(this.c).ordinal:NaN}get monthShort(){return this.isValid?Rl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Rl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Rl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Rl.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=Jh(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=nf(l,r),d=nf(u,a);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[ia(this,{ts:l}),ia(this,{ts:u})]:[this]}get isInLeapYear(){return mc(this.year)}get daysInMonth(){return Zh(this.year,this.month)}get daysInYear(){return this.isValid?ml(this.year):NaN}get weeksInWeekYear(){return this.isValid?vc(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?vc(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:i,calendar:s}=Kn.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(fn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(t=Xo(t,fn.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]=sf(r,o,t)}return ia(this,{ts:s,zone:t})}else return Ue.invalid(bc(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:i}={}){const s=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i});return ia(this,{loc:s})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Xh(t,tF),{minDaysInFirstWeek:i,startOfWeek:s}=hD(n,this.loc),o=!pt(n.weekYear)||!pt(n.weekNumber)||!pt(n.weekday),r=!pt(n.ordinal),a=!pt(n.year),l=!pt(n.month)||!pt(n.day),u=a||l,c=n.weekYear||n.weekNumber;if((u||r)&&c)throw new pl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new pl("Can't mix ordinal dates with month/day");let d;o?d=cD({...qh(this.c,i,s),...n},i,s):pt(n.ordinal)?(d={...this.toObject(),...n},pt(n.day)&&(d.day=Math.min(Zh(d.year,d.month),d.day))):d=dD({...uv(this.c),...n});const[h,p]=sf(d,this.o,this.zone);return ia(this,{ts:h,o:p})}plus(t){if(!this.isValid)return this;const n=Lt.fromDurationLike(t);return ia(this,QD(this,n))}minus(t){if(!this.isValid)return this;const n=Lt.fromDurationLike(t).negate();return ia(this,QD(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const i={},s=Lt.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?Kn.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):Cv}toLocaleString(t=Uh,n={}){return this.isValid?Kn.create(this.loc.clone(n),t).formatDateTime(this):Cv}toLocaleParts(t={}){return this.isValid?Kn.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=af(r);const a=t==="extended";let l=bv(this,a,r);return rf.indexOf(r)>=3&&(l+="T"),l+=XD(this,a,n,i,s,o,r),l}toISODate({format:t="extended",precision:n="day"}={}){return this.isValid?bv(this,t==="extended",af(n)):null}toISOWeekDate(){return of(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=af(a),(s&&rf.indexOf(a)>=3?"T":"")+XD(this,r==="extended",n,t,i,o,a)):null}toRFC2822(){return of(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return of(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?bv(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")),of(this,s,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Cv}[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 Lt.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=i$(n).map(Lt.normalizeUnit),r=t.valueOf()>this.valueOf(),a=r?this:t,l=r?t:this,u=rU(a,l,o,s);return r?u.negate():u}diffNow(t="milliseconds",n={}){return this.diff(Ue.now(),t,n)}until(t){return this.isValid?pn.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||Ue.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),iF(n,this.plus(i),{...t,numeric:"always",units:s,unit:o})}toRelativeCalendar(t={}){return this.isValid?iF(t.base||Ue.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Ue.isDateTime))throw new jn("min requires all arguments be DateTimes");return vD(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(Ue.isDateTime))throw new jn("max requires all arguments be DateTimes");return vD(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,i={}){const{locale:s=null,numberingSystem:o=null}=i,r=zt.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0});return qD(r,t,n)}static fromStringExplain(t,n,i={}){return Ue.fromFormatExplain(t,n,i)}static buildFormatParser(t,n={}){const{locale:i=null,numberingSystem:s=null}=n,o=zt.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return new KD(o,t)}static fromFormatParser(t,n,i={}){if(pt(t)||pt(n))throw new jn("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:o=null}=i,r=zt.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0});if(!r.equals(n.locale))throw new jn(`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?Ue.invalid(c):Dl(a,l,i,`format ${n.format}`,t,u)}static get DATE_SHORT(){return Uh}static get DATE_MED(){return PR}static get DATE_MED_WITH_WEEKDAY(){return Az}static get DATE_FULL(){return AR}static get DATE_HUGE(){return IR}static get TIME_SIMPLE(){return _R}static get TIME_WITH_SECONDS(){return kR}static get TIME_WITH_SHORT_OFFSET(){return OR}static get TIME_WITH_LONG_OFFSET(){return MR}static get TIME_24_SIMPLE(){return LR}static get TIME_24_WITH_SECONDS(){return NR}static get TIME_24_WITH_SHORT_OFFSET(){return VR}static get TIME_24_WITH_LONG_OFFSET(){return BR}static get DATETIME_SHORT(){return HR}static get DATETIME_SHORT_WITH_SECONDS(){return GR}static get DATETIME_MED(){return WR}static get DATETIME_MED_WITH_SECONDS(){return zR}static get DATETIME_MED_WITH_WEEKDAY(){return Iz}static get DATETIME_FULL(){return $R}static get DATETIME_FULL_WITH_SECONDS(){return UR}static get DATETIME_HUGE(){return jR}static get DATETIME_HUGE_WITH_SECONDS(){return KR}}function Ec(e){if(Ue.isDateTime(e))return e;if(e&&e.valueOf&&er(e.valueOf()))return Ue.fromJSDate(e);if(e&&typeof e=="object")return Ue.fromObject(e);throw new jn(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const RU=(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=lo({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});Mg(()=>{var x;((x=e.value)==null?void 0:x.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 A,_,V,ie,me,Te,q,z;t("tracing",JSON.parse(JSON.stringify(n.value)));const x=((_=(A=s.startDate)==null?void 0:A.getTime)==null?void 0:_.call(A))!==((ie=(V=s.cacheStartDate)==null?void 0:V.getTime)==null?void 0:ie.call(V)),T=((Te=(me=s.endDate)==null?void 0:me.getTime)==null?void 0:Te.call(me))!==((z=(q=s.cacheEndDate)==null?void 0:q.getTime)==null?void 0:z.call(q)),H=s.startDate===null,N=s.endDate===null;x&&T&&H&&N?t("clearAll"):x&&!T?H?t("clearStart"):t("update:start",s.startDate):T&&!x?N?t("clearDue"):t("update:end",s.endDate):x&&T&&t("update",[s.startDate,s.endDate]),t("confirmed",{start:s.startDate,end:s.endDate}),s.isDirty=x||T},r=(x,T)=>{const H=Ue.fromObject({year:x.year,month:x.month,day:x.day},{zone:s.timezone});return(T==="start"?H.startOf("day"):H.endOf("day")).toJSDate()},a=()=>{s.rangeFeedback.status="idle",s.rangeFeedback.action=null,s.rangeFeedback.message=""},l=x=>{e.enableRangeFeedback&&(s.rangeFeedback.status="corrected",s.rangeFeedback.action=x,s.rangeFeedback.message=x==="swap"?i.swap:i.truncate)},u=x=>{if(!(!s.startDate||!s.endDate)){if(s.startDate.getTime()<=s.endDate.getTime()){e.enableRangeFeedback&&a();return}if(x==="select-start"){const T={start:s.startDate,end:s.endDate};s.endDate=null,t("range:invalid",T),t("range:corrected",{start:s.startDate,end:s.endDate,action:"truncate"}),s.isSelectingEnd=!0,l("truncate")}else{const T={start:s.startDate,end:s.endDate},H=s.startDate;s.startDate=s.endDate,s.endDate=H,t("range:invalid",T),t("range:corrected",{start:s.startDate,end:s.endDate,action:"swap"}),l("swap")}}},c=(x,T=!0)=>{e.disabled||e.readOnly||(s.startDate=r(x,"start"),T?(s.isSelectingStart=!1,s.isSelectingEnd=!0):(s.isSelectingStart=!0,s.isSelectingEnd=!1),u("select-start"))},d=x=>{e.disabled||e.readOnly||(s.endDate=r(x,"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)},b=()=>{e.disabled||e.readOnly||(s.startDate=s.cacheStartDate,s.endDate=s.cacheEndDate,a(),s.isDirty=!1)},S=W(()=>s.startDate?Ue.fromJSDate(s.startDate,{zone:s.timezone}).toFormat(s.format):e.startPlaceholder),D=W(()=>s.endDate?Ue.fromJSDate(s.endDate,{zone:s.timezone}).toFormat(s.format):e.duePlaceholder),w=W(()=>!s.startDate&&!e.disabled?e.startTooltip:!s.startDate&&(e.disabled||e.readOnly)?e.startPlaceholder:s.startDate?Ue.fromJSDate(s.startDate,{zone:s.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.startTooltip),R=W(()=>!s.endDate&&!e.disabled?e.dueTooltip:!s.endDate&&(e.disabled||e.readOnly)?e.startPlaceholder:s.endDate?Ue.fromJSDate(s.endDate,{zone:s.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.dueTooltip);return{states:s,displayStartDate:S,displayEndDate:D,tooltipStartDate:w,tooltipEndDate:R,selectEndDate:d,selectStartDate:c,clearDue:p,clearStart:h,clearAll:g,beginInteraction:C,confirmSelection:v,cancelSelection:b}},oF=e=>{const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t?decodeURIComponent(t[2]):null},DU="account.last_set_local_timezone",Fl=300;function Rc(e){if(!e)return null;if(Ue.isDateTime(e))return e;if(e instanceof Date){const t=Ue.fromJSDate(e);return t.isValid?t:null}if(typeof e=="number"){const t=Ue.fromMillis(e);return t.isValid?t:null}if(typeof e=="string"){let t=Ue.fromISO(e);return t.isValid||(t=Ue.fromRFC2822(e)),t.isValid?t:null}return null}function rF(e,t,n){if(!t||!n)return"";const i=Rc(e);if(!i)return"";const s=i.setZone(t);return s.isValid?s.toFormat(n):""}function FU(e,t){if(!e)return"";const n=Ue.now().setZone(e);return n.isValid?n.toFormat(t):""}function xU(e,t){return FU(e,t)}const TU=e=>{const t=Ue.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")}`},lf=()=>oF(DU)||"UTC",sa=({date:e,timezone:t,format:n})=>{if(!e)return"";const i=typeof e=="string"?Ue.fromISO(e,{zone:t}):e,s=Ue.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)},Ev=()=>"Asia/Singapore",aF=e=>`${Ue.fromJSDate(e,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,PU=e=>{const t="MMM dd",n=e.timezone,i=W(()=>rF(e.start,n,t)),s=W(()=>rF(e.end,n,t)),o=W(()=>e.start?sa({date:Rc(e.start),timezone:n,format:t}):"No start"),r=W(()=>e.end?sa({date:Rc(e.end),timezone:n,format:t}):"No due"),a=v=>{if(!v)return null;const b=Ue.now().setZone(n).startOf("day"),S=Ue.fromISO(v).setZone(n).startOf("day");if(!S.isValid)return console.warn("Invalid date:",v,S.invalidReason),null;const D=S.diff(b,"days").days;return D===0?"today":D===1?"tomorrow":D===-1?"yesterday":D<-1?"past":"future"},l=W(()=>a(e.start)),u=W(()=>a(e.end)),c=W(()=>{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=W(()=>{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=W(()=>{const v=[];return l.value&&v.push(`start-${l.value}`),e.isStarted&&v.push("actual"),v}),p=W(()=>{const v=[];return u.value&&v.push(`end-${u.value}`),e.isEnded&&v.push("actual"),v}),g=W(()=>e.start?sa({date:Rc(e.start),timezone:n,format:"MMM dd, yyyy | HH:mm"}):"No start"),C=W(()=>e.end?sa({date:Rc(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}},AU="UserCache",IU="user",_U=()=>{const e=fe({}),{getCachedValue:t,setCachedValue:n}=Yu({dbName:AU,storeName:IU}),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=Vh(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={}}}};function kU(e,t){return W(()=>{var n;return(n=e.value)!=null&&n.length?e.value.map(t):[]})}const OU=sessionStorage.getItem("BASE_URL"),MU=sessionStorage.getItem("BASE_REVIEW_URL"),LU=(e,t,n,i)=>{const s="",o={baseDomain:OU||s,ws_code:e||s,entity_id:t||s,scene_id:n||s,reviewDomain:MU||s,take_id:t||s,woohoo_id:t||s,parent_id:t||s},r=W(()=>({project:Ms({type:"project",config:o}).url,take_review:Ms({type:"review_take",config:o}).url,review:Ms({type:"review_scene",config:o}).url,review_scene:Ms({type:"review_scene",config:o}).url,woohoo:Ms({type:"woohoo",config:o}).url,update:Ms({type:"update",config:o}).url,scene_hub:Ms({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",b=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 b=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 b=await((C=i.value)==null?void 0:C.deleteScene(e,t,n));g&&g("deleted")}catch(v){console.error("Error deleting item",v)}}}},Rv=new Map;function NU(e){return t=>{const n=`${e}-${t}`;return Rv.has(n)||Rv.set(n,`${e}-${t}-${Date.now()}`),Rv.get(n)}}function nr(e){const t=fe(!1),n=fe(!1),i=W(()=>!!e.value.error),s=W(()=>{var S;return!!((S=e.value.active)!=null&&S.value)}),o=W(()=>!!e.value.disabled),r=W(()=>!!e.value.readOnly),a=W(()=>e.value.empty??!1);W(()=>e.value.readOnly!==!0);const l=W(()=>({readOnly:r.value,disabled:o.value,isreadOnly:r.value,isDisabled:o.value,isHovered:n.value,isFocused:t.value,isEmpty:a.value,isError:i.value,isActive:s.value,clickable:e.value.clickable??!1})),u=fe(null),c=fe(null),d=()=>{t.value=!0,_n(()=>{var S;return(S=e.value.inputRef)==null?void 0:S.value.focus()})},h=()=>{t.value=!1},p=()=>{n.value=!0},g=()=>{n.value=!1},C=S=>{var D;return S?typeof S=="object"&&"value"in S?C(S.value):S instanceof HTMLElement?S:S&&typeof S=="object"&&(S.$el||S.rootEl||S.el||((D=S.vnode)==null?void 0:D.el))||null:null},v=()=>{u.value&&(u.value.removeEventListener("focus",d),u.value.removeEventListener("blur",h),u.value=null),c.value&&(c.value.removeEventListener("mouseenter",p),c.value.removeEventListener("mouseleave",g),c.value=null)},b=()=>{v(),u.value=C(e.value.inputRef),c.value=C(e.value.wrapperRef),u.value&&(u.value.addEventListener("focus",d),u.value.addEventListener("blur",h)),c.value&&(c.value.addEventListener("mouseenter",p),c.value.addEventListener("mouseleave",g))};return Si(()=>{b()}),hs(()=>{v()}),{isFocus:t,isHover:n,isError:i,isDisabled:o,isreadOnly:r,isEmpty:a,argsMain:l,handleFocus:d}}const lF=St(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}=bo({trigger:"mouseenter focus",theme:"dark",placement:"right"}),i=W(()=>{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)=>(X(),ye("div",{class:"status-badge-wrapper",style:Dn({"--badge-size":`${s.size}px`,"--badge-color":i.value})},[Rt(o.$slots,"default",{},void 0,!0),ut(Pe("div",null,[Pe("div",{class:"badge-indicator",ref_key:"triggerRef",ref:t},null,512)],512),[[Ur,s.showBadge]]),Pe("div",{ref_key:"popupRef",ref:n,class:"badge-tooltip"},mt(s.statusTooltip),513)],4))}}),[["__scopeId","data-v-57c08b3d"]]),uF={arrow:!0,allowHTML:!0,interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,zIndex:9999,theme:"light"},cF={...uF,maxWidth:"none"};function dF(e,t){const n=fl(e,{...uF,...t});return Array.isArray(n)?n[0]:n}function uf(e){if(e)try{e.destroy()}catch(t){console.warn("Error destroying tippy instance:",t)}}function VU(e,t){if(!t)return;(Array.isArray(t)?t:[t]).forEach(i=>{i!=null&&i.trim()&&e.classList.add(i.trim())})}function xl(e,t){Object.entries(t).forEach(([n,i])=>{e.style[n]=i})}function BU(e,t){return t.reduce((n,i)=>(n[i]=e.style[i],n),{})}function HU(e,t){Object.entries(t).forEach(([n,i])=>{e.style[n]=i})}function Dv(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 cf={placement:"top",trigger:"mouseenter focus",hideOnClick:!0,delay:[300,100],theme:"arbo",contentClass:"extra-padding",bypassOverflowCheck:!0,content:""},hF=(e,t)=>{if(!t||!e.popper)return;const n=e.popper.querySelector(".tippy-content");n&&VU(n,t)},fF=(e,t,n)=>typeof n=="string"?!0:t===!0||Dv(e),pF=(e,t)=>{let n={...cf};typeof t=="string"?n.content=String(t):n={...cf,...t};const i=Dv(e),s=typeof n=="object"?n.bypassOverflowCheck:!1;return i&&!s&&(n.delay=[1e3,100]),dF(e,{...cF,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){hF(o,n.contentClass)}})},GU=(e,t)=>{let n={...cf};typeof t=="string"?n.content=String(t):n={...cf,...t};const i=Dv(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){hF(o,n.contentClass)}}):e._tooltipInstance=pF(e,n)},ui={mounted(e,t){e.classList.add("arbo-tooltip-wrapper");const n=t.value;if(!(typeof n=="string"?n:n==null?void 0:n.content))return;fF(e,typeof n=="object"?n.bypassOverflowCheck:void 0,n)&&(e._tooltipInstance=pF(e,n)),(typeof n=="object"&&n.trigger?n.trigger:"mouseenter focus").split(" ").map(r=>r.trim()).filter(Boolean).forEach(r=>{let a=r;if(r==="mouseenter"&&(a="mouseenter"),r==="focus"&&(a="focus"),r==="click"&&(a="click"),r==="manual")return;const l=u=>{};e.addEventListener(a,l)})},updated(e,t){const n=t.value;if(!fF(e,typeof n=="object"?n.bypassOverflowCheck:void 0,n)){uf(e._tooltipInstance),delete e._tooltipInstance;return}t.value!==t.oldValue&&(typeof n=="string"?n:n!=null&&n.content)&&GU(e,n)},beforeUnmount(e){uf(e._tooltipInstance),delete e._tooltipInstance},unmounted(e){uf(e._tooltipInstance),delete e._tooltipInstance}};function gF(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 Fv(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 WU(e,t){const n=Fv(e),i=Fv(t),s=Math.max(n,i),o=Math.min(n,i);return(s+.05)/(o+.05)}function zU(e){return Fv(e)>.5?"#000000":"#FFFFFF"}const mF=e=>{const n=window.getComputedStyle(e),i=n.backgroundColor,s=n.color,o=gF(i),r=gF(s);if(!o||!r||o.a===0)return;WU(o,r)<4.5&&(e.style.color=zU(o))},xv={mounted(e){_n(()=>{mF(e)})},updated(e){_n(()=>{mF(e)})}},vF=new Set;function $U(e,t){if(vF.has(e))return;const n=document.createElement("style");n.setAttribute("data-style-id",e),n.textContent=t,document.head.appendChild(n),vF.add(e)}const CF={type:"skeleton",size:"medium",color:"#e0e0e0",backgroundColor:"inherit",opacity:1,blur:!1,lines:1,fullwidth:!1},Tv={spinner:{small:"24px",medium:"40px",large:"56px",cover:"80px"},skeleton:{small:{height:"16px",spacing:"8px",width:"80%"},medium:{height:"24px",spacing:"12px",width:"100%"},large:{height:"32px",spacing:"16px",width:"100%"},cover:{height:"100%",spacing:"0",width:"100%"}}};$U("loading-animations",`
|
|
52
|
+
@keyframes loading-spin { to { transform: rotate(360deg); } }
|
|
53
|
+
@keyframes loading-shimmer {
|
|
54
|
+
0% { background-position: 200% 0; }
|
|
55
|
+
100% { background-position: -200% 0; }
|
|
56
|
+
}
|
|
57
|
+
@keyframes loading-pulse {
|
|
58
|
+
0%, 100% { opacity: 0.4; }
|
|
59
|
+
50% { opacity: 1; }
|
|
60
|
+
}
|
|
61
|
+
`);const UU=e=>{const t=document.createElement("div"),n=Tv.spinner[e.size];return xl(t,{width:n,height:n,border:`3px solid ${e.color}`,borderTopColor:"var(--primary-color)",borderRadius:"50%",animation:"loading-spin 0.8s linear infinite"}),t},jU=(e,t)=>{const n=document.createElement("div"),i=Tv.skeleton[e.size];return xl(n,{width:"100%",height:i.height,background:`linear-gradient(90deg, ${e.color} 25%, #f0f0f0 50%, ${e.color} 75%)`,backgroundSize:"200% 100%",borderRadius:"4px",animation:"loading-shimmer 1.5s ease-in-out infinite"}),n},KU={spinner:UU,skeleton:e=>{const t=document.createElement("div"),n=Tv.skeleton[e.size];xl(t,{width:n.width,height:n.height==="100%"?"100%":`calc(${n.height} * ${e.lines} + ${n.spacing} * ${e.lines-1})`,display:"flex",flexDirection:"column",gap:n.spacing});for(let i=0;i<e.lines;i++)t.appendChild(jU(e,i===e.lines-1));return t},pulse:e=>{const t=document.createElement("div");return xl(t,{width:"100%",height:"100%",background:`linear-gradient(90deg, transparent 0%, ${e.color} 50%, transparent 100%)`,animation:"loading-pulse 1.5s ease-in-out infinite"}),t}},qU=e=>{const t={...CF,...e},n=document.createElement("div");n.className="loading-overlay";const i=e.fullwidth?"100%":`${Math.max(50,Math.round(Math.random()*100))}%`;if(xl(n,{position:"absolute",inset:"0",backgroundColor:t.backgroundColor,opacity:"0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",zIndex:"1000",transition:"opacity 0.2s ease",width:i,...t.blur?{backdropFilter:"blur(2px)"}:{}}),n.appendChild(KU[t.type](t)),e.text){const s=document.createElement("div");s.textContent=e.text,xl(s,{marginTop:"16px",fontSize:"14px",color:"#666",fontWeight:"500"}),n.appendChild(s)}return n},YU=e=>{e._originalStyles=BU(e,["position","overflow"]),(!e.style.position||e.style.position==="static")&&(e.style.position="relative"),e.style.overflow="hidden"},ZU=e=>{e._originalStyles&&(HU(e,e._originalStyles),delete e._originalStyles)},wF=(e,t)=>{if(e._loadingOverlay)return;YU(e);const n=qU(t);e._loadingOverlay=n,e.appendChild(n),requestAnimationFrame(()=>{n.style.opacity=String(t.opacity??CF.opacity)})},yF=e=>{const t=e._loadingOverlay;t&&(t.style.opacity="0",setTimeout(()=>{t.remove(),delete e._loadingOverlay,ZU(e)},200))},Pv=e=>typeof e=="boolean"?{isLoading:e}:e,ir={mounted(e,t){const n=Pv(t.value);n.isLoading&&wF(e,n)},updated(e,t){const n=Pv(t.value),i=Pv(t.oldValue??!1);n.isLoading!==i.isLoading&&(n.isLoading?wF(e,n):yF(e))},beforeUnmount(e){yF(e)}};function JU(e,t,n){const i=document.createElement("div");i.className=n;const s=T0(e,t);return s.mount(i),{container:i,app:s}}function Av(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 QU(e,t){e._vueApp=t}const XU=e=>{const{container:t,app:n}=JU(u4,{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 QU(t,n),t},bF=e=>{e._userProfileContainer&&(Av(e._userProfileContainer),delete e._userProfileContainer),e._userProfileInstance&&(uf(e._userProfileInstance),delete e._userProfileInstance),e.style.cursor="",e.classList.remove("user-profile-trigger")},SF={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=dF(e,{...cF,content:n.user.name||"User",placement:n.placement||"bottom-start",trigger:"mouseenter focus",delay:[Fl,0],onShow(s){const o=XU(n);e._userProfileContainer=o,s.setContent(o)},onHidden(){e._userProfileContainer&&(Av(e._userProfileContainer),e._userProfileContainer=void 0)},onDestroy(){e._userProfileContainer&&(Av(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){bF(e)},unmounted(e){bF(e)}},e4={class:"avatar-section"},t4={class:"user-info"},n4={class:"info-row"},i4={class:"user-name"},s4={key:0,class:"info-row time-row"},o4={class:"time-display"},r4={class:"time-text"},a4={class:"info-row actions"},l4=ct({__name:"MiniPeopleCard",props:{user:{},status:{default:"online"},timezone:{default:lf()},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}},emits:["insightClick","copyLink","dataUpdated"],setup(e,{emit:t}){const n=ui,i=ir,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=fe(s.status),u=fe(s.timezone),c=fe(!1),d=fe(null),h=W(()=>r[l.value]),p=W(()=>a[l.value]),g=W(()=>{var N;return((N=s.user)==null?void 0:N.name)||"Unknown User"}),C=W(()=>u.value?xU(u.value,"HH:mm"):""),v=W(()=>u.value?`(${TU(u.value)})`:""),b=async()=>{var N,A;if(!(!s.apiUpdateFunction||c.value))try{c.value=!0;const _=await s.apiUpdateFunction(s.user.id);if(!_)throw new Error("No data returned from API");((N=_.private_info)==null?void 0:N.is_offline)!==void 0&&(l.value=_.private_info.is_offline?"offline":"online"),(A=_.private_info)!=null&&A.timezone&&(u.value=_.private_info.timezone),o("dataUpdated",_)}catch(_){console.error("Failed to fetch user data:",_)}finally{c.value=!1}},S=()=>{!s.apiUpdateFunction||!s.enableAutoRefresh||(d.value!==null&&clearInterval(d.value),d.value=setInterval(b,s.refreshInterval))},D=()=>{d.value!==null&&(clearInterval(d.value),d.value=null)},w=`https://peopleinsight.arbo.com/user/${s.user.id}`,{copyToClipboard:R,tooltip:x}=xR(w,()=>o("copyLink",s.user.id)),T=()=>o("insightClick",s.user.id);Dt([()=>s.enableAutoRefresh,()=>s.refreshInterval,()=>s.apiUpdateFunction],()=>{D(),s.enableAutoRefresh&&s.apiUpdateFunction&&S()}),Si(async()=>{s.apiUpdateFunction&&(await b(),S())}),hs(D);const H=W(()=>({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(N,A)=>(X(),ye("div",{class:Kt(["mini-people-card",{loading:c.value}])},[Pe("div",e4,[Ee(lF,{size:16,status:l.value,"status-tooltip":h.value},{default:ke(()=>[Ee(Th,gn({readOnly:!0},H.value),null,16)]),_:1},8,["status","status-tooltip"])]),Pe("div",t4,[Pe("div",n4,[Pe("h3",i4,mt(g.value),1),ut((X(),ye("span",{class:"status-badge",style:Dn({color:p.value})},[wt(mt(l.value),1)],4)),[[le(i),{isLoading:c.value,fullwidth:!0}]])]),u.value?(X(),ye("div",s4,[ut((X(),ye("div",o4,[Ee(ot,{source:"remote",src:"Clock",size:"14",class:"clock-icon"}),Pe("span",r4,[Pe("strong",null,mt(C.value),1),A[0]||(A[0]=Pe("span",{class:"separator"},"|",-1)),Pe("span",null,mt(v.value),1)])])),[[le(i),{isLoading:c.value,fullwidth:!0}]])])):at("",!0),Pe("div",a4,[e.showInsightButton?(X(),tt(gt,{key:0,label:"Insights",variant:"primary",size:"default",style:{flex:"1"},onClick:qt(T,["prevent","stop"])})):at("",!0),e.showCopyLinkButton?ut((X(),tt(gt,{key:1,variant:["icon","secondary"],size:"default","aria-label":"Copy link",onClick:qt(le(R),["prevent","stop"])},{default:ke(()=>[Ee(ot,{source:"remote",src:"Link",size:"14"})]),_:1},8,["onClick"])),[[le(n),{content:le(x),contentClass:["extra-padding"],hideOnClick:!1,delay:[300,0]}]]):at("",!0)])])],2))}}),u4=St(l4,[["__scopeId","data-v-1df6789a"]]),c4=St(ct({__name:"MoreOption",setup(e){return(t,n)=>(X(),tt(gt,{class:"btn-more-options",variant:["secondary","icon"],size:"small"},{default:ke(()=>[Ee(ot,{src:"EllipsisVertical",source:"remote",size:"16"})]),_:1}))}}),[["__scopeId","data-v-3a435f38"]]),d4=["src","width","height","alt"],h4=St(ct({__name:"Visual",props:{src:{},source:{default:"remote"},size:{},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},color:{},ratio:{default:"1/1"}},setup(e){const t=ir,{getCachedValue:n,setCachedValue:i}=Yu({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=W(()=>({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=W(()=>({name:o.src,size:Number(o.size||100),color:""})),{url:c,loading:d}=O0(u,"visual",l,a);return(h,p)=>ut((X(),ye("div",{class:Kt(["visual-wrapper",{loading:le(d)}]),style:Dn(r.value)},[Pe("img",{src:le(c),width:e.size,height:e.size,alt:"visual-"+e.src,style:Dn(r.value)},null,12,d4)],6)),[[le(t),{isLoading:le(d),type:"skeleton",size:"cover",fullwidth:!0}]])}}),[["__scopeId","data-v-6284a2ae"]]),f4="MMM dd, yyyy | HH:mm",p4=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))},EF=e=>{if(!e)return null;const t=new Date(e);return isNaN(t.getTime())?null:t},RF=(e,t,n,i)=>e&&t({date:e,timezone:n.value,format:f4})||i,g4=e=>Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0)),DF=(e,t,n)=>{var s;const i={id:e.id,name:e.name,assignees:void 0,status:e.template_flow_status,dateRange:[EF(e.start_date),EF(e.due_date)],isStarted:!!Number(e.is_started),isCompleted:!!Number(e.is_completed),lastUpdated:RF(e.updated_at,t,n,"-")||"",completedOn:RF(e.actual_due_date,t,n,"-")||"",isDeleted:!1,isArchived:((s=e.property)==null?void 0:s.is_archived)===1||e.status==0};return g4(i)},Iv=e=>e.toLowerCase().trim(),m4=e=>Iv(e).split(/\s+/).filter(Boolean),FF=e=>e.replace(/(ing|ed|s)$/i,""),xF={headphone:["headphones","headset"],sofa:["couch"],couch:["sofa"],run:["running","runner"]};function v4(e){const t=new Set;for(const n of e){const i=FF(n);if(t.add(i),t.add(n),xF[i])for(const s of xF[i])t.add(FF(s))}return Array.from(t)}function C4(e,t){const n=Iv(e),i=v4(m4(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 w4(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 y4={class:"search-box"},b4=["value","placeholder"],_v=St(ct({__name:"SearchBox",props:{modelValue:{default:""},placeholder:{default:"Search..."},isFocused:{type:Boolean},validatorFnc:{}},emits:["update:modelValue","search","clear"],setup(e,{emit:t}){const n=xv,i=ui,s=e,o=t,r=fe(null),a=W(()=>s.modelValue.length>0),l=h=>{const p=h.target;o("update:modelValue",p.value),h.stopPropagation(),o("search",p.value)},u=()=>{o("update:modelValue",""),o("clear"),_n(()=>{var h;(h=r.value)==null||h.focus()})},c=h=>{h.key==="Escape"&&a.value&&u(),h.key==="Enter"&&(h.preventDefault(),h.stopImmediatePropagation(),h.stopPropagation(),o("search",s.modelValue))},d=`input-text-${Math.random().toString(36).substr(2,9)}`;return(h,p)=>(X(),ye("div",y4,[Pe("input",{id:d,ref_key:"searchInput",ref:r,type:"text",value:e.modelValue,placeholder:e.placeholder,class:"column-config__input",onInput:l,onKeypress:c},null,40,b4),a.value?ut((X(),tt(gt,{key:1,variant:["icon"],"aria-label":"Clear search",onClick:qt(u,["stop"]),size:16,rounded:!0},{default:ke(()=>[Ee(ot,{class:"cs-icon",src:"XMarkSolid",size:"8"})]),_:1})),[[le(n)],[le(i),{content:"Clear",contentClass:"extra-padding"}]]):(X(),tt(ot,{key:0,src:"MagnifyingGlass",class:"icon",size:"12",color:"#a6a6a6"}))]))}}),[["__scopeId","data-v-1d147de8"]]),TF=Object.freeze({delay:[500,0],contentClass:["extra-padding"]}),S4=ct({name:"ListItem",directives:{tooltip:ui},components:{Icon:ot,Avatar:Th,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},emits:["click","keydown","update:selected","select"],setup(e,{emit:t,slots:n}){const i=fe(!1);function s(b){if(!b||typeof b!="object")return!1;const S=b;return typeof S.name=="string"&&typeof S.id=="string"&&typeof S.initial=="string"}const o=W(()=>e.type==="status"||e.type==="assignee"||e.type==="icon"||!!n.prefix),r=W(()=>!!n.suffix||e.danger&&i.value),a=W(()=>e.disabled||!e.clickable?-1:0),l=W(()=>{var b;return e.type==="status"&&typeof((b=e.data)==null?void 0:b.color)=="string"?{backgroundColor:e.data.color,border:G0(e.data.color,"white")?"1px solid #ccc":"1px solid #fff"}:{}}),u=W(()=>({active:e.selected??!1,disabled:e.disabled??!1,hover:e.hover??!1,clickable:(e.clickable??!0)&&!e.disabled,danger:e.danger??!1,"has-prefix":o.value,"has-suffix":r.value})),c=W(()=>({content:"Cancel",...TF})),d=W(()=>({content:"Confirm",theme:"warning",...TF}));function h(b){return{name:b.name,initial:b.initial,id:b.id,profile_image:b.profile_image??null,color:b.color,size:24}}function p(){i.value=!1}function g(b){b&&t("click",b),(e.clickable??!0)&&(t("update:selected",!e.selected),t("select",!e.selected))}function C(b){if(!e.disabled){if(e.danger&&!i.value){i.value=!0;return}e.danger||g(b)}}function v(b){if(t("keydown",b),!e.disabled)if(b.key==="Enter"||b.key===" "){b.preventDefault();const S=new MouseEvent("click",{bubbles:!0,cancelable:!0});C(S)}else b.key==="Escape"&&i.value&&(b.preventDefault(),p())}return{isConfirming:i,isUserInformation:s,hasPrefix:o,hasSuffix:r,computedTabindex:a,computedStatusStyle:l,classes:u,cancelTooltip:c,confirmTooltip:d,getAvatarProps:h,handleCancel:p,executeAction:g,onClick:C,onKeydown:v}}}),E4=["aria-selected","aria-disabled","tabindex"],R4={key:0,class:"list-item__prefix"},D4={class:"list-item__label"},F4={key:1,class:"list-item__suffix"},x4={key:0,class:"confirm-action"};function T4(e,t,n,i,s,o){const r=rh("Icon"),a=rh("Avatar"),l=rh("CustomButton"),u=Nu("tooltip");return X(),ye("div",{class:Kt(["list-item",e.classes]),role:"listitem","aria-selected":e.selected||void 0,"aria-disabled":e.disabled||void 0,tabindex:e.computedTabindex,onClick:t[0]||(t[0]=qt((...c)=>e.onClick&&e.onClick(...c),["stop","prevent"])),onKeydown:t[1]||(t[1]=(...c)=>e.onKeydown&&e.onKeydown(...c))},[e.hasPrefix?(X(),ye("div",R4,[Rt(e.$slots,"prefix",{},()=>[e.type==="icon"&&e.iconName?(X(),tt(r,{key:0,src:e.iconName,source:"remote",class:"item-icon",size:16},null,8,["src"])):e.type==="status"?(X(),ye("div",{key:1,class:"status-indicator",style:Dn(e.computedStatusStyle)},null,4)):e.type==="assignee"&&e.isUserInformation(e.data)?(X(),tt(a,gn({key:2},e.getAvatarProps(e.data),{class:"item-avatar",readOnly:!0}),null,16)):at("",!0)],!0)])):at("",!0),Pe("div",D4,[Rt(e.$slots,"label",{},()=>[wt(mt(e.label),1)],!0)]),e.hasSuffix?(X(),ye("div",F4,[Rt(e.$slots,"suffix",{item:e.$props},()=>[e.danger&&e.isConfirming?(X(),ye("div",x4,[ut((X(),tt(l,{variant:["secondary","icon"],size:"small",onClick:qt(e.handleCancel,["stop","prevent"])},{default:ke(()=>[Ee(r,{src:"Xmark",source:"remote",size:12})]),_:1},8,["onClick"])),[[u,e.cancelTooltip]]),ut((X(),tt(l,{variant:["danger","primary","icon"],size:"small",onClick:qt(e.executeAction,["stop","prevent"])},{default:ke(()=>[Ee(r,{src:"Check",source:"remote",size:12})]),_:1},8,["onClick"])),[[u,e.confirmTooltip]])])):at("",!0)],!0)])):at("",!0)],42,E4)}const kv=St(S4,[["render",T4],["__scopeId","data-v-f331afa8"]]),P4=["innerHTML"],A4={key:1,class:"item-label"},I4={key:1,class:"loading-more"},_4={key:2,class:"no-results"},k4={key:3,class:"no-results"},O4={key:4,class:"error-state"},M4={class:"error-content"},L4={class:"error-message"},N4=10,Ov=St(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:"250px"},width:{default:"200px"},minQueryLength:{default:0}},emits:["select","close","search","loadMore"],setup(e,{expose:t,emit:n}){const i=ui,s={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape"},o=e,r=n,a=fe(""),l=fe(-1),u=fe(null),c=fe(null),d=W(()=>Iv(a.value)),h=W(()=>!d.value||d.value.length<o.minQueryLength?o.options:o.options.map(M=>({item:M,score:C4(M.label,d.value)})).filter(({score:M})=>M>0).sort((M,L)=>L.score-M.score).map(({item:M})=>M)),p=W(()=>h.value.length>0),g=W(()=>!p.value&&a.value.trim().length>0&&!o.loading),C=W(()=>o.options.length===0&&!o.loading&&!o.error),v=W(()=>o.loading),b=W(()=>o.hasMore&&!o.loading&&!o.loadingMore),S=ic(M=>{a.value=M,l.value=0,r("search",M)},Fl),D=M=>a.value?w4(M,a.value):M,w=M=>{const ne={[s.ARROW_DOWN]:()=>R(M),[s.ARROW_UP]:()=>x(M),[s.ENTER]:()=>N(M),[s.ESCAPE]:()=>A(M)}[M.key];ne&&ne()},R=M=>{M.preventDefault(),T(1)},x=M=>{M.preventDefault(),T(-1)},T=M=>{const L=h.value.length;L!==0&&(M>0?l.value=(l.value+1)%L:l.value=l.value>0?l.value-1:L-1,H())},H=()=>{_n(()=>{var L;const M=(L=c.value)==null?void 0:L.querySelectorAll(".list-item")[l.value];M==null||M.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})},N=M=>{if(M.preventDefault(),l.value>=0&&l.value<h.value.length){const ne=h.value[l.value];_(ne)}},A=M=>{M.preventDefault(),ie()},_=M=>{M.disabled||(r("select",M),l.value=-1,ie())},V=M=>{l.value=M},ie=()=>{r("close")},me=()=>{if(!b.value||!c.value)return;const{scrollTop:M,clientHeight:L,scrollHeight:ne}=c.value;ne-(M+L)<=N4&&r("loadMore")},Te=()=>{var M,L;(M=c.value)==null||M.addEventListener("scroll",me),(L=u.value)==null||L.addEventListener("keydown",w)},q=()=>{var M,L;(M=c.value)==null||M.removeEventListener("scroll",me),(L=u.value)==null||L.removeEventListener("keydown",w)};Si(()=>{Te()}),hs(()=>{q()}),Dt(()=>o.loading,M=>{!M&&h.value.length>0&&(l.value=0)}),t({query:a,filteredOptions:h,selectedIndex:l,closeDropdown:ie,clearSearch:()=>{a.value=""}});const z=M=>Array.isArray(o.selectedId)?o.selectedId.includes(String(M==null?void 0:M.id)):o.selectedId==M.id;return(M,L)=>(X(),ye("div",{ref_key:"searchListRef",ref:u,class:"search-list",tabindex:"-1",style:Dn({width:e.width})},[Ee(_v,{modelValue:a.value,"onUpdate:modelValue":L[0]||(L[0]=ne=>a.value=ne),class:"search-box",disabled:e.loading,onSearch:le(S)},null,8,["modelValue","disabled","onSearch"]),Pe("div",{ref_key:"popupRef",ref:c,class:"list-container",style:Dn({maxHeight:e.maxHeight})},[Rt(M.$slots,"extra-item",{},void 0,!0),p.value?(X(!0),ye(Ft,{key:0},An(h.value,(ne,we)=>(X(),tt(kv,gn({key:`${ne.id}-${we}`},{ref_for:!0},ne,{hover:we===l.value,selected:z(ne),type:ne.type,onClick:qt(Ae=>_(ne),["stop","prevent"]),onMouseover:Ae=>V(we)}),{prefix:ke(()=>[Rt(M.$slots,"prefix-item",{item:ne},void 0,!0)]),label:ke(()=>[a.value?ut((X(),ye("span",{key:0,class:"match",innerHTML:D(ne.label)},null,8,P4)),[[le(i),{content:ne.label}]]):ut((X(),ye("span",A4,[wt(mt(ne.label),1)])),[[le(i),{content:ne.label}]])]),suffix:ke(()=>[Rt(M.$slots,"action",{item:ne,isHovered:we===l.value},void 0,!0)]),_:2},1040,["hover","selected","type","onClick","onMouseover"]))),128)):at("",!0),e.loadingMore||v.value?(X(),ye("div",I4,[Rt(M.$slots,"loading-more",{},()=>[L[1]||(L[1]=Pe("div",{class:"loading-skeleton"},null,-1)),L[2]||(L[2]=Pe("div",{class:"loading-skeleton"},null,-1))],!0)])):at("",!0),Rt(M.$slots,"footer",{},void 0,!0),g.value?(X(),ye("div",_4,[Rt(M.$slots,"empty",{query:a.value},()=>[L[3]||(L[3]=Pe("div",{class:"no-results-content"},[Pe("p",null,[wt(" No results. "),Pe("br"),wt(" Try another search. ")])],-1))],!0)])):at("",!0),C.value?(X(),ye("div",k4,[Rt(M.$slots,"empty-list",{},()=>[L[4]||(L[4]=Pe("div",{class:"no-results-content"},[Pe("p",null,"No items available.")],-1))],!0)])):at("",!0),e.error?(X(),ye("div",O4,[Rt(M.$slots,"error",{error:e.error},()=>[Pe("div",M4,[L[5]||(L[5]=Pe("span",{class:"error-icon"},"⚠️",-1)),Pe("span",L4,mt(e.error),1)])],!0)])):at("",!0)],4)],4))}}),[["__scopeId","data-v-2fd98d8d"]]),V4={class:"unassign-icon"},B4={key:0,class:"action"},H4={class:"error-message"},G4={class:"empty-state"},PF=20,AF=St(ct({__name:"AssigneeGroupEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},dataFetching:{type:Function},id:{},params:{},workspaceId:{},entityId:{},ids:{}},emits:["updated"],setup(e,{expose:t,emit:n}){const i=ui,s=e,o=SF,r=z=>{const M=z.data;return{name:String((M==null?void 0:M.display_name)??"Unknown"),initial:String((M==null?void 0:M.initial)??"U"),id:String(z.id),profile_image:(M==null?void 0:M.profile_image)??null,color:(M==null?void 0:M.color)??{bgColor:"#CCCCCC",textColor:"#FFFFFF"},size:24,isUseShortLabel:!0}},{id:a}=Rg(s),l=n,u=z=>{var L,ne;const M=(ne=(L=s.params)==null?void 0:L.api)==null?void 0:ne.getRowNode(String(a.value));M==null||M.setDataValue("assignees",WG(z.assignees)),l("updated",z)},c=fe(!1),d=fe(!1),h=fe(null),p=fe(1),g=fe(!0),C=fe(0),v=fe(""),{isSubmitting:b,unAssignAll:S,replaceAssignees:D,handleSelect:w,assigneeList:R,mergedOptions:x,selectedUserIds:T}=U2({...s,updateRowData:u,value:s.value}),H=Ei("bulkUpdate",!1),{apiServices:N}=Ns(!H,s),A=Ei("workspaceId"),_=async(z=1,M="",L=!1)=>{var ne,we,Ae,Le,nt;if(!N.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(L?d.value=!0:c.value=!0,h.value=null,!((ne=N.value)!=null&&ne.getAssignableUsers))throw new Error("API service getAssignableUsers is undefined");try{const Je=s.id?await((we=N.value)==null?void 0:we.getAssignableUsers({workspaceId:String(A),itemId:String(s.id),page:z,perPage:PF,q:M.trim()})):await((Ae=N.value)==null?void 0:Ae.multipleAssignableUser({workspaceId:String(A),itemIds:s.ids||[],page:z,perPage:PF,q:M.trim()})),ht=((Le=Je.data)==null?void 0:Le.map(HE))??[];R.value=L?Vh(R.value,ht,"id"):ht,C.value=((nt=Je.meta)==null?void 0:nt.total)??0,g.value=R.value.length<C.value,p.value=z}catch(Je){console.error("Error fetching assignable users:",Je),h.value="Failed to load assignable users"}finally{c.value=!1,d.value=!1}},V=()=>{!d.value&&g.value&&_(p.value+1,v.value,!0)},ie=ic(async z=>{v.value=z,await _(1,z,!1)},Fl),me=()=>_(1,v.value,!1),Te=W(lf);Si(()=>_(1)),t({getValue:()=>{var z;return(z=x.value.find(M=>M.selected))==null?void 0:z.value},refresh:me,clearInternal:()=>{T.value=[]}});const q=()=>{const z=sessionStorage.getItem("BASE_URL"),M=Ms({type:"access_setting",config:{baseDomain:z,ws_code:s.workspaceId,entity_id:A}}).url;window.open(M,"_blank")};return(z,M)=>(X(),tt(Ov,gn({"selected-id":le(T)},{...s},{options:le(x),loading:c.value,"loading-more":d.value,"has-more":g.value,onSelect:le(w),onSearch:le(ie),onLoadMore:V}),oS({"extra-item":ke(()=>[Ee(gt,{variant:"menu-item",onHandleClick:le(S)},{prefix:ke(()=>[Pe("div",V4,[Ee(ot,{src:"UserXMark",source:"remote",size:"12"})])]),default:ke(()=>[M[0]||(M[0]=wt(" Unassign all ",-1))]),_:1},8,["onHandleClick"])]),"prefix-item":ke(({item:L})=>[ut(Ee(Th,gn(r(L),{class:"item-avatar",readOnly:!0}),null,16),[[le(o),{user:L.data,status:"online",timezone:Te.value,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0}]])]),action:ke(({isHovered:L,item:ne})=>[L?(X(),ye("div",B4,[ut((X(),tt(gt,{variant:["icon","tertiary"],size:"extra-small",highlightOnHover:!0,disabled:le(b),onClick:qt(we=>le(w)(ne),["stop","prevent"])},{prefix:ke(()=>[Ee(ot,{src:ne.selected?"UserMinus":"UserPlus",source:"remote",size:"12"},null,8,["src"])]),_:2},1032,["disabled","onClick"])),[[le(i),ne.selected?"Unassign":"Assign"]]),ut((X(),tt(gt,{variant:["icon","tertiary"],size:"extra-small",highlightOnHover:!0,disabled:le(b),onClick:qt(we=>{var Ae;return le(D)((Ae=ne.data)==null?void 0:Ae.id)},["stop","prevent"])},{prefix:ke(()=>[Ee(ot,{src:"IdCardClip",source:"remote",size:"12"})]),_:1},8,["disabled","onClick"])),[[le(i),"Unassign others and reassign"]])])):at("",!0)]),"empty-list":ke(()=>[Pe("div",G4,[M[3]||(M[3]=wt(" No assignee available. ",-1)),M[4]||(M[4]=Pe("br",null,null,-1)),Ee(gt,{onClick:q,variant:"tertiary",size:"small"},{default:ke(()=>[...M[2]||(M[2]=[wt(" Go to Access Settings to add team. ",-1)])]),_:1})])]),_:2},[h.value?{name:"error",fn:ke(()=>[Pe("div",H4,[wt(mt(h.value)+" ",1),Ee(gt,{onClick:me,size:"small"},{default:ke(()=>[...M[1]||(M[1]=[wt(" Retry ",-1)])]),_:1})])]),key:"0"}:void 0]),1040,["selected-id","options","loading","loading-more","has-more","onSelect","onSearch"]))}}),[["__scopeId","data-v-ad262d4e"]]),W4=ct({__name:"AssignneeUpdateButton",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},dataFetching:{type:Function},id:{},params:{},workspaceId:{},entityId:{},ids:{},variant:{}},emits:["update"],setup(e,{emit:t}){const n=e,{popupRef:i,triggerRef:s,isVisible:o}=bo();Wr("bulkUpdate",!0);const r=t,a=fe(null),l=u=>{var c;r("update",u),(c=a.value)==null||c.clearInternal()};return Dt(()=>o,u=>{var c;u&&((c=a.value)==null||c.clearInternal())}),(u,c)=>(X(),ye("div",null,[Pe("div",{ref_key:"triggerRef",ref:s},[Ee(gt,{class:"action-button",variant:n.variant},{default:ke(()=>[Ee(ot,{src:"UserPlus",class:"icon",size:"14"}),c[0]||(c[0]=wt(" Assignee ",-1))]),_:1},8,["variant"])],512),Pe("div",{ref_key:"popupRef",ref:i,style:{display:"none"}},[Ee(AF,gn({ref_key:"assigneeGroupEditorRef",ref:a},n,{ids:e.ids,onUpdated:l}),null,16,["ids"])],512)]))}}),IF=St(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}=bo(),r=W(()=>o.value),a=()=>{n()};return t({closeDropdown:a,isOpen:r}),(l,u)=>(X(),ye("div",{ref_key:"triggerRef",ref:i,class:"dropdown-wrapper"},[Rt(l.$slots,"trigger",{},()=>[u[0]||(u[0]=Pe("button",{class:"editable-dropdown__trigger","aria-label":"Select or type"}," ▼ ",-1))],!0),Pe("div",{ref_key:"popupRef",ref:s,class:"dropdown-content",style:{display:"none"}},[Rt(l.$slots,"content",{closeDropdown:a},()=>[u[1]||(u[1]=Pe("div",{class:"dropdown-list"},null,-1))],!0)],512)],512))}}),[["__scopeId","data-v-7848f325"]]),z4=["aria-label"],$4={class:"arbo-calendar-header arbo-calendar-week",role:"row"},U4={class:"arbo-calendar-weeks"},j4=["aria-label","data-date","data-weekday","tabindex","onClick"],K4={class:"arbo-calendar-actions"},q4=St(ct({__name:"MainCalendar",props:lS({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}},{tracingCase:{default:()=>({case:"",behavior:""})},tracingCaseModifiers:{}}),emits:lS(["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=W(()=>n.startDate&&n.endDate),s=FM(e,"tracingCase"),o=t,r=fe(n.year),a=fe(n.month);Dt(()=>[n.year,n.month],([q,z])=>{r.value=q,a.value=z});const l=W(()=>Ue.fromObject({year:r.value,month:a.value,day:1},{zone:n.timezone}).setLocale(n.locale||"en-US").toFormat("LLLL yyyy")),u=W(()=>Ue.now().setZone(n.timezone)),c=W(()=>n.startDate?Ue.fromJSDate(n.startDate,{zone:n.timezone}):null),d=W(()=>n.endDate?Ue.fromJSDate(n.endDate,{zone:n.timezone}):null),h=fe(c.value),p=fe(d.value),g=fe(c.value),C=fe(d.value);Dt([c,d],()=>{n.requireConfirm||(h.value=c.value,p.value=d.value,g.value=c.value,C.value=d.value)},{immediate:!0});const v=W(()=>n.requireConfirm?h.value:c.value),b=W(()=>n.requireConfirm?p.value:d.value);Dt(()=>n.activeField,q=>{const z=q==="start"?v.value:b.value;z&&(r.value=z.year,a.value=z.month)}),Dt(()=>{var q,z;return[(q=v.value)==null?void 0:q.toISODate(),(z=b.value)==null?void 0:z.toISODate(),n.activeField]},()=>{const q=n.activeField==="start"?v.value:b.value;q&&(q.year!==r.value||q.month!==a.value)&&(r.value=q.year,a.value=q.month)});function S(q){return q.setZone("utc")}const D=fe("");function w(q){D.value=q.toISODate()||"",_n(()=>{const z=document.querySelector(`.arbo-calendar-day[data-date="${D.value}"]`);z==null||z.focus()})}Dt(()=>{var q,z;return[r.value,a.value,n.activeField,(q=v.value)==null?void 0:q.toISODate(),(z=b.value)==null?void 0:z.toISODate()]},()=>{const q=n.activeField==="start"?v.value:b.value;let z;q&&q.year===r.value&&q.month===a.value?z=q:v.value&&v.value.year===r.value&&v.value.month===a.value?z=v.value:z=u.value,w(z)});function R(q){return q.toFormat("d")}const x=W(()=>{const q=Ue.fromObject({year:r.value,month:a.value,day:1},{zone:n.timezone}),z=q.weekday,M=n.weekStart===1?(z+6)%7:z%7;let L=q.minus({days:M});const ne=[],we=Rl.weekdays(n.weekdayLabelStyle||"short",{locale:n.locale||"en-US"});for(let Le=0;Le<42;Le++){const nt=[];L.month!==a.value&&nt.push("is-outside"),L.hasSame(u.value,"day")&&nt.push("is-today"),v.value&&L.hasSame(v.value,"day")&&nt.push("is-selected-start"),b.value&&L.hasSame(b.value,"day")&&nt.push("is-selected-end"),v.value&&b.value&&L>v.value&&L<b.value&&nt.push("is-in-range");const Je=R(L),ht=we[L.weekday-1]||"";ne.push({dt:L,iso:L.toISODate()||"",label:L.toFormat("d"),displayLabel:Je,weekdayLabel:ht,aria:L.setLocale(n.locale||"en-US").toFormat("cccc, d LLLL yyyy"),classes:nt}),L=L.plus({days:1})}const Ae=[];for(let Le=0;Le<6;Le++)Ae.push(ne.slice(Le*7,Le*7+7));return Ae}),T=W(()=>{const q=Rl.weekdays(n.weekdayLabelStyle||"short",{locale:n.locale||"en-US"});return n.weekStart===1?q:[q[6],...q.slice(0,6)]});function H(q,z,M){const L=q==="start"?z.startOf("day"):z.endOf("day"),ne=S(L),we={year:L.year,month:L.month,day:L.day,utc:ne.toISO()||""};q==="start"?(o("select-start",we,M??!0),o("select-start-utc",we.utc)):(o("select-end",we),o("select-end-utc",we.utc))}function N(q){let z=r.value,M=a.value+q;for(;M<1;)M+=12,z-=1;for(;M>12;)M-=12,z+=1;r.value=z,a.value=M,o("update:year",z),o("update:month",M)}function A(q){const M=(D.value?Ue.fromISO(D.value,{zone:n.timezone}):u.value).plus({days:q});(M.month!==a.value||M.year!==r.value)&&(a.value=M.month,r.value=M.year,o("update:year",M.year),o("update:month",M.month)),w(M)}function _(q=!1){const M=(D.value?Ue.fromISO(D.value,{zone:n.timezone}):u.value).weekday%7,L=q?6-M:-M;A(L)}function V(q){switch(q.key){case"ArrowLeft":q.preventDefault(),A(-1);break;case"ArrowRight":q.preventDefault(),A(1);break;case"ArrowUp":q.preventDefault(),A(-7);break;case"ArrowDown":q.preventDefault(),A(7);break;case"Home":q.preventDefault(),_(!1);break;case"End":q.preventDefault(),_(!0);break;case"PageUp":q.preventDefault(),N(q.shiftKey?-12:-1);break;case"PageDown":q.preventDefault(),N(q.shiftKey?12:1);break;case"Enter":case" ":{q.preventDefault();const z=D.value?Ue.fromISO(D.value,{zone:n.timezone}):u.value,M=x.value.flat().find(L=>L.iso===z.toISODate());M&&ie(M);break}}}function ie(q){var Ke,yn;const z=!!c.value,M=!!d.value,L=n.activeField,ne=((Ke=c.value)==null?void 0:Ke.toISODate())||"null",we=((yn=d.value)==null?void 0:yn.toISODate())||"null",Ae=q.dt.toISODate()||"",Le=(Ut,xt)=>{s.value={case:Ut,behavior:xt}},nt=()=>`Selected start ${Ae} > existing end ${we} -> reset both to ${Ae}`,Je=()=>`Selected end ${Ae} < existing start ${ne} -> reset both to ${Ae}`,ht=()=>{H("start",q.dt,!0),H("end",q.dt),o("update:activeField","end")},Ht=(Ut=!1)=>{H("start",q.dt,Ut),Ut&&o("update:activeField","end")},Jt=(Ut=!1)=>{console.trace("doSelectEnd called with closeAfter:",Ut,n.immediatelyUpdate),H("end",q.dt),Ut&&o("close")};if(z&&M){L==="start"?d.value&&q.dt>d.value?(ht(),Le("INVERT_RANGE_FROM_START",nt())):(Ht(!1),Le("UPDATE_START_IN_RANGE",`Updated start from ${ne} to ${Ae}; end remains ${we}`)):c.value&&q.dt<c.value?(ht(),Le("INVERT_RANGE_FROM_END",Je())):(Jt(!1),Le("UPDATE_END_IN_RANGE",`Updated end from ${we} to ${Ae}; start remains ${ne}`));return}if(!z&&M&&L==="start"&&d.value&&q.dt>d.value){ht(),Le("CREATE_RANGE_FROM_LATE_START",nt());return}if(z&&!M&&L==="end"&&c.value&&q.dt<c.value){ht(),Le("CREATE_RANGE_FROM_EARLY_END",Je());return}if(!z&&!M){if(L==="start"){Ht(!0),Le("INIT_START",`Picked start ${Ae}; awaiting end selection`);return}Jt(n.immediatelyUpdate),Le("INIT_END",`Picked end ${Ae}; awaiting start selection`);return}if(!z&&M){if(L==="start"){Ht(!0),Le("FILL_MISSING_START",`Inserted start ${Ae}; existing end ${we}`);return}Jt(!1),Le("STRICT_UPDATE_END_ONLY",`Updated end to ${Ae}; start still null`);return}if(z&&!M){if(L==="start"){Ht(!0),Le("RESELECT_START_BEFORE_END",`Replaced start with ${Ae}; end still null, switching to end`);return}Jt(n.immediatelyUpdate),Le("FILL_MISSING_END",`Picked end ${Ae}; start ${ne}`);return}}function me(){g.value=h.value,C.value=p.value,o("confirm")}function Te(){h.value=g.value,p.value=C.value,o("cancel")}return(q,z)=>(X(),ye("div",{class:Kt(["arbo-calendar",{"full-date":i.value}]),role:"grid","aria-label":l.value,tabindex:"0",onKeydown:V},[Pe("div",$4,[(X(!0),ye(Ft,null,An(T.value,M=>(X(),ye("div",{key:M,class:"arbo-calendar-weekday",role:"columnheader"},mt(M),1))),128))]),Pe("div",U4,[(X(!0),ye(Ft,null,An(x.value,(M,L)=>(X(),ye("div",{key:L,class:"arbo-calendar-week",role:"row"},[(X(!0),ye(Ft,null,An(M,ne=>(X(),ye("div",{key:ne.iso,class:Kt(["arbo-calendar-day",[ne.classes,{"is-focused":ne.iso===D.value}]]),role:"gridcell","aria-label":ne.aria,"data-date":ne.iso,"data-weekday":ne.weekdayLabel,tabindex:ne.iso===D.value?0:-1,onClick:we=>ie(ne)},mt(ne.displayLabel),11,j4))),128))]))),128))]),Pe("div",K4,[Ee(gt,{variant:"secondary",size:"medium",onClick:Te},{default:ke(()=>[wt(mt(n.cancelLabel),1)]),_:1}),Ee(gt,{variant:"primary",size:"medium",onClick:me},{default:ke(()=>[wt(mt(n.confirmLabel),1)]),_:1})])],42,z4))}}),[["__scopeId","data-v-cacc5b46"]]),Y4={class:"cal-nav-wrapper"},Z4={class:"cal-nav-bar",role:"toolbar","aria-label":"Calendar navigation"},J4={class:"cal-nav-center"},Q4={key:0,class:"year-grid",role:"dialog","aria-label":"Select year"},X4={class:"year-grid-header"},e3={class:"range-label"},t3={class:"year-grid-body",role:"grid"},n3={key:1,class:"month-grid",role:"dialog","aria-label":"Select month"},i3={class:"months",role:"grid"},s3={key:2,class:"days-slot"},o3=St(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"}},emits:["update:year","update:month","mode-change","year-selected","month-selected"],setup(e,{emit:t}){const n=e,i=W(()=>{if(n.monthLabels&&n.monthLabels.length===12)return n.monthLabels;const _=n.locale||"en-US",V=n.monthLabelStyle||"short",ie=new Intl.DateTimeFormat(_,{month:V,timeZone:"UTC"});return Array.from({length:12},(Te,q)=>ie.format(new Date(Date.UTC(2020,q,1))))}),s=t,o=fe(n.year),r=fe(n.month);Dt(()=>n.year,_=>{_!==o.value&&(o.value=_)}),Dt(()=>n.month,_=>{_!==r.value&&(r.value=_)});const a=fe("days");function l(_){a.value!==_&&(a.value=_,s("mode-change",_))}const u=W(()=>n.minYear),c=W(()=>n.maxYear),d=W(()=>{const _=n.yearSpan;return o.value-o.value%_}),h=W(()=>d.value+n.yearSpan-1);function p(){const _=n.yearSpan,V=d.value-_;V>=u.value&&(o.value=V)}function g(){const _=n.yearSpan,V=d.value+_;V<=c.value&&(o.value=V)}const C=W(()=>d.value-n.yearSpan<u.value),v=W(()=>h.value+n.yearSpan>c.value),b=W(()=>{const _=n.yearSpan;return Math.ceil(_/3)});function S(_){const ie=d.value+(_-1)*3;return Array.from({length:3},(me,Te)=>ie+Te).filter(me=>me<=h.value)}function D(){a.value==="months"?l("days"):l("months")}function w(){a.value==="years"?l("days"):l("years")}function R(_){o.value=_,s("update:year",_),s("year-selected",_),l("months")}function x(_){r.value=_,s("update:month",_),s("month-selected",_),l("days")}function T(){if(a.value==="days"){let _=o.value,V=r.value-1;if(V<1&&(V=12,_--),_<u.value)return;o.value=_,r.value=V,s("update:year",_),s("update:month",V)}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 H(){if(a.value==="days"){let _=o.value,V=r.value+1;if(V>12&&(V=1,_++),_>c.value)return;o.value=_,r.value=V,s("update:year",_),s("update:month",V)}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 N=W(()=>a.value==="days"?o.value===u.value&&r.value===1:a.value==="months"?o.value-1<u.value:C.value),A=W(()=>a.value==="days"?o.value===c.value&&r.value===12:a.value==="months"?o.value+1>c.value:v.value);return(_,V)=>(X(),ye("div",Y4,[Rt(_.$slots,"selection",{},void 0,!0),Pe("div",Z4,[Ee(gt,{variant:"secondary",class:"cal-nav-btn prev","aria-label":"Previous",disabled:N.value,label:"",onClick:T},{default:ke(()=>[Ee(ot,{src:"ChevronLeft",source:"remote",size:"16"})]),_:1},8,["disabled"]),Pe("div",J4,[Ee(gt,{"aria-pressed":a.value==="months",onClick:D,variant:"secondary"},{default:ke(()=>[wt(mt(i.value[r.value-1]),1)]),_:1},8,["aria-pressed"]),Ee(gt,{variant:"secondary","aria-pressed":a.value==="years",onClick:w},{default:ke(()=>[wt(mt(o.value),1)]),_:1},8,["aria-pressed"])]),Ee(gt,{variant:"secondary",class:"cal-nav-btn next","aria-label":"Next",disabled:A.value,label:"",onClick:H},{default:ke(()=>[Ee(ot,{src:"ChevronRight",source:"remote",size:"16"})]),_:1},8,["disabled"])]),a.value==="years"?(X(),ye("div",Q4,[Pe("div",X4,[Ee(gt,{variant:"secondary",class:"cal-nav-btn prev","aria-label":"Next",disabled:C.value,"prefix-icon":"AnglesRight",label:"",onClick:p},{default:ke(()=>[Ee(ot,{src:"AnglesRight",source:"remote",size:"16",class:"arbo-label__prefix--icon"})]),_:1},8,["disabled"]),Pe("div",e3,mt(d.value)+" - "+mt(h.value),1),Ee(gt,{variant:"secondary",class:"cal-nav-btn next","aria-label":"Next",disabled:v.value,"prefix-icon":"AnglesRight",label:"",onClick:g},{default:ke(()=>[Ee(ot,{src:"AnglesRight",source:"remote",size:"16",class:"arbo-label__prefix--icon"})]),_:1},8,["disabled"])]),Pe("div",t3,[(X(!0),ye(Ft,null,An(b.value,ie=>(X(),ye("div",{key:"yr-row-"+ie,class:"year-grid-row",role:"row"},[(X(!0),ye(Ft,null,An(S(ie),me=>(X(),tt(gt,{key:me,variant:"secondary",class:Kt(["year-cell",{selected:me===o.value}]),role:"gridcell",disabled:me<u.value||me>c.value,onClick:Te=>R(me)},{default:ke(()=>[wt(mt(me),1)]),_:2},1032,["class","disabled","onClick"]))),128))]))),128))])])):a.value==="months"?(X(),ye("div",n3,[Pe("div",i3,[(X(!0),ye(Ft,null,An(i.value,(ie,me)=>(X(),tt(gt,{key:ie,variant:"secondary",class:Kt(["month-cell",{selected:me+1===r.value}]),role:"gridcell",onClick:Te=>x(me+1)},{default:ke(()=>[wt(mt(ie),1)]),_:2},1032,["class","onClick"]))),128))])])):(X(),ye("div",s3,[Rt(_.$slots,"default",{year:o.value,month:r.value,mode:a.value},void 0,!0)]))]))}}),[["__scopeId","data-v-865088f9"]]),r3={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":".","dd/MM/yyyy HH:mm":"/","MM/dd/yyyy HH:mm":"/","yyyy-MM-dd HH:mm":"-","dd.MM.yyyy HH:mm":"."},_F={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"],"dd/MM/yyyy HH:mm":["day","month","year","hour","minute"],"MM/dd/yyyy HH:mm":["month","day","year","hour","minute"],"yyyy-MM-dd HH:mm":["year","month","day","hour","minute"],"dd.MM.yyyy HH:mm":["day","month","year","hour","minute"]},a3={day:{maxLength:2,min:1,max:31},month:{maxLength:2,min:1,max:12},year:{maxLength:4,min:1900,max:2100},hour:{maxLength:2,min:0,max:23},minute:{maxLength:2,min:0,max:59}},l3=e=>(_F[e]||_F["dd/MM/yyyy"]).map(n=>({type:n,value:"",hasError:!1,errorMessage:"",...a3[n]})),u3=(e,t)=>{const n=r3[t],i=t.includes("HH:mm");let s="";for(let o=0;o<e.length;o++){const r=e[o];s+=r.value;const a=o===e.length-1;r.value.length===r.maxLength&&!a&&(i&&r.type==="hour"?s+=":":i&&r.type==="year"?s+=" ":r.type!=="hour"&&r.type!=="minute"&&(s+=n))}return s},kF=(e,t="local")=>{const n=e.reduce((s,o)=>(s[o.type]=o.value?parseInt(o.value,10):void 0,s),{});if(n.day==null||n.month==null||n.year==null||e.some(s=>s.type==="hour")&&n.hour==null||e.some(s=>s.type==="minute")&&n.minute==null)return null;const i=Ue.fromObject(n,{zone:t});return i.isValid?i:null},Dc=(e,t,n)=>{const i=t.includes("HH:mm");let s=0;for(let o=0;o<n;o++){s+=e[o].maxLength;const r=e[o];(i&&r.type==="hour"||i&&r.type==="year"||r.type!=="hour"&&r.type!=="minute")&&(s+=1)}return s},c3=(e,t,n)=>{const i=t.includes("HH:mm");let s=0;for(let o=0;o<e.length;o++){const r=e[o],a=r.maxLength;if(n<=s+a)return o;s+=a,o<e.length-1&&(i&&r.type==="hour"||i&&r.type==="year"||r.type!=="hour"&&r.type!=="minute")&&(s+=1)}return e.length-1},OF=(e,t,n="local")=>{const i=parseInt(e.value,10);return isNaN(i)?{isValid:!1,error:"Invalid number"}:i<e.min||i>e.max?{isValid:!1,error:`Value must be between ${e.min} and ${e.max}`}:(e.type==="day"||e.type==="month"||e.type==="year")&&t.every(s=>s.type==="hour"||s.type==="minute"||s.value.length===s.maxLength)&&!kF(t,n)?{isValid:!1,error:"Invalid date"}:{isValid:!0}},d3=(e,t)=>{if(!e)return!1;const n=Ue.now().setZone(t.timezone||"local").startOf("day"),i=e.setZone(t.timezone||"local").startOf("day");return!(!t.allowPastDates&&i<n||!t.allowFutureDates&&i>n)};function h3(e){const{format:t="dd/MM/yyyy",timezone:n="local",onComplete:i,onInvalid:s,allowPastDates:o=!0,allowFutureDates:r=!0}=e,a=fe(l3(t)),l=fe(0),u=fe({start:0,end:0}),c=W(()=>u3(a.value,t)),d=W(()=>a.value.reduce((L,ne)=>(L[ne.type]=ne.value,L),{})),h=W(()=>d.value.day||""),p=W(()=>d.value.month||""),g=W(()=>d.value.year||""),C=W(()=>d.value.hour||""),v=W(()=>d.value.minute||""),b=W(()=>a.value.every(L=>L.value.length===L.maxLength)),S=W(()=>{const L=kF(a.value,n),ne=d3(L,{allowPastDates:o,allowFutureDates:r,timezone:n});return!b.value||!L||!ne?{isValid:!1,date:null}:{isValid:!0,date:L}}),D=W(()=>S.value.isValid),w=L=>{if(L<0||L>=a.value.length)return;l.value=L;const ne=e.inputRef.value;ne&&requestAnimationFrame(()=>{const we=Dc(a.value,t,L);ne.setSelectionRange(we,we)})},R=()=>{l.value<a.value.length-1?w(l.value+1):D.value&&i&&i(S.value.date)},x=()=>{l.value>0&&w(l.value-1)},T=()=>{a.value.forEach(L=>{L.hasError=!1,L.errorMessage=""})},H=(L,ne)=>{const we=a.value[L];if(we.value=ne,_n(()=>{const Ae=e.inputRef.value;if(Ae&&document.activeElement===Ae){const Le=Dc(a.value,t,L)+ne.length;Ae.setSelectionRange(Le,Le)}}),we.value.length===we.maxLength){const{isValid:Ae,error:Le}=OF(we,a.value,n);Ae?(we.hasError=!1,we.errorMessage="",R()):(we.hasError=!0,we.errorMessage=Le,s&&s(we))}else we.hasError=!1,we.errorMessage=""},N=(L,ne)=>{const we=parseInt(ne);switch(L.type){case"month":return we<=1;case"day":return we<=3;case"hour":return we<=2;case"minute":return we<=5;default:return!0}},A=L=>{T();const ne=a.value[l.value];e.inputRef.value;const we=u.value.start!==u.value.end,Ae=Dc(a.value,t,l.value),Le=Ae+ne.value.length,nt=we&&u.value.start>=Ae&&u.value.end<=Le;let Je;if(nt){const ht=u.value.start-Ae,Ht=u.value.end-Ae;if(ht===0&&ne.maxLength===2&&!N(ne,L))return;Je=ne.value.substring(0,ht)+L+ne.value.substring(Ht)}else if(ne.value.length===0&&ne.maxLength===2){if(!N(ne,L))return;Je=L}else if(ne.value.length===ne.maxLength){if(ne.maxLength===2&&!N(ne,L))return;Je=L}else Je=ne.value+L;Je=Je.replace(/\D/g,"").slice(0,ne.maxLength),H(l.value,Je)},_=()=>{T();const L=a.value[l.value],ne=e.inputRef.value,we=u.value.start!==u.value.end,Ae=Dc(a.value,t,l.value),Le=Ae+L.value.length;if(we&&u.value.start>=Ae&&u.value.end<=Le){const Je=u.value.start-Ae,ht=u.value.end-Ae,Ht=L.value.substring(0,Je)+L.value.substring(ht);L.value=Ht,_n(()=>{if(ne&&document.activeElement===ne){const Jt=Ae+Je;ne.setSelectionRange(Jt,Jt)}})}else if(L.value.length>0){const Je=L.value.slice(0,-1);L.value=Je,_n(()=>{if(ne&&document.activeElement===ne){const ht=Dc(a.value,t,l.value)+Je.length;ne.setSelectionRange(ht,ht)}})}else{const Je=l.value-1;if(Je>=0){const ht=a.value[Je];ht.value=ht.value.slice(0,-1),w(Je)}}},V=()=>{T();const L=a.value[l.value];L.value.length===1&&L.maxLength===2&&(L.value=L.value.padStart(2,"0"));const{isValid:ne,error:we}=OF(L,a.value,n);ne?R():(L.hasError=!0,L.errorMessage=we,s&&s(L))},ie=L=>{const ne=L.key,we=/^\d$/.test(ne);if(!((L.metaKey||L.ctrlKey||L.altKey)&&(ne==="a"||ne==="c"||ne==="v"||ne==="x"))){if(we){L.preventDefault(),A(ne);return}switch(ne){case"Backspace":L.preventDefault(),_();break;case"ArrowLeft":L.preventDefault(),x();break;case"ArrowRight":L.preventDefault(),R();break;case"/":case"-":case".":case" ":case":":L.preventDefault(),V();break;case"Tab":break;default:L.preventDefault();break}}},me=L=>{const ne=L.target,we=ne.selectionStart||0,Ae=c3(a.value,t,we);l.value=Ae,ne.selectionStart===ne.selectionEnd&&w(Ae)},Te=L=>{const ne=L.target;u.value={start:ne.selectionStart??0,end:ne.selectionEnd??0}},q=()=>{a.value.forEach(L=>{L.value="",L.hasError=!1,L.errorMessage=""}),w(0)},z=L=>{let ne;L instanceof Date?ne=Ue.fromJSDate(L,{zone:n}):ne=L.setZone(n),ne.isValid&&a.value.forEach(we=>{we.type==="day"&&(we.value=String(ne.day).padStart(2,"0")),we.type==="month"&&(we.value=String(ne.month).padStart(2,"0")),we.type==="year"&&(we.value=String(ne.year)),we.type==="hour"&&(we.value=String(ne.hour).padStart(2,"0")),we.type==="minute"&&(we.value=String(ne.minute).padStart(2,"0"))})},M=()=>S.value.isValid?S.value.date:null;return EM(()=>{const L=e.inputRef.value;L&&document.activeElement!==L&&(L.value=c.value)}),Si(()=>{_n(()=>{var L,ne,we;(L=e.inputRef.value)==null||L.addEventListener("keydown",ie),(ne=e.inputRef.value)==null||ne.addEventListener("select",Te),(we=e.inputRef.value)==null||we.addEventListener("click",me)})}),Ya(()=>{var L,ne,we;(L=e.inputRef.value)==null||L.removeEventListener("keydown",ie),(ne=e.inputRef.value)==null||ne.removeEventListener("select",Te),(we=e.inputRef.value)==null||we.removeEventListener("click",me)}),{inputValue:c,isValid:D,isComplete:b,day:h,month:p,year:g,hour:C,minute:v,segments:a,clear:q,setDate:z,getDate:M}}const f3=["value","placeholder"],MF=St(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:""}},emits:["complete","invalid","clear"],setup(e,{expose:t,emit:n}){const i=ui,s=e,o=n,r=fe(null),a=fe(null),{isValid:l,isComplete:u,inputValue:c,clear:d,setDate:h,getDate:p}=h3({format:s.format,allowPastDates:s.allowPastDates,allowFutureDates:s.allowFutureDates,onComplete:D=>o("complete",D),onInvalid:D=>o("invalid",D.type),inputRef:r,timezone:s.timezone}),g=W(()=>!!s.active),C=W(()=>({componentType:void 0,disabled:!1,error:!1,readOnly:!1,isEmpty:c.value.length===0,inputRef:r,wrapperRef:a})),{isHover:v,isFocus:b}=nr(C),S=()=>{d(),o("clear")};return t({clear:S,setDate:h,getDate:p,focus:()=>{var D;return(D=r.value)==null?void 0:D.focus()}}),Dt(()=>s.modelValue,D=>{D?h(D):d()},{immediate:!0}),W(()=>{const D=p();return D?sa({date:D,timezone:s.timezone||"local",format:s.format||"dd/MM/yyyy"}):s.placeholder||""}),(D,w)=>{var R;return X(),ye("div",{ref_key:"wrapperRef",ref:a,class:Kt(["date-input-wrapper",{focus:le(b),hover:le(v),active:g.value}])},[Ee(ot,{src:"Calendar",source:"remote",size:"16",class:"icon-calendar",color:"var(--primary-color)"}),Pe("input",{ref_key:"inputRef",ref:r,type:"text",value:le(c),placeholder:(R=s.format)==null?void 0:R.toLocaleUpperCase(),class:Kt([{valid:le(l)&&le(u),invalid:!le(l)&&le(c)},"date-input"])},null,10,f3),ut((X(),tt(gt,{variant:["icon","tertiary","danger"],size:16,onClick:qt(S,["stop"])},{default:ke(()=>[Ee(ot,{src:"Xmark",source:"remote",size:"10"})]),_:1})),[[le(i),"Clear"]])],2)}}}),[["__scopeId","data-v-a75b63c0"]]),p3={class:"calendar-wrapper"},g3={class:"calendar-input-section"},m3=ct({__name:"Calendar",props:{params:{},label:{},value:{},timezone:{default:Ev()},format:{default:"LLL dd"},placeholder:{},enableRangeFeedback:{type:Boolean},messages:{},isCompleted:{type:Boolean},isStarted:{type:Boolean},disabled:{type:Boolean},readOnly:{type:Boolean},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=fe({case:"",behavior:""}),s=e,o=n,r=(Te,q)=>{var z,M;Te(),(M=(z=s.params)==null?void 0:z.api)==null||M.stopEditing(),_n(()=>{q()})},a=(Te,q)=>{var z,M;Te(),(M=(z=s.params)==null?void 0:z.api)==null||M.stopEditing(),_n(()=>{q()})},{states:l,selectEndDate:u,cancelSelection:c,confirmSelection:d,selectStartDate:h,beginInteraction:p,clearStart:g,clearDue:C}=RU(s,o,i),v=W(()=>{if(l.isSelectingStart)return"start";if(l.isSelectingEnd)return"end"}),b=()=>{g()},S=()=>{C()},D=()=>{T()},w=W(()=>l.isSelectingStart||l.isSelectingEnd);function R(){s.disabled||s.readOnly||(p(),l.isSelectingStart=!0,l.isSelectingEnd=!1)}function x(){s.disabled||s.readOnly||(p(),l.isSelectingEnd=!0,l.isSelectingStart=!1)}function T(){l.isSelectingStart=!1,l.isSelectingEnd=!1}function H(Te){Te.key==="Escape"&&(Te.stopPropagation(),T())}const N=fe(new Date().getFullYear()),A=fe(new Date().getMonth()+1);Dt(()=>[l.isSelectingStart,l.isSelectingEnd,l.startDate,l.endDate],()=>{l.isSelectingStart&&l.startDate?(N.value=l.startDate.getFullYear(),A.value=l.startDate.getMonth()+1):l.isSelectingEnd&&l.endDate&&(N.value=l.endDate.getFullYear(),A.value=l.endDate.getMonth()+1)},{immediate:!0});const _=fe(null);function V(){if(Array.isArray(s.value)){const[q,z]=s.value;l.startDate=q||null,l.endDate=z||null}l.isSelectingStart=!1,l.isSelectingEnd=!1;const Te=l.startDate||l.endDate||new Date;N.value=Te.getFullYear(),A.value=Te.getMonth()+1}Dt(()=>{var Te,q,z,M,L,ne,we,Ae;return[((z=(q=(Te=s.value)==null?void 0:Te[0])==null?void 0:q.getTime)==null?void 0:z.call(q))||((M=s.value)==null?void 0:M[0]),((we=(ne=(L=s.value)==null?void 0:L[1])==null?void 0:ne.getTime)==null?void 0:we.call(ne))||((Ae=s.value)==null?void 0:Ae[1]),s.timezone,s.format,s.placeholder,s.enableRangeFeedback]},()=>{V()},{immediate:!0,deep:!0}),t({resetCalendarLogic:V,openStart:R,openEnd:x,closePicker:T,clearAll:D,isOpen:w,drpRef:_,getValues:()=>({startDate:l.startDate,endDate:l.endDate,dateRange:[l.startDate,l.endDate]})});const me=fe(null);return Dt(()=>w.value,Te=>{if(s.disabled||s.readOnly)return;const q=me.value;q&&(Te?q.show():q.hide())},{immediate:!0}),(Te,q)=>(X(),ye("div",p3,[Ee(o3,{year:N.value,"onUpdate:year":q[4]||(q[4]=z=>N.value=z),month:A.value,"onUpdate:month":q[5]||(q[5]=z=>A.value=z),locale:s.locale,onKeydown:H},{selection:ke(()=>[Pe("div",g3,[Ee(MF,{"model-value":le(l).startDate,placeholder:s.startPlaceholder,timezone:s.timezone,active:le(l).isSelectingStart,onClick:R,onClear:b},null,8,["model-value","placeholder","timezone","active"]),Ee(MF,{"model-value":le(l).endDate,placeholder:s.duePlaceholder,timezone:s.timezone,active:le(l).isSelectingEnd,onClick:x,onClear:S},null,8,["model-value","placeholder","timezone","active"])])]),default:ke(({year:z,month:M})=>[Ee(q4,{ref_key:"drpRef",ref:_,"tracing-case":i.value,"onUpdate:tracingCase":q[0]||(q[0]=L=>i.value=L),year:z,month:M,"start-date":le(l).startDate,"end-date":le(l).endDate,"active-field":v.value,timezone:s.timezone,immediatelyUpdate:e.immediatelyUpdate,onSelectStart:le(h),onSelectEnd:le(u),onConfirm:q[1]||(q[1]=L=>r(le(d),T)),onCancel:q[2]||(q[2]=L=>a(le(c),T)),onClose:q[3]||(q[3]=L=>r(le(d),T))},null,8,["tracing-case","year","month","start-date","end-date","active-field","timezone","immediatelyUpdate","onSelectStart","onSelectEnd"])]),_:1},8,["year","month","locale"])]))}}),LF=St(m3,[["__scopeId","data-v-783da72e"]]),v3=ct({__name:"DateUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{}},emits:["updated"],setup(e,{emit:t}){const n=t,i=e,s=Ei("bulkUpdate",!1),{apiServices:o}=Ns(!s,i),r=l=>{var c,d;const u={workspaceId:i.workspaceId,itemIds:i.ids,startDate:l.start?aF(l.start):null,dueDate:l.end?aF(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]})})};Dt(()=>i.ids,l=>{a.value=[null,null]});const a=fe([null,null]);return(l,u)=>(X(),tt(IF,{placement:"top"},{trigger:ke(()=>[Ee(gt,{class:"action-button",variant:i.variant},{default:ke(()=>[Ee(ot,{src:"Calendar",class:"icon",size:"14"}),u[0]||(u[0]=wt(" Date ",-1))]),_:1},8,["variant"])]),content:ke(()=>[Ee(LF,{immediatelyUpdate:!1,value:a.value,onConfirmed:r,ref:"calendarRef"},null,8,["value"])]),_:1}))}}),C3=ct({__name:"MetricUpdateButton",props:{variant:{}},setup(e){const t=fe([{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}=bo();return(o,r)=>(X(),ye("div",null,[Ee(gt,{class:"action-button",variant:n.variant,ref_key:"triggerRef",ref:s},{default:ke(()=>[Ee(ot,{src:"SquareRootVariable",class:"icon",size:"14"}),r[0]||(r[0]=wt(" Metric ",-1))]),_:1},8,["variant"]),Pe("div",{ref_key:"popupRef",ref:i,style:{display:"none"}},[Ee(Ov,{options:t.value,"selected-id":void 0},null,8,["options"])],512)]))}}),NF=St(ct({__name:"StatusEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},dataFetching:{type:Function},id:{},params:{},workspaceId:{},entityId:{},ids:{}},emits:["updated","error"],setup(e,{expose:t,emit:n}){const i={PER_PAGE:50,INITIAL_PAGE:1},s=e,o=n,r=NU("status"),a=fe([]),l=fe(!1),u=fe(!1),c=fe(null),d=fe(i.INITIAL_PAGE),h=fe(!0),p=fe(0),g=fe(""),C=W(()=>{var A;return(A=s.value)==null?void 0:A.id}),v=W(()=>!!(s.id||s.ids&&s.ids.length>0)),b=A=>({label:A.name,value:A.id,selected:C.value===A.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:A,id:A.id,color:A.color}),S=W(()=>{const A=new Set;return s.id&&A.add(String(s.id)),s.ids&&s.ids.forEach(_=>{_&&A.add(String(_))}),Array.from(A)}),D=Ei("bulkUpdate",!1),{apiServices:w}=Ns(!D,s),R=async(A=i.INITIAL_PAGE,_="",V=!1)=>{var ie,me,Te;if(!v.value){console.error("Missing required props",s);return}V?u.value=!0:l.value=!0,c.value=null;try{const q={workspaceId:String(s.workspaceId),itemIds:S.value,page:A,perPage:i.PER_PAGE,name_like:_.trim()};if(((ie=w.value)==null?void 0:ie.getAssignableStatus)===void 0)throw new Error("API service getAssignableStatus is undefined");const z=await((me=w.value)==null?void 0:me.getAssignableStatus(q));if(!(z!=null&&z.data)){V||(a.value=[]),h.value=!1;return}const M=z.data.map(b);a.value=V?[...a.value,...M]:M,p.value=((Te=z.meta)==null?void 0:Te.total)??z.data.length,h.value=a.value.length<p.value,d.value=A}catch(q){console.error("Error fetching statuses:",q),c.value="Failed to load statuses",V||(a.value=[]),h.value=!1,o("error",c.value)}finally{l.value=!1,u.value=!1}},x=ic(A=>{g.value=A,d.value=i.INITIAL_PAGE,R(i.INITIAL_PAGE,A,!1)},Fl),T=()=>{!h.value||u.value||R(d.value+1,g.value,!0)},H=async A=>{var _,V,ie;if(!v.value){console.error("Missing required props for updating status",s);return}try{const me=await w.value.updateItemStatus({workspaceId:String(s.workspaceId),itemIds:S.value,statusId:String(A.value)});if(!(me!=null&&me.message))throw new Error("API did not return success");s.params&&((V=s.params)==null||V.node.setData({...(_=s.params)==null?void 0:_.node.data,status:{id:A.id,name:A.label,color:A.color}}),(ie=s.params)==null||ie.api.stopEditing()),o("updated",{workspaceId:String(s.workspaceId),itemIds:S.value,data:{id:A.id,name:A.label,color:A.color}})}catch(me){console.error("Error updating status:",me),c.value="Failed to update status",o("error",c.value)}},N=kU(W(()=>a.value),A=>({id:r(A.id||""),...A}));return Dt([()=>s.id,()=>s.workspaceId,()=>s.ids],()=>{R()},{deep:!0,immediate:!0}),t({refresh:()=>R(i.INITIAL_PAGE,g.value,!1),loadMore:T}),(A,_)=>{var V;return X(),tt(Ov,gn(s,{"selected-id":(V=s.value)==null?void 0:V.id,options:le(N),loading:l.value,"loading-more":u.value,"has-more":h.value,error:c.value,onSearch:le(x),onSelect:H,onLoadMore:T}),null,16,["selected-id","options","loading","loading-more","has-more","error","onSearch"])}}}),[["__scopeId","data-v-694058b8"]]),w3=ct({__name:"StatusUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{}},emits:["updated"],setup(e,{emit:t}){const n=e,i=W(()=>{const d=Vi();return d==null?void 0:d.appContext.config.globalProperties.apiServices}),{popupRef:s,triggerRef:o,isVisible:r,hide:a}=bo(),l=t,u=d=>{l("updated",d),a()},c=W(()=>({apiServices:i.value,ids:n.ids,workspaceId:n.workspaceId,entityId:n.entityId}));return Wr("bulkUpdate",!0),(d,h)=>(X(),ye("div",null,[Ee(gt,{ref_key:"triggerRef",ref:o,variant:e.variant},{default:ke(()=>[Ee(ot,{src:"Square",class:"icon",size:"14"}),h[0]||(h[0]=wt(" Status ",-1))]),_:1},8,["variant"]),Pe("div",{ref_key:"popupRef",ref:s},[le(r)?(X(),tt(NF,gn({key:0},c.value,{onUpdated:u}),null,16)):at("",!0)],512)]))}}),y3={class:"bulk-update-action"},b3={class:"left-actions"},S3={class:"selected-count"},E3=St(ct({__name:"BulkUpdate",props:{selectRowData:{},workspaceId:{},entityId:{},gridApi:{}},emits:["close","assignStatus","assignAssignee","assignDate","assignMetric","moreActions","deleteSelected","unselect"],setup(e,{emit:t}){const n=e,i=t,s=W(()=>n.selectRowData.map(w=>w.id)),{popupRef:o,triggerRef:r}=bo();Wr("bulkUpdate",!0);const a=({itemIds:w,data:R})=>{const x=n.gridApi;w.forEach(T=>{if(!x){console.error("Grid API is undefined");return}const H=x.getRowNode(T);if(H){const N={...H.data,status:R};H.setData(N)}})},l=({itemIds:w,data:R})=>{const x=n.gridApi;w.forEach(T=>{if(!x){console.error("Grid API is undefined");return}const H=x.getRowNode(T);if(H){const N={...H.data,dateRange:R};H.setData(N)}})},u=["primary"],c=[{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}],d=()=>{i("unselect")},h=()=>{const R=`https://review.dev.arbocollab.com/w:yngazem?scene_ids=${n.selectRowData.map(x=>x.id).join(",")}`;window.open(R,"_blank")},p=w=>{const{assignees:R,type:x}=w,T=n.gridApi;if(!T){console.error("Grid API is not available for bulk update.");return}n.selectRowData.map(N=>{const A=T.getRowNode(N.id);if(!A)return null;const _=A.data.assignees||[];let V=[];switch(x){case"add":{const ie=new Set(_.map(Te=>Te.id)),me=R.filter(Te=>!ie.has(Te.id));V=[..._,...me];break}case"overwrite":{V=R;break}case"remove":{const ie=new Set(R.map(me=>me.id));V=_.filter(me=>!ie.has(me.id));break}case"removeAll":{V=[];break}}return{...A.data,assignees:V}}).filter(N=>N!==null).forEach(N=>{const A=T.getRowNode(N.id);A&&A.setData(N)})},{apiServices:g}=Ns(!1,n),C=async()=>{var x;const w=n.selectRowData.map(T=>T.id),R=n.gridApi;if(!R){console.error("Grid API is not available for bulk delete.");return}await((x=g.value)==null?void 0:x.bulkDeleteItems(String(n.workspaceId),w)),w.forEach(T=>{const H=R.getRowNode(T);if(H){const N={...H.data,isDeleted:!0,disabled:!0};H.setData(N)}})},v=async()=>{var x;const w=n.selectRowData.map(T=>T.id),R=n.gridApi;if(!R){console.error("Grid API is not available for bulk archive.");return}await((x=g.value)==null?void 0:x.bulkArchiveItems(String(n.workspaceId),w)),w.forEach(T=>{const H=R.getRowNode(T);if(H){const N={...H.data,isArchived:!0};H.setData(N)}})},b=async()=>{var x;const w=n.selectRowData.map(T=>T.id),R=n.gridApi;if(!R){console.error("Grid API is not available for bulk thumbnail deletion.");return}await((x=g.value)==null?void 0:x.deleteThumbnail(String(n.workspaceId),w)),w.forEach(T=>{const H=R.getRowNode(T);if(H){const N={...H.data,thumbnail:null};H.setData(N)}})},S=async()=>{var x;const w=n.selectRowData.map(T=>T.id),R=n.gridApi;if(!R){console.error("Grid API is not available for bulk rendition deletion.");return}await((x=g.value)==null?void 0:x.deleteRendition(String(n.workspaceId),w)),w.forEach(T=>{const H=R.getRowNode(T);if(H){const N={...H.data,rendition:null};H.setData(N)}})},D=w=>{w.id==="delete"?C():w.id==="archive"?v():w.id==="delete-thumbnail"?b():w.id==="delete-rendition"&&S()};return(w,R)=>{const x=Nu("tooltip");return ut((X(),ye("div",y3,[Pe("div",b3,[Pe("div",{class:"selection-track",ref_key:"triggerRef",ref:r},[Ee(gt,{variant:["icon","tertiary"],onClick:d},{default:ke(()=>[Ee(ot,{src:"XMarkSolid",source:"remote",size:"10"})]),_:1}),Pe("span",S3,mt(e.selectRowData.length)+" selected",1),R[0]||(R[0]=Pe("span",{class:"divider"},null,-1))],512),Pe("div",{ref_key:"popupRef",ref:o,class:"selected-list"},[(X(!0),ye(Ft,null,An(e.selectRowData,T=>(X(),ye("div",{key:T.id},mt(T.name),1))),128))],512),Ee(w3,{ids:s.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:u,onUpdated:a},null,8,["ids","workspace-id","entity-id"]),Ee(W4,{onUpdate:p,ids:s.value,"workspace-id":e.workspaceId,variant:u,"entity-id":e.entityId},null,8,["ids","workspace-id","entity-id"]),Ee(v3,{ids:s.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:u,onUpdated:l},null,8,["ids","workspace-id","entity-id"]),Ee(C3,{variant:u}),R[1]||(R[1]=Pe("span",{class:"divider"},null,-1)),ut((X(),tt(gt,{class:"action-button",variant:[...u,"icon"],onClick:h},{default:ke(()=>[Ee(ot,{src:"PenRuler",class:"icon-btn",size:"14"})]),_:1},8,["variant"])),[[x,{content:"Open in Review"}]]),R[2]||(R[2]=Pe("span",{class:"divider"},null,-1)),Ee(IF,{placement:"top-end"},{trigger:ke(()=>[ut((X(),tt(gt,{class:"action-button",variant:[...u,"icon"]},{default:ke(()=>[Ee(ot,{src:"EllipsisVertical",class:"icon",source:"remote",size:"14"})]),_:1},8,["variant"])),[[x,{content:"More actions"}]])]),content:ke(()=>[(X(),ye(Ft,null,An(c,T=>Ee(kv,gn({key:T.id,selected:!1},{ref_for:!0},T,{onSelect:()=>D(T)}),null,16,["onSelect"])),64))]),_:1})])],512)),[[Ur,e.selectRowData.length>0]])}}}),[["__scopeId","data-v-52269f9f"]]),Tl=St(ct({__name:"DisplayWrapper",props:{prefix:{},suffix:{},showStates:{},inputType:{},isreadOnly:{type:Boolean},isDisabled:{type:Boolean},isHovered:{type:Boolean},isFocused:{type:Boolean},isError:{type:Boolean},isActive:{type:Boolean},clickable:{type:Boolean}},emits:["event"],setup(e,{expose:t,emit:n}){const i=e,s=ah(),o=fe(null),r=fe("default"),a=W(()=>{let u=0,c=0;return s.prefix&&(u=s.prefix({}).length),s.suffix&&(c=s.suffix({}).length),u&&!c?`repeat(${u}, var(--icon-size)) calc(100% - ${u} * var(--icon-size) - 8px )`:!u&&c?`calc(100% - ${c} * var(--icon-size) - 8px ) repeat(${c}, var(--icon-size))`:u&&c?`repeat(${u}, var(--icon-size)) calc(100% - ${u} * var(--icon-size) - ${c} * var(--icon-size) - 16px ) repeat(${c}, var(--icon-size))`:"auto"}),l=u=>{r.value=u};return t({rootEl:o,updateState:l,componentState:r}),(u,c)=>(X(),ye("div",{ref_key:"rootEl",ref:o,class:Kt(["display-wrapper",{readOnly:i.isreadOnly,disabled:i.isDisabled,hovered:i.isHovered,focused:i.isFocused,error:i.isError,active:i.isActive,clickable:i.clickable}]),style:Dn({"--grid-template":a.value})},[Rt(u.$slots,"prefix",{},void 0,!0),Rt(u.$slots,"default",{updateComponentState:l,showStates:i.showStates,disabled:i.isDisabled},void 0,!0),Rt(u.$slots,"suffix",{},void 0,!0)],6))}}),[["__scopeId","data-v-8b2472ed"]]),R3=St(ct({__name:"LabelRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},dataFetching:{type:Function},id:{},params:{},workspaceId:{},entityId:{}},setup(e){const t=ir,n=e,i=W(()=>({disabled:n.disabled,error:!1,readOnly:n.readOnly,isEmpty:n.value===void 0||n.value===null||n.value==="",clickable:!0})),{argsMain:s}=nr(i),o=W(()=>{var a,l,u;return!!((a=n.params)!=null&&a.api||(l=n.params)!=null&&l.node||(u=n.params)!=null&&u.context)}),r=W(()=>n.value===void 0);return(a,l)=>ut((X(),tt(Tl,gn(le(s),{class:"item-table-label-renderer"}),{default:ke(()=>[wt(mt(n.value),1)]),_:1},16)),[[le(t),{isLoading:r.value||!o.value}]])}}),[["__scopeId","data-v-7c50cd2c"]]),D3={class:"scene-name-display"},F3=["href"],x3={key:0,class:"icon-processing"},T3={key:1,class:"icon-processing"},P3=["id","placeholder"],VF=St(ct({__name:"SceneNameEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},dataFetching:{},id:{},params:{},workspaceId:{},entityId:{},placeholder:{default:"Enter name"}},emits:["update:value","enter","blur"],setup(e,{emit:t}){const n=ir,i=e,s=t,o=fe(i.value),r=fe(i.value);Dt(()=>i.value,A=>{o.value=A,r.value=A});const a=fe(null),l=fe(null),u=W(()=>{var A;return{componentType:void 0,disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:((A=o==null?void 0:o.value)==null?void 0:A.length)===0,inputRef:a,wrapperRef:l,clickable:!0}}),{argsMain:c,isHover:d,isFocus:h,handleFocus:p}=nr(u),g=W(()=>oF("timezone")||"Asia/Tokyo"),C=Ei("bulkUpdate",!1),{apiServices:v}=Ns(!C,i),b=async()=>{var A,_,V;h.value=!1;try{const ie=await((_=(A=v.value)==null?void 0:A.updateSceneName)==null?void 0:_.call(A,{workspaceId:i.workspaceId,entityId:i.entityId,itemId:i.id,name:o.value}));if(ie){const me=DF(ie,sa,g.value),Te={...i.data,...me};(V=i.params)==null||V.node.setData(Te),r.value=o.value,s("enter")}else o.value=r.value}catch(ie){console.error("Failed to update scene name:",ie),o.value=r.value}},S=()=>{h.value=!1,o.value=r.value,s("blur")},D=A=>{A.key==="Enter"?(A.preventDefault(),b()):A.key==="Escape"&&(A.preventDefault(),S())},w=()=>{r.value=o.value,p()},R=W(()=>`${sessionStorage.getItem("BASE_URL")||"https://app.dev.arbocollab.com/"}/st/${i.workspaceId}/${i.id}`),x={focus:()=>{h.value=!0,setTimeout(()=>{var A;return(A=a.value)==null?void 0:A.focus()},0)},blur:()=>{var A;return(A=a.value)==null?void 0:A.blur()},getValue:()=>o.value,setValue:A=>{o.value=A,r.value=A},getLink:()=>R.value,update:()=>b(),cancel:()=>S()};Si(()=>{const A=l.value.$el;A&&(A.__sceneNameEditor=x)}),hs(()=>{const A=l.value;A&&delete A.__sceneNameEditor});const T=W(()=>{var A;return((A=i.data)==null?void 0:A.isDeleted)==!0}),H=W(()=>{var A;return((A=i.data)==null?void 0:A.isArchived)==1}),N=W(()=>i.value===void 0);return(A,_)=>ut((X(),tt(le(Tl),gn(le(c),{ref_key:"wrapperRef",ref:l,id:`scene-name-${i.id}`}),oS({default:ke(()=>[ut(Pe("div",D3,[Pe("a",{href:R.value,target:"_blank",class:"scene-name-text"},mt(o.value),9,F3),T.value?(X(),ye("div",x3,[Ee(le(ot),{src:"AnimatedHourglass",size:"14"})])):at("",!0),H.value?(X(),ye("div",T3,[Ee(le(ot),{src:"BoxArchive",size:"14"})])):at("",!0)],512),[[Ur,!le(h)]]),ut(Pe("input",{id:`scene-name-editor-${e.id}`,ref_key:"inputRef",ref:a,"onUpdate:modelValue":_[0]||(_[0]=V=>o.value=V),class:"scene-name-editor",type:"text",placeholder:e.placeholder,onKeydown:D,onBlur:S},null,40,P3),[[Ur,le(h)],[GL,o.value]])]),_:2},[!e.disabled&&!e.readOnly?{name:"suffix",fn:ke(()=>[le(d)&&!le(h)?(X(),tt(le(gt),{key:0,variant:["icon","secondary"],size:24,onClick:qt(w,["prevent","stop"])},{default:ke(()=>[Ee(le(ot),{src:"Pen",source:"remote",size:"14"})]),_:1})):le(h)?(X(),tt(le(gt),{key:1,variant:["icon","tertiary","danger"],size:24,onClick:qt(S,["prevent","stop"]),title:"Cancel (Esc)"},{default:ke(()=>[Ee(le(ot),{src:"Xmark",source:"remote",size:"14"})]),_:1})):at("",!0)]),key:"0"}:void 0]),1040,["id"])),[[le(n),{isLoading:N.value}]])}}),[["__scopeId","data-v-8d1b70c3"]]),A3={class:"dropdown-list"},I3={key:0,class:"empty-list"},BF=St(ct({__name:"OptionList",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},dataFetching:{type:Function},id:{},params:{},workspaceId:{},entityId:{},options:{}},emits:["select"],setup(e,{emit:t}){const n=t;function i(s){n("select",s)}return(s,o)=>(X(),ye("div",A3,[(X(!0),ye(Ft,null,An(e.options,r=>(X(),tt(kv,gn({key:r.value},{ref_for:!0},{...r},{"icon-name":r.iconName,onClick:qt(a=>i(r.value),["stop","prevent"])}),{label:ke(()=>[wt(mt(r.label),1)]),_:2},1040,["icon-name","onClick"]))),128)),e.options.length==0?(X(),ye("div",I3," No options available. ")):at("",!0)]))}}),[["__scopeId","data-v-9c5e8ee3"]]),_3={class:"button-dropdown-wrapper"},k3={class:"button-group"},O3={class:"overflow-elipsis"},Mv=St(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=ui,i=e,s=W(()=>{let h=[];return typeof i.variant=="string"?h.push(i.variant):Array.isArray(i.variant)&&(h=[...i.variant]),[...h,"icon"]}),o=t,{hide:r,triggerRef:a,popupRef:l}=bo({placement:i.placement});function u(h){o("select",h),r()}const c=!!ah().trigger,d=()=>{i.disabled||i.readOnly||o("handleClick")};return(h,p)=>(X(),ye("div",_3,[Pe("div",k3,[e.label||c?(X(),tt(gt,{key:0,disabled:i.disabled,variant:e.variant,onClick:d,size:e.size,readOnly:i.readOnly},{default:ke(()=>[Rt(h.$slots,"trigger",{},()=>[ut((X(),ye("span",O3,[wt(mt(e.label),1)])),[[le(n),{content:e.label,trigger:"mouseenter focus"}]])],!0)]),_:3},8,["disabled","variant","size","readOnly"])):at("",!0),!i.disabled&&!i.readOnly?(X(),tt(gt,{key:1,ref_key:"triggerRef",ref:a,class:"button-dropdown-trigger",variant:s.value,size:e.size,onClick:d},{default:ke(()=>[Rt(h.$slots,"dropdownIcon",{},()=>[Ee(ot,{src:"ChevronDown",source:"remote",size:"16"})],!0)]),_:3},8,["variant","size"])):at("",!0)]),Pe("div",{ref_key:"popupRef",ref:l,class:"button-dropdown-list"},[Ee(BF,{options:e.options,onSelect:u},null,8,["options"])],512)]))}}),[["__scopeId","data-v-7e9cad9a"]]),M3={class:"input-wrapper"},L3=["value","placeholder"],N3=St(ct({__name:"InputText",props:{modelValue:{default:""},placeholder:{default:"Input value ..."},isFocused:{type:Boolean,default:!1},validatorFnc:{}},emits:["update:modelValue","search","clear","enter"],setup(e,{expose:t,emit:n}){const i=xv,s=e,o=n,r=fe(null),a=W(()=>s.modelValue.length>0),l=C=>{const v=C.target;o("update:modelValue",v.value),C.stopPropagation(),o("search",v.value)},u=()=>{o("update:modelValue",""),o("clear"),_n(()=>{var C;(C=r.value)==null||C.focus()})},c=C=>{C.key==="Escape"&&a.value&&u(),C.key==="Enter"&&(C.preventDefault(),C.stopImmediatePropagation(),C.stopPropagation(),o("search",s.modelValue),o("enter",s.modelValue))},d=`input-text-${Math.random().toString(36).substr(2,9)}`,h=ah().suffix,p=W(()=>!!h),g=fe(!1);return Dt(()=>s.modelValue,C=>{s.validatorFnc?g.value=!s.validatorFnc(C):g.value=!1}),t({focus:()=>{var C;console.log("Focusing input text:",r.value),(C=r.value)==null||C.focus()}}),(C,v)=>{const b=Nu("tooltip");return X(),ye("div",M3,[Pe("div",{class:Kt(["input-box",{"has-suffix":p.value,"has-value":a.value,focused:e.isFocused,"is-error":g.value}])},[Pe("input",{ref_key:"searchInput",ref:r,type:"text",value:e.modelValue,placeholder:e.placeholder,class:"column-config__input",id:d,onInput:l,onKeypress:c},null,40,L3),Rt(C.$slots,"suffix",{},void 0,!0),Rt(C.$slots,"clear",{},()=>[a.value?ut((X(),tt(gt,{key:0,variant:["icon"],"aria-label":"Clear search",onClick:qt(u,["stop"]),size:16,rounded:!0},{default:ke(()=>[Ee(ot,{class:"cs-icon",src:"XMarkSolid",size:"8"})]),_:1})),[[le(i)],[b,{content:"Clear",contentClass:"extra-padding"}]]):at("",!0)],!0)],2),g.value?Rt(C.$slots,"error",{key:0},void 0,!0):at("",!0)])}}}),[["__scopeId","data-v-680f0e1e"]]),V3={class:"ib-assignee-group-renderer",role:"group"},B3={key:1,class:"extra-avatars"},H3=St(ct({__name:"AssigneeGroupRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},dataFetching:{},id:{},params:{},workspaceId:{},entityId:{},error:{type:Boolean},maxVisible:{default:4}},setup(e){const t=ui,n=ir,i=SF,s=e,o=fe(s.value),r=fe(null),a=fe(null),l=W(()=>({disabled:s.disabled,readOnly:s.readOnly,error:s.error,inputRef:r,wrapperRef:a,clickable:!0})),{argsMain:u,isHover:c}=nr(l);Dt(()=>s.value,w=>{o.value=w},{immediate:!0,deep:!0});const d=W(()=>{var w;return((w=o.value)==null?void 0:w.slice(0,s.maxVisible))||[]}),h=W(()=>{var w;return Math.max(0,(((w=o.value)==null?void 0:w.length)||0)-s.maxVisible)}),p=W(()=>{var w;return h.value>0&&((w=o.value)==null?void 0:w.slice(s.maxVisible).map(R=>R.name).join(", "))||""}),g=W(()=>d.value.map(w=>({id:w.id,name:w.name,initial:w.initial,avatarId:w.id,profile_image:w.profile_image,color:w.color,size:24,user:w}))),C=W(()=>s.value===void 0),v=W(()=>({color:c.value?"var(--primary-color)":"var(--bg-inactive-color)",display:"flex",alignItems:"center",marginLeft:"4px"})),b=W(()=>lf()),{apiServices:S}=Ns(!0,s),D=async w=>{var T;const R=s.workspaceId;return await((T=S.value)==null?void 0:T.getUserInformation(R,w))??void 0};return(w,R)=>ut((X(),tt(Tl,gn(le(u),{"aria-label":"Assignee group"}),{default:ke(()=>{var x;return[Pe("div",V3,[(x=o.value)!=null&&x.length?at("",!0):(X(),tt(ot,{key:0,src:"UserPlus",source:"remote",size:16,style:Dn(v.value)},null,8,["style"])),(X(!0),ye(Ft,null,An(g.value,T=>ut((X(),ye("div",{class:"assignee-wrapper",key:T.id},[Ee(Th,{readOnly:!0,class:"ib-assignee-avatar",name:T.name,initial:T.initial,id:`assignee-avatar-${T.avatarId}`,profile_image:T.profile_image,color:T.color,size:T.size},null,8,["name","initial","id","profile_image","color","size"])])),[[le(i),{user:T.user,status:"online",timezone:b.value,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0,apiUpdateFunction:D}]])),128)),h.value>0?ut((X(),ye("div",B3,[wt(" +"+mt(h.value),1)])),[[le(t),p.value]]):at("",!0)])]}),_:1},16)),[[le(n),{isLoading:C.value}]])}}),[["__scopeId","data-v-1896ed78"]]),G3={key:0,class:"date-range-renderer"},W3=St(ct({__name:"DateRangeRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},dataFetching:{type:Function},id:{},params:{},workspaceId:{},entityId:{},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{}},setup(e){var S,D;const t=ui,n=ir,i=W(()=>r.value===void 0),s=fe(null),o=fe(null),r=e,a=W(()=>({disabled:r.disabled,error:!1,readOnly:r.readOnly,inputRef:s,wrapperRef:o,clickable:!0})),{argsMain:l}=nr(a),u=W(()=>{var w;return(w=r.data)==null?void 0:w.isStarted}),c=W(()=>{var w;return(w=r.data)==null?void 0:w.isCompleted}),d=w=>{if(w){if(typeof w=="string")return w;if(w instanceof Date)return w.toISOString()}},{startDate:h,endDate:p,startClasses:g,endClasses:C,fullStartDate:v,fullEndDate:b}=PU({start:d((S=r.value)==null?void 0:S[0]),end:d((D=r.value)==null?void 0:D[1]),isStarted:u.value,isEnded:c.value,timezone:Ev()});return(w,R)=>qS([r.value],()=>ut((X(),tt(Tl,gn(le(l),{ref_key:"wrapperRef",ref:o}),{default:ke(()=>[i.value?at("",!0):(X(),ye("div",G3,[ut((X(),ye("span",{class:Kt(["date-label-display",le(g)])},[wt(mt(le(h)),1)],2)),[[le(t),le(v)]]),Ee(ot,{src:"Calendar",size:"14",class:"calendar-icon",color:"var(--primary-color)"}),R[1]||(R[1]=Pe("span",null,"-",-1)),ut((X(),ye("span",{class:Kt(["date-label-display",le(C)])},[wt(mt(le(p)),1)],2)),[[le(t),le(b)]]),Ee(ot,{src:"Calendar",size:"14",class:"calendar-icon",color:"var(--primary-color)"})]))]),_:1},16)),[[le(n),{isLoading:i.value,fullwidth:!0}]]),R,0)}}),[["__scopeId","data-v-ac615d61"]]),z3=ct({__name:"DateRangeEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{default:void 0},data:{},dataFetching:{},id:{},params:{},workspaceId:{},entityId:{},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{default:Ev()}},setup(e){const t=fe(null),n=e,i=p=>`${Ue.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=Ei("bulkUpdate",!1),{apiServices:d}=Ns(!c,n),h=async p=>{var g,C,v,b,S;try{const D=(g=t.value)==null?void 0:g.getValues(),w=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}));w!=null&&w.message&&((S=n.params)==null||S.node.setData({...(b=n.params)==null?void 0:b.node.data,dateRange:D==null?void 0:D.dateRange}))}catch(D){console.error("Failed to update scene name:",D)}};return(p,g)=>(X(),tt(LF,gn(n,{onUpdate:s,"onUpdate:end":l,"onUpdate:start":a,onClearAll:u,onClearDue:r,onClearStart:o,ref_key:"calendarRef",ref:t}),null,16))}}),$3={class:"item-header"},U3={class:"item-header__left"},j3={class:"item-header__title"},K3={class:"item-header__actions"},q3={class:"footer"},Y3=St(ct({__name:"item-table-layout",props:{isSidebarOpen:{type:Boolean,default:!1}},emits:["close-sidebar","sidebar-clear","sidebar-apply"],setup(e,{emit:t}){const n=fe(null),i=fe(0);let s=null;Si(()=>{n.value&&(s=new ResizeObserver(r=>{for(const a of r)i.value=a.contentRect.height}),s.observe(n.value))}),Ya(()=>{s&&n.value&&s.unobserve(n.value)});const o=W(()=>{const r=i.value;return r>120?r-42-36:0});return(r,a)=>(X(),ye("div",{class:"item-table-wrapper",ref_key:"itemTableWrapperRef",ref:n},[Pe("div",$3,[Pe("div",U3,[Rt(r.$slots,"header-left",{},()=>[Pe("h1",j3,[Rt(r.$slots,"title",{},()=>[a[0]||(a[0]=wt("Items",-1))],!0)])],!0)]),a[1]||(a[1]=Pe("div",{class:"item-header__spacer"},null,-1)),Pe("div",K3,[Rt(r.$slots,"header-actions",{},void 0,!0)])]),Rt(r.$slots,"grid",{availableHeight:o.value},void 0,!0),Pe("div",q3,[Rt(r.$slots,"footer",{},void 0,!0)]),Rt(r.$slots,"new-row",{},void 0,!0),Rt(r.$slots,"bulk-update-actions",{},void 0,!0),Rt(r.$slots,"snackbar",{},void 0,!0)],512))}}),[["__scopeId","data-v-75fbda06"]]),Z3=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}]}],HF=St(ct({__name:"MoreOptionEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},dataFetching:{},id:{},params:{},workspaceId:{},entityId:{},optionBlock:{},isSubmenu:{type:Boolean,default:!1}},emits:["actionExecuted"],setup(e,{emit:t}){const n=e,i=W(()=>(n==null?void 0:n.workspaceId)||""),s=W(()=>(n==null?void 0:n.entityId)||""),o=S=>{const D=`scene-name-${n.id}`,w=document.getElementById(D);w.__sceneNameEditor&&w.__sceneNameEditor.focus()},{apiServices:r}=Ns(!0,n),{handleOpen:a,deleteRendition:l,deleteThumbnail:u,archiveItem:c,deleteItem:d,copyLink:h}=LU(i.value,s.value,String(n.id),r),p=S=>{var w,R;let D=(R=(w=n.params)==null?void 0:w.api)==null?void 0:R.getRowNode(String(n.id));if(D){const x={...D.data,isDeleted:S==="deleted",isArchived:S==="archived",disabled:!0};D.setData(x)}},g={update:S=>a(S,"update"),woohooDetails:S=>a(S,"woohoo"),openInArboReview:S=>a(S,"review_scene"),openSceneTile:S=>a(S,"scene_hub"),openReview:S=>a(S,"review"),deleteRendition:S=>l(S,p),deleteThumbnail:S=>u(S,p),archive:S=>c(S,p),deleteItem:S=>d(S,p),copyLink:S=>h(S),renameItem:S=>o()},C=W(()=>n.optionBlock||Z3(g)),v=t,b=S=>{var D,w;(w=(D=n==null?void 0:n.params)==null?void 0:D.api)==null||w.stopEditing(),v("actionExecuted",S)};return(S,D)=>(X(),ye("div",{class:Kt(["more-option-section",{submenu:e.isSubmenu}])},[(X(!0),ye(Ft,null,An(C.value,w=>(X(),ye("div",{key:w.groupLabel,class:Kt(["option-block",w.type]),style:Dn({"--g-number":Math.min(w.options.length,4)})},[(X(!0),ye(Ft,null,An(w.options,R=>(X(),ye("div",{key:R.label,class:"option-item"},[Ee(X3,{"scene-id":String(n.id),option:R,type:w.type,onActionExecuted:b},null,8,["scene-id","option","type"])]))),128))],6))),128))],2))}}),[["__scopeId","data-v-b72c0793"]]),J3={key:0},Q3={key:1,class:"confirm-action"},X3=St(ct({__name:"MoreOptionItem",props:{option:{},sceneId:{},type:{}},emits:["actionExecuted"],setup(e,{emit:t}){const n=ui,i=e,s=fe(!1),o=(D,w)=>{if(!w){d();return}const R=w.target;R.closest(".tippy-content")||R.closest(".tippy-box")||R.closest("[data-tippy-root]")||R.closest(".option-item")||d()},r=fe(null),{triggerRef:a,popupRef:l,show:u,isVisible:c,hide:d}=bo({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=D=>{var w,R;(R=(w=i.option).action)==null||R.call(w,D),h("actionExecuted",i.option),s.value=!1},g=D=>{var w,R;if(D.preventDefault(),D.stopPropagation(),i.option.isDanger){s.value=!s.value;return}if(!i.option.subMenu){(R=(w=i.option).action)==null||R.call(w,D),h("actionExecuted",i.option);return}_n(()=>{c.value?d():u()})},C=D=>{h("actionExecuted",D),d()},v=D=>{D.key==="Escape"?d():(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),g(D))},b=D=>({row:"small",column:"large",block:"small"})[D]||"large",S=D=>{const w=i.option.isDanger?["danger","tertiary"]:[];return{row:["secondary","icon",...w],column:["menu-item",...w],block:["secondary",...w]}[D]||[]};return(D,w)=>{var R;return X(),ye("div",{ref_key:"wrapperRef",ref:r,class:"option-item-wrapper"},[ut((X(),tt(gt,{ref_key:"triggerRef",ref:a,class:"option-item",disabled:e.option.disabled,active:le(c),size:b(e.type),variant:S(e.type),tabindex:"0",onClick:g,onKeydown:v},{prefix:ke(()=>[e.option.icon?ut((X(),tt(ot,{key:0,src:e.option.icon,source:"remote",size:"14"},null,8,["src"])),[[le(n),{content:e.option.label,delay:[500,0],contentClass:["extra-padding"]}]]):at("",!0)]),suffix:ke(()=>[e.option.subMenu?(X(),tt(ot,{key:0,src:"Play",source:"remote",size:"14"})):at("",!0),e.option.isDanger&&s.value?(X(),ye("div",Q3,[ut((X(),tt(gt,{variant:["secondary","icon"],size:"small",onClick:w[0]||(w[0]=qt(x=>s.value=!1,["stop","prevent"]))},{default:ke(()=>[Ee(ot,{src:"Xmark",source:"remote",size:"12"})]),_:1})),[[le(n),{content:"Cancel ",delay:[500,0],contentClass:["extra-padding"]}]]),ut((X(),tt(gt,{variant:["danger","primary","icon"],size:"small",onClick:qt(p,["stop","prevent"])},{default:ke(()=>[Ee(ot,{src:"Check",source:"remote",size:"12"})]),_:1})),[[le(n),{delay:[500,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])])):at("",!0)]),default:ke(()=>[e.option.label?(X(),ye("span",J3,mt(e.option.label),1)):at("",!0)]),_:1},8,["disabled","active","size","variant"])),[[le(n),{content:e.option.description||void 0,delay:[500,0],contentClass:["extra-padding"],theme:e.option.isDanger?"warning":"arbo"}]]),e.option.subMenu?(X(),ye("div",{key:0,ref_key:"popupRef",ref:l,class:"submenu-container"},[Ee(HF,{ref:"submenuRef","option-block":[((R=e.option)==null?void 0:R.subMenu)||[]],"is-submenu":!1,onActionExecuted:C},null,8,["option-block"])],512)):at("",!0)],512)}}}),[["__scopeId","data-v-83c0d016"]]),e6={class:"timestamp-render"},t6=St(ct({__name:"TimeStampRenderer",props:{value:{},timezone:{},format:{},tooltip:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=ui,n=e,i=W(()=>({disabled:n.disabled,readOnly:n.readOnly,clickable:!0})),{argsMain:s}=nr(i),o=W(()=>{if(!n.value)return"";let a=Ue.fromISO(n.value);return a.isValid?(n.timezone&&(a=a.setZone(n.timezone)),a.toFormat("MMM dd, yyyy | HH:mm")):"Invalid Date"}),r=W(()=>{if(!n.value)return"";let a=Ue.fromISO(n.value);return a.isValid?(n.timezone&&(a=a.setZone(n.timezone)),a.toFormat(n.format||"MMM dd")):"Invalid Date"});return(a,l)=>{const u=rh("DisplayWrapper");return X(),tt(u,gn({class:"timestamp-wrapper"},le(s)),{default:ke(()=>[ut((X(),ye("p",e6,[wt(mt(r.value),1)])),[[le(t),n.tooltip||o.value]])]),_:1},16)}}}),[["__scopeId","data-v-eecd48c7"]]);var Pl=(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))(Pl||{});const n6=["width","height","viewBox"],i6=["d"],s6="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",GF=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=fe(n.modelValue??0),o=W(()=>{var b;return((b=n.params)==null?void 0:b.size)??40}),r=W(()=>{var b;return((b=n.params)==null?void 0:b.iconViewBox)??"0 0 24 24"}),a=W(()=>{var b;return((b=n.params)==null?void 0:b.iconPath)??s6}),l=W(()=>{var b;return((b=n.params)==null?void 0:b.wrapperTag)??"span"}),u=W(()=>{var b;return n.disabled||((b=n.params)==null?void 0:b.disabled)||!1}),c=W(()=>{var b;return n.readOnly||((b=n.params)==null?void 0:b.readOnly)||!1}),d=W(()=>!u.value&&!c.value),h=W(()=>u.value?"not-allowed":c.value?"default":"pointer");Dt(()=>n.modelValue,b=>{typeof b=="number"&&b!==s.value&&(s.value=b)});const p=b=>{var S;return((S=n.params)==null?void 0:S.maxRating)-b+1<=s.value},g=b=>{d.value&&v(b)},C=b=>{d.value&&v(b)},v=b=>{var D,w;if(!d.value)return;const S=((D=n.params)==null?void 0:D.maxRating)-b+1;s.value=S,i("update:modelValue",S),i("update",S),i("change",S),(w=n.params)!=null&&w.onUpdate&&n.params.onUpdate(S)};return(b,S)=>(X(),ye("div",{class:Kt(["rating-component",{"rating-component--disabled":u.value,"rating-component--readOnly":c.value}])},[(X(!0),ye(Ft,null,An(e.params.maxRating,D=>(X(),tt(lM(l.value),{key:D,class:Kt(["rating-item",{filled:p(D),"rating-item--disabled":u.value,"rating-item--readOnly":c.value}]),style:Dn({cursor:h.value,order:e.params.maxRating-D,height:o.value+"px",width:o.value+"px"}),role:"radio","aria-checked":p(D),"aria-disabled":u.value,"aria-readOnly":c.value,tabindex:u.value?-1:0,onClick:qt(w=>g(D),["prevent","stop"]),onKeyup:[R0(qt(w=>C(D),["prevent"]),["enter"]),R0(qt(w=>C(D),["prevent"]),["space"])]},{default:ke(()=>[Rt(b.$slots,"icon",{index:D,filled:p(D),size:o.value,iconViewBox:r.value,disabled:u.value,readOnly:c.value},()=>[(X(),ye("svg",{class:"rating-icon",width:o.value,height:o.value,viewBox:r.value,"aria-hidden":"true",focusable:"false"},[Pe("path",{d:a.value},null,8,i6)],8,n6))]),Rt(b.$slots,"overlay",{index:D,filled:p(D),disabled:u.value,readOnly:c.value})]),_:2},1064,["class","style","aria-checked","aria-disabled","aria-readOnly","tabindex","onClick","onKeyup"]))),128))],2))}}),o6={key:1,class:"metric-content",role:"group"},r6={key:1,class:"metric-empty"},a6={key:0,class:"metric-morpheme metric-morpheme--prefix"},l6={key:1,class:"metric-morpheme metric-morpheme--suffix"},Lv=16,u6=St(ct({__name:"MetricRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},dataFetching:{type:Function},id:{},params:{},workspaceId:{},entityId:{},error:{type:Boolean}},emits:["update:value","clear","copy"],setup(e,{emit:t}){const n=ir,i=ui,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=fe(Number(o.value)),a=CO(!1),l=W(()=>{var M,L;return{...((L=(M=o.params)==null?void 0:M.colDef)==null?void 0:L.context)||s}}),u=W(()=>(l.value.format_symbol||"").split(/[\s-_]+/).map(L=>L.charAt(0).toUpperCase()+L.slice(1)).join("").replace(/Outline|Solid/g,"")),c=W(()=>{const{format_type:M,format_value:L}=l.value;if(M==="dropdown"&&typeof L=="string"&&L.startsWith("["))try{return JSON.parse(L)}catch{return[]}return[]}),d=W(()=>o.value===void 0),h=W(()=>String(o.value)),p=W(()=>o.value===null||o.value===void 0||String(o.value).length===0),g=W(()=>!!o.error),C=W(()=>l.value.format_type==="icon"),v=W(()=>{var M,L;return((L=(M=l.value)==null?void 0:M.metric_type)==null?void 0:L.code)==="formula"}),b=W(()=>l.value.format_type==="dropdown"),S=W(()=>l.value.morpheme_type==="prefix"),D=W(()=>l.value.morpheme_type==="suffix"),w=W(()=>v.value&&(g.value||p.value)),R=W(()=>a.value&&!p.value&&!o.disabled&&!C.value&&!p.value),x=W(()=>`metric-value--${l.value.format_type}`),T=fe(null),H=fe(null),N=W(()=>({disabled:o.disabled,readOnly:o.readOnly,error:g.value,inputRef:T,wrapperRef:H,clickable:!0})),{argsMain:A}=nr(N),_=W(()=>{if(p.value)return"-";const M=o.value,{format_type:L,format_value:ne,format_symbol:we,mapping:Ae}=l.value;if(Ae&&typeof Ae=="object"&&!Array.isArray(Ae)){const nt=Ae[`!${M}`];if(nt)return nt}if(L==="dropdown"){const nt=c.value.find(Je=>String(Je.value)===String(M));if(nt)return nt.name}if(typeof M=="string"&&isNaN(Number(M)))return M;const Le=parseInt(String(ne)||"0",10)||0;try{const Je=Number(M).toFixed(Le);return L==="currency"&&we?`${we}${Je}`:Je}catch(nt){return console.error("Error formatting metric value:",nt),String(M)}}),V=W(()=>({content:me.value,hideOnClick:!1,contentClass:"extra-padding"}));W(()=>({content:"Clear",hideOnClick:!1,contentClass:"extra-padding"}));const{copyToClipboard:ie,tooltip:me}=xR(_.value),Te=W(()=>({maxRating:l.value.range||5,readOnly:o.readOnly,disabled:o.disabled,size:Lv}));Dt(()=>o.value,M=>{const L=Number(M);Number.isFinite(L)&&L!==r.value?r.value=L:M==null&&r.value!==0&&(r.value=0)},{immediate:!0});const q=()=>{o.disabled||(a.value=!0)},z=()=>{a.value=!1};return(M,L)=>{var ne;return qS([o.value,o.error,l.value.format_type,l.value.format_value,l.value.format_symbol,l.value.mapping,(ne=l.value.metric_type)==null?void 0:ne.code],()=>ut((X(),tt(Tl,gn(le(A),{class:{"metric-renderer--hovered":a.value},onMouseenter:q,onMouseleave:z,ref_key:"wrapperRef",ref:H}),{suffix:ke(()=>[R.value?ut((X(),tt(gt,{key:0,variant:["icon","tertiary"],size:16,onClick:qt(le(ie),["prevent","stop"])},{default:ke(()=>[Ee(ot,{src:"Copy",source:"remote",size:12})]),_:1},8,["onClick"])),[[le(i),V.value]]):at("",!0)]),default:ke(()=>[C.value?(X(),tt(GF,{key:0,modelValue:r.value,"onUpdate:modelValue":L[0]||(L[0]=we=>r.value=we),params:Te.value,readOnly:!0,disabled:o.disabled},{icon:ke(()=>[Ee(ot,{source:"rating",src:u.value||"Star",size:Lv},null,8,["src"])]),_:1},8,["modelValue","params","disabled"])):(X(),ye("div",o6,[p.value?(X(),ye(Ft,{key:0},[w.value?(X(),tt(ot,{key:0,src:"SquareRootVariable",source:"remote",size:Lv,class:"metric-icon metric-icon--formula"})):(X(),ye("span",r6," - "))],64)):(X(),ye(Ft,{key:1},[S.value?(X(),ye("span",a6,mt(l.value.morpheme_value),1)):at("",!0),ut((X(),ye("span",{class:Kt(["metric-value",x.value])},[wt(mt(_.value),1)],2)),[[le(i),h.value]]),D.value?(X(),ye("span",l6,mt(l.value.morpheme_value),1)):at("",!0),b.value?(X(),tt(ot,{key:2,src:"ChevronDown",source:"remote",size:12,class:"metric-icon metric-icon--dropdown"})):at("",!0)],64))]))]),_:1},16,["class"])),[[le(n),{isLoading:d.value}]]),L,1)}}}),[["__scopeId","data-v-35ced412"]]),c6={class:"icon-sorting"},oa=St(ct({__name:"HeaderSorting",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=ui,n={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"}},i={desc:{value:"desc",label:"Newest to oldest"},asc:{value:"asc",label:"Oldest to newest"}},s={asc:{value:"asc",label:"Smallest to largest"},desc:{value:"desc",label:"Largest to smallest"}},o={asc:{value:"asc",label:"Sort Ascending"},desc:{value:"desc",label:"Sort Descending"}},r={label:"Clear sorting",value:"none",selected:!1,type:"text",iconName:"XMark"},a=e,l=fe("none"),u=W(()=>{const v=a.headerType??a.params.column.getColId();return v==="dateRange"?"dateRange":v==="date"?"date":v==="number"?"number":"default"}),c=W(()=>{var v;return((v=a.params)==null?void 0:v.displayName)??""}),d=W(()=>{let v=[];switch(u.value){case"dateRange":v=Object.values(n).map(b=>({...b,selected:l.value===b.value,type:"text"}));break;case"date":v=Object.values(i).map(b=>({...b,selected:l.value===b.value,type:"text"}));break;case"number":v=Object.values(s).map(b=>({...b,selected:l.value===b.value,type:"text"}));break;default:v=Object.values(o).map(b=>({...b,selected:l.value===b.value,type:"text"}));break}return l.value!=="none"&&v.push(r),v}),h=W(()=>l.value.endsWith("asc")?"SortUp":l.value.endsWith("desc")?"SortDown":"Sort"),p=v=>{l.value=v},g=()=>{if(u.value==="date"||u.value==="default"||u.value==="number"){const v=l.value==="none"?"asc":l.value==="asc"?"desc":"none";l.value=v}else{const v=[n.START_ASC.value,n.START_DESC.value,n.DUE_ASC.value,n.DUE_DESC.value,"none"],S=(v.indexOf(l.value)+1)%v.length;l.value=v[S]}},C=W(()=>{if(l.value==="none")return"No sorting applied";const v=d.value.find(b=>b.value===l.value);return(v==null?void 0:v.label)||""});return(v,b)=>(X(),tt(Mv,{options:d.value,label:c.value,readOnly:a.readOnly,disabled:a.disabled,variant:["text"],onHandleClick:g,onSelect:p},{dropdownIcon:ke(()=>[Pe("div",c6,[ut(Ee(ot,{src:h.value,source:"remote",size:"16",style:Dn({color:l.value!=="none"?"#f7941d":"inherit"})},null,8,["src","style"]),[[le(t),C.value]])])]),_:1},8,["options","label","readOnly","disabled"]))}}),[["__scopeId","data-v-868345e1"]]),d6=["disabled","readonly","checked","indeterminate"],h6=St(ct({__name:"HeaderCheckbox",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},dataFetching:{type:Function},id:{},params:{},workspaceId:{},entityId:{}},setup(e){const t=e,n=ui,i=fe(0),s=fe(!1),o=W(()=>i.value!==0),r=W(()=>({checked:i.value===2,indeterminate:i.value===1})),a=W(()=>({0:"Click to select All visible items",1:"Click to select All items",2:"Click to clear selection"})[i.value]),l=W(()=>{const v=[{label:"All visible",value:"loaded",type:"text",clickable:!0,selected:i.value===1},{label:"All",value:"all",type:"text",clickable:!0,selected:i.value===2}];return o.value&&v.push({label:"None",value:"none",type:"text",clickable:!0,selected:i.value===0}),v}),u=v=>({selected:v.getSelectedRows().length,loaded:(()=>{let b=0;return v.forEachNode(()=>b++),b})()}),c=({api:v,state:b})=>{i.value=b,s.value=b===2,b===0?v==null||v.deselectAll():v==null||v.forEachNode(S=>S.setSelected(!0))},d=v=>{s.value&&v.forEachNode(b=>{b.isSelected()||b.setSelected(!0)})},h=()=>{var S;const v=(S=t.params)==null?void 0:S.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 D;const b=(D=t.params)==null?void 0:D.api;b||console.error("no api"),c({api:b,state:{loaded:1,all:2,none:0}[v]})};let g=[];Si(()=>{var D;const v=(D=t.params)==null?void 0:D.api;if(!v)return;const b=()=>{const{selected:w,loaded:R}=u(v);w===0?(i.value=0,s.value=!1):w===R&&R>0?i.value!==2&&(i.value=1):w>R?(i.value=2,s.value=!0):s.value&&(s.value=!1,i.value=0)},S=()=>d(v);v.addEventListener("selectionChanged",b),v.addEventListener("rowDataUpdated",S),v.addEventListener("modelUpdated",S),g=[()=>v.removeEventListener("selectionChanged",b),()=>v.removeEventListener("rowDataUpdated",S),()=>v.removeEventListener("modelUpdated",S)]}),hs(()=>{g.forEach(v=>v())});const C=`header-checkbox-${Math.random().toString(36).substr(2,9)}`;return Si(()=>{}),(v,b)=>(X(),tt(Mv,{options:l.value,size:"small",disabled:t.disabled,readOnly:t.readOnly,variant:["icon","tertiary"],onSelect:p},{trigger:ke(()=>[ut(Pe("input",{id:C,disabled:t.disabled,readonly:t.readOnly,type:"checkbox",checked:r.value.checked,indeterminate:r.value.indeterminate,onChange:h,"aria-label":"Select All Items",class:"ag-checkbox-input"},null,40,d6),[[le(n),{content:a.value,hideOnClick:!1,contentClass:"extra-padding"}]])]),_:1},8,["options","disabled","readOnly"]))}}),[["__scopeId","data-v-22087012"]]),f6={key:0,class:"status-renderer"},p6={class:"status-renderer__status-name"},g6={key:1},m6=St(ct({__name:"StatusRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},dataFetching:{type:Function},id:{},params:{},workspaceId:{},entityId:{}},setup(e){const t=ir,n=ui,i=e,s=uo(()=>i.value),o=W(()=>s.value===void 0),r=W(()=>{var p;return(p=s.value)==null?void 0:p.label}),a=fe(null),l=fe(null),u=W(()=>({disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:H2(r.value),inputRef:a,wrapperRef:l,clickable:!0})),{argsMain:c}=nr(u),d=W(()=>{var p,g;return{backgroundColor:cm((p=s.value)==null?void 0:p.color)?s.value.color:"#fff",border:G0((g=s.value)==null?void 0:g.color,"white")?"1px solid #ccc":"1px solid #fff"}}),h=W(()=>{var p;return((p=s.value)==null?void 0:p.name)||"No status"});return(p,g)=>ut((X(),tt(le(Tl),gn(le(c),{ref_key:"wrapperRef",ref:l}),{default:ke(()=>[o.value?at("",!0):(X(),ye("div",f6,[s.value?(X(),ye(Ft,{key:0},[Pe("div",{class:"status-renderer__color-code",style:Dn(d.value)},null,4),ut((X(),ye("div",p6,[wt(mt(h.value),1)])),[[le(n),{content:h.value}]])],64)):o.value?at("",!0):(X(),ye("div",g6,"No status"))]))]),_:1},16)),[[le(t),{isLoading:o.value}]])}}),[["__scopeId","data-v-81972125"]]);var v6=Object.create,WF=Object.defineProperty,C6=Object.getOwnPropertyDescriptor,Nv=Object.getOwnPropertyNames,w6=Object.getPrototypeOf,y6=Object.prototype.hasOwnProperty,b6=(e,t)=>function(){return e&&(t=(0,e[Nv(e)[0]])(e=0)),t},S6=(e,t)=>function(){return t||(0,e[Nv(e)[0]])((t={exports:{}}).exports,t),t.exports},E6=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Nv(t))!y6.call(e,s)&&s!==n&&WF(e,s,{get:()=>t[s],enumerable:!(i=C6(t,s))||i.enumerable});return e},R6=(e,t,n)=>(n=e!=null?v6(w6(e)):{},E6(WF(n,"default",{value:e,enumerable:!0}),e)),Fc=b6({"../../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"(){}}),D6=S6({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){Fc(),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],b=d[v];typeof b!="object"||b===null?g[v]=b:b.constructor!==Object&&(a=r.get(b.constructor))?g[v]=a(b,h):ArrayBuffer.isView(b)?g[v]=n(b):g[v]=h(b)}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 b=0;b<C.length;b++){const S=C[b],D=p[S];if(typeof D!="object"||D===null)v[S]=D;else if(D.constructor!==Object&&(u=l.get(D.constructor)))v[S]=u(D,g);else if(ArrayBuffer.isView(D))v[S]=n(D);else{const w=r.indexOf(D);w!==-1?v[S]=a[w]:v[S]=g(D)}}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 b=r.indexOf(v);b!==-1?g[C]=a[b]: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 b=r.indexOf(v);b!==-1?g[C]=a[b]:g[C]=h(v)}}return r.pop(),a.pop(),g}}}});Fc(),Fc(),Fc();var zF=typeof navigator<"u",Ze=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof Ze.chrome<"u"&&Ze.chrome.devtools,zF&&(Ze.self,Ze.top);var $F;typeof navigator<"u"&&(($F=navigator.userAgent)==null||$F.toLowerCase().includes("electron")),Fc();var F6=R6(D6()),x6=/(?:^|[-_/])(\w)/g;function T6(e,t){return t?t.toUpperCase():""}function P6(e){return e&&`${e}`.replace(x6,T6)}function A6(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 UF=(0,F6.default)({circles:!0});const I6={trailing:!0};function Al(e,t=25,n={}){if(n={...I6,...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=_6(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 _6(e,t,n){return await e.apply(t,n)}function Vv(e,t={},n){for(const i in e){const s=e[i],o=n?`${n}:${i}`:i;typeof s=="object"&&s!==null?Vv(s,t,o):typeof s=="function"&&(t[o]=s)}return t}const k6={run:e=>e()},O6=()=>k6,jF=typeof console.createTask<"u"?console.createTask:O6;function M6(e,t){const n=t.shift(),i=jF(n);return e.reduce((s,o)=>s.then(()=>i.run(()=>o(...t))),Promise.resolve())}function L6(e,t){const n=t.shift(),i=jF(n);return Promise.all(e.map(s=>i.run(()=>s(...t))))}function Bv(e,t){for(const n of[...e])n(t)}class N6{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=Vv(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=Vv(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(M6,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(L6,t,...n)}callHookWith(t,n,...i){const s=this._before||this._after?{name:n,args:i,context:{}}:void 0;this._before&&Bv(this._before,s);const o=t(n in this._hooks?[...this._hooks[n]]:[],i);return o instanceof Promise?o.finally(()=>{this._after&&s&&Bv(this._after,s)}):(this._after&&s&&Bv(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 KF(){return new N6}var V6=Object.create,qF=Object.defineProperty,B6=Object.getOwnPropertyDescriptor,Hv=Object.getOwnPropertyNames,H6=Object.getPrototypeOf,G6=Object.prototype.hasOwnProperty,W6=(e,t)=>function(){return e&&(t=(0,e[Hv(e)[0]])(e=0)),t},YF=(e,t)=>function(){return t||(0,e[Hv(e)[0]])((t={exports:{}}).exports,t),t.exports},z6=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Hv(t))!G6.call(e,s)&&s!==n&&qF(e,s,{get:()=>t[s],enumerable:!(i=B6(t,s))||i.enumerable});return e},$6=(e,t,n)=>(n=e!=null?V6(H6(e)):{},z6(qF(n,"default",{value:e,enumerable:!0}),e)),xe=W6({"../../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"(){}}),U6=YF({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){xe(),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,b){var S="-",D="",w="",R=!0,x={},T,H,N,A,_,V,ie,me,Te,q,z,M,L,ne,we="";if(typeof v!="string")return"";if(typeof b=="string"&&(S=b),ie=a.en,me=r.en,typeof b=="object"){T=b.maintainCase||!1,x=b.custom&&typeof b.custom=="object"?b.custom:x,N=+b.truncate>1&&b.truncate||!1,A=b.uric||!1,_=b.uricNoSlash||!1,V=b.mark||!1,R=!(b.symbols===!1||b.lang===!1),S=b.separator||S,A&&(we+=l),_&&(we+=u),V&&(we+=c),ie=b.lang&&a[b.lang]&&R?a[b.lang]:R?a.en:{},me=b.lang&&r[b.lang]?r[b.lang]:b.lang===!1||b.lang===!0?{}:r.en,b.titleCase&&typeof b.titleCase.length=="number"&&Array.prototype.toString.call(b.titleCase)?(b.titleCase.forEach(function(Ae){x[Ae+""]=Ae+""}),H=!0):H=!!b.titleCase,b.custom&&typeof b.custom.length=="number"&&Array.prototype.toString.call(b.custom)&&b.custom.forEach(function(Ae){x[Ae+""]=Ae+""}),Object.keys(x).forEach(function(Ae){var Le;Ae.length>1?Le=new RegExp("\\b"+p(Ae)+"\\b","gi"):Le=new RegExp(p(Ae),"gi"),v=v.replace(Le,x[Ae])});for(z in x)we+=z}for(we+=S,we=p(we),v=v.replace(/(^\s+|\s+$)/g,""),L=!1,ne=!1,q=0,M=v.length;q<M;q++)z=v[q],g(z,x)?L=!1:me[z]?(z=L&&me[z].match(/[A-Za-z0-9]/)?" "+me[z]:me[z],L=!1):z in i?(q+1<M&&s.indexOf(v[q+1])>=0?(w+=z,z=""):ne===!0?(z=o[w]+i[z],w=""):z=L&&i[z].match(/[A-Za-z0-9]/)?" "+i[z]:i[z],L=!1,ne=!1):z in o?(w+=z,z="",q===M-1&&(z=o[w]),ne=!0):ie[z]&&!(A&&l.indexOf(z)!==-1)&&!(_&&u.indexOf(z)!==-1)?(z=L||D.substr(-1).match(/[A-Za-z0-9]/)?S+ie[z]:ie[z],z+=v[q+1]!==void 0&&v[q+1].match(/[A-Za-z0-9]/)?S:"",L=!0):(ne===!0?(z=o[w]+z,w="",ne=!1):L&&(/[A-Za-z0-9]/.test(z)||D.substr(-1).match(/A-Za-z0-9]/))&&(z=" "+z),L=!1),D+=z.replace(new RegExp("[^\\w\\s"+we+"_-]","g"),S);return H&&(D=D.replace(/(\w)(\S*)/g,function(Ae,Le,nt){var Je=Le.toUpperCase()+(nt!==null?nt:"");return Object.keys(x).indexOf(Je.toLowerCase())<0?Je:Je.toLowerCase()})),D=D.replace(/\s+/g,S).replace(new RegExp("\\"+S+"+","g"),S).replace(new RegExp("(^\\"+S+"+|\\"+S+"+$)","g"),""),N&&D.length>N&&(Te=D.charAt(N)===S,D=D.slice(0,N),Te||(D=D.slice(0,D.lastIndexOf(S)))),!T&&!H&&(D=D.toLowerCase()),D},h=function(v){return function(S){return d(S,v)}},p=function(v){return v.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},g=function(C,v){for(var b in v)if(v[b]===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)}}),j6=YF({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e,t){xe(),t.exports=U6()}});xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe();function K6(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 q6(e){const t=e.__file;if(t)return P6(A6(t,".vue"))}function ZF(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function Gv(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 JF(e){var t,n;const i=(t=e.subTree)==null?void 0:t.type,s=Gv(e);return s?((n=s==null?void 0:s.types)==null?void 0:n.Fragment)===i:!1}function df(e){var t,n,i;const s=K6((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 ZF(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 ZF(e,r);const o=q6((e==null?void 0:e.type)||{});return o||"Anonymous Component"}function Y6(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 Wv(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function Z6(){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 hf;function J6(e){return hf||(hf=document.createRange()),hf.selectNode(e),hf.getBoundingClientRect()}function Q6(e){const t=Z6();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=ra(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=J6(r))}o&&X6(t,o)}return t}function X6(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 QF={top:0,left:0,right:0,bottom:0,width:0,height:0};function ra(e){const t=e.subTree.el;return typeof window>"u"?QF:JF(e)?Q6(e.subTree):(t==null?void 0:t.nodeType)===1?t==null?void 0:t.getBoundingClientRect():e.subTree.component?ra(e.subTree.component):QF}xe();function zv(e){return JF(e)?e5(e.subTree):e.subTree?[e.subTree.el]:[]}function e5(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...zv(n.component)):n!=null&&n.el&&t.push(n.el)}),t}var XF="__vue-devtools-component-inspector__",ex="__vue-devtools-component-inspector__card__",tx="__vue-devtools-component-inspector__name__",nx="__vue-devtools-component-inspector__indicator__",ix={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},t5={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)"},n5={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function Il(){return document.getElementById(XF)}function i5(){return document.getElementById(ex)}function s5(){return document.getElementById(nx)}function o5(){return document.getElementById(tx)}function $v(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 Uv(e){var t;const n=document.createElement("div");n.id=(t=e.elementId)!=null?t:XF,Object.assign(n.style,{...ix,...$v(e.bounds),...e.style});const i=document.createElement("span");i.id=ex,Object.assign(i.style,{...t5,top:e.bounds.top<35?0:"-35px"});const s=document.createElement("span");s.id=tx,s.innerHTML=`<${e.name}> `;const o=document.createElement("i");return o.id=nx,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(o.style,n5),i.appendChild(s),i.appendChild(o),n.appendChild(i),document.body.appendChild(n),n}function jv(e){const t=Il(),n=i5(),i=o5(),s=s5();t&&(Object.assign(t.style,{...ix,...$v(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),i.innerHTML=`<${e.name}> `,s.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function r5(e){const t=ra(e);if(!t.width&&!t.height)return;const n=df(e);Il()?jv({bounds:t,name:n}):Uv({bounds:t,name:n})}function sx(){const e=Il();e&&(e.style.display="none")}var Kv=null;function qv(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(Kv=n,n.vnode.el)){const s=ra(n),o=df(n);Il()?jv({bounds:s,name:o}):Uv({bounds:s,name:o})}}}function a5(e,t){if(e.preventDefault(),e.stopPropagation(),Kv){const n=Y6(Kv);t(n)}}var ff=null;function l5(){sx(),window.removeEventListener("mouseover",qv),window.removeEventListener("click",ff,!0),ff=null}function u5(){return window.addEventListener("mouseover",qv),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),a5(n,i=>{window.removeEventListener("click",t,!0),ff=null,window.removeEventListener("mouseover",qv);const s=Il();s&&(s.style.display="none"),e(JSON.stringify({id:i}))})}ff=t,window.addEventListener("click",t,!0)})}function c5(e){const t=Wv(ci.value,e.id);if(t){const[n]=zv(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const i=ra(t),s=document.createElement("div"),o={...$v(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=ra(t);if(i.width||i.height){const s=df(t),o=Il();o?jv({...e,name:s,bounds:i}):Uv({...e,name:s,bounds:i}),setTimeout(()=>{o&&(o.style.display="none")},1500)}},1200)}}xe();var ox,rx;(rx=(ox=Ze).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(ox.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function d5(e){let t=0;const n=setInterval(()=>{Ze.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function h5(){const e=Ze.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function f5(){return new Promise(e=>{function t(){h5(),e(Ze.__VUE_INSPECTOR__)}Ze.__VUE_INSPECTOR__?t():d5(()=>{t()})})}xe(),xe();function p5(e){return!!(e&&e.__v_isReadonly)}function ax(e){return p5(e)?ax(e.__v_raw):!!(e&&e.__v_isReactive)}function Yv(e){return!!(e&&e.__v_isRef===!0)}function xc(e){const t=e&&e.__v_raw;return t?xc(t):e}var g5=class{constructor(){this.refEditor=new m5}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):xc(t)instanceof Map?t.delete(n):xc(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):xc(t)instanceof Map?t.set(e.newKey||n,i):xc(t)instanceof Set?t.add(i):t[e.newKey||n]=i}}}},m5=class{set(e,t){if(Yv(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 Yv(e)?e.value:e}isRef(e){return Yv(e)||ax(e)}};xe(),xe(),xe();var v5="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function C5(){if(typeof window>"u"||!zF||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(v5):null;return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}xe(),xe(),xe();var lx,ux;(ux=(lx=Ze).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(lx.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var w5=new Proxy(Ze.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function y5(e,t){In.timelineLayersState[t.id]=!1,w5.push({...e,descriptorId:t.id,appRecord:Gv(t.app)})}var cx,dx;(dx=(cx=Ze).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(cx.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var Zv=new Proxy(Ze.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),hx=Al(()=>{kl.hooks.callHook("sendInspectorToClient",fx())});function b5(e,t){var n,i;Zv.push({options:e,descriptor:t,treeFilterPlaceholder:(n=e.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(i=e.stateFilterPlaceholder)!=null?i:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:Gv(t.app)}),hx()}function fx(){return Zv.filter(e=>e.descriptor.app===ci.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 pf(e,t){return Zv.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}function S5(){const e=KF();e.hook("addInspector",({inspector:i,plugin:s})=>{b5(i,s.descriptor)});const t=Al(async({inspectorId:i,plugin:s})=>{var o;if(!i||!((o=s==null?void 0:s.descriptor)!=null&&o.app)||In.highPerfModeEnabled)return;const r=pf(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=Al(async({inspectorId:i,plugin:s})=>{var o;if(!i||!((o=s==null?void 0:s.descriptor)!=null&&o.app)||In.highPerfModeEnabled)return;const r=pf(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=pf(i,o.descriptor.app);r&&(r.selectedNodeId=s)}),e.hook("timelineLayerAdded",({options:i,plugin:s})=>{y5(i,s.descriptor)}),e.hook("timelineEventAdded",({options:i,plugin:s})=>{var o;const r=["performance","component-event","keyboard","mouse"];In.highPerfModeEnabled||!((o=In.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})=>ra(i)),e.hook("getComponentName",({instance:i})=>df(i)),e.hook("componentHighlight",({uid:i})=>{const s=ci.value.instanceMap.get(i);s&&r5(s)}),e.hook("componentUnhighlight",()=>{sx()}),e}var px,gx;(gx=(px=Ze).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(px.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var mx,vx;(vx=(mx=Ze).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(mx.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var Cx,wx;(wx=(Cx=Ze).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(Cx.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var yx,bx;(bx=(yx=Ze).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||(yx.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var Sx,Ex;(Ex=(Sx=Ze).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(Sx.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var aa="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function E5(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:C5()}}var Rx,Dx;(Dx=(Rx=Ze)[aa])!=null||(Rx[aa]=E5());var R5=Al(e=>{kl.hooks.callHook("devtoolsStateUpdated",{state:e})});Al((e,t)=>{kl.hooks.callHook("devtoolsConnectedUpdated",{state:e,oldState:t})});var gf=new Proxy(Ze.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?Ze.__VUE_DEVTOOLS_KIT_APP_RECORDS__:Ze.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),ci=new Proxy(Ze.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?Ze.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?Ze.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:Ze.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function Fx(){R5({...Ze[aa],appRecords:gf.value,activeAppRecordId:ci.id,tabs:Ze.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:Ze.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function D5(e){Ze.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,Fx()}function F5(e){Ze.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,Fx()}var In=new Proxy(Ze[aa],{get(e,t){return t==="appRecords"?gf:t==="activeAppRecordId"?ci.id:t==="tabs"?Ze.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?Ze.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:Ze[aa][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...Ze[aa]},e[t]=n,Ze[aa][t]=n,!0}});function x5(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(In.vitePluginDetected){const u=(i=Ze.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?i:r;Ze.__VUE_INSPECTOR__.openInEditor(u,s,a,l)}}}xe(),xe(),xe(),xe(),xe();var xx,Tx;(Tx=(xx=Ze).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(xx.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var Jv=new Proxy(Ze.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function Qv(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function Xv(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function T5(e){var t,n,i;const s=(n=(t=Jv.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 Px(e,t){var n,i,s;const o=Xv(e);if(o){const r=localStorage.getItem(o);if(r)return JSON.parse(r)}if(e){const r=(i=(n=Jv.find(a=>a[0].id===e))==null?void 0:n[0])!=null?i:null;return Qv((s=r==null?void 0:r.settings)!=null?s:{})}return Qv(t)}function P5(e,t){const n=Xv(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(Qv(t)))}function A5(e,t,n){const i=Xv(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")}xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe();var Ax,Ix,Ai=(Ix=(Ax=Ze).__VUE_DEVTOOLS_HOOK)!=null?Ix:Ax.__VUE_DEVTOOLS_HOOK=KF(),I5={vueAppInit(e){Ai.hook("app:init",e)},vueAppUnmount(e){Ai.hook("app:unmount",e)},vueAppConnected(e){Ai.hook("app:connected",e)},componentAdded(e){return Ai.hook("component:added",e)},componentEmit(e){return Ai.hook("component:emit",e)},componentUpdated(e){return Ai.hook("component:updated",e)},componentRemoved(e){return Ai.hook("component:removed",e)},setupDevtoolsPlugin(e){Ai.hook("devtools-plugin:setup",e)},perfStart(e){return Ai.hook("perf:start",e)},perfEnd(e){return Ai.hook("perf:end",e)}},_x={on:I5,setupDevToolsPlugin(e,t){return Ai.callHook("devtools-plugin:setup",e,t)}},_5=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(In.highPerfModeEnabled)return;const n=fx().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];Ai.callHook("component:updated",...i)}else Ai.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&&P5(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){In.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){In.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 In.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook("timelineLayerAdded",{options:e,plugin:this.plugin})}addTimelineEvent(e){In.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:e,plugin:this.plugin})}getSettings(e){return Px(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")}},k5=_5;xe(),xe(),xe(),xe();var O5="__vue_devtool_undefined__",M5="__vue_devtool_infinity__",L5="__vue_devtool_negative_infinity__",N5="__vue_devtool_nan__";xe(),xe();var V5={[O5]:"undefined",[N5]:"NaN",[M5]:"Infinity",[L5]:"-Infinity"};Object.entries(V5).reduce((e,[t,n])=>(e[n]=t,e),{}),xe(),xe(),xe(),xe(),xe();var kx,Ox;(Ox=(kx=Ze).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(kx.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function Mx(e,t){return _x.setupDevToolsPlugin(e,t)}function B5(e,t){const[n,i]=e;if(n.app!==t)return;const s=new k5({plugin:{setupFn:i,descriptor:n},ctx:kl});n.packageName==="vuex"&&s.on.editInspectorState(o=>{s.sendInspectorState(o.inspectorId)}),i(s)}function Lx(e,t){Ze.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||In.highPerfModeEnabled&&!(t!=null&&t.inspectingComponent)||(Ze.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),Jv.forEach(n=>{B5(n,e)}))}xe(),xe();var Tc="__VUE_DEVTOOLS_ROUTER__",_l="__VUE_DEVTOOLS_ROUTER_INFO__",Nx,Vx;(Vx=(Nx=Ze)[_l])!=null||(Nx[_l]={currentRoute:null,routes:[]});var Bx,Hx;(Hx=(Bx=Ze)[Tc])!=null||(Bx[Tc]={}),new Proxy(Ze[_l],{get(e,t){return Ze[_l][t]}}),new Proxy(Ze[Tc],{get(e,t){if(t==="value")return Ze[Tc]}});function H5(e){const t=new Map;return((e==null?void 0:e.getRoutes())||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function eC(e){return e.map(t=>{let{path:n,name:i,children:s,meta:o}=t;return s!=null&&s.length&&(s=eC(s)),{path:n,name:i,children:s,meta:o}})}function G5(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:eC(r)}}return e}function W5(e,t){function n(){var i;const s=(i=e.app)==null?void 0:i.config.globalProperties.$router,o=G5(s==null?void 0:s.currentRoute.value),r=eC(H5(s)),a=console.warn;console.warn=()=>{},Ze[_l]={currentRoute:o?UF(o):{},routes:UF(r)},Ze[Tc]=s,console.warn=a}n(),_x.on.componentUpdated(Al(()=>{var i;((i=t.value)==null?void 0:i.app)===e.app&&(n(),!In.highPerfModeEnabled&&kl.hooks.callHook("routerInfoUpdated",{state:Ze[_l]}))},200))}function z5(e){return{async getInspectorTree(t){const n={...t,app:ci.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:ci.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 g5,i={...t,app:ci.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=pf(t);e.callHook("sendInspectorState",{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return u5()},cancelInspectComponentInspector(){return l5()},getComponentRenderCode(t){const n=Wv(ci.value,t);if(n)return typeof(n==null?void 0:n.type)!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return c5({id:t})},openInEditor:x5,getVueInspector:f5,toggleApp(t,n){const i=gf.value.find(s=>s.id===t);i&&(F5(t),D5(i),W5(i,ci),hx(),Lx(i.app,n))},inspectDOM(t){const n=Wv(ci.value,t);if(n){const[i]=zv(n);i&&(Ze.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=i)}},updatePluginSettings(t,n,i){A5(t,n,i)},getPluginSettings(t){return{options:T5(t),values:Px(t)}}}}xe();var Gx,Wx;(Wx=(Gx=Ze).__VUE_DEVTOOLS_ENV__)!=null||(Gx.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var zx=S5(),$x,Ux;(Ux=($x=Ze).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||($x.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:zx,get state(){return{...In,activeAppRecordId:ci.id,activeAppRecord:ci.value,appRecords:gf.value}},api:z5(zx)});var kl=Ze.__VUE_DEVTOOLS_KIT_CONTEXT__;xe(),$6(j6());var jx,Kx;(Kx=(jx=Ze).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(jx.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),xe(),xe();function $5(e){In.highPerfModeEnabled=e??!In.highPerfModeEnabled,!e&&ci.value&&Lx(ci.value.app)}xe(),xe(),xe();function U5(e){In.devtoolsClientDetected={...In.devtoolsClientDetected,...e};const t=Object.values(In.devtoolsClientDetected).some(Boolean);$5(!t)}var qx,Yx;(Yx=(qx=Ze).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(qx.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=U5),xe(),xe(),xe(),xe(),xe(),xe(),xe();var j5=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()}},Zx=class{constructor(t){this.generateIdentifier=t,this.kv=new j5}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)}},K5=class extends Zx{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)}};xe(),xe();function q5(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 Y5(e,t){const n=q5(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 mf(e,t){return e.indexOf(t)!==-1}function Jx(e,t){for(let n=0;n<e.length;n++){const i=e[n];if(t(i))return i}}var Z5=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return Y5(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};xe(),xe();var J5=e=>Object.prototype.toString.call(e).slice(8,-1),Qx=e=>typeof e>"u",Q5=e=>e===null,Pc=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,tC=e=>Pc(e)&&Object.keys(e).length===0,sr=e=>Array.isArray(e),X5=e=>typeof e=="string",ej=e=>typeof e=="number"&&!isNaN(e),tj=e=>typeof e=="boolean",nj=e=>e instanceof RegExp,Ac=e=>e instanceof Map,Ic=e=>e instanceof Set,Xx=e=>J5(e)==="Symbol",ij=e=>e instanceof Date&&!isNaN(e.valueOf()),sj=e=>e instanceof Error,eT=e=>typeof e=="number"&&isNaN(e),oj=e=>tj(e)||Q5(e)||Qx(e)||ej(e)||X5(e)||Xx(e),rj=e=>typeof e=="bigint",aj=e=>e===1/0||e===-1/0,lj=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),uj=e=>e instanceof URL;xe();var tT=e=>e.replace(/\./g,"\\."),nC=e=>e.map(String).map(tT).join("."),_c=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};xe();function Gs(e,t,n,i){return{isApplicable:e,annotation:t,transform:n,untransform:i}}var nT=[Gs(Qx,"undefined",()=>null,()=>{}),Gs(rj,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),Gs(ij,"Date",e=>e.toISOString(),e=>new Date(e)),Gs(sj,"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}),Gs(nj,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Gs(Ic,"set",e=>[...e.values()],e=>new Set(e)),Gs(Ac,"map",e=>[...e.entries()],e=>new Map(e)),Gs(e=>eT(e)||aj(e),"number",e=>eT(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Gs(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Gs(uj,"URL",e=>e.toString(),e=>new URL(e))];function vf(e,t,n,i){return{isApplicable:e,annotation:t,transform:n,untransform:i}}var iT=vf((e,t)=>Xx(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}),cj=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),sT=vf(lj,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=cj[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function oT(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var rT=vf(oT,(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)}),aT=vf((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)}),dj=[rT,iT,aT,sT],lT=(e,t)=>{const n=Jx(dj,s=>s.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const i=Jx(nT,s=>s.isApplicable(e,t));if(i)return{value:i.transform(e,t),type:i.annotation}},uT={};nT.forEach(e=>{uT[e.annotation]=e});var hj=(e,t,n)=>{if(sr(t))switch(t[0]){case"symbol":return iT.untransform(e,t,n);case"class":return rT.untransform(e,t,n);case"custom":return aT.untransform(e,t,n);case"typed-array":return sT.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const i=uT[t];if(!i)throw new Error("Unknown transformation: "+t);return i.untransform(e,n)}};xe();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 cT(e){if(mf(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(mf(e,"prototype"))throw new Error("prototype is not allowed as a property");if(mf(e,"constructor"))throw new Error("constructor is not allowed as a property")}var fj=(e,t)=>{cT(t);for(let n=0;n<t.length;n++){const i=t[n];if(Ic(e))e=Ml(e,+i);else if(Ac(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},iC=(e,t,n)=>{if(cT(t),t.length===0)return n(e);let i=e;for(let o=0;o<t.length-1;o++){const r=t[o];if(sr(i)){const a=+r;i=i[a]}else if(Pc(i))i=i[r];else if(Ic(i)){const a=+r;i=Ml(i,a)}else if(Ac(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(sr(i)?i[+s]=n(i[+s]):Pc(i)&&(i[s]=n(i[s])),Ic(i)){const o=Ml(i,+s),r=n(o);o!==r&&(i.delete(o),i.add(r))}if(Ac(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 sC(e,t,n=[]){if(!e)return;if(!sr(e)){Ol(e,(o,r)=>sC(o,t,[...n,..._c(r)]));return}const[i,s]=e;s&&Ol(s,(o,r)=>{sC(o,t,[...n,..._c(r)])}),t(i,n)}function pj(e,t,n){return sC(t,(i,s)=>{e=iC(e,s,o=>hj(o,i,n))}),e}function gj(e,t){function n(i,s){const o=fj(e,_c(s));i.map(_c).forEach(r=>{e=iC(e,r,()=>o)})}if(sr(t)){const[i,s]=t;i.forEach(o=>{e=iC(e,_c(o),()=>e)}),s&&Ol(s,n)}else Ol(t,n);return e}var mj=(e,t)=>Pc(e)||sr(e)||Ac(e)||Ic(e)||oT(e,t);function vj(e,t,n){const i=n.get(e);i?i.push(t):n.set(e,[t])}function Cj(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(nC):n[nC(o)]=r.map(nC)}),i?tC(n)?[i]:[i,n]:tC(n)?void 0:n}var dT=(e,t,n,i,s=[],o=[],r=new Map)=>{var a;const l=oj(e);if(!l){vj(e,s,t);const g=r.get(e);if(g)return i?{transformedValue:null}:g}if(!mj(e,n)){const g=lT(e,n),C=g?{transformedValue:g.value,annotations:[g.type]}:{transformedValue:e};return l||r.set(e,C),C}if(mf(o,e))return{transformedValue:null};const u=lT(e,n),c=(a=u==null?void 0:u.value)!=null?a:e,d=sr(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=dT(g,t,n,i,[...s,C],[...o,e],r);d[C]=v.transformedValue,sr(v.annotations)?h[C]=v.annotations:Pc(v.annotations)&&Ol(v.annotations,(b,S)=>{h[tT(C)+"."+S]=b})});const p=tC(h)?{transformedValue:d,annotations:u?[u.type]:void 0}:{transformedValue:d,annotations:u?[u.type,h]:h};return l||r.set(e,p),p};xe(),xe();function hT(e){return Object.prototype.toString.call(e).slice(8,-1)}function fT(e){return hT(e)==="Array"}function wj(e){if(hT(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function yj(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 oC(e,t={}){if(fT(e))return e.map(s=>oC(s,t));if(!wj(e))return e;const n=Object.getOwnPropertyNames(e),i=Object.getOwnPropertySymbols(e);return[...n,...i].reduce((s,o)=>{if(fT(t.props)&&!t.props.includes(o))return s;const r=e[o],a=oC(r,t);return yj(s,o,a,e,t.nonenumerable),s},{})}var Zt=class{constructor({dedupe:e=!1}={}){this.classRegistry=new K5,this.symbolRegistry=new Zx(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new Z5,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=dT(e,t,this,this.dedupe),i={json:n.transformedValue};n.annotations&&(i.meta={...i.meta,values:n.annotations});const s=Cj(t,this.dedupe);return s&&(i.meta={...i.meta,referentialEqualities:s}),i}deserialize(e){const{json:t,meta:n}=e;let i=oC(t);return n!=null&&n.values&&(i=pj(i,n.values,this)),n!=null&&n.referentialEqualities&&(i=gj(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)}};Zt.defaultInstance=new Zt,Zt.serialize=Zt.defaultInstance.serialize.bind(Zt.defaultInstance),Zt.deserialize=Zt.defaultInstance.deserialize.bind(Zt.defaultInstance),Zt.stringify=Zt.defaultInstance.stringify.bind(Zt.defaultInstance),Zt.parse=Zt.defaultInstance.parse.bind(Zt.defaultInstance),Zt.registerClass=Zt.defaultInstance.registerClass.bind(Zt.defaultInstance),Zt.registerSymbol=Zt.defaultInstance.registerSymbol.bind(Zt.defaultInstance),Zt.registerCustom=Zt.defaultInstance.registerCustom.bind(Zt.defaultInstance),Zt.allowErrorProps=Zt.defaultInstance.allowErrorProps.bind(Zt.defaultInstance),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe(),xe();var pT,gT;(gT=(pT=Ze).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(pT.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var mT,vT;(vT=(mT=Ze).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(mT.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var CT,wT;(wT=(CT=Ze).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(CT.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var yT,bT;(bT=(yT=Ze).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||(yT.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var ST,ET;(ET=(ST=Ze).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(ST.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var RT,DT;(DT=(RT=Ze).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(RT.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),xe(),xe(),xe(),xe(),xe(),xe(),xe();/*!
|
|
62
|
+
* pinia v3.0.4
|
|
63
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
64
|
+
* @license MIT
|
|
65
|
+
*/const Ro=typeof window<"u";let la;const kc=e=>la=e;I.env.NODE_ENV;const Cf=I.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ua(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Ws;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Ws||(Ws={}));const FT=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 bj(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 rC(e,t,n){const i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){PT(i.response,t,n)},i.onerror=function(){console.error("could not download file")},i.send()}function xT(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function wf(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 yf=typeof navigator=="object"?navigator:{userAgent:""},TT=/Macintosh/.test(yf.userAgent)&&/AppleWebKit/.test(yf.userAgent)&&!/Safari/.test(yf.userAgent),PT=Ro?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!TT?Sj:"msSaveOrOpenBlob"in yf?Ej:Rj:()=>{};function Sj(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?xT(i.href)?rC(e,t,n):(i.target="_blank",wf(i)):wf(i)):(i.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(i.href)},4e4),setTimeout(function(){wf(i)},0))}function Ej(e,t="download",n){if(typeof e=="string")if(xT(e))rC(e,t,n);else{const i=document.createElement("a");i.href=e,i.target="_blank",setTimeout(function(){wf(i)})}else navigator.msSaveOrOpenBlob(bj(e,n),t)}function Rj(e,t,n,i){if(i=i||open("","_blank"),i&&(i.document.title=i.document.body.innerText="downloading..."),typeof e=="string")return rC(e,t,n);const s=e.type==="application/octet-stream",o=/constructor/i.test(String(FT.HTMLElement))||"safari"in FT,r=/CriOS\/[\d]+/.test(navigator.userAgent);if((r||s&&o||TT)&&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 kn(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 aC(e){return"_a"in e&&"install"in e}function AT(){if(!("clipboard"in navigator))return kn("Your browser doesn't support the Clipboard API","error"),!0}function IT(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(kn('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Dj(e){if(!AT())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),kn("Global state copied to clipboard.")}catch(t){if(IT(t))return;kn("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function Fj(e){if(!AT())try{_T(e,JSON.parse(await navigator.clipboard.readText())),kn("Global state pasted from clipboard.")}catch(t){if(IT(t))return;kn("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function xj(e){try{PT(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){kn("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Do;function Tj(){Do||(Do=document.createElement("input"),Do.type="file",Do.accept=".json");function e(){return new Promise((t,n)=>{Do.onchange=async()=>{const i=Do.files;if(!i)return t(null);const s=i.item(0);return t(s?{text:await s.text(),file:s}:null)},Do.oncancel=()=>t(null),Do.onerror=n,Do.click()})}return e}async function Pj(e){try{const n=await Tj()();if(!n)return;const{text:i,file:s}=n;_T(e,JSON.parse(i)),kn(`Global state imported from "${s.name}".`)}catch(t){kn("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function _T(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 ys(e){return{_custom:{display:e}}}const kT="🍍 Pinia (root)",bf="_root";function Aj(e){return aC(e)?{id:bf,label:kT}:{id:e.$id,label:e.$id}}function Ij(e){if(aC(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 _j(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:ys(e.type),key:ys(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function kj(e){switch(e){case Ws.direct:return"mutation";case Ws.patchFunction:return"$patch";case Ws.patchObject:return"$patch";default:return"unknown"}}let Ll=!0;const Sf=[],ca="pinia:mutations",qn="pinia",{assign:Oj}=Object,Ef=e=>"🍍 "+e;function Mj(e,t){Mx({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Sf,app:e},n=>{typeof n.now!="function"&&kn("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:ca,label:"Pinia 🍍",color:15064968}),n.addInspector({id:qn,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Dj(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Fj(t),n.sendInspectorTree(qn),n.sendInspectorState(qn)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{xj(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Pj(t),n.sendInspectorTree(qn),n.sendInspectorState(qn)},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"?kn(`Cannot reset "${i}" store because it doesn't have a "$reset" method implemented.`,"warn"):(s.$reset(),kn(`Store "${i}" reset.`)):kn(`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:Ef(r.$id),key:"state",editable:!0,value:r._isOptionsAPI?{_custom:{value:dt(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:Ef(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===qn){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()):kT.toLowerCase().includes(i.filter.toLowerCase())):s).map(Aj)}}),globalThis.$pinia=t,n.on.getInspectorState(i=>{if(i.app===e&&i.inspectorId===qn){const s=i.nodeId===bf?t:t._s.get(i.nodeId);if(!s)return;s&&(i.nodeId!==bf&&(globalThis.$store=dt(s)),i.state=Ij(s))}}),n.on.editInspectorState(i=>{if(i.app===e&&i.inspectorId===qn){const s=i.nodeId===bf?t:t._s.get(i.nodeId);if(!s)return kn(`store "${i.nodeId}" not found`,"error");const{path:o}=i;aC(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 kn(`store "${s}" not found`,"error");const{path:r}=i;if(r[0]!=="state")return kn(`Invalid path for store "${s}":
|
|
66
|
+
${r}
|
|
67
|
+
Only state can be modified.`);r[0]="$state",Ll=!1,i.set(o,r,i.state.value),Ll=!0}})})}function Lj(e,t){Sf.includes(Ef(t.$id))||Sf.push(Ef(t.$id)),Mx({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Sf,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=OT++;n.addTimelineEvent({layerId:ca,event:{time:i(),title:"🛫 "+l,subtitle:"start",data:{store:ys(t.$id),action:ys(l),args:u},groupId:c}}),r(d=>{or=void 0,n.addTimelineEvent({layerId:ca,event:{time:i(),title:"🛬 "+l,subtitle:"end",data:{store:ys(t.$id),action:ys(l),args:u,result:d},groupId:c}})}),a(d=>{or=void 0,n.addTimelineEvent({layerId:ca,event:{time:i(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:ys(t.$id),action:ys(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(r=>{Dt(()=>le(t[r]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(qn),Ll&&n.addTimelineEvent({layerId:ca,event:{time:i(),title:"Change",subtitle:r,data:{newValue:a,oldValue:l},groupId:or}})},{deep:!0})}),t.$subscribe(({events:r,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(qn),!Ll)return;const u={time:i(),title:kj(a),data:Oj({store:ys(t.$id)},_j(r)),groupId:or};a===Ws.patchFunction?u.subtitle="⤵️":a===Ws.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:ca,event:u})},{detached:!0,flush:"sync"});const s=t._hotUpdate;t._hotUpdate=$o(r=>{s(r),n.addTimelineEvent({layerId:ca,event:{time:i(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:ys(t.$id),info:ys("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(qn),n.sendInspectorState(qn)});const{$dispose:o}=t;t.$dispose=()=>{o(),n.notifyComponentUpdate(),n.sendInspectorTree(qn),n.sendInspectorState(qn),n.getSettings().logStoreChanges&&kn(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(qn),n.sendInspectorState(qn),n.getSettings().logStoreChanges&&kn(`"${t.$id}" store installed 🆕`)})}let OT=0,or;function MT(e,t,n){const i=t.reduce((s,o)=>(s[o]=dt(e)[o],s),{});for(const s in i)e[s]=function(){const o=OT,r=n?new Proxy(e,{get(...l){return or=o,Reflect.get(...l)},set(...l){return or=o,Reflect.set(...l)}}):e;or=o;const a=i[s].apply(r,arguments);return or=void 0,a}}function Nj({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){MT(t,Object.keys(n.actions),t._isOptionsAPI);const i=t._hotUpdate;dt(t)._hotUpdate=function(s){i.apply(this,arguments),MT(t,Object.keys(s._hmrPayload.actions),!!t._isOptionsAPI)}}Lj(e,t)}}function Vj(){const e=pb(!0),t=e.run(()=>fe({}));let n=[],i=[];const s=$o({install(o){kc(s),s._a=o,o.provide(Cf,s),o.config.globalProperties.$pinia=s,I.env.NODE_ENV!=="production"&&I.env.NODE_ENV!=="test"&&Ro&&Mj(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 I.env.NODE_ENV!=="production"&&I.env.NODE_ENV!=="test"&&Ro&&typeof Proxy<"u"&&s.use(Nj),s}function LT(e,t){for(const n in t){const i=t[n];if(!(n in e))continue;const s=e[n];ua(s)&&ua(i)&&!Wt(i)&&!Li(i)?e[n]=LT(s,i):e[n]=i}return e}const NT=()=>{};function VT(e,t,n,i=NT){e.add(t);const s=()=>{e.delete(t)&&i()};return!n&&gb()&&Jk(s),s}function Nl(e,...t){e.forEach(n=>{n(...t)})}const Bj=e=>e(),BT=Symbol(),lC=Symbol();function uC(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];ua(s)&&ua(i)&&e.hasOwnProperty(n)&&!Wt(i)&&!Li(i)?e[n]=uC(s,i):e[n]=i}return e}const Hj=I.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Gj(e){return!ua(e)||!Object.prototype.hasOwnProperty.call(e,Hj)}const{assign:Yi}=Object;function HT(e){return!!(Wt(e)&&e.effect)}function GT(e,t,n,i){const{state:s,actions:o,getters:r}=t,a=n.state.value[e];let l;function u(){!a&&(I.env.NODE_ENV==="production"||!i)&&(n.state.value[e]=s?s():{});const c=I.env.NODE_ENV!=="production"&&i?Rg(fe(s?s():{}).value):Rg(n.state.value[e]);return Yi(c,o,Object.keys(r||{}).reduce((d,h)=>(I.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]=$o(W(()=>{kc(n);const p=n._s.get(e);return r[h].call(p,p)})),d),{}))}return l=cC(e,u,t,n,i,!0),l}function cC(e,t,n={},i,s,o){let r;const a=Yi({actions:{}},n);if(I.env.NODE_ENV!=="production"&&!i._e.active)throw new Error("Pinia destroyed");const l={deep:!0};I.env.NODE_ENV!=="production"&&(l.onTrigger=A=>{u?p=A:u==!1&&!T._hotUpdating&&(Array.isArray(p)?p.push(A):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&&(I.env.NODE_ENV==="production"||!s)&&(i.state.value[e]={});const C=fe({});let v;function b(A){let _;u=c=!1,I.env.NODE_ENV!=="production"&&(p=[]),typeof A=="function"?(A(i.state.value[e]),_={type:Ws.patchFunction,storeId:e,events:p}):(uC(i.state.value[e],A),_={type:Ws.patchObject,payload:A,storeId:e,events:p});const V=v=Symbol();_n().then(()=>{v===V&&(u=!0)}),c=!0,Nl(d,_,i.state.value[e])}const S=o?function(){const{state:_}=n,V=_?_():{};this.$patch(ie=>{Yi(ie,V)})}:I.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:NT;function D(){r.stop(),d.clear(),h.clear(),i._s.delete(e)}const w=(A,_="")=>{if(BT in A)return A[lC]=_,A;const V=function(){kc(i);const ie=Array.from(arguments),me=new Set,Te=new Set;function q(L){me.add(L)}function z(L){Te.add(L)}Nl(h,{args:ie,name:V[lC],store:T,after:q,onError:z});let M;try{M=A.apply(this&&this.$id===e?this:T,ie)}catch(L){throw Nl(Te,L),L}return M instanceof Promise?M.then(L=>(Nl(me,L),L)).catch(L=>(Nl(Te,L),Promise.reject(L))):(Nl(me,M),M)};return V[BT]=!0,V[lC]=_,V},R=$o({actions:{},getters:{},state:[],hotState:C}),x={_p:i,$id:e,$onAction:VT.bind(null,h),$patch:b,$reset:S,$subscribe(A,_={}){const V=VT(d,A,_.detached,()=>ie()),ie=r.run(()=>Dt(()=>i.state.value[e],me=>{(_.flush==="sync"?c:u)&&A({storeId:e,type:Ws.direct,events:p},me)},Yi({},l,_)));return V},$dispose:D},T=lo(I.env.NODE_ENV!=="production"||I.env.NODE_ENV!=="production"&&I.env.NODE_ENV!=="test"&&Ro?Yi({_hmrPayload:R,_customProperties:$o(new Set)},x):x);i._s.set(e,T);const N=(i._a&&i._a.runWithContext||Bj)(()=>i._e.run(()=>(r=pb()).run(()=>t({action:w}))));for(const A in N){const _=N[A];if(Wt(_)&&!HT(_)||Li(_))I.env.NODE_ENV!=="production"&&s?C.value[A]=uo(N,A):o||(g&&Gj(_)&&(Wt(_)?_.value=g[A]:uC(_,g[A])),i.state.value[e][A]=_),I.env.NODE_ENV!=="production"&&R.state.push(A);else if(typeof _=="function"){const V=I.env.NODE_ENV!=="production"&&s?_:w(_,A);N[A]=V,I.env.NODE_ENV!=="production"&&(R.actions[A]=_),a.actions[A]=_}else I.env.NODE_ENV!=="production"&&HT(_)&&(R.getters[A]=o?n.getters[A]:_,Ro&&(N._getters||(N._getters=$o([]))).push(A))}if(Yi(T,N),Yi(dt(T),N),Object.defineProperty(T,"$state",{get:()=>I.env.NODE_ENV!=="production"&&s?C.value:i.state.value[e],set:A=>{if(I.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");b(_=>{Yi(_,A)})}}),I.env.NODE_ENV!=="production"&&(T._hotUpdate=$o(A=>{T._hotUpdating=!0,A._hmrPayload.state.forEach(_=>{if(_ in T.$state){const V=A.$state[_],ie=T.$state[_];typeof V=="object"&&ua(V)&&ua(ie)?LT(V,ie):A.$state[_]=ie}T[_]=uo(A.$state,_)}),Object.keys(T.$state).forEach(_=>{_ in A.$state||delete T[_]}),u=!1,c=!1,i.state.value[e]=uo(A._hmrPayload,"hotState"),c=!0,_n().then(()=>{u=!0});for(const _ in A._hmrPayload.actions){const V=A[_];T[_]=w(V,_)}for(const _ in A._hmrPayload.getters){const V=A._hmrPayload.getters[_],ie=o?W(()=>(kc(i),V.call(T,T))):V;T[_]=ie}Object.keys(T._hmrPayload.getters).forEach(_=>{_ in A._hmrPayload.getters||delete T[_]}),Object.keys(T._hmrPayload.actions).forEach(_=>{_ in A._hmrPayload.actions||delete T[_]}),T._hmrPayload=A._hmrPayload,T._getters=A._getters,T._hotUpdating=!1})),I.env.NODE_ENV!=="production"&&I.env.NODE_ENV!=="test"&&Ro){const A={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(_=>{Object.defineProperty(T,_,Yi({value:T[_]},A))})}return i._p.forEach(A=>{if(I.env.NODE_ENV!=="production"&&I.env.NODE_ENV!=="test"&&Ro){const _=r.run(()=>A({store:T,app:i._a,pinia:i,options:a}));Object.keys(_||{}).forEach(V=>T._customProperties.add(V)),Yi(T,_)}else Yi(T,r.run(()=>A({store:T,app:i._a,pinia:i,options:a})))}),I.env.NODE_ENV!=="production"&&T.$state&&typeof T.$state=="object"&&typeof T.$state.constructor=="function"&&!T.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
68
|
+
state: () => new MyClass()
|
|
69
|
+
Found in store "${T.$id}".`),g&&o&&n.hydrate&&n.hydrate(T.$state,g),u=!0,c=!0,T}/*! #__NO_SIDE_EFFECTS__ */function Wj(e,t,n){let i;const s=typeof t=="function";i=s?n:t;function o(r,a){const l=Wg();if(r=(I.env.NODE_ENV==="test"&&la&&la._testing?null:r)||(l?Ei(Cf,null):null),r&&kc(r),I.env.NODE_ENV!=="production"&&!la)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
70
|
+
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
71
|
+
This will fail in production.`);r=la,r._s.has(e)||(s?cC(e,t,i,r):GT(e,i,r),I.env.NODE_ENV!=="production"&&(o._pinia=r));const u=r._s.get(e);if(I.env.NODE_ENV!=="production"&&a){const c="__hot:"+e,d=s?cC(c,t,i,r,!0):GT(c,Yi({},i),r,!0);a._hotUpdate(d),delete r.state.value[c],r._s.delete(c)}if(I.env.NODE_ENV!=="production"&&Ro){const c=Vi();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 zj(e){const t=dt(e),n={};for(const i in t){const s=t[i];s.effect?n[i]=W({get:()=>e[i],set(o){e[i]=o}}):(Wt(s)||Li(s))&&(n[i]=uo(e,i))}return n}const WT=Wj("toast",()=>{const e=fe([]),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}}),$j={class:"snackbar__message"},Uj=["innerHTML"],jj={key:0,class:"actions-notification"},Kj=St(ct({__name:"Snackbar",setup(e){const t=xv,n=WT(),{removeNotification:i}=n,{notifications:s}=zj(n),o=r=>r.trim().startsWith("<svg");return(r,a)=>(X(),tt(ML,{name:"list",tag:"div",class:"notification-wrapper"},{default:ke(()=>[(X(!0),ye(Ft,null,An(le(s),l=>{var u;return ut((X(),ye("div",{key:l.id,class:Kt(["notification-item",`notification--${l.type||"info"} ${!(l!=null&&l.actions)||((u=l==null?void 0:l.actions)==null?void 0:u.length)==0?"snackbar-type":""}`])},[Pe("p",$j,[l.icon&&!o(l.icon)?(X(),tt(ot,{key:0,src:l.icon,source:"remote",size:"16"},null,8,["src"])):at("",!0),l.icon&&o(l.icon)?(X(),ye("i",{key:1,class:"icon-draw",innerHTML:l.icon},null,8,Uj)):at("",!0),wt(" "+mt(l.message),1)]),l.actions?(X(),ye("div",jj,[(X(!0),ye(Ft,null,An(l.actions,c=>(X(),tt(gt,gn({key:c.label},{ref_for:!0},c,{onClick:c.action}),{prefix:ke(()=>[c.btnIcon?(X(),tt(ot,{key:0,src:c.btnIcon,source:"remote",size:"12"},null,8,["src"])):at("",!0)]),_:2},1040,["onClick"]))),128))])):at("",!0),Ee(gt,{variant:"tertiary",onClick:c=>le(i)(l.id),class:"close-btn",size:18},{default:ke(()=>[Ee(ot,{src:"Xmark",size:"12"})]),_:1},8,["onClick"])],2)),[[le(t)]])}),128))]),_:1}))}}),[["__scopeId","data-v-6d01d54d"]]),qj=["draggable","onDragstart","onDragenter","onDragleave","onDrop","onFocus"],Yj={key:0,class:"drag-handle","aria-hidden":"true"},Zj={class:"draggable-item"},Jj=St(ct({__name:"DragDropList",props:{modelValue:{default:()=>[]},value:{default:void 0},groupName:{default:"default"}},emits:["update","update:modelValue","input"],setup(e,{emit:t}){const n=e,i=t,s=fe([]),o=fe(null),r=fe(null),a=fe(null),l=fe(0),u=W(()=>n.value!==void 0?n.value:n.modelValue);Dt(u,D=>{s.value=[...D]},{immediate:!0});const c=(D,w)=>{var R;if((R=s.value[w])!=null&&R.required){D.preventDefault();return}r.value=w,D.dataTransfer&&(D.dataTransfer.effectAllowed="move",D.dataTransfer.setData("text/plain",w.toString()),D.dataTransfer.setData("application/json",JSON.stringify({index:w,groupName:n.groupName}))),setTimeout(()=>{const x=D.target;x==null||x.classList.add("drag-item--dragging")},0)},d=D=>{r.value=null,a.value=null,l.value=0;const w=D.target;w==null||w.classList.remove("drag-item--dragging")},h=(D,w)=>{D.preventDefault(),!(r.value===null||r.value===w)&&(l.value++,a.value=w)},p=(D,w)=>{l.value--,l.value===0&&(a.value=null)},g=D=>{D.preventDefault(),D.dataTransfer&&(D.dataTransfer.dropEffect="move")},C=(D,w)=>{D.preventDefault(),D.stopPropagation();const R=r.value;if(R===null||R===w){b();return}const x=[...s.value],[T]=x.splice(R,1);x.splice(w,0,T),s.value=x,S(x),b()},v=D=>{D.preventDefault(),b()},b=()=>{r.value=null,a.value=null,l.value=0},S=D=>{i("update",D,n.groupName),i("update:modelValue",D),i("input",D)};return(D,w)=>(X(),ye("div",{class:"drag-drop-container",onDragover:qt(g,["prevent"]),onDrop:qt(v,["prevent"])},[(X(!0),ye(Ft,null,An(s.value,(R,x)=>(X(),ye("div",{key:R.id||x,class:Kt(["drag-item",{"drag-item--focused":o.value===x,"drag-item--dragging":r.value===x,"drag-item--over":a.value===x,"drag-item--disabled":R.required}]),draggable:!R.required,tabindex:"0",onDragstart:T=>c(T,x),onDragend:d,onDragenter:qt(T=>h(T,x),["prevent"]),onDragleave:T=>p(),onDragover:qt(g,["prevent"]),onDrop:qt(T=>C(T,x),["prevent"]),onFocus:T=>o.value=x,onBlur:w[0]||(w[0]=T=>o.value=null)},[Rt(D.$slots,"item",{item:R,index:x},()=>[R.required?at("",!0):(X(),ye("span",Yj," :: ")),Pe("div",Zj,mt(R.name),1)],!0)],42,qj))),128))],32))}}),[["__scopeId","data-v-802cbeab"]]),Qj=["id","disabled"],Xj=["for"],dC=St(ct({__name:"DragDropItem",props:{item:{},disabled:{type:Boolean},columnStates:{}},emits:["toggle-column"],setup(e,{emit:t}){const n=e,i=fe(!1),s=fe(n.columnStates[String(n.item.field)]||!1),o=t,r=(l,u)=>{n.disabled||(s.value=!s.value)},a=W(()=>{var l,u;return(u=(l=n.item)==null?void 0:l.field)==null?void 0:u.includes("metric")});return Dt(()=>s.value,()=>{o("toggle-column",n.item.field,n.item.required)}),(l,u)=>{const c=Nu("tooltip");return X(),ye("div",{key:e.item.field,class:Kt(["column-config__item",{disabled:e.disabled}])},[ut(Pe("input",{id:`col-${e.item.field}`,"onUpdate:modelValue":u[0]||(u[0]=d=>s.value=d),type:"checkbox",disabled:e.disabled},null,8,Qj),[[WL,s.value]]),Ee(ot,{source:"remote",src:"GripVertical",size:"16",class:"handler",color:"var(--primary-color)"}),ut((X(),ye("label",{class:"column-config__item-label",for:`col-${e.item.field}`,onClick:u[1]||(u[1]=qt(d=>{var h;return r((h=e.item)==null?void 0:h.field,e.item.required)},["prevent"]))},[wt(mt(e.item.headerName),1)],8,Xj)),[[c,{content:e.item.headerName,bypassOverflowCheck:!1}]]),a.value?ut((X(),ye("div",{key:0,class:"badge",onHover:u[2]||(u[2]=d=>i.value=!0)},[...u[3]||(u[3]=[wt(" M ",-1)])],32)),[[c,"Metric"]]):at("",!0)],2)}}}),[["__scopeId","data-v-89162ce3"]]),e8={class:"table-customization"},t8={class:"column-config"},n8={key:0,class:"no-columns"},i8={class:"column-config__list"},s8={key:0,class:"column-config__pinned-section"},o8={key:1,class:"column-config__pinned-section"},r8={class:"column-config__footer"},a8=St(ct({__name:"TableCustomization",props:{modelValue:{}},emits:["update:modelValue","input"],setup(e,{emit:t}){const n=e,i=t,s=fe(""),o=fe([]),r=fe({}),{triggerRef:a,popupRef:l}=bo({placement:"bottom-end",trigger:"click"}),u=W(()=>o.value.filter(S=>S.pinned==="left"&&S.field&&S.headerName)),c=W(()=>o.value.filter(S=>S.pinned==="right"&&S.field)),d=W({get:()=>o.value.filter(S=>!S.pinned&&S.field),set:S=>{o.value=[...u.value,...S,...c.value]}}),h=W(()=>{if(!s.value)return{};const S=s.value.toLowerCase();return[...o.value,...d.value].reduce((D,w)=>{var R;return(R=w.headerName)!=null&&R.toLowerCase().includes(S)&&w.field&&(D[w.field]=!0),D},{})}),p=W(()=>n.modelValue),g=()=>{const S={};o.value.forEach(D=>{D.field&&(S[D.field]=!D.hide)}),r.value=S},C=()=>{const S=o.value.map(D=>({...D,hide:D.field?!r.value[D.field]:!1}));i("update:modelValue",S),i("input",S)},v=S=>{o.value=[...u.value,...S,...c.value],C()},b=(S,D)=>{!D&&S&&(r.value[S]=!r.value[S],C())};return Dt(p,S=>{S&&S.length>0&&(o.value=[...S],g())},{immediate:!0}),(S,D)=>{const w=Nu("tooltip");return X(),ye("div",e8,[Pe("div",{ref_key:"triggerRef",ref:a},[Rt(S.$slots,"trigger",{},()=>[ut((X(),tt(gt,{variant:["secondary"]},{prefix:ke(()=>[Ee(ot,{src:"Gear",size:"14"})]),default:ke(()=>[D[2]||(D[2]=wt(" Customise ",-1))]),_:1})),[[w,"Customise table columns"]])],!0)],512),Pe("div",{ref_key:"popupRef",ref:l,class:"tippy-content-wrapper"},[Pe("div",t8,[Ee(_v,{modelValue:s.value,"onUpdate:modelValue":D[0]||(D[0]=R=>s.value=R)},null,8,["modelValue"]),D[5]||(D[5]=Pe("div",{class:"column-config__header"},[Pe("label",null,"Manage columns")],-1)),Object.entries(h.value).length===0&&s.value.length>0?(X(),ye("div",n8,[...D[3]||(D[3]=[wt(" No results. ",-1),Pe("br",null,null,-1),wt(" Try another search. ",-1)])])):at("",!0),Pe("div",i8,[u.value.length>0?(X(),ye("div",s8,[(X(!0),ye(Ft,null,An(u.value,R=>ut((X(),tt(dC,{key:R.field,item:R,disabled:!0,columnStates:r.value},null,8,["item","columnStates"])),[[Ur,h.value[R.field]||!s.value]])),128))])):at("",!0),Ee(Jj,{modelValue:d.value,"onUpdate:modelValue":D[1]||(D[1]=R=>d.value=R),"group-name":"columns",onUpdate:v},{item:ke(({item:R})=>[ut(Ee(dC,{item:R,disabled:!1,columnStates:r.value,onToggleColumn:b},null,8,["item","columnStates"]),[[Ur,h.value[R.field]||!s.value]])]),_:1},8,["modelValue"]),c.value.length>0?(X(),ye("div",o8,[(X(!0),ye(Ft,null,An(c.value.filter(R=>{var x;return R.headerName&&((x=R.headerName)==null?void 0:x.length)>0}),R=>ut((X(),tt(dC,{key:R.field,item:R,disabled:!0,columnStates:r.value},null,8,["item","columnStates"])),[[Ur,h.value[R.field]||!s.value]])),128))])):at("",!0)]),Pe("div",r8,[Ee(gt,{type:"button",variant:"secondary",disabled:!0},{default:ke(()=>[...D[4]||(D[4]=[Pe("span",null,"Add Column",-1)])]),_:1})])])],512)])}}}),[["__scopeId","data-v-d0169c41"]]),l8={class:"no-data-item-table"},u8={class:"visual"},c8={class:"description"},d8=St(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=W(()=>t.isSearching||t.isFiltering?"NoDataSearchFilter":"ClickToCreate"),s=W(()=>t.isSearching?n.noSearchResults:t.isFiltering?n.noFilterResults:n.noData);return(o,r)=>(X(),ye("div",l8,[Pe("div",u8,[Ee(h4,{source:"remote",src:i.value,ratio:"4/3",maxWidth:500,maxHeight:350},null,8,["src"])]),Pe("div",c8,mt(s.value),1)]))}}),[["__scopeId","data-v-9a39048b"]]),h8={status:m6,dateRange:W3,checkbox:void 0,dateTime:t6,format:void 0,number:void 0,rating:GF,more:c4,assignee:H3,name:VF,text:R3,metric:u6},f8={status:!0,dateRange:!0,checkbox:!0,dateTime:!1,format:!1,number:!1,rating:!1,more:!1,assignee:!0,name:!1,text:!1,metric:!1},p8={status:NF,checkbox:"agCheckboxCellEditor",dateTime:null,format:BF,number:"agNumberCellEditor",more:HF,assignee:AF,dateRange:z3,rating:null,name:VF,text:null,metric:null},zT={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]},g8={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 da{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,modelValue:s}}static fromType(t,n){var C,v;const{wrapVueCellRenderer:i,wrapVueCellEditor:s}=this.getWrappers(),o=h8[t],r=p8[t],a=f8[t]??!1,l={minWidth:((C=zT[t])==null?void 0:C[0])||250,maxWidth:((v=zT[t])==null?void 0:v[1])||250},u=g8[t]||{},c=b=>!!b&&typeof b!="string",d=c(o)?i(o):o,h=n.editable??a;let p={};return h&&r&&(p={cellEditor:c(r)?s(r):r,cellEditorParams:this.buildCommonCellParams,singleClickEdit:!0,cellEditorPopup:!0,cellEditorPopupPosition:"under"}),{headerName:t,...l,cellRenderer:d,cellRendererParams:this.buildCommonCellParams,editable:h,...n,...p,...u,context:{...n.context,workspaceId:this.workspaceId,entityId:this.entityId},headerComponentParams:b=>({...typeof n.headerComponentParams=="function"?n.headerComponentParams(b):n.headerComponentParams,headerType:t==="dateRange"?"date":"text"})}}}rn(da,"wrappers",null),rn(da,"workspaceId",""),rn(da,"entityId","");function m8(e){return"stopEditing"in e}const v8=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},dataFetching:{type:Function,default:void 0},id:{type:[String,Number],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),()=>Ee(t,{params:e.params,disabled:e.disabled,readOnly:e.readOnly,value:e.value,data:e.data,dataFetching:e.dataFetching,id:e.id})}});function $T(e){return class{constructor(){rn(this,"container");rn(this,"vNode",null);rn(this,"componentInstance",null);rn(this,"params");rn(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=m8(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),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};this.vNode=Ee(v8,o),x0(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{x0(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 Rf(e){return $T(e)}function UT(e){return $T(e)}var ha=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 Fo(e){return e==null||e===""?null:e}function Ge(e){return e!=null&&e!==""}function nn(e){return!Ge(e)}function hC(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Oc(e,t){const n=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return n===i}function C8(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 w8=/[&<>"']/g,y8={"&":"&","<":"<",">":">",'"':""","'":"'"};function Vl(e){return(e==null?void 0:e.toString().toString())??null}function Mc(e){var t;return((t=Vl(e))==null?void 0:t.replace(w8,n=>y8[n]))??null}function zs(e){return e.eRootDiv.getRootNode()}function an(e){return zs(e).activeElement}function On(e){const{gos:t,eRootDiv:n}=e;let i=null;const s=t.get("getDocument");return s&&Ge(s)?i=s():n&&(i=n.ownerDocument),i&&Ge(i)?i:document}function jT(e){const t=an(e);return t===null||t===On(e).body}function KT(e){return On(e).defaultView||window}function fC(e){let t=null,n=null;try{t=On(e).fullscreenElement}catch{}finally{t||(t=zs(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 b8(e){const t=fC(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function S8(e){const t=fC(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function bs(e,t,n){n==null||typeof n=="string"&&n==""?qT(e,t):Zi(e,t,n)}function Zi(e,t,n){e.setAttribute(YT(t),n.toString())}function qT(e,t){e.removeAttribute(YT(t))}function YT(e){return`aria-${e}`}function rr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function E8(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function R8(e){return e.getAttribute("aria-label")}function Bl(e,t){bs(e,"label",t)}function Lc(e,t){bs(e,"labelledby",t)}function ZT(e,t){bs(e,"live",t)}function D8(e,t){bs(e,"atomic",t)}function F8(e,t){bs(e,"relevant",t)}function x8(e,t){bs(e,"invalid",t)}function T8(e,t){bs(e,"disabled",t)}function JT(e,t){bs(e,"hidden",t)}function pC(e,t){Zi(e,"expanded",t)}function P8(e,t){Zi(e,"setsize",t)}function A8(e,t){Zi(e,"posinset",t)}function I8(e,t){Zi(e,"multiselectable",t)}function _8(e,t){Zi(e,"rowcount",t)}function Df(e,t){Zi(e,"rowindex",t)}function k8(e,t){Zi(e,"rowspan",t)}function O8(e,t){Zi(e,"colcount",t)}function QT(e,t){Zi(e,"colindex",t)}function M8(e,t){Zi(e,"colspan",t)}function L8(e,t){Zi(e,"sort",t)}function N8(e){qT(e,"sort")}function XT(e,t){bs(e,"selected",t)}function V8(e,t){bs(e,"controls",t)}function B8(e,t){V8(e,t.id),Lc(t,e.id)}function eP(e,t){bs(e,"owns",t)}function Ff(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var H8="[tabindex], input, select, button, textarea, [href]",tP="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Nc(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(tP)?!1:$s(e)}function sn(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-hidden",!t),i||JT(e,!t)}function G8(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-invisible",!t),i||JT(e,!t)}function Vc(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 fa(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 pa(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 gC(e){const t=pa(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Bc(e){const t=pa(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function nP(e){const{height:t,marginBottom:n,marginTop:i}=pa(e);return Math.floor(t+n+i)}function xf(e){const{width:t,marginLeft:n,marginRight:i}=pa(e);return Math.floor(t+n+i)}function iP(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:o}=pa(e);return{top:t.top+(n||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(o||0)}}function Tf(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function Pf(e,t,n){n&&(t*=-1),e.scrollLeft=t}function Bn(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Ss(e){e!=null&&e.parentNode&&e.remove()}function sP(e){return!!e.offsetParent}function $s(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!sP(e)||window.getComputedStyle(e).visibility!=="visible")}function mC(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function oP(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 rP(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 W8(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Hc(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=W8(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 Af(e){return()=>{const t=e();return t?vC(t)||aP(t):!0}}function vC(e){return e.clientWidth<e.scrollWidth}function aP(e){return e.clientHeight<e.scrollHeight}function If(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Us(e,t)}function Us(e,t){t=CC(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Gc(e,t){t=CC(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function CC(e){return typeof e=="number"?`${e}px`:e}function wC(e){return e instanceof Node||e instanceof HTMLElement}function Ii(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function ar(e,t,n){const s=KT(e).ResizeObserver,o=s?new s(n):null;return o==null||o.observe(t),()=>o==null?void 0:o.disconnect()}function xo(e,t){const n=KT(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var lP="data-ref",yC;function uP(){return yC??(yC=document.createTextNode(" ")),yC.cloneNode()}function Wc(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(lP,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(uP()),l=!1),a.append(Wc(u)),a.appendChild(uP())))}return a}var z8=["touchstart","touchend","touchmove","touchcancel","scroll"],$8=["wheel"],bC={},cP=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof bC[n]=="boolean")return bC[n];const i=document.createElement(e[n]||"div");return n="on"+n,bC[n]=n in i}})();function U8(e,t){return!t||!e?!1:K8(t).indexOf(e)>=0}function j8(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function K8(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():j8(t)}function q8(e,t,n){const i=Y8(t);let s;i!=null&&(s={passive:i}),e.addEventListener(t,n,s)}var Y8=e=>{const t=z8.includes(e),n=$8.includes(e);if(t)return!0;if(n)return!1};function dP(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 zc=(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 $c(e,t){return e.gos.isElementInThisInstance(t.target)}function Z8(e,t,n){const s=e.getBoundingClientRect().height,o=b8(n)-2,r=S8(n)-2;if(!e.offsetParent)return;const l=iP(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const p=On(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 _f=(e,...t)=>{for(const n of t){const[i,s,o,r]=n;i.addEventListener(s,o,r),e.push(n)}},SC=e=>{if(e){for(const[t,n,i,s]of e)t.removeEventListener(n,i,s);e.length=0}},lr=e=>{e.cancelable&&e.preventDefault()};function J8(e,t){return t}function hP(e){return(e==null?void 0:e.getLocaleTextFunc())??J8}function Q8(e,t,n,i){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(i):s,i)}function X8(e){return(t,n,i)=>e({key:t,defaultValue:n,variableValues:i})}function eK(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 js=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 ha),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(tK(e))e.__addEventListener(t,n),i=()=>(e.__removeEventListener(t,n),null);else{const s=nK(e);e instanceof HTMLElement?q8(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 hP(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 tK(e){return e.__addEventListener!==void 0}function nK(e){return e.eventServiceType==="global"}var ge=class extends js{},fP={};function EC(e,t){fP[t]||(e(),fP[t]=!0)}var iK={pending:!1,funcs:[]},sK={pending:!1,funcs:[]};function RC(e,t="setTimeout",n){const i=t==="raf"?sK:iK;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"?xo(n,s):window.setTimeout(s,0)}function Hn(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 pP(e,t){let n=0;return function(...i){const s=this,o=Date.now();o-n<t||(n=o,e.apply(s,i))}}function oK(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 gP=new Set(["__proto__","constructor","prototype"]);function rK(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=>!gP.has(i)))t(n,e[n])}}function di(e,t,n=!0,i=!1){Ge(t)&&rK(t,(s,o)=>{let r=e[s];r!==o&&(i&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},e[s]=r),mP(o)&&mP(r)&&!Array.isArray(r)?di(r,o,n,i):(n||o!==void 0)&&(e[s]=o))})}function mP(e){return typeof e=="object"&&e!==null}var DC=class Wo{static applyGlobalGridOptions(t){if(!Wo.gridOptions)return{...t};let n={};return di(n,Wo.gridOptions,!0,!0),Wo.mergeStrategy==="deep"?di(n,t,!0,!0):n={...n,...t},Wo.gridOptions.context&&(n.context=Wo.gridOptions.context),t.context&&(Wo.mergeStrategy==="deep"&&n.context&&di(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Wo.mergeStrategy==="deep"){const i=aK(t);if(i&&typeof i=="object"&&typeof n=="object")return Wo.applyGlobalGridOptions({[t]:n})[t]}return n}};DC.gridOptions=void 0,DC.mergeStrategy="shallow";var FC=DC;function aK(e){var t;return(t=FC.gridOptions)==null?void 0:t[e]}var lK={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},vP="https://www.ag-grid.com";function ur(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Uc(e,...t){EC(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Hl(e,...t){EC(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var CP=new Set,kf={},Gl={},Of,wP=!1,yP=!1,uK=!1;function cK(e){const[t,n]=e.version.split(".")||[],[i,s]=Of.split(".")||[];return t===i&&n===s}function dK(e){var i;Of||(Of=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?cK(e)||Hl(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Of}.`)):Hl(t(`'${e.moduleName}' is incompatible.`));const n=(i=e.validate)==null?void 0:i.call(e);n&&!n.isValid&&Hl(`${n.message}`)}function jc(e,t,n=!1){n||(wP=!0),dK(e);const i=e.rowModels??["all"];CP.add(e);let s;t!==void 0?(yP=!0,Gl[t]===void 0&&(Gl[t]={}),s=Gl[t]):s=kf;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)jc(o,t,n)}function hK(e){delete Gl[e]}function xC(e,t,n){const i=s=>{var o,r,a;return!!((o=kf[s])!=null&&o[e])||!!((a=(r=Gl[t])==null?void 0:r[s])!=null&&a[e])};return i(n)||i("all")}function TC(){return yP}function fK(e,t){const n=Gl[e]??{};return[...Object.values(kf.all??{}),...Object.values(n.all??{}),...Object.values(kf[t]??{}),...Object.values(n[t]??{})]}function pK(){return new Set(CP)}function gK(){return wP}function mK(){return uK}var vK=class{static register(e){jc(e,void 0)}static registerModules(e){for(const t of e)jc(t,void 0)}},Be="34.3.1",bP=2e3,SP=100,EP="_version_",Mf=null,Wl=`${vP}/javascript-data-grid`;function CK(e){Mf=e}function wK(e){Wl=e}function RP(e,t,n){return(Mf==null?void 0:Mf(e,t))??[EK(e,t,n)]}function PC(e,t,n,i,s){e(`${i?"warning":"error"} #${t}`,...RP(t,n,s))}function yK(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 bK(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=yK(e)),t}function Lf(e){return e===void 0?"undefined":e===null?"null":e}function AC(e,t){return`${e}?${t.toString()}`}function SK(e,t,n){const i=Array.from(t.entries()).sort((o,r)=>r[1].length-o[1].length);let s=AC(e,t);for(const[o,r]of i){if(o===EP)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=r.length-u>SP?r.slice(0,r.length-u)+l:r.slice(0,SP)+l;t.set(o,c),s=AC(e,t)}return s}function DP(e,t){const n=new URLSearchParams;if(n.append(EP,Be),t)for(const o of Object.keys(t))n.append(o,bK(t[o]));const i=`${Wl}/errors/${e}`,s=AC(i,n);return s.length<=bP?s:SK(i,n,bP)}var EK=(e,t,n)=>{const i=DP(e,t);return`${`${n?n+`
|
|
72
|
+
`:""}Visit ${i}`}${n?"":`
|
|
73
|
+
Alternatively register the ValidationModule to see the full message in the console.`}`};function Re(...e){PC(Uc,e[0],e[1],!0)}function $t(...e){PC(Hl,e[0],e[1],!1)}function Kc(e,t,n){PC(Hl,e,t,!1,n)}function RK(e,t){const n=t[0];return`error #${n} `+RP(n,t[1],e).join(" ")}function Ks(...e){return RK(void 0,e)}function FP(e,t){return e.get("rowModelType")===t}function mn(e,t){return FP(e,"clientSide")}function zl(e,t){return FP(e,"serverSide")}function Gn(e,t){return e.get("domLayout")===t}function ga(e){return Bf(e)!==void 0}function xP(e){return typeof e.get("getRowHeight")=="function"}function DK(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function cr(e,t,n=!1,i){const{gos:s,environment:o}=e;if(i==null&&(i=o.getDefaultRowHeight()),xP(s)){if(n)return{height:i,estimated:!0};const l={node:t,data:t.data},u=s.getCallback("getRowHeight")(l);if(IC(u))return u===0&&Re(23),{height:Math.max(1,u),estimated:!1}}if(t.detail&&s.get("masterDetail"))return FK(s);const r=s.get("rowHeight");return{height:r&&IC(r)?r:i,estimated:!1}}function FK(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return IC(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ma(e){const{environment:t,gos:n}=e,i=n.get("rowHeight");if(!i||nn(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(Re(24),t.getDefaultRowHeight())}function IC(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function TP(e,t,n){const i=t[e.getDomDataKey()];return i?i[n]:void 0}function va(e,t,n,i){const s=e.getDomDataKey();let o=t[s];nn(o)&&(o={},t[s]=o),o[n]=i}function $l(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function PP(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Gn(e,"print"))}function qs(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function _C(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function AP(e){return e.get("grandTotalRow")}function IP(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function _P(e,t,n){return!!t.group&&!t.footer&&IP(e,n)}function Ul(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let i=t(n);return typeof i!="string"&&(EC(()=>Re(25,{id:i}),"getRowIdString"),i=String(i)),i}}function xK(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function TK(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function jl(e){return(e==null?void 0:e.checkboxes)??!0}function Nf(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Vf(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function kC(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function PK(e){return typeof e.get("rowSelection")!="string"}function To(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function kP(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 AK(e){const t=kP(e);return t===!0||t==="enableSelection"}function IK(e){const t=kP(e);return t===!0||t==="enableDeselection"}function OC(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Bf(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 qc(e){return Bf(e)==="multiRow"}function _K(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Hf(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 OP(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function kK(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function Yc(e){const t=Hf(e);return t==="descendants"||t==="filteredDescendants"}function MP(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function OK(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function _i(e){return e.get("columnMenu")==="legacy"}function MK(e){return!_i(e)}function LK(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function st(e,t){return e.addCommon(t)}function LP({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var NK={resizable:!0,sortable:!0},VK=0;function NP(){return VK++}function dr(e){return e instanceof Ca}var Ca=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=NP(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new ha,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Mc(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=Ge(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=Ge(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 st(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]??NK[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 st(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 nn(this.sort)}isSorting(){return Ge(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 Re(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 st(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(nn(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(nn(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&&di(i,n),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Yn(e){return e instanceof Gf}var Gf=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=NP(),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)dr(t)?e(t):Yn(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)dr(t)?e.push(t):Yn(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)Yn(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},BK={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function VP(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 HK=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=hC(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&&Re(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}n++}}};function jt(e){if(e!=null&&e.length)return e[e.length-1]}function hr(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 Zc(e,t){if(e)for(const n of e)t(n)}function Es(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function BP(e,t,n){for(let i=0;i<t.length;i++)Es(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(n,0,t[i])}var Wf="ag-Grid-AutoColumn",HP="ag-Grid-SelectionColumn",GP="ag-Grid-RowNumbersColumn";function WP(e){const t=[],n=i=>{for(let s=0;s<i.length;s++){const o=i[s];dr(o)?t.push(o):Yn(o)&&n(o.getChildren())}};return n(e),t}function Po(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function zf(e,t,n){const i={};if(!t)return;_o(null,t,o=>{i[o.getInstanceId()]=o}),n&&_o(null,n,o=>{i[o.getInstanceId()]=null});const s=Object.values(i).filter(o=>o!=null);e.context.destroyBeans(s)}function MC(e){return e.getId().startsWith(Wf)}function Ao(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(HP))??!1}function Io(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(GP))??!1}function GK(e){return Ao(e)||Io(e)}function $f(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function WK(e,t){return hr(e,t,(n,i)=>n.getColId()===i.getColId())}function zK(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function Kl(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Jc(e,t){const n=e===t,i=e.getColDef()===t,s=e.getColId()==t;return n||i||s}var $K=(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),Ge(i)&&e[i]!==void 0&&(s.value2=e[i],o=!0)),!o&&t&&(t[n]!==void 0&&(s.value1=t[n]),Ge(i)&&t[i]!==void 0&&(s.value2=t[i])),s},UK=(e,t)=>{Yn(e)&&e.setupExpandable(),e.originalParent=t};function jK(e,t=null,n,i,s){const o=new HK,{existingCols:r,existingGroups:a,existingColKeys:l}=KK(i);o.addExistingKeys(l);const u=zP(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 _o(null,h,UK),{columnTree:h,treeDepth:d}}function KK(e){const t=[],n=[],i=[];return e&&_o(null,e,s=>{if(Yn(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 zP(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&&XK(d)?u[c]=l.createProvidedColumnGroup(i,d,n,s,o,r,a):u[c]=qK(e,i,d,s,o,a)}return u}function qK(e,t,n,i,s,o){var l;const r=ZK(n,i);r&&(i==null||i.splice(r.idx,1));let a=r==null?void 0:r.column;if(a){const u=LC(e,n,a.getColId());a.setColDef(u,n,o),YK(e,a,u,o)}else{const u=s.getUniqueKey(n.colId,n.field),c=LC(e,n,u);a=new Ca(c,n,u,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function $P(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 YK(e,t,n,i){$P(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 ZK(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 LC(e,t,n,i){const{gos:s,dataTypeSvc:o}=e,r={},a=s.get("defaultColDef");di(r,a,!1,!0);const l=JK(e,r,t,n);l&&QK(e,l,r);const u=r.cellDataType;di(r,t,!1,!0),u!==void 0&&(r.cellDataType=u);const c=s.get("autoGroupColumnDef"),d=qs(s);return t.rowGroup&&c&&d&&di(r,{sort:c.sort,initialSort:c.initialSort},!1,!0),o&&(o.postProcess(r),o.validateColDef(r)),s.validateColDef(r,n,i),r}function JK(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?$f(o):void 0}function QK(e,t,n){if(!t.length)return;const i=Object.assign({},BK),s=e.gos.get("columnTypes")||{};for(const o of Object.keys(s)){const r=s[o];o in i?Re(34,{key:o}):(r.type&&Re(35),i[o]=r)}for(const o of t){const r=i[o.trim()];r?di(n,r,!1,!0):Re(36,{t:o})}}function XK(e){return e.children!==void 0}function _o(e,t,n){if(t)for(let i=0;i<t.length;i++){const s=t[i];Yn(s)&&_o(s,s.getChildren(),n),n(s,e)}}function UP(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 jP(e,t){let n=!0;return _o(null,t,i=>{if(!Yn(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 KP(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 qP(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,s=KP(t,o=>o.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:i,source:n})}function e7(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,s=KP(t,o=>o.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:n})}function t7(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 Rs(e,t,n){var R;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 Re(32),!1;const b=(x,T,H,N,A)=>{if(!x)return;const _=$K(T,t.defaultState),V=_("flex").value1;if($P(e,x,_("hide").value1,_("sort").value1,_("sortIndex").value1,_("pinned").value1,V,n),V==null){const ie=_("width").value1;if(ie!=null){const me=x.getColDef().minWidth??d.getDefaultColumnMinWidth();me!=null&&ie>=me&&x.setActualWidth(ie,n)}}A||!x.isPrimary()||(h==null||h.syncColumnWithState(x,n,_),s==null||s.syncColumnWithState(x,n,_,H),o==null||o.syncColumnWithState(x,n,_,N))},S=(x,T,H)=>{var we,Ae;const N=YP(e,n),A=T.slice(),_={},V={},ie=[],me=[],Te=[];let q=0;const z=(s==null?void 0:s.columns.slice())??[],M=(o==null?void 0:o.columns.slice())??[];for(const Le of x){const nt=Le.colId;if(nt.startsWith(Wf)){ie.push(Le),Te.push(Le);continue}if(Ao(nt)){me.push(Le),Te.push(Le);continue}const ht=H(nt);ht?(b(ht,Le,_,V,!1),Es(A,ht)):(Te.push(Le),q+=1)}const L=Le=>b(Le,null,_,V,!1);A.forEach(L),s==null||s.sortColumns(JP.bind(s,_,z)),o==null||o.sortColumns(JP.bind(o,V,M)),i.refreshCols(!1,n);const ne=(Le,nt,Je=[])=>{for(const ht of nt){const Ht=Le(ht.colId);Es(Je,Ht),b(Ht,ht,null,null,!0)}Je.forEach(L)};return ne(Le=>(r==null?void 0:r.getColumn(Le))??null,ie,(we=r==null?void 0:r.getColumns())==null?void 0:we.slice()),ne(Le=>(a==null?void 0:a.getColumn(Le))??null,me,(Ae=a==null?void 0:a.getColumns())==null?void 0:Ae.slice()),i7(t,i,g),u.refresh(n),p.dispatchEvent({type:"columnEverythingChanged",source:n}),N(),{unmatchedAndAutoStates:Te,unmatchedCount:q}};l==null||l.start();let{unmatchedAndAutoStates:D,unmatchedCount:w}=S(t.state||[],C,x=>i.getColDefCol(x));if(D.length>0||Ge(t.defaultState)){const x=((R=c==null?void 0:c.getPivotResultCols())==null?void 0:R.list)??[];w=S(D,x,T=>(c==null?void 0:c.getPivotResultCol(T))??null).unmatchedCount}return l==null||l.finish(),w===0}function n7(e,t){var S,D;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=WP(l),c=[];let d=1e3,h=1e3;const p=w=>{const R=ZP(w);nn(R.rowGroupIndex)&&R.rowGroup&&(R.rowGroupIndex=d++),nn(R.pivotIndex)&&R.pivot&&(R.pivotIndex=h++),c.push(R)};(S=i==null?void 0:i.getColumns())==null||S.forEach(p),(D=s==null?void 0:s.getColumns())==null||D.forEach(p),u==null||u.forEach(p),Rs(e,{state:c},t);const g=(i==null?void 0:i.getColumns())??[],b=[...(s==null?void 0:s.getColumns())??[],...g,...a].map(w=>({colId:w.colId}));Rs(e,{state:b,applyOrder:!0},t),o.dispatchEvent(st(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=Uf(e),c={};for(const d of u)c[d.colId]=d;return()=>{const d=(x,T,H,N)=>{const A=T.map(N),_=H.map(N);if(hr(A,_))return;const ie=new Set(T);for(const Te of H)ie.delete(Te)||ie.add(Te);const me=[...ie];a.dispatchEvent({type:x,columns:me,column:me.length===1?me[0]:null,source:t})},h=x=>{const T=[];return o.forAllCols(H=>{const N=c[H.getColId()];N&&x(N,H)&&T.push(H)}),T},p=x=>x.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((x,T)=>{const H=x.aggFunc!=null,N=H!=T.isValueActive(),A=H&&x.aggFunc!=T.getAggFunc();return N||A});C.length>0&&t7(a,"columnValueChanged",C,t),ql(a,h((x,T)=>x.width!=T.getActualWidth()),!0,t),qP(a,h((x,T)=>x.pinned!=T.getPinned()),t),e7(a,h((x,T)=>x.hide==T.isVisible()),t);const w=h((x,T)=>x.sort!=T.getSort()||x.sortIndex!=T.getSortIndex());w.length>0&&(r==null||r.dispatchSortChangedEvents(t,w));const R=Uf(e);o7(u,R,t,o,a)}}function Uf(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:i}=e,s=t.getColDefCols();if(nn(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 ZP(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 i7(e,t,n){if(!e.applyOrder||!e.state)return;const i=[];for(const s of e.state)s.colId!=null&&i.push(s.colId);s7(t.cols,i,t,n)}function s7(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(Wf)?s.splice(r++,0,a):s.push(a)}if(s=UP(s,i),!jP(s,n.getColTree())){Re(39);return}e.list=s}function o7(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 JP=(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},r7=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 S,D,w;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=(S=this.colDefCols)==null?void 0:S.list,h=(D=this.colDefCols)==null?void 0:D.tree,p=jK(t,this.colDefs,!0,h,e);zf(t,(w=this.colDefCols)==null?void 0:w.tree,p.columnTree);const g=p.columnTree,C=p.treeDepth,v=WP(g),b={};for(const R of v)b[R.getId()]=R;this.colDefCols={tree:g,treeDepth:C,list:v,map:b},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=DK(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(),!hr(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=MC(l);if(i){const c=r==null?void 0:r.includes(l);return u||c||s&&Ao(l)||o&&Io(l)}else return u||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Rs(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 Ca){const b=s.get(v);if(b==null)continue;(g==null||g<b)&&(g=b,C=v);continue}v.forEachLeafColumn(b=>{const S=s.get(b);S!=null&&(g==null||g<S)&&(g=S,C=b)})}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=UP(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;zf(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;Zc((o=this.colDefCols)==null?void 0:o.list,e),Zc((r=n==null?void 0:n.columns)==null?void 0:r.list,e),Zc((a=i==null?void 0:i.columns)==null?void 0:a.list,e),Zc((l=s==null?void 0:s.columns)==null?void 0:l.list,e),Zc((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(Jc(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}},QP=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 Qc(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var He=null;function XP(e){return typeof(e==null?void 0:e.getGui)=="function"}var eA=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)}},a7=0,Xc=class extends js{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=a7++,this.cssManager=new eA(()=>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(lP):null}applyElementsToComponent(e,t,n,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===He)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=mC(e):i=Wc(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),wC(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;G8(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;sn(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)}},Bt=class extends Xc{};function tA(e){return typeof e=="object"&&!!e.component}function l7(e,t){return new hn(n=>{n(window.setInterval(e,t))})}var hn=class kd{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 kd(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)})})}):kd.resolve()}static resolve(t=null){return new kd(n=>n(t))}then(t){return new kd(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 u7(e){return e?e.prototype&&"getGui"in e.prototype:!1}function nA(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 c7=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 D;const{name:o,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:d,popupPositionFromSelector:h}=nA(this.beans.frameworkOverrides,e,t,i),p,g;const C=w=>{const R=this.registry.getUserComponent(o,w);R&&(l=R.componentFromFramework?void 0:R.component,u=R.componentFromFramework?R.component:void 0,p=R.params,g=R.processParams)};if(a!=null&&C(a),l==null&&u==null&&n!=null&&C(n),l&&r&&!u7(l)&&(l=(D=this.agCompUtils)==null?void 0:D.adaptFunction(t,l)),!l&&!u){const{validation:w}=this.beans;s&&(a!==n||!n)?a?w!=null&&w.isProvidedUserComp(a)||$t(50,{compName:a}):n?w||$t(260,{...this.gos.getModuleErrorParams(),propName:o,compName:n}):$t(216,{name:o}):n&&!w&&$t(146,{comp:n});return}const v=this.mergeParams(e,t,i,c,p,g),b=l==null,S=l??u;return{componentFromFramework:b,componentClass:S,params:v,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(S,b,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?hn.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);di(r,u)}else typeof l=="object"&&di(r,l);return di(r,i),o?o(r):r}},d7={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},h7={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},f7={name:"headerComponent",optionalMethods:["refresh"]},p7={name:"innerHeaderComponent"},g7={name:"innerHeaderGroupComponent"},m7={name:"headerGroupComponent"},v7={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},C7={name:"loadingCellRenderer",cellRenderer:!0},w7={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},y7={name:"loadingOverlayComponent",optionalMethods:["refresh"]},b7={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},S7={name:"tooltipComponent"},NC={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},E7={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},R7={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},D7={name:"loadingCellRenderer",cellRenderer:!0},F7={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},x7={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function T7(e,t){return e.getCompDetailsFromGridOptions(h7,"agDragAndDropImage",t,!0)}function P7(e,t,n){return e.getCompDetails(t,f7,"agColumnHeader",n)}function A7(e,t,n){return e.getCompDetails(t,p7,void 0,n)}function I7(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,m7,"agColumnGroupHeader",t)}function _7(e,t,n){return e.getCompDetails(t,g7,void 0,n)}function k7(e,t){return e.getCompDetailsFromGridOptions(R7,void 0,t,!0)}function O7(e,t){return e.getCompDetailsFromGridOptions(D7,"agLoadingCellRenderer",t,!0)}function M7(e,t){return e.getCompDetailsFromGridOptions(F7,"agGroupRowRenderer",t,!0)}function L7(e,t){return e.getCompDetailsFromGridOptions(x7,"agDetailCellRenderer",t,!0)}function iA(e,t,n){return e.getCompDetails(t,v7,void 0,n)}function sA(e,t,n){return e.getCompDetails(t,C7,"agSkeletonCellRenderer",n,!0)}function oA(e,t,n){return e.getCompDetails(t,w7,"agCellEditor",n,!0)}function N7(e,t,n,i){const s=t.filter;return tA(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,NC,i,n,!0)}function V7(e,t,n){return e.getCompDetails(t,d7,"agDateInput",n,!0)}function B7(e,t){return e.getCompDetailsFromGridOptions(y7,"agLoadingOverlay",t,!0)}function H7(e,t){return e.getCompDetailsFromGridOptions(b7,"agNoRowsOverlay",t,!0)}function G7(e,t){return e.getCompDetails(t.colDef,S7,"agTooltipComponent",t,!0)}function W7(e,t,n,i){return e.getCompDetails(t,E7,i,n)}function rA(e,t){return nA(e,t,NC)}function VC(e,t,n){return e.mergeParams(t,NC,n)}function ed(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function z7(e){return typeof e=="object"&&!!e.getComp}var oe={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"},BC=class extends Xc{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()}},HC,GC,WC,zC,$C,UC,jC;function fr(){return HC===void 0&&(HC=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),HC}function aA(){return GC===void 0&&(GC=/(firefox)/i.test(navigator.userAgent)),GC}function lA(){return WC===void 0&&(WC=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),WC}function wa(){return zC===void 0&&(zC=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),zC}function KC(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!aA())?null:t.toString()}function $7(){if(jC!==void 0)return jC;if(!document.body)return-1;let e=1e6;const t=aA()?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(),jC=e,e}function U7(){return UC==null&&uA(),UC}function uA(){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&&(UC=n,$C=n===0)}function cA(){return $C==null&&uA(),$C}var qC="T",j7=new RegExp(`[${qC} ]`),K7=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${qC}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Ys(e,t){return e.toString().padStart(t,"0")}function ki(e,t=!0,n=qC){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>Ys(s,2)).join("-");return t&&(i+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>Ys(s,2)).join(":")),i}function jf(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Ys(e.getDate(),2),Ys(e.getHours(),2),`:${Ys(e.getMinutes(),2)}`,`:${Ys(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Ys(e.getDate(),2)].map(String):null}var YC=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"},dA=["January","February","March","April","May","June","July","August","September","October","November","December"],ZC=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function JC(e,t){if(t==null)return ki(e,!1);const n=Ys(e.getFullYear(),4),i={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>dA[e.getMonth()],MMM:()=>dA[e.getMonth()].slice(0,3),MM:()=>Ys(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${YC(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${YC(e.getDate())}`,DD:()=>Ys(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>ZC[e.getDay()],ddd:()=>ZC[e.getDay()].slice(0,3),dd:()=>ZC[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${YC(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 Kf(e,t=!1){return!!mi(e,t)}function q7(e){return Kf(e,!0)}function mi(e,t=!1,n){if(!e||!n&&!K7.test(e))return null;const[i,s]=e.split(j7);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 QC(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:i,filterByPercentageOfBestMatch:s}=e;let o=(n??[]).map((l,u)=>({value:l,relevance:Y7(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 Y7(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 hA(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var XC=!1,qf=0;function Z7(e){qf>0||(e.addEventListener("keydown",Yf),e.addEventListener("mousedown",Yf))}function J7(e){qf>0||(e.removeEventListener("keydown",Yf),e.removeEventListener("mousedown",Yf))}function Yf(e){const t=XC,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(XC=n)}function Q7(e){const t=On(e);return Z7(t),qf++,()=>{qf--,J7(t)}}function X7(){return XC}function Yl(e,t,n=!1){const i=H8;let s=tP;t&&(s+=", "+t),n&&(s+=', [tabindex="-1"]');const o=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>$s(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 ya(e,t=!1,n=!1,i=!1){const s=Yl(e,i?".ag-tab-guard":null,n),o=t?jt(s):s[0];return o?(o.focus({preventScroll:!0}),!0):!1}function ba(e,t,n,i){const s=Yl(t,n?':not([tabindex="-1"])':null),o=an(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 fA(e,t=5){let n=0;for(;e&&KC(e)===null&&++n<=t;)e=e.parentElement;return KC(e)===null?null:e}var eq=".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)}",tq=class extends Xc{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(eq)}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;Bn(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(sn(t,!1),rr(t,"presentation")):(sn(t,!0),rr(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:(If(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Vc(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},pA=class extends tq{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==""||R8(e)!==null?Lc(e,""):Lc(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 Us(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 nq(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 Sa=class extends pA{constructor(e,t,n="text",i="input"){super(e,(e==null?void 0:e.template)??nq(i),[],t),this.inputType=n,this.displayFieldTag=i,this.eLabel=He,this.eWrapper=He,this.eInput=He}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,Ii(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return If(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 Ii(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Bl(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Vc(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Ii(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Ii(this.eInput,"autocomplete",t)}return this}},ew=class extends Sa{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)}},tw={selector:"AG-CHECKBOX",component:ew},iq=class extends ew{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)}},Ea=class extends Sa{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=Ge(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{hA(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()}})}},Zf={selector:"AG-INPUT-TEXT-FIELD",component:Ea},sq=class extends Sa{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}},oq={selector:"AG-INPUT-TEXT-AREA",component:sq},nw=class extends Ea{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){an(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,Ii(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Ii(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Ii(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(Ge(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")}},rq={selector:"AG-INPUT-NUMBER-FIELD",component:nw},aq=class extends Ea{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=fr();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){an(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?ki(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Ii(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?ki(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Ii(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Ii(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 mi(this.getValue())??void 0}setDate(e,t){this.setValue(ki(e??null,this.includeTime),t)}},gA={selector:"AG-INPUT-DATE-FIELD",component:aq},lq=".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)}}",uq="ag-active-item",cq=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),dq=class extends Xc{constructor(e,t,n){super(cq(e,t)),this.label=t,this.value=n,this.eText=He}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(uq,e),XT(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();A8(n,e),P8(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>vC(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)}))}},hq=class extends Xc{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(lq)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case oe.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case oe.DOWN:case oe.UP:e.preventDefault(),this.navigate(t);break;case oe.PAGE_DOWN:case oe.PAGE_UP:case oe.PAGE_HOME:case oe.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();Bn(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(!$s(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 dq(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===oe.DOWN;let n;const{listItems:i,highlightedItem:s}=this;if(!s)n=t?i[0]:jt(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===oe.PAGE_HOME?a=0:e===oe.PAGE_END?a=s:e===oe.PAGE_DOWN?a=Math.min(i+r,s):e===oe.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){rr(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"})}},fq=".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}}",pq={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"}}]}]},gq=class extends pA{constructor(e){if(super(e,(e==null?void 0:e.template)||pq,(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=He,this.eWrapper=He,this.eDisplayField=He,this.eIcon=He,this.registerCSS(fq),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()),pC(e,!1),this.ariaRole&&rr(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 oe.UP:case oe.DOWN:case oe.ENTER:case oe.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case oe.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=jT(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=CC(xf(c)),a&&(e.style.maxWidth=a)):If(e,a??xf(c));const g=o??`${gC(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();pC(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 If(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()}},mq=".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)}",iw=class extends gq{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(mq)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Af(()=>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 hq("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),B8(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===oe.TAB&&this.hidePicker(),t){case oe.ENTER:case oe.UP:case oe.DOWN:case oe.PAGE_UP:case oe.PAGE_DOWN:case oe.PAGE_HOME:case oe.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case oe.ESCAPE:super.onKeyDown(e);break;case oe.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()}},vq={selector:"AG-SELECT",component:iw},Cq=':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}}',sw=typeof window!="object"||!((tk=(ek=window==null?void 0:window.document)==null?void 0:ek.fonts)!=null&&tk.forEach),Zl=(e,t,n,i,s,o)=>{if(sw)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)},mA=(e,t,n,i)=>{Zl(Cq,e,"shared",t,0,n),i==null||i.forEach((s,o)=>s.forEach(r=>Zl(r,e,o,t,0,n)))},wq=e=>{Jl.grids.add(e)},yq=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()}},vA,Jl=(vA=typeof window=="object"?window:{}).agStyleInjectionState??(vA.agStyleInjectionState={map:new WeakMap,grids:new Set}),Zs=e=>new CA(e),pr="$default",bq=0,CA=class{constructor({feature:e,params:t,modeParams:n={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[pr]:{...n[pr]??{},...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"}-${++bq}`;typeof s=="function"&&(s=s()),s=`:where(.${o}) {
|
|
74
|
+
${s}
|
|
75
|
+
}
|
|
76
|
+
`;for(const r of this.cssImports??[])s=`@import url(${JSON.stringify(r)});
|
|
77
|
+
${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}},Sq=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),wA=e=>`--ag-${Sq(e)}`,Js=e=>`var(${wA(e)})`,Eq=(e,t,n)=>Math.max(t,Math.min(n,e)),Rq=e=>{const t=new Map;return n=>{const i=n;return t.has(i)||t.set(i,e(n)),t.get(i)}},Qs=e=>({ref:"accentColor",mix:e}),Ji=e=>({ref:"foregroundColor",mix:e}),Qi=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),Dq=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),vi={ref:"backgroundColor"},Ql={ref:"foregroundColor"},ko={ref:"accentColor"},Jf={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:Ji(.15),chromeBackgroundColor:Qi(.02),browserColorScheme:"light"},Fq={...Jf,textColor:Ql,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:Qs(.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:vi,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:ko,toggleButtonOffBackgroundColor:Qi(.3),toggleButtonSwitchBackgroundColor:vi,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}}},xq=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],Tq=Rq(e=>(e=e.toLowerCase(),xq.find(t=>e.endsWith(t.toLowerCase()))??"length")),Qf=e=>typeof e=="object"&&(e!=null&&e.ref)?Js(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,ow=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){const t=Js(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?Js(e.onto):"transparent"}, ${t} ${Eq(e.mix*100,0,100)}%)`}return!1},Pq=Qf,Xl=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:" "+Js(n)+" ")})`:e&&"ref"in e?Js(e.ref):!1,Aq=Qf,rw=(e,t)=>typeof e=="string"?e:e===!0?rw({},t):e===!1?t==="columnBorder"?rw({color:"transparent"},t):"none":e&&"ref"in e?Js(e.ref):yA(e.style??"solid")+" "+Xl(e.width??{ref:"borderWidth"})+" "+ow(e.color??{ref:"borderColor"}),Iq=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?Js(e.ref):[Xl(e.offsetX??0),Xl(e.offsetY??0),Xl(e.radius??0),Xl(e.spread??0),ow(e.color??{ref:"foregroundColor"})].join(" "),yA=Qf,bA=e=>typeof e=="string"?e.includes(",")?e:SA(e):e&&"googleFont"in e?bA(e.googleFont):e&&"ref"in e?Js(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),SA(t))).join(", "):!1,SA=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),_q=Qf,EA=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?EA({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?Js(e.ref):!1,kq=(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?Js(e.ref):!1,Oq={color:ow,colorScheme:Pq,length:Xl,scale:Aq,border:rw,borderStyle:yA,shadow:Iq,image:EA,fontFamily:bA,fontWeight:_q,duration:kq},Mq=(e,t,n)=>{const i=Tq(e);return Oq[i](t,e,n)},Lq=e=>new RA(e),RA=class Ik{constructor(t,n=[]){this.themeLogger=t,this.parts=n}withPart(t){return typeof t=="function"&&(t=t()),t instanceof CA?new Ik(this.themeLogger,[...this.parts,t]):(this.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(Zs({feature:t}))}withParams(t,n=pr){return this.withPart(Zs({modeParams:{[n]:t}}))}_startUse({styleContainer:t,cssLayer:n,nonce:i,loadThemeGoogleFonts:s,moduleCss:o}){if(sw)return;Vq(),mA(t,n,i,o);const r=Nq(this);if(r.length>0)for(const a of r)s&&Bq(a,i);for(const a of this.parts)a.use(t,n,i)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=DA(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const n={[pr]:{...Fq}};for(const i of DA(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===pr)for(const l of Object.keys(n)){const u=n[l];if(l!==pr)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!==pr){const d=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(l):l}"]) & {
|
|
78
|
+
`;s+=d,o+=d}for(const c of Object.keys(u).sort()){const d=u[c],h=Mq(c,d,this.themeLogger);if(h===!1)this.themeLogger.error(107,{key:c,value:d});else{const p=wA(c),g=p.replace("--ag-","--ag-inherited-");s+=` ${p}: var(${g}, ${h});
|
|
79
|
+
`,o+=` ${g}: var(${p});
|
|
80
|
+
`}}l!==pr&&(s+=`}
|
|
81
|
+
`,o+=`}
|
|
82
|
+
`)}let a=`${n} {
|
|
83
|
+
${s}}
|
|
84
|
+
`;a+=`:has(> ${n}):not(${n}) {
|
|
85
|
+
${o}}
|
|
86
|
+
`,this._paramsCssCache=i=a}return i.replaceAll(n,`:where(.${t})`)}},DA=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},Nq=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()},FA=!1,Vq=()=>{if(!FA){FA=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},Bq=async(e,t)=>{const n=`@import url('https://${Hq}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
|
|
87
|
+
`;Zl(n,document.head,`googleFont:${e}`,void 0,0,t)},Hq="fonts.googleapis.com",Gq=1,Wq=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=Gq++,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}},zq=0,$q=class extends js{constructor(){super(...arguments),this.beanName="environment",this.paramsClass=`ag-theme-params-${++zq}`,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(()=>yq(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 RA?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){wq(this),mA(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=Wc({tag:"style"});const r=t.get("styleNonce");r&&o.setAttribute("nonce",r),n.appendChild(o)}sw||(o.textContent=(e==null?void 0:e._getPerInstanceCss(this.paramsClass))||""),this.applyThemeClasses(n),this.fireStylesChangedEvent("themeChanged")}},Uq=class extends js{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)}},jq=class extends js{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new ha}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))}},xA=class extends js{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()}},Kq=1e3,qq=1e3,TA=100,PA,Xf=!1,Yq=class extends js{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()),!wa()&&(Xf?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},TA):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||Xf)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()-PA<Kq}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(!Ge(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(),PA=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(On(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=an(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?qq: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(){Xf=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},TA)}unlockService(){Xf=!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()}},Zq=class extends xA{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()}},ep=0,Jq=200,Qq=class extends js{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=ar(this.beans,t,()=>l(!0));setTimeout(()=>u(),Jq)}}getParentRect(){const e=On(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),iP(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=On(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 b=g?(i?nP:xf)(u)+u[a]:c[s];g&&(b-=Math.abs(p[o]-h[o]));const S=b-C;return Math.min(Math.max(t,0),Math.max(S,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();Ge(e.style.top)||(e.style.top=`${n.top*-1}px`),Ge(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=Wc({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")||rr(e,"dialog"),n?Bl(e,n):i&&(e.id||(e.id=`popup-component-${ep}`),eP(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=On(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(an(t)))return;C.key===oe.ESCAPE&&!this.isStopPropagation(C)&&g({keyboardEvent:C})},h=C=>g({mouseEvent:C}),p=C=>g({touchEvent:C}),g=(C={})=>{const{mouseEvent:v,touchEvent:b,keyboardEvent:S,forceHide:D}=C;!D&&(this.isEventFromCurrentPopup({mouseEvent:v,touchEvent:b},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||b||S),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:ep,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),ep=ep+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&&eP(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 hn(d=>{c.wrapIncoming(()=>{l7(()=>{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,b)=>{const S=r(s.style[b]);v.last!==S&&(v.initial=S,v.last=S);const D=h[b]-p[b];if(D!=v.lastDiff){const w=this.keepXYWithinBounds(s,v.initial+v.initialDiff-D,v.direction);s.style[b]=`${w}px`,v.last=w}v.lastDiff=D};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(U8(a.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=On(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]}}},Xq=class extends BC{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`)}},AA=(e,t)=>{if(t!=null&&(e!=null&&e.setPointerCapture))try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},e9=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const n=t.pointerId;if(!AA(e,n))return null;const i={eElement:e,pointerId:n,onLost(s){n9(i,s)}};return e.addEventListener("lostpointercapture",i.onLost),i},t9=e=>{if(!e)return;IA(e);const{eElement:t,pointerId:n}=e;if(t){try{t.releasePointerCapture(n)}catch{}e.eElement=null}},IA=e=>{const{eElement:t,onLost:n}=e;t&&n&&(t.removeEventListener("lostpointercapture",n),e.onLost=null)},n9=(e,t)=>{IA(e);const{eElement:n,pointerId:i}=e;n&&t.pointerId===i&&AA(n,i)},Xi,Xs,Oo=e=>{if(!Xs)Xs=new WeakSet;else if(Xs.has(e))return!1;return Xs.add(e),!0},i9=class extends js{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!!(Xi!=null&&Xi.has(zs(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)_A(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),_A(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),_f(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&&_f(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&&$c(this.beans,e)&&!Nc(lw(e))}initDrag(e,...t){this.drag=e;const n=this.beans,i=a=>this.onScroll(a),s=a=>this.onKeyDown(a),o=zs(n),r=On(n);_f(e.handlers,[o,"contextmenu",lr],[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;(Xi==null?void 0:Xi.get(t))===e&&(Xi==null||Xi.delete(t)),this.drag=null,t9(e.pointerCapture),SC(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const n=this.beans;if(Xs!=null&&Xs.has(t))return;const i=t.pointerType;if(i==="touch"&&(n.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),Nc(lw(t))))||!t.isPrimary||i==="mouse"&&t.button!==0)return;this.destroyDrag();const s=zs(n),o=e.eElement,r=t.pointerId,a=new aw(s,e,t,r);Xi??(Xi=new WeakMap),Xi.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&&Oo(d)&&this.cancelDrag()};this.initDrag(a,[s,"pointerup",u],[s,"pointercancel",c],[s,"pointermove",l,{passive:!1}],[s,"touchmove",lr,{passive:!1}],[o,"mousemove",lr,{passive:!1}]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Oo(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!Oo(t)||Nc(lw(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){lr(t);return}this.destroyDrag();const i=this.beans,s=zs(i),o=new aw(s,e,t.touches[0]),r=u=>this.onTouchMove(u),a=u=>this.onTouchUp(u),l=t.target??e.eElement;this.initDrag(o,[zs(i),"touchmove",lr,{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||Xs!=null&&Xs.has(t)||this.isPointer())return;const n=this.beans;this.destroyDrag();const i=new aw(zs(n),e,t),s=a=>this.onMouseOrPointerMove(a),o=a=>this.onMouseOrPointerUp(a),r=zs(n);this.initDrag(i,[r,"mousemove",s],[r,"mouseup",o]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Oo(t)}onScroll(e){var i;if(!Oo(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;Oo(e)&&(fr()&&((t=On(this.beans).getSelection())==null||t.removeAllRanges()),this.shouldPreventMouseEvent(e)&&lr(e),this.onMove(e))}onTouchMove(e){const t=this.drag;if(!t||!Oo(e))return;const n=zc(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(dP(e,i,o)||(this.dragging=!0,n.capturePointer&&(t.pointerCapture=e9(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&&Oo(e)&&this.onUp(zc(t.start,e.changedTouches))}onMouseOrPointerUp(e){Oo(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===oe.ESCAPE&&this.cancelDrag()}},_A=e=>{SC(e.handlers);const t=e.oldTouchAction;if(t!=null){const n=e.params.eElement.style;n&&(n.touchAction=t)}},aw=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}},lw=e=>{const t=e.target;return t instanceof Element?t:null},s9=class extends js{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),Es(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,b=a.clientY>=g&&a.clientY<C;if(!v||!b)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=zs(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&&Z8(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=fC(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))}},o9=class extends s9{createEvent(e){return st(this.gos,e)}createDragImageComp(e){const{gos:t,beans:n}=this,i=T7(n.userCompFactory,st(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(){Re(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 kA(e,t){return e+"_"+t}function vn(e){return e instanceof td}var td=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=Mc(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return kA(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)vn(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=jt(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??[])dr(t)?e.push(t):vn(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])dr(t)?e.push(t):vn(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(vn(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"})}},uw="row-group-",cw="t-",dw="b-",r9=0,gr=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=r9++,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?($t(13),null):this.rowPinned==="top"?cw+this.rowIndex:this.rowPinned==="bottom"?dw+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(uw)&&$t(14,{groupPrefix:uw})}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 ha)).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 ha);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(Re(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 a9(e,t,n){return st(t,{type:n,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var l9=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_leafs","childStore","oldRowTop","sticky","treeNodeFlags","treeParent"]),u9=(e,t)=>{const n=new gr(t);for(const i of Object.keys(e))l9.has(i)||(n[i]=e[i]);return n.oldRowTop=null,n},OA=e=>{for(;e!=null&&e.length;){const t=e[0];if(t.data)return t;e=t.childrenAfterGroup}},MA={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},c9=new Set(Object.values(MA));function mr(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 d9(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;LA(u,c,i,s,o,r)}})}function LA(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 NA(e,t,n){const i=e();i!=null&&i.created&&i.promise.then(s=>{const o=t();LA(s,i.filterParams,o,n()??{model:o},"ui")})}function VA(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):NA(t,n,i)}function Mn(e,t){return e[t]??null}function Cn(e){return Wc(e)}function h9(e){return{tag:"div",cls:e}}var f9=class extends Bt{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(h9(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();Bn(i);let s;this.destroyListeners();const o=document.createDocumentFragment(),r=this.className,a=({type:u,label:c})=>{const d=b=>{this.dispatchLocalEvent({type:u,event:b})};["apply","clear","reset","cancel"].includes(u)||Re(75);const h=u==="apply",g=Cn({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=b=>{b.key===oe.ENTER&&(b.preventDefault(),d(b))},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&&(Vc(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()}},p9={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 vr(e,t,n){return Q8(e,p9,t,n)}function hw(e,t){const{debounceMs:n}=e;return tp(e)?(n!=null&&Re(71),0):n??t}function tp(e){var t;return(((t=e.buttons)==null?void 0:t.indexOf("apply"))??-1)>=0}var g9=class extends Bt{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&&Oc(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:vr(this,h)}});if(this.applyActive=tp(this.params),!u){u=this.createBean(new f9),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&&(Ss(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===oe.ENTER||i===oe.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===oe.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},m9={tag:"div",cls:"ag-filter"},v9=class extends Bt{constructor(e,t,n){super(m9),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(()=>{}))??hn.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 g9(t,o,i,i.updateModel.bind(i),c&&i.isGlobalButtons,c));this.comp=d,l=d.getGui()}else l=a.getGui(),Ge(l)||Re(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)&&(Bn(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()}},BA={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},HA=["january","february","march","april","may","june","july","august","september","october","november","december"];function C9(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function GA(e){return e instanceof Date&&!isNaN(e.getTime())}var fw={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:GA}),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"&&GA(e.dateParser(t))}),dateTime:e=>fw.date(e),dateTimeString:e=>fw.dateString(e),object:()=>{},text:()=>{}},pw={number:()=>({comparator:C9}),boolean:({t:e})=>({valueFormatter:t=>Ge(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:n=>{const i=e(n);return Ge(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=HA[Number(n)-1];return t(s,BA[s])}return n??t("blanks","(Blanks)")},treeListPathGetter:n=>jf(n,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:n})=>({valueFormatter:i=>{const s=e(i);return Ge(s)?s:n("blanks","(Blanks)")},treeList:!0,treeListPathGetter:i=>jf(t.dateParser(i??void 0),!1),treeListFormatter:(i,s)=>{if(s===1&&i!=null){const o=HA[Number(i)-1];return n(o,BA[o])}return i??n("blanks","(Blanks)")}}),dateTime:e=>{const t=pw.date(e);return t.treeListPathGetter=jf,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,n=pw.dateString(e);return n.treeListPathGetter=i=>jf(t(i??void 0)),n},object:({formatValue:e,t})=>({valueFormatter:n=>{const i=e(n);return Ge(i)?i:t("blanks","(Blanks)")}}),text:()=>{}};function w9(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?pw:fw)[i.baseDataType],h=d({dataTypeDefinition:i,formatValue:s,t:r});return a=typeof t=="object"?{...h,...t}:h,{filterParams:a,filterValueGetter:l}}var y9={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},b9={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function S9(e,t=!1){return(t?b9:y9)[e??"text"]}var WA="ag-resizer-wrapper",Cr=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),E9={tag:"div",cls:WA,children:[Cr("eTopLeft","topLeft"),Cr("eTop","top"),Cr("eTopRight","topRight"),Cr("eRight","right"),Cr("eBottomRight","bottomRight"),Cr("eBottom","bottom"),Cr("eBottomLeft","bottomLeft"),Cr("eLeft","left")]},R9=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=$s(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("%"))Gc(n,e),e=nP(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?Gc(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("%"))Us(t,e),e=xf(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?Us(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=ar(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(Cn(E9)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${WA}`);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(),b=v+u*C;let S=!1;r&&(p=v-b,(d+p<=0||b<=this.minWidth)&&(S=!0,p=0)),S||this.setWidth(b)}if(l&&c){const C=i?-1:1,v=this.getHeight(),b=v+c*C;let S=!1;i?(g=v-b,(h+g<=0||b<=this.minHeight)&&(S=!0,g=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&v<b&&this.getMinSizeOfSiblings().height+b>this.element.parentElement.offsetHeight&&(S=!0),S||this.setHeight(b)}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()}},zA="__ag_Grid_Stop_Propagation";function Ra(e){e[zA]=!0}function Mo(e){return e[zA]===!0}var D9="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=ba(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(D9),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||Mo(t))return;const{callbacks:n}=this;if(n.shouldStopEventPropagation(t)){Ra(t);return}t.key===oe.TAB?n.onTabKeyDown(t):n.handleKeyDown&&n.handleKeyDown(t)}})}},F9=class extends Bt{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 R9(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=tp(e),this.setupApplyDebounced()}doesFilterPass(e){Re(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 Re(284),this.params.model!=null}setupApplyDebounced(){const e=hw(this.params,this.defaultDebounceMs),t=Hn(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return Re(285),this.params.model}setModel(e){Re(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 vr(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 $A(e){return!!e.operator}function x9(e,t,n){if(t==null)return null;let i=null;const{compName:s,jsComp:o,fwComp:r}=rA(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 Ds={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},gw=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?Ds.AUTO_HEIGHT:t.print?Ds.PRINT:Ds.NORMAL;this.view.updateLayoutClasses(n,t)}},wr="Viewport",UA="fakeVScrollComp",mw=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],jA=100,vw=150,T9=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=Hn(this,()=>this.lastScrollSource[1]=null,vw),this.resetLastVScrollDebounced=Hn(this,()=>this.lastScrollSource[0]=null,vw)}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,wr)});for(const e of mw){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?Hn(this,this.onVScroll.bind(this,wr),jA):this.onVScroll.bind(this,wr),i=t?Hn(this,this.onVScroll.bind(this,UA),jA):this.onVScroll.bind(this,UA);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[...mw,wr]){if(this.lastScrollSource[1]===t)continue;const n=this.getViewportForSource(t);Pf(n,e,this.enableRtl)}}getViewportForSource(e){return e===wr?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=Tf(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===wr?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===wr?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"})},vw)}shouldBlockScrollUpdate(e,t,n=!1){return n&&!wa()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=gC(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 mw)if(this.getViewportForSource(n).scrollLeft!==e){t=!0;break}t&&this.onHScroll(wr)}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)),Pf(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(Gn(this.gos,"print"))return;const{rowModel:i}=this.beans,s=i.getRowCount();if(typeof e!="number"||e<0||e>=s){Re(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:b}=u,S=c.rowTop,D=c.rowHeight,w=r.getPixelOffset(),R=c.rowTop-w,x=R+c.rowHeight,T=this.getVScrollPosition(),H=a.divStretchOffset,N=T.top+H,A=T.bottom+H,_=A-N,V=a.getScrollPositionForPixel(R),ie=a.getScrollPositionForPixel(x-_),me=Math.min((V+ie)/2,R),Te=N+v>R,q=A-b<x;let z=null;t==="top"?z=V-v:t==="bottom"?z=ie+b:t==="middle"?z=me:Te?z=V-v:q&&(ie-V>_?z=V-v:z=ie+b),z!==null&&(this.setVerticalScrollPosition(z),l.redraw({afterScroll:!0})),d=S!==c.rowTop||D!==c.rowHeight,h=v!==u.stickyTopHeight||b!==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 b=this.getVScrollPosition().top;v!==b&&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}}},Cw=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=Gn(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)}},P9=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=()=>{xo(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=gC(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 np(e,t,n,i){var o;const s=(o=t.getColDef().cellRendererParams)==null?void 0:o.suppressMouseEventHandling;return KA(e,t,n,i,s)}function A9(e,t,n,i){const s=t==null?void 0:t.suppressMouseEventHandling;return KA(e,void 0,n,i,s)}function KA(e,t,n,i,s){return s?s(st(e,{column:t,node:n,event:i})):!1}function qA(e,t,n){let i=t;for(;i;){const s=TP(e,i,n);if(s)return s;i=i.parentElement}return null}var ip="cellCtrl";function ww(e,t){return qA(e,t,ip)}var sp="renderedRow";function I9(e,t){return qA(e,t,sp)}function yw(e,t,n,i,s){const o=i?i.getColDef().suppressKeyboardEvent:void 0;if(!o)return!1;const r=st(e,{event:t,editing:s,column:i,node:n,data:n.data,colDef:i.getColDef()});return!!(o&&o(r))}function _9(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 k9=65,O9=67,M9=86,L9=68,N9=90,V9=89;function B9(e){const{keyCode:t}=e;let n;switch(t){case k9:n=oe.A;break;case O9:n=oe.C;break;case M9:n=oe.V;break;case L9:n=oe.D;break;case N9:n=oe.Z;break;case V9:n=oe.Y;break;default:n=e.code}return n}var H9=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",cP("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(!$c(this.beans,t)||Mo(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:ww(t,e),rowCtrl:I9(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;!yw(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),hA(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(!yw(this.gos,n,i,a,!1)){const u=n.key;if(t==="keydown")switch(u){case oe.PAGE_HOME:case oe.PAGE_END:case oe.PAGE_UP:case oe.PAGE_DOWN:o==null||o.handlePageScrollingKey(n,!0);break;case oe.LEFT:case oe.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case oe.UP:case oe.DOWN:e.onKeyboardNavigate(n);break;case oe.TAB:e.onTabKeyDown(n);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",n))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!$c(this.beans,e))return;const n=B9(e),{clipboardSvc:i,undoRedo:s}=this.beans;if(n===oe.A)return this.onCtrlAndA(e);if(n===oe.C)return this.onCtrlAndC(i,e);if(n===oe.D)return this.onCtrlAndD(i,e);if(n===oe.V)return this.onCtrlAndV(i,e);if(n===oe.X)return this.onCtrlAndX(i,e);if(n===oe.Y)return this.onCtrlAndY(s);if(n===oe.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:n,selectionSvc:i},gos:s}=this;n&&To(s)&&!kK(s)&&t.isRowsToRender()?_9(this.beans):i&&i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:OP(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")}},YA=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)}},op=e=>e.topRowCtrls,rp=e=>e.getStickyTopRowCtrls(),ap=e=>e.getStickyBottomRowCtrls(),lp=e=>e.bottomRowCtrls,up=e=>e.allRowCtrls,bw=e=>e.getCtrls("top"),Sw=e=>e.getCtrls("center"),Ew=e=>e.getCtrls("bottom"),G9={center:{type:"center",name:"center-cols",getRowCtrls:up,getSpannedRowCtrls:Sw},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:up,getSpannedRowCtrls:Sw},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:up,getSpannedRowCtrls:Sw},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:up},topCenter:{type:"center",name:"floating-top",getRowCtrls:op,getSpannedRowCtrls:bw},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:op,getSpannedRowCtrls:bw},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:op,getSpannedRowCtrls:bw},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:op},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:rp},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:rp},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:rp},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:rp},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:ap},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:ap},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:ap},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:ap},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:lp,getSpannedRowCtrls:Ew},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:lp,getSpannedRowCtrls:Ew},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:lp,getSpannedRowCtrls:Ew},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:lp}};function ZA(e){return`ag-${nd(e).name}-viewport`}function cp(e){const t=nd(e);return t.container??`ag-${t.name}-container`}function W9(e){return`ag-${nd(e).name}-spanned-cells-container`}function nd(e){return G9[e]}var z9=["topCenter","topLeft","topRight"],$9=["bottomCenter","bottomLeft","bottomRight"],U9=["center","left","right"],j9=["center","left","right","fullWidth"],K9=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],q9=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Y9=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],JA=["stickyTopCenter","stickyTopLeft","stickyTopRight"],QA=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Z9=[...JA,"stickyTopFullWidth",...QA,"stickyBottomFullWidth"],J9=[...z9,...$9,...U9,...JA,...QA],Q9=class extends ge{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=nd(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new P9(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 H9(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:o}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(q9,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s==null?void 0:s.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(Y9,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s==null?void 0:s.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(j9,()=>this.createManagedBean(new YA(this.eContainer,this.name==="center"?i:void 0))),o&&this.forContainers(J9,()=>this.createManagedBean(o.createDragListenerFeature(this.eContainer))),this.forContainers(K9,()=>this.createManagedBean(new Cw(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(Z9.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const n=this.gos.get("ensureDomOrder"),i=Gn(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 Bc(this.eViewport)}getCenterViewportScrollLeft(){return Tf(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=ar(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return sP(this.eViewport)}getViewportScrollLeft(){return Tf(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||vC(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Pf(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=Gn(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})}},XA="ag-force-vertical-scroll",X9="ag-selectable",eY="ag-column-moving",tY=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(`.${ZA("center")}`),this.eFullWidthContainer=n.querySelector(`.${cp("fullWidth")}`),this.eStickyTopFullWidthContainer=o.querySelector(`.${cp("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${cp("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",u=>this.setCellTextSelection(u.currentValue)),this.createManagedBean(new gw(this.comp)),this.scrollFeature=this.createManagedBean(new T9(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=cA()?16:0,s=`calc(100% + ${n+i}px)`;xo(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=fa(i,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:n=>{const{target:i,relatedTarget:s}=n,o=t.contains(s),r=fa(s,"ag-root",t);fa(i,"ag-root",t)||(!o||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(eY,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(X9,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?XA:null,n=Gn(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||n&&aP(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let n=t.sizesMeasured;const i=()=>{const s=n&&$l(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))&&$c(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 nY(e,t){var n;return((n=ww(e,t.target))==null?void 0:n.getFocusedCellPosition())??null}function eI(e,t){const n=Gn(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 tI=class extends Bt{constructor(e,t){super(),this.direction=t,this.eViewport=He,this.eContainer=He,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",lA()||wa())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=cA(),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(),xo(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;oK(this,()=>$s(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},iY={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"}]},sY=class extends tI{constructor(){super(iY,"horizontal"),this.eLeftSpacer=He,this.eRightSpacer=He,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 Cw(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),Us(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=i),Us(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),Gc(this.getGui(),o),Gc(this.eViewport,o),Gc(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 Tf(this.eViewport,this.enableRtl)}setScrollPosition(e){$s(this.eViewport)||this.attemptSettingScrollPosition(e),Pf(this.eViewport,e,this.enableRtl)}},oY={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:sY},rY={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"}]}]},aY=class extends tI{constructor(){super(rY,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new YA(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),Us(this.getGui(),s),Us(this.eViewport,s),Us(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&&!$s(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},lY={selector:"AG-FAKE-VERTICAL-SCROLL",component:aY},uY="ag-column-first",cY="ag-column-last";function nI(e,t,n,i){return nn(e)?[]:hY(e.headerClass,e,t,n,i)}function iI(e,t,n){e.toggleCss(uY,n.isColAtEdge(t,"first")),e.toggleCss(cY,n.isColAtEdge(t,"last"))}function dY(e,t,n,i){return st(t,{colDef:e,column:n,columnGroup:i})}function hY(e,t,n,i,s){if(nn(e))return[];let o;if(typeof e=="function"){const r=dY(t,n,i,s);o=e(r)}else o=e;return typeof o=="string"?[o]:Array.isArray(o)?[...o]:[]}function fY(e,t,n){t.addManagedElementListeners(n,{keydown:i=>{if(!i.defaultPrevented&&i.key===oe.TAB){const s=i.shiftKey;ba(e,n,!1,s)||tu(e,s)&&i.preventDefault()}}})}function pY(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function Da(e){var t;return e.gos.get("suppressHeaderFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function dp(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 eo(e){var t;return((t=e.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:t.getRowCount())??0}function Rw(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=gY(e,r);(a==null||l>a)&&(t[o]=l)}}}return t}function gY(e,t){let i=e.colModel.isPivotMode()?vY(e):oI(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 Dw(e){let n=e.colModel.isPivotMode()?mY(e):id(e);return e.colModel.forAllCols(i=>{const s=i.getAutoHeaderHeight();s!=null&&s>n&&i.isAutoHeaderHeight()&&(n=s)}),n}function id(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function sI(e){return e.gos.get("floatingFiltersHeight")??id(e)}function oI(e){return e.gos.get("groupHeaderHeight")??id(e)}function mY(e){return e.gos.get("pivotHeaderHeight")??id(e)}function vY(e){return e.gos.get("pivotGroupHeaderHeight")??oI(e)}function CY(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}var wY=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:()=>xo(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){var o;const{beans:e}=this;let t=0;const n=Rw(e).reduce((r,a)=>r+a,0),i=Dw(e);if((o=e.filterManager)!=null&&o.hasFloatingFilters()&&(t+=sI(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 oe.LEFT:t="LEFT";case oe.RIGHT:{Ge(t)||(t="RIGHT"),n.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case oe.UP:t="UP";case oe.DOWN:{Ge(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(an(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)}},Fw=class extends Bt{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},yY={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"}]},bY=class extends Fw{constructor(e){super(yY,e),this.eResize=He,this.eHeaderCompWrapper=He,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=>Hc(e,i),setAriaSort:i=>i?L8(e,i):N8(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())}},SY={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"}]},EY=class extends Fw{constructor(e){super(SY,e),this.eResize=He,this.eHeaderCompWrapper=He}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=>Hc(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=>sn(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)}},RY={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"}}]}]},DY=class extends Fw{constructor(e){super(RY,e),this.eFloatingFilterBody=He,this.eButtonWrapper=He,this.eButtonShowMainFilter=He}postConstruct(){const e=this.getGui(),t={toggleCss:(n,i)=>this.toggleCss(n,i),setUserStyles:n=>Hc(e,n),addOrRemoveBodyCssClass:(n,i)=>this.eFloatingFilterBody.classList.toggle(n,i),setButtonWrapperDisplayed:n=>sn(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()}}},FY=class extends Bt{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"))),Df(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=>Df(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());rP(this.getGui(),s)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new EY(e);break;case"filter":t=new DY(e);break;default:t=new bY(e);break}return this.createBean(t),t.setParentComponent(this),t}},xw=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?jt(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=Ge(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(!Gn(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(Ge(e)&&(this.eCell.style.left=`${e}px`),vn(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&M8(this.ariaEl,t.length)}}},xY=0,rI="headerCtrl",Tw=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()+"-"+xY++}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(!Ge(s))return!1;const o=st(this.gos,{colDef:i,column:n,headerRowIndex:t,event:e});return!!s(o)}getWrapperHasFocus(){return an(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}=pa(this.eGui),v=h+p+g+C,S=t.offsetHeight+v;if(d<5){const D=On(s),w=!(D!=null&&D.contains(t)),R=S==0;if(w||R){RC(()=>o(d+1),"raf",s);return}}this.setColHeaderHeight(this.column,S)};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=ar(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||(iI(e,t,n.visibleCols),QT(i,n.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=Da(this.beans);this.eGui&&Ii(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){var o;const t=an(this.beans),n=e.key===oe.LEFT||e.key===oe.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===oe.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===oe.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 oe.PAGE_DOWN:case oe.PAGE_UP:case oe.PAGE_HOME:case oe.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=rI,{eGui:n,gos:i}=this;va(i,n,t,this),e.addDestroyFunc(()=>va(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}},TY=class extends Tw{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=Qc(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)):sn(n,!1),c==null||c.createHoverFeature(h,[r],t),d==null||d.createRangeHighlightFeature(h,r,e),h.createManagedBean(new xw(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 st(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 P7(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:n,gos:i}=this.beans;return st(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||_i(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===oe.SPACE&&((t=this.selectAllFeature)==null||t.onSpaceKeyDown(e)),e.key===oe.ENTER&&this.onEnterKeyDown(e),e.key===oe.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();aI(n)&&n.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),X7()&&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=nI(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=Rw(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=Dw(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(E8(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&&!_i(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(an(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 aI(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function aI(e){return typeof(e==null?void 0:e.getAnchorElementForMenu)=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var PY=0,Pw=class extends ge{constructor(e,t,n){super(),this.rowIndex=e,this.pinned=t,this.type=n,this.instanceId=PY++,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=Gn(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=Qc(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=Gn(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=Rw(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=Dw(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:n};e+=n;const i=sI(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 TY(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()}},AY=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 Pw(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 Pw(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 Pw(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(dr(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 Cw(e=>this.comp.setCenterWidth(`${e}px`),!0))}},IY=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(uI(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=uI(this.beans))==null||e.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){var n;const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!((n=this.activeMenuFactory)!=null&&n.isMenuEnabled(e))&&(_i(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&&dr(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!(wa()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!_i(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){var t;return!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))&&!_i(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 _i(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"),xo(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 lI(e,t,n){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",n))}function uI(e){const{enterpriseMenuFactory:t,filterMenuFactory:n,gos:i}=e;return t&&_i(i)?t:n}var hp=class extends BC{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.errorMessages=null}},cI=class extends Bt{constructor(){super()}},_Y={tag:"span",cls:"ag-overlay-loading-center"},kY=class extends cI{init(){var t;const e=Fo((t=this.gos.get("overlayLoadingTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??_Y),!e){const i=this.getLocaleTextFunc()("loadingOoo","Loading...");this.getGui().textContent=i,this.beans.ariaAnnounce.announceValue(i,"overlay")}}},OY={tag:"span",cls:"ag-overlay-no-rows-center"},MY=class extends cI{init(){var t;const e=Fo((t=this.gos.get("overlayNoRowsTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??OY),!e){const i=this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=i,this.beans.ariaAnnounce.announceValue(i,"overlay")}}};function LY(e,t,n){const i=es(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=Cn({tag:"span"});return s.appendChild(i),s}function es(e,t,n){var o;let i=null;e==="smallDown"?Re(262):e==="smallLeft"?Re(263):e==="smallRight"&&Re(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{Re(38,{iconName:e});return}if(typeof r=="string")return mC(r);if(wC(r))return r;Re(133,{iconName:e});return}else{const r=t.registry.getIcon(e);return r||(o=t.validation)==null||o.validateIcon(e),Cn({tag:"span",cls:`ag-icon ag-icon-${r??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var NY=".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)}",VY={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"}]}]},BY=class extends Bt{constructor(){super(),this.dragSource=null,this.eIcon=He,this.eLabel=He,this.eGhost=He,this.registerCSS(NY)}postConstruct(){const e=t=>LY(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(VY),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;Bn(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}},HY=".ag-checkbox-cell{height:100%}",GY={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},WY=class extends Bt{constructor(){super(GY,[tw]),this.eCheckbox=He,this.registerCSS(HY)}init(t){this.refresh(t);const{eCheckbox:n,beans:i}=this,s=n.getInputElement();s.setAttribute("tabindex","-1"),ZT(s,"polite"),this.addManagedListeners(s,{click:o=>{if(Ra(o),n.isDisabled())return;const r=n.getValue();this.onCheckboxChanged(r)},dblclick:o=>{Ra(o)}}),this.addManagedElementListeners(t.eGridCell,{keydown:o=>{if(o.key===oe.SPACE&&!n.isDisabled()){t.eGridCell===an(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(Wf)?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=Ff(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)}},dI=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),Es(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=UY(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=AP(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 hI(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)?hI(t):!1}function Aw(e,t){const{gos:n,rowModel:i,filterManager:s}=e;return zl(n)?!i.getRowNode(t.id):s!=null&&s.isAnyFilterPresent()?!hI(t):n.get("pivotMode")?!t.group:!1}function zY(e){return!!e.footer&&e.level===-1}function $Y(e){return!!e.pinnedSibling&&zY(e.pinnedSibling)}function UY(e){var n;const t=e.findIndex($Y);if(t>-1)return(n=e.splice(t,1))==null?void 0:n[0]}var fI=class extends ge{postConstruct(){const{gos:e,beans:t}=this;this.top=new dI(t,"top"),this.bottom=new dI(t,"bottom");const n=s=>Aw(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(KY),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,YY(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&&qY(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;Iw(a),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(u)}else{const a=pI(this.beans,e,t),l=this.getContainer(t);l.add(a),Aw(this.beans,e)&&l.hide(u=>Aw(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=cr(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 gI(this.top)}getPinnedBottomTotalHeight(){return gI(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(!mn(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),Iw(o)),!r||r.floating!==n){const l=pI(t,s,n);this.getContainer(n).add(l)}}else{if(!r)return;r.delete(o),Iw(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=>jY(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 jY(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=cr(e,s).height;i||(i=s.rowHeight!==r),s.setRowHeight(r)}s.setRowIndex(o),n+=s.rowHeight}),i}function pI(e,t,n){if(t.pinnedSibling)return t.pinnedSibling;const i=u9(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=n;const s=n==="top"?cw:dw;return i.id=`${s}${n}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function Iw(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 KY(e){const t=new Set;e.forEach(n=>{n.group&&t.add(n)}),t.forEach(n=>e.delete(n))}function qY(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 gI(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 YY({gos:e,rowModel:t}){mn(e)&&t.refreshModel({step:"map"})}var mI=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)};od(this.pinnedBottomRows,t),od(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const n=i=>{if(i.rowHeightEstimated){const s=cr(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return od(this.pinnedBottomRows,n),t=0,od(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"?cw:dw,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)){Re(96,{id:h,data:d});continue}u++,a.add(h),r.push(h);const p=sd(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 gr(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=sd(n,d))==null||c.clearRowTopAndRowIndex(),delete n.cache[d];n.order=r}setRowTopAndRowIndex(e,t,n){return e.setRowTop(t),e.setRowHeight(cr(this.beans,e).height),e.setRowIndex(n),e.rowHeight}getPinnedTopTotalHeight(){return vI(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return vI(this.pinnedBottomRows)}getPinnedTopRowCount(){return kw(this.pinnedTopRows)}getPinnedBottomRowCount(){return kw(this.pinnedBottomRows)}getPinnedTopRow(e){return _w(this.pinnedTopRows,e)}getPinnedBottomRow(e){return _w(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return sd(this.getCache(t),e)}forEachPinnedRow(e,t){return od(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function vI(e){const t=kw(e);if(t===0)return 0;const n=_w(e,t-1);return n===void 0?0:n.rowTop+n.rowHeight}function sd(e,t){return e.cache[t]}function _w(e,t){return sd(e,e.order[t])}function od(e,t){e.order.forEach((n,i)=>{const s=sd(e,n);s&&t(s,i)})}function kw(e){return e.order.length}var ZY=class extends ge{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const n=e.get("enableRowPinning"),i=AP(e),o=!!n||(i==="pinnedBottom"||i==="pinnedTop"),r=o?this.inner instanceof mI:this.inner instanceof fI;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(o?new fI:new mI))};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 rd(e){return!!(e.rowPinned&&e.pinnedSibling)}function ts(e,t,n,i){const s=t==="top";if(!n)return ts(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const l=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return ts(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 JY={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},QY=class extends Bt{constructor(){super(JY,[tw]),this.eCheckbox=He}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=Ff(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:Ra,click:i=>{var s;Ra(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"?kC(i):void 0,r=typeof s=="object"?kC(s):void 0;o!==r&&this.onSelectableChanged()}),OC(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"?!kC(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}},XY=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 ts(n,"top",e,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const s=ts(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 ts(n,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const s=ts(n,"top",t,void 0),o=ts(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 ts(n,"top",t,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const s=ts(n,"top",e,void 0),o=ts(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 ts(n,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const s=ts(n,"bottom",void 0,t),o=i.getRow(i.getRowCount());return(i.getNodesInRangeForSelection(e,o)??[]).concat(s)}return null}},eZ=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(an(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new ew);this.cbSelectAll=t,t.addCss("ag-header-select-all"),rr(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=Ff(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 qc(this.gos)?!0:(Re(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:n}=this.beans;return mn(t)||zl(t)?!0:(Re(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 CI(n,e)&&this.checkRightRowModelType(o)&&this.checkSelectionType(o)}getSelectAllMode(){const e=OP(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 CI({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=Ao(n),u=MC(n);(Vf(i)==="autoGroupColumn"&&u||l&&(t!=null&&t.isSelectionColumnEnabled()))&&(r=Nf(i))}else typeof o=="function"?r=o(st(e,{column:n,colDef:s})):r=!!o;return r}var tZ=class extends ge{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new XY(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const n=OC(e);n!==this.isRowSelectable&&(this.isRowSelectable=n,this.updateSelectable())}),this.isRowSelectable=OC(e),this.addManagedEventListeners({cellValueChanged:n=>this.updateRowSelectable(n.node),rowNodeDataChanged:n=>this.updateRowSelectable(n.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new QY}createSelectAllFeature(e){if(CI(this.beans,e))return new eZ(e)}isMultiSelect(){return qc(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;XT(o,i),o.contains(an(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&&!rd(e)||!ga(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(Yc(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({...a9(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=Ao(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=Yc(s),l=AK(s),u=IK(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=_K(s),p=Hf(s)==="filteredDescendants",g=d&&(!h||!l);if(p&&r===void 0&&mn(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}}}},Ow={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},nZ=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=On(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 ba(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}},iZ=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 b of s)v!=null?b.setAttribute("tabindex",v):b.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 nZ({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=On(this.beans).createElement("div"),n=e==="top"?Ow.TAB_GUARD_TOP:Ow.TAB_GUARD_BOTTOM;return t.classList.add(Ow.TAB_GUARD,n),rr(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];Bn(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,n){wC(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",t):e(t,n)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;Ss(e),Ss(t),super.destroy()}},wI=class extends Bt{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new iZ(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},sZ=500,oZ=550,fp,rZ=e=>{if(!fp)fp=new WeakSet;else if(fp.has(e))return!1;return fp.add(e),!0},Fa=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 ha;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||!rZ(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};_f(n,[i,"touchmove",o,l],[s,"touchcancel",a,l],[s,"touchend",r,u],[s,"contextmenu",lr,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}))},oZ)}onTouchMove(e){const{moved:t,touchStart:n}=this;if(!t&&n){const i=zc(n,e.touches);i&&!dP(i,n,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){var n;const t=this.touchStart;!t||!zc(t,e.changedTouches)||(this.moved||((n=this.eventSvc)==null||n.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&lr(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!zc(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){var i;let t=Date.now();const n=this.lastTapTime;n&&t-n>sZ&&((i=this.eventSvc)==null||i.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),SC(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}},aZ=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)}},lZ=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${vP}/${this.frameworkName}-data-grid`,wK(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}};function uZ(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var cZ=["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"],yI=Object.fromEntries(cZ.map((e,t)=>[e,t]));function dZ(e,t){const n=(e.beanName?yI[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,i=(t.beanName?yI[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return n-i}function hZ(e,t){return(e==null?void 0:e.beanName)==="gridDestroySvc"?-1:(t==null?void 0:t.beanName)==="gridDestroySvc"?1:0}var fZ={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},pZ={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},gZ={tag:"div",cls:"ag-header-viewport",role:"rowgroup",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"presentation"}]},Mw=class extends Bt{constructor(e){super(),this.eCenterContainer=He,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 AY(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",n=e?fZ:t?pZ:gZ;this.setTemplate(n),this.eRowContainer=this.eCenterContainer!==He?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&&oP(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 FY(s));this.headerRowComps[o]=a,this.rowCompsList.push(a),i(a)}for(const s of Object.values(t))this.destroyRowComp(s)}},mZ={tag:"div",cls:"ag-header",role:"presentation"},vZ=class extends Bt{constructor(){super(mZ)}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 wY).setComp(e,this.getGui(),this.getFocusableElement());const n=i=>{this.createManagedBean(i),this.appendChild(i)};n(new Mw("left")),n(new Mw(null)),n(new Mw("right"))}},CZ={selector:"AG-HEADER-ROOT",component:vZ},wZ=class extends Bt{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=Cn({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=o;let r;t.isCellSpanning()?(r=Cn({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(o),this.setTemplateFromElement(r)):this.setTemplateFromElement(o),this.cellCssManager=new eA(()=>o),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const a={toggleCss:(l,u)=>this.cellCssManager.toggleCss(l,u),setUserStyles:l=>Hc(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=Cn({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!n&&this.eCellWrapper!=null;s&&(Ss(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=Cn({tag:"span",cls:u,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}const a=!o&&this.eCellValue!=null;a&&(Ss(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)),nn(this.cellEditor)&&o.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();Bn(t);const n=Vl(e);n!=null&&(t.textContent=n)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),Ss(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(an(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),Ss(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();Bn(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){Re(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(an(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),Bn(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){var w;const{gos:n,context:i,popupSvc:s,editSvc:o}=this.beans;n.get("editType")==="fullRow"&&Re(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??((w=a.getPopupPosition)==null?void 0:w.call(a))??"over",v=n.get("enableRtl"),b={ePopup:p,column:d,rowNode:c,type:"popupCellEditor",eventSource:u,position:C,alignSide:v?"right":"left",keepWithinBounds:!0},S=s.positionPopupByComponent.bind(s,b),D=s.addPopup({modal:g,eChild:p,closeOnEsc:!0,closedCallback:()=>{h.onPopupEditorClosed()},anchorToElement:u,positionCallback:S,ariaOwns:u});D&&(this.hideEditorPopup=D.hideFunc)}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},yZ=class extends Bt{constructor(e,t,n){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const i=Cn({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=>Hc(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())}rP(this.getGui(),t)}newCellComp(e){var i;const t=((i=this.beans.editSvc)==null?void 0:i.isEditing(e,{withOpenEditor:!0}))??!1,n=new wZ(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 bZ(e,t,n){const i=!!n.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,s={tag:"div",ref:"eContainer",cls:cp(e),role:"rowgroup"};if(t.type==="center"||i){const o={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${W9(e)}`,role:"presentation"};return s.role="presentation",{tag:"div",ref:"eViewport",cls:`ag-viewport ${ZA(e)}`,role:"rowgroup",children:[s,i?o:null]}}return s}var SZ=class extends Bt{constructor(e){super(),this.eViewport=He,this.eContainer=He,this.eSpannedContainer=He,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e==null?void 0:e.name,this.options=nd(this.name)}postConstruct(){this.setTemplate(bZ(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 Q9(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 yZ(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){oP(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},EZ={selector:"AG-ROW-CONTAINER",component:SZ};function ad(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 RZ(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:ad(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:ad(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:ad(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:ad(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:ad(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:n}}var DZ=class extends Bt{constructor(){super(...arguments),this.eGridRoot=He,this.eBodyViewport=He,this.eStickyTop=He,this.eStickyBottom=He,this.eTop=He,this.eBottom=He,this.eBody=He}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,n=e==null?void 0:e.getOverlayWrapperSelector(),{paramsMap:i,elementParams:s}=RZ(!!n);this.setTemplate(s,[...n?[n]:[],oY,lY,CZ,EZ],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=>O8(this.getGui(),a),setRowCount:a=>_8(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(Ds.AUTO_HEIGHT,l.autoHeight),c.toggle(Ds.NORMAL,l.normal),c.toggle(Ds.PRINT,l.print);this.toggleCss(Ds.AUTO_HEIGHT,l.autoHeight),this.toggleCss(Ds.NORMAL,l.normal),this.toggleCss(Ds.PRINT,l.print)},setAlwaysVerticalScrollClass:(a,l)=>this.eBodyViewport.classList.toggle(XA,l),registerBodyViewportResizeListener:a=>{const l=ar(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=>rr(this.eGridRoot,a)};this.ctrl=this.createManagedBean(new tY),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&To(this.gos)||qc(this.gos))&&I8(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const n=this.eBodyViewport.classList;n.toggle("ag-row-animation",t),n.toggle("ag-row-no-animation",!t)}},FZ={selector:"AG-GRID-BODY",component:DZ},xZ=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 gw(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const o=ar(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>o()),s.register("gridCtrl",this)}isDetailGrid(){var t;const e=fA(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=jt(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(jt(n),e);const r=jt(o);if(i.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||Da(this.beans)){if(i.focusGridView({column:o[0],backwards:e}))return!0;for(let r=1;r<n.length;r++)if(ya(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!dp(e)||!Da(e)||!!((n=(t=e.sideBar)==null?void 0:t.comp)!=null&&n.isDisplayed())}getNextFocusableIndex(e,t){const n=an(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=ya(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()}},TZ=class extends wI{constructor(e){super(),this.gridBody=He,this.sideBar=He,this.pagination=He,this.rootWrapperBody=He,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 xZ),n=t.getOptionalSelectors(),i=this.createTemplate(n),s=[FZ,...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(),ur(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const n=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:o}=Ds,{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=>$s(t.getGui()))}},lt=(e,t)=>{for(const n of Object.keys(t))t[n]=e;return t},bI={dispatchEvent:"CommunityCore",...lt("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...lt("GridState",{getState:0,setState:0}),...lt("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...lt("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...lt("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...lt("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...lt("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...lt("ValueCache",{expireValueCache:0}),...lt("CellApi",{getCellValue:0}),...lt("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...lt("Sort",{onSortChanged:0}),...lt("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...lt("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...lt("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...lt("HighlightChanges",{flashCells:0}),...lt("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...lt("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}),...lt("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...lt("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...lt("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...lt("ColumnResize",{setColumnWidths:0}),...lt("ColumnHover",{isColumnHovered:0}),...lt("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...lt("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...lt("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...lt("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...lt("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...lt("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...lt("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...lt("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...lt("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0}),...lt("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...lt("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}),...lt("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...lt("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...lt("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...lt("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...lt("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...lt("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...lt("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...lt("ContextMenu",{showContextMenu:0}),...lt("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...lt("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...lt("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...lt("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...lt("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}),...lt("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...lt("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...lt("StatusBar",{getStatusPanel:0}),...lt("AiToolkit",{getStructuredSchema:0})},Lw={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},PZ=(e,t)=>e.eventSvc.dispatchEvent(t),SI=class{};Reflect.defineProperty(SI,"name",{value:"GridApi"});var AZ=class extends ge{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new SI,this.fns={...Lw,dispatchEvent:PZ},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(bI))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!==Lw&&(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)Re(26,{fnName:e,preDestroyLink:i});else{const s=bI[e];n.assertModuleRegistered(s,`api.${e}`)&&Re(27,{fnName:e,module:s})}}destroy(){super.destroy(),this.fns=Lw,this.beans=null}};function IZ(e){return e.context.getId()}function _Z(e){e.gridDestroySvc.destroy()}function kZ(e){return e.gridDestroySvc.destroyCalled}function OZ(e,t){return e.gos.get(t)}function MZ(e,t,n){EI(e,{[t]:n})}function EI(e,t){e.gos.updateGridOptions({options:t})}function LZ(e,t){const n=t.replace(/Module$/,"");return e.gos.isModuleRegistered(n)}var NZ={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},VZ=class extends Bt{constructor(e,t,n){super(NZ),this.rowNode=e,this.column=t,this.eCell=n}postConstruct(){this.getGui().appendChild(es("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=st(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 BZ(e,t){var n,i;(i=(n=e.rowDragSvc)==null?void 0:n.rowDragFeature)==null||i.addRowDropZone(t)}function HZ(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 GZ(e,t){var n,i;return(i=(n=e.rowDragSvc)==null?void 0:n.rowDragFeature)==null?void 0:i.getRowDropZone(t)}function WZ(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function zZ(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 $Z=class extends i9{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},UZ=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)}},jZ={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},KZ=class extends Bt{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(jZ),this.getGui().appendChild(es("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)}},pp=class{constructor(){this.reordered=!1,this.removals=new Set,this.updates=new Set,this.adds=new Set}};function qZ(e){const{rowIndex:t,rowPinned:n,column:i}=e;return`${t}.${n??"null"}.${i.getId()}`}function RI(e,t){const n=e.column===t.column,i=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return n&&i&&s}function YZ(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(Ge(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function ZZ(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function JZ(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 QZ(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 Lo(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 XZ(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 gp(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 FI(e,l,!0)??{rowIndex:i-1,rowPinned:s}}return{rowIndex:i-1,rowPinned:s}}function DI(e,t,n=!1){const{rowIndex:i,rowPinned:s}=t,{pageBounds:o,pinnedRowModel:r,rowModel:a}=e;if(eJ(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 FI(e,l)??{rowIndex:i+1,rowPinned:s}}return{rowIndex:i+1,rowPinned:s}}function FI(e,t,n=!1){const{gos:i,rowRenderer:s}=e;if(!(t!=null&&t.sticky)||!PP(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 eJ(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 ld=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()])}},tJ=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 aZ({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}},nJ=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 tJ(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(oJ)}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,PI(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 D,w;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=!!((D=this.beans.groupStage)!=null&&D.treeData)&&l;let g=null;if(d!=null&&d.footer){const R=mp(a,-1,d)??mp(a,1,d);g=d.sibling??u,d=R??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&&mn(o)){const R=rJ(a,r);R&&(C=c.rowIndex>R.rowIndex?-.5:.5,d=R,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&&((w=d.childrenAfterSort)!=null&&w.length))&&v.startGroup(d)),g??(g=(d==null?void 0:d.parent)??u));let b=!1;if(g){if(g===d&&g!==u){const R=g.expanded?mp(a,1,d):null;(R==null?void 0:R.parent)===g?(d=R,C=-.5):b=!0}if(d&&!b){let R=d;for(;R&&R!==u&&R!==g;)d=R,R=R.parent}}r.target=d,r.newParent=g,r.moved&&(r.moved=c!==d);const S=C<0?"above":"below";return r.position=r.moved?b?"inside":S:"none",this.validateRowsDrop(r,p,S,i),t.changed||(t.changed=sJ(e==null?void 0:e.dropTarget,r)),r}newRowsDrop(e,t){const{beans:n,gos:i}=this,s=n.rowModel.rootNode,o=mn(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=eI(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&&xI(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&&xI(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()){Re(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){Re(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:eI(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),PI(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?TI(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&&iJ(r,e)||!Nw(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=Nw(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 pp;return d.reordered=!0,c.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedPath:new ld(!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?TI(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}},mp=(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}}},iJ=(e,t)=>{let n=t;for(;n;){if(n===e)return!0;n=n.parent}return!1},xI=(e,t)=>{for(let n=0,i=e.length;n<i;++n)if(e[n].parent!==t)return!1;return!0},TI=e=>{const t=Nw(e);return t!==void 0?t.sourceRowIndex:-1},Nw=e=>e.data?e:OA(e.childrenAfterGroup),sJ=(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||!hr(e.rows,t.rows)),oJ=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,PI=(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"))}},rJ=(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=mp(e,r,i);if(!l)break;a.has(l)||(n=l,--o),i=l}while(o>0);return n},aJ=class extends ge{constructor(){super(...arguments),this.beanName="rowDragSvc"}setupRowDrag(e,t){const n=t.createManagedBean(new nJ(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 KZ(e,t,n,i,s,o)}createRowDragCompForRow(e,t){if(To(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")&&(!mn(r)||r.get("pagination"))?void 0:this.createRowDragComp(n,e,t,i,s,o)}},lJ=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()}},AI={moduleName:"Drag",version:Be,beans:[$Z]},uJ={moduleName:"DragAndDrop",version:Be,dynamicBeans:{dndSourceComp:VZ},icons:{rowDrag:"grip"}},II={moduleName:"SharedDragAndDrop",version:Be,beans:[o9],dependsOn:[AI],userComponents:{agDragAndDropImage:BY},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},cJ={moduleName:"RowDrag",version:Be,beans:[lJ,aJ],apiFunctions:{addRowDropZone:BZ,removeRowDropZone:HZ,getRowDropZoneParams:GZ,getRowDropPositionIndicator:WZ,setRowDropPositionIndicator:zZ},dependsOn:[II]},dJ={moduleName:"HorizontalResize",version:Be,beans:[UZ],dependsOn:[AI]},hJ=":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}}",fJ=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 pJ(e,t,n){var i;(i=e.colMoves)==null||i.moveColumnByIndex(t,n,"api")}function gJ(e,t,n){var i;(i=e.colMoves)==null||i.moveColumns(t,n,"api")}var mJ=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 vJ(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 CJ(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 wJ(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(!hr(c,r))break;const d=bJ(u);(o===null||d<o.fragCount)&&(o={move:l,fragCount:d})}return o}function _I(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=CJ(d));const h=d.slice();vJ(l.getCols(),h);const p=EJ({movingCols:h,draggingRight:n,xPosition:i,pinned:r,gos:a,colModel:l,visibleCols:c}),g=yJ(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 b=wJ(p,h,u,c);if(!b)return;const S=b.move;if(!(S>l.getCols().length-h.length))return{columns:h,toIndex:S}}function kI(e){const{columns:t,toIndex:n}=_I(e)||{},{finished:i,colMoves:s}=e;return!t||n==null?null:(s.moveColumns(t,n,"uiColumnMoved",i),i?null:{columns:t,toIndex:n})}function yJ(e,t){const n=t.getCols(),i=e.map(l=>n.indexOf(l)).sort((l,u)=>l-u),s=i[0];return jt(i)-s!==i.length-1?null:s}function bJ(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 SJ(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function EJ(e){const{movingCols:t,draggingRight:n,xPosition:i,pinned:s,gos:o,colModel:r,visibleCols:a}=e;if(o.get("suppressMovableColumns")||t.some(D=>D.getColDef().suppressMovable))return[];const u=SJ(a,s),c=r.getCols(),d=u.filter(D=>t.includes(D)),h=u.filter(D=>!t.includes(D)),p=c.filter(D=>!t.includes(D));let g=0,C=i;if(n){let D=0;for(const w of d)D+=w.getActualWidth();C-=D}if(C>0){for(let D=0;D<h.length;D++){const w=h[D];if(C-=w.getActualWidth(),C<0)break;g++}n&&g++}let v;if(g>0){const D=h[g-1];v=p.indexOf(D)+1}else v=p.indexOf(h[0]),v===-1&&(v=0);const b=[v],S=(D,w)=>D-w;if(n){let D=v+1;const w=c.length-1;for(;D<=w;)b.push(D),D++;b.sort(S)}else{let D=v;const w=c.length-1;let R=c[D];for(;D<=w&&u.indexOf(R)<0;)D++,b.push(D),R=c[D];D=v-1;const x=0;for(;D>=x;)b.push(D),D--;b.sort(S).reverse()}return b}function Vw(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 Bw(e,t){for(const n of e)n.moving=t,n.dispatchColEvent("movingChanged","uiColumnMoved")}var OI=7,Hw=100,vp=Hw/2,RJ=5,DJ=100,FJ=class extends ge{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!Ge(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&&nn(e.hDirection))return;const a=Vw({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=kI({...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=jt(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,MI(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}=xJ(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 Vw({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>OI;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}=_I(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(MI(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+vp,o=e>i-vp):(o=e<n+vp,s=e>i-vp),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),DJ),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*RJ,e>Hw&&(e=Hw);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<=OI+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 MI(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function xJ(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 TJ=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 FJ(n)),this.bodyDropPivotTarget=this.createManagedBean(new mJ(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()}},PJ=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){Re(30,{toIndex:t});return}o==null||o.start();const u=s.getColsForKeys(e);this.doesMovePassRules(u,t)&&(BP(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!(!jP(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 BP(i,e,t),i}createBodyDropTarget(e,t){return new TJ(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=vn(n),p=h?c.width:n.getActualWidth(),g=e==="left"!==r.get("enableRtl"),C=Vw({x:g?d-20:d+p+20,pinned:i,fromKeyboard:!0,gos:r,ctrlsSvc:o}),v=u.focusedHeader;kI({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 b;if(h){const S=n.getDisplayedLeafColumns();b=g?S[0]:jt(S)}else b=n;if(o.getScrollFeature().ensureColumnVisible(b,"auto"),(!s.isAlive()||r.get("ensureDomOrder"))&&v){let S;if(h){const D=n.getGroupId(),w=n.getLeafColumns();if(!w.length)return;const R=w[0].getParent();if(!R)return;S=AJ(R,D)}else S=n;S&&u.focusHeaderPosition({headerPosition:{...v,column:S}})}}setDragSourceForHeader(e,t,n){const{gos:i,colModel:s,dragAndDrop:o,visibleCols:r}=this.beans;let a=!i.get("suppressDragLeaveHidesColumns");const l=vn(t),u=l?t.getProvidedColumnGroup().getLeafColumns():[t],d={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>_J(t,r.allCols):()=>IJ(t),dragItemName:n,onDragStarted:()=>{a=!i.get("suppressDragLeaveHidesColumns"),Bw(u,!0)},onDragStopped:()=>Bw(u,!1),onDragCancelled:()=>Bw(u,!1),onGridEnter:h=>{if(a){const{columns:p=[],visibleState:g}=h??{},C=l?b=>!g||g[b.getColId()]:()=>!0,v=p.filter(b=>!b.getColDef().lockVisible&&C(b));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 AJ(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function IJ(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function _J(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),Es(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 kJ={moduleName:"ColumnMove",version:Be,beans:[PJ,fJ],apiFunctions:{moveColumnByIndex:pJ,moveColumns:gJ},dependsOn:[II],css:[hJ]},OJ=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)}},LI={moduleName:"AutoWidth",version:Be,beans:[OJ]};function MJ(e,t,n=!0,i="api"){var s;(s=e.colResize)==null||s.setColumnWidths(t,!1,n,i)}var LJ=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}},NJ=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(sn(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=Bc(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}},VJ=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=>BJ(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 S of h)r.push(S);let v=!0,b=0;for(;v;){if(b++,b>1e3){$t(31);break}v=!1;const S=[];let D=0,w=d;h.forEach((x,T)=>{if(C[x.getId()])w-=g[x.getId()];else{S.push(x);const N=p[T];D+=N}});const R=1/D;S.forEach((x,T)=>{const H=T===S.length-1;let N;H?N=w:(N=Math.round(p[T]*d*R),w-=N);const A=x.getMinWidth(),_=x.getMaxWidth();N<A?(N=A,C[x.getId()]=!0,v=!0):_>0&&N>_&&(N=_,C[x.getId()]=!0,v=!0),g[x.getId()]=N})}for(const S of h){const D=g[S.getId()];S.getActualWidth()!==D&&(S.setActualWidth(D,i),o.push(S))}}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 NJ(e,t,n,i,s)}createGroupResizeFeature(e,t,n,i){return new LJ(e,t,n,i)}};function BJ(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 HJ={moduleName:"ColumnResize",version:Be,beans:[VJ],apiFunctions:{setColumnWidths:MJ},dependsOn:[dJ,LI]},GJ=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)}},WJ=class extends Tw{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=Qc(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 xw(o,t,r)),s.createManagedBean(new GJ(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 st(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=jt(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=st(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=I7(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=nI(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===oe.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 zJ(e,t,n){var i;(i=e.colGroupSvc)==null||i.setColumnGroupOpened(t,n,"api")}function $J(e,t,n){var i;return((i=e.colGroupSvc)==null?void 0:i.getColumnGroup(t,n))??null}function UJ(e,t){var n;return((n=e.colGroupSvc)==null?void 0:n.getProvidedColGroup(t))??null}function jJ(e,t,n){return e.colNames.getDisplayNameForColumnGroup(t,n)||""}function KJ(e){var t;return((t=e.colGroupSvc)==null?void 0:t.getColumnGroupState())??[]}function qJ(e,t){var n;(n=e.colGroupSvc)==null||n.setColumnGroupState(t,"api")}function YJ(e){var t;(t=e.colGroupSvc)==null||t.resetColumnGroupState("api")}function ZJ(e){return e.visibleCols.treeLeft}function JJ(e){return e.visibleCols.treeCenter}function QJ(e){return e.visibleCols.treeRight}function XJ(e){return e.visibleCols.getAllTrees()}function eQ(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 tQ=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=Gw(this.treeLeft),this.centerCols=Gw(this.treeCenter),this.rightCols=Gw(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=Po(this.centerCols),t=Po(this.leftCols),n=Po(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?jt(n):null):(s=t?jt(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 QP,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 vn(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)vn(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=Po(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()}eQ(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};xa(this.treeCenter,!1,e),xa(this.treeLeft,!1,e),xa(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?jt(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 Po(this.leftCols)}getDisplayedColumnsRightWidth(){return Po(this.rightCols)}isColAtEdge(e,t){const n=this.allCols;if(!n.length)return!1;const i=t==="first";let s;if(vn(e)){const o=e.getDisplayedLeafColumns();if(!o.length)return!1;s=i?o[0]:jt(o)}else s=e;return(i?n[0]:jt(n))===s}};function xa(e,t,n){if(e)for(let i=0;i<e.length;i++){const s=e[i];if(vn(s)){const o=t?s.getDisplayedChildren():s.getChildren();xa(o,t,n)}n(s)}}function Gw(e){const t=[];return xa(e,!0,n=>{dr(n)&&t.push(n)}),t}var nQ=class extends ge{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return _o(null,t,n=>{Yn(n)&&e.push({groupId:n.getGroupId(),open:n.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const n=[];_o(null,t,i=>{if(Yn(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;Yn(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],n)}getProvidedColGroup(e){let t=null;return _o(null,this.beans.colModel.getColTree(),n=>{Yn(n)&&n.getId()===e&&(t=n)}),t}getGroupAtDirection(e,t){const n=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),s=t==="After"?jt(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();xa(e,!1,t=>{vn(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(vn(e))return e;const n=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let s=null;return xa(n,!1,o=>{if(vn(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=(vn(g)?g.getProvidedColumnGroup():g).getOriginalParent();if(v==null){for(let S=p;S<h;S++)a.push(u[S]);return}const b=this.createColumnGroup(v,n,r,i,o);for(let S=p;S<h;S++)b.addChild(u[S]);l.push(b)};for(let h=1;h<u.length;h++){const p=u[h],C=(vn(p)?p.getProvidedColumnGroup():p).getOriginalParent(),v=u[c],S=(vn(v)?v.getProvidedColumnGroup():v).getOriginalParent();C!==S&&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=VP(this.beans,t,a),u=new Gf(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=zP(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(Yn(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=VP(this.beans,null,c),h=new Gf(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=>Yn(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]&&Yn(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(Yn(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 Gf(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=kA(o,r);let l=n[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),Ge(l)?l.reset():(l=new td(e,o,r,i),s||this.createBean(l)),l}mapOldGroupsById(e){const t={},n=i=>{for(const s of i)if(vn(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,vn(n)){const i=n;this.setupParentsIntoCols(i.getChildren(),i)}}},iQ={moduleName:"ColumnGroup",version:Be,dynamicBeans:{headerGroupCellCtrl:WJ},beans:[nQ],apiFunctions:{getAllDisplayedColumnGroups:XJ,getCenterDisplayedColumnGroups:JJ,getColumnGroup:$J,getColumnGroupState:KJ,getDisplayNameForColumnGroup:jJ,getLeftDisplayedColumnGroups:ZJ,getProvidedColumnGroup:UJ,getRightDisplayedColumnGroups:QJ,resetColumnGroupState:YJ,setColumnGroupOpened:zJ,setColumnGroupState:qJ}},sQ={tag:"div",cls:"ag-skeleton-container"},oQ=class extends Bt{constructor(){super(sQ)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>Lc(e.eParentOfValue)),Lc(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=Cn({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}},rQ={moduleName:"CheckboxCellRenderer",version:Be,userComponents:{agCheckboxCellRenderer:WY}},aQ={moduleName:"SkeletonCellRenderer",version:Be,userComponents:{agSkeletonCellRenderer:oQ}};function lQ(e,t){const n=e.colModel.getColDefCol(t);return n?n.getColDef():null}function uQ(e){return e.colModel.getColumnDefs(!0)}function cQ(e,t,n){return e.colNames.getDisplayNameForColumn(t,n)||""}function dQ(e,t){return e.colModel.getColDefCol(t)}function hQ(e){return e.colModel.getColDefCols()}function fQ(e,t){return Rs(e,t,"api")}function pQ(e){return Uf(e)}function gQ(e){n7(e,"api")}function mQ(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function vQ(e){return e.visibleCols.isPinningLeft()}function CQ(e){return e.visibleCols.isPinningRight()}function wQ(e,t){return e.visibleCols.getColAfter(t)}function yQ(e,t){return e.visibleCols.getColBefore(t)}function bQ(e,t,n){e.colModel.setColsVisible(t,n,"api")}function SQ(e,t,n){var i;(i=e.pinnedCols)==null||i.setColsPinned(t,n,"api")}function EQ(e){return e.colModel.getCols()}function RQ(e){return e.visibleCols.leftCols}function DQ(e){return e.visibleCols.centerCols}function FQ(e){return e.visibleCols.rightCols}function xQ(e){return e.visibleCols.allCols}function TQ(e){return e.colViewport.getViewportColumns()}function Ww(e,t){if(!e)return;const n=e,i={};for(const s of Object.keys(n)){if(t&&t.indexOf(s)>=0||gP.has(s))continue;const o=n[s];typeof o=="object"&&o!==null&&o.constructor===Object?i[s]=Ww(o):i[s]=o}return i}var PQ=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=Ww(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,n){const i=Ww(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}},AQ=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 b=C.getFlex(),S=b!=null&&b>0&&v>r;return a||(a=S),{col:C,isFlex:S,flex:Math.max(0,b??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,b=0,S=0;for(const R of l){if(p(R))continue;v=R,S+=C*(R.flex/c);const x=S-b,T=Math.round(x);R.targetSize=T,b+=T}v&&(v.targetSize+=C-b);let D=0;for(const R of l){if(p(R))continue;const x=R.targetSize,T=Math.min(Math.max(x,R.min),R.max);D+=T-x,R.violationType=T===x?void 0:T<x?"max":"min",R.targetSize=T}const w=D===0?"all":D>0?"min":"max";for(const R of l)p(R)||(w==="all"||R.violationType===w)&&h(R,R.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(b=>b.initialSize!==b.frozenSize).map(b=>b.col),v=l.filter(b=>b.flex).map(b=>b.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 ud(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 IQ=["dateTimeString","dateString","text","number","boolean","date"],_Q=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===oe.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:BI(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 IQ)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),!VI(e,r,o))return;s=NI(r,e)}else{if(n.includes(o)){Re(44);return}const r=t[o];if(!VI(e,r,o))return;const a=this.processDataTypeDefinition(r,t,[...n,o],i);if(!a)return;s=NI(a,e)}return{...s,groupSafeValueFormatter:BI(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){Re(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(!mn(n))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(zw(t,i))return!1;const s=t.type===null?e.type:t.type;if(s){const o=n.get("columnTypes")??{};if($f(s).some(a=>{const l=o[a.trim()];return l&&zw(l,i)}))return!1}return!zw(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=ud(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=OQ(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&&Rs(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=LC(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=>Re(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=>mi(i.newValue&&String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):ki(i.value,n)??"",dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:n=>mi(n)??void 0,dateFormatter:n=>ki(n??null,t)??void 0,valueParser:n=>Kf(String(n.newValue))?n.newValue:null,valueFormatter:n=>Kf(String(n.value))?String(n.value):"",dataTypeMatcher:n=>typeof n=="string"&&Kf(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:hC(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"&&q7(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>hC(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 NI(e,t){const n={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(n.columnTypes=[...$f(e.columnTypes),...$f(t.columnTypes)]),n}function VI(e,t,n){return t?t.baseDataType!==e.baseDataType?(Re(46),!1):!0:(Re(45,{parentCellDataType:n}),!1)}function BI(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 kQ(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 zw(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([n,i])=>kQ(e,t,n,i))}function OQ(e,t){const n=ZP(e);for(const i of t)delete n[i],i==="rowGroup"?delete n.rowGroupIndex:i==="pivot"&&delete n.pivotIndex;return n}var MQ={moduleName:"DataType",version:Be,beans:[_Q],dependsOn:[rQ]},LQ={moduleName:"ColumnFlex",version:Be,beans:[AQ]},HI={moduleName:"ColumnApi",version:Be,beans:[PQ],apiFunctions:{getColumnDef:lQ,getDisplayNameForColumn:cQ,getColumn:dQ,getColumns:hQ,applyColumnState:fQ,getColumnState:pQ,resetColumnState:gQ,isPinning:mQ,isPinningLeft:vQ,isPinningRight:CQ,getDisplayedColAfter:wQ,getDisplayedColBefore:yQ,setColumnsVisible:bQ,setColumnsPinned:SQ,getAllGridColumns:EQ,getDisplayedLeftColumns:RQ,getDisplayedCenterColumns:DQ,getDisplayedRightColumns:FQ,getAllDisplayedColumns:xQ,getAllDisplayedVirtualColumns:TQ,getColumnDefs:uQ}};function NQ(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 VQ=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=st(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 NQ(e.field)}return""}},BQ=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()||HQ(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 Ge(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 HQ(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var GQ=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=mC("<span>"+o+"</span>");return}if(o==null){this.eGui=Cn({tag:"span"});return}this.eGui=o}}return n}},WQ={moduleName:"CellRendererFunction",version:Be,beans:[GQ]},zQ=class extends Uq{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(z7(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?Ks(279,{name:e}):((n=this.beans.validation)==null?void 0:n.missingDynamicBean(e))??Ks(256)}},$Q=23,UQ=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===$Q&&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}},jQ='.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}',KQ={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:vi,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:ko,rangeSelectionBackgroundColor:Qs(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Qs(.5),rangeHeaderHighlightColor:Dq(.08),rowNumbersSelectedColor:Qs(.5),rowHoverColor:Qs(.08),columnHoverColor:Qs(.05),selectedRowBackgroundColor:Qs(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:vi,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:Ji(.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:Ji(.1),iconButtonActiveColor:ko,iconButtonActiveBackgroundColor:Qs(.28),iconButtonActiveIndicatorColor:ko,menuBorder:{color:Ji(.2)},menuBackgroundColor:Qi(.03),menuTextColor:Qi(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:Ji(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:ko},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},dialogBorder:{color:Ji(.2)},panelBackgroundColor:vi,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:Ji(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:Ji(.13)},selectCellBackgroundColor:Ji(.07),selectCellBorder:{color:Ji(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:vi,filterPanelApplyButtonBackgroundColor:ko,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:Ql,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:Ql,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:Ji(.15),statusBarLabelColor:Ql,statusBarLabelFontWeight:500,statusBarValueColor:Ql,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"}},qQ=".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)}",GI={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},YQ={...GI,cellBatchEditTextColor:"#f3d0b3"},ZQ=()=>Zs({feature:"batchEditStyle",params:GI,css:qQ}),JQ=ZQ(),QQ=":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)}}",XQ={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"}},eX=()=>Zs({feature:"buttonStyle",params:{...XQ,buttonBackgroundColor:vi,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:ko}},css:QQ}),tX=eX(),nX=".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}",iX=()=>Zs({feature:"columnDropStyle",css:nX}),WI=iX(),sX={warn:(...e)=>{Re(e[0],e[1])},error:(...e)=>{$t(e[0],e[1])},preInitErr:(...e)=>{Kc(e[0],e[2],e[1])}},oX=()=>Lq(sX).withParams(KQ).withPart(tX).withPart(WI).withPart(JQ),rX='.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)}}',aX=()=>Zs({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:vi,checkboxUncheckedBorderColor:Qi(.3),checkboxCheckedBackgroundColor:ko,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:vi,checkboxIndeterminateBackgroundColor:Qi(.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:vi,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:rX}),lX=aX(),zI=()=>({...Jf,...YQ,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Qi(.05),rowHoverColor:Qs(.15),selectedRowBackgroundColor:Qs(.2),menuBackgroundColor:Qi(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:Ql,findMatchColor:vi,findActiveMatchColor:vi,checkboxUncheckedBorderColor:Qi(.4),toggleButtonOffBackgroundColor:Qi(.4),rowBatchEditBackgroundColor:Qi(.1)}),uX=()=>({...zI(),backgroundColor:"#1f2836"}),cX=()=>Zs({feature:"colorScheme",params:Jf,modeParams:{light:Jf,dark:zI(),"dark-blue":uX()}}),dX=cX(),$I={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"/>'},UI={"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>'},hX=(e={})=>{let t="";for(const n of[...Object.keys($I),...Object.keys(UI)]){const i=fX(n,e.strokeWidth);t+=`.ag-icon-${n}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); }
|
|
88
|
+
`}return t},fX=(e,t=1.5)=>{const n=UI[e];if(n)return n;const i=$I[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>"},pX=(e={})=>Zs({feature:"iconSet",css:()=>hX(e)}),gX=pX(),mX=':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)}}}",CX={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},wX=()=>Zs({feature:"inputStyle",params:{...CX,inputBackgroundColor:vi,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:ko},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Qi(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>mX+vX}),yX=wX(),bX='.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)}}}',SX={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},EX=()=>Zs({feature:"tabStyle",params:{...SX,tabBarBorder:!0,tabBarBackgroundColor:Ji(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:vi},css:bX}),RX=EX(),DX=()=>oX().withPart(lX).withPart(dX).withPart(gX).withPart(RX).withPart(yX).withPart(WI).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),jI=DX(),FX={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},xX={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},TX={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},KI={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},qI={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},YI={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},$w={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},ZI={cssName:"--ag-pinned-row-border",changeKey:"pinnedRowBorderWidthChanged",defaultValue:1,border:!0};function PX(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 AX=class extends $q{constructor(){super(...arguments),this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1}initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(KI),this.getSizeEl(qI),this.getSizeEl(YI),this.getSizeEl($w),this.getSizeEl(ZI),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(ZI)}getRowBorderWidth(){return this.getCSSVariablePixelValue($w)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(KI)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(qI)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(FX)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(xX),n=this.getCSSVariablePixelValue(TX);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(YI)}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===Uw?"no-styles":(this.sizesMeasured=!0,n)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Cn({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=Cn({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 ${Uw}px)`)):t.style.width=`var(${e.cssName}, ${Uw}px)`,n.appendChild(t),this.sizeEls.set(e,t);let o=this.measureSizeEl(e);o==="no-styles"&&!s&&Re(9,{variable:e});const r=ar(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($w);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&$t(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",[jQ]),PX(e,Array.from(pK())),e}getDefaultTheme(){return jI}themeError(e){$t(240,{theme:e})}},Uw=15538,IX=class extends jq{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function JI(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 _X=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=On(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=jt(a||[]).type==="filter",u=eo(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=eo(this.beans),l=this.getHeaderRowType(o),u=i.headerGroupRowCount;let{headerRowIndex:c,column:d,headerRowIndexWithoutSpan:h}=e==="UP"?kX(l,r,o):OX(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=eo(i),l=this.beans.visibleCols.allCols;if(t==="Before"){if(s<=0)return!1;o=jt(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}=JI(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(vn(e)){const i=e.getDisplayedLeafColumns();n=t==="Before"?jt(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 td){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 Ca&&o.isSpanHeaderHeight()?i.headerGroupRowCount:e.headerRowIndex,column:o}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function kX(e,t,n){const i=n-1;if(e!=="filter"){const s=t instanceof Ca&&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 OX(e,t,n){const i=t+1,s={column:e,headerRowIndex:i,headerRowIndexWithoutSpan:i};if(e instanceof td){if(i>=n)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:n,headerRowIndexWithoutSpan:i};let r=e.getDisplayedChildren()[0];if(r instanceof td&&r.isPadding()){const l=r.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(r=l)}s.column=r,r instanceof Ca&&r.isSpanHeaderHeight()&&(s.headerRowIndex=n,s.headerRowIndexWithoutSpan=i)}return s}var MX=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(Q7(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(an(this.beans),rI)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=an(this.beans);return this.isDomDataPresentInHierarchy(e,ip)?!0:this.isDomDataPresentInHierarchy(e,sp)}isDomDataPresentInHierarchy(e,t){let n=e;for(;n;){if(TP(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:Fo(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:RI(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(),Da(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=eo(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(Da(this.beans))return!1;const{userFunc:t,headerPosition:n,direction:i,event:s}=e,o=this.focusedHeader,r=eo(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&&CY(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=JI(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=eo(this.beans)-1,n=jt(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===Fo(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&&ya(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(dp(this.beans))return t&&!Da(this.beans)?this.focusLastHeader():n&&this.focusOverlay(t)?!0:t?!1:tu(this.beans,t);const s=t?QZ(this.beans):JZ(this.beans);if(s){const d=e.column??((r=this.focusedHeader)==null?void 0:r.column),{rowIndex:h,rowPinned:p}=s,g=Lo(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===oe.TAB?v=C?oe.LEFT:oe.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:Fo(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:eo(this.beans)-1}}):this.focusGridView({column:n})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},LX=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:U7();n!=null&&(this.scrollbarWidth=n,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},NX=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()}},Cp=new Set(["gridPreDestroyed","fillStart","pasteStart"]),VX=["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"],jw=VX.reduce((e,t)=>(e[t]=LK(t),e),{}),cd=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),BX={tag:"span",cls:"ag-sort-indicator-container",children:[cd("Order","order"),cd("Asc","ascending-icon"),cd("Desc","descending-icon"),cd("Mixed","mixed-icon"),cd("None","none-icon")]},Kw=class extends Bt{constructor(e){super(),this.eSortOrder=He,this.eSortAsc=He,this.eSortDesc=He,this.eSortMixed=He,this.eSortNone=He,e||this.setTemplate(BX)}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=es(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&&sn(e,r==="asc",{skipAriaHidden:!0}),t&&sn(t,r==="desc",{skipAriaHidden:!0}),n){const a=!i.getColDef().unSortIcon&&!s.get("unSortIcon"),l=r==null;sn(n,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:n}=this;this.addInIcon("sortUnSort",e,t);const i=t.getColDef().showRowGroup;qs(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";sn(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;sn(e,r,{skipAriaHidden:!0}),s>=0?e.textContent=(s+1).toString():Bn(e)}},HX={selector:"AG-SORT-INDICATOR",component:Kw},dd=["asc","desc",null],GX=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=qs(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=qs(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")??dd,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=qs(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=qs(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=qs(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 Kw(e)}getSortIndicatorSelector(){return HX}},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 QI(e){return`"${e}"`}var WX=()=>({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."}}),zX={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"},$X=()=>({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 Ks(262);if(t.smallLeft)return Ks(263);if(t.smallRight)return Ks(264)}return null}},sortingOrder:{validate:t=>{const n=t.sortingOrder;if(Array.isArray(n)&&n.length>0){const i=n.filter(s=>!dd.includes(s));if(i.length>0)return`sortingOrder must be an array with elements from [${dd.map(Lf).join()}], currently it includes [${i.map(Lf).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(QI(a))}if(o.length>0){const a=`The following parts of colDef.groupHierarchy are not recognised: ${o.join(", ")}.`,l=`Choose one of ${[...s].map(QI).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${a}
|
|
89
|
+
${l}`}return null}}}),UX={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},jX=()=>Object.keys(UX),KX=()=>({objectName:"colDef",allProperties:jX(),docsUrl:"column-properties/",deprecations:WX(),validations:$X()}),qX=["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"],YX=["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"],ZX=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],XI=["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"],JX=["theme","rowSelection"],QX=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],e1=["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"],XX=["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"],eee=()=>[...ZX,...YX,...qX,...XI,...XX,...e1,...QX,...JX],tee=()=>({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 to(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 nee={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"},iee=()=>{const e={autoSizePadding:{validate({autoSizePadding:n}){return to("autoSizePadding",n,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:n}){return to("cacheBlockSize",n,1)}},cacheOverflowSize:{validate({cacheOverflowSize:n}){return to("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 Ks(262);if(n.smallLeft)return Ks(263);if(n.smallRight)return Ks(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:n}){return to("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 to("keepDetailRowsCount",n,1)}},paginationPageSize:{validate({paginationPageSize:n}){return to("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.
|
|
90
|
+
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 to("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 to("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=>!dd.includes(o));if(s.length>0)return`sortingOrder must be an array with elements from [${dd.map(Lf).join()}], currently it includes [${s.map(Lf).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 to("viewportRowModelBufferSize",n,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:n}){return to("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 e1)t[n]={expectedType:"boolean"};for(const n of XI)t[n]={expectedType:"number"};return di(t,e),t},see=()=>({objectName:"gridOptions",allProperties:[...eee(),...Object.values(jw)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:tee(),validations:iee()}),oee=0,ree=0,t1="__ag_grid_instance",aee=class extends ge{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=ree++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new ha,this.globalEventHandlerFactory=e=>(t,n)=>{if(!this.isAlive())return;const i=Cp.has(t);if(i&&!e||!i&&e||!lee(t))return;const s=(o,r)=>{const a=jw[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]??lK[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return Ge(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(n=>e(this.addCommon(n)))}updateGridOptions({options:e,force:t,source:n="api"}){const i={id:oee++,properties:[]},s=[],{gridOptions:o,validation:r}=this;for(const a of Object.keys(e)){const l=FC.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)ur(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,nee),(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,zX),(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||$t(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),n}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:TC(),rowModelType:this.get("rowModelType"),isUmd:mK()}}isModuleRegistered(e){return xC(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[t1]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const n=t[t1];if(Ge(n))return n===this.instanceId;t=t.parentElement}return!1}};function lee(e){return!!jw[e]}function n1(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 uee=n1(!0),cee=n1(!1),dee=class extends Bt{constructor(){super(...arguments),this.eFilter=He,this.eFilterButton=He,this.eSortIndicator=He,this.eMenu=He,this.eLabel=He,this.eText=He,this.eSortOrder=He,this.eSortAsc=He,this.eSortDesc=He,this.eSortMixed=He,this.eSortNone=He,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};di(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?uee:cee}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=A7(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=es(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){Ss(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:n}=this,i=_i(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=_i(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();sn(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 Ss(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)}},hee={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"}]},fee=class extends Bt{constructor(){super(hee),this.agOpened=He,this.agClosed=He,this.agLabel=He,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&&Re(89)}workOutInnerHeaderGroupComponent(e,t){const n=_7(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(Mo(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=>{Ra(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();sn(e,i),sn(t,!i)}else sn(e,!1),sn(t,!1)}addInIcon(e,t){const n=es(e,this.beans,null);n&&t.appendChild(n)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:n}=this;sn(t,!1),sn(n,!1)}}setupLabel(e){var s;const{displayName:t,columnGroup:n}=e,i=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;Ge(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)}},pee={moduleName:"ColumnHeaderComp",version:Be,userComponents:{agColumnHeader:dee},icons:{menu:"menu",menuAlt:"menu-alt"}},gee={moduleName:"ColumnGroupHeaderComp",version:Be,userComponents:{agColumnGroupHeader:fee},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},mee=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&&Re(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);xo(this.beans,e)}isQueueEmpty(){return!this.ticking}},vee={moduleName:"AnimationFrame",version:Be,beans:[mee]},Cee=class extends ge{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return es(e,this.beans,t==null?void 0:t.column)}},wee=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(!wa())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(!wa()||cP("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 Fa(e.getGui(),!0);e.addDestroyFunc(()=>a.destroy());const l=e.shouldSuppressMenuHide(),u=l&&Ge(o)&&s.enableMenu;let c=a;if(u&&(c=new Fa(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 Fa(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 Fa(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 Fa(t,!0);e.addManagedListeners(i,{tap:n}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,n){if(!wa())return;const i=new Fa(t),s=o=>{$c(this.beans,o.touchEvent)&&n(void 0,o.touchStart,o.touchEvent)};e.addManagedListeners(i,{longTap:s}),e.addDestroyFunc(()=>i.destroy())}},yee={moduleName:"Touch",version:Be,beans:[wee]},bee=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===oe.UP,i=e===oe.DOWN,s=e===oe.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 oe.UP:n=this.getCellAbove(n);break;case oe.DOWN:n=this.getCellBelow(n);break;case oe.RIGHT:n=this.gos.get("enableRtl")?this.getCellToLeft(n):this.getCellToRight(n);break;case oe.LEFT:n=this.gos.get("enableRtl")?this.getCellToRight(n):this.getCellToLeft(n);break;default:n=null,Re(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=DI(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=gp(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=DI(this.beans,e,!0);if(nn(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=jt(s);const l=gp(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(nn(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 See(e){return e.focusSvc.getFocusedCell()}function Eee(e){return e.focusSvc.clearFocusedCell()}function Ree(e,t,n,i){e.focusSvc.setFocusedCell({rowIndex:t,column:n,rowPinned:i,forceBrowserFocus:!0})}function Dee(e,t){var n;return((n=e.navigation)==null?void 0:n.tabToNextCell(!1,t))??!1}function Fee(e,t){var n;return((n=e.navigation)==null?void 0:n.tabToNextCell(!0,t))??!1}function xee(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 Tee=class extends ge{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new i1,this.rowValidations=new s1,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!==ns&&(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:ns,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()}},i1=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()}},s1=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 qw(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=XZ(e,i,o):n!=null&&(l=r.getRow(n))),(u=a.getRowCtrls(l?[l]:[]))==null?void 0:u[0]}function ln(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??Yw(o)),a=t.rowCtrl??qw(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 o1(e){const{editSvc:t}=e;t!=null&&t.isBatchEditing()?ou(e):t==null||t.stopEditing(void 0,{source:"api"})}function Pee(e,t,n){const{gos:i,popupSvc:s}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;const o=r=>{const a=r.relatedTarget;if(KC(a)===null){o1(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||o1(t)};for(const r of n)e.addManagedElementListeners(r,{focusout:o})}function Yw(e){if(e)return typeof e=="string"?e:e.getColId()}var ns=Symbol("unedited");function r1(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:ed(r)})}return n}var Aee=(e,t={})=>r1(e,t).map(n=>n.editor);function Iee(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=ln(e,h);if(!C){if(p&&g){const b=r.getValue(g,p,void 0,"api"),w=((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)??b??ns;l==null||l.setEdit(h,{pendingValue:w,sourceValue:b,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 No({pendingValue:e,sourceValue:t}){return e===ns&&(e=t),e!==t}function su(e,t,n){var b,S,D,w,R,x,T,H,N,A;const i=e.gos.get("enableGroupEdit"),{key:s,event:o,cellStartedEdit:r,silent:a}=n??{},l=ln(e,t),u=(b=l==null?void 0:l.comp)==null?void 0:b.getCellEditor(),c=l1(e,t,s,r&&!a),d=(S=e.editModelSvc)==null?void 0:S.getEdit(t);let h=c.value;if(h===void 0&&(h=d==null?void 0:d.sourceValue),(D=e.editModelSvc)==null||D.setEdit(t,{editorValue:h,state:"editing"}),u){(w=u.refresh)==null||w.call(u,c);return}const p=t.column.getColDef(),g=oA(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(u1(g.params,o),l){l.editCompDetails=g,l.onEditorAttachedFuncs.push(()=>{var V;return(V=l.rangeFeature)==null?void 0:V.unsetComp()}),(R=l.comp)==null||R.setEditDetails(g,C,v,e.gos.get("reactiveCustomComponents")),(x=l==null?void 0:l.rowCtrl)==null||x.refreshRow({suppressFlash:!0});const _=(T=e.editModelSvc)==null?void 0:T.getEdit(t,!0);!a&&!((H=_==null?void 0:_.editorState)!=null&&H.cellStartedEditing)&&((N=e.editSvc)==null||N.dispatchCellEvent(t,o,"cellEditingStarted",i?{value:h}:{}),(A=e.editModelSvc)==null||A.setEdit(t,{editorState:{cellStartedEditing:!0}}))}}function a1(e,t,n){var o,r;const i={editorValueExists:!1};if(Jw(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 l1(e,t,n,i){var S,D,w,R;const{valueSvc:s,gos:o,editSvc:r}=e,a=e.gos.get("enableGroupEdit"),l=ln(e,t),u=((S=t.rowNode)==null?void 0:S.rowIndex)??void 0,c=r==null?void 0:r.isBatchEditing(),d=e.colModel.getCol(t.column.getId()),{rowNode:h,column:p}=t,g=(D=l.comp)==null?void 0:D.getCellEditor(),C=r==null?void 0:r.getCellDataValue(t,!1),v=C===void 0?g?(w=a1(e,g))==null?void 0:w.editorValue:void 0:C,b=v===ns?(R=s.getValueForDisplay(d,h))==null?void 0:R.value:v;return st(o,{value:a?v:b,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:x=>{r.stopEditing(t,{source:c?"ui":"api",suppressNavigateAfterEdit:x}),yp(e,t)},eGridCell:l==null?void 0:l.eGui,parseValue:x=>s.parseValue(d,h,x,l==null?void 0:l.value),formatValue:l==null?void 0:l.formatValue.bind(l),validate:()=>{r==null||r.validateEdit()}})}function Zw(e,t){const{editModelSvc:n}=e;n==null||n.getEditMap().forEach((i,s)=>{i.forEach((o,r)=>{!t&&(o.state==="editing"||o.pendingValue===ns)||!No(o)&&(o.state!=="editing"||t)&&(n==null||n.removeEdits({rowNode:s,column:r}))})})}function _ee(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=l1(e,t,i,s),a=o.getColDef(),l=oA(e.userCompFactory,a,r);n.refresh(u1(l.params,i))}function u1(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 Ta(e,t){var n,i,s;for(const o of((n=e.editModelSvc)==null?void 0:n.getEditPositions())??[]){const r=ln(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}=a1(e,a,t);c&&((s=e.editModelSvc)==null||s.setEdit(o,{editorState:{isCancelAfterEnd:c}})),wp(e,o,l,void 0,!u,t)}}function wp(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:ns})),r.setEdit(t,{editorValue:s?c.sourceValue:n}),o!=null&&o.persist&&kee(e,t)}function kee(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??[])yp(e,s,n)}function yp(e,t,n){var u,c;const i=e.gos.get("enableGroupEdit"),{editModelSvc:s}=e,o=ln(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?c1(n,r):{valueChanged:!1,newValue:void 0,oldValue:r.sourceValue};d1(e,t,d,n)}return}if(Jw(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?c1(n,l):{valueChanged:No(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};d1(e,t,d,n)}}function c1(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 d1(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 Jw(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 Pa(e,t){var h,p,g,C,v,b,S,D;if(!(t||Jw(e)))return;const n=r1(e),i=new i1,{ariaAnnounce:s,localeSvc:o,editModelSvc:r,gos:a}=e,l=a.get("editType")==="fullRow",c=hP(o)("ariaValidationErrorPrefix","Cell Editor Validation");for(const w of n){const{ctrl:R,editor:x}=w,{rowNode:T,column:H}=R,N=((h=x.getValidationErrors)==null?void 0:h.call(x))??[],A=((p=x.getValidationElement)==null?void 0:p.call(x,!1))||!((g=x.isPopup)!=null&&g.call(x))&&R.eGui;if(A){const _=N!=null&&N.length>0,V=_?N.join(". "):"";x8(A,_),_&&s.announceValue(`${c} ${N}`,"editorValidation"),A instanceof HTMLInputElement?A.setCustomValidity(V):A.classList.toggle("invalid",_)}(N==null?void 0:N.length)>0&&i.setCellValidation({rowNode:T,column:H},{errorMessages:N})}Ta(e,{persist:!1}),r==null||r.setCellValidationModel(i);const d=new Set;for(const{ctrl:w}of n)d.add(w.rowCtrl);if(l){const w=Oee(e);r==null||r.setRowValidationModel(w)}for(const w of d.values()){(C=w.rowEditStyleFeature)==null||C.applyRowStyles();for(const R of w.getAllCellCtrls())(v=R.tooltipFeature)==null||v.refreshTooltip(!0),(b=R.editorTooltipFeature)==null||b.refreshTooltip(!0),(D=(S=R.editStyleFeature)==null?void 0:S.applyCellStyles)==null||D.call(S)}}var Oee=e=>{var s;const t=new s1,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===ns?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 Mee(e){var i;Pa(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 Lee(e,t,n,{rowNode:i,column:s},o){return st(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 Nee(e,t=!1){return e===oe.DELETE?!0:!t&&e===oe.BACKSPACE?lA():!1}var Vee=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 oe.ENTER:this.onEnterKeyDown(e);break;case oe.F2:this.onF2KeyDown(e);break;case oe.ESCAPE:this.onEscapeKeyDown(e);break;case oe.TAB:this.onTabKeyDown(e);break;case oe.BACKSPACE:case oe.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case oe.DOWN:case oe.UP:case oe.RIGHT:case oe.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===oe.LEFT||e.key===oe.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"}),Nee(e,o.get("enableCellEditingOnBackspace"))&&!(l!=null&&l.isEditing(n,{withOpenEditor:!0}))){if(r&&To(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(Pa(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?oe.UP:oe.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===oe.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:n}}=this;n!=null&&n.isEditing()&&(Pa(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===oe.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}))&&ga(t)&&((s=this.beans.selectionSvc)==null||s.handleSelectionEvent(e,i,"spaceKey")),e.preventDefault()}},Bee=class extends ge{constructor(e,t,n){super(),this.cellCtrl=e,this.column=n,this.beans=t}onMouseEvent(e,t){if(!Mo(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=np(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(),b=(s==null?void 0:s.getCellValidationModel().getCellValidationMap().size)??0,S=(s==null?void 0:s.getRowValidationModel().getRowValidationMap().size)??0;if(v&&(b>0||S>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=np(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=np(d,p,g,e),b=()=>{const R=o.createEvent(e,"cellMouseDown");R.isEventHandlingSuppressed=v,a.dispatchEvent(R)};if(v){b();return}if(this.isRightClickInExistingRange(e))return;const S=l&&!l.isEmpty(),D=this.containsWidget(s),w=Io(p);if(u&&w&&!u.handleMouseDownOnCell(C,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!i||!S){const R=h==null?void 0:h.isEditing(o),T=d.get("enableCellTextSelection")&&e.defaultPrevented,H=(fr()||T)&&!R&&!Nc(s)&&!D;o.focusCell(H,e)}if(i&&S&&!c.isCellFocused(C)){e.preventDefault();const R=c.getFocusedCell();if(R){const{column:x,rowIndex:T,rowPinned:H}=R;h!=null&&h.isEditing(R)&&(h==null||h.stopEditing(R)),c.setFocusedCell({column:x,rowIndex:T,rowPinned:H,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}if(!D){if(l){w&&e.preventDefault();const R=LP(r,e)&&w;if(i)l.extendLatestRangeToCell(C);else if(!R){const x=t||n;l.setRangeToCell(C,x)}}b()}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const n=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=LP(this.beans,e);if(n&&i)return!0}return!1}containsWidget(e){return fa(e,"ag-selection-checkbox",3)||fa(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}},Hee=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();hr(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||nn(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=jt(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=ma(this.beans)*this.rowSpan;this.eContent.style.height=`${n}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},Gee="ag-cell",Wee="ag-cell-auto-height",zee="ag-cell-normal-height",$ee="ag-cell-focus",Uee="ag-cell-first-right-pinned",jee="ag-cell-last-left-pinned",Kee="ag-cell-not-inline-editing",qee="ag-cell-wrap-text",Yee=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+"-"+Yee++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){var i,s;const{beans:e}=this;this.positionFeature=new Hee(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 Bee(this,e,this.column),this.keyboardListener=new Vee(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&To(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this)),Io(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),Pa(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=sA(n,o,r);if((u=(l=i.getGridBodyCtrl())==null?void 0:l.scrollFeature)!=null&&u.isScrolling()){let c;const d=new hn(p=>{c=p}),[h]=this.addManagedListeners(s,{bodyScrollEnd:()=>{c(),h()}});return{loadingComp:a,onReady:d}}return{loadingComp:a,onReady:hn.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||Io(i)?l=iA(r,c,C):l=sA(r,c,C)}if(!l&&!u&&((h=n.findSvc)!=null&&h.isMatch(s,i))){const C=this.createCellRendererParams();l=iA(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&&xo(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&&rd(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:n}=this.beans.gridOptions,i=Vf(t),s=Ao(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 st(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 R;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,b=e||v||n,S=!!u,D=this.updateAndFormatValue(S),w=b||D;if(S){if(w){this.showValue(!!n,!1);const x=a==null?void 0:a.isSuppressFlashingCellsBecauseFiltering();!t&&!x&&C&&(r==null||r.flashCell(this)),(R=i==null?void 0:i.applyCellStyles)==null||R.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;va(this.beans.gos,t,ip,this),e.addDestroyFunc(()=>va(this.beans.gos,t,ip,null))}createEvent(e,t){const{rowNode:n,column:i,value:s,beans:o}=this;return Lee(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;iI(e,t,n.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);QT(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&&(Io(this.column)&&(e=!0),Ii(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(Uee,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(jee,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(dp(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($ee,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:Fo(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(Gee,!0),e.toggleCss(Kee,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(Wee,t),e.toggleCss(zee,!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(qee,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(an(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 Qw(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 h1(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var Zee=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=st(i,{data:e.data,node:e,rowIndex:e.rowIndex});Qw(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)}},Jee=0,bp=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+"-"+Jee++,this.rowId=Mc(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=h1(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=Mc(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=Qc(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),ga(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&&pC(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(n),this.setRowCompRowBusinessKey(n),va(t,e.element,sp,this),e.compBean.addDestroyFunc(()=>va(t,e.element,sp,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=Mc(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(RC(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(RC(()=>{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=_P(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")||Gn(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=Ge(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:Fo(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||Mo(e))return;const t=this.allRowGuis.find(l=>l.element.contains(e.target)),n=t?t.element:null,i=n===e.target,s=an(this.beans);let o=!1;n&&s&&(o=n.contains(s)&&s.classList.contains("ag-cell"));let r=null;!i&&!o&&(r=ba(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=>$s(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)Ii(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 st(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(Mo(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=fa(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||fr();r&&r.contains(a)&&Nc(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 A9(t,s==null?void 0:s.rowComp.getFullWidthCellRendererParams(),n,e)}const i=ww(t,e.target);return i!=null&&np(t,i.column,n,e)}onRowClick(e){if(Mo(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=st(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 L7(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,M7(o,s)}case"FullWidthLoading":return O7(o,s);default:return k7(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=h1(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=xP(this.gos)?cr(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&&$l(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(an(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&&Ge(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),Df(a.element,s)})}},Qee=class extends ge{constructor(){super(),this.beanName="navigation",this.onPageDown=pP(this.onPageDown,100),this.onPageUp=pP(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=nY(this.gos,e);let a=!1;switch(n){case oe.PAGE_HOME:case oe.PAGE_END:!s&&!i&&(this.onHomeOrEndKey(n),a=!0);break;case oe.LEFT:case oe.RIGHT:case oe.UP:case oe.DOWN:if(!r)return!1;s&&!i&&!o&&(this.onCtrlUpDownLeftRight(n,r),a=!0);break;case oe.PAGE_DOWN:case oe.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===oe.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;Ge(n)&&!n.isPinned()&&a.ensureColumnVisible(n),Ge(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=Xw(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=Xw(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=Xw(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===oe.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||Da(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 bp){if(s={...e.getRowPosition(),column:t?i[0]:jt(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 Ge(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(Ge(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=eo(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===oe.LEFT&&(s=this.getLastCellOfColSpan(s)):t===oe.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=a.getNextCellToFocus(t,s),o=nn(s);if(o&&e&&e.key===oe.UP&&(s={rowIndex:-1,rowPinned:null,column:n.column}),i){const d=u.getCallback("navigateToNextCell");if(Ge(d)){const p=d({key:t,previousCellPosition:n,nextCellPosition:s||null,event:e});Ge(p)?s={rowPinned:p.rowPinned,rowIndex:p.rowIndex,column:p.column}:s=null}}if(!s)return;if(s.rowIndex<0){const d=eo(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?jt(r):r[0])};this.focusPosition(u);const c=t??(l!=null&&YZ(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!!Lo(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:jt(n),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=PP(this.gos),n=this.beans.rowModel.getRow(e.rowIndex),i=t&&(n==null?void 0:n.sticky),{scrollFeature:s}=this.gridBodyCon;!i&&nn(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 Xw(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var Xee={moduleName:"KeyboardNavigation",version:Be,beans:[Qee,bee,_X],apiFunctions:{getFocusedCell:See,clearFocusedCell:Eee,setFocusedCell:Ree,setFocusedHeader:xee,tabToNextCell:Dee,tabToPreviousCell:Fee}},ete=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)}},tte=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"}))}},nte=".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}",ite=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&&(sn(n,t),Us(n,e))}},ste=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=Gn(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=Bc(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=>!Io(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new ite(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(Gn(r,"print")){Re(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),qP(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=Bc(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}}},ote={moduleName:"PinnedColumn",version:Be,beans:[ste],css:[nte]},rte=class extends ge{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=Hn(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=On(e),n=this.descriptionContainer=t.createElement("div");n.classList.add("ag-aria-description-container"),ZT(n,"polite"),F8(n,"additions text"),D8(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&&(Bn(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},ate={moduleName:"Aria",version:Be,beans:[rte]},lte=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",f1="ag-delay-render",ute=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(f1)}),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(f1),this.alreadyRevealed=!0}},cte={moduleName:"ColumnDelayRender",version:Be,beans:[ute],css:[lte]};function dte(e){var t;(t=e.overlays)==null||t.showLoadingOverlay()}function hte(e){var t;(t=e.overlays)==null||t.showNoRowsOverlay()}function fte(e){var t;(t=e.overlays)==null||t.hideOverlay()}var pte=".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)}",gte={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"}]}]},p1=class extends Bt{constructor(){super(gte),this.eOverlayWrapper=He,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(pte)}handleKeyDown(e){if(e.key!==oe.TAB||e.defaultPrevented||Mo(e))return;const t=this.beans;if(ba(t,this.eOverlayWrapper,!1,e.shiftKey))return;let i=!1;e.shiftKey?i=t.focusSvc.focusGridView({column:jt(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}=Ds;n.toggle(i,t.autoHeight),n.toggle(s,t.normal),n.toggle(o,t.print)}postConstruct(){this.createManagedBean(new gw(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=an(this.beans);s&&!jT(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,st(this.gos,{...r??{}}))})}n&&this.isGridFocused()&&ya(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),Bn(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=an(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},mte={selector:"AG-OVERLAY-WRAPPER",component:p1},vte=class extends ge{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=mn(this.gos),this.isServerSide=!this.isClientSide&&zl(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")){Re(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return mte}getOverlayWrapperCompClass(){return p1}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(B7(this.beans.userCompFactory,st(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(H7(this.beans.userCompFactory,st(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))}},Cte={moduleName:"Overlay",version:Be,userComponents:{agLoadingOverlay:kY,agNoRowsOverlay:MY},apiFunctions:{showLoadingOverlay:dte,showNoRowsOverlay:hte,hideOverlay:fte},beans:[vte]},wte=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=$7(),ur(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;ur(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}},yte=400,bte=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"],()=>{To(this.gos)?n():i()}),To(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=Gn(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 Ste(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=Gn(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 bp(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&&$l(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(Ks(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:eo(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(st(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=gp(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=gp(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=ey(e),n=this.getAllRowCtrls();return!e||!t?n:n.filter(i=>{const s=i.rowNode;return ty(s,t)})}getCellCtrls(e,t){let n;Ge(t)&&(n={},t.forEach(s=>{const o=this.colModel.getCol(s);Ge(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=ey(e);return this.getAllRowCtrls().filter(n=>{if(!n.isFullWidth())return!1;const i=n.rowNode;return!(t!=null&&!ty(i,t))})}createOrUpdateRowCtrl(e,t,n,i){let s,o=this.rowCtrlsByRowIndex[e];if(o||(s=this.rowModel.getRow(e),Ge(s)&&Ge(t)&&t[s.id]&&s.alreadyRendered&&(o=t[s.id],t[s.id]=null)),!o)if(s||(s=this.rowModel.getRow(e)),Ge(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()},yte))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=ma(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 w=t.getPixelOffset(),{pageFirstPixel:R,pageLastPixel:x}=t.getCurrentPagePixelRange(),T=e.divStretchOffset,H=d.getVScrollPosition(),N=H.top,A=H.bottom;h?(g=R+T,C=x+T):(g=Math.max(N+w-c,R)+T,C=Math.min(A+w+c,x)+T),this.firstVisibleVPixel=Math.max(N+w,R)+T,this.lastVisibleVPixel=Math.min(A+w,x)+T,p=this.ensureAllRowsInRangeHaveHeightsCalculated(g,C)}while(p);let v=n.getRowIndexAtPixel(g),b=n.getRowIndexAtPixel(C);const S=t.getFirstRow(),D=t.getLastRow();v<S&&(v=S),b>D&&(b=D),i=v,s=b}const o=Gn(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,xo(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 bp(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}},Ste=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],Es(this.entriesList,n)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],Es(this.entriesList,e)}getEntries(){return this.entriesList}};function ey(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 ty(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 Ete=class extends ge{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=qs(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=qs(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=C8(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(IP(o,i.isPivotActive())){const c=e.data?e:OA(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 Rte(e){var t;(t=e.sortSvc)==null||t.onSortChanged("api")}var g1={moduleName:"Sort",version:Be,beans:[GX,Ete],apiFunctions:{onSortChanged:Rte},userComponents:{agSortIndicator:Kw},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},Dte=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"}),ur(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 Fte(e){var t;(t=e.valueCache)==null||t.expire()}function xte(e,t){const{colKey:n,rowNode:i,useFormatter:s}=t,o=e.colModel.getColDefCol(n)??e.colModel.getCol(n);if(nn(o))return null;const r=e.valueSvc.getValueForDisplay(o,i,s);return s?r.valueFormatted??Vl(r.value):r.value}var Tte="paste",Pte=class extends ge{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;mn(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:n}=this.beans;if(e.source===Tte||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 ld(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})}},Ate=class extends ge{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);$t(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 $t(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+";"}},Ite=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]}},_te={moduleName:"ValueCache",version:Be,beans:[Ite],apiFunctions:{expireValueCache:Fte}},kte={moduleName:"Expression",version:Be,beans:[Ate]},Ote={moduleName:"ChangeDetection",version:Be,beans:[Pte]},Mte={moduleName:"CellApi",version:Be,apiFunctions:{getCellValue:xte}},Lte=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=zl(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 b=v.getCellDataValue({rowNode:t,column:e},!0);if(b!==void 0)return b}}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=ud(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=ud(a,t.field,e.isFieldContainsDots());else if(o&&a&&!p){if(!c)return l;l=ud(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(Ge(o)){const a=st(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 Ge(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=st(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;nn(e.data)&&(e.data={});const{field:o,valueSetter:r}=s.getColDef();if(nn(o)&&nn(r))return Re(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(s,n))return Re(135),!1;const a=st(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(Ge(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=st(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=st(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]"&&Re(121)),s}},Nte={moduleName:"CommunityCore",version:Be,beans:[NX,AZ,zQ,c7,wte,tQ,IX,aee,r7,tte,ete,bte,Lte,MX,AX,LX,UQ,Dte,VQ,BQ,Cee],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:IZ,destroy:_Z,isDestroyed:kZ,getGridOption:OZ,setGridOption:MZ,updateGridOptions:EI,isModuleRegistered:LZ},dependsOn:[MQ,kJ,HJ,g1,pee,iQ,gee,Cte,Ote,vee,Xee,ote,ate,yee,WQ,LQ,kte,aQ,cte]},m1={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},ny=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],Vte={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:ny,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...ny,"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:[...ny,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},Bte={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function Hte(e,t){const n=[];for(const i of Array.isArray(e)?e:[e]){const s=Vte[i];if(s)for(const o of s){const r=Bte[o];(!r||r===t)&&n.push(o)}else n.push(i)}return n}var v1=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
|
|
91
|
+
|
|
92
|
+
import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
|
|
93
|
+
|
|
94
|
+
ModuleRegistry.registerModules([ AllCommunityModule ]);
|
|
95
|
+
`,Gte=e=>{const t=e.map(i=>`import { ${hd(i)} } from '${m1[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';
|
|
96
|
+
${t.join(`
|
|
97
|
+
`)}
|
|
98
|
+
|
|
99
|
+
ModuleRegistry.registerModules([ ${e.map(i=>hd(i,!0)).join(", ")} ]);
|
|
100
|
+
|
|
101
|
+
For more info see: ${Wl}/modules/`};function hd(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function Wte(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.
|
|
102
|
+
`:t.some(o=>m1[o])&&(i=i+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
|
|
103
|
+
`),i}function C1({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var w1=({reasonOrId:e,moduleName:t,gridScoped:n,gridId:i,rowModelType:s,additionalText:o,isUmd:r})=>{const a=Hte(t,s),l=typeof e=="string"?e:jte[e];if(r)return Wte(l,a);const u=a.filter(h=>h==="IntegratedCharts"||h==="Sparklines"),c=u.length>0?`${u.map(h=>hd(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=>hd(h)).join(", "):hd(a[0])} is not registered${n?" for gridId: "+i:""}. ${c} Check if you have registered the module:
|
|
104
|
+
`}
|
|
105
|
+
${Gte(a)}`+(o?`
|
|
106
|
+
|
|
107
|
+
${o}`:"")},y1=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
|
|
108
|
+
|
|
109
|
+
import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
|
|
110
|
+
import { ModuleRegistry } from 'ag-grid-community';
|
|
111
|
+
import { ${e} } from 'ag-grid-enterprise';
|
|
112
|
+
|
|
113
|
+
ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
|
|
114
|
+
`,zte=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.`,$te={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:
|
|
115
|
+
"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.
|
|
116
|
+
Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
|
|
117
|
+
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}
|
|
118
|
+
${zte(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=QC({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.
|
|
119
|
+
`),r.length>0&&s.push(` Did you mean: [${r.slice(0,3)}]?
|
|
120
|
+
`),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: ${Wl}/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=QC({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(`
|
|
121
|
+
`)},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.
|
|
122
|
+
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:w1,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 ${Wl}/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.
|
|
123
|
+
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.
|
|
124
|
+
Your code probably called a grid API method while the grid was in the render stage.
|
|
125
|
+
To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
|
|
126
|
+
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:()=>y1("IntegratedChartsModule"),258:()=>y1("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})=>w1({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 ${Wl}/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:()=>v1(),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:C1,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 Ute(e,t){const n=$te[e];if(!n)return[`Missing error text for error id ${e}!`];const i=n(t),o=`
|
|
127
|
+
See ${DP(e,t)}`;return Array.isArray(i)?i.concat(o):[i,o]}var jte={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},b1=new WeakMap,S1=new WeakMap;function Kte(e,t,n){if(!t)return $t(11),{};let i;{const o=Cn({tag:"div"});o.style.height="100%",e.appendChild(o),e=o,i=()=>e.remove()}return new Yte().create(e,t,o=>{const r=new TZ(e);o.createBean(r)},void 0,n,i)}var qte=1,Yte=class{create(e,t,n,i,s,o){const r=FC.applyGlobalGridOptions(t),a=r.gridId??String(qte++),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:dZ,beanDestroyComparator:hZ,derivedBeans:[uZ],destroyCallback:()=>{S1.delete(g),b1.delete(e),hK(a),o==null||o()}},p=new Wq(h);this.registerModuleFeatures(p,l),n(p),p.getBean("syncSvc").start(),i==null||i(p);const g=p.getBean("gridApi");return b1.set(e,g),S1.set(g,e),g}getRegisteredModules(e,t,n){var i;return jc(Nte,void 0,!0),(i=e==null?void 0:e.modules)==null||i.forEach(s=>jc(s,t)),fK(t,E1(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;nn(i)&&(i=new lZ);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=E1(e),o=i[s];if(!o){Kc(201,{rowModelType:s},`Unknown rowModelType ${s}.`);return}if(!gK()){Kc(272,void 0,v1());return}if(!e){const a=Object.entries(i).filter(([l,u])=>xC(u,n,l));if(a.length==1){const[l,u]=a[0];if(l!==s){const c={moduleName:u,rowModelType:l};Kc(275,c,C1(c));return}}}if(!xC(o,n,s)){Kc(200,{reasonOrId:`rowModelType = '${s}'`,moduleName:o,gridScoped:TC(),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 E1(e){return e??"clientSide"}function yr(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Sp(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function Zte(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Jte=class extends ge{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?X8(t):eK(e.get("localeText"))}};function Qte(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:b,aggFunc:S,pivot:D,pivotIndex:w,pinned:R,hide:x,width:T,flex:H}=e[h];c.push(p),g&&(n[C??d++]={colId:p,sort:g}),v&&(i[b??0]=p),typeof S=="string"&&s.push({colId:p,aggFunc:S}),D&&(o[w??0]=p),R&&(R==="right"?a:r).push(p),x&&l.push(p),(H!=null||T)&&u.push({colId:p,flex:H??void 0,width:T})}return{sort:n.length?{sortModel:iy(n)}:void 0,rowGroup:i.length?{groupColIds:iy(i)}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:o.length||t?{pivotMode:t,pivotColIds:iy(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 iy(e){return e.filter(t=>t!=null)}function Xte(e){const t=[];for(const{groupId:n,open:i}of e)i&&t.push(n);return t.length?{openColumnGroupIds:t}:void 0}function sy(e){return e.get("tooltipShowMode")==="whenTruncated"}function ene(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 tne=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()}`}},nne=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&&_P(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(st(this.gos,{column:e,node:s}))??""};if(this.processCellCallback)return{value:this.processCellCallback(st(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(st(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}};function ine(e,t){const n=document.defaultView||window;if(!n){Re(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 sne={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},Ci="clientSide",Zn="serverSide",au="infinite",one={onGroupExpandedOrCollapsed:[Ci],refreshClientSideRowModel:[Ci],isRowDataEmpty:[Ci],forEachLeafNode:[Ci],forEachNodeAfterFilter:[Ci],forEachNodeAfterFilterAndSort:[Ci],resetRowHeights:[Ci,Zn],applyTransaction:[Ci],applyTransactionAsync:[Ci],flushAsyncTransactions:[Ci],getBestCostNodeSelection:[Ci],getServerSideSelectionState:[Zn],setServerSideSelectionState:[Zn],applyServerSideTransaction:[Zn],applyServerSideTransactionAsync:[Zn],applyServerSideRowData:[Zn],retryServerSideLoads:[Zn],flushServerSideAsyncTransactions:[Zn],refreshServerSide:[Zn],getServerSideGroupLevelState:[Zn],refreshInfiniteCache:[au],purgeInfiniteCache:[au],getInfiniteRowCount:[au],isLastRowIndexKnown:[au,Zn],expandAll:[Ci,Zn],collapseAll:[Ci,Zn],onRowHeightChanged:[Ci,Zn],setRowCount:[au,Zn],getCacheBlockState:[au,Zn]},rne={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 ane(e,t,n){const i=rne[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 Uc(`Since ${o} api.${u} is deprecated. ${d}${l??""}`),t.apply(t,c)}}const s=one[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 lne={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"},une={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},cne={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"},dne=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),hne=class extends ge{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,CK(Ute)}warnOnInitialPropertyUpdate(e,t){e==="api"&&sne[t]&&Re(22,{key:t})}processGridOptions(e){this.processOptions(e,see())}validateApiFunction(e,t){return ane(e,t,this.beans)}missingUserComponent(e,t,n,i){const s=iu[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):Re(101,{propertyName:e,componentName:t,agGridDefaults:n,jsComps:i})}missingDynamicBean(e){const t=lne[e];return t?Ks(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){pne.has(e)&&Re(10,{eventType:e})}validateIcon(e){if(dne.has(e)&&Re(43,{iconName:e}),une[e])return;const t=cne[e];if(t){$t(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:TC(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}Re(134,{iconName:e})}isProvidedUserComp(e){return!!iu[e]}validateColDef(e){this.processOptions(e,KX())}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:S,version:D}=d;l.add(`As of v${D}, ${String(c)} is deprecated. ${S??""}`)}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:b}=p;if(b){const S=typeof h;if(S!==b){l.add(`${String(c)} should be of type '${b}' but received '${S}' (${h}).`);return}}if(v){const S=this.gridOptions.rowModelType??"clientSide";if(!v.includes(S)){l.add(`${String(c)} is not supported with the '${S}' row model. It is only valid with: ${v.join(", ")}.`);return}}if(g){const S=this.checkForRequiredDependencies(c,g,e);if(S){l.add(S);return}}if(C){const S=C(e,this.gridOptions,this.beans);if(S){l.add(S);return}}}),l.size>0)for(const c of l)Uc(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(`
|
|
128
|
+
`)}checkProperties(e,t,n,i,s){const o=["__ob__","__v_skip","__metadata__"],r=fne(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+=`
|
|
129
|
+
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Uc(c)}if(a.length>0&&s){const l=this.beans.frameworkOverrides.getDocLink(s);Uc(`to see all the valid ${i} properties please check: ${l}`)}}};function fne(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]=QC({inputValue:o,allSuggestions:n}).values;return i}var pne=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),gne={moduleName:"Validation",version:Be,beans:[hne]};function R1(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var mne=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,R1(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")}},vne=class extends Tw{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,n,i,s){this.comp=e;const o=Qc(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 st(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=es("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(an(t)===this.eGui)return;const s=ba(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 oe.UP:case oe.DOWN:case oe.LEFT:case oe.RIGHT:if(t)return;Ra(e);case oe.ENTER:t&&ya(this.eGui)&&e.preventDefault();break;case oe.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&&fa(e.relatedTarget,"ag-floating-filter");if(n&&i&&e.target===this.eGui){const s=this.lastFocusEvent,o=!!(s&&s.key===oe.TAB);if(s&&o){const r=s.shiftKey;ya(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 xw(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=!_i(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:Mn(((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 Cne(e,t){var i;const n=e.colModel.getCol(t);if(!n){$t(12,{colKey:t});return}(i=e.menuSvc)==null||i.showColumnMenu({column:n,positionBy:"auto"})}function wne(e){var t;(t=e.menuSvc)==null||t.hidePopupMenu()}var yne={moduleName:"SharedMenu",version:Be,beans:[IY],apiFunctions:{showColumnMenu:Cne,hidePopupMenu:wne}},bne=class extends Qq{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 Mo(e)}},Ep={moduleName:"Popup",version:Be,beans:[bne]},Sne=".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 Ene(e){const t=e.filterManager;return!!(t!=null&&t.isColumnFilterPresent())||!!(t!=null&&t.isAggregateFilterPresent())}function Rne(e,t){var n;return((n=e.filterManager)==null?void 0:n.getColumnFilterInstance(t))??Promise.resolve(void 0)}function Dne(e,t){var i;const n=e.colModel.getColDefCol(t);if(n)return(i=e.colFilter)==null?void 0:i.destroyFilter(n,"api")}function Fne(e,t){e.frameworkOverrides.wrapIncoming(()=>{var n;return(n=e.filterManager)==null?void 0:n.setFilterModel(t)})}function xne(e){var t;return((t=e.filterManager)==null?void 0:t.getFilterModel())??{}}function Tne(e,t,n){const{gos:i,colModel:s,colFilter:o}=e;n&&!i.get("enableFilterHandlers")&&(Re(288),n=!1);const r=s.getColDefCol(t);return r?(o==null?void 0:o.getModelForColumn(r,n))??null:null}function Pne(e,t,n){var i;return((i=e.filterManager)==null?void 0:i.setColumnFilterModel(t,n))??Promise.resolve()}function Ane(e,t){var i;const n=e.colModel.getCol(t);if(!n){$t(12,{colKey:t});return}(i=e.menuSvc)==null||i.showFilterMenu({column:n,containerType:"columnFilter",positionBy:"auto"})}function Ine(e){var t;(t=e.menuSvc)==null||t.hideFilterMenu()}function _ne(e,t){var i;const n=e.colModel.getCol(t);if(!n){$t(12,{colKey:t});return}return(i=e.colFilter)==null?void 0:i.getHandler(n,!0)}function kne(e,t){const{colModel:n,colFilter:i,gos:s}=e;if(!s.get("enableFilterHandlers")){Re(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 One={filterHandler:()=>({doesFilterPass:()=>!0})},Mne=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={...MA},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){Re(62,{colId:u});return}if(!c.isFilterAllowed()){Re(63,{colId:u});return}const d=this.getOrCreateFilterWrapper(c,!0);if(!d){Re(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))});hn.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;Oc(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);Ge(l)&&(t[a]=l)}),!e)for(const r of Object.keys(i)){const a=i[r];Ge(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:Mn(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 Mn(this.model,n);const i=e.filter;return i?typeof i.getModel!="function"?(Re(66),null):i.getModel():Mn(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():(Re(67),!1):!1,{colModel:t,gos:n}=this.beans,i=!!_C(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(hn.resolve().then(()=>{a(c,this.isHandlerActive(c),{colId:d,isHandler:!0,handler:u.handler,handlerParams:u.handlerParams})}));else{const h=mr(u);h&&l.push(h.then(p=>{a(c,e(p),{colId:d,isHandler:!1,comp:p})}))}}),hn.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(hn.resolve().then(()=>{this.setColFilterActive(o,this.isHandlerActive(o),e,t)}));else{const r=mr(s);r&&n.push(r.then(a=>{this.setColFilterActive(o,a.isFilterActive(),e,t)}))}}),(i=this.beans.groupFilter)==null||i.updateFilterFlags(e,t),hn.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:Mn(a,c),handlerParams:p}))return!1}else{const h=u.comp;if(typeof h.doesFilterPass!="function"){$t(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=mr(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=mr(n,i);s&&t.push(s.then(a=>{var l;(l=a.onNewRowsLoaded)==null||l.call(a)}))}),hn.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():Mn(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=Ge(Mn(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?mr(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const n=mr(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 OK(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":S9(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 N7(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||Re(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 st(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=Mn(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:Mn(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(tA(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:c9.has(u)&&(d=c(u),h=u)}else d=u;if(!d){let g;const{compName:C,jsComp:v,fwComp:b}=rA(s,t);C?g=C:v==null&&b==null&&t.filter===!0&&(g=n),h=this.handlerMap[g],h&&(d=c(h))}return d?{filterHandler:d,handlerNameOrCallback:r??h}:l?(mn(i)&&Re(277,{colId:e.getColId()}),One):void 0}createHandler(e,t,n){const i=this.createHandlerFunc(e,t,n);if(!i)return;const s=VC(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(st(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 st(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(ed(g))})},r=e.getColDef(),a=s!=null&&s.isSelectable(r)?s.getFilterDef(e,r):r,l=x9(i,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",u=this.gos.get("enableFilterHandlers"),c=VC(n,a,this.createFilterCompParams(e,u,"init",!0)),d=st(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=Mn(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 W7(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 hn.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,b,S,D,w,R;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,x=>x,d,"colDef"):null)??{compDetails:null,createFilterUi:null},C=(p==null?void 0:p.params)??VC(i.userCompFactory,u,this.createFilterCompParams(s,d,"colDef"));if(h){const x=(c==null?void 0:c.handlerNameOrCallback)??(c==null?void 0:c.filterHandler),T=Mn(this.model,e);if(n.handlerGenerator!=x){const H=n.handler,{handler:N,handlerParams:A}=this.createHandlerFromFunc(s,c.filterHandler,C);n.handler=N,n.handlerParams=A,n.handlerGenerator=x,delete this.model[e],(v=N.init)==null||v.call(N,{...A,source:"init",model:null}),this.destroyBean(H),T!=null&&((b=this.beans.filterManager)==null||b.onFilterChanged({columns:[s],source:t}))}else{const H=this.createHandlerParams(s,p==null?void 0:p.params);n.handlerParams=H,(D=(S=n.handler).refresh)==null||D.call(S,{...H,source:"colDef",model:T})}}if(this.areFilterCompsDifferent(((w=n.filterUi)==null?void 0:w.compDetails)??null,p)||!n.filterUi||!p){this.destroyFilterUi(n,s,p,g);return}n.filterUi.filterParams=C,(R=mr(n,h))==null||R.then(x=>{(x!=null&&x.refresh?x.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),hn.resolve();if(!o.isHandler)return hn.resolve();const{filterUi:r,handler:a,handlerParams:l}=o;return d9(()=>{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 hn.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(ed(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:Mn(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:Mn(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):hn.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}=w9(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 hn(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=mr(e);if(s){s.then(o=>{if(typeof(o==null?void 0:o.setModel)!="function"){Re(65),i();return}(o.setModel(t)||hn.resolve()).then(()=>i())});return}i()})}updateStoredModel(e,t){Ge(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;VA(t,o,()=>Mn(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&&VA(e,()=>i.filterUi,()=>Mn(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&&hn.all(n).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();NA(()=>{var n;return(n=this.cachedFilter(e))==null?void 0:n.filterUi},()=>Mn(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)!==Mn(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)!==Mn(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 Lne(e){var t;return!!((t=e.filterManager)!=null&&t.isAnyFilterPresent())}function Nne(e,t="api"){var n;(n=e.filterManager)==null||n.onFilterChanged({source:t})}var Vne=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(){_C(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):hn.resolve()).then(()=>{var o;const s={source:t,type:"filterChanged",columns:i};n&&di(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=!!_C(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(){Re(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()}},Bne=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,_i(this.gos),i)}showMenuAfterButtonClick(e,t,n,i){if(e&&!e.isColumn)return;let s=-1,o="left";const r=_i(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){$t(57);return}const a=Cn({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=MK(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,d=v=>{lI(e,!1,"contextMenu");const b=v instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),b&&i&&$s(i)){const S=fA(i);S==null||S.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})}),lI(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,n,e)}trapFocusWithin(e,t){e.key!==oe.TAB||e.defaultPrevented||ba(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),ya(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()}},Hne=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=st(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)}},Gne={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},Wne=class extends Bt{constructor(){super(Gne,[Zf]),this.eFloatingFilterText=He}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)}},oy=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:(Re(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;Re(73)}else Re(74)}getCustomOption(e){return this.customFilterOptions[e]}};function fd(e,t,n){return n==null?e.splice(t):e.splice(t,n)}function Rp(e){return e==null||typeof e=="string"&&e.trim().length===0}function zne(e){return e==="AND"||e==="OR"?e:"AND"}function $ne(e,t,n){if(e==null)return;const{predicate:i}=e;if(i!=null&&!t.some(s=>s==null))return i(t,n)}function Une(e,t){let n=e.length;return n>t&&(e.splice(t),Re(78),n=t),n}function pd(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 ry=class extends F9{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 oy;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=zne(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&&hr(r.conditions,a.conditions,(l,u)=>this.areSimpleModelsEqual(l,u))}return o}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),hn.resolve();if(e.operator){const i=e;let s=i.conditions;s==null&&(s=[],Re(77));const o=Une(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()),hn.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(Re(79),t=1),this.maxNumConditions=t;let n=e.numAlwaysVisibleConditions??1;n<1&&(Re(80),n=1),n>t&&(Re(81),n=t),this.numAlwaysVisibleConditions=n}createOption(){const e=this.getGui(),t=this.createManagedBean(new iw);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=Cn({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 iq);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&&(Vc(this.eJoinPanels[0],o),this.eJoinAnds[0].setDisabled(o),this.eJoinOrs[0].setDisabled(o))}),this.eConditionBodies.forEach((i,s)=>{sn(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=fd(e,t,n);for(const s of i)Ss(s)}removeComponents(e,t,n){const i=fd(e,t,n);for(const s of i)Ss(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 Sa&&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 Sa))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 Sa&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){XP(e)&&sn(e.getGui(),t)}setElementDisabled(e,t){XP(e)&&Vc(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Sa&&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=pd(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 pd(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}},D1=class{constructor(e,t,n,i,s,o){this.alive=!0,this.context=e,this.eParent=s;const r=V7(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){sn(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)}},ay=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function F1(e,t){const{dateFrom:n,dateTo:i,type:s}=e||{};return[n&&mi(n,void 0,!0)||null,i&&mi(i,void 0,!0)||null].slice(0,pd(s,t))}var x1=1e3,T1=1/0,jne=class extends ry{constructor(){super("dateFilter",F1,ay),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=x1,this.maxValidYear=T1,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))Re(82,{param:l});else return c==null?u:Number(c);return u},n=t("minValidYear",x1),i=t("maxValidYear",T1);this.minValidYear=n,this.maxValidYear=i,n>i&&Re(83);const{minValidDate:s,maxValidDate:o}=e,r=s instanceof Date?s:mi(s);this.minValidDate=r;const a=o instanceof Date?o:mi(o);this.maxValidDate=a,r&&a&&r>a&&Re(84)}createDateCompWrapper(e){const{beans:{userCompFactory:t,context:n,gos:i},params:s}=this,o=new D1(n,t,s.colDef,st(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=Cn({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=Cn({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),fd(this.eConditionPanelsFrom,e,t),fd(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){const i=fd(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=ki(i[0],!0,s)),i.length>1&&(n.dateTo=ki(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)}},P1=class extends ge{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,n=new oy;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=$A(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=$ne(o,s,n);return r??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,n,t,e))}},A1=class extends P1{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 Rp(t);case"notBlank":return!Rp(t);default:return Re(76,{filterModelType:i}),!0}}},I1={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},Kne={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},ly=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?vr(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(` ${vr(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return i?vr(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=vr(this,a)),s&&o&&(r=this.getLocaleTextFunc()(s,o)),r!=null?t?`${r} ${vr(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)}},_1=class extends ly{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=I1}conditionToString(e,t,n,i,s){const{type:o}=e,r=mi(e.dateFrom),a=mi(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,u=t?this.formatValue.bind(this):h=>JC(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 qne(e,t){const n=t;return n<e?-1:n>e?1:0}var Yne=class extends A1{constructor(){super(F1,ay),this.filterType="date",this.FilterModelFormatterClass=_1}comparator(){return this.params.filterParams.comparator??qne}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}},k1=class extends Bt{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 oy;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")}`}},Zne={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"}]},Jne=class extends k1{constructor(){super(Zne,[Zf]),this.eReadOnlyText=He,this.eDateWrapper=He,this.FilterModelFormatterClass=_1,this.filterType="date",this.defaultOptions=ay}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?mi(e.dateFrom):null;this.dateComp.setDate(n),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){sn(this.eDateWrapper,e),sn(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=ki(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=hw(e,this.defaultDebounceMs);return st(this.gos,{onDateChanged:Hn(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 D1(e,t,i.column.getColDef(),this.getDateComponentParams(),n,s=>{s.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},Qne={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},Xne=class extends Bt{constructor(){super(Qne,[Zf]),this.eDateInput=He,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&&fr();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&&Re(85),r&&s&&Re(86),o&&r){const[p,g]=[o,r].map(C=>C instanceof Date?C:mi(C));p&&g&&p.getTime()>g.getTime()&&Re(87)}o?o instanceof Date?t.min=JC(o):t.min=o:i&&(t.min=`${i}-01-01`),r?r instanceof Date?t.max=JC(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 mi(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(ki(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}},uy=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function cy(e){const{allowedCharPattern:t}=e??{};return t??null}function dy(e){return e==null||isNaN(e)?null:e}function O1(e,t){const{filter:n,filterTo:i,type:s}=e||{};return[dy(n),dy(i)].slice(0,pd(s,t))}var eie=class extends ry{constructor(){super("numberFilter",O1,uy),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=cy(this.params),t=Cn({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 Ea({allowedCharPattern:i}):new nw);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(dy(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=Fo(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}},M1=class extends ly{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=I1}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}`}},tie=class extends A1{constructor(){super(O1,uy),this.filterType="number",this.FilterModelFormatterClass=M1}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},L1=class extends ge{constructor(e){super(),this.params=e,this.eInput=He,this.onValueChanged=()=>{}}setupGui(e){var i;this.eInput=this.createManagedBean(new Ea((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 hy(e){const t=e==null?void 0:e.trim();return t===""?e:t}function N1(e,t){const{filter:n,filterTo:i,type:s}=e||{};return[n||null,i||null].slice(0,pd(s,t))}var nie={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},V1=class extends k1{constructor(){super(...arguments),this.eFloatingFilterInputContainer=He,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(nie)}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=tp(e.filterParams),!s){const o=hw(e.filterParams,i),r=Hn(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();Bn(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(n,!0)}syncUpWithParentFilter(e){const t=e.key===oe.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=hy(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)}},iie=class extends ge{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new nw),this.eTextInput=this.createManagedBean(new Ea),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)}},sie=class extends V1{constructor(){super(...arguments),this.FilterModelFormatterClass=M1,this.filterType="number",this.defaultOptions=uy}updateParams(e){cy(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=cy(e.filterParams),this.allowedCharPattern?this.createManagedBean(new L1({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new iie)}convertValue(e){return e?Number(e):null}},fy=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],oie=class extends ry{constructor(){super("textFilter",N1,fy),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(Fo(n.getValue()))}),t}createEValue(){const e=Cn({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 Ea);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)}},B1=class extends ly{constructor(){super(...arguments),this.filterTypeKeys=Kne}conditionToString(e,t,n,i,s){const{filter:o,filterTo:r,type:a}=e;if(t){const l=c=>()=>vr(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}`}},rie=({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}},aie=e=>e,lie=e=>e==null?null:e.toString().toLowerCase(),uie=class extends P1{constructor(){super(N1,fy),this.filterType="text",this.FilterModelFormatterClass=B1}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??rie,this.formatter=t.textFormatter??(t.caseSensitive?aie:lie)}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 Rp(t);if(n.type==="notBlank")return!Rp(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=hy(s)??null),o&&(i.filterTo=hy(o)??null),i};return $A(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},cie=class extends V1{constructor(){super(...arguments),this.FilterModelFormatterClass=B1,this.filterType="text",this.defaultOptions=fy}createFloatingFilterInputService(){return this.createManagedBean(new L1)}};function die(e){var t;return!!((t=e.quickFilter)!=null&&t.isFilterPresent())}function hie(e){var t;return(t=e.quickFilter)==null?void 0:t.getText()}function fie(e){var t;(t=e.quickFilter)==null||t.resetCache()}var pie=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 Ge(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){Re(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 Ge(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=st(this.gos,{value:n,node:t,data:t.data,column:e,colDef:i});n=i.getQuickFilterText(s)}return Ge(n)?n.toString().toUpperCase():null}getAggText(e){const t=[];for(const n of this.colsToUse){const i=this.getTextForColumn(n,e);Ge(i)&&t.push(i)}return t.join(`
|
|
130
|
+
`)}},gie={moduleName:"ClientSideRowModelFilter",version:Be,rowModels:["clientSide"],beans:[mne]},py={moduleName:"FilterCore",version:Be,beans:[Vne],apiFunctions:{isAnyFilterPresent:Lne,onFilterChanged:Nne},css:[Sne],dependsOn:[gie]},H1={moduleName:"FilterValue",version:Be,beans:[Hne]},Dp={moduleName:"ColumnFilter",version:Be,beans:[Mne,Bne],dynamicBeans:{headerFilterCellCtrl:vne},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:Ene,getColumnFilterInstance:Rne,destroyFilter:Dne,setFilterModel:Fne,getFilterModel:xne,getColumnFilterModel:Tne,setColumnFilterModel:Pne,showColumnFilter:Ane,hideColumnFilter:Ine,getColumnFilterHandler:_ne,doFilterAction:kne},dependsOn:[py,Ep,H1,yne]},mie={moduleName:"CustomFilter",version:Be,userComponents:{agReadOnlyFloatingFilter:Wne},dependsOn:[Dp]},vie={moduleName:"TextFilter",version:Be,dependsOn:[Dp],userComponents:{agTextColumnFilter:{classImp:oie,params:{useForm:!0}},agTextColumnFloatingFilter:cie},dynamicBeans:{agTextColumnFilterHandler:uie}},Cie={moduleName:"NumberFilter",version:Be,dependsOn:[Dp],userComponents:{agNumberColumnFilter:{classImp:eie,params:{useForm:!0}},agNumberColumnFloatingFilter:sie},dynamicBeans:{agNumberColumnFilterHandler:tie}},wie={moduleName:"DateFilter",version:Be,dependsOn:[Dp],userComponents:{agDateColumnFilter:{classImp:jne,params:{useForm:!0}},agDateInput:Xne,agDateColumnFloatingFilter:Jne},dynamicBeans:{agDateColumnFilterHandler:Yne}},yie={moduleName:"QuickFilterCore",version:Be,rowModels:["clientSide"],beans:[pie],dependsOn:[py,H1]},bie={moduleName:"QuickFilter",version:Be,apiFunctions:{isQuickFilterPresent:die,getQuickFilter:hie,resetQuickFilter:fie},dependsOn:[yie]},Sie={moduleName:"ExternalFilter",version:Be,dependsOn:[py]},Eie=".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}}",gy=(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},Rie=class extends ge{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,n,i){e&&t.destroyBean(e);const s=this.gos,o=sy(s),{column:r,eGui:a}=t,l=r.getColDef();!i&&o&&!l.headerComponent&&(i=Af(()=>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,st(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=sy(s),{column:r,eGui:a}=t,l=r.getColGroupDef();!i&&o&&!(l!=null&&l.headerGroupComponent)&&(i=Af(()=>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,st(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))&&gy(i,e,this.getLocaleTextFunc());if(p)return l="cellEditor",p;l="cell";const g=r.getColDef(),C=a.data;if(g.tooltipField&&Ge(C))return ud(C,g.tooltipField,r.isTooltipFieldContainsDots());const v=g.tooltipValueGetter;return v?v(st(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=sy(s);n||(c&&!e.isCellRenderer()?n=()=>{const h=!!(o!=null&&o.isEditing(e));if(!h&&gy(i,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const C=Af(()=>{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:()=>gy(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=Ge(t.tooltipField)||Ge(t.tooltipValueGetter)||Ge(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},Die=class extends Yq{createTooltipComp(e,t){const n=G7(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}},G1={moduleName:"Tooltip",version:Be,beans:[Rie],dynamicBeans:{tooltipFeature:xA,highlightTooltipFeature:Zq,tooltipStateManager:Die},userComponents:{agTooltipComponent:Xq},dependsOn:[Ep],css:[Eie]},lu=class{constructor(e){this.cellValueChanges=e}},my=class extends lu{constructor(e,t,n,i){super(e),this.initialRange=t,this.finalRange=n,this.ranges=i}},Fie=10,W1=class{constructor(e){this.actionStack=[],this.maxStackSize=e||Fie,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}},xie=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&&RI(this.activeCellEdit,t),i=this.activeRowEdit!==null&&ZZ(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 W1(n),this.redoStack=new W1(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 my?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=Lo(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=Lo(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 my(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&&To(n)?e=new my(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()}},Tie=".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}",Pie={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},Aie=class extends hp{constructor(){super(Pie,[tw]),this.eEditor=He}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=Ff(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}},Fp=class extends hp{constructor(e){super(),this.cellEditorInput=e,this.eEditor=He}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===oe.BACKSPACE||s===oe.DELETE?r="":s&&s.length===1?o?a=!1:r=s:(r=t.getStartValue(),s!==oe.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===oe.PAGE_UP||u===oe.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;fr()||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()}},Iie={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},_ie=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return Iie}getAgComponents(){return[gA]}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!Ge(n)&&!Ge(t.value)?t.value:n??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return ki(e,this.includeTime??!1)}},kie=class extends Fp{constructor(){super(new _ie(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},Oie={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Mie=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return Oie}getAgComponents(){return[gA]}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!Ge(n)&&!Ge(e.value)?e.value:e.parseValue(n??"")}getStartValue(){return ki(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):mi(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):ki(e??null,this.includeTime??!1)??void 0}},Lie=class extends Fp{constructor(){super(new Mie(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},Nie={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},Vie=class extends hp{constructor(){super(Nie,[oq]),this.eEditor=He}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===oe.BACKSPACE||i===oe.DELETE?a="":i&&i.length===1?a=i:(a=this.getStartValue(e),i!==oe.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===oe.LEFT||t===oe.UP||t===oe.RIGHT||t===oe.DOWN||e.shiftKey&&t===oe.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!Ge(i)&&!Ge(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}},Bie={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},Hie=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return Bie}getAgComponents(){return[rq]}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===oe.UP||e.key===oe.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();if(!Ge(n)&&!Ge(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(){fr()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},Gie=class extends Fp{constructor(){super(new Hie(()=>this.getLocaleTextFunc()))}},Wie={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},zie=class extends hp{constructor(){super(Wie,[vq]),this.eEditor=He,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(nn(s)){Re(58);return}this.startedByEnter=r!=null?r===oe.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}},$ie={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},Uie=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return $ie}getAgComponents(){return[Zf]}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!Ge(n)&&!Ge(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(){fr()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),n=Ge(t)&&t.length||0;n&&e.getInputElement().setSelectionRange(n,n)}},z1=class extends Fp{constructor(){super(new Uie(()=>this.getLocaleTextFunc()))}};function jie(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function Kie(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function $1(e,t,n="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,n),"ensureVisible")}function U1(e,t,n){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,n),"ensureVisible")}function qie(e,t,n=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,n),"ensureVisible")}function Yie(e){var t;(t=e.undoRedo)==null||t.undo("api")}function Zie(e){var t;(t=e.undoRedo)==null||t.redo("api")}function Jie(e,t){var n;return(n=e.editModelSvc)==null?void 0:n.getEditRowDataValue(t,{checkSiblings:!0})}function Qie(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=No(l);let C=c??d;C===ns&&(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 Xie(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 Ta(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 ese(e,t){var i;const n=ln(e,t);return((i=e.editSvc)==null?void 0:i.isEditing(n))??!1}function tse(e,t){const{key:n,colKey:i,rowIndex:s,rowPinned:o}=t,{editSvc:r,colModel:a}=e,l=a.getCol(i);if(!l){Re(12,{colKey:i});return}const c=Lo(e,{rowIndex:s,rowPinned:o||null});if(!c){Re(290,{rowIndex:s,rowPinned:o});return}if(!l.isCellEditable(c))return;o==null&&U1(e,s),$1(e,i),r==null||r.startEditing({rowNode:c,column:l},{event:n?new KeyboardEvent("keydown",{key:n}):void 0,source:"api"})}function nse(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}function ise(e){var t;return((t=e.undoRedo)==null?void 0:t.getCurrentUndoStackSize())??0}function sse(e){var t;return((t=e.undoRedo)==null?void 0:t.getCurrentRedoStackSize())??0}var ose={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},rse=class extends BC{constructor(e){super(ose),this.params=e}postConstruct(){va(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,n=i=>{yw(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:n})}};function ase(e,{column:t},n,i,s="ui"){var u;if(n instanceof KeyboardEvent&&(n.key===oe.TAB||n.key===oe.ENTER||n.key===oe.F2||n.key===oe.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=lse(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 lse(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t!=null&&t.singleClickEdit?1:2}function vy(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 use(e,t,n="ui"){const i=vy(e,t,n);return i===!0||n==="ui"?i:e.colModel.getCols().some(o=>vy(e,{rowNode:t.rowNode,column:o},n))}var xp=(e,t=!1)=>{if(e!==void 0)return No(e)||t&&e.state==="editing"};function j1(e,t,n=!1){var i;return xp((i=e.editModelSvc)==null?void 0:i.getEdit(t),n)}var K1=(e,t,n)=>{if(e)for(let i=0,s=e.length;i<s;++i){const o=e[i];if(o.data&&(xp(t==null?void 0:t.getEdit({rowNode:o,column:n}))||xp(t==null?void 0:t.getEdit({rowNode:o.pinnedSibling,column:n})))||K1(o.childrenAfterGroup,t,n))return!0}};function q1(e,t){const{column:n,rowNode:i}=t;return e.gos.get("groupTotalRow")&&!(i!=null&&i.footer)?!1:K1(i==null?void 0:i.childrenAfterGroup,e.editModelSvc,n)}function Y1(e,{rowNode:t,column:n}){var i;if(t=t.pinnedSibling,!!t)return xp((i=e.editModelSvc)==null?void 0:i.getEdit({rowNode:t,column:n}))}var cse=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=j1(n,e)||q1(n,e)||Y1(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)}},dse=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 j1(n,u,!0)||q1(n,u)||Y1(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)})}},hse=({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},fse=({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}))},pse=e=>()=>{const t=new Set(e.colModel.getCols()),n=e.editModelSvc.getEditMap(!0),i=new Set(n.keys());fse(e,hse(e,i),t)},gse=new Set(["undo","redo","paste","bulk","rangeSvc"]),mse=new Set(["ui","api"]),Z1={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},vse=new Set(Object.keys(Z1)),Cse=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Tp={cancel:!0,source:"api"},wse={cancel:!1,source:"api"},uu={checkSiblings:!0},gd={force:!0,suppressFlash:!0},yse=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,Tp),this.createStrategy(i)});const t=pse(e),n=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Tp):this.isEditing()&&(this.isBatchEditing()?ou(e,this.model.getEditPositions()):this.stopEditing(void 0,wse)),!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,Tp)):(this.stopEditing(void 0,Tp),this.batch=!1)}createStrategy(e){const{beans:t,gos:n,strategy:i}=this,s=J1(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=ase(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 Mee(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=ln(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,b,S;const{event:n,cancel:i,source:s="ui",forceCancel:o,forceStop:r}=t||{},{beans:a,model:l}=this;if(vse.has(s)&&this.isBatchEditing())return this.bulkRefresh(e),!1;const u=this.committing?Z1[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=ln(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){Ta(a,{persist:!0,isCancelling:C||i,isStopping:g});const D=l.getEditMap(),w=this.processEdits(D,i,s);(v=this.strategy)==null||v.stop(i,n);for(const R of w)l.clearEditValue(R);this.bulkRefresh(void 0,h);for(const R of l.getEditPositions(D)){const x=ln(a,R),T=No(R);x==null||x.refreshCell({force:!0,suppressFlash:!T})}h=D,p||(p=g)}else if(n instanceof KeyboardEvent&&this.batch&&((b=this.strategy)!=null&&b.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const{key:D}=n,w=D===oe.ENTER,R=D===oe.ESCAPE,x=D===oe.TAB;(w||x||R)&&(w||x?Ta(a,{persist:!0}):R&&this.revertSingleCellEdit(d),this.isBatchEditing()?(S=this.strategy)==null||S.cleanupEditors():ou(a,l.getEditPositions(),{event:n,cancel:R}),n.preventDefault(),this.bulkRefresh(e,h,{suppressFlash:!0}),h=l.getEditMap())}else Ta(a,{persist:!0}),h=l.getEditMap();return p&&e&&this.model.removeEdits(e),this.navigateAfterEdit(t,d==null?void 0:d.cellPosition),Zw(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!==oe.ENTER||!a)return;const l=r?oe.UP:oe.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=No(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=ln(o,{rowNode:e,column:t}),a=mse.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(gd)),l}setEditMap(e,t){var i;this.strategy??(this.strategy=this.createStrategy()),(i=this.strategy)==null||i.setEditMap(e,t),this.bulkRefresh();let n=gd;t!=null&&t.forceRefreshOfEditCellsOnly&&(n={...bse(e),...gd}),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;mn(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=ln(s,{rowNode:g,column:t}))==null||h.refreshCell(i);for(const g of a)(p=ln(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=J1(i)==="fullRow"?use(s,e,t):vy(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=ln(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=ln(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}),Pa(this.beans),n==null||n.refreshCell(gd),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;Pa(this.beans);const t=ln(this.beans,e);t&&(t.refreshCell(gd),(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===ns||!i?(i==null?void 0:i.sourceValue)??this.valueSvc.getValue(t,e,!1,"api"):o}addStopEditingWhenGridLosesFocus(e){Pee(this,this.beans,e)}createPopupEditorWrapper(e){return new rse(e)}commitNextEdit(){this.committing=!0}setDataValue(e,t,n){var i;try{if((!this.isEditing()||this.committing)&&!Cse.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||gse.has(n))return wp(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 wp(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 wp(s,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:o,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){_ee(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 st(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;Ta(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=Lo(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 b=o.parseValue(C,p??null,a,v);Number.isNaN(b)&&(b=null),g.set(C,{editorValue:void 0,pendingValue:b,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(),Zw(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=ln(i,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new cse(e,t)}createRowStyleFeature(e,t){return new dse(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=Lo(n,{rowIndex:u,rowPinned:c});if(!g)continue;const C=s.getValue(p,g,!0,"api");if(!(t!=null&&t.forceRefreshOfEditCellsOnly)&&!No({pendingValue:d,sourceValue:C})&&h!=="editing")continue;let v=o.get(g);v||(v=new Map,o.set(g,v)),d===void 0&&(d=ns),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=ln(this.beans,e);if(!t||!this.isEditing(t,uu))return;const n=this.model.getEdit(t);if(!n||!No(n))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(o=this.beans.ariaAnnounce)==null||o.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return ln(this.beans,e)}};function bse(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 J1(e,t){return t??e.get("editType")??"singleCell"}var Q1=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=ln(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:Lo(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)yp(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)yp(this.beans,a,{event:t,cancel:e}),this.model.stop(a);if(r.keep.length>0)for(const a of r.keep){const l=ln(this.beans,a);(o=this.editSvc)!=null&&o.cellEditingInvalidCommitBlocks()||l&&this.editSvc.revertSingleCellEdit(l)}}return!0}cleanupEditors({rowNode:e}={},t){Ta(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),Zw(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;Iee(this.beans,o,s,r,t,i)}dispatchCellEvent(e,t,n,i){const s=ln(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,n),...i})}dispatchRowEvent(e,t,n){if(n)return;const i=qw(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===oe.ENTER:null}shouldCancel(e,t,n="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===oe.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===ns?void 0:s.pendingValue;this.start({position:s,event:new KeyboardEvent("keydown",{key:o}),source:"api"});const r=ln(this.beans,s);r&&this.setFocusInOnEditor(r)}}destroy(){this.cleanupEditors(),super.destroy()}},Sse=class extends Q1{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,n="ui"){const{rowNode:i}=e||{};if(!qw(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(No(a)){i.push(r);break}}}),Pa(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=ln(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=ln(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}},Ese=class extends Q1{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=Lo(this.beans,{rowIndex:i,rowPinned:o}),a=Yw(s),l=t.getCol(a),u=e.previousParams;if(u){const c=Yw(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,b,S,D;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(!((b=a.comp)!=null&&b.getCellEditor())){const w=(S=this.editSvc)==null?void 0:S.isEditing(a,{withOpenEditor:!0});su(this.beans,a,{event:n,cellStartedEdit:!0,silent:w}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else d&&s&&this.setFocusInOnEditor(a),a.focusCell(!0,n);return(D=e.rowCtrl)==null||D.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},br={moduleName:"EditCore",version:Be,beans:[Tee,yse],apiFunctions:{getEditingCells:Qie,getEditRowValues:Jie,getCellEditorInstances:Aee,startEditingCell:tse,stopEditing:Xie,isEditing:ese,validateEdit:nse},dynamicBeans:{singleCell:Ese,fullRow:Sse},dependsOn:[Ep,G1],css:[Tie]},Rse={moduleName:"UndoRedoEdit",version:Be,beans:[xie],apiFunctions:{undoCellEditing:Yie,redoCellEditing:Zie,getCurrentUndoSize:ise,getCurrentRedoSize:sse},dependsOn:[br]},Dse={moduleName:"TextEditor",version:Be,userComponents:{agCellEditor:z1,agTextCellEditor:z1},dependsOn:[br]},Fse={moduleName:"NumberEditor",version:Be,userComponents:{agNumberCellEditor:{classImp:Gie}},dependsOn:[br]},xse={moduleName:"DateEditor",version:Be,userComponents:{agDateCellEditor:kie,agDateStringCellEditor:Lie},dependsOn:[br]},Tse={moduleName:"CheckboxEditor",version:Be,userComponents:{agCheckboxCellEditor:Aie},dependsOn:[br]},Pse={moduleName:"SelectEditor",version:Be,userComponents:{agSelectCellEditor:zie},dependsOn:[br]},Ase={moduleName:"LargeTextEditor",version:Be,userComponents:{agLargeTextCellEditor:Vie},dependsOn:[br]},Ise={moduleName:"CustomEditor",version:Be,dependsOn:[br]},_se=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),zK(e))}createColumns(e,t){var h,p;const n=()=>{var g;zf(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(WK(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=>!Ao(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),Rs(this.beans,{state:[{...s,colId:i.getColId()}]},t)}}getColumn(e){var t;return((t=this.columns)==null?void 0:t.list.find(n=>Jc(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"||!ga(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=Nf(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:HP,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const n=new Ca(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"?Nf(t):void 0,a=e&&typeof e!="string"?Nf(e):void 0,l=r!==a,u=Vf(e),c=Vf(t);(o||l||u!==c)&&this.beans.colModel.refreshAll(n)}destroy(){var e;zf(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&&Es(c,s)};(((u=this.beans.rowNumbersSvc)==null?void 0:u.getColumn(GP))?2:1)===i&&o()}};function kse(e,t){var r;if(!t.nodes.every(a=>a.rowPinned&&!rd(a)?(Re(59),!1):a.id===void 0?(Re(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 Ose(e,t,n="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.selectAllRowNodes({source:n,selectAll:t})}function Mse(e,t,n="apiSelectAll"){var i;(i=e.selectionSvc)==null||i.deselectAllRowNodes({source:n,selectAll:t})}function Lse(e,t="apiSelectAllFiltered"){var n;(n=e.selectionSvc)==null||n.selectAllRowNodes({source:t,selectAll:"filtered"})}function Nse(e,t="apiSelectAllFiltered"){var n;(n=e.selectionSvc)==null||n.deselectAllRowNodes({source:t,selectAll:"filtered"})}function Vse(e,t="apiSelectAllCurrentPage"){var n;(n=e.selectionSvc)==null||n.selectAllRowNodes({source:t,selectAll:"currentPage"})}function Bse(e,t="apiSelectAllCurrentPage"){var n;(n=e.selectionSvc)==null||n.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function Hse(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function Gse(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}var Wse=class extends tZ{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=Bf(e),this.groupSelectsDescendants=Yc(e),this.groupSelectsFiltered=Hf(e)==="filteredDescendants",this.masterSelectsDetail=MP(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=Yc(e),n=Bf(e),i=Hf(e)==="filteredDescendants";this.masterSelectsDetail=MP(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?e_(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(!ga(a)&&e)return Re(132),0;if(i.length>1&&!this.isMultiSelect())return Re(130),0;let l=0;for(let c=0;c<i.length;c++){const d=i[c],h=cu(d);if(h.rowPinned&&!rd(h)){Re(59);continue}if(h.id===void 0){Re(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(!mn(n))return!1;const s=i.rootNode;if(!s)return!1;t||(t=new ld(!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?!$se(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 gr(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(!mn(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=mn(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){$t(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 X1(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(!ga(t)){Re(132);return}if(PK(t)&&!qc(t)){Re(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,mn(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)){$t(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 mn(this.beans.gos)}updateSelectable(e){var l;const{gos:t,rowModel:n}=this.beans;if(!ga(t))return;const i="selectableChanged",s=e!==void 0,o=mn(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 ld(!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=zse(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(!qc(t)){Re(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 rd(e)?e.pinnedSibling:e.footer?e.sibling:e}function zse(e){let t=0,n=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&n++}),X1(t,n)}function X1(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function $se(e,t){let n=t.parent;for(;n;){if(n===e)return!0;n=n.parent}return!1}function e_(e){var i;const t=e.isSelected()===!1,n=((i=e.childrenAfterFilter)==null?void 0:i.some(e_))??!1;return t||n}var Use={moduleName:"SharedRowSelection",version:Be,beans:[_se],apiFunctions:{setNodesSelected:kse,selectAll:Ose,deselectAll:Mse,selectAllFiltered:Lse,deselectAllFiltered:Nse,selectAllOnCurrentPage:Vse,deselectAllOnCurrentPage:Bse,getSelectedNodes:Hse,getSelectedRows:Gse}},jse={moduleName:"RowSelection",version:Be,rowModels:["clientSide","infinite","viewport"],beans:[Wse],dependsOn:[Use]};function Kse(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function qse(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function t_(e){var t;(t=e.rowModel)==null||t.onRowHeightChanged()}function n_(e){var t,n;if((t=e.rowAutoHeight)!=null&&t.active){Re(3);return}(n=e.rowModel)==null||n.resetRowHeights()}function Yse(e,t,n){var s,o;const i=Zte(e);if(i){if(((s=e.rowGroupColsSvc)==null?void 0:s.columns.length)===0){if(t<0){$t(238);return}i.setRowCount(t,n);return}$t(28);return}(o=Sp(e))==null||o.setRowCount(t,n)}function Zse(e){var t;return zl(e.gos)?e.rowModel.getBlockStates():((t=e.rowNodeBlockLoader)==null?void 0:t.getBlockState())??{}}function Jse(e){return e.rowModel.isLastRowIndexKnown()}var Qse={moduleName:"CsrmSsrmSharedApi",version:Be,apiFunctions:{expandAll:Kse,collapseAll:qse}},Xse={moduleName:"RowModelSharedApi",version:Be,apiFunctions:{onRowHeightChanged:t_,resetRowHeights:n_}},eoe={moduleName:"SsrmInfiniteSharedApi",version:Be,apiFunctions:{setRowCount:Yse,getCacheBlockState:Zse,isLastRowIndexKnown:Jse}},toe=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){$t(18),t||$t(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||$t(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":Re(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}));Rs(i,{state:d,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const d=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));Rs(i,{state:d},"alignedGridChanged")}break;case"columnPinned":{const d=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));Rs(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)}},noe={moduleName:"AlignedGrids",version:Be,beans:[toe],dependsOn:[HI]},ioe=class extends ge{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},i_(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=i_(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 b=a(C);b&&u(v,b)}}};u(s,e),o.length=r}setImmutableRowData(e,t){var b;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=(b=this.beans.groupStage)==null?void 0:b.getNestedDataGetter();let d=i.get("suppressMaintainUnsortedOrder")?void 0:!1,h=-1,p=!1;const g=(S,D)=>{if(!d&&d!==void 0){const w=S.sourceRowIndex;d=w<=h,h=w}S.data!==D&&(S.updateData(D),r.has(S)||a.add(S),!S.selectable&&S.isSelected()&&u.push(S))},C=(S,D,w)=>{for(let R=0,x=D.length;R<x;++R){const T=D[R];if(!T)continue;let H=this.getRowNode(s({data:T,level:w}));if(H?(g(H,T),p||(p=!!c&&H.treeParent!==S)):(H=this.createRowNode(T,w),r.add(H)),!c||l.has(H)){l.add(H);continue}l.add(H),H.treeParent=S;const N=c(T);N&&C(H,N,w+1)}};C(n,t,0);const v=this.deleteUnusedNodes(l,o,u)||d||r.size>0;if(v){const S=n._leafs??(n._leafs=[]);d===void 0?loe(S,l,o):aoe(S,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 Re(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&&roe(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 gr(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]&&Re(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 ooe(this.rootNode._leafs,t);const n=e({data:t,level:0}),i=this.allNodesMap[n];return i||($t(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=soe(e,t)),t}},soe=(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},i_=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},ooe=(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 $t(5,{data:t}),null},roe=(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},aoe=(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},loe=(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},s_=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"))}},uoe=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(S=>S.isRowGroupActive()),h=r==null?void 0:r.columns,p=o.isPivotMode(),g=s.getCallback("postSortRows");let C=!1,v;const b=S=>{var x,T;const D=p&&S.leafGroup;let w=c&&d&&!S.leafGroup;w&&(v??(v=this.shouldSortContainsGroupCols(e)),w&&(w=!v));let R=null;if(w){let H=!1;if(h){const N=S.level+1;N<h.length&&(H=h[N].getSort()===null)}H||(R=hoe(S))}else!e.length||D||(t&&n?R=coe(a,S,n,i,e):R=a.doFullSort(S.childrenAfterAggFilter,e));if(R||(R=((x=S.childrenAfterAggFilter)==null?void 0:x.slice(0))??[]),C||(C=((T=S.childrenAfterSort)==null?void 0:T[0])!==R[0]),S.childrenAfterSort=R,s_(S),g){const H={nodes:S.childrenAfterSort};g(H)}};if(i==null||i.forEachChangedNodeDepthFirst(b),C&&s.get("groupHideOpenParents")){const S=u==null?void 0:u.getShowRowGroupCols();S!=null&&S.length&&l.refreshCells({columns:S,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(qs(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}},coe=(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)),doe(e,s,l,d)},doe=(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},hoe=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},foe=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=Hn(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new gr(e);this.rootNode=t,this.nodeManager=this.createBean(new ioe(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=cr(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,Re(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 pp,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=Gn(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=cr(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:$l(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:$l(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:$l(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new ld(!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=Yc(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(i)return;if(n&&(r===t||r===e)&&(i=!0,o&&r.group)){o_(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),s_(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,R1(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(uw)===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 pp;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 pp,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()}},o_=(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&&o_(e,o)}};function poe(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function goe(e,t){const n=yr(e);n&&((!t||t==="everything")&&(t="group"),n.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function moe(e){var t;return((t=yr(e))==null?void 0:t.isEmpty())??!0}function voe(e,t){var n;(n=yr(e))==null||n.forEachLeafNode(t)}function Coe(e,t){var n;(n=yr(e))==null||n.forEachNodeAfterFilter(t)}function woe(e,t){var n;(n=yr(e))==null||n.forEachNodeAfterFilterAndSort(t)}function yoe(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var n;return(n=yr(e))==null?void 0:n.updateRowData(t)})}function boe(e,t,n){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=yr(e))==null?void 0:i.batchUpdateRowData(t,n)})}function Soe(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=yr(e))==null?void 0:t.flushAsyncTransactions()})}function Eoe(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}var Roe={moduleName:"ClientSideRowModel",version:Be,rowModels:["clientSide"],beans:[foe,uoe],dependsOn:[g1]},Doe={moduleName:"ClientSideRowModelApi",version:Be,apiFunctions:{onGroupExpandedOrCollapsed:poe,refreshClientSideRowModel:goe,isRowDataEmpty:moe,forEachLeafNode:voe,forEachNodeAfterFilter:Coe,forEachNodeAfterFilterAndSort:woe,applyTransaction:yoe,applyTransactionAsync:boe,flushAsyncTransactions:Soe,getBestCostNodeSelection:Eoe,resetRowHeights:n_,onRowHeightChanged:t_},dependsOn:[Qse,Xse]},Foe=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&&xK(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(st(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(st(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 QP,{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=mn(this.gos),o=zl(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=>Ao(h)?!1:!Io(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?!MC(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&&vn(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(st(this.gos,{columnGroup:r})):a=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const u=(r.isExpandable()?r.getLeafColumns():[]).reduce((c,d,h,p)=>{let g=jt(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)}}},xoe={moduleName:"SharedExport",version:Be,beans:[Foe]},r_=`\r
|
|
131
|
+
`,Toe=class extends nne{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,r_),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():(Re(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=r_),this.isFirstLine=!1}},Poe=class extends tne{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()){Re(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(st(this.gos,{})):t.fileName;ine(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 Toe({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 Aoe(e,t){var n;return(n=e.csvCreator)==null?void 0:n.getDataAsCsv(t)}function Ioe(e,t){var n;(n=e.csvCreator)==null||n.exportDataAsCsv(t)}var _oe={moduleName:"CsvExport",version:Be,beans:[Poe],apiFunctions:{getDataAsCsv:Aoe,exportDataAsCsv:Ioe},dependsOn:[xoe]},koe=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 gr(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){Ge(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(nn(this.params.datasource.getRows)){Re(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:st(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 gr(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()}},Ooe=2,Moe=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 koe(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()&&(ur(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=Ooe-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,Ge(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}},Loe=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 gr(e);this.rootNode=t,t.level=-1,this.rowHeight=ma(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=ma(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t;let e;this.cacheParams?e=!Oc(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:ma(e),overflowSize:o.get("cacheOverflowSize"),blockSize:o.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new Moe(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 Noe(e){var t;(t=Sp(e))==null||t.refreshCache()}function Voe(e){var t;(t=Sp(e))==null||t.purgeCache()}function Boe(e){var t;return(t=Sp(e))==null?void 0:t.getRowCount()}var Hoe=class extends ge{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=TK(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Hn(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Es(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){ur(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(){ur(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},Goe={moduleName:"InfiniteRowModelCore",version:Be,rowModels:["infinite"],beans:[Loe,Hoe]},Woe={moduleName:"InfiniteRowModel",version:Be,apiFunctions:{refreshInfiniteCache:Noe,purgeInfiniteCache:Voe,getInfiniteRowCount:Boe},dependsOn:[Goe,eoe]},zoe="↑",$oe="↓",Uoe={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},joe=class extends Bt{constructor(){super(Uoe),this.eValue=He,this.eDelta=He,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),i=e.formatValue(n),s=Ge(i)?i:n,o=t>=0,r=this.eDelta;o?r.textContent=zoe+s:r.textContent=$oe+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"),Bn(this.eDelta)}refresh(e,t=!1){var u;const{value:n,valueFormatted:i}=e,{eValue:s,lastValue:o,beans:r}=this;if(n===o||(Ge(i)?s.textContent=i:Ge(n)?s.textContent=n:Bn(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}},Koe=".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}",qoe={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},Yoe=class extends Bt{constructor(){super(qoe),this.eCurrent=He,this.refreshCount=0,this.registerCSS(Koe)}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=Cn({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(nn(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 Ge(e.valueFormatted)?i.textContent=e.valueFormatted:Ge(e.value)?i.textContent=n:Bn(i),!0}},Zoe=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=qZ(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 Joe(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 Qoe={moduleName:"HighlightChanges",version:Be,beans:[Zoe],userComponents:{agAnimateShowChangeCellRenderer:joe,agAnimateSlideCellRenderer:Yoe},apiFunctions:{flashCells:Joe}};function Xoe(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function ere(e,t,n){var i;return(i=e.stateSvc)==null?void 0:i.setState(t,n)}function a_(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=tre(e)),e.version=Be,e}function tre(e){return e.cellSelection=nre(e,"rangeSelection"),e}function nre(e,t){if(e&&typeof e=="object")return e[t]}var ire=class extends ge{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Hn(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Hn(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=Hn(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=mn(e);const i=a_(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=a_(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 Qte(Uf(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=(_,V)=>{const ie=!(i!=null&&i.has(_))&&!!(V||t==="api");return h||(h=ie),ie},g={},C=_=>{let V=g[_];return V||(V={colId:_},g[_]=V,V)},v={},b=p("sort",s);b&&(s==null||s.sortModel.forEach(({colId:_,sort:V},ie)=>{const me=C(_);me.sort=V,me.sortIndex=ie})),(b||!n)&&(v.sort=null,v.sortIndex=null);const S=p("rowGroup",o);S&&(o==null||o.groupColIds.forEach((_,V)=>{const ie=C(_);ie.rowGroup=!0,ie.rowGroupIndex=V})),(S||!n)&&(v.rowGroup=null,v.rowGroupIndex=null);const D=p("aggregation",r);D&&(r==null||r.aggregationModel.forEach(({colId:_,aggFunc:V})=>{C(_).aggFunc=V})),(D||!n)&&(v.aggFunc=null);const w=p("pivot",a);w&&(a==null||a.pivotColIds.forEach((_,V)=>{const ie=C(_);ie.pivot=!0,ie.pivotIndex=V}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(w||!n)&&(v.pivot=null,v.pivotIndex=null);const R=p("columnPinning",l);if(R){for(const _ of(l==null?void 0:l.leftColIds)??[])C(_).pinned="left";for(const _ of(l==null?void 0:l.rightColIds)??[])C(_).pinned="right"}(R||!n)&&(v.pinned=null);const x=p("columnVisibility",u);if(x)for(const _ of(u==null?void 0:u.hiddenColIds)??[])C(_).hide=!0;(x||!n)&&(v.hide=null);const T=p("columnSizing",c);if(T)for(const{colId:_,flex:V,width:ie}of(c==null?void 0:c.columnSizingModel)??[]){const me=C(_);me.flex=V??null,me.width=ie}(T||!n)&&(v.flex=null);const H=d==null?void 0:d.orderedColIds,N=!!(H!=null&&H.length)&&!(i!=null&&i.has("columnOrder")),A=N?H.map(_=>C(_)):Object.values(g);(A.length||h)&&(this.columnStates=A,Rs(this.beans,{state:A,applyOrder:N,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);Rs(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 Xte(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(!To(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];Oc(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),Oc(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")}},sre={moduleName:"GridState",version:Be,beans:[ire],apiFunctions:{getState:Xoe,setState:ere}};function ore(e){return e.rowModel.isLastRowIndexKnown()}function rre(e){var t;return((t=e.pagination)==null?void 0:t.getPageSize())??100}function are(e){var t;return((t=e.pagination)==null?void 0:t.getCurrentPage())??0}function lre(e){var t;return((t=e.pagination)==null?void 0:t.getTotalPages())??1}function ure(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function cre(e){var t;(t=e.pagination)==null||t.goToNextPage()}function dre(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function hre(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function fre(e){var t;(t=e.pagination)==null||t.goToLastPage()}function pre(e,t){var n;(n=e.pagination)==null||n.goToPage(t)}var gre=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(ma(t),1),s=Math.floor(e/i);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?Hn(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},md="paginationPageSizeSelector",mre={tag:"span",cls:"ag-paging-page-size"},vre=class extends Bt{constructor(){super(mre),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(md,()=>{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(){Bn(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(md)!==!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(md)!==!0;Re(94,{pageSizeSet:s,pageSizesSet:o,pageSizeOptions:e,paginationPageSizeOption:t}),o||Re(95,{paginationPageSizeOption:t,paginationPageSizeSelector:md}),e.unshift("")}const i=String(n?"":t);this.selectPageSizeComp?(hr(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 iw).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(md);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((n,i)=>n-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},Cre={selector:"AG-PAGE-SIZE-SELECTOR",component:vre},wre=".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}",yre=class extends wI{constructor(){super(),this.btFirst=He,this.btPrevious=He,this.btNext=He,this.btLast=He,this.lbRecordCount=He,this.lbFirstRowOnPage=He,this.lbLastRowOnPage=He,this.lbCurrent=He,this.lbTotal=He,this.pageSizeComp=He,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(wre)}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(),[Cre]);const{btFirst:t,btPrevious:n,btNext:i,btLast:s}=this;this.activateTabIndex([t,n,i,s]),t.insertAdjacentElement("afterbegin",es(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",es(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",es(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",es(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):pY(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===oe.ENTER||i.key===oe.SPACE)&&(i.preventDefault(),n())}})}fY(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}):ene(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){T8(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,b;if(e)v=this.formatNumber(t),b=this.formatNumber(i);else{const S=h("more","more");v=S,b=S}this.lbTotal.textContent=v,this.lbRecordCount.textContent=b,this.announceAriaStatus(c,d,b,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"))}},bre={selector:"AG-PAGINATION",component:yre},Sre=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 bre}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 Ge(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:Ge(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:Ge(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:Ge(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})}},Ere={moduleName:"Pagination",version:Be,beans:[Sre,gre],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:ore,paginationGetPageSize:rre,paginationGetCurrentPage:are,paginationGetTotalPages:lre,paginationGetRowCount:ure,paginationGoToNextPage:cre,paginationGoToPreviousPage:dre,paginationGoToFirstPage:hre,paginationGoToLastPage:fre,paginationGoToPage:pre},dependsOn:[Ep]};function Rre(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function l_(e,t,n,i,s){t&&(i&&t.parent&&t.parent.level!==-1&&l_(e,t.parent,n,i,s),t.setExpanded(n,void 0,s))}function Dre(e,t){return e.rowModel.getRowNode(t)}function Fre(e,t,n,i){e.rowRenderer.addRenderedRowListener(t,n,i)}function xre(e){return e.rowRenderer.getRenderedNodes()}function Tre(e,t,n){e.rowModel.forEachNode(t,n)}function Pre(e){return e.rowRenderer.firstRenderedRow}function Are(e){return e.rowRenderer.lastRenderedRow}function Ire(e,t){return e.rowModel.getRow(t)}function _re(e){return e.rowModel.getRowCount()}var kre={moduleName:"RowApi",version:Be,apiFunctions:{redrawRows:Rre,setRowNodeExpanded:l_,getRowNode:Dre,addRenderedRowListener:Fre,getRenderedNodes:xre,forEachNode:Tre,getFirstDisplayedRowIndex:Pre,getLastDisplayedRowIndex:Are,getDisplayedRowAtIndex:Ire,getDisplayedRowCount:_re}},Ore={moduleName:"ScrollApi",version:Be,apiFunctions:{getVerticalPixelRange:jie,getHorizontalPixelRange:Kie,ensureColumnVisible:$1,ensureIndexVisible:U1,ensureNodeVisible:qie}};function Mre(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 Lre(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function Nre(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function Vre(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function Bre(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function Hre(e){return{rowHeight:ma(e),headerHeight:id(e)}}function Gre(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(ed(a))}if((o=t.columns)!=null&&o.length)return n;const i=[],s=ey(t.rowNodes);for(const r of e.rowRenderer.getAllRowCtrls()){if(s&&!ty(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(ed(u))}}return[...i,...n]}var Wre={moduleName:"RenderApi",version:Be,apiFunctions:{setGridAriaProperty:Mre,refreshCells:Lre,refreshHeader:Nre,isAnimationFrameQueueEmpty:Vre,flushAllAnimationFrames:Bre,getSizesForCurrentTheme:Hre,getCellRendererInstances:Gre}};function zre(e,t){var n,i;typeof t=="number"?(n=e.colAutosize)==null||n.sizeColumnsToFit(t,"api"):(i=e.colAutosize)==null||i.sizeColumnsToFitGridBody(t)}function u_({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 $re(e,t){var n;t&&typeof t=="object"?u_(e,t):(n=e.colAutosize)==null||n.autoSizeAllColumns({source:"api",skipHeader:t})}var Ure=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&&mn(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=c_(this.beans),r=c=>n.leftCols.some(d=>Jc(d,c)),a=c=>n.rightCols.some(d=>Jc(d,c)),l=e.colKeys.filter(c=>!Ao(c)&&!Io(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 b=-1;const S=Object.fromEntries(u.map(({colId:R,...x})=>[R,x])),D=s??this.gos.get("skipHeaderOnAutoSize"),w=o??D;for(;b!==0;){b=0;const R=[];for(const x of i){if(!x||GK(x))continue;const T=p.getCol(x);if(!T||v.has(T))continue;const H=g.getPreferredWidthForColumn(T,D);if(H>0){const N=S[T.colId]??{};N.minWidth??(N.minWidth=l),N.maxWidth??(N.maxWidth=a);const A=jre(T,H,N);T.setActualWidth(A,c),v.add(T),b++}R.push(T)}R.length&&C.refresh(c)}w||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 Fa(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=c_(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):Re(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,...b}of(i==null?void 0:i.columnLimits)??[])s[typeof v=="string"?v:v.getColId()]=b;const o=this.beans.visibleCols.allCols;if(e<=0||!o.length)return;const r=Po(o);if(i!=null&&i.onlyScaleUp&&r>e||e===r&&o.every(b=>{if(b.colDef.suppressSizeToFit)return!0;const S=s==null?void 0:s[b.getId()],D=(S==null?void 0:S.minWidth)??(i==null?void 0:i.defaultMinWidth),w=(S==null?void 0:S.maxWidth)??(i==null?void 0:i.defaultMaxWidth),R=b.getActualWidth();return(D==null||R>=D)&&(w==null||R<=w)}))return;const l=[],u=[];for(const v of o){const b=((g=i==null?void 0:i.colKeys)==null?void 0:g.some(S=>Jc(v,S)))??!0;v.getColDef().suppressSizeToFit||!b?u.push(v):l.push(v)}const c=l.slice(0);let d=!1;const h=v=>{Es(l,v),u.push(v)};for(const v of l){v.resetActualWidth(t);const b=s==null?void 0:s[v.getId()],S=(b==null?void 0:b.minWidth)??(i==null?void 0:i.defaultMinWidth),D=(b==null?void 0:b.maxWidth)??(i==null?void 0:i.defaultMaxWidth),w=v.getActualWidth();typeof S=="number"&&w<S?v.setActualWidth(S,t,!0):typeof D=="number"&&w>D&&v.setActualWidth(D,t,!0)}for(;!d;){d=!0;const v=e-Po(u);if(v<=0)for(const b of l){const S=((C=s==null?void 0:s[b.getId()])==null?void 0:C.minWidth)??(i==null?void 0:i.defaultMinWidth)??b.minWidth;b.setActualWidth(S,t,!0)}else{const b=v/Po(l);let S=v;for(let D=l.length-1;D>=0;D--){const w=l[D],R=s==null?void 0:s[w.getId()],x=(R==null?void 0:R.minWidth)??(i==null?void 0:i.defaultMinWidth),T=(R==null?void 0:R.maxWidth)??(i==null?void 0:i.defaultMaxWidth),H=w.getMinWidth(),N=w.getMaxWidth(),A=typeof x=="number"&&x>H?x:H,_=typeof T=="number"&&T<N?T:N;let V=Math.round(w.getActualWidth()*b);V<A?(V=A,h(w),d=!1):V>_?(V=_,h(w),d=!1):D===0&&(V=S),w.setActualWidth(V,t,!0),S-=V}}}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 jre(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 c_({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),s=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return Bc(n.eGridBody)-s}var Kre={moduleName:"ColumnAutoSize",version:Be,beans:[Ure],apiFunctions:{sizeColumnsToFit:zre,autoSizeColumns:u_,autoSizeAllColumns:$re},dependsOn:[LI]},qre=".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 Yre(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function Zre(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function Jre(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t)}function Qre(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedBottomRow(t)}function Xre(e,t,n){var i;return(i=e.pinnedRowModel)==null?void 0:i.forEachPinnedRow(t,n)}var eae={moduleName:"PinnedRow",version:Be,beans:[ZY],css:[qre],apiFunctions:{getPinnedTopRowCount:Yre,getPinnedBottomRowCount:Zre,getPinnedTopRow:Jre,getPinnedBottomRow:Qre,forEachPinnedRow:Xre},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},tae=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}},nae=class extends ge{constructor(e){super(),this.column=e}buildCache(e){var D;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 b=(w,R)=>{g=w,C=null,v=R},S=w=>{const R=!w.isExpandable()&&!w.group&&!w.detail&&(c?!c({rowNode:w}):!0);if(w.rowIndex==null||!R){b(null,null);return}if(g==null||w.level!==g.level||w.footer||C&&w.rowIndex-1!==(C==null?void 0:C.getLastNode().rowIndex)){b(w,o.getValue(t,w));return}const x=o.getValue(t,w);if(p){const T=st(n,{valueA:v,nodeA:g,valueB:x,nodeB:w,column:t,colDef:a});if(!h(T)){b(w,x);return}}else if(d?!d(v,x):v!==x){b(w,x);return}if(!C){const T=l==null?void 0:l.get(g);(T==null?void 0:T.firstNode)===g?(T.reset(),C=T):C=new tae(t,g),u.set(g,C)}C.addSpannedNode(w),u.set(w,C)};switch(e){case"center":(D=s.forEachDisplayedNode)==null||D.call(s,w=>{(!r||r.isRowInPage(w.rowIndex))&&S(w)}),this.centerValueNodeMap=u;break;case"top":i==null||i.forEachPinnedRow("top",S),this.topValueNodeMap=u;break;case"bottom":i==null||i.forEachPinnedRow("bottom",S),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}}},iae=class extends ge{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Hn(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Hn(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 nae(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()}},sae=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||Df(e,t.rowIndex)}setAriaRowSpan(){k8(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(dp(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}},oae=class extends bp{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 sae(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(){}},rae=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 oae(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")}},aae={moduleName:"CellSpan",version:Be,beans:[iae,rae]},lae=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);Qw(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 st(this.beans.gos,{value:n,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},uae=class extends ge{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,i){Qw(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 lae(e,t)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(s=>{n(s)})}},cae={moduleName:"CellStyle",version:Be,beans:[uae]},dae={moduleName:"RowStyle",version:Be,beans:[Zee]};function hae(e,t){var n;return!!((n=e.colHover)!=null&&n.isHovered(t))}var fae=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}},pae="ag-column-hover",gae=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(pae,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 fae(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},mae={moduleName:"ColumnHover",version:Be,beans:[gae],apiFunctions:{isColumnHovered:hae}},vae=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=!Cp.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)=>{Cp.has(r)&&t(r,a)},i=(r,a)=>{Cp.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 Cae(e,t,n){var i;(i=e.apiEventSvc)==null||i.addListener(t,n)}function wae(e,t,n){var i;(i=e.apiEventSvc)==null||i.removeListener(t,n)}function yae(e,t){var n;(n=e.apiEventSvc)==null||n.addGlobalListener(t)}function bae(e,t){var n;(n=e.apiEventSvc)==null||n.removeGlobalListener(t)}var Sae={moduleName:"EventApi",version:Be,apiFunctions:{addEventListener:Cae,addGlobalListener:yae,removeEventListener:wae,removeGlobalListener:bae},beans:[vae]},Eae={moduleName:"Locale",version:Be,beans:[Jte]},Rae=class extends ge{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Hn(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=cr(this.beans,d).height;for(const C of s){let v=h==null?void 0:h[C.getColId()];const b=n==null?void 0:n.getCellSpan(C,d);if(b){if(b.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 S;if((S=this.beans.editSvc)!=null&&S.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:p,borderTopWidth:g}=pa(i),C=d+h+p+g,b=t.offsetHeight+C;if(c<5){const D=On(r),w=!(D!=null&&D.contains(t)),R=b==0;if(w||R){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(s,b,o)},l=()=>a(0);l();const u=ar(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}},Dae={moduleName:"RowAutoHeight",version:Be,beans:[Rae]},Fae={moduleName:"AllCommunity",version:Be,dependsOn:[Roe,_oe,Woe,gne,Dse,Fse,xse,Tse,Pse,Ase,Ise,Rse,vie,Cie,wie,mie,bie,Sie,sre,noe,Ere,HI,kre,Ore,Wre,Kre,cJ,eae,jse,_te,cae,mae,dae,Sae,Mte,Qoe,G1,Eae,Dae,uJ,Doe,aae]};let d_=!1;d_||(vK.registerModules([Fae]),d_=!0);class xae{constructor(t,n){rn(this,"gridApi",null);rn(this,"container");rn(this,"config");rn(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=Kte(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 Tae=jI.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:40,wrapperBorder:!0,wrapperBorderRadius:4}),Pae=300,Aae=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:{}},emits:["onGridReady","row-clicked","cell-clicked","cell-focused","row-selected"],setup(e,{expose:t,emit:n}){const i=e,s=n,o=fe(null),r=fe(null),a=W(()=>({width:"100%",height:i.height||"500px"})),l=W(()=>({...i,theme:Tae}));function u(){if(!o.value){console.warn("Grid container element not found");return}const v={...l.value,height:i.height};r.value=new xae(o.value,v),r.value.init(),c()}function c(){var b;const v=((b=r.value)==null?void 0:b.getApi())??null;s("onGridReady",v)}function d(v){var b;v&&((b=r.value)==null||b.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}Dt(()=>i.columnDefs,v=>{d(v)}),hs(()=>{h()}),t({gridApi:p,gridManager:g});const C=ic(()=>{var v,b;(b=(v=r.value)==null?void 0:v.getApi())==null||b.sizeColumnsToFit()},Pae);return Si(()=>{u(),window.addEventListener("resize",C)}),hs(()=>{h(),window.removeEventListener("resize",C)}),(v,b)=>(X(),ye("div",{ref_key:"gridContainerRef",ref:o,style:Dn(a.value),class:"ag-theme-quartz"},null,4))}});class Iae{constructor(){rn(this,"eGui");rn(this,"eCheckbox");rn(this,"params");rn(this,"selectionChangedListener");rn(this,"isUpdating",!1);rn(this,"handleCellClick",t=>{t.target!==this.eCheckbox&&(t.stopPropagation(),t.preventDefault(),this.eCheckbox.checked=!this.eCheckbox.checked,this.handleCheckboxChange())});rn(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=`
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: flex-start;
|
|
136
|
+
width: 100%;
|
|
137
|
+
height: 100%;
|
|
138
|
+
padding: 8px;
|
|
139
|
+
padding-left: 16px;
|
|
140
|
+
`,this.eCheckbox=document.createElement("input"),this.eCheckbox.type="checkbox",this.eCheckbox.checked=!!t.node.isSelected(),this.eCheckbox.style.cssText=`
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
pointer-events: auto;
|
|
143
|
+
width: 16px;
|
|
144
|
+
height: 16px;
|
|
145
|
+
margin: 0;
|
|
146
|
+
`,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 UT(e)}const _ae=()=>[...[{headerName:"Scene name",field:"name",sortable:!1,filter:!1,fieldComponentType:"name",editable:!1,pinned:"left",headerComponent:du(oa)},{headerName:"Assignee",field:"assignees",sortable:!1,filter:!1,fieldComponentType:"assignee",editable:!0,headerComponent:du(oa)},{headerName:"Status",field:"status",sortable:!1,filter:!1,editable:!0,fieldComponentType:"status",headerComponent:du(oa)},{headerName:"Date Range",field:"dateRange",fieldComponentType:"dateRange",sortable:!1,editable:!0,filter:!1,headerComponent:du(oa)},{headerName:"Last Updated",field:"lastUpdated",sortable:!1,filter:!1,fieldComponentType:"text",headerComponent:du(oa)},{headerName:"Completed on",field:"completedOn",sortable:!1,filter:!1,fieldComponentType:"text",headerComponent:du(oa)}].map(n=>da.fromType(n.fieldComponentType,n))],Pp={WIDTH:50,HEADER_CLASS:"ag-checkbox-header"},kae=()=>({field:"__checkboxSelection",width:Pp.WIDTH,minWidth:Pp.WIDTH,maxWidth:Pp.WIDTH,pinned:"left",lockPosition:!0,suppressMovable:!0,suppressColumnsToolPanel:!0,editable:!1,sortable:!1,filter:!1,resizable:!1,headerClass:Pp.HEADER_CLASS,headerComponent:Rf(h6),cellRenderer:Iae}),h_={headerName:"",field:"options",sortable:!1,filter:!1,editable:!0,fieldComponentType:"more",pinned:"right",lockPosition:!0,suppressMovable:!0};function Oae(e,t){let n=null;return function(...i){n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,i)},t)}}const Mae=(e,t)=>{const{getCachedValue:n,setCachedValue:i}=Yu({dbName:"item_table_column_configs",storeName:"column_configs"}),s=async()=>{const l=await n(t);if(l&&typeof l=="string")try{return JSON.parse(l)}catch(u){return console.error("Failed to parse cached column config:",u),null}return null},o=fe([]),r=async l=>{const u=await s(),c=_ae(),d=kae(),h=da.fromType(h_.fieldComponentType,h_),g=((l==null?void 0:l.map(T=>({headerName:T.name,field:`metric_${T.id}`,editable:!1,sortable:!0,filter:!1,flex:1,minWidth:120,context:T,hide:!(T.is_primary||T.is_point_metric),cellClass:"ag-cell-optimized",headerComponent:Rf(oa),fieldComponentType:"metric",headerComponentParams:()=>({type:T.format_type})})))||[]).map(T=>da.fromType("metric",T)),C=[d,...c,...g,h],v=C.filter(T=>T.pinned==="left"),b=C.filter(T=>T.pinned==="right"),S=C.filter(T=>!T.pinned);if(!u||u.length===0){o.value=C;return}const D=new Map(S.map(T=>[T.field,T])),w=[];for(const T of u)if(T.field&&D.has(T.field)){const H=D.get(T.field);w.push({...H,hide:T.hide,width:T.width,pinned:T.pinned}),D.delete(T.field)}const R=Array.from(D.values()),x=[...w,...R];o.value=[...v,...x,...b]};Dt(e,l=>r(l),{immediate:!0});const a=Oae(l=>{const c=l.filter(d=>!d.pinned).map(d=>({field:d.field,hide:d.hide,width:d.width,pinned:d.pinned}));i(t,JSON.stringify(c))},500);return Dt(o,l=>{l&&l.length>0&&a(l)},{deep:!0}),{columnDefs:o}};function f_(e,t){return function(){return e.apply(t,arguments)}}const{toString:Lae}=Object.prototype,{getPrototypeOf:Cy}=Object,{iterator:Ap,toStringTag:p_}=Symbol,Ip=(e=>t=>{const n=Lae.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Fs=e=>(e=e.toLowerCase(),t=>Ip(t)===e),_p=e=>t=>typeof t===e,{isArray:hu}=Array,fu=_p("undefined");function vd(e){return e!==null&&!fu(e)&&e.constructor!==null&&!fu(e.constructor)&&wi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g_=Fs("ArrayBuffer");function Nae(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&g_(e.buffer),t}const Vae=_p("string"),wi=_p("function"),m_=_p("number"),Cd=e=>e!==null&&typeof e=="object",Bae=e=>e===!0||e===!1,kp=e=>{if(Ip(e)!=="object")return!1;const t=Cy(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(p_ in e)&&!(Ap in e)},Hae=e=>{if(!Cd(e)||vd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Gae=Fs("Date"),Wae=Fs("File"),zae=Fs("Blob"),$ae=Fs("FileList"),Uae=e=>Cd(e)&&wi(e.pipe),jae=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||wi(e.append)&&((t=Ip(e))==="formdata"||t==="object"&&wi(e.toString)&&e.toString()==="[object FormData]"))},Kae=Fs("URLSearchParams"),[qae,Yae,Zae,Jae]=["ReadableStream","Request","Response","Headers"].map(Fs),Qae=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function wd(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(vd(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 v_(e,t){if(vd(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 Aa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,C_=e=>!fu(e)&&e!==Aa;function wy(){const{caseless:e,skipUndefined:t}=C_(this)&&this||{},n={},i=(s,o)=>{const r=e&&v_(n,o)||o;kp(n[r])&&kp(s)?n[r]=wy(n[r],s):kp(s)?n[r]=wy({},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]&&wd(arguments[s],i);return n}const Xae=(e,t,n,{allOwnKeys:i}={})=>(wd(t,(s,o)=>{n&&wi(s)?e[o]=f_(s,n):e[o]=s},{allOwnKeys:i}),e),ele=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tle=(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)},nle=(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&&Cy(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ile=(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},sle=e=>{if(!e)return null;if(hu(e))return e;let t=e.length;if(!m_(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ole=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Cy(Uint8Array)),rle=(e,t)=>{const i=(e&&e[Ap]).call(e);let s;for(;(s=i.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},ale=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},lle=Fs("HTMLFormElement"),ule=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),w_=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cle=Fs("RegExp"),y_=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};wd(n,(s,o)=>{let r;(r=t(s,o,e))!==!1&&(i[o]=r||s)}),Object.defineProperties(e,i)},dle=e=>{y_(e,(t,n)=>{if(wi(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(wi(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+"'")})}})},hle=(e,t)=>{const n={},i=s=>{s.forEach(o=>{n[o]=!0})};return hu(e)?i(e):i(String(e).split(t)),n},fle=()=>{},ple=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function gle(e){return!!(e&&wi(e.append)&&e[p_]==="FormData"&&e[Ap])}const mle=e=>{const t=new Array(10),n=(i,s)=>{if(Cd(i)){if(t.indexOf(i)>=0)return;if(vd(i))return i;if(!("toJSON"in i)){t[s]=i;const o=hu(i)?[]:{};return wd(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)},vle=Fs("AsyncFunction"),Cle=e=>e&&(Cd(e)||wi(e))&&wi(e.then)&&wi(e.catch),b_=((e,t)=>e?setImmediate:t?((n,i)=>(Aa.addEventListener("message",({source:s,data:o})=>{s===Aa&&o===n&&i.length&&i.shift()()},!1),s=>{i.push(s),Aa.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",wi(Aa.postMessage)),wle=typeof queueMicrotask<"u"?queueMicrotask.bind(Aa):typeof I<"u"&&I.nextTick||b_,ce={isArray:hu,isArrayBuffer:g_,isBuffer:vd,isFormData:jae,isArrayBufferView:Nae,isString:Vae,isNumber:m_,isBoolean:Bae,isObject:Cd,isPlainObject:kp,isEmptyObject:Hae,isReadableStream:qae,isRequest:Yae,isResponse:Zae,isHeaders:Jae,isUndefined:fu,isDate:Gae,isFile:Wae,isBlob:zae,isRegExp:cle,isFunction:wi,isStream:Uae,isURLSearchParams:Kae,isTypedArray:ole,isFileList:$ae,forEach:wd,merge:wy,extend:Xae,trim:Qae,stripBOM:ele,inherits:tle,toFlatObject:nle,kindOf:Ip,kindOfTest:Fs,endsWith:ile,toArray:sle,forEachEntry:rle,matchAll:ale,isHTMLForm:lle,hasOwnProperty:w_,hasOwnProp:w_,reduceDescriptors:y_,freezeMethods:dle,toObjectSet:hle,toCamelCase:ule,noop:fle,toFiniteNumber:ple,findKey:v_,global:Aa,isContextDefined:C_,isSpecCompliantForm:gle,toJSONObject:mle,isAsyncFn:vle,isThenable:Cle,setImmediate:b_,asap:wle,isIterable:e=>e!=null&&wi(e[Ap])};function yt(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(yt,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 S_=yt.prototype,E_={};["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=>{E_[e]={value:e}}),Object.defineProperties(yt,E_),Object.defineProperty(S_,"isAxiosError",{value:!0}),yt.from=(e,t,n,i,s,o)=>{const r=Object.create(S_);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 yt.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 yle=null;function yy(e){return ce.isPlainObject(e)||ce.isArray(e)}function R_(e){return ce.endsWith(e,"[]")?e.slice(0,-2):e}function D_(e,t,n){return e?e.concat(t).map(function(s,o){return s=R_(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function ble(e){return ce.isArray(e)&&!e.some(yy)}const Sle=ce.toFlatObject(ce,{},null,function(t){return/^is[A-Z]/.test(t)});function Op(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 yt("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 b=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)&&ble(g)||(ce.isFileList(g)||ce.endsWith(C,"[]"))&&(b=ce.toArray(g)))return C=R_(C),b.forEach(function(D,w){!(ce.isUndefined(D)||D===null)&&t.append(r===!0?D_([C],w,o):r===null?C:C+"[]",u(D))}),!1}return yy(g)?!0:(t.append(D_(v,C,o),u(g)),!1)}const d=[],h=Object.assign(Sle,{defaultVisitor:c,convertValue:u,isVisitable:yy});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(b,S){(!(ce.isUndefined(b)||b===null)&&s.call(t,b,ce.isString(S)?S.trim():S,C,h))===!0&&p(b,C?C.concat(S):[S])}),d.pop()}}if(!ce.isObject(e))throw new TypeError("data must be an object");return p(e),t}function F_(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function by(e,t){this._pairs=[],e&&Op(e,this,t)}const x_=by.prototype;x_.append=function(t,n){this._pairs.push([t,n])},x_.toString=function(t){const n=t?function(i){return t.call(this,i,F_)}:F_;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Ele(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function T_(e,t,n){if(!t)return e;const i=n&&n.encode||Ele;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 by(t,n).toString(i),o){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class P_{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 A_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rle={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:by,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Sy=typeof window<"u"&&typeof document<"u",Ey=typeof navigator=="object"&&navigator||void 0,Dle=Sy&&(!Ey||["ReactNative","NativeScript","NS"].indexOf(Ey.product)<0),Fle=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xle=Sy&&window.location.href||"http://localhost",Jn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Sy,hasStandardBrowserEnv:Dle,hasStandardBrowserWebWorkerEnv:Fle,navigator:Ey,origin:xle},Symbol.toStringTag,{value:"Module"})),...Rle};function Tle(e,t){return Op(e,new Jn.classes.URLSearchParams,{visitor:function(n,i,s,o){return Jn.isNode&&ce.isBuffer(n)?(this.append(i,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Ple(e){return ce.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ale(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 I_(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]=Ale(s[r])),!a)}if(ce.isFormData(e)&&ce.isFunction(e.entries)){const n={};return ce.forEachEntry(e,(i,s)=>{t(Ple(i),s,n,0)}),n}return null}function Ile(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 yd={transitional:A_,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(I_(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 Tle(t,this.formSerializer).toString();if((a=ce.isFileList(t))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Op(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Ile(t)):t}],transformResponse:[function(t){const n=this.transitional||yd.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"?yt.from(a,yt.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:Jn.classes.FormData,Blob:Jn.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=>{yd.headers[e]={}});const _le=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"]),kle=e=>{const t={};let n,i,s;return e&&e.split(`
|
|
147
|
+
`).forEach(function(r){s=r.indexOf(":"),n=r.substring(0,s).trim().toLowerCase(),i=r.substring(s+1).trim(),!(!n||t[n]&&_le[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},__=Symbol("internals");function bd(e){return e&&String(e).trim().toLowerCase()}function Mp(e){return e===!1||e==null?e:ce.isArray(e)?e.map(Mp):String(e)}function Ole(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 Mle=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ry(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 Lle(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function Nle(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 yi=class{constructor(t){t&&this.set(t)}set(t,n,i){const s=this;function o(a,l,u){const c=bd(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]=Mp(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())&&!Mle(t))r(kle(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=bd(t),t){const i=ce.findKey(this,t);if(i){const s=this[i];if(!n)return s;if(n===!0)return Ole(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=bd(t),t){const i=ce.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||Ry(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let s=!1;function o(r){if(r=bd(r),r){const a=ce.findKey(i,r);a&&(!n||Ry(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||Ry(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]=Mp(s),delete n[o];return}const a=t?Lle(o):String(o).trim();a!==o&&delete n[o],n[a]=Mp(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(`
|
|
148
|
+
`)}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[__]=this[__]={accessors:{}}).accessors,s=this.prototype;function o(r){const a=bd(r);i[a]||(Nle(s,r),i[a]=!0)}return ce.isArray(t)?t.forEach(o):o(t),this}};yi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ce.reduceDescriptors(yi.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}}),ce.freezeMethods(yi);function Dy(e,t){const n=this||yd,i=t||n,s=yi.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 k_(e){return!!(e&&e.__CANCEL__)}function pu(e,t,n){yt.call(this,e??"canceled",yt.ERR_CANCELED,t,n),this.name="CanceledError"}ce.inherits(pu,yt,{__CANCEL__:!0});function O_(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new yt("Request failed with status code "+n.status,[yt.ERR_BAD_REQUEST,yt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Vle(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ble(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 Hle(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 Lp=(e,t,n=3)=>{let i=0;const s=Ble(50,250);return Hle(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)},M_=(e,t)=>{const n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},L_=e=>(...t)=>ce.asap(()=>e(...t)),Gle=Jn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jn.origin),Jn.navigator&&/(msie|trident)/i.test(Jn.navigator.userAgent)):()=>!0,Wle=Jn.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 zle(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function $le(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function N_(e,t,n){let i=!zle(t);return e&&(i||n==!1)?$le(e,t):t}const V_=e=>e instanceof yi?{...e}:e;function Ia(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(V_(u),V_(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 B_=e=>{const t=Ia({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:o,headers:r,auth:a}=t;if(t.headers=r=yi.from(r),t.url=T_(N_(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(Jn.hasStandardBrowserEnv||Jn.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(Jn.hasStandardBrowserEnv&&(i&&ce.isFunction(i)&&(i=i(t)),i||i!==!1&&Gle(t.url))){const l=s&&o&&Wle.read(o);l&&r.set(s,l)}return t},Ule=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,i){const s=B_(e);let o=s.data;const r=yi.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 b(){if(!v)return;const D=yi.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:D,config:e,request:v};O_(function(T){n(T),C()},function(T){i(T),C()},R),v=null}"onloadend"in v?v.onloadend=b:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(b)},v.onabort=function(){v&&(i(new yt("Request aborted",yt.ECONNABORTED,e,v)),v=null)},v.onerror=function(w){const R=w&&w.message?w.message:"Network Error",x=new yt(R,yt.ERR_NETWORK,e,v);x.event=w||null,i(x),v=null},v.ontimeout=function(){let w=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||A_;s.timeoutErrorMessage&&(w=s.timeoutErrorMessage),i(new yt(w,R.clarifyTimeoutError?yt.ETIMEDOUT:yt.ECONNABORTED,e,v)),v=null},o===void 0&&r.setContentType(null),"setRequestHeader"in v&&ce.forEach(r.toJSON(),function(w,R){v.setRequestHeader(R,w)}),ce.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),a&&a!=="json"&&(v.responseType=s.responseType),u&&([h,g]=Lp(u,!0),v.addEventListener("progress",h)),l&&v.upload&&([d,p]=Lp(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",p)),(s.cancelToken||s.signal)&&(c=D=>{v&&(i(!D||D.type?new pu(null,e,v):D),v.abort(),v=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const S=Vle(s.url);if(S&&Jn.protocols.indexOf(S)===-1){i(new yt("Unsupported protocol "+S+":",yt.ERR_BAD_REQUEST,e));return}v.send(o||null)})},jle=(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 yt?c:new pu(c instanceof Error?c.message:c))}};let r=t&&setTimeout(()=>{r=null,o(new yt(`timeout ${t} of ms exceeded`,yt.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}},Kle=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},qle=async function*(e,t){for await(const n of Yle(e))yield*Kle(n,t)},Yle=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()}},H_=(e,t,n,i)=>{const s=qle(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})},G_=64*1024,{isFunction:Np}=ce,Zle=(({Request:e,Response:t})=>({Request:e,Response:t}))(ce.global),{ReadableStream:W_,TextEncoder:z_}=ce.global,$_=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Jle=e=>{e=ce.merge.call({skipUndefined:!0},Zle,e);const{fetch:t,Request:n,Response:i}=e,s=t?Np(t):typeof fetch=="function",o=Np(n),r=Np(i);if(!s)return!1;const a=s&&Np(W_),l=s&&(typeof z_=="function"?(g=>C=>g.encode(C))(new z_):async g=>new Uint8Array(await new n(g).arrayBuffer())),u=o&&a&&$_(()=>{let g=!1;const C=new n(Jn.origin,{body:new W_,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!C}),c=r&&a&&$_(()=>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 b=C&&C[g];if(b)return b.call(C);throw new yt(`Response type '${g}' is not supported`,yt.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(Jn.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:b,signal:S,cancelToken:D,timeout:w,onDownloadProgress:R,onUploadProgress:x,responseType:T,headers:H,withCredentials:N="same-origin",fetchOptions:A}=B_(g),_=t||fetch;T=T?(T+"").toLowerCase():"text";let V=jle([S,D&&D.toAbortSignal()],w),ie=null;const me=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let Te;try{if(x&&u&&v!=="get"&&v!=="head"&&(Te=await p(H,b))!==0){let we=new n(C,{method:"POST",body:b,duplex:"half"}),Ae;if(ce.isFormData(b)&&(Ae=we.headers.get("content-type"))&&H.setContentType(Ae),we.body){const[Le,nt]=M_(Te,Lp(L_(x)));b=H_(we.body,G_,Le,nt)}}ce.isString(N)||(N=N?"include":"omit");const q=o&&"credentials"in n.prototype,z={...A,signal:V,method:v.toUpperCase(),headers:H.normalize().toJSON(),body:b,duplex:"half",credentials:q?N:void 0};ie=o&&new n(C,z);let M=await(o?_(ie,A):_(C,z));const L=c&&(T==="stream"||T==="response");if(c&&(R||L&&me)){const we={};["status","statusText","headers"].forEach(Je=>{we[Je]=M[Je]});const Ae=ce.toFiniteNumber(M.headers.get("content-length")),[Le,nt]=R&&M_(Ae,Lp(L_(R),!0))||[];M=new i(H_(M.body,G_,Le,()=>{nt&&nt(),me&&me()}),we)}T=T||"text";let ne=await d[ce.findKey(d,T)||"text"](M,g);return!L&&me&&me(),await new Promise((we,Ae)=>{O_(we,Ae,{data:ne,headers:yi.from(M.headers),status:M.status,statusText:M.statusText,config:g,request:ie})})}catch(q){throw me&&me(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new yt("Network Error",yt.ERR_NETWORK,g,ie),{cause:q.cause||q}):yt.from(q,q&&q.code,g,ie)}}},Qle=new Map,U_=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=Qle;for(;a--;)l=o[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:Jle(t)),c=u;return u};U_();const Fy={http:yle,xhr:Ule,fetch:{get:U_}};ce.forEach(Fy,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const j_=e=>`- ${e}`,Xle=e=>ce.isFunction(e)||e===null||e===!1;function eue(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,!Xle(i)&&(s=Fy[(a=String(i)).toLowerCase()],s===void 0))throw new yt(`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 :
|
|
149
|
+
`+r.map(j_).join(`
|
|
150
|
+
`):" "+j_(r[0]):"as no adapter specified";throw new yt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const K_={getAdapter:eue,adapters:Fy};function xy(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pu(null,e)}function q_(e){return xy(e),e.headers=yi.from(e.headers),e.data=Dy.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),K_.getAdapter(e.adapter||yd.adapter,e)(e).then(function(i){return xy(e),i.data=Dy.call(e,e.transformResponse,i),i.headers=yi.from(i.headers),i},function(i){return k_(i)||(xy(e),i&&i.response&&(i.response.data=Dy.call(e,e.transformResponse,i.response),i.response.headers=yi.from(i.response.headers))),Promise.reject(i)})}const Y_="1.13.2",Vp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vp[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Z_={};Vp.transitional=function(t,n,i){function s(o,r){return"[Axios v"+Y_+"] Transitional option '"+o+"'"+r+(i?". "+i:"")}return(o,r,a)=>{if(t===!1)throw new yt(s(r," has been removed"+(n?" in "+n:"")),yt.ERR_DEPRECATED);return n&&!Z_[r]&&(Z_[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}},Vp.spelling=function(t){return(n,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function tue(e,t,n){if(typeof e!="object")throw new yt("options must be an object",yt.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 yt("option "+o+" must be "+l,yt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new yt("Unknown option "+o,yt.ERR_BAD_OPTION)}}const Bp={assertOptions:tue,validators:Vp},no=Bp.validators;let _a=class{constructor(t){this.defaults=t||{},this.interceptors={request:new P_,response:new P_}}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+=`
|
|
151
|
+
`+o):i.stack=o}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ia(this.defaults,n);const{transitional:i,paramsSerializer:s,headers:o}=n;i!==void 0&&Bp.assertOptions(i,{silentJSONParsing:no.transitional(no.boolean),forcedJSONParsing:no.transitional(no.boolean),clarifyTimeoutError:no.transitional(no.boolean)},!1),s!=null&&(ce.isFunction(s)?n.paramsSerializer={serialize:s}:Bp.assertOptions(s,{encode:no.function,serialize:no.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Bp.assertOptions(n,{baseUrl:no.spelling("baseURL"),withXsrfToken:no.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=yi.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=[q_.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=q_.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=Ia(this.defaults,t);const n=N_(t.baseURL,t.url,t.allowAbsoluteUrls);return T_(n,t.params,t.paramsSerializer)}};ce.forEach(["delete","get","head","options"],function(t){_a.prototype[t]=function(n,i){return this.request(Ia(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(Ia(a||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}_a.prototype[t]=n(),_a.prototype[t+"Form"]=n(!0)});let nue=class _k{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 _k(function(s){t=s}),cancel:t}}};function iue(e){return function(n){return e.apply(null,n)}}function sue(e){return ce.isObject(e)&&e.isAxiosError===!0}const Ty={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(Ty).forEach(([e,t])=>{Ty[t]=e});function J_(e){const t=new _a(e),n=f_(_a.prototype.request,t);return ce.extend(n,_a.prototype,t,{allOwnKeys:!0}),ce.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return J_(Ia(e,s))},n}const wn=J_(yd);wn.Axios=_a,wn.CanceledError=pu,wn.CancelToken=nue,wn.isCancel=k_,wn.VERSION=Y_,wn.toFormData=Op,wn.AxiosError=yt,wn.Cancel=wn.CanceledError,wn.all=function(t){return Promise.all(t)},wn.spread=iue,wn.isAxiosError=sue,wn.mergeConfig=Ia,wn.AxiosHeaders=yi,wn.formToJSON=e=>I_(ce.isHTMLForm(e)?new FormData(e):e),wn.getAdapter=K_.getAdapter,wn.HttpStatusCode=Ty,wn.default=wn;const{Axios:sde,AxiosError:ode,CanceledError:rde,isCancel:ade,CancelToken:lde,VERSION:ude,all:cde,Cancel:dde,isAxiosError:oue,spread:hde,toFormData:fde,AxiosHeaders:pde,HttpStatusCode:gde,formToJSON:mde,getAdapter:vde,mergeConfig:Cde}=wn,rue=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},aue=6e4,lue=(()=>{const e=wn.create({timeout:aue,headers:{"Content-Type":"application/json"}});return e.interceptors.request.use(t=>{const n=rue("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 Sd 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,Sd.prototype)}}const Ed=e=>{var t,n;if(oue(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===Pl.UNAUTHORIZED||i===Pl.FORBIDDEN?l="AUTH":i===Pl.UNPROCESSABLE_ENTITY||i===Pl.BAD_REQUEST?l="VALIDATION":i>=Pl.BAD_REQUEST&&(l="CLIENT"),new Sd(o,i,r,a,l)}return e instanceof Error?new Sd(e.message,void 0,void 0,void 0,"UNKNOWN"):new Sd("An unknown error occurred",void 0,void 0,void 0,"UNKNOWN")};class uue{constructor(){this.axios=lue}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 Ed(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 Ed(o)}}async put(t="",n,i){try{const s=this.buildUrl(t);return(await this.axios.put(s,n,i)).data}catch(s){throw Ed(s)}}async patch(t="",n,i){try{const s=this.buildUrl(t);return(await this.axios.patch(s,n,i)).data}catch(s){throw Ed(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 Ed(s)}}}class cue extends uue{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 Q_ extends cue{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 o;const n=t.workspaceId,i=this.generateUrl(this.apiConfig.list_cursor.url,{workspaceId:n}),s={ws_code:n,entity_ids:((o=t.entityIds)==null?void 0:o.join(","))||"",cursor:t.cursor||void 0,per_page:t.pageSize||t.perPage||20,order_by:t.orderBy||"id-asc",offset:t.offset||void 0,name_like:t.search||t.q,include_signature:1,include:"bulk_process"};return this.post(i,{},s)}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 X_={ROWS_PER_PAGE:50,MIN_CACHE_BLOCKS:5,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},due=e=>{const t=Vi(),n=t==null?void 0:t.appContext.config.globalProperties.apiConfig,i=new Q_(n),s=lo({}),o=fe([]),r=fe(!1),a=fe(null),l=fe(null),u=fe(1),c=fe(20),{setCachedUsers:d}=_U(),h=D=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",status_eq:1,include_permission:"{include_permission}",include_permission_names:!0,q:D}),p=async(D,w)=>{var N,A;if(!D.length||!w.length)return[];const T=gH(D,500).map(async _=>{try{return(await i.getMetricValues({workspaceId:e.value.workspaceId,item_ids:_,per_page:_.length*w.length,metric_ids:w})).data.map(ie=>{const me=new Map(ie.item_metrics.map(q=>[q.metric_id,q.value])),Te=Object.fromEntries(w.map(q=>[q,me.get(q)??null]));return{item_id:ie.id,metricValues:Te}})}catch(V){return console.error("Failed to fetch a chunk of metric values:",V),[]}}),H=await Promise.all(T);return(A=(N=e.value).setMetricValues)==null||A.call(N,H.flat(),new Set(D),w),H.flat()},g=async D=>{var w,R;if(!D.length){console.warn("getAssignedUsers: Empty itemIds");return}try{const x=await i.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:D,per_page:X_.ROWS_PER_PAGE}),T=x.data.flatMap(A=>A.assignees);d(T);const H=new Map(x.data.map(A=>[A.id,A.assignees])),N=D.map(A=>({id:A,assignees:H.get(A)||[]}));(R=(w=e.value).setItemAssignees)==null||R.call(w,N)}catch(x){console.error("Failed to fetch assigned users:",x)}};return{items:o,loading:r,error:a,pagination:l,currentPage:u,pageSize:c,cusorMap:s,fetchItems:async(D={})=>{const{cursor:w,offset:R,size:x,searchQuery:T}=D;let H=[];r.value=!0,a.value=null;try{const N=await i.getAllItem_cursor({cursor:w||void 0,offset:R||void 0,pageSize:x||c.value,...h(T)});return o.value=N.data,l.value=N.meta,u.value=N.meta.current_page||0,H=N.data.map(A=>A.id),N}catch(N){throw a.value=N,console.error("Failed to fetch items (cursor):",N),N}finally{r.value=!1,g(H),e.value.metricIds.length&&p(H,e.value.metricIds)}},getAssignableUsers:async D=>{try{return await i.getAssignableUsers({workspaceId:e.value.workspaceId,itemId:D,perPage:X_.ROWS_PER_PAGE})}catch(w){throw console.error("Failed to fetch assignable users:",w),w}},getAssignableStatus:async D=>{try{return await i.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:D})}catch(w){throw console.error("Failed to fetch assignable status:",w),w}},getMetricList:async D=>{try{return await i.getMetricList({workspaceId:e.value.workspaceId,entityId:D})}catch(w){throw console.error("Failed to fetch metric list:",w),w}},getMetricValues:p,getAssignedUsers:g}};function hue(){const e=lo({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 fue(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=p4(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 pue(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()});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 gue(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:i,gridApi:s,columnDefs:o,fetcher:r}=e,a=fe(!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:b}=g;if(C==null||C(),!r)return console.error("Fetcher function is undefined"),null;const S=pue(r,e.perPage,()=>i.value);return b==null||b("datasource",S),v==null||v("selectionChanged",()=>{t.value=g.getSelectedRows()}),v==null||v("columnMoved",()=>{var x;const D=(x=g.getColumnState())==null?void 0:x.map(T=>T.colId),w=o.value.reduce((T,H)=>(H.field&&T&&(T[H.field]=H),T),{}),R=D.map(T=>w[T]).filter(Boolean);o.value=R}),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=ic(g=>{c(g)},Fl);return{isLoading:a,toggleSidebar:l,onGridReady:u,onSearch:p,handleUnSelect:d,updateTableConfig:h}}const mue={class:"table-footer"},vue={class:"footer-stat"},Cue={class:"footer-stat"},wue={key:0,class:"new-row"},yue=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
152
|
+
<rect width="32" height="32" rx="4" fill="#CCF3EB"/>
|
|
153
|
+
<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"/>
|
|
154
|
+
</svg>
|
|
155
|
+
`,bue=St(ct({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const{addNotification:n}=WT(),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:!0},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",iconName:"FilePen",type:"icon",disabled:!0}],o=e;da.initialize({wrapVueCellRenderer:Rf,wrapVueCellEditor:UT});const r=fe(null),a=fe([]),l=fe(0),u=fe(!1),c=fe(""),d=fe(),h=fe(""),p=fe(!1),g=lo({totalItems:0}),C=fe(new Set),v=fe(new Map),{apiServices:b}=Ns(!1,o),{columnDefs:S}=Mae(d,o.entityId),{setItemAssignees:D,setMetricValues:w}=fue(r),{newItemData:R,validateNewItem:x,openNewItemForm:T,closeNewItemForm:H}=hue(),N=W(()=>c.value.length>0),A=W(()=>!1),_=W(lf),V=W(()=>S.value.filter(se=>{var j;return((j=se.field)==null?void 0:j.startsWith("metric_"))&&!se.hide}).map(se=>{var j;return((j=se.field)==null?void 0:j.replace("metric_",""))||""}));Wr("timezone",_);const ie=W(()=>({autoFetch:!1,workspaceId:o.workspaceId,entityId:o.entityId,metricIds:V.value,setItemAssignees:D,setMetricValues:w})),{fetchItems:me,getMetricList:Te,cusorMap:q,getMetricValues:z}=due(ie),M=(se,j,re)=>se===1?j:re,L=W(()=>{const se=M(g.totalItems,"scene","scenes"),j=M(l.value,"scene","scenes");return{visible:`${l.value} ${se}`,total:`${g.totalItems} ${j}`}}),ne=se=>{const j=se.data.map(re=>DF(re,sa,_.value));return j.forEach(re=>{C.value.add(String(re.id)),v.value.set(String(re.id),{})}),j},we=(se,j)=>{var re,Fe,De;g.totalItems=se.meta.total??0,(re=se.meta.next)!=null&&re.cursor&&(q[j+1]=se.meta.next.cursor),h.value=se.meta["X-Tsr-content-sha256"]||"",se.meta.total===0?(Fe=r.value)==null||Fe.showNoRowsOverlay():(De=r.value)==null||De.hideOverlay()},Ae=async({page:se,pageSize:j,filterText:re})=>{const Fe=q[se],De=!Fe&&se>1?(se-1)*j:void 0;try{const be=await me({cursor:Fe,size:j,searchQuery:re,offset:De});if(!be)return{rows:[],total:0};const Se=ne(be);return we(be,se),{rows:Se,total:g.totalItems}}catch(be){return console.error("Failed to fetch items:",be),{rows:[],total:0}}},{isLoading:Le,toggleSidebar:nt,onGridReady:Je,handleUnSelect:ht,onSearch:Ht}=gue({selectRowData:fe([]),isSidebarOpen:u,quickFilterText:c,gridApi:r,columnDefs:S,perPage:i.ROWS_PER_PAGE,fetcher:Ae}),Jt=W(()=>({blockLoadDebounceMillis:Fl,columnDefs:S.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:Ke,noRowsOverlayComponent:Rf(d8),noRowsOverlayComponentParams:()=>({isSearching:N.value,isFiltering:A.value}),defaultColDef:{editable:!0,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:se=>se.data.id,getRowClass:se=>{if(!se.data)return[];const j=["row-highlight"];return se.data.id||j.push("row-inactive"),se.data.isDeleted&&j.push("row-deleted"),se.data.isArchived&&j.push("row-archived"),j},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:o.workspaceId,entityId:o.entityId,apiServices:b.value}}));W(()=>Math.min(l.value,g.totalItems));function Ke(){if(!r.value)return;const se=r.value.getCacheBlockState();if(!se)return;const j=Object.values(se).reduce((re,Fe)=>(Fe==null?void 0:Fe.pageStatus)==="loaded"?re+(Fe.endRow-Fe.startRow):re,0);l.value=Math.min(j,g.totalItems)}const yn=()=>{r.value&&(h.value="",C.value.clear(),Object.keys(q).forEach(se=>delete q[Number(se)]),r.value.refreshInfiniteCache())},Ut=fe();function xt(se){se==="new_scene"&&(T(),_n(()=>{console.log("Focusing new scene input:",Ut.value),Ut.value&&Ut.value.focus()}))}const O=se=>{const j=Je(se);return j&&(j.addEventListener("modelUpdated",Ke),j.addEventListener("bodyScroll",()=>j.stopEditing())),j==null||j.sizeColumnsToFit(),j},$=(se,j)=>{if(!r.value)return;const re=r.value.getRowNode(se);re?r.value.ensureIndexVisible(Number(re.rowIndex),"middle"):r.value.ensureIndexVisible(g.totalItems-1,"bottom")},ue=async se=>{let j;if(!(!b.value||!se.trim())){H(),Le.value=!0,console.trace("Creating new scene:",se);try{j=await b.value.createNewScene({workspaceId:o.workspaceId,entityId:o.entityId,name:se}),yn()}catch(re){console.error("Error creating new scene:",re)}finally{Le.value=!1,j!=null&&j.id&&n({id:String(j==null?void 0:j.id),message:`${se} created successfully`,actions:[{label:"Focus",variant:"secondary",action:()=>{$(String(j==null?void 0:j.id))}},{label:"Scene Hub",variant:"primary",action:()=>{const re=Ms({type:"scene_hub",config:{ws_code:o.workspaceId,baseDomain:sessionStorage.getItem("URL_BASE")||"app.arbocollab.com",scene_id:String(j==null?void 0:j.id)}}).url;window.open(re,"_blank")},btnIcon:"CustomSceneHub"}],icon:yue,type:"interactive"})}}};return Dt(()=>[o.entityId,o.workspaceId],async([se,j])=>{if(!(!se||!j)){Le.value=!0;try{const re=await Te(se);d.value=re.data}catch(re){console.error("Failed to initialize metric list:",re),d.value=[]}finally{Le.value=!1}}},{immediate:!0,deep:!0}),Dt(V,(se,j)=>{const re=se.filter(Fe=>!(j!=null&&j.includes(Fe)));re.length>0&&z(Array.from(C.value),re).then(Fe=>{w(Fe,C.value,re)})},{immediate:!0,deep:!0}),Dt(h,(se,j)=>{p.value=!!(j&&se&&j!==se)}),t({refreshTable:yn}),(se,j)=>(X(),tt(le(Y3),{"is-sidebar-open":u.value,onCloseSidebar:le(nt),onSidebarClear:le(nt),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:le(nt)},{"header-left":ke(()=>[j[8]||(j[8]=Pe("h1",{class:"table-title"},"Scenes",-1)),Ee(le(Mv),{label:"New",variant:["primary"],options:s,onSelect:xt,onHandleClick:j[0]||(j[0]=re=>xt("new_scene"))})]),"header-actions":ke(()=>[Ee(le(_v),{modelValue:c.value,"onUpdate:modelValue":j[1]||(j[1]=re=>c.value=re),onSearch:le(Ht),class:"item-search-box",onClear:j[2]||(j[2]=re=>le(Ht)(""))},null,8,["modelValue","onSearch"]),Ee(le(lF),{status:le(Le)?"busy":"online",size:10,"status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":p.value},{default:ke(()=>[Ee(le(gt),{variant:"secondary",onClick:yn},{prefix:ke(()=>[Ee(le(ot),{src:"ArrowsRotate",size:"14"})]),default:ke(()=>[j[9]||(j[9]=wt(" Refresh ",-1))]),_:1})]),_:1},8,["status","show-badge"]),Ee(le(a8),{modelValue:le(S),"onUpdate:modelValue":j[3]||(j[3]=re=>Wt(S)?S.value=re:null)},null,8,["modelValue"])]),grid:ke(({availableHeight:re})=>[Ee(le(Aae),gn({ref:"agGrid"},Jt.value,{height:re+"px",onOnGridReady:O,onSelectionChanged:j[4]||(j[4]=Fe=>a.value=Fe.api.getSelectedRows().map(De=>De.id))}),null,16,["height"])]),footer:ke(()=>[Pe("div",mue,[Pe("div",vue,[Ee(le(ot),{src:"Eye",size:"14"}),Pe("span",null,[j[10]||(j[10]=wt(" Visibles: ",-1)),Pe("b",null,mt(L.value.visible),1)])]),Pe("div",Cue,[Ee(le(ot),{src:"List",size:"14"}),Pe("span",null,[j[11]||(j[11]=wt(" Total: ",-1)),Pe("b",null,mt(L.value.total),1)])])])]),"new-row":ke(()=>[le(R).isCreating?(X(),ye("div",wue,[Ee(le(N3),{ref_key:"newSceneInputRef",ref:Ut,modelValue:le(R).name,"onUpdate:modelValue":j[5]||(j[5]=re=>le(R).name=re),onChange:le(x),onEnter:j[6]||(j[6]=re=>ue(le(R).name)),placeholder:"Enter name",isFocused:!0},{clear:ke(()=>[le(R).name.length==0?(X(),tt(le(ot),{key:0,src:"Pen",color:"#f7941d",size:14})):at("",!0)]),_:1},8,["modelValue","onChange"]),Ee(le(gt),{onClick:j[7]||(j[7]=re=>ue(le(R).name)),disabled:!!le(R).error||!le(R).name.trim()},{prefix:ke(()=>[Ee(le(ot),{src:"Plus",size:"14"})]),default:ke(()=>[j[12]||(j[12]=wt(" Create ",-1))]),_:1},8,["disabled"]),Ee(le(gt),{variant:["secondary","icon"],onClick:le(H)},{prefix:ke(()=>[Ee(le(ot),{src:"XMarkSolid",size:"14"})]),_:1},8,["onClick"])])):at("",!0)]),"bulk-update-actions":ke(()=>{var re;return[!u.value&&a.value.length>0?(X(),tt(le(E3),{key:0,selectRowData:((re=r.value)==null?void 0:re.getSelectedRows())||[],"workspace-id":o.workspaceId,"entity-id":o.entityId,"grid-api":r.value,onUnselect:le(ht)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect"])):at("",!0)]}),snackbar:ke(()=>[Ee(le(Kj))]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__scopeId","data-v-d33f0099"]]),Sue={class:"dashboard-plugin-wrapper"},Eue={key:0},Rue=St(ct({__name:"app",setup(e){const t=W(()=>n.id.length===0||n.workspaceId.length===0),n=lo({id:"",workspaceId:"",apiConfig:{}});Mg(()=>{try{const o=Vi();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 Q_(n.apiConfig)}catch(o){console.error("Error getting current instance:",o)}});const i=W(()=>n.id),s=W(()=>n.workspaceId);return Wr("workspaceId",s),Wr("entityId",i),(o,r)=>(X(),ye("div",Sue,[t.value?(X(),ye("span",Eue," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):i.value?(X(),tt(le(bue),{key:1,entityId:i.value,workspaceId:s.value},null,8,["entityId","workspaceId"])):at("",!0)]))}}),[["__scopeId","data-v-57de0d9d"]]),Due="0.0.1-alpha.1",Py=async(e={},t={})=>{const n=T0(Rue);console.log("Initializing Dashboard with version:",Due),console.log("Initializing Dashboard with config:",e);const i=Vj();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=Py),Qt.default=Py,Qt.initDashboard=Py,Object.defineProperties(Qt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|