@turquoisehealth/pit-viper 2.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,90 @@
1
+ (function(){"use strict";/**
2
+ * @vue/shared v3.5.13
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **//*! #__NO_SIDE_EFFECTS__ */function Ys(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const be=process.env.NODE_ENV!=="production"?Object.freeze({}):{},mi=process.env.NODE_ENV!=="production"?Object.freeze([]):[],Je=()=>{},av=()=>!1,sn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),mr=e=>e.startsWith("onUpdate:"),He=Object.assign,da=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},dv=Object.prototype.hasOwnProperty,Fe=(e,t)=>dv.call(e,t),Y=Array.isArray,Go=e=>on(e)==="[object Map]",Cr=e=>on(e)==="[object Set]",pu=e=>on(e)==="[object Date]",Q=e=>typeof e=="function",Ve=e=>typeof e=="string",ls=e=>typeof e=="symbol",Me=e=>e!==null&&typeof e=="object",ca=e=>(Me(e)||Q(e))&&Q(e.then)&&Q(e.catch),gu=Object.prototype.toString,on=e=>gu.call(e),ua=e=>on(e).slice(8,-1),vr=e=>on(e)==="[object Object]",ha=e=>Ve(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,nn=Ys(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cv=Ys("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),wr=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},uv=/-(\w)/g,mt=wr(e=>e.replace(uv,(t,s)=>s?s.toUpperCase():"")),hv=/\B([A-Z])/g,Mt=wr(e=>e.replace(hv,"-$1").toLowerCase()),yr=wr(e=>e.charAt(0).toUpperCase()+e.slice(1)),No=wr(e=>e?`on${yr(e)}`:""),At=(e,t)=>!Object.is(e,t),Ci=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},br=(e,t,s,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:s})},pv=e=>{const t=parseFloat(e);return isNaN(t)?e:t},fu=e=>{const t=Ve(e)?Number(e):NaN;return isNaN(t)?e:t};let mu;const rn=()=>mu||(mu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function _o(e){if(Y(e)){const t={};for(let s=0;s<e.length;s++){const o=e[s],i=Ve(o)?Cv(o):_o(o);if(i)for(const n in i)t[n]=i[n]}return t}else if(Ve(e)||Me(e))return e}const gv=/;(?![^(]*\))/g,fv=/:([^]+)/,mv=/\/\*[^]*?\*\//g;function Cv(e){const t={};return e.replace(mv,"").split(gv).forEach(s=>{if(s){const o=s.split(fv);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function as(e){let t="";if(Ve(e))t=e;else if(Y(e))for(let s=0;s<e.length;s++){const o=as(e[s]);o&&(t+=o+" ")}else if(Me(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const vv="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",wv="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",yv="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",bv=Ys(vv),Sv=Ys(wv),Rv=Ys(yv),xv=Ys("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Cu(e){return!!e||e===""}function Fv(e,t){if(e.length!==t.length)return!1;let s=!0;for(let o=0;s&&o<e.length;o++)s=Sr(e[o],t[o]);return s}function Sr(e,t){if(e===t)return!0;let s=pu(e),o=pu(t);if(s||o)return s&&o?e.getTime()===t.getTime():!1;if(s=ls(e),o=ls(t),s||o)return e===t;if(s=Y(e),o=Y(t),s||o)return s&&o?Fv(e,t):!1;if(s=Me(e),o=Me(t),s||o){if(!s||!o)return!1;const i=Object.keys(e).length,n=Object.keys(t).length;if(i!==n)return!1;for(const r in e){const l=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(l&&!a||!l&&a||!Sr(e[r],t[r]))return!1}}return String(e)===String(t)}function vu(e,t){return e.findIndex(s=>Sr(s,t))}const wu=e=>!!(e&&e.__v_isRef===!0),qe=e=>Ve(e)?e:e==null?"":Y(e)||Me(e)&&(e.toString===gu||!Q(e.toString))?wu(e)?qe(e.value):JSON.stringify(e,yu,2):String(e),yu=(e,t)=>wu(t)?yu(e,t.value):Go(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[o,i],n)=>(s[pa(o,n)+" =>"]=i,s),{})}:Cr(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>pa(s))}:ls(t)?pa(t):Me(t)&&!Y(t)&&!vr(t)?String(t):t,pa=(e,t="")=>{var s;return ls(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
6
+ * @vue/reactivity v3.5.13
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/function Zt(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let Ct;class Dv{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ct,!t&&Ct&&(this.index=(Ct.scopes||(Ct.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Ct;try{return Ct=this,t()}finally{Ct=s}}else process.env.NODE_ENV!=="production"&&Zt("cannot run an inactive effect scope.")}on(){Ct=this}off(){Ct=this.parent}stop(t){if(this._active){this._active=!1;let s,o;for(s=0,o=this.effects.length;s<o;s++)this.effects[s].stop();for(this.effects.length=0,s=0,o=this.cleanups.length;s<o;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,o=this.scopes.length;s<o;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function bu(){return Ct}function Ev(e,t=!1){Ct?Ct.cleanups.push(e):process.env.NODE_ENV!=="production"&&!t&&Zt("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Ie;const ga=new WeakSet;class Su{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,Ct&&Ct.active&&Ct.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ga.has(this)&&(ga.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||xu(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Au(this),Fu(this);const t=Ie,s=ds;Ie=this,ds=!0;try{return this.fn()}finally{process.env.NODE_ENV!=="production"&&Ie!==this&&Zt("Active effect was not restored correctly - this is likely a Vue internal bug."),Du(this),Ie=t,ds=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)va(t);this.deps=this.depsTail=void 0,Au(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ga.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ca(this)&&this.run()}get dirty(){return Ca(this)}}let Ru=0,ln,an;function xu(e,t=!1){if(e.flags|=8,t){e.next=an,an=e;return}e.next=ln,ln=e}function fa(){Ru++}function ma(){if(--Ru>0)return;if(an){let t=an;for(an=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;ln;){let t=ln;for(ln=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=s}}if(e)throw e}function Fu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Du(e){let t,s=e.depsTail,o=s;for(;o;){const i=o.prevDep;o.version===-1?(o===s&&(s=i),va(o),Mv(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=s}function Ca(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Eu(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Eu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===dn))return;e.globalVersion=dn;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Ca(e)){e.flags&=-3;return}const s=Ie,o=ds;Ie=e,ds=!0;try{Fu(e);const i=e.fn(e._value);(t.version===0||At(i,e._value))&&(e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ie=s,ds=o,Du(e),e.flags&=-3}}function va(e,t=!1){const{dep:s,prevSub:o,nextSub:i}=e;if(o&&(o.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=o,e.nextSub=void 0),process.env.NODE_ENV!=="production"&&s.subsHead===e&&(s.subsHead=i),s.subs===e&&(s.subs=o,!o&&s.computed)){s.computed.flags&=-5;for(let n=s.computed.deps;n;n=n.nextDep)va(n,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Mv(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let ds=!0;const Mu=[];function qs(){Mu.push(ds),ds=!1}function Xs(){const e=Mu.pop();ds=e===void 0?!0:e}function Au(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=Ie;Ie=void 0;try{t()}finally{Ie=s}}}let dn=0;class Av{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Rr{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,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){if(!Ie||!ds||Ie===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Ie)s=this.activeLink=new Av(Ie,this),Ie.deps?(s.prevDep=Ie.depsTail,Ie.depsTail.nextDep=s,Ie.depsTail=s):Ie.deps=Ie.depsTail=s,Pu(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const o=s.nextDep;o.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=o),s.prevDep=Ie.depsTail,s.nextDep=void 0,Ie.depsTail.nextDep=s,Ie.depsTail=s,Ie.deps===s&&(Ie.deps=o)}return process.env.NODE_ENV!=="production"&&Ie.onTrack&&Ie.onTrack(He({effect:Ie},t)),s}trigger(t){this.version++,dn++,this.notify(t)}notify(t){fa();try{if(process.env.NODE_ENV!=="production")for(let s=this.subsHead;s;s=s.nextSub)s.sub.onTrigger&&!(s.sub.flags&8)&&s.sub.onTrigger(He({effect:s.sub},t));for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{ma()}}}function Pu(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)Pu(o)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),process.env.NODE_ENV!=="production"&&e.dep.subsHead===void 0&&(e.dep.subsHead=e),e.dep.subs=e}}const xr=new WeakMap,Bo=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),wa=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),cn=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function et(e,t,s){if(ds&&Ie){let o=xr.get(e);o||xr.set(e,o=new Map);let i=o.get(s);i||(o.set(s,i=new Rr),i.map=o,i.key=s),process.env.NODE_ENV!=="production"?i.track({target:e,type:t,key:s}):i.track()}}function xs(e,t,s,o,i,n){const r=xr.get(e);if(!r){dn++;return}const l=a=>{a&&(process.env.NODE_ENV!=="production"?a.trigger({target:e,type:t,key:s,newValue:o,oldValue:i,oldTarget:n}):a.trigger())};if(fa(),t==="clear")r.forEach(l);else{const a=Y(e),d=a&&ha(s);if(a&&s==="length"){const c=Number(o);r.forEach((u,h)=>{(h==="length"||h===cn||!ls(h)&&h>=c)&&l(u)})}else switch((s!==void 0||r.has(void 0))&&l(r.get(s)),d&&l(r.get(cn)),t){case"add":a?d&&l(r.get("length")):(l(r.get(Bo)),Go(e)&&l(r.get(wa)));break;case"delete":a||(l(r.get(Bo)),Go(e)&&l(r.get(wa)));break;case"set":Go(e)&&l(r.get(Bo));break}}ma()}function Pv(e,t){const s=xr.get(e);return s&&s.get(t)}function vi(e){const t=ce(e);return t===e?t:(et(t,"iterate",cn),vt(e)?t:t.map(ut))}function Fr(e){return et(e=ce(e),"iterate",cn),e}const Iv={__proto__:null,[Symbol.iterator](){return ya(this,Symbol.iterator,ut)},concat(...e){return vi(this).concat(...e.map(t=>Y(t)?vi(t):t))},entries(){return ya(this,"entries",e=>(e[1]=ut(e[1]),e))},every(e,t){return Qs(this,"every",e,t,void 0,arguments)},filter(e,t){return Qs(this,"filter",e,t,s=>s.map(ut),arguments)},find(e,t){return Qs(this,"find",e,t,ut,arguments)},findIndex(e,t){return Qs(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Qs(this,"findLast",e,t,ut,arguments)},findLastIndex(e,t){return Qs(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Qs(this,"forEach",e,t,void 0,arguments)},includes(...e){return ba(this,"includes",e)},indexOf(...e){return ba(this,"indexOf",e)},join(e){return vi(this).join(e)},lastIndexOf(...e){return ba(this,"lastIndexOf",e)},map(e,t){return Qs(this,"map",e,t,void 0,arguments)},pop(){return un(this,"pop")},push(...e){return un(this,"push",e)},reduce(e,...t){return Iu(this,"reduce",e,t)},reduceRight(e,...t){return Iu(this,"reduceRight",e,t)},shift(){return un(this,"shift")},some(e,t){return Qs(this,"some",e,t,void 0,arguments)},splice(...e){return un(this,"splice",e)},toReversed(){return vi(this).toReversed()},toSorted(e){return vi(this).toSorted(e)},toSpliced(...e){return vi(this).toSpliced(...e)},unshift(...e){return un(this,"unshift",e)},values(){return ya(this,"values",ut)}};function ya(e,t,s){const o=Fr(e),i=o[t]();return o!==e&&!vt(e)&&(i._next=i.next,i.next=()=>{const n=i._next();return n.value&&(n.value=s(n.value)),n}),i}const Tv=Array.prototype;function Qs(e,t,s,o,i,n){const r=Fr(e),l=r!==e&&!vt(e),a=r[t];if(a!==Tv[t]){const u=a.apply(e,n);return l?ut(u):u}let d=s;r!==e&&(l?d=function(u,h){return s.call(this,ut(u),h,e)}:s.length>2&&(d=function(u,h){return s.call(this,u,h,e)}));const c=a.call(r,d,o);return l&&i?i(c):c}function Iu(e,t,s,o){const i=Fr(e);let n=s;return i!==e&&(vt(e)?s.length>3&&(n=function(r,l,a){return s.call(this,r,l,a,e)}):n=function(r,l,a){return s.call(this,r,ut(l),a,e)}),i[t](n,...o)}function ba(e,t,s){const o=ce(e);et(o,"iterate",cn);const i=o[t](...s);return(i===-1||i===!1)&&wi(s[0])?(s[0]=ce(s[0]),o[t](...s)):i}function un(e,t,s=[]){qs(),fa();const o=ce(e)[t].apply(e,s);return ma(),Xs(),o}const Lv=Ys("__proto__,__v_isRef,__isVue"),Tu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ls));function kv(e){ls(e)||(e=String(e));const t=ce(this);return et(t,"has",e),t.hasOwnProperty(e)}class Lu{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,o){if(s==="__v_skip")return t.__v_skip;const i=this._isReadonly,n=this._isShallow;if(s==="__v_isReactive")return!i;if(s==="__v_isReadonly")return i;if(s==="__v_isShallow")return n;if(s==="__v_raw")return o===(i?n?Hu:Bu:n?_u:Nu).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const r=Y(t);if(!i){let a;if(r&&(a=Iv[s]))return a;if(s==="hasOwnProperty")return kv}const l=Reflect.get(t,s,We(t)?t:o);return(ls(s)?Tu.has(s):Lv(s))||(i||et(t,"get",s),n)?l:We(l)?r&&ha(s)?l:l.value:Me(l)?i?Ar(l):Ra(l):l}}class ku extends Lu{constructor(t=!1){super(!1,t)}set(t,s,o,i){let n=t[s];if(!this._isShallow){const a=Zs(n);if(!vt(o)&&!Zs(o)&&(n=ce(n),o=ce(o)),!Y(t)&&We(n)&&!We(o))return a?!1:(n.value=o,!0)}const r=Y(t)&&ha(s)?Number(s)<t.length:Fe(t,s),l=Reflect.set(t,s,o,We(t)?t:i);return t===ce(i)&&(r?At(o,n)&&xs(t,"set",s,o,n):xs(t,"add",s,o)),l}deleteProperty(t,s){const o=Fe(t,s),i=t[s],n=Reflect.deleteProperty(t,s);return n&&o&&xs(t,"delete",s,void 0,i),n}has(t,s){const o=Reflect.has(t,s);return(!ls(s)||!Tu.has(s))&&et(t,"has",s),o}ownKeys(t){return et(t,"iterate",Y(t)?"length":Bo),Reflect.ownKeys(t)}}class Ou extends Lu{constructor(t=!1){super(!0,t)}set(t,s){return process.env.NODE_ENV!=="production"&&Zt(`Set operation on key "${String(s)}" failed: target is readonly.`,t),!0}deleteProperty(t,s){return process.env.NODE_ENV!=="production"&&Zt(`Delete operation on key "${String(s)}" failed: target is readonly.`,t),!0}}const Ov=new ku,Gv=new Ou,Nv=new ku(!0),_v=new Ou(!0),Sa=e=>e,Dr=e=>Reflect.getPrototypeOf(e);function Bv(e,t,s){return function(...o){const i=this.__v_raw,n=ce(i),r=Go(n),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,d=i[e](...o),c=s?Sa:t?xa:ut;return!t&&et(n,"iterate",a?wa:Bo),{next(){const{value:u,done:h}=d.next();return h?{value:u,done:h}:{value:l?[c(u[0]),c(u[1])]:c(u),done:h}},[Symbol.iterator](){return this}}}}function Er(e){return function(...t){if(process.env.NODE_ENV!=="production"){const s=t[0]?`on key "${t[0]}" `:"";Zt(`${yr(e)} operation ${s}failed: target is readonly.`,ce(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Hv(e,t){const s={get(i){const n=this.__v_raw,r=ce(n),l=ce(i);e||(At(i,l)&&et(r,"get",i),et(r,"get",l));const{has:a}=Dr(r),d=t?Sa:e?xa:ut;if(a.call(r,i))return d(n.get(i));if(a.call(r,l))return d(n.get(l));n!==r&&n.get(i)},get size(){const i=this.__v_raw;return!e&&et(ce(i),"iterate",Bo),Reflect.get(i,"size",i)},has(i){const n=this.__v_raw,r=ce(n),l=ce(i);return e||(At(i,l)&&et(r,"has",i),et(r,"has",l)),i===l?n.has(i):n.has(i)||n.has(l)},forEach(i,n){const r=this,l=r.__v_raw,a=ce(l),d=t?Sa:e?xa:ut;return!e&&et(a,"iterate",Bo),l.forEach((c,u)=>i.call(n,d(c),d(u),r))}};return He(s,e?{add:Er("add"),set:Er("set"),delete:Er("delete"),clear:Er("clear")}:{add(i){!t&&!vt(i)&&!Zs(i)&&(i=ce(i));const n=ce(this);return Dr(n).has.call(n,i)||(n.add(i),xs(n,"add",i,i)),this},set(i,n){!t&&!vt(n)&&!Zs(n)&&(n=ce(n));const r=ce(this),{has:l,get:a}=Dr(r);let d=l.call(r,i);d?process.env.NODE_ENV!=="production"&&Gu(r,l,i):(i=ce(i),d=l.call(r,i));const c=a.call(r,i);return r.set(i,n),d?At(n,c)&&xs(r,"set",i,n,c):xs(r,"add",i,n),this},delete(i){const n=ce(this),{has:r,get:l}=Dr(n);let a=r.call(n,i);a?process.env.NODE_ENV!=="production"&&Gu(n,r,i):(i=ce(i),a=r.call(n,i));const d=l?l.call(n,i):void 0,c=n.delete(i);return a&&xs(n,"delete",i,void 0,d),c},clear(){const i=ce(this),n=i.size!==0,r=process.env.NODE_ENV!=="production"?Go(i)?new Map(i):new Set(i):void 0,l=i.clear();return n&&xs(i,"clear",void 0,void 0,r),l}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=Bv(i,e,t)}),s}function Mr(e,t){const s=Hv(e,t);return(o,i,n)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(Fe(s,i)&&i in o?s:o,i,n)}const Vv={get:Mr(!1,!1)},Wv={get:Mr(!1,!0)},zv={get:Mr(!0,!1)},Uv={get:Mr(!0,!0)};function Gu(e,t,s){const o=ce(s);if(o!==s&&t.call(e,o)){const i=ua(e);Zt(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="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 Nu=new WeakMap,_u=new WeakMap,Bu=new WeakMap,Hu=new WeakMap;function $v(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function jv(e){return e.__v_skip||!Object.isExtensible(e)?0:$v(ua(e))}function Ra(e){return Zs(e)?e:Pr(e,!1,Ov,Vv,Nu)}function Kv(e){return Pr(e,!1,Nv,Wv,_u)}function Ar(e){return Pr(e,!0,Gv,zv,Bu)}function Fs(e){return Pr(e,!0,_v,Uv,Hu)}function Pr(e,t,s,o,i){if(!Me(e))return process.env.NODE_ENV!=="production"&&Zt(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const n=i.get(e);if(n)return n;const r=jv(e);if(r===0)return e;const l=new Proxy(e,r===2?o:s);return i.set(e,l),l}function fo(e){return Zs(e)?fo(e.__v_raw):!!(e&&e.__v_isReactive)}function Zs(e){return!!(e&&e.__v_isReadonly)}function vt(e){return!!(e&&e.__v_isShallow)}function wi(e){return e?!!e.__v_raw:!1}function ce(e){const t=e&&e.__v_raw;return t?ce(t):e}function Vu(e){return!Fe(e,"__v_skip")&&Object.isExtensible(e)&&br(e,"__v_skip",!0),e}const ut=e=>Me(e)?Ra(e):e,xa=e=>Me(e)?Ar(e):e;function We(e){return e?e.__v_isRef===!0:!1}function me(e){return Wu(e,!1)}function hn(e){return Wu(e,!0)}function Wu(e,t){return We(e)?e:new Yv(e,t)}class Yv{constructor(t,s){this.dep=new Rr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:ce(t),this._value=s?t:ut(t),this.__v_isShallow=s}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const s=this._rawValue,o=this.__v_isShallow||vt(t)||Zs(t);t=o?t:ce(t),At(t,s)&&(this._rawValue=t,this._value=o?t:ut(t),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:s}):this.dep.trigger())}}function Ae(e){return We(e)?e.value:e}function Wt(e){return Q(e)?e():Ae(e)}const qv={get:(e,t,s)=>t==="__v_raw"?e:Ae(Reflect.get(e,t,s)),set:(e,t,s,o)=>{const i=e[t];return We(i)&&!We(s)?(i.value=s,!0):Reflect.set(e,t,s,o)}};function zu(e){return fo(e)?e:new Proxy(e,qv)}class Xv{constructor(t){this.__v_isRef=!0,this._value=void 0;const s=this.dep=new Rr,{get:o,set:i}=t(s.track.bind(s),s.trigger.bind(s));this._get=o,this._set=i}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Uu(e){return new Xv(e)}function Qv(e){process.env.NODE_ENV!=="production"&&!wi(e)&&Zt("toRefs() expects a reactive object but received a plain one.");const t=Y(e)?new Array(e.length):{};for(const s in e)t[s]=$u(e,s);return t}class Zv{constructor(t,s,o){this._object=t,this._key=s,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Pv(ce(this._object),this._key)}}class Jv{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 ew(e,t,s){return We(e)?e:Q(e)?new Jv(e):Me(e)&&arguments.length>1?$u(e,t,s):me(e)}function $u(e,t,s){const o=e[t];return We(o)?o:new Zv(e,t,s)}class tw{constructor(t,s,o){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Rr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=dn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Ie!==this)return xu(this,!0),!0;process.env.NODE_ENV}get value(){const t=process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return Eu(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter?this.setter(t):process.env.NODE_ENV!=="production"&&Zt("Write operation failed: computed value is readonly")}}function sw(e,t,s=!1){let o,i;Q(e)?o=e:(o=e.get,i=e.set);const n=new tw(o,i,s);return process.env.NODE_ENV,n}const Ir={},Tr=new WeakMap;let Ho;function ow(e,t=!1,s=Ho){if(s){let o=Tr.get(s);o||Tr.set(s,o=[]),o.push(e)}else process.env.NODE_ENV!=="production"&&!t&&Zt("onWatcherCleanup() was called when there was no active watcher to associate with.")}function iw(e,t,s=be){const{immediate:o,deep:i,once:n,scheduler:r,augmentJob:l,call:a}=s,d=b=>{(s.onWarn||Zt)("Invalid watch source: ",b,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=b=>i?b:vt(b)||i===!1||i===0?Js(b,1):Js(b);let u,h,p,g,f=!1,m=!1;if(We(e)?(h=()=>e.value,f=vt(e)):fo(e)?(h=()=>c(e),f=!0):Y(e)?(m=!0,f=e.some(b=>fo(b)||vt(b)),h=()=>e.map(b=>{if(We(b))return b.value;if(fo(b))return c(b);if(Q(b))return a?a(b,2):b();process.env.NODE_ENV!=="production"&&d(b)})):Q(e)?t?h=a?()=>a(e,2):e:h=()=>{if(p){qs();try{p()}finally{Xs()}}const b=Ho;Ho=u;try{return a?a(e,3,[g]):e(g)}finally{Ho=b}}:(h=Je,process.env.NODE_ENV!=="production"&&d(e)),t&&i){const b=h,x=i===!0?1/0:i;h=()=>Js(b(),x)}const v=bu(),y=()=>{u.stop(),v&&v.active&&da(v.effects,u)};if(n&&t){const b=t;t=(...x)=>{b(...x),y()}}let R=m?new Array(e.length).fill(Ir):Ir;const w=b=>{if(!(!(u.flags&1)||!u.dirty&&!b))if(t){const x=u.run();if(i||f||(m?x.some((A,H)=>At(A,R[H])):At(x,R))){p&&p();const A=Ho;Ho=u;try{const H=[x,R===Ir?void 0:m&&R[0]===Ir?[]:R,g];a?a(t,3,H):t(...H),R=x}finally{Ho=A}}}else u.run()};return l&&l(w),u=new Su(h),u.scheduler=r?()=>r(w,!1):w,g=b=>ow(b,!1,u),p=u.onStop=()=>{const b=Tr.get(u);if(b){if(a)a(b,4);else for(const x of b)x();Tr.delete(u)}},process.env.NODE_ENV!=="production"&&(u.onTrack=s.onTrack,u.onTrigger=s.onTrigger),t?o?w(!0):R=u.run():r?r(w.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function Js(e,t=1/0,s){if(t<=0||!Me(e)||e.__v_skip||(s=s||new Set,s.has(e)))return e;if(s.add(e),t--,We(e))Js(e.value,t,s);else if(Y(e))for(let o=0;o<e.length;o++)Js(e[o],t,s);else if(Cr(e)||Go(e))e.forEach(o=>{Js(o,t,s)});else if(vr(e)){for(const o in e)Js(e[o],t,s);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Js(e[o],t,s)}return e}/**
10
+ * @vue/runtime-core v3.5.13
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/const Vo=[];function Lr(e){Vo.push(e)}function kr(){Vo.pop()}let Fa=!1;function N(e,...t){if(Fa)return;Fa=!0,qs();const s=Vo.length?Vo[Vo.length-1].component:null,o=s&&s.appContext.config.warnHandler,i=nw();if(o)yi(o,s,11,[e+t.map(n=>{var r,l;return(l=(r=n.toString)==null?void 0:r.call(n))!=null?l:JSON.stringify(n)}).join(""),s&&s.proxy,i.map(({vnode:n})=>`at <${Zr(s,n.type)}>`).join(`
14
+ `),i]);else{const n=[`[Vue warn]: ${e}`,...t];i.length&&n.push(`
15
+ `,...rw(i)),console.warn(...n)}Xs(),Fa=!1}function nw(){let e=Vo[Vo.length-1];if(!e)return[];const t=[];for(;e;){const s=t[0];s&&s.vnode===e?s.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function rw(e){const t=[];return e.forEach((s,o)=>{t.push(...o===0?[]:[`
16
+ `],...lw(s))}),t}function lw({vnode:e,recurseCount:t}){const s=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,i=` at <${Zr(e.component,e.type,o)}`,n=">"+s;return e.props?[i,...aw(e.props),n]:[i+n]}function aw(e){const t=[],s=Object.keys(e);return s.slice(0,3).forEach(o=>{t.push(...ju(o,e[o]))}),s.length>3&&t.push(" ..."),t}function ju(e,t,s){return Ve(t)?(t=JSON.stringify(t),s?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?s?t:[`${e}=${t}`]:We(t)?(t=ju(e,ce(t.value),!0),s?t:[`${e}=Ref<`,t,">"]):Q(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ce(t),s?t:[`${e}=`,t])}const Da={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 yi(e,t,s,o){try{return o?e(...o):e()}catch(i){pn(i,t,s)}}function Ds(e,t,s,o){if(Q(e)){const i=yi(e,t,s,o);return i&&ca(i)&&i.catch(n=>{pn(n,t,s)}),i}if(Y(e)){const i=[];for(let n=0;n<e.length;n++)i.push(Ds(e[n],t,s,o));return i}else process.env.NODE_ENV!=="production"&&N(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function pn(e,t,s,o=!0){const i=t?t.vnode:null,{errorHandler:n,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||be;if(t){let l=t.parent;const a=t.proxy,d=process.env.NODE_ENV!=="production"?Da[s]:`https://vuejs.org/error-reference/#runtime-${s}`;for(;l;){const c=l.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](e,a,d)===!1)return}l=l.parent}if(n){qs(),yi(n,null,10,[e,a,d]),Xs();return}}dw(e,s,i,o,r)}function dw(e,t,s,o=!0,i=!1){if(process.env.NODE_ENV!=="production"){const n=Da[t];if(s&&Lr(s),N(`Unhandled error${n?` during execution of ${n}`:""}`),s&&kr(),o)throw e;console.error(e)}else{if(i)throw e;console.error(e)}}const wt=[];let Es=-1;const bi=[];let mo=null,Si=0;const Ku=Promise.resolve();let Or=null;const cw=100;function gn(e){const t=Or||Ku;return e?t.then(this?e.bind(this):e):t}function uw(e){let t=Es+1,s=wt.length;for(;t<s;){const o=t+s>>>1,i=wt[o],n=fn(i);n<e||n===e&&i.flags&2?t=o+1:s=o}return t}function Gr(e){if(!(e.flags&1)){const t=fn(e),s=wt[wt.length-1];!s||!(e.flags&2)&&t>=fn(s)?wt.push(e):wt.splice(uw(t),0,e),e.flags|=1,Yu()}}function Yu(){Or||(Or=Ku.then(Zu))}function qu(e){Y(e)?bi.push(...e):mo&&e.id===-1?mo.splice(Si+1,0,e):e.flags&1||(bi.push(e),e.flags|=1),Yu()}function Xu(e,t,s=Es+1){for(process.env.NODE_ENV!=="production"&&(t=t||new Map);s<wt.length;s++){const o=wt[s];if(o&&o.flags&2){if(e&&o.id!==e.uid||process.env.NODE_ENV!=="production"&&Ea(t,o))continue;wt.splice(s,1),s--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function Qu(e){if(bi.length){const t=[...new Set(bi)].sort((s,o)=>fn(s)-fn(o));if(bi.length=0,mo){mo.push(...t);return}for(mo=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),Si=0;Si<mo.length;Si++){const s=mo[Si];process.env.NODE_ENV!=="production"&&Ea(e,s)||(s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2)}mo=null,Si=0}}const fn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Zu(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?s=>Ea(e,s):Je;try{for(Es=0;Es<wt.length;Es++){const s=wt[Es];if(s&&!(s.flags&8)){if(process.env.NODE_ENV!=="production"&&t(s))continue;s.flags&4&&(s.flags&=-2),yi(s,s.i,s.i?15:14),s.flags&4||(s.flags&=-2)}}}finally{for(;Es<wt.length;Es++){const s=wt[Es];s&&(s.flags&=-2)}Es=-1,wt.length=0,Qu(e),Or=null,(wt.length||bi.length)&&Zu(e)}}function Ea(e,t){const s=e.get(t)||0;if(s>cw){const o=t.i,i=o&&Jh(o.type);return pn(`Maximum recursive updates exceeded${i?` in component <${i}>`:""}. 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,s+1),!1}let Ms=!1;const Nr=new Map;process.env.NODE_ENV!=="production"&&(rn().__VUE_HMR_RUNTIME__={createRecord:Ma(Ju),rerender:Ma(gw),reload:Ma(fw)});const Wo=new Map;function hw(e){const t=e.type.__hmrId;let s=Wo.get(t);s||(Ju(t,e.type),s=Wo.get(t)),s.instances.add(e)}function pw(e){Wo.get(e.type.__hmrId).instances.delete(e)}function Ju(e,t){return Wo.has(e)?!1:(Wo.set(e,{initialDef:_r(t),instances:new Set}),!0)}function _r(e){return ep(e)?e.__vccOpts:e}function gw(e,t){const s=Wo.get(e);s&&(s.initialDef.render=t,[...s.instances].forEach(o=>{t&&(o.render=t,_r(o.type).render=t),o.renderCache=[],Ms=!0,o.update(),Ms=!1}))}function fw(e,t){const s=Wo.get(e);if(!s)return;t=_r(t),eh(s.initialDef,t);const o=[...s.instances];for(let i=0;i<o.length;i++){const n=o[i],r=_r(n.type);let l=Nr.get(r);l||(r!==s.initialDef&&eh(r,t),Nr.set(r,l=new Set)),l.add(n),n.appContext.propsCache.delete(n.type),n.appContext.emitsCache.delete(n.type),n.appContext.optionsCache.delete(n.type),n.ceReload?(l.add(n),n.ceReload(t.styles),l.delete(n)):n.parent?Gr(()=>{Ms=!0,n.parent.update(),Ms=!1,l.delete(n)}):n.appContext.reload?n.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),n.root.ce&&n!==n.root&&n.root.ce._removeChildStyle(r)}qu(()=>{Nr.clear()})}function eh(e,t){He(e,t);for(const s in e)s!=="__file"&&!(s in t)&&delete e[s]}function Ma(e){return(t,s)=>{try{return e(t,s)}catch(o){console.error(o),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let cs,mn=[],Aa=!1;function Cn(e,...t){cs?cs.emit(e,...t):Aa||mn.push({event:e,args:t})}function Pa(e,t){var s,o;cs=e,cs?(cs.enabled=!0,mn.forEach(({event:i,args:n})=>cs.emit(i,...n)),mn=[]):typeof window<"u"&&window.HTMLElement&&!((o=(s=window.navigator)==null?void 0:s.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(n=>{Pa(n,t)}),setTimeout(()=>{cs||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Aa=!0,mn=[])},3e3)):(Aa=!0,mn=[])}function mw(e,t){Cn("app:init",e,t,{Fragment:Le,Text:Sn,Comment:Pt,Static:Yr})}function Cw(e){Cn("app:unmount",e)}const vw=Ia("component:added"),th=Ia("component:updated"),ww=Ia("component:removed"),yw=e=>{cs&&typeof cs.cleanupBuffer=="function"&&!cs.cleanupBuffer(e)&&ww(e)};/*! #__NO_SIDE_EFFECTS__ */function Ia(e){return t=>{Cn(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const bw=sh("perf:start"),Sw=sh("perf:end");function sh(e){return(t,s,o)=>{Cn(e,t.appContext.app,t.uid,t,s,o)}}function Rw(e,t,s){Cn("component:emit",e.appContext.app,e,t,s)}let tt=null,oh=null;function Br(e){const t=tt;return tt=e,oh=e&&e.type.__scopeId||null,t}function yt(e,t=tt,s){if(!t||e._n)return e;const o=(...i)=>{o._d&&Wh(-1);const n=Br(t);let r;try{r=e(...i)}finally{Br(n),o._d&&Wh(1)}return process.env.NODE_ENV!=="production"&&th(t),r};return o._n=!0,o._c=!0,o._d=!0,o}function ih(e){cv(e)&&N("Do not use built-in directive ids as custom directive id: "+e)}function nh(e,t){if(tt===null)return process.env.NODE_ENV!=="production"&&N("withDirectives can only be used inside render functions."),e;const s=Qr(tt),o=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[n,r,l,a=be]=t[i];n&&(Q(n)&&(n={mounted:n,updated:n}),n.deep&&Js(r),o.push({dir:n,instance:s,value:r,oldValue:void 0,arg:l,modifiers:a}))}return e}function zo(e,t,s,o){const i=e.dirs,n=t&&t.dirs;for(let r=0;r<i.length;r++){const l=i[r];n&&(l.oldValue=n[r].value);let a=l.dir[o];a&&(qs(),Ds(a,s,8,[e.el,l,e,t]),Xs())}}const xw=Symbol("_vte"),Fw=e=>e.__isTeleport;function Ta(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ta(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function st(e,t){return Q(e)?He({name:e.name},t,{setup:e}):e}function rh(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const lh=new WeakSet;function ah(e){const t=yo(),s=hn(null);if(t){const i=t.refs===be?t.refs={}:t.refs;let n;process.env.NODE_ENV!=="production"&&(n=Object.getOwnPropertyDescriptor(i,e))&&!n.configurable?N(`useTemplateRef('${e}') already exists.`):Object.defineProperty(i,e,{enumerable:!0,get:()=>s.value,set:r=>s.value=r})}else process.env.NODE_ENV!=="production"&&N("useTemplateRef() is called when there is no active component instance to be associated with.");const o=process.env.NODE_ENV!=="production"?Ar(s):s;return process.env.NODE_ENV!=="production"&&lh.add(o),o}function Hr(e,t,s,o,i=!1){if(Y(e)){e.forEach((g,f)=>Hr(g,t&&(Y(t)?t[f]:t),s,o,i));return}if(Ri(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Hr(e,t,s,o.component.subTree);return}const n=o.shapeFlag&4?Qr(o.component):o.el,r=i?null:n,{i:l,r:a}=e;if(process.env.NODE_ENV!=="production"&&!l){N("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const d=t&&t.r,c=l.refs===be?l.refs={}:l.refs,u=l.setupState,h=ce(u),p=u===be?()=>!1:g=>process.env.NODE_ENV!=="production"&&(Fe(h,g)&&!We(h[g])&&N(`Template ref "${g}" used on a non-ref value. It will not work in the production build.`),lh.has(h[g]))?!1:Fe(h,g);if(d!=null&&d!==a&&(Ve(d)?(c[d]=null,p(d)&&(u[d]=null)):We(d)&&(d.value=null)),Q(a))yi(a,l,12,[r,c]);else{const g=Ve(a),f=We(a);if(g||f){const m=()=>{if(e.f){const v=g?p(a)?u[a]:c[a]:a.value;i?Y(v)&&da(v,n):Y(v)?v.includes(n)||v.push(n):g?(c[a]=[n],p(a)&&(u[a]=c[a])):(a.value=[n],e.k&&(c[e.k]=a.value))}else g?(c[a]=r,p(a)&&(u[a]=r)):f?(a.value=r,e.k&&(c[e.k]=r)):process.env.NODE_ENV!=="production"&&N("Invalid template ref type:",a,`(${typeof a})`)};r?(m.id=-1,zt(m,s)):m()}else process.env.NODE_ENV!=="production"&&N("Invalid template ref type:",a,`(${typeof a})`)}}rn().requestIdleCallback,rn().cancelIdleCallback;const Ri=e=>!!e.type.__asyncLoader,La=e=>e.type.__isKeepAlive;function Dw(e,t){dh(e,"a",t)}function Ew(e,t){dh(e,"da",t)}function dh(e,t,s=nt){const o=e.__wdc||(e.__wdc=()=>{let i=s;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Vr(t,o,s),s){let i=s.parent;for(;i&&i.parent;)La(i.parent.vnode)&&Mw(o,t,s,i),i=i.parent}}function Mw(e,t,s,o){const i=Vr(t,e,o,!0);Wr(()=>{da(o[t],i)},s)}function Vr(e,t,s=nt,o=!1){if(s){const i=s[e]||(s[e]=[]),n=t.__weh||(t.__weh=(...r)=>{qs();const l=En(s),a=Ds(t,s,e,r);return l(),Xs(),a});return o?i.unshift(n):i.push(n),n}else if(process.env.NODE_ENV!=="production"){const i=No(Da[e].replace(/ hook$/,""));N(`${i} 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 eo=e=>(t,s=nt)=>{(!Mn||e==="sp")&&Vr(e,(...o)=>t(...o),s)},ka=eo("bm"),to=eo("m"),Aw=eo("bu"),Pw=eo("u"),ch=eo("bum"),Wr=eo("um"),Iw=eo("sp"),Tw=eo("rtg"),Lw=eo("rtc");function kw(e,t=nt){Vr("ec",e,t)}const Ow=Symbol.for("v-ndc");function As(e,t,s,o){let i;const n=s,r=Y(e);if(r||Ve(e)){const l=r&&fo(e);let a=!1;l&&(a=!vt(e),e=Fr(e)),i=new Array(e.length);for(let d=0,c=e.length;d<c;d++)i[d]=t(a?ut(e[d]):e[d],d,void 0,n)}else if(typeof e=="number"){process.env.NODE_ENV!=="production"&&!Number.isInteger(e)&&N(`The v-for range expect an integer value but got ${e}.`),i=new Array(e);for(let l=0;l<e;l++)i[l]=t(l+1,l,void 0,n)}else if(Me(e))if(e[Symbol.iterator])i=Array.from(e,(l,a)=>t(l,a,void 0,n));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,d=l.length;a<d;a++){const c=l[a];i[a]=t(e[c],c,a,n)}}else i=[];return i}function vn(e,t,s={},o,i){if(tt.ce||tt.parent&&Ri(tt.parent)&&tt.parent.ce)return t!=="default"&&(s.name=t),K(),ot(Le,null,[Pe("slot",s,o&&o())],64);let n=e[t];process.env.NODE_ENV!=="production"&&n&&n.length>1&&(N("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."),n=()=>[]),n&&n._c&&(n._d=!1),K();const r=n&&uh(n(s)),l=s.key||r&&r.key,a=ot(Le,{key:(l&&!ls(l)?l:`_${t}`)+(!r&&o?"_fb":"")},r||(o?o():[]),r&&e._===1?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),n&&n._c&&(n._d=!0),a}function uh(e){return e.some(t=>Fn(t)?!(t.type===Pt||t.type===Le&&!uh(t.children)):!0)?e:null}const Oa=e=>e?qh(e)?Qr(e):Oa(e.parent):null,Uo=He(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>process.env.NODE_ENV!=="production"?Fs(e.props):e.props,$attrs:e=>process.env.NODE_ENV!=="production"?Fs(e.attrs):e.attrs,$slots:e=>process.env.NODE_ENV!=="production"?Fs(e.slots):e.slots,$refs:e=>process.env.NODE_ENV!=="production"?Fs(e.refs):e.refs,$parent:e=>Oa(e.parent),$root:e=>Oa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>mh(e),$forceUpdate:e=>e.f||(e.f=()=>{Gr(e.update)}),$nextTick:e=>e.n||(e.n=gn.bind(e.proxy)),$watch:e=>fy.bind(e)}),Ga=e=>e==="_"||e==="$",Na=(e,t)=>e!==be&&!e.__isScriptSetup&&Fe(e,t),hh={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:o,data:i,props:n,accessCache:r,type:l,appContext:a}=e;if(process.env.NODE_ENV!=="production"&&t==="__isVue")return!0;let d;if(t[0]!=="$"){const p=r[t];if(p!==void 0)switch(p){case 1:return o[t];case 2:return i[t];case 4:return s[t];case 3:return n[t]}else{if(Na(o,t))return r[t]=1,o[t];if(i!==be&&Fe(i,t))return r[t]=2,i[t];if((d=e.propsOptions[0])&&Fe(d,t))return r[t]=3,n[t];if(s!==be&&Fe(s,t))return r[t]=4,s[t];_a&&(r[t]=0)}}const c=Uo[t];let u,h;if(c)return t==="$attrs"?(et(e.attrs,"get",""),process.env.NODE_ENV!=="production"&&Kr()):process.env.NODE_ENV!=="production"&&t==="$slots"&&et(e,"get",t),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(s!==be&&Fe(s,t))return r[t]=4,s[t];if(h=a.config.globalProperties,Fe(h,t))return h[t];process.env.NODE_ENV!=="production"&&tt&&(!Ve(t)||t.indexOf("__v")!==0)&&(i!==be&&Ga(t[0])&&Fe(i,t)?N(`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===tt&&N(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,s){const{data:o,setupState:i,ctx:n}=e;return Na(i,t)?(i[t]=s,!0):process.env.NODE_ENV!=="production"&&i.__isScriptSetup&&Fe(i,t)?(N(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):o!==be&&Fe(o,t)?(o[t]=s,!0):Fe(e.props,t)?(process.env.NODE_ENV!=="production"&&N(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(process.env.NODE_ENV!=="production"&&N(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(process.env.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(n,t,{enumerable:!0,configurable:!0,value:s}):n[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:o,appContext:i,propsOptions:n}},r){let l;return!!s[r]||e!==be&&Fe(e,r)||Na(t,r)||(l=n[0])&&Fe(l,r)||Fe(o,r)||Fe(Uo,r)||Fe(i.config.globalProperties,r)},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Fe(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};process.env.NODE_ENV!=="production"&&(hh.ownKeys=e=>(N("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 Gw(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(Uo).forEach(s=>{Object.defineProperty(t,s,{configurable:!0,enumerable:!1,get:()=>Uo[s](e),set:Je})}),t}function Nw(e){const{ctx:t,propsOptions:[s]}=e;s&&Object.keys(s).forEach(o=>{Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>e.props[o],set:Je})})}function _w(e){const{ctx:t,setupState:s}=e;Object.keys(ce(s)).forEach(o=>{if(!s.__isScriptSetup){if(Ga(o[0])){N(`setup() return property ${JSON.stringify(o)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>s[o],set:Je})}})}function wn(e){return Y(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}function Bw(e,t){const s=wn(e);for(const o in t){if(o.startsWith("__skip"))continue;let i=s[o];i?Y(i)||Q(i)?i=s[o]={type:i,default:t[o]}:i.default=t[o]:i===null?i=s[o]={default:t[o]}:process.env.NODE_ENV!=="production"&&N(`props default key "${o}" has no corresponding declaration.`),i&&t[`__skip_${o}`]&&(i.skipFactory=!0)}return s}function ph(e,t){return!e||!t?e||t:Y(e)&&Y(t)?e.concat(t):He({},wn(e),wn(t))}function Hw(){const e=Object.create(null);return(t,s)=>{e[s]?N(`${t} property "${s}" is already defined in ${e[s]}.`):e[s]=t}}let _a=!0;function Vw(e){const t=mh(e),s=e.proxy,o=e.ctx;_a=!1,t.beforeCreate&&gh(t.beforeCreate,e,"bc");const{data:i,computed:n,methods:r,watch:l,provide:a,inject:d,created:c,beforeMount:u,mounted:h,beforeUpdate:p,updated:g,activated:f,deactivated:m,beforeDestroy:v,beforeUnmount:y,destroyed:R,unmounted:w,render:b,renderTracked:x,renderTriggered:A,errorCaptured:H,serverPrefetch:M,expose:z,inheritAttrs:L,components:ee,directives:re,filters:de}=t,Ge=process.env.NODE_ENV!=="production"?Hw():null;if(process.env.NODE_ENV!=="production"){const[te]=e.propsOptions;if(te)for(const Z in te)Ge("Props",Z)}if(d&&Ww(d,o,Ge),r)for(const te in r){const Z=r[te];Q(Z)?(process.env.NODE_ENV!=="production"?Object.defineProperty(o,te,{value:Z.bind(s),configurable:!0,enumerable:!0,writable:!0}):o[te]=Z.bind(s),process.env.NODE_ENV!=="production"&&Ge("Methods",te)):process.env.NODE_ENV!=="production"&&N(`Method "${te}" has type "${typeof Z}" in the component definition. Did you reference the function correctly?`)}if(i){process.env.NODE_ENV!=="production"&&!Q(i)&&N("The data option must be a function. Plain object usage is no longer supported.");const te=i.call(s,s);if(process.env.NODE_ENV!=="production"&&ca(te)&&N("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Me(te))process.env.NODE_ENV!=="production"&&N("data() should return an object.");else if(e.data=Ra(te),process.env.NODE_ENV!=="production")for(const Z in te)Ge("Data",Z),Ga(Z[0])||Object.defineProperty(o,Z,{configurable:!0,enumerable:!0,get:()=>te[Z],set:Je})}if(_a=!0,n)for(const te in n){const Z=n[te],De=Q(Z)?Z.bind(s,s):Q(Z.get)?Z.get.bind(s,s):Je;process.env.NODE_ENV!=="production"&&De===Je&&N(`Computed property "${te}" has no getter.`);const Ft=!Q(Z)&&Q(Z.set)?Z.set.bind(s):process.env.NODE_ENV!=="production"?()=>{N(`Write operation failed: computed property "${te}" is readonly.`)}:Je,_t=ge({get:De,set:Ft});Object.defineProperty(o,te,{enumerable:!0,configurable:!0,get:()=>_t.value,set:ct=>_t.value=ct}),process.env.NODE_ENV!=="production"&&Ge("Computed",te)}if(l)for(const te in l)fh(l[te],o,s,te);if(a){const te=Q(a)?a.call(s):a;Reflect.ownKeys(te).forEach(Z=>{Jt(Z,te[Z])})}c&&gh(c,e,"c");function xe(te,Z){Y(Z)?Z.forEach(De=>te(De.bind(s))):Z&&te(Z.bind(s))}if(xe(ka,u),xe(to,h),xe(Aw,p),xe(Pw,g),xe(Dw,f),xe(Ew,m),xe(kw,H),xe(Lw,x),xe(Tw,A),xe(ch,y),xe(Wr,w),xe(Iw,M),Y(z))if(z.length){const te=e.exposed||(e.exposed={});z.forEach(Z=>{Object.defineProperty(te,Z,{get:()=>s[Z],set:De=>s[Z]=De})})}else e.exposed||(e.exposed={});b&&e.render===Je&&(e.render=b),L!=null&&(e.inheritAttrs=L),ee&&(e.components=ee),re&&(e.directives=re),M&&rh(e)}function Ww(e,t,s=Je){Y(e)&&(e=Ba(e));for(const o in e){const i=e[o];let n;Me(i)?"default"in i?n=je(i.from||o,i.default,!0):n=je(i.from||o):n=je(i),We(n)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>n.value,set:r=>n.value=r}):t[o]=n,process.env.NODE_ENV!=="production"&&s("Inject",o)}}function gh(e,t,s){Ds(Y(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,s)}function fh(e,t,s,o){let i=o.includes(".")?kh(s,o):()=>s[o];if(Ve(e)){const n=t[e];Q(n)?St(i,n):process.env.NODE_ENV!=="production"&&N(`Invalid watch handler specified by key "${e}"`,n)}else if(Q(e))St(i,e.bind(s));else if(Me(e))if(Y(e))e.forEach(n=>fh(n,t,s,o));else{const n=Q(e.handler)?e.handler.bind(s):t[e.handler];Q(n)?St(i,n,e):process.env.NODE_ENV!=="production"&&N(`Invalid watch handler specified by key "${e.handler}"`,n)}else process.env.NODE_ENV!=="production"&&N(`Invalid watch option: "${o}"`,e)}function mh(e){const t=e.type,{mixins:s,extends:o}=t,{mixins:i,optionsCache:n,config:{optionMergeStrategies:r}}=e.appContext,l=n.get(t);let a;return l?a=l:!i.length&&!s&&!o?a=t:(a={},i.length&&i.forEach(d=>zr(a,d,r,!0)),zr(a,t,r)),Me(t)&&n.set(t,a),a}function zr(e,t,s,o=!1){const{mixins:i,extends:n}=t;n&&zr(e,n,s,!0),i&&i.forEach(r=>zr(e,r,s,!0));for(const r in t)if(o&&r==="expose")process.env.NODE_ENV!=="production"&&N('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const l=zw[r]||s&&s[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const zw={data:Ch,props:vh,emits:vh,methods:yn,computed:yn,beforeCreate:bt,created:bt,beforeMount:bt,mounted:bt,beforeUpdate:bt,updated:bt,beforeDestroy:bt,beforeUnmount:bt,destroyed:bt,unmounted:bt,activated:bt,deactivated:bt,errorCaptured:bt,serverPrefetch:bt,components:yn,directives:yn,watch:$w,provide:Ch,inject:Uw};function Ch(e,t){return t?e?function(){return He(Q(e)?e.call(this,this):e,Q(t)?t.call(this,this):t)}:t:e}function Uw(e,t){return yn(Ba(e),Ba(t))}function Ba(e){if(Y(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function bt(e,t){return e?[...new Set([].concat(e,t))]:t}function yn(e,t){return e?He(Object.create(null),e,t):t}function vh(e,t){return e?Y(e)&&Y(t)?[...new Set([...e,...t])]:He(Object.create(null),wn(e),wn(t??{})):t}function $w(e,t){if(!e)return t;if(!t)return e;const s=He(Object.create(null),e);for(const o in t)s[o]=bt(e[o],t[o]);return s}function wh(){return{app:null,config:{isNativeTag:av,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 jw=0;function Kw(e,t){return function(o,i=null){Q(o)||(o=He({},o)),i!=null&&!Me(i)&&(process.env.NODE_ENV!=="production"&&N("root props passed to app.mount() must be an object."),i=null);const n=wh(),r=new WeakSet,l=[];let a=!1;const d=n.app={_uid:jw++,_component:o,_props:i,_container:null,_context:n,_instance:null,version:tp,get config(){return n.config},set config(c){process.env.NODE_ENV!=="production"&&N("app.config cannot be replaced. Modify individual options instead.")},use(c,...u){return r.has(c)?process.env.NODE_ENV!=="production"&&N("Plugin has already been applied to target app."):c&&Q(c.install)?(r.add(c),c.install(d,...u)):Q(c)?(r.add(c),c(d,...u)):process.env.NODE_ENV!=="production"&&N('A plugin must either be a function or an object with an "install" function.'),d},mixin(c){return n.mixins.includes(c)?process.env.NODE_ENV!=="production"&&N("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):n.mixins.push(c),d},component(c,u){return process.env.NODE_ENV!=="production"&&qa(c,n.config),u?(process.env.NODE_ENV!=="production"&&n.components[c]&&N(`Component "${c}" has already been registered in target app.`),n.components[c]=u,d):n.components[c]},directive(c,u){return process.env.NODE_ENV!=="production"&&ih(c),u?(process.env.NODE_ENV!=="production"&&n.directives[c]&&N(`Directive "${c}" has already been registered in target app.`),n.directives[c]=u,d):n.directives[c]},mount(c,u,h){if(a)process.env.NODE_ENV!=="production"&&N("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{process.env.NODE_ENV!=="production"&&c.__vue_app__&&N("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=d._ceVNode||Pe(o,i);return p.appContext=n,h===!0?h="svg":h===!1&&(h=void 0),process.env.NODE_ENV!=="production"&&(n.reload=()=>{e(vo(p),c,h)}),e(p,c,h),a=!0,d._container=c,c.__vue_app__=d,process.env.NODE_ENV!=="production"&&(d._instance=p.component,mw(d,tp)),Qr(p.component)}},onUnmount(c){process.env.NODE_ENV!=="production"&&typeof c!="function"&&N(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),l.push(c)},unmount(){a?(Ds(l,d._instance,16),e(null,d._container),process.env.NODE_ENV!=="production"&&(d._instance=null,Cw(d)),delete d._container.__vue_app__):process.env.NODE_ENV!=="production"&&N("Cannot unmount an app that is not mounted.")},provide(c,u){return process.env.NODE_ENV!=="production"&&c in n.provides&&N(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),n.provides[c]=u,d},runWithContext(c){const u=xi;xi=d;try{return c()}finally{xi=u}}};return d}}let xi=null;function Jt(e,t){if(!nt)process.env.NODE_ENV!=="production"&&N("provide() can only be used inside setup().");else{let s=nt.provides;const o=nt.parent&&nt.parent.provides;o===s&&(s=nt.provides=Object.create(o)),s[e]=t}}function je(e,t,s=!1){const o=nt||tt;if(o||xi){const i=xi?xi._context.provides:o?o.parent==null?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return s&&Q(t)?t.call(o&&o.proxy):t;process.env.NODE_ENV!=="production"&&N(`injection "${String(e)}" not found.`)}else process.env.NODE_ENV!=="production"&&N("inject() can only be used inside setup() or functional components.")}const yh={},bh=()=>Object.create(yh),Sh=e=>Object.getPrototypeOf(e)===yh;function Yw(e,t,s,o=!1){const i={},n=bh();e.propsDefaults=Object.create(null),Rh(e,t,i,n);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);process.env.NODE_ENV!=="production"&&Dh(t||{},i,e),s?e.props=o?i:Kv(i):e.type.props?e.props=i:e.props=n,e.attrs=n}function qw(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function Xw(e,t,s,o){const{props:i,attrs:n,vnode:{patchFlag:r}}=e,l=ce(i),[a]=e.propsOptions;let d=!1;if(!(process.env.NODE_ENV!=="production"&&qw(e))&&(o||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let u=0;u<c.length;u++){let h=c[u];if(jr(e.emitsOptions,h))continue;const p=t[h];if(a)if(Fe(n,h))p!==n[h]&&(n[h]=p,d=!0);else{const g=mt(h);i[g]=Ha(a,l,g,p,e,!1)}else p!==n[h]&&(n[h]=p,d=!0)}}}else{Rh(e,t,i,n)&&(d=!0);let c;for(const u in l)(!t||!Fe(t,u)&&((c=Mt(u))===u||!Fe(t,c)))&&(a?s&&(s[u]!==void 0||s[c]!==void 0)&&(i[u]=Ha(a,l,u,void 0,e,!0)):delete i[u]);if(n!==l)for(const u in n)(!t||!Fe(t,u))&&(delete n[u],d=!0)}d&&xs(e.attrs,"set",""),process.env.NODE_ENV!=="production"&&Dh(t||{},i,e)}function Rh(e,t,s,o){const[i,n]=e.propsOptions;let r=!1,l;if(t)for(let a in t){if(nn(a))continue;const d=t[a];let c;i&&Fe(i,c=mt(a))?!n||!n.includes(c)?s[c]=d:(l||(l={}))[c]=d:jr(e.emitsOptions,a)||(!(a in o)||d!==o[a])&&(o[a]=d,r=!0)}if(n){const a=ce(s),d=l||be;for(let c=0;c<n.length;c++){const u=n[c];s[u]=Ha(i,a,u,d[u],e,!Fe(d,u))}}return r}function Ha(e,t,s,o,i,n){const r=e[s];if(r!=null){const l=Fe(r,"default");if(l&&o===void 0){const a=r.default;if(r.type!==Function&&!r.skipFactory&&Q(a)){const{propsDefaults:d}=i;if(s in d)o=d[s];else{const c=En(i);o=d[s]=a.call(null,t),c()}}else o=a;i.ce&&i.ce._setProp(s,o)}r[0]&&(n&&!l?o=!1:r[1]&&(o===""||o===Mt(s))&&(o=!0))}return o}const Qw=new WeakMap;function xh(e,t,s=!1){const o=s?Qw:t.propsCache,i=o.get(e);if(i)return i;const n=e.props,r={},l=[];let a=!1;if(!Q(e)){const c=u=>{a=!0;const[h,p]=xh(u,t,!0);He(r,h),p&&l.push(...p)};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!n&&!a)return Me(e)&&o.set(e,mi),mi;if(Y(n))for(let c=0;c<n.length;c++){process.env.NODE_ENV!=="production"&&!Ve(n[c])&&N("props must be strings when using array syntax.",n[c]);const u=mt(n[c]);Fh(u)&&(r[u]=be)}else if(n){process.env.NODE_ENV!=="production"&&!Me(n)&&N("invalid props options",n);for(const c in n){const u=mt(c);if(Fh(u)){const h=n[c],p=r[u]=Y(h)||Q(h)?{type:h}:He({},h),g=p.type;let f=!1,m=!0;if(Y(g))for(let v=0;v<g.length;++v){const y=g[v],R=Q(y)&&y.name;if(R==="Boolean"){f=!0;break}else R==="String"&&(m=!1)}else f=Q(g)&&g.name==="Boolean";p[0]=f,p[1]=m,(f||Fe(p,"default"))&&l.push(u)}}}const d=[r,l];return Me(e)&&o.set(e,d),d}function Fh(e){return e[0]!=="$"&&!nn(e)?!0:(process.env.NODE_ENV!=="production"&&N(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Zw(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Dh(e,t,s){const o=ce(t),i=s.propsOptions[0],n=Object.keys(e).map(r=>mt(r));for(const r in i){let l=i[r];l!=null&&Jw(r,o[r],l,process.env.NODE_ENV!=="production"?Fs(o):o,!n.includes(r))}}function Jw(e,t,s,o,i){const{type:n,required:r,validator:l,skipCheck:a}=s;if(r&&i){N('Missing required prop: "'+e+'"');return}if(!(t==null&&!r)){if(n!=null&&n!==!0&&!a){let d=!1;const c=Y(n)?n:[n],u=[];for(let h=0;h<c.length&&!d;h++){const{valid:p,expectedType:g}=ty(t,c[h]);u.push(g||""),d=p}if(!d){N(sy(e,t,u));return}}l&&!l(t,o)&&N('Invalid prop: custom validator check failed for prop "'+e+'".')}}const ey=Ys("String,Number,Boolean,Function,Symbol,BigInt");function ty(e,t){let s;const o=Zw(t);if(o==="null")s=e===null;else if(ey(o)){const i=typeof e;s=i===o.toLowerCase(),!s&&i==="object"&&(s=e instanceof t)}else o==="Object"?s=Me(e):o==="Array"?s=Y(e):s=e instanceof t;return{valid:s,expectedType:o}}function sy(e,t,s){if(s.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let o=`Invalid prop: type check failed for prop "${e}". Expected ${s.map(yr).join(" | ")}`;const i=s[0],n=ua(t),r=Eh(t,i),l=Eh(t,n);return s.length===1&&Mh(i)&&!oy(i,n)&&(o+=` with value ${r}`),o+=`, got ${n} `,Mh(n)&&(o+=`with value ${l}.`),o}function Eh(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Mh(e){return["string","number","boolean"].some(s=>e.toLowerCase()===s)}function oy(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Ah=e=>e[0]==="_"||e==="$stable",Va=e=>Y(e)?e.map(us):[us(e)],iy=(e,t,s)=>{if(t._n)return t;const o=yt((...i)=>(process.env.NODE_ENV!=="production"&&nt&&(!s||s.root===nt.root)&&N(`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.`),Va(t(...i))),s);return o._c=!1,o},Ph=(e,t,s)=>{const o=e._ctx;for(const i in e){if(Ah(i))continue;const n=e[i];if(Q(n))t[i]=iy(i,n,o);else if(n!=null){process.env.NODE_ENV!=="production"&&N(`Non-function value encountered for slot "${i}". Prefer function slots for better performance.`);const r=Va(n);t[i]=()=>r}}},Ih=(e,t)=>{process.env.NODE_ENV!=="production"&&!La(e.vnode)&&N("Non-function value encountered for default slot. Prefer function slots for better performance.");const s=Va(t);e.slots.default=()=>s},Wa=(e,t,s)=>{for(const o in t)(s||o!=="_")&&(e[o]=t[o])},ny=(e,t,s)=>{const o=e.slots=bh();if(e.vnode.shapeFlag&32){const i=t._;i?(Wa(o,t,s),s&&br(o,"_",i,!0)):Ph(t,o)}else t&&Ih(e,t)},ry=(e,t,s)=>{const{vnode:o,slots:i}=e;let n=!0,r=be;if(o.shapeFlag&32){const l=t._;l?process.env.NODE_ENV!=="production"&&Ms?(Wa(i,t,s),xs(e,"set","$slots")):s&&l===1?n=!1:Wa(i,t,s):(n=!t.$stable,Ph(t,i)),r=t}else t&&(Ih(e,t),r={default:1});if(n)for(const l in i)!Ah(l)&&r[l]==null&&delete i[l]};let bn,Co;function Fi(e,t){e.appContext.config.performance&&Ur()&&Co.mark(`vue-${t}-${e.uid}`),process.env.NODE_ENV!=="production"&&bw(e,t,Ur()?Co.now():Date.now())}function Di(e,t){if(e.appContext.config.performance&&Ur()){const s=`vue-${t}-${e.uid}`,o=s+":end";Co.mark(o),Co.measure(`<${Zr(e,e.type)}> ${t}`,s,o),Co.clearMarks(s),Co.clearMarks(o)}process.env.NODE_ENV!=="production"&&Sw(e,t,Ur()?Co.now():Date.now())}function Ur(){return bn!==void 0||(typeof window<"u"&&window.performance?(bn=!0,Co=window.performance):bn=!1),bn}function ly(){const e=[];if(process.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.
17
+
18
+ For more details, see https://link.vuejs.org/feature-flags.`)}}const zt=Sy;function ay(e){return dy(e)}function dy(e,t){ly();const s=rn();s.__VUE__=!0,process.env.NODE_ENV!=="production"&&Pa(s.__VUE_DEVTOOLS_GLOBAL_HOOK__,s);const{insert:o,remove:i,patchProp:n,createElement:r,createText:l,createComment:a,setText:d,setElementText:c,parentNode:u,nextSibling:h,setScopeId:p=Je,insertStaticContent:g}=e,f=(C,S,E,O=null,P=null,T=null,W=void 0,B=null,_=process.env.NODE_ENV!=="production"&&Ms?!1:!!S.dynamicChildren)=>{if(C===S)return;C&&!Dn(C,S)&&(O=ye(C),Xt(C,P,T,!0),C=null),S.patchFlag===-2&&(_=!1,S.dynamicChildren=null);const{type:G,ref:se,shapeFlag:$}=S;switch(G){case Sn:m(C,S,E,O);break;case Pt:v(C,S,E,O);break;case Yr:C==null?y(S,E,O,W):process.env.NODE_ENV!=="production"&&R(C,S,E,W);break;case Le:re(C,S,E,O,P,T,W,B,_);break;default:$&1?x(C,S,E,O,P,T,W,B,_):$&6?de(C,S,E,O,P,T,W,B,_):$&64||$&128?G.process(C,S,E,O,P,T,W,B,_,Bt):process.env.NODE_ENV!=="production"&&N("Invalid VNode type:",G,`(${typeof G})`)}se!=null&&P&&Hr(se,C&&C.ref,T,S||C,!S)},m=(C,S,E,O)=>{if(C==null)o(S.el=l(S.children),E,O);else{const P=S.el=C.el;S.children!==C.children&&d(P,S.children)}},v=(C,S,E,O)=>{C==null?o(S.el=a(S.children||""),E,O):S.el=C.el},y=(C,S,E,O)=>{[C.el,C.anchor]=g(C.children,S,E,O,C.el,C.anchor)},R=(C,S,E,O)=>{if(S.children!==C.children){const P=h(C.anchor);b(C),[S.el,S.anchor]=g(S.children,E,P,O)}else S.el=C.el,S.anchor=C.anchor},w=({el:C,anchor:S},E,O)=>{let P;for(;C&&C!==S;)P=h(C),o(C,E,O),C=P;o(S,E,O)},b=({el:C,anchor:S})=>{let E;for(;C&&C!==S;)E=h(C),i(C),C=E;i(S)},x=(C,S,E,O,P,T,W,B,_)=>{S.type==="svg"?W="svg":S.type==="math"&&(W="mathml"),C==null?A(S,E,O,P,T,W,B,_):z(C,S,P,T,W,B,_)},A=(C,S,E,O,P,T,W,B)=>{let _,G;const{props:se,shapeFlag:$,transition:X,dirs:le}=C;if(_=C.el=r(C.type,T,se&&se.is,se),$&8?c(_,C.children):$&16&&M(C.children,_,null,O,P,za(C,T),W,B),le&&zo(C,null,O,"created"),H(_,C,C.scopeId,W,O),se){for(const _e in se)_e!=="value"&&!nn(_e)&&n(_,_e,null,se[_e],T,O);"value"in se&&n(_,"value",null,se.value,T),(G=se.onVnodeBeforeMount)&&Ps(G,O,C)}process.env.NODE_ENV!=="production"&&(br(_,"__vnode",C,!0),br(_,"__vueParentComponent",O,!0)),le&&zo(C,null,O,"beforeMount");const Ee=cy(P,X);Ee&&X.beforeEnter(_),o(_,S,E),((G=se&&se.onVnodeMounted)||Ee||le)&&zt(()=>{G&&Ps(G,O,C),Ee&&X.enter(_),le&&zo(C,null,O,"mounted")},P)},H=(C,S,E,O,P)=>{if(E&&p(C,E),O)for(let T=0;T<O.length;T++)p(C,O[T]);if(P){let T=P.subTree;if(process.env.NODE_ENV!=="production"&&T.patchFlag>0&&T.patchFlag&2048&&(T=ja(T.children)||T),S===T||Vh(T.type)&&(T.ssContent===S||T.ssFallback===S)){const W=P.vnode;H(C,W,W.scopeId,W.slotScopeIds,P.parent)}}},M=(C,S,E,O,P,T,W,B,_=0)=>{for(let G=_;G<C.length;G++){const se=C[G]=B?wo(C[G]):us(C[G]);f(null,se,S,E,O,P,T,W,B)}},z=(C,S,E,O,P,T,W)=>{const B=S.el=C.el;process.env.NODE_ENV!=="production"&&(B.__vnode=S);let{patchFlag:_,dynamicChildren:G,dirs:se}=S;_|=C.patchFlag&16;const $=C.props||be,X=S.props||be;let le;if(E&&$o(E,!1),(le=X.onVnodeBeforeUpdate)&&Ps(le,E,S,C),se&&zo(S,C,E,"beforeUpdate"),E&&$o(E,!0),process.env.NODE_ENV!=="production"&&Ms&&(_=0,W=!1,G=null),($.innerHTML&&X.innerHTML==null||$.textContent&&X.textContent==null)&&c(B,""),G?(L(C.dynamicChildren,G,B,E,O,za(S,P),T),process.env.NODE_ENV!=="production"&&$r(C,S)):W||De(C,S,B,null,E,O,za(S,P),T,!1),_>0){if(_&16)ee(B,$,X,E,P);else if(_&2&&$.class!==X.class&&n(B,"class",null,X.class,P),_&4&&n(B,"style",$.style,X.style,P),_&8){const Ee=S.dynamicProps;for(let _e=0;_e<Ee.length;_e++){const Te=Ee[_e],Qt=$[Te],Ht=X[Te];(Ht!==Qt||Te==="value")&&n(B,Te,Qt,Ht,P,E)}}_&1&&C.children!==S.children&&c(B,S.children)}else!W&&G==null&&ee(B,$,X,E,P);((le=X.onVnodeUpdated)||se)&&zt(()=>{le&&Ps(le,E,S,C),se&&zo(S,C,E,"updated")},O)},L=(C,S,E,O,P,T,W)=>{for(let B=0;B<S.length;B++){const _=C[B],G=S[B],se=_.el&&(_.type===Le||!Dn(_,G)||_.shapeFlag&70)?u(_.el):E;f(_,G,se,null,O,P,T,W,!0)}},ee=(C,S,E,O,P)=>{if(S!==E){if(S!==be)for(const T in S)!nn(T)&&!(T in E)&&n(C,T,S[T],null,P,O);for(const T in E){if(nn(T))continue;const W=E[T],B=S[T];W!==B&&T!=="value"&&n(C,T,B,W,P,O)}"value"in E&&n(C,"value",S.value,E.value,P)}},re=(C,S,E,O,P,T,W,B,_)=>{const G=S.el=C?C.el:l(""),se=S.anchor=C?C.anchor:l("");let{patchFlag:$,dynamicChildren:X,slotScopeIds:le}=S;process.env.NODE_ENV!=="production"&&(Ms||$&2048)&&($=0,_=!1,X=null),le&&(B=B?B.concat(le):le),C==null?(o(G,E,O),o(se,E,O),M(S.children||[],E,se,P,T,W,B,_)):$>0&&$&64&&X&&C.dynamicChildren?(L(C.dynamicChildren,X,E,P,T,W,B),process.env.NODE_ENV!=="production"?$r(C,S):(S.key!=null||P&&S===P.subTree)&&$r(C,S,!0)):De(C,S,E,se,P,T,W,B,_)},de=(C,S,E,O,P,T,W,B,_)=>{S.slotScopeIds=B,C==null?S.shapeFlag&512?P.ctx.activate(S,E,O,W,_):Ge(S,E,O,P,T,W,_):xe(C,S,_)},Ge=(C,S,E,O,P,T,W)=>{const B=C.component=My(C,O,P);if(process.env.NODE_ENV!=="production"&&B.type.__hmrId&&hw(B),process.env.NODE_ENV!=="production"&&(Lr(C),Fi(B,"mount")),La(C)&&(B.ctx.renderer=Bt),process.env.NODE_ENV!=="production"&&Fi(B,"init"),Py(B,!1,W),process.env.NODE_ENV!=="production"&&Di(B,"init"),B.asyncDep){if(process.env.NODE_ENV!=="production"&&Ms&&(C.el=null),P&&P.registerDep(B,te,W),!C.el){const _=B.subTree=Pe(Pt);v(null,_,S,E)}}else te(B,C,S,E,P,T,W);process.env.NODE_ENV!=="production"&&(kr(),Di(B,"mount"))},xe=(C,S,E)=>{const O=S.component=C.component;if(yy(C,S,E))if(O.asyncDep&&!O.asyncResolved){process.env.NODE_ENV!=="production"&&Lr(S),Z(O,S,E),process.env.NODE_ENV!=="production"&&kr();return}else O.next=S,O.update();else S.el=C.el,O.vnode=S},te=(C,S,E,O,P,T,W)=>{const B=()=>{if(C.isMounted){let{next:$,bu:X,u:le,parent:Ee,vnode:_e}=C;{const js=Th(C);if(js){$&&($.el=_e.el,Z(C,$,W)),js.asyncDep.then(()=>{C.isUnmounted||B()});return}}let Te=$,Qt;process.env.NODE_ENV!=="production"&&Lr($||C.vnode),$o(C,!1),$?($.el=_e.el,Z(C,$,W)):$=_e,X&&Ci(X),(Qt=$.props&&$.props.onVnodeBeforeUpdate)&&Ps(Qt,Ee,$,_e),$o(C,!0),process.env.NODE_ENV!=="production"&&Fi(C,"render");const Ht=Nh(C);process.env.NODE_ENV!=="production"&&Di(C,"render");const $s=C.subTree;C.subTree=Ht,process.env.NODE_ENV!=="production"&&Fi(C,"patch"),f($s,Ht,u($s.el),ye($s),C,P,T),process.env.NODE_ENV!=="production"&&Di(C,"patch"),$.el=Ht.el,Te===null&&by(C,Ht.el),le&&zt(le,P),(Qt=$.props&&$.props.onVnodeUpdated)&&zt(()=>Ps(Qt,Ee,$,_e),P),process.env.NODE_ENV!=="production"&&th(C),process.env.NODE_ENV!=="production"&&kr()}else{let $;const{el:X,props:le}=S,{bm:Ee,m:_e,parent:Te,root:Qt,type:Ht}=C,$s=Ri(S);$o(C,!1),Ee&&Ci(Ee),!$s&&($=le&&le.onVnodeBeforeMount)&&Ps($,Te,S),$o(C,!0);{Qt.ce&&Qt.ce._injectChildStyle(Ht),process.env.NODE_ENV!=="production"&&Fi(C,"render");const js=C.subTree=Nh(C);process.env.NODE_ENV!=="production"&&Di(C,"render"),process.env.NODE_ENV!=="production"&&Fi(C,"patch"),f(null,js,E,O,C,P,T),process.env.NODE_ENV!=="production"&&Di(C,"patch"),S.el=js.el}if(_e&&zt(_e,P),!$s&&($=le&&le.onVnodeMounted)){const js=S;zt(()=>Ps($,Te,js),P)}(S.shapeFlag&256||Te&&Ri(Te.vnode)&&Te.vnode.shapeFlag&256)&&C.a&&zt(C.a,P),C.isMounted=!0,process.env.NODE_ENV!=="production"&&vw(C),S=E=O=null}};C.scope.on();const _=C.effect=new Su(B);C.scope.off();const G=C.update=_.run.bind(_),se=C.job=_.runIfDirty.bind(_);se.i=C,se.id=C.uid,_.scheduler=()=>Gr(se),$o(C,!0),process.env.NODE_ENV!=="production"&&(_.onTrack=C.rtc?$=>Ci(C.rtc,$):void 0,_.onTrigger=C.rtg?$=>Ci(C.rtg,$):void 0),G()},Z=(C,S,E)=>{S.component=C;const O=C.vnode.props;C.vnode=S,C.next=null,Xw(C,S.props,O,E),ry(C,S.children,E),qs(),Xu(C),Xs()},De=(C,S,E,O,P,T,W,B,_=!1)=>{const G=C&&C.children,se=C?C.shapeFlag:0,$=S.children,{patchFlag:X,shapeFlag:le}=S;if(X>0){if(X&128){_t(G,$,E,O,P,T,W,B,_);return}else if(X&256){Ft(G,$,E,O,P,T,W,B,_);return}}le&8?(se&16&&U(G,P,T),$!==G&&c(E,$)):se&16?le&16?_t(G,$,E,O,P,T,W,B,_):U(G,P,T,!0):(se&8&&c(E,""),le&16&&M($,E,O,P,T,W,B,_))},Ft=(C,S,E,O,P,T,W,B,_)=>{C=C||mi,S=S||mi;const G=C.length,se=S.length,$=Math.min(G,se);let X;for(X=0;X<$;X++){const le=S[X]=_?wo(S[X]):us(S[X]);f(C[X],le,E,null,P,T,W,B,_)}G>se?U(C,P,T,!0,!1,$):M(S,E,O,P,T,W,B,_,$)},_t=(C,S,E,O,P,T,W,B,_)=>{let G=0;const se=S.length;let $=C.length-1,X=se-1;for(;G<=$&&G<=X;){const le=C[G],Ee=S[G]=_?wo(S[G]):us(S[G]);if(Dn(le,Ee))f(le,Ee,E,null,P,T,W,B,_);else break;G++}for(;G<=$&&G<=X;){const le=C[$],Ee=S[X]=_?wo(S[X]):us(S[X]);if(Dn(le,Ee))f(le,Ee,E,null,P,T,W,B,_);else break;$--,X--}if(G>$){if(G<=X){const le=X+1,Ee=le<se?S[le].el:O;for(;G<=X;)f(null,S[G]=_?wo(S[G]):us(S[G]),E,Ee,P,T,W,B,_),G++}}else if(G>X)for(;G<=$;)Xt(C[G],P,T,!0),G++;else{const le=G,Ee=G,_e=new Map;for(G=Ee;G<=X;G++){const Et=S[G]=_?wo(S[G]):us(S[G]);Et.key!=null&&(process.env.NODE_ENV!=="production"&&_e.has(Et.key)&&N("Duplicate keys found during update:",JSON.stringify(Et.key),"Make sure keys are unique."),_e.set(Et.key,G))}let Te,Qt=0;const Ht=X-Ee+1;let $s=!1,js=0;const gr=new Array(Ht);for(G=0;G<Ht;G++)gr[G]=0;for(G=le;G<=$;G++){const Et=C[G];if(Qt>=Ht){Xt(Et,P,T,!0);continue}let Ks;if(Et.key!=null)Ks=_e.get(Et.key);else for(Te=Ee;Te<=X;Te++)if(gr[Te-Ee]===0&&Dn(Et,S[Te])){Ks=Te;break}Ks===void 0?Xt(Et,P,T,!0):(gr[Ks-Ee]=G+1,Ks>=js?js=Ks:$s=!0,f(Et,S[Ks],E,null,P,T,W,B,_),Qt++)}const nv=$s?uy(gr):mi;for(Te=nv.length-1,G=Ht-1;G>=0;G--){const Et=Ee+G,Ks=S[Et],rv=Et+1<se?S[Et+1].el:O;gr[G]===0?f(null,Ks,E,rv,P,T,W,B,_):$s&&(Te<0||G!==nv[Te]?ct(Ks,E,rv,2):Te--)}}},ct=(C,S,E,O,P=null)=>{const{el:T,type:W,transition:B,children:_,shapeFlag:G}=C;if(G&6){ct(C.component.subTree,S,E,O);return}if(G&128){C.suspense.move(S,E,O);return}if(G&64){W.move(C,S,E,Bt);return}if(W===Le){o(T,S,E);for(let $=0;$<_.length;$++)ct(_[$],S,E,O);o(C.anchor,S,E);return}if(W===Yr){w(C,S,E);return}if(O!==2&&G&1&&B)if(O===0)B.beforeEnter(T),o(T,S,E),zt(()=>B.enter(T),P);else{const{leave:$,delayLeave:X,afterLeave:le}=B,Ee=()=>o(T,S,E),_e=()=>{$(T,()=>{Ee(),le&&le()})};X?X(T,Ee,_e):_e()}else o(T,S,E)},Xt=(C,S,E,O=!1,P=!1)=>{const{type:T,props:W,ref:B,children:_,dynamicChildren:G,shapeFlag:se,patchFlag:$,dirs:X,cacheIndex:le}=C;if($===-2&&(P=!1),B!=null&&Hr(B,null,E,C,!0),le!=null&&(S.renderCache[le]=void 0),se&256){S.ctx.deactivate(C);return}const Ee=se&1&&X,_e=!Ri(C);let Te;if(_e&&(Te=W&&W.onVnodeBeforeUnmount)&&Ps(Te,S,C),se&6)uu(C.component,E,O);else{if(se&128){C.suspense.unmount(E,O);return}Ee&&zo(C,null,S,"beforeUnmount"),se&64?C.type.remove(C,S,E,Bt,O):G&&!G.hasOnce&&(T!==Le||$>0&&$&64)?U(G,S,E,!1,!0):(T===Le&&$&384||!P&&se&16)&&U(_,S,E),O&&pr(C)}(_e&&(Te=W&&W.onVnodeUnmounted)||Ee)&&zt(()=>{Te&&Ps(Te,S,C),Ee&&zo(C,null,S,"unmounted")},E)},pr=C=>{const{type:S,el:E,anchor:O,transition:P}=C;if(S===Le){process.env.NODE_ENV!=="production"&&C.patchFlag>0&&C.patchFlag&2048&&P&&!P.persisted?C.children.forEach(W=>{W.type===Pt?i(W.el):pr(W)}):cu(E,O);return}if(S===Yr){b(C);return}const T=()=>{i(E),P&&!P.persisted&&P.afterLeave&&P.afterLeave()};if(C.shapeFlag&1&&P&&!P.persisted){const{leave:W,delayLeave:B}=P,_=()=>W(E,T);B?B(C.el,T,_):_()}else T()},cu=(C,S)=>{let E;for(;C!==S;)E=h(C),i(C),C=E;i(S)},uu=(C,S,E)=>{process.env.NODE_ENV!=="production"&&C.type.__hmrId&&pw(C);const{bum:O,scope:P,job:T,subTree:W,um:B,m:_,a:G}=C;Lh(_),Lh(G),O&&Ci(O),P.stop(),T&&(T.flags|=8,Xt(W,C,S,E)),B&&zt(B,S),zt(()=>{C.isUnmounted=!0},S),S&&S.pendingBranch&&!S.isUnmounted&&C.asyncDep&&!C.asyncResolved&&C.suspenseId===S.pendingId&&(S.deps--,S.deps===0&&S.resolve()),process.env.NODE_ENV!=="production"&&yw(C)},U=(C,S,E,O=!1,P=!1,T=0)=>{for(let W=T;W<C.length;W++)Xt(C[W],S,E,O,P)},ye=C=>{if(C.shapeFlag&6)return ye(C.component.subTree);if(C.shapeFlag&128)return C.suspense.next();const S=h(C.anchor||C.el),E=S&&S[xw];return E?h(E):S};let $e=!1;const Dt=(C,S,E)=>{C==null?S._vnode&&Xt(S._vnode,null,null,!0):f(S._vnode||null,C,S,null,null,null,E),S._vnode=C,$e||($e=!0,Xu(),Qu(),$e=!1)},Bt={p:f,um:Xt,m:ct,r:pr,mt:Ge,mc:M,pc:De,pbc:L,n:ye,o:e};return{render:Dt,hydrate:void 0,createApp:Kw(Dt)}}function za({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function $o({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function cy(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function $r(e,t,s=!1){const o=e.children,i=t.children;if(Y(o)&&Y(i))for(let n=0;n<o.length;n++){const r=o[n];let l=i[n];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[n]=wo(i[n]),l.el=r.el),!s&&l.patchFlag!==-2&&$r(r,l)),l.type===Sn&&(l.el=r.el),process.env.NODE_ENV!=="production"&&l.type===Pt&&!l.el&&(l.el=r.el)}}function uy(e){const t=e.slice(),s=[0];let o,i,n,r,l;const a=e.length;for(o=0;o<a;o++){const d=e[o];if(d!==0){if(i=s[s.length-1],e[i]<d){t[o]=i,s.push(o);continue}for(n=0,r=s.length-1;n<r;)l=n+r>>1,e[s[l]]<d?n=l+1:r=l;d<e[s[n]]&&(n>0&&(t[o]=s[n-1]),s[n]=o)}}for(n=s.length,r=s[n-1];n-- >0;)s[n]=r,r=t[r];return s}function Th(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Th(t)}function Lh(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const hy=Symbol.for("v-scx"),py=()=>{{const e=je(hy);return e||process.env.NODE_ENV!=="production"&&N("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function gy(e,t){return Ua(e,null,process.env.NODE_ENV!=="production"?He({},t,{flush:"sync"}):{flush:"sync"})}function St(e,t,s){return process.env.NODE_ENV!=="production"&&!Q(t)&&N("`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."),Ua(e,t,s)}function Ua(e,t,s=be){const{immediate:o,deep:i,flush:n,once:r}=s;process.env.NODE_ENV!=="production"&&!t&&(o!==void 0&&N('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&N('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&N('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const l=He({},s);process.env.NODE_ENV!=="production"&&(l.onWarn=N);const a=t&&o||!t&&n!=="post";let d;if(Mn){if(n==="sync"){const p=py();d=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=Je,p.resume=Je,p.pause=Je,p}}const c=nt;l.call=(p,g,f)=>Ds(p,c,g,f);let u=!1;n==="post"?l.scheduler=p=>{zt(p,c&&c.suspense)}:n!=="sync"&&(u=!0,l.scheduler=(p,g)=>{g?p():Gr(p)}),l.augmentJob=p=>{t&&(p.flags|=4),u&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const h=iw(e,t,l);return Mn&&(d?d.push(h):a&&h()),h}function fy(e,t,s){const o=this.proxy,i=Ve(e)?e.includes(".")?kh(o,e):()=>o[e]:e.bind(o,o);let n;Q(t)?n=t:(n=t.handler,s=t);const r=En(this),l=Ua(i,n.bind(o),s);return r(),l}function kh(e,t){const s=t.split(".");return()=>{let o=e;for(let i=0;i<s.length&&o;i++)o=o[s[i]];return o}}function my(e,t,s=be){const o=yo();if(process.env.NODE_ENV!=="production"&&!o)return N("useModel() called without active instance."),me();const i=mt(t);if(process.env.NODE_ENV!=="production"&&!o.propsOptions[0][i])return N(`useModel() called with prop "${t}" which is not declared.`),me();const n=Mt(t),r=Oh(e,i),l=Uu((a,d)=>{let c,u=be,h;return gy(()=>{const p=e[i];At(c,p)&&(c=p,d())}),{get(){return a(),s.get?s.get(c):c},set(p){const g=s.set?s.set(p):p;if(!At(g,c)&&!(u!==be&&At(p,u)))return;const f=o.vnode.props;f&&(t in f||i in f||n in f)&&(`onUpdate:${t}`in f||`onUpdate:${i}`in f||`onUpdate:${n}`in f)||(c=p,d()),o.emit(`update:${t}`,g),At(p,g)&&At(p,u)&&!At(g,h)&&d(),u=p,h=g}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?r||be:l,done:!1}:{done:!0}}}},l}const Oh=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${mt(t)}Modifiers`]||e[`${Mt(t)}Modifiers`];function Cy(e,t,...s){if(e.isUnmounted)return;const o=e.vnode.props||be;if(process.env.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[u]}=e;if(c)if(!(t in c))(!u||!(No(mt(t))in u))&&N(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${No(mt(t))}" prop.`);else{const h=c[t];Q(h)&&(h(...s)||N(`Invalid event arguments: event validation failed for event "${t}".`))}}let i=s;const n=t.startsWith("update:"),r=n&&Oh(o,t.slice(7));if(r&&(r.trim&&(i=s.map(c=>Ve(c)?c.trim():c)),r.number&&(i=s.map(pv))),process.env.NODE_ENV!=="production"&&Rw(e,t,i),process.env.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&o[No(c)]&&N(`Event "${c}" is emitted in component ${Zr(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 "${Mt(t)}" instead of "${t}".`)}let l,a=o[l=No(t)]||o[l=No(mt(t))];!a&&n&&(a=o[l=No(Mt(t))]),a&&Ds(a,e,6,i);const d=o[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ds(d,e,6,i)}}function Gh(e,t,s=!1){const o=t.emitsCache,i=o.get(e);if(i!==void 0)return i;const n=e.emits;let r={},l=!1;if(!Q(e)){const a=d=>{const c=Gh(d,t,!0);c&&(l=!0,He(r,c))};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!n&&!l?(Me(e)&&o.set(e,null),null):(Y(n)?n.forEach(a=>r[a]=null):He(r,n),Me(e)&&o.set(e,r),r)}function jr(e,t){return!e||!sn(t)?!1:(t=t.slice(2).replace(/Once$/,""),Fe(e,t[0].toLowerCase()+t.slice(1))||Fe(e,Mt(t))||Fe(e,t))}let $a=!1;function Kr(){$a=!0}function Nh(e){const{type:t,vnode:s,proxy:o,withProxy:i,propsOptions:[n],slots:r,attrs:l,emit:a,render:d,renderCache:c,props:u,data:h,setupState:p,ctx:g,inheritAttrs:f}=e,m=Br(e);let v,y;process.env.NODE_ENV!=="production"&&($a=!1);try{if(s.shapeFlag&4){const b=i||o,x=process.env.NODE_ENV!=="production"&&p.__isScriptSetup?new Proxy(b,{get(A,H,M){return N(`Property '${String(H)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(A,H,M)}}):b;v=us(d.call(x,b,c,process.env.NODE_ENV!=="production"?Fs(u):u,p,h,g)),y=l}else{const b=t;process.env.NODE_ENV!=="production"&&l===u&&Kr(),v=us(b.length>1?b(process.env.NODE_ENV!=="production"?Fs(u):u,process.env.NODE_ENV!=="production"?{get attrs(){return Kr(),Fs(l)},slots:r,emit:a}:{attrs:l,slots:r,emit:a}):b(process.env.NODE_ENV!=="production"?Fs(u):u,null)),y=t.props?l:vy(l)}}catch(b){Rn.length=0,pn(b,e,1),v=Pe(Pt)}let R=v,w;if(process.env.NODE_ENV!=="production"&&v.patchFlag>0&&v.patchFlag&2048&&([R,w]=_h(v)),y&&f!==!1){const b=Object.keys(y),{shapeFlag:x}=R;if(b.length){if(x&7)n&&b.some(mr)&&(y=wy(y,n)),R=vo(R,y,!1,!0);else if(process.env.NODE_ENV!=="production"&&!$a&&R.type!==Pt){const A=Object.keys(l),H=[],M=[];for(let z=0,L=A.length;z<L;z++){const ee=A[z];sn(ee)?mr(ee)||H.push(ee[2].toLowerCase()+ee.slice(3)):M.push(ee)}M.length&&N(`Extraneous non-props attributes (${M.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`),H.length&&N(`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 s.dirs&&(process.env.NODE_ENV!=="production"&&!Bh(R)&&N("Runtime directive used on component with non-element root node. The directives will not function as intended."),R=vo(R,null,!1,!0),R.dirs=R.dirs?R.dirs.concat(s.dirs):s.dirs),s.transition&&(process.env.NODE_ENV!=="production"&&!Bh(R)&&N("Component inside <Transition> renders non-element root node that cannot be animated."),Ta(R,s.transition)),process.env.NODE_ENV!=="production"&&w?w(R):v=R,Br(m),v}const _h=e=>{const t=e.children,s=e.dynamicChildren,o=ja(t,!1);if(o){if(process.env.NODE_ENV!=="production"&&o.patchFlag>0&&o.patchFlag&2048)return _h(o)}else return[e,void 0];const i=t.indexOf(o),n=s?s.indexOf(o):-1,r=l=>{t[i]=l,s&&(n>-1?s[n]=l:l.patchFlag>0&&(e.dynamicChildren=[...s,l]))};return[us(o),r]};function ja(e,t=!0){let s;for(let o=0;o<e.length;o++){const i=e[o];if(Fn(i)){if(i.type!==Pt||i.children==="v-if"){if(s)return;if(s=i,process.env.NODE_ENV!=="production"&&t&&s.patchFlag>0&&s.patchFlag&2048)return ja(s.children)}}else return}return s}const vy=e=>{let t;for(const s in e)(s==="class"||s==="style"||sn(s))&&((t||(t={}))[s]=e[s]);return t},wy=(e,t)=>{const s={};for(const o in e)(!mr(o)||!(o.slice(9)in t))&&(s[o]=e[o]);return s},Bh=e=>e.shapeFlag&7||e.type===Pt;function yy(e,t,s){const{props:o,children:i,component:n}=e,{props:r,children:l,patchFlag:a}=t,d=n.emitsOptions;if(process.env.NODE_ENV!=="production"&&(i||l)&&Ms||t.dirs||t.transition)return!0;if(s&&a>=0){if(a&1024)return!0;if(a&16)return o?Hh(o,r,d):!!r;if(a&8){const c=t.dynamicProps;for(let u=0;u<c.length;u++){const h=c[u];if(r[h]!==o[h]&&!jr(d,h))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===r?!1:o?r?Hh(o,r,d):!0:!!r;return!1}function Hh(e,t,s){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const n=o[i];if(t[n]!==e[n]&&!jr(s,n))return!0}return!1}function by({vnode:e,parent:t},s){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o===e)(e=t.vnode).el=s,t=t.parent;else break}}const Vh=e=>e.__isSuspense;function Sy(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):qu(e)}const Le=Symbol.for("v-fgt"),Sn=Symbol.for("v-txt"),Pt=Symbol.for("v-cmt"),Yr=Symbol.for("v-stc"),Rn=[];let Ut=null;function K(e=!1){Rn.push(Ut=e?null:[])}function Ry(){Rn.pop(),Ut=Rn[Rn.length-1]||null}let xn=1;function Wh(e,t=!1){xn+=e,e<0&&Ut&&t&&(Ut.hasOnce=!0)}function zh(e){return e.dynamicChildren=xn>0?Ut||mi:null,Ry(),xn>0&&Ut&&Ut.push(e),e}function J(e,t,s,o,i,n){return zh(q(e,t,s,o,i,n,!0))}function ot(e,t,s,o,i){return zh(Pe(e,t,s,o,i,!0))}function Fn(e){return e?e.__v_isVNode===!0:!1}function Dn(e,t){if(process.env.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const s=Nr.get(t.type);if(s&&s.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const xy=(...e)=>$h(...e),Uh=({key:e})=>e??null,qr=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Ve(e)||We(e)||Q(e)?{i:tt,r:e,k:t,f:!!s}:e:null);function q(e,t=null,s=null,o=0,i=null,n=e===Le?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Uh(t),ref:t&&qr(t),scopeId:oh,slotScopeIds:null,children:s,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:n,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:tt};return l?(Ka(a,s),n&128&&e.normalize(a)):s&&(a.shapeFlag|=Ve(s)?8:16),process.env.NODE_ENV!=="production"&&a.key!==a.key&&N("VNode created with invalid key (NaN). VNode type:",a.type),xn>0&&!r&&Ut&&(a.patchFlag>0||n&6)&&a.patchFlag!==32&&Ut.push(a),a}const Pe=process.env.NODE_ENV!=="production"?xy:$h;function $h(e,t=null,s=null,o=0,i=null,n=!1){if((!e||e===Ow)&&(process.env.NODE_ENV!=="production"&&!e&&N(`Invalid vnode type when creating vnode: ${e}.`),e=Pt),Fn(e)){const l=vo(e,t,!0);return s&&Ka(l,s),xn>0&&!n&&Ut&&(l.shapeFlag&6?Ut[Ut.indexOf(e)]=l:Ut.push(l)),l.patchFlag=-2,l}if(ep(e)&&(e=e.__vccOpts),t){t=Fy(t);let{class:l,style:a}=t;l&&!Ve(l)&&(t.class=as(l)),Me(a)&&(wi(a)&&!Y(a)&&(a=He({},a)),t.style=_o(a))}const r=Ve(e)?1:Vh(e)?128:Fw(e)?64:Me(e)?4:Q(e)?2:0;return process.env.NODE_ENV!=="production"&&r&4&&wi(e)&&(e=ce(e),N("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`.",`
19
+ Component that was made reactive: `,e)),q(e,t,s,o,i,r,n,!0)}function Fy(e){return e?wi(e)||Sh(e)?He({},e):e:null}function vo(e,t,s=!1,o=!1){const{props:i,ref:n,patchFlag:r,children:l,transition:a}=e,d=t?Kh(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Uh(d),ref:t&&t.ref?s&&n?Y(n)?n.concat(qr(t)):[n,qr(t)]:qr(t):n,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&r===-1&&Y(l)?l.map(jh):l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Le?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&vo(e.ssContent),ssFallback:e.ssFallback&&vo(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Ta(c,a.clone(c)),c}function jh(e){const t=vo(e);return Y(e.children)&&(t.children=e.children.map(jh)),t}function jo(e=" ",t=0){return Pe(Sn,null,e,t)}function at(e="",t=!1){return t?(K(),ot(Pt,null,e)):Pe(Pt,null,e)}function us(e){return e==null||typeof e=="boolean"?Pe(Pt):Y(e)?Pe(Le,null,e.slice()):Fn(e)?wo(e):Pe(Sn,null,String(e))}function wo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:vo(e)}function Ka(e,t){let s=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(Y(t))s=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),Ka(e,i()),i._c&&(i._d=!0));return}else{s=32;const i=t._;!i&&!Sh(t)?t._ctx=tt:i===3&&tt&&(tt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Q(t)?(t={default:t,_ctx:tt},s=32):(t=String(t),o&64?(s=16,t=[jo(t)]):s=8);e.children=t,e.shapeFlag|=s}function Kh(...e){const t={};for(let s=0;s<e.length;s++){const o=e[s];for(const i in o)if(i==="class")t.class!==o.class&&(t.class=as([t.class,o.class]));else if(i==="style")t.style=_o([t.style,o.style]);else if(sn(i)){const n=t[i],r=o[i];r&&n!==r&&!(Y(n)&&n.includes(r))&&(t[i]=n?[].concat(n,r):r)}else i!==""&&(t[i]=o[i])}return t}function Ps(e,t,s,o=null){Ds(e,t,7,[s,o])}const Dy=wh();let Ey=0;function My(e,t,s){const o=e.type,i=(t?t.appContext:e.appContext)||Dy,n={uid:Ey++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Dv(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:xh(o,i),emitsOptions:Gh(o,i),emit:null,emitted:null,propsDefaults:be,inheritAttrs:o.inheritAttrs,ctx:be,data:be,props:be,attrs:be,slots:be,refs:be,setupState:be,setupContext:null,suspense:s,suspenseId:s?s.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 process.env.NODE_ENV!=="production"?n.ctx=Gw(n):n.ctx={_:n},n.root=t?t.root:n,n.emit=Cy.bind(null,n),e.ce&&e.ce(n),n}let nt=null;const yo=()=>nt||tt;let Xr,Ya;{const e=rn(),t=(s,o)=>{let i;return(i=e[s])||(i=e[s]=[]),i.push(o),n=>{i.length>1?i.forEach(r=>r(n)):i[0](n)}};Xr=t("__VUE_INSTANCE_SETTERS__",s=>nt=s),Ya=t("__VUE_SSR_SETTERS__",s=>Mn=s)}const En=e=>{const t=nt;return Xr(e),e.scope.on(),()=>{e.scope.off(),Xr(t)}},Yh=()=>{nt&&nt.scope.off(),Xr(null)},Ay=Ys("slot,component");function qa(e,{isNativeTag:t}){(Ay(e)||t(e))&&N("Do not use built-in or reserved HTML elements as component id: "+e)}function qh(e){return e.vnode.shapeFlag&4}let Mn=!1;function Py(e,t=!1,s=!1){t&&Ya(t);const{props:o,children:i}=e.vnode,n=qh(e);Yw(e,o,n,t),ny(e,i,s);const r=n?Iy(e,t):void 0;return t&&Ya(!1),r}function Iy(e,t){var s;const o=e.type;if(process.env.NODE_ENV!=="production"){if(o.name&&qa(o.name,e.appContext.config),o.components){const n=Object.keys(o.components);for(let r=0;r<n.length;r++)qa(n[r],e.appContext.config)}if(o.directives){const n=Object.keys(o.directives);for(let r=0;r<n.length;r++)ih(n[r])}o.compilerOptions&&Ty()&&N('"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,hh),process.env.NODE_ENV!=="production"&&Nw(e);const{setup:i}=o;if(i){qs();const n=e.setupContext=i.length>1?ky(e):null,r=En(e),l=yi(i,e,0,[process.env.NODE_ENV!=="production"?Fs(e.props):e.props,n]),a=ca(l);if(Xs(),r(),(a||e.sp)&&!Ri(e)&&rh(e),a){if(l.then(Yh,Yh),t)return l.then(d=>{Xh(e,d,t)}).catch(d=>{pn(d,e,0)});if(e.asyncDep=l,process.env.NODE_ENV!=="production"&&!e.suspense){const d=(s=o.name)!=null?s:"Anonymous";N(`Component <${d}>: 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 Xh(e,l,t)}else Qh(e,t)}function Xh(e,t,s){Q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Me(t)?(process.env.NODE_ENV!=="production"&&Fn(t)&&N("setup() should not return VNodes directly - return a render function instead."),process.env.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=zu(t),process.env.NODE_ENV!=="production"&&_w(e)):process.env.NODE_ENV!=="production"&&t!==void 0&&N(`setup() should return an object. Received: ${t===null?"null":typeof t}`),Qh(e,s)}const Ty=()=>!0;function Qh(e,t,s){const o=e.type;e.render||(e.render=o.render||Je);{const i=En(e);qs();try{Vw(e)}finally{Xs(),i()}}process.env.NODE_ENV!=="production"&&!o.render&&e.render===Je&&!t&&(o.template?N('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".'):N("Component is missing template or render function: ",o))}const Zh=process.env.NODE_ENV!=="production"?{get(e,t){return Kr(),et(e,"get",""),e[t]},set(){return N("setupContext.attrs is readonly."),!1},deleteProperty(){return N("setupContext.attrs is readonly."),!1}}:{get(e,t){return et(e,"get",""),e[t]}};function Ly(e){return new Proxy(e.slots,{get(t,s){return et(e,"get","$slots"),t[s]}})}function ky(e){const t=s=>{if(process.env.NODE_ENV!=="production"&&(e.exposed&&N("expose() should be called only once per setup()."),s!=null)){let o=typeof s;o==="object"&&(Y(s)?o="array":We(s)&&(o="ref")),o!=="object"&&N(`expose() should be passed a plain object, received ${o}.`)}e.exposed=s||{}};if(process.env.NODE_ENV!=="production"){let s,o;return Object.freeze({get attrs(){return s||(s=new Proxy(e.attrs,Zh))},get slots(){return o||(o=Ly(e))},get emit(){return(i,...n)=>e.emit(i,...n)},expose:t})}else return{attrs:new Proxy(e.attrs,Zh),slots:e.slots,emit:e.emit,expose:t}}function Qr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(zu(Vu(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Uo)return Uo[s](e)},has(t,s){return s in t||s in Uo}})):e.proxy}const Oy=/(?:^|[-_])(\w)/g,Gy=e=>e.replace(Oy,t=>t.toUpperCase()).replace(/[-_]/g,"");function Jh(e,t=!0){return Q(e)?e.displayName||e.name:e.name||t&&e.__name}function Zr(e,t,s=!1){let o=Jh(t);if(!o&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(o=i[1])}if(!o&&e&&e.parent){const i=n=>{for(const r in n)if(n[r]===t)return r};o=i(e.components||e.parent.type.components)||i(e.appContext.components)}return o?Gy(o):s?"App":"Anonymous"}function ep(e){return Q(e)&&"__vccOpts"in e}const ge=(e,t)=>{const s=sw(e,t,Mn);if(process.env.NODE_ENV!=="production"){const o=yo();o&&o.appContext.config.warnRecursiveComputed&&(s._warnRecursive=!0)}return s};function Ny(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},s={style:"color:#f5222d"},o={style:"color:#eb2f96"},i={__vue_custom_formatter:!0,header(u){return Me(u)?u.__isVue?["div",e,"VueInstance"]:We(u)?["div",{},["span",e,c(u)],"<",l("_value"in u?u._value:u),">"]:fo(u)?["div",{},["span",e,vt(u)?"ShallowReactive":"Reactive"],"<",l(u),`>${Zs(u)?" (readonly)":""}`]:Zs(u)?["div",{},["span",e,vt(u)?"ShallowReadonly":"Readonly"],"<",l(u),">"]:null:null},hasBody(u){return u&&u.__isVue},body(u){if(u&&u.__isVue)return["div",{},...n(u.$)]}};function n(u){const h=[];u.type.props&&u.props&&h.push(r("props",ce(u.props))),u.setupState!==be&&h.push(r("setup",u.setupState)),u.data!==be&&h.push(r("data",ce(u.data)));const p=a(u,"computed");p&&h.push(r("computed",p));const g=a(u,"inject");return g&&h.push(r("injected",g)),h.push(["div",{},["span",{style:o.style+";opacity:0.66"},"$ (internal): "],["object",{object:u}]]),h}function r(u,h){return h=He({},h),Object.keys(h).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},u],["div",{style:"padding-left:1.25em"},...Object.keys(h).map(p=>["div",{},["span",o,p+": "],l(h[p],!1)])]]:["span",{}]}function l(u,h=!0){return typeof u=="number"?["span",t,u]:typeof u=="string"?["span",s,JSON.stringify(u)]:typeof u=="boolean"?["span",o,u]:Me(u)?["object",{object:h?ce(u):u}]:["span",s,String(u)]}function a(u,h){const p=u.type;if(Q(p))return;const g={};for(const f in u.ctx)d(p,f,h)&&(g[f]=u.ctx[f]);return g}function d(u,h,p){const g=u[p];if(Y(g)&&g.includes(h)||Me(g)&&h in g||u.extends&&d(u.extends,h,p)||u.mixins&&u.mixins.some(f=>d(f,h,p)))return!0}function c(u){return vt(u)?"ShallowRef":u.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(i):window.devtoolsFormatters=[i]}const tp="3.5.13",es=process.env.NODE_ENV!=="production"?N:Je;process.env.NODE_ENV,process.env.NODE_ENV;/**
20
+ * @vue/runtime-dom v3.5.13
21
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
22
+ * @license MIT
23
+ **/let Xa;const sp=typeof window<"u"&&window.trustedTypes;if(sp)try{Xa=sp.createPolicy("vue",{createHTML:e=>e})}catch(e){process.env.NODE_ENV!=="production"&&es(`Error creating trusted types policy: ${e}`)}const op=Xa?e=>Xa.createHTML(e):e=>e,_y="http://www.w3.org/2000/svg",By="http://www.w3.org/1998/Math/MathML",so=typeof document<"u"?document:null,ip=so&&so.createElement("template"),Hy={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,o)=>{const i=t==="svg"?so.createElementNS(_y,e):t==="mathml"?so.createElementNS(By,e):s?so.createElement(e,{is:s}):so.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>so.createTextNode(e),createComment:e=>so.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>so.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,o,i,n){const r=s?s.previousSibling:t.lastChild;if(i&&(i===n||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===n||!(i=i.nextSibling)););else{ip.innerHTML=op(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=ip.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Vy=Symbol("_vtc");function Wy(e,t,s){const o=e[Vy];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const np=Symbol("_vod"),zy=Symbol("_vsh");process.env.NODE_ENV;const Uy=Symbol(process.env.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),$y=/(^|;)\s*display\s*:/;function jy(e,t,s){const o=e.style,i=Ve(s);let n=!1;if(s&&!i){if(t)if(Ve(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();s[l]==null&&Jr(o,l,"")}else for(const r in t)s[r]==null&&Jr(o,r,"");for(const r in s)r==="display"&&(n=!0),Jr(o,r,s[r])}else if(i){if(t!==s){const r=o[Uy];r&&(s+=";"+r),o.cssText=s,n=$y.test(s)}}else t&&e.removeAttribute("style");np in e&&(e[np]=n?o.display:"",e[zy]&&(o.display="none"))}const Ky=/[^\\];\s*$/,rp=/\s*!important$/;function Jr(e,t,s){if(Y(s))s.forEach(o=>Jr(e,t,o));else if(s==null&&(s=""),process.env.NODE_ENV!=="production"&&Ky.test(s)&&es(`Unexpected semicolon at the end of '${t}' style value: '${s}'`),t.startsWith("--"))e.setProperty(t,s);else{const o=Yy(e,t);rp.test(s)?e.setProperty(Mt(o),s.replace(rp,""),"important"):e[o]=s}}const lp=["Webkit","Moz","ms"],Qa={};function Yy(e,t){const s=Qa[t];if(s)return s;let o=mt(t);if(o!=="filter"&&o in e)return Qa[t]=o;o=yr(o);for(let i=0;i<lp.length;i++){const n=lp[i]+o;if(n in e)return Qa[t]=n}return t}const ap="http://www.w3.org/1999/xlink";function dp(e,t,s,o,i,n=xv(t)){o&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(ap,t.slice(6,t.length)):e.setAttributeNS(ap,t,s):s==null||n&&!Cu(s)?e.removeAttribute(t):e.setAttribute(t,n?"":ls(s)?String(s):s)}function cp(e,t,s,o,i){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?op(s):s);return}const n=e.tagName;if(t==="value"&&n!=="PROGRESS"&&!n.includes("-")){const l=n==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(l!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let r=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=Cu(s):s==null&&l==="string"?(s="",r=!0):l==="number"&&(s=0,r=!0)}try{e[t]=s}catch(l){process.env.NODE_ENV!=="production"&&!r&&es(`Failed setting prop "${t}" on <${n.toLowerCase()}>: value ${s} is invalid.`,l)}r&&e.removeAttribute(i||t)}function up(e,t,s,o){e.addEventListener(t,s,o)}function qy(e,t,s,o){e.removeEventListener(t,s,o)}const hp=Symbol("_vei");function Xy(e,t,s,o,i=null){const n=e[hp]||(e[hp]={}),r=n[t];if(o&&r)r.value=process.env.NODE_ENV!=="production"?gp(o,t):o;else{const[l,a]=Qy(t);if(o){const d=n[t]=eb(process.env.NODE_ENV!=="production"?gp(o,t):o,i);up(e,l,d,a)}else r&&(qy(e,l,r,a),n[t]=void 0)}}const pp=/(?:Once|Passive|Capture)$/;function Qy(e){let t;if(pp.test(e)){t={};let o;for(;o=e.match(pp);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Mt(e.slice(2)),t]}let Za=0;const Zy=Promise.resolve(),Jy=()=>Za||(Zy.then(()=>Za=0),Za=Date.now());function eb(e,t){const s=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=s.attached)return;Ds(tb(o,s.value),t,5,[o])};return s.value=e,s.attached=Jy(),s}function gp(e,t){return Q(e)||Y(e)?e:(es(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
24
+ Expected function or array of functions, received type ${typeof e}.`),Je)}function tb(e,t){if(Y(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const fp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,sb=(e,t,s,o,i,n)=>{const r=i==="svg";t==="class"?Wy(e,o,r):t==="style"?jy(e,s,o):sn(t)?mr(t)||Xy(e,t,s,o,n):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ob(e,t,o,r))?(cp(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&dp(e,t,o,r,n,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ve(o))?cp(e,mt(t),o,n,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),dp(e,t,o,r))};function ob(e,t,s,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&fp(t)&&Q(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return fp(t)&&Ve(s)?!1:t in e}const mp={};/*! #__NO_SIDE_EFFECTS__ */function ib(e,t,s){const o=st(e,t);vr(o)&&He(o,t);class i extends Ja{constructor(r){super(o,r,s)}}return i.def=o,i}const nb=typeof HTMLElement<"u"?HTMLElement:class{};class Ja extends nb{constructor(t,s={},o=Rp){super(),this._def=t,this._props=s,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&o!==Rp?this._root=this.shadowRoot:(process.env.NODE_ENV!=="production"&&this.shadowRoot&&es("Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use `defineSSRCustomElement`."),t.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this),this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Ja){this._parent=t;break}this._instance||(this._resolved?(this._setParent(),this._update()):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._instance.provides=t._instance.provides)}disconnectedCallback(){this._connected=!1,gn(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o<this.attributes.length;o++)this._setAttr(this.attributes[o].name);this._ob=new MutationObserver(o=>{for(const i of o)this._setAttr(i.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(o,i=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:n,styles:r}=o;let l;if(n&&!Y(n))for(const a in n){const d=n[a];(d===Number||d&&d.type===Number)&&(a in this._props&&(this._props[a]=fu(this._props[a])),(l||(l=Object.create(null)))[mt(a)]=!0)}this._numberProps=l,i&&this._resolveProps(o),this.shadowRoot?this._applyStyles(r):process.env.NODE_ENV!=="production"&&r&&es("Custom element style injection is not supported when using shadowRoot: false"),this._mount(o)},s=this._def.__asyncLoader;s?this._pendingResolve=s().then(o=>t(this._def=o,!0)):t(this._def)}_mount(t){process.env.NODE_ENV!=="production"&&!t.name&&(t.name="VueElement"),this._app=this._createApp(t),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const s=this._instance&&this._instance.exposed;if(s)for(const o in s)Fe(this,o)?process.env.NODE_ENV!=="production"&&es(`Exposed property "${o}" already exists on custom element.`):Object.defineProperty(this,o,{get:()=>Ae(s[o])})}_resolveProps(t){const{props:s}=t,o=Y(s)?s:Object.keys(s||{});for(const i of Object.keys(this))i[0]!=="_"&&o.includes(i)&&this._setProp(i,this[i]);for(const i of o.map(mt))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(n){this._setProp(i,n,!0,!0)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const s=this.hasAttribute(t);let o=s?this.getAttribute(t):mp;const i=mt(t);s&&this._numberProps&&this._numberProps[i]&&(o=fu(o)),this._setProp(i,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,s,o=!0,i=!1){if(s!==this._props[t]&&(s===mp?delete this._props[t]:(this._props[t]=s,t==="key"&&this._app&&(this._app._ceVNode.key=s)),i&&this._instance&&this._update(),o)){const n=this._ob;n&&n.disconnect(),s===!0?this.setAttribute(Mt(t),""):typeof s=="string"||typeof s=="number"?this.setAttribute(Mt(t),s+""):s||this.removeAttribute(Mt(t)),n&&n.observe(this,{attributes:!0})}}_update(){td(this._createVNode(),this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const s=Pe(this._def,He(t,this._props));return this._instance||(s.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0,process.env.NODE_ENV!=="production"&&(o.ceReload=n=>{this._styles&&(this._styles.forEach(r=>this._root.removeChild(r)),this._styles.length=0),this._applyStyles(n),this._instance=null,this._update()});const i=(n,r)=>{this.dispatchEvent(new CustomEvent(n,vr(r[0])?He({detail:r},r[0]):{detail:r}))};o.emit=(n,...r)=>{i(n,r),Mt(n)!==n&&i(Mt(n),r)},this._setParent()}),s}_applyStyles(t,s){if(!t)return;if(s){if(s===this._def||this._styleChildren.has(s))return;this._styleChildren.add(s)}const o=this._nonce;for(let i=t.length-1;i>=0;i--){const n=document.createElement("style");if(o&&n.setAttribute("nonce",o),n.textContent=t[i],this.shadowRoot.prepend(n),process.env.NODE_ENV!=="production")if(s){if(s.__hmrId){this._childStyles||(this._childStyles=new Map);let r=this._childStyles.get(s.__hmrId);r||this._childStyles.set(s.__hmrId,r=[]),r.push(n)}}else(this._styles||(this._styles=[])).push(n)}}_parseSlots(){const t=this._slots={};let s;for(;s=this.firstChild;){const o=s.nodeType===1&&s.getAttribute("slot")||"default";(t[o]||(t[o]=[])).push(s),this.removeChild(s)}}_renderSlots(){const t=(this._teleportTarget||this).querySelectorAll("slot"),s=this._instance.type.__scopeId;for(let o=0;o<t.length;o++){const i=t[o],n=i.getAttribute("name")||"default",r=this._slots[n],l=i.parentNode;if(r)for(const a of r){if(s&&a.nodeType===1){const d=s+"-s",c=document.createTreeWalker(a,1);a.setAttribute(d,"");let u;for(;u=c.nextNode();)u.setAttribute(d,"")}l.insertBefore(a,i)}else for(;i.firstChild;)l.insertBefore(i.firstChild,i);l.removeChild(i)}}_injectChildStyle(t){this._applyStyles(t.styles,t)}_removeChildStyle(t){if(process.env.NODE_ENV!=="production"&&(this._styleChildren.delete(t),this._childStyles&&t.__hmrId)){const s=this._childStyles.get(t.__hmrId);s&&(s.forEach(o=>this._root.removeChild(o)),s.length=0)}}}const Cp=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Y(t)?s=>Ci(t,s):t},ed=Symbol("_assign"),rb={deep:!0,created(e,t,s){e[ed]=Cp(s),up(e,"change",()=>{const o=e._modelValue,i=lb(e),n=e.checked,r=e[ed];if(Y(o)){const l=vu(o,i),a=l!==-1;if(n&&!a)r(o.concat(i));else if(!n&&a){const d=[...o];d.splice(l,1),r(d)}}else if(Cr(o)){const l=new Set(o);n?l.add(i):l.delete(i),r(l)}else r(wp(e,n))})},mounted:vp,beforeUpdate(e,t,s){e[ed]=Cp(s),vp(e,t,s)}};function vp(e,{value:t,oldValue:s},o){e._modelValue=t;let i;if(Y(t))i=vu(t,o.props.value)>-1;else if(Cr(t))i=t.has(o.props.value);else{if(t===s)return;i=Sr(t,wp(e,!0))}e.checked!==i&&(e.checked=i)}function lb(e){return"_value"in e?e._value:e.value}function wp(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const ab=["ctrl","shift","alt","meta"],db={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)=>ab.some(s=>e[`${s}Key`]&&!t.includes(s))},yp=(e,t)=>{const s=e._withMods||(e._withMods={}),o=t.join(".");return s[o]||(s[o]=(i,...n)=>{for(let r=0;r<t.length;r++){const l=db[t[r]];if(l&&l(i,t))return}return e(i,...n)})},cb=He({patchProp:sb},Hy);let bp;function Sp(){return bp||(bp=ay(cb))}const td=(...e)=>{Sp().render(...e)},Rp=(...e)=>{const t=Sp().createApp(...e);process.env.NODE_ENV!=="production"&&(hb(t),pb(t));const{mount:s}=t;return t.mount=o=>{const i=gb(o);if(!i)return;const n=t._component;!Q(n)&&!n.render&&!n.template&&(n.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=s(i,!1,ub(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t};function ub(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function hb(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>bv(t)||Sv(t)||Rv(t),writable:!1})}function pb(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){es("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const s=e.config.compilerOptions,o='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 es(o),s},set(){es(o)}})}}function gb(e){if(Ve(e)){const t=document.querySelector(e);return process.env.NODE_ENV!=="production"&&!t&&es(`Failed to mount app: mount target selector "${e}" returned null.`),t}return process.env.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&es('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}/**
25
+ * vue v3.5.13
26
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
27
+ * @license MIT
28
+ **/function fb(){Ny()}process.env.NODE_ENV!=="production"&&fb();const mb=["disabled"],Ko=st({__name:"PvButton",props:{variant:{default:"primary",type:null},disabled:{type:Boolean},size:{type:String},inverse:{type:Boolean,default:!1},shadow:{type:Boolean,default:!1}},setup(e){const t=ge(()=>({[`pv-button-${e.variant}`]:!0,[`pv-button-${e.size}`]:!!e.size,"pv-button-inverse":e.inverse,"pv-button-shadow":e.shadow}));return(s,o)=>(K(),J("button",{type:"button",class:as(t.value),disabled:s.disabled},[vn(s.$slots,"default")],10,mb))}}),Cb=st({__name:"PvBadge",props:{label:{default:"",type:String},variant:{default:"primary",type:String}},setup(e){const t=e,s=ge(()=>t.variant=="release-alpha"?"ALPHA":t.variant=="release-beta"?"BETA":t.label),o=ge(()=>({"pv-inline-block pv-inset-square pv-radius pv-text-body-xxs pv-text-center":!0,"pv-surface-brand-inverse pv-text-inverse":t.variant=="primary","pv-surface-accent":t.variant=="secondary","pv-surface":t.variant=="ghost","pv-badge":!t.variant.includes("release"),"pv-badge-release-alpha":t.variant=="release-alpha","pv-badge-release-beta":t.variant=="release-beta"}));return(i,n)=>(K(),J("div",{class:as(o.value)},qe(s.value),3))}}),vb=".pv-badge[data-v-552660ff]{--inset-size: 2px 4px;min-width:20px;font-weight:500}.pv-badge-release-alpha[data-v-552660ff]{--inset-size: 2px 8px;background:#ffeb99;font-weight:600}.pv-badge-release-beta[data-v-552660ff]{--inset-size: 2px 8px;background:#e8daff;font-weight:600}",bo=(e,t)=>{const s=e.__vccOpts||e;for(const[o,i]of t)s[o]=i;return s},An=bo(Cb,[["styles",[vb]],["__scopeId","data-v-552660ff"]]),wb=["xlink:href"],yb=[void 0,10,20,24,32,64],It=st({__name:"PvIcon",props:{name:{type:String},size:{type:null}},setup(e){const t=e,s=ge(()=>({"pv-icon":!0,[`pv-icon-${t.size}`]:yb.includes(t.size)}));return(o,i)=>(K(),J("svg",{"aria-hidden":"true",class:as(s.value)},[q("use",{"xlink:href":`#${o.name}`},null,8,wb)],2))}}),bb={class:"pv-text-body-xxs"},xp=bo(st({__name:"PvChip",props:{label:{type:String},variant:{default:"secondary",type:String},removable:{type:Boolean,default:!1}},emits:["remove-tag"],setup(e,{emit:t}){const s=t,o=me(!1);return(i,n)=>(K(),J("div",{class:as(["pv-flex-inline pv-tag",{"pv-tag-hover":o.value}]),style:{"border-radius":"2rem"}},[q("span",bb,qe(i.label),1),Pe(It,{name:"close",style:{cursor:"pointer"},onClick:n[0]||(n[0]=r=>s("remove-tag")),onMouseenter:n[1]||(n[1]=r=>o.value=!0),onMouseleave:n[2]||(n[2]=r=>o.value=!1)})],2))}}),[["styles",[".pv-tag-hover[data-v-4bfc761f]{border-color:#176f6f}"]],["__scopeId","data-v-4bfc761f"]]);function sd(e){return bu()?(Ev(e),!0):!1}const od=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Sb=Object.prototype.toString,Rb=e=>Sb.call(e)==="[object Object]",Yo=()=>{},id=xb();function xb(){var e,t;return od&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Fp(...e){if(e.length!==1)return ew(...e);const t=e[0];return typeof t=="function"?Ar(Uu(()=>({get:t,set:Yo}))):me(t)}function nd(e){return Array.isArray(e)?e:[e]}function Fb(e){return yo()}function Db(e,t=!0,s){Fb()?to(e,s):t?e():gn(e)}function Eb(e,t,s){return St(e,t,{...s,immediate:!0})}const Mb=od?window.document:void 0;function Ab(e){var t;const s=Wt(e);return(t=s?.$el)!=null?t:s}/**!
29
+ * Sortable 1.15.6
30
+ * @author RubaXa <trash@rubaxa.org>
31
+ * @author owenm <owen23355@gmail.com>
32
+ * @license MIT
33
+ */function Dp(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),s.push.apply(s,o)}return s}function Is(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Dp(Object(s),!0).forEach(function(o){Pb(e,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Dp(Object(s)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(s,o))})}return e}function el(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?el=function(t){return typeof t}:el=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},el(e)}function Pb(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function oo(){return oo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},oo.apply(this,arguments)}function Ib(e,t){if(e==null)return{};var s={},o=Object.keys(e),i,n;for(n=0;n<o.length;n++)i=o[n],!(t.indexOf(i)>=0)&&(s[i]=e[i]);return s}function Tb(e,t){if(e==null)return{};var s=Ib(e,t),o,i;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}var Lb="1.15.6";function io(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var no=io(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Pn=io(/Edge/i),Ep=io(/firefox/i),In=io(/safari/i)&&!io(/chrome/i)&&!io(/android/i),rd=io(/iP(ad|od|hone)/i),Mp=io(/chrome/i)&&io(/android/i),Ap={capture:!1,passive:!1};function Se(e,t,s){e.addEventListener(t,s,!no&&Ap)}function we(e,t,s){e.removeEventListener(t,s,!no&&Ap)}function tl(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Pp(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function hs(e,t,s,o){if(e){s=s||document;do{if(t!=null&&(t[0]===">"?e.parentNode===s&&tl(e,t):tl(e,t))||o&&e===s)return e;if(e===s)break}while(e=Pp(e))}return null}var Ip=/\s+/g;function $t(e,t,s){if(e&&t)if(e.classList)e.classList[s?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(Ip," ").replace(" "+t+" "," ");e.className=(o+(s?" "+t:"")).replace(Ip," ")}}function oe(e,t,s){var o=e&&e.style;if(o){if(s===void 0)return document.defaultView&&document.defaultView.getComputedStyle?s=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(s=e.currentStyle),t===void 0?s:s[t];!(t in o)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),o[t]=s+(typeof s=="string"?"":"px")}}function Ei(e,t){var s="";if(typeof e=="string")s=e;else do{var o=oe(e,"transform");o&&o!=="none"&&(s=o+" "+s)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(s)}function Tp(e,t,s){if(e){var o=e.getElementsByTagName(t),i=0,n=o.length;if(s)for(;i<n;i++)s(o[i],i);return o}return[]}function Ts(){var e=document.scrollingElement;return e||document.documentElement}function Qe(e,t,s,o,i){if(!(!e.getBoundingClientRect&&e!==window)){var n,r,l,a,d,c,u;if(e!==window&&e.parentNode&&e!==Ts()?(n=e.getBoundingClientRect(),r=n.top,l=n.left,a=n.bottom,d=n.right,c=n.height,u=n.width):(r=0,l=0,a=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(t||s)&&e!==window&&(i=i||e.parentNode,!no))do if(i&&i.getBoundingClientRect&&(oe(i,"transform")!=="none"||s&&oe(i,"position")!=="static")){var h=i.getBoundingClientRect();r-=h.top+parseInt(oe(i,"border-top-width")),l-=h.left+parseInt(oe(i,"border-left-width")),a=r+n.height,d=l+n.width;break}while(i=i.parentNode);if(o&&e!==window){var p=Ei(i||e),g=p&&p.a,f=p&&p.d;p&&(r/=f,l/=g,u/=g,c/=f,a=r+c,d=l+u)}return{top:r,left:l,bottom:a,right:d,width:u,height:c}}}function Lp(e,t,s){for(var o=So(e,!0),i=Qe(e)[t];o;){var n=Qe(o)[s],r=void 0;if(r=i>=n,!r)return o;if(o===Ts())break;o=So(o,!1)}return!1}function Mi(e,t,s,o){for(var i=0,n=0,r=e.children;n<r.length;){if(r[n].style.display!=="none"&&r[n]!==ie.ghost&&(o||r[n]!==ie.dragged)&&hs(r[n],s.draggable,e,!1)){if(i===t)return r[n];i++}n++}return null}function ld(e,t){for(var s=e.lastElementChild;s&&(s===ie.ghost||oe(s,"display")==="none"||t&&!tl(s,t));)s=s.previousElementSibling;return s||null}function ts(e,t){var s=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==ie.clone&&(!t||tl(e,t))&&s++;return s}function kp(e){var t=0,s=0,o=Ts();if(e)do{var i=Ei(e),n=i.a,r=i.d;t+=e.scrollLeft*n,s+=e.scrollTop*r}while(e!==o&&(e=e.parentNode));return[t,s]}function kb(e,t){for(var s in e)if(e.hasOwnProperty(s)){for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[s][o])return Number(s)}return-1}function So(e,t){if(!e||!e.getBoundingClientRect)return Ts();var s=e,o=!1;do if(s.clientWidth<s.scrollWidth||s.clientHeight<s.scrollHeight){var i=oe(s);if(s.clientWidth<s.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||s.clientHeight<s.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!s.getBoundingClientRect||s===document.body)return Ts();if(o||t)return s;o=!0}}while(s=s.parentNode);return Ts()}function Ob(e,t){if(e&&t)for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s]);return e}function ad(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var Tn;function Op(e,t){return function(){if(!Tn){var s=arguments,o=this;s.length===1?e.call(o,s[0]):e.apply(o,s),Tn=setTimeout(function(){Tn=void 0},t)}}}function Gb(){clearTimeout(Tn),Tn=void 0}function Gp(e,t,s){e.scrollLeft+=t,e.scrollTop+=s}function Np(e){var t=window.Polymer,s=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):s?s(e).clone(!0)[0]:e.cloneNode(!0)}function _p(e,t,s){var o={};return Array.from(e.children).forEach(function(i){var n,r,l,a;if(!(!hs(i,t.draggable,e,!1)||i.animated||i===s)){var d=Qe(i);o.left=Math.min((n=o.left)!==null&&n!==void 0?n:1/0,d.left),o.top=Math.min((r=o.top)!==null&&r!==void 0?r:1/0,d.top),o.right=Math.max((l=o.right)!==null&&l!==void 0?l:-1/0,d.right),o.bottom=Math.max((a=o.bottom)!==null&&a!==void 0?a:-1/0,d.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var Tt="Sortable"+new Date().getTime();function Nb(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(i){if(!(oe(i,"display")==="none"||i===ie.ghost)){e.push({target:i,rect:Qe(i)});var n=Is({},e[e.length-1].rect);if(i.thisAnimationDuration){var r=Ei(i,!0);r&&(n.top-=r.f,n.left-=r.e)}i.fromRect=n}})}},addAnimationState:function(o){e.push(o)},removeAnimationState:function(o){e.splice(kb(e,{target:o}),1)},animateAll:function(o){var i=this;if(!this.options.animation){clearTimeout(t),typeof o=="function"&&o();return}var n=!1,r=0;e.forEach(function(l){var a=0,d=l.target,c=d.fromRect,u=Qe(d),h=d.prevFromRect,p=d.prevToRect,g=l.rect,f=Ei(d,!0);f&&(u.top-=f.f,u.left-=f.e),d.toRect=u,d.thisAnimationDuration&&ad(h,u)&&!ad(c,u)&&(g.top-u.top)/(g.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(a=Bb(g,h,p,i.options)),ad(u,c)||(d.prevFromRect=c,d.prevToRect=u,a||(a=i.options.animation),i.animate(d,g,u,a)),a&&(n=!0,r=Math.max(r,a),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},a),d.thisAnimationDuration=a)}),clearTimeout(t),n?t=setTimeout(function(){typeof o=="function"&&o()},r):typeof o=="function"&&o(),e=[]},animate:function(o,i,n,r){if(r){oe(o,"transition",""),oe(o,"transform","");var l=Ei(this.el),a=l&&l.a,d=l&&l.d,c=(i.left-n.left)/(a||1),u=(i.top-n.top)/(d||1);o.animatingX=!!c,o.animatingY=!!u,oe(o,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=_b(o),oe(o,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),oe(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){oe(o,"transition",""),oe(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},r)}}}}function _b(e){return e.offsetWidth}function Bb(e,t,s,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-s.top,2)+Math.pow(t.left-s.left,2))*o.animation}var Ai=[],dd={initializeByDefault:!0},Ln={mount:function(t){for(var s in dd)dd.hasOwnProperty(s)&&!(s in t)&&(t[s]=dd[s]);Ai.forEach(function(o){if(o.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Ai.push(t)},pluginEvent:function(t,s,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var n=t+"Global";Ai.forEach(function(r){s[r.pluginName]&&(s[r.pluginName][n]&&s[r.pluginName][n](Is({sortable:s},o)),s.options[r.pluginName]&&s[r.pluginName][t]&&s[r.pluginName][t](Is({sortable:s},o)))})},initializePlugins:function(t,s,o,i){Ai.forEach(function(l){var a=l.pluginName;if(!(!t.options[a]&&!l.initializeByDefault)){var d=new l(t,s,t.options);d.sortable=t,d.options=t.options,t[a]=d,oo(o,d.defaults)}});for(var n in t.options)if(t.options.hasOwnProperty(n)){var r=this.modifyOption(t,n,t.options[n]);typeof r<"u"&&(t.options[n]=r)}},getEventProperties:function(t,s){var o={};return Ai.forEach(function(i){typeof i.eventProperties=="function"&&oo(o,i.eventProperties.call(s[i.pluginName],t))}),o},modifyOption:function(t,s,o){var i;return Ai.forEach(function(n){t[n.pluginName]&&n.optionListeners&&typeof n.optionListeners[s]=="function"&&(i=n.optionListeners[s].call(t[n.pluginName],o))}),i}};function Hb(e){var t=e.sortable,s=e.rootEl,o=e.name,i=e.targetEl,n=e.cloneEl,r=e.toEl,l=e.fromEl,a=e.oldIndex,d=e.newIndex,c=e.oldDraggableIndex,u=e.newDraggableIndex,h=e.originalEvent,p=e.putSortable,g=e.extraEventProperties;if(t=t||s&&s[Tt],!!t){var f,m=t.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!no&&!Pn?f=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent(o,!0,!0)),f.to=r||s,f.from=l||s,f.item=i||s,f.clone=n,f.oldIndex=a,f.newIndex=d,f.oldDraggableIndex=c,f.newDraggableIndex=u,f.originalEvent=h,f.pullMode=p?p.lastPutMode:void 0;var y=Is(Is({},g),Ln.getEventProperties(o,t));for(var R in y)f[R]=y[R];s&&s.dispatchEvent(f),m[v]&&m[v].call(t,f)}}var Vb=["evt"],Lt=function(t,s){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,n=Tb(o,Vb);Ln.pluginEvent.bind(ie)(t,s,Is({dragEl:V,parentEl:Ke,ghostEl:ae,rootEl:ze,nextEl:qo,lastDownEl:sl,cloneEl:Ue,cloneHidden:Ro,dragStarted:On,putSortable:dt,activeSortable:ie.active,originalEvent:i,oldIndex:Pi,oldDraggableIndex:kn,newIndex:jt,newDraggableIndex:xo,hideGhostForTarget:$p,unhideGhostForTarget:jp,cloneNowHidden:function(){Ro=!0},cloneNowShown:function(){Ro=!1},dispatchSortableEvent:function(l){Rt({sortable:s,name:l,originalEvent:i})}},n))};function Rt(e){Hb(Is({putSortable:dt,cloneEl:Ue,targetEl:V,rootEl:ze,oldIndex:Pi,oldDraggableIndex:kn,newIndex:jt,newDraggableIndex:xo},e))}var V,Ke,ae,ze,qo,sl,Ue,Ro,Pi,jt,kn,xo,ol,dt,Ii=!1,il=!1,nl=[],Xo,ps,cd,ud,Bp,Hp,On,Ti,Gn,Nn=!1,rl=!1,ll,ht,hd=[],pd=!1,al=[],dl=typeof document<"u",cl=rd,Vp=Pn||no?"cssFloat":"float",Wb=dl&&!Mp&&!rd&&"draggable"in document.createElement("div"),Wp=function(){if(dl){if(no)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),zp=function(t,s){var o=oe(t),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),n=Mi(t,0,s),r=Mi(t,1,s),l=n&&oe(n),a=r&&oe(r),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Qe(n).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Qe(r).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(n&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return r&&(a.clear==="both"||a.clear===u)?"vertical":"horizontal"}return n&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=i&&o[Vp]==="none"||r&&o[Vp]==="none"&&d+c>i)?"vertical":"horizontal"},zb=function(t,s,o){var i=o?t.left:t.top,n=o?t.right:t.bottom,r=o?t.width:t.height,l=o?s.left:s.top,a=o?s.right:s.bottom,d=o?s.width:s.height;return i===l||n===a||i+r/2===l+d/2},Ub=function(t,s){var o;return nl.some(function(i){var n=i[Tt].options.emptyInsertThreshold;if(!(!n||ld(i))){var r=Qe(i),l=t>=r.left-n&&t<=r.right+n,a=s>=r.top-n&&s<=r.bottom+n;if(l&&a)return o=i}}),o},Up=function(t){function s(n,r){return function(l,a,d,c){var u=l.options.group.name&&a.options.group.name&&l.options.group.name===a.options.group.name;if(n==null&&(r||u))return!0;if(n==null||n===!1)return!1;if(r&&n==="clone")return n;if(typeof n=="function")return s(n(l,a,d,c),r)(l,a,d,c);var h=(r?l:a).options.group.name;return n===!0||typeof n=="string"&&n===h||n.join&&n.indexOf(h)>-1}}var o={},i=t.group;(!i||el(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=s(i.pull,!0),o.checkPut=s(i.put),o.revertClone=i.revertClone,t.group=o},$p=function(){!Wp&&ae&&oe(ae,"display","none")},jp=function(){!Wp&&ae&&oe(ae,"display","")};dl&&!Mp&&document.addEventListener("click",function(e){if(il)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),il=!1,!1},!0);var Qo=function(t){if(V){t=t.touches?t.touches[0]:t;var s=Ub(t.clientX,t.clientY);if(s){var o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);o.target=o.rootEl=s,o.preventDefault=void 0,o.stopPropagation=void 0,s[Tt]._onDragOver(o)}}},$b=function(t){V&&V.parentNode[Tt]._isOutsideThisEl(t.target)};function ie(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=oo({},t),e[Tt]=this;var s={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return zp(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,l){r.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ie.supportPointer!==!1&&"PointerEvent"in window&&(!In||rd),emptyInsertThreshold:5};Ln.initializePlugins(this,e,s);for(var o in s)!(o in t)&&(t[o]=s[o]);Up(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:Wb,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Se(e,"pointerdown",this._onTapStart):(Se(e,"mousedown",this._onTapStart),Se(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Se(e,"dragover",this),Se(e,"dragenter",this)),nl.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),oo(this,Nb())}ie.prototype={constructor:ie,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Ti=null)},_getDirection:function(t,s){return typeof this.options.direction=="function"?this.options.direction.call(this,t,s,V):this.options.direction},_onTapStart:function(t){if(t.cancelable){var s=this,o=this.el,i=this.options,n=i.preventOnFilter,r=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,a=(l||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=i.filter;if(Jb(o),!V&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||i.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&In&&a&&a.tagName.toUpperCase()==="SELECT")&&(a=hs(a,i.draggable,o,!1),!(a&&a.animated)&&sl!==a)){if(Pi=ts(a),kn=ts(a,i.draggable),typeof c=="function"){if(c.call(this,t,a,this)){Rt({sortable:s,rootEl:d,name:"filter",targetEl:a,toEl:o,fromEl:o}),Lt("filter",s,{evt:t}),n&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=hs(d,u.trim(),o,!1),u)return Rt({sortable:s,rootEl:u,name:"filter",targetEl:a,fromEl:o,toEl:o}),Lt("filter",s,{evt:t}),!0}),c)){n&&t.preventDefault();return}i.handle&&!hs(d,i.handle,o,!1)||this._prepareDragStart(t,l,a)}}},_prepareDragStart:function(t,s,o){var i=this,n=i.el,r=i.options,l=n.ownerDocument,a;if(o&&!V&&o.parentNode===n){var d=Qe(o);if(ze=n,V=o,Ke=V.parentNode,qo=V.nextSibling,sl=o,ol=r.group,ie.dragged=V,Xo={target:V,clientX:(s||t).clientX,clientY:(s||t).clientY},Bp=Xo.clientX-d.left,Hp=Xo.clientY-d.top,this._lastX=(s||t).clientX,this._lastY=(s||t).clientY,V.style["will-change"]="all",a=function(){if(Lt("delayEnded",i,{evt:t}),ie.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Ep&&i.nativeDraggable&&(V.draggable=!0),i._triggerDragStart(t,s),Rt({sortable:i,name:"choose",originalEvent:t}),$t(V,r.chosenClass,!0)},r.ignore.split(",").forEach(function(c){Tp(V,c.trim(),gd)}),Se(l,"dragover",Qo),Se(l,"mousemove",Qo),Se(l,"touchmove",Qo),r.supportPointer?(Se(l,"pointerup",i._onDrop),!this.nativeDraggable&&Se(l,"pointercancel",i._onDrop)):(Se(l,"mouseup",i._onDrop),Se(l,"touchend",i._onDrop),Se(l,"touchcancel",i._onDrop)),Ep&&this.nativeDraggable&&(this.options.touchStartThreshold=4,V.draggable=!0),Lt("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||s)&&(!this.nativeDraggable||!(Pn||no))){if(ie.eventCanceled){this._onDrop();return}r.supportPointer?(Se(l,"pointerup",i._disableDelayedDrag),Se(l,"pointercancel",i._disableDelayedDrag)):(Se(l,"mouseup",i._disableDelayedDrag),Se(l,"touchend",i._disableDelayedDrag),Se(l,"touchcancel",i._disableDelayedDrag)),Se(l,"mousemove",i._delayedDragTouchMoveHandler),Se(l,"touchmove",i._delayedDragTouchMoveHandler),r.supportPointer&&Se(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(a,r.delay)}else a()}},_delayedDragTouchMoveHandler:function(t){var s=t.touches?t.touches[0]:t;Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){V&&gd(V),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;we(t,"mouseup",this._disableDelayedDrag),we(t,"touchend",this._disableDelayedDrag),we(t,"touchcancel",this._disableDelayedDrag),we(t,"pointerup",this._disableDelayedDrag),we(t,"pointercancel",this._disableDelayedDrag),we(t,"mousemove",this._delayedDragTouchMoveHandler),we(t,"touchmove",this._delayedDragTouchMoveHandler),we(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,s){s=s||t.pointerType=="touch"&&t,!this.nativeDraggable||s?this.options.supportPointer?Se(document,"pointermove",this._onTouchMove):s?Se(document,"touchmove",this._onTouchMove):Se(document,"mousemove",this._onTouchMove):(Se(V,"dragend",this),Se(ze,"dragstart",this._onDragStart));try{document.selection?hl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,s){if(Ii=!1,ze&&V){Lt("dragStarted",this,{evt:s}),this.nativeDraggable&&Se(document,"dragover",$b);var o=this.options;!t&&$t(V,o.dragClass,!1),$t(V,o.ghostClass,!0),ie.active=this,t&&this._appendGhost(),Rt({sortable:this,name:"start",originalEvent:s})}else this._nulling()},_emulateDragOver:function(){if(ps){this._lastX=ps.clientX,this._lastY=ps.clientY,$p();for(var t=document.elementFromPoint(ps.clientX,ps.clientY),s=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ps.clientX,ps.clientY),t!==s);)s=t;if(V.parentNode[Tt]._isOutsideThisEl(t),s)do{if(s[Tt]){var o=void 0;if(o=s[Tt]._onDragOver({clientX:ps.clientX,clientY:ps.clientY,target:t,rootEl:s}),o&&!this.options.dragoverBubble)break}t=s}while(s=Pp(s));jp()}},_onTouchMove:function(t){if(Xo){var s=this.options,o=s.fallbackTolerance,i=s.fallbackOffset,n=t.touches?t.touches[0]:t,r=ae&&Ei(ae,!0),l=ae&&r&&r.a,a=ae&&r&&r.d,d=cl&&ht&&kp(ht),c=(n.clientX-Xo.clientX+i.x)/(l||1)+(d?d[0]-hd[0]:0)/(l||1),u=(n.clientY-Xo.clientY+i.y)/(a||1)+(d?d[1]-hd[1]:0)/(a||1);if(!ie.active&&!Ii){if(o&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))<o)return;this._onDragStart(t,!0)}if(ae){r?(r.e+=c-(cd||0),r.f+=u-(ud||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var h="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");oe(ae,"webkitTransform",h),oe(ae,"mozTransform",h),oe(ae,"msTransform",h),oe(ae,"transform",h),cd=c,ud=u,ps=n}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!ae){var t=this.options.fallbackOnBody?document.body:ze,s=Qe(V,!0,cl,!0,t),o=this.options;if(cl){for(ht=t;oe(ht,"position")==="static"&&oe(ht,"transform")==="none"&&ht!==document;)ht=ht.parentNode;ht!==document.body&&ht!==document.documentElement?(ht===document&&(ht=Ts()),s.top+=ht.scrollTop,s.left+=ht.scrollLeft):ht=Ts(),hd=kp(ht)}ae=V.cloneNode(!0),$t(ae,o.ghostClass,!1),$t(ae,o.fallbackClass,!0),$t(ae,o.dragClass,!0),oe(ae,"transition",""),oe(ae,"transform",""),oe(ae,"box-sizing","border-box"),oe(ae,"margin",0),oe(ae,"top",s.top),oe(ae,"left",s.left),oe(ae,"width",s.width),oe(ae,"height",s.height),oe(ae,"opacity","0.8"),oe(ae,"position",cl?"absolute":"fixed"),oe(ae,"zIndex","100000"),oe(ae,"pointerEvents","none"),ie.ghost=ae,t.appendChild(ae),oe(ae,"transform-origin",Bp/parseInt(ae.style.width)*100+"% "+Hp/parseInt(ae.style.height)*100+"%")}},_onDragStart:function(t,s){var o=this,i=t.dataTransfer,n=o.options;if(Lt("dragStart",this,{evt:t}),ie.eventCanceled){this._onDrop();return}Lt("setupClone",this),ie.eventCanceled||(Ue=Np(V),Ue.removeAttribute("id"),Ue.draggable=!1,Ue.style["will-change"]="",this._hideClone(),$t(Ue,this.options.chosenClass,!1),ie.clone=Ue),o.cloneId=hl(function(){Lt("clone",o),!ie.eventCanceled&&(o.options.removeCloneOnHide||ze.insertBefore(Ue,V),o._hideClone(),Rt({sortable:o,name:"clone"}))}),!s&&$t(V,n.dragClass,!0),s?(il=!0,o._loopId=setInterval(o._emulateDragOver,50)):(we(document,"mouseup",o._onDrop),we(document,"touchend",o._onDrop),we(document,"touchcancel",o._onDrop),i&&(i.effectAllowed="move",n.setData&&n.setData.call(o,i,V)),Se(document,"drop",o),oe(V,"transform","translateZ(0)")),Ii=!0,o._dragStartId=hl(o._dragStarted.bind(o,s,t)),Se(document,"selectstart",o),On=!0,window.getSelection().removeAllRanges(),In&&oe(document.body,"user-select","none")},_onDragOver:function(t){var s=this.el,o=t.target,i,n,r,l=this.options,a=l.group,d=ie.active,c=ol===a,u=l.sort,h=dt||d,p,g=this,f=!1;if(pd)return;function m(Z,De){Lt(Z,g,Is({evt:t,isOwner:c,axis:p?"vertical":"horizontal",revert:r,dragRect:i,targetRect:n,canSort:u,fromSortable:h,target:o,completed:y,onMove:function(_t,ct){return ul(ze,s,V,i,_t,Qe(_t),t,ct)},changed:R},De))}function v(){m("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function y(Z){return m("dragOverCompleted",{insertion:Z}),Z&&(c?d._hideClone():d._showClone(g),g!==h&&($t(V,dt?dt.options.ghostClass:d.options.ghostClass,!1),$t(V,l.ghostClass,!0)),dt!==g&&g!==ie.active?dt=g:g===ie.active&&dt&&(dt=null),h===g&&(g._ignoreWhileAnimating=o),g.animateAll(function(){m("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(o===V&&!V.animated||o===s&&!o.animated)&&(Ti=null),!l.dragoverBubble&&!t.rootEl&&o!==document&&(V.parentNode[Tt]._isOutsideThisEl(t.target),!Z&&Qo(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function R(){jt=ts(V),xo=ts(V,l.draggable),Rt({sortable:g,name:"change",toEl:s,newIndex:jt,newDraggableIndex:xo,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),o=hs(o,l.draggable,s,!0),m("dragOver"),ie.eventCanceled)return f;if(V.contains(t.target)||o.animated&&o.animatingX&&o.animatingY||g._ignoreWhileAnimating===o)return y(!1);if(il=!1,d&&!l.disabled&&(c?u||(r=Ke!==ze):dt===this||(this.lastPutMode=ol.checkPull(this,d,V,t))&&a.checkPut(this,d,V,t))){if(p=this._getDirection(t,o)==="vertical",i=Qe(V),m("dragOverValid"),ie.eventCanceled)return f;if(r)return Ke=ze,v(),this._hideClone(),m("revert"),ie.eventCanceled||(qo?ze.insertBefore(V,qo):ze.appendChild(V)),y(!0);var w=ld(s,l.draggable);if(!w||qb(t,p,this)&&!w.animated){if(w===V)return y(!1);if(w&&s===t.target&&(o=w),o&&(n=Qe(o)),ul(ze,s,V,i,o,n,t,!!o)!==!1)return v(),w&&w.nextSibling?s.insertBefore(V,w.nextSibling):s.appendChild(V),Ke=s,R(),y(!0)}else if(w&&Yb(t,p,this)){var b=Mi(s,0,l,!0);if(b===V)return y(!1);if(o=b,n=Qe(o),ul(ze,s,V,i,o,n,t,!1)!==!1)return v(),s.insertBefore(V,b),Ke=s,R(),y(!0)}else if(o.parentNode===s){n=Qe(o);var x=0,A,H=V.parentNode!==s,M=!zb(V.animated&&V.toRect||i,o.animated&&o.toRect||n,p),z=p?"top":"left",L=Lp(o,"top","top")||Lp(V,"top","top"),ee=L?L.scrollTop:void 0;Ti!==o&&(A=n[z],Nn=!1,rl=!M&&l.invertSwap||H),x=Xb(t,o,n,p,M?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,rl,Ti===o);var re;if(x!==0){var de=ts(V);do de-=x,re=Ke.children[de];while(re&&(oe(re,"display")==="none"||re===ae))}if(x===0||re===o)return y(!1);Ti=o,Gn=x;var Ge=o.nextElementSibling,xe=!1;xe=x===1;var te=ul(ze,s,V,i,o,n,t,xe);if(te!==!1)return(te===1||te===-1)&&(xe=te===1),pd=!0,setTimeout(Kb,30),v(),xe&&!Ge?s.appendChild(V):o.parentNode.insertBefore(V,xe?Ge:o),L&&Gp(L,0,ee-L.scrollTop),Ke=V.parentNode,A!==void 0&&!rl&&(ll=Math.abs(A-Qe(o)[z])),R(),y(!0)}if(s.contains(V))return y(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){we(document,"mousemove",this._onTouchMove),we(document,"touchmove",this._onTouchMove),we(document,"pointermove",this._onTouchMove),we(document,"dragover",Qo),we(document,"mousemove",Qo),we(document,"touchmove",Qo)},_offUpEvents:function(){var t=this.el.ownerDocument;we(t,"mouseup",this._onDrop),we(t,"touchend",this._onDrop),we(t,"pointerup",this._onDrop),we(t,"pointercancel",this._onDrop),we(t,"touchcancel",this._onDrop),we(document,"selectstart",this)},_onDrop:function(t){var s=this.el,o=this.options;if(jt=ts(V),xo=ts(V,o.draggable),Lt("drop",this,{evt:t}),Ke=V&&V.parentNode,jt=ts(V),xo=ts(V,o.draggable),ie.eventCanceled){this._nulling();return}Ii=!1,rl=!1,Nn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),fd(this.cloneId),fd(this._dragStartId),this.nativeDraggable&&(we(document,"drop",this),we(s,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),In&&oe(document.body,"user-select",""),oe(V,"transform",""),t&&(On&&(t.cancelable&&t.preventDefault(),!o.dropBubble&&t.stopPropagation()),ae&&ae.parentNode&&ae.parentNode.removeChild(ae),(ze===Ke||dt&&dt.lastPutMode!=="clone")&&Ue&&Ue.parentNode&&Ue.parentNode.removeChild(Ue),V&&(this.nativeDraggable&&we(V,"dragend",this),gd(V),V.style["will-change"]="",On&&!Ii&&$t(V,dt?dt.options.ghostClass:this.options.ghostClass,!1),$t(V,this.options.chosenClass,!1),Rt({sortable:this,name:"unchoose",toEl:Ke,newIndex:null,newDraggableIndex:null,originalEvent:t}),ze!==Ke?(jt>=0&&(Rt({rootEl:Ke,name:"add",toEl:Ke,fromEl:ze,originalEvent:t}),Rt({sortable:this,name:"remove",toEl:Ke,originalEvent:t}),Rt({rootEl:Ke,name:"sort",toEl:Ke,fromEl:ze,originalEvent:t}),Rt({sortable:this,name:"sort",toEl:Ke,originalEvent:t})),dt&&dt.save()):jt!==Pi&&jt>=0&&(Rt({sortable:this,name:"update",toEl:Ke,originalEvent:t}),Rt({sortable:this,name:"sort",toEl:Ke,originalEvent:t})),ie.active&&((jt==null||jt===-1)&&(jt=Pi,xo=kn),Rt({sortable:this,name:"end",toEl:Ke,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Lt("nulling",this),ze=V=Ke=ae=qo=Ue=sl=Ro=Xo=ps=On=jt=xo=Pi=kn=Ti=Gn=dt=ol=ie.dragged=ie.ghost=ie.clone=ie.active=null,al.forEach(function(t){t.checked=!0}),al.length=cd=ud=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":V&&(this._onDragOver(t),jb(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],s,o=this.el.children,i=0,n=o.length,r=this.options;i<n;i++)s=o[i],hs(s,r.draggable,this.el,!1)&&t.push(s.getAttribute(r.dataIdAttr)||Zb(s));return t},sort:function(t,s){var o={},i=this.el;this.toArray().forEach(function(n,r){var l=i.children[r];hs(l,this.options.draggable,i,!1)&&(o[n]=l)},this),s&&this.captureAnimationState(),t.forEach(function(n){o[n]&&(i.removeChild(o[n]),i.appendChild(o[n]))}),s&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,s){return hs(t,s||this.options.draggable,this.el,!1)},option:function(t,s){var o=this.options;if(s===void 0)return o[t];var i=Ln.modifyOption(this,t,s);typeof i<"u"?o[t]=i:o[t]=s,t==="group"&&Up(o)},destroy:function(){Lt("destroy",this);var t=this.el;t[Tt]=null,we(t,"mousedown",this._onTapStart),we(t,"touchstart",this._onTapStart),we(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(we(t,"dragover",this),we(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(s){s.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),nl.splice(nl.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Ro){if(Lt("hideClone",this),ie.eventCanceled)return;oe(Ue,"display","none"),this.options.removeCloneOnHide&&Ue.parentNode&&Ue.parentNode.removeChild(Ue),Ro=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Ro){if(Lt("showClone",this),ie.eventCanceled)return;V.parentNode==ze&&!this.options.group.revertClone?ze.insertBefore(Ue,V):qo?ze.insertBefore(Ue,qo):ze.appendChild(Ue),this.options.group.revertClone&&this.animate(V,Ue),oe(Ue,"display",""),Ro=!1}}};function jb(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function ul(e,t,s,o,i,n,r,l){var a,d=e[Tt],c=d.options.onMove,u;return window.CustomEvent&&!no&&!Pn?a=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(a=document.createEvent("Event"),a.initEvent("move",!0,!0)),a.to=t,a.from=e,a.dragged=s,a.draggedRect=o,a.related=i||t,a.relatedRect=n||Qe(t),a.willInsertAfter=l,a.originalEvent=r,e.dispatchEvent(a),c&&(u=c.call(d,a,r)),u}function gd(e){e.draggable=!1}function Kb(){pd=!1}function Yb(e,t,s){var o=Qe(Mi(s.el,0,s.options,!0)),i=_p(s.el,s.options,ae),n=10;return t?e.clientX<i.left-n||e.clientY<o.top&&e.clientX<o.right:e.clientY<i.top-n||e.clientY<o.bottom&&e.clientX<o.left}function qb(e,t,s){var o=Qe(ld(s.el,s.options.draggable)),i=_p(s.el,s.options,ae),n=10;return t?e.clientX>i.right+n||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>i.bottom+n||e.clientX>o.right&&e.clientY>o.top}function Xb(e,t,s,o,i,n,r,l){var a=o?e.clientY:e.clientX,d=o?s.height:s.width,c=o?s.top:s.left,u=o?s.bottom:s.right,h=!1;if(!r){if(l&&ll<d*i){if(!Nn&&(Gn===1?a>c+d*n/2:a<u-d*n/2)&&(Nn=!0),Nn)h=!0;else if(Gn===1?a<c+ll:a>u-ll)return-Gn}else if(a>c+d*(1-i)/2&&a<u-d*(1-i)/2)return Qb(t)}return h=h||r,h&&(a<c+d*n/2||a>u-d*n/2)?a>c+d/2?1:-1:0}function Qb(e){return ts(V)<ts(e)?1:-1}function Zb(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,s=t.length,o=0;s--;)o+=t.charCodeAt(s);return o.toString(36)}function Jb(e){al.length=0;for(var t=e.getElementsByTagName("input"),s=t.length;s--;){var o=t[s];o.checked&&al.push(o)}}function hl(e){return setTimeout(e,0)}function fd(e){return clearTimeout(e)}dl&&Se(document,"touchmove",function(e){(ie.active||Ii)&&e.cancelable&&e.preventDefault()}),ie.utils={on:Se,off:we,css:oe,find:Tp,is:function(t,s){return!!hs(t,s,t,!1)},extend:Ob,throttle:Op,closest:hs,toggleClass:$t,clone:Np,index:ts,nextTick:hl,cancelNextTick:fd,detectDirection:zp,getChild:Mi,expando:Tt},ie.get=function(e){return e[Tt]},ie.mount=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];t[0].constructor===Array&&(t=t[0]),t.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(ie.utils=Is(Is({},ie.utils),o.utils)),Ln.mount(o)})},ie.create=function(e,t){return new ie(e,t)},ie.version=Lb;var Ze=[],_n,md,Cd=!1,vd,wd,pl,Bn;function eS(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(s){var o=s.originalEvent;this.sortable.nativeDraggable?Se(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Se(document,"pointermove",this._handleFallbackAutoScroll):o.touches?Se(document,"touchmove",this._handleFallbackAutoScroll):Se(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(s){var o=s.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?we(document,"dragover",this._handleAutoScroll):(we(document,"pointermove",this._handleFallbackAutoScroll),we(document,"touchmove",this._handleFallbackAutoScroll),we(document,"mousemove",this._handleFallbackAutoScroll)),Kp(),gl(),Gb()},nulling:function(){pl=md=_n=Cd=Bn=vd=wd=null,Ze.length=0},_handleFallbackAutoScroll:function(s){this._handleAutoScroll(s,!0)},_handleAutoScroll:function(s,o){var i=this,n=(s.touches?s.touches[0]:s).clientX,r=(s.touches?s.touches[0]:s).clientY,l=document.elementFromPoint(n,r);if(pl=s,o||this.options.forceAutoScrollFallback||Pn||no||In){yd(s,this.options,l,o);var a=So(l,!0);Cd&&(!Bn||n!==vd||r!==wd)&&(Bn&&Kp(),Bn=setInterval(function(){var d=So(document.elementFromPoint(n,r),!0);d!==a&&(a=d,gl()),yd(s,i.options,d,o)},10),vd=n,wd=r)}else{if(!this.options.bubbleScroll||So(l,!0)===Ts()){gl();return}yd(s,this.options,So(l,!1),!1)}}},oo(e,{pluginName:"scroll",initializeByDefault:!0})}function gl(){Ze.forEach(function(e){clearInterval(e.pid)}),Ze=[]}function Kp(){clearInterval(Bn)}var yd=Op(function(e,t,s,o){if(t.scroll){var i=(e.touches?e.touches[0]:e).clientX,n=(e.touches?e.touches[0]:e).clientY,r=t.scrollSensitivity,l=t.scrollSpeed,a=Ts(),d=!1,c;md!==s&&(md=s,gl(),_n=t.scroll,c=t.scrollFn,_n===!0&&(_n=So(s,!0)));var u=0,h=_n;do{var p=h,g=Qe(p),f=g.top,m=g.bottom,v=g.left,y=g.right,R=g.width,w=g.height,b=void 0,x=void 0,A=p.scrollWidth,H=p.scrollHeight,M=oe(p),z=p.scrollLeft,L=p.scrollTop;p===a?(b=R<A&&(M.overflowX==="auto"||M.overflowX==="scroll"||M.overflowX==="visible"),x=w<H&&(M.overflowY==="auto"||M.overflowY==="scroll"||M.overflowY==="visible")):(b=R<A&&(M.overflowX==="auto"||M.overflowX==="scroll"),x=w<H&&(M.overflowY==="auto"||M.overflowY==="scroll"));var ee=b&&(Math.abs(y-i)<=r&&z+R<A)-(Math.abs(v-i)<=r&&!!z),re=x&&(Math.abs(m-n)<=r&&L+w<H)-(Math.abs(f-n)<=r&&!!L);if(!Ze[u])for(var de=0;de<=u;de++)Ze[de]||(Ze[de]={});(Ze[u].vx!=ee||Ze[u].vy!=re||Ze[u].el!==p)&&(Ze[u].el=p,Ze[u].vx=ee,Ze[u].vy=re,clearInterval(Ze[u].pid),(ee!=0||re!=0)&&(d=!0,Ze[u].pid=setInterval(function(){o&&this.layer===0&&ie.active._onTouchMove(pl);var Ge=Ze[this.layer].vy?Ze[this.layer].vy*l:0,xe=Ze[this.layer].vx?Ze[this.layer].vx*l:0;typeof c=="function"&&c.call(ie.dragged.parentNode[Tt],xe,Ge,e,pl,Ze[this.layer].el)!=="continue"||Gp(Ze[this.layer].el,xe,Ge)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&h!==a&&(h=So(h,!1)));Cd=d}},30),Yp=function(t){var s=t.originalEvent,o=t.putSortable,i=t.dragEl,n=t.activeSortable,r=t.dispatchSortableEvent,l=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(s){var d=o||n;l();var c=s.changedTouches&&s.changedTouches.length?s.changedTouches[0]:s,u=document.elementFromPoint(c.clientX,c.clientY);a(),d&&!d.el.contains(u)&&(r("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function bd(){}bd.prototype={startIndex:null,dragStart:function(t){var s=t.oldDraggableIndex;this.startIndex=s},onSpill:function(t){var s=t.dragEl,o=t.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var i=Mi(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(s,i):this.sortable.el.appendChild(s),this.sortable.animateAll(),o&&o.animateAll()},drop:Yp},oo(bd,{pluginName:"revertOnSpill"});function Sd(){}Sd.prototype={onSpill:function(t){var s=t.dragEl,o=t.putSortable,i=o||this.sortable;i.captureAnimationState(),s.parentNode&&s.parentNode.removeChild(s),i.animateAll()},drop:Yp},oo(Sd,{pluginName:"removeOnSpill"}),ie.mount(new eS),ie.mount(Sd,bd);function tS(e,t,s={}){let o;const{document:i=Mb,...n}=s,r={onUpdate:c=>{iS(t,c.oldIndex,c.newIndex,c)}},l=()=>{const c=typeof e=="string"?i?.querySelector(e):Ab(e);!c||o!==void 0||(o=new ie(c,{...r,...n}))},a=()=>{o?.destroy(),o=void 0},d=(c,u)=>{if(u!==void 0)o?.option(c,u);else return o?.option(c)};return Db(l),sd(a),{stop:a,start:l,option:d}}function sS(e,t,s){const o=e.children[s];e.insertBefore(t,o)}function oS(e){e.parentNode&&e.parentNode.removeChild(e)}function iS(e,t,s,o=null){o!=null&&(oS(o.item),sS(o.from,o.item,t));const i=We(e),n=i?[...Wt(e)]:Wt(e);if(s>=0&&s<n.length){const r=n.splice(t,1)[0];gn(()=>{n.splice(s,0,r),i&&(e.value=n)})}}const nS=["data-align"],rS={key:0,role:"list",class:"pv-popover-list",ref:"popoverList"},qp=bo(st({__name:"PvPopover",props:{alignment:{default:void 0,type:String},cssCustomProperties:{default:()=>({}),type:Object},isList:{type:Boolean,default:!1},isSortable:{type:Boolean}},emits:["list-order-updated"],setup(e,{emit:t}){const s=ah("popoverList"),o=e,i=t;o.isSortable&&o.isList&&tS(s,[],{animation:150,onUpdate:()=>{const r=Array.from(s.value?.children||[]).map(l=>l.id);i("list-order-updated",r)}});const n=ge(()=>{const r=[];return Object.keys(o.cssCustomProperties).forEach(l=>{const a=o.cssCustomProperties[l];a&&r.push(`--${l}: ${a};`)}),r.length?r.join("; "):void 0});return(r,l)=>(K(),J("div",{class:"pv-popover","data-align":r.alignment,style:_o(n.value)},[r.isList?(K(),J("ul",rS,[vn(r.$slots,"default",{},void 0,!0)],512)):vn(r.$slots,"default",{key:1},void 0,!0)],12,nS))}}),[["styles",[".pv-popover-list[data-v-fe55e23d]{font-size:14px}"]],["__scopeId","data-v-fe55e23d"]]),Xp=od?window:void 0;function Hn(e){var t;const s=Wt(e);return(t=s?.$el)!=null?t:s}function Li(...e){const t=[],s=()=>{t.forEach(l=>l()),t.length=0},o=(l,a,d,c)=>(l.addEventListener(a,d,c),()=>l.removeEventListener(a,d,c)),i=ge(()=>{const l=nd(Wt(e[0])).filter(a=>a!=null);return l.every(a=>typeof a!="string")?l:void 0}),n=Eb(()=>{var l,a;return[(a=(l=i.value)==null?void 0:l.map(d=>Hn(d)))!=null?a:[Xp].filter(d=>d!=null),nd(Wt(i.value?e[1]:e[0])),nd(Ae(i.value?e[2]:e[1])),Wt(i.value?e[3]:e[2])]},([l,a,d,c])=>{if(s(),!l?.length||!a?.length||!d?.length)return;const u=Rb(c)?{...c}:c;t.push(...l.flatMap(h=>a.flatMap(p=>d.map(g=>o(h,p,g,u)))))},{flush:"post"}),r=()=>{n(),s()};return sd(s),r}let Qp=!1;function Zp(e,t,s={}){const{window:o=Xp,ignore:i=[],capture:n=!0,detectIframe:r=!1,controls:l=!1}=s;if(!o)return l?{stop:Yo,cancel:Yo,trigger:Yo}:Yo;if(id&&!Qp){Qp=!0;const m={passive:!0};Array.from(o.document.body.children).forEach(v=>Li(v,"click",Yo,m)),Li(o.document.documentElement,"click",Yo,m)}let a=!0;const d=m=>Wt(i).some(v=>{if(typeof v=="string")return Array.from(o.document.querySelectorAll(v)).some(y=>y===m.target||m.composedPath().includes(y));{const y=Hn(v);return y&&(m.target===y||m.composedPath().includes(y))}});function c(m){const v=Wt(m);return v&&v.$.subTree.shapeFlag===16}function u(m,v){const y=Wt(m),R=y.$.subTree&&y.$.subTree.children;return R==null||!Array.isArray(R)?!1:R.some(w=>w.el===v.target||v.composedPath().includes(w.el))}const h=m=>{const v=Hn(e);if(m.target!=null&&!(!(v instanceof Element)&&c(e)&&u(e,m))&&!(!v||v===m.target||m.composedPath().includes(v))){if("detail"in m&&m.detail===0&&(a=!d(m)),!a){a=!0;return}t(m)}};let p=!1;const g=[Li(o,"click",m=>{p||(p=!0,setTimeout(()=>{p=!1},0),h(m))},{passive:!0,capture:n}),Li(o,"pointerdown",m=>{const v=Hn(e);a=!d(m)&&!!(v&&!m.composedPath().includes(v))},{passive:!0}),r&&Li(o,"blur",m=>{setTimeout(()=>{var v;const y=Hn(e);((v=o.document.activeElement)==null?void 0:v.tagName)==="IFRAME"&&!y?.contains(o.document.activeElement)&&t(m)},0)},{passive:!0})].filter(Boolean),f=()=>g.forEach(m=>m());return l?{stop:f,cancel:()=>{a=!1},trigger:m=>{a=!0,h(m),a=!1}}:f}const lS={mounted(e,t){const s=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=Zp(e,t.value,{capture:s});else{const[o,i]=t.value;e.__onClickOutside_stop=Zp(e,o,Object.assign({capture:s},i))}},unmounted(e){e.__onClickOutside_stop()}};function Rd(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Jp(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const s=e.parentNode;return!s||s.tagName==="BODY"?!1:Jp(s)}}function aS(e){const t=e||window.event,s=t.target;return Jp(s)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const xd=new WeakMap;function dS(e,t=!1){const s=hn(t);let o=null,i="";St(Fp(e),l=>{const a=Rd(Wt(l));if(a){const d=a;if(xd.get(d)||xd.set(d,d.style.overflow),d.style.overflow!=="hidden"&&(i=d.style.overflow),d.style.overflow==="hidden")return s.value=!0;if(s.value)return d.style.overflow="hidden"}},{immediate:!0});const n=()=>{const l=Rd(Wt(e));!l||s.value||(id&&(o=Li(l,"touchmove",a=>{aS(a)},{passive:!1})),l.style.overflow="hidden",s.value=!0)},r=()=>{const l=Rd(Wt(e));!l||!s.value||(id&&o?.(),l.style.overflow=i,xd.delete(l),s.value=!1)};return sd(r),ge({get(){return s.value},set(l){l?n():r()}})}function cS(){let e=!1;const t=hn(!1);return(s,o)=>{if(t.value=o.value,e)return;e=!0;const i=dS(s,o.value);St(t,n=>i.value=n)}}cS();const uS={class:"pv-relative"},hS=["disabled"],Vn=bo(st({__name:"PvDropdown",props:{defaultOpen:{type:Boolean,default:!1},popoverCssProperties:{type:Object},alignment:{type:String},isList:{type:Boolean,default:!1},isSortable:{type:Boolean},icon:{type:String},disabled:{type:Boolean,default:!1}},emits:["dropdown-open","dropdown-closed","list-order-updated"],setup(e,{emit:t}){const s=t,o=me(e.defaultOpen),i=ge(()=>({"pv-hide":!o.value})),n=l=>{o.value=!o.value},r=()=>{o.value=!1};return St(o,l=>{s(l?"dropdown-open":"dropdown-closed")}),(l,a)=>nh((K(),J("div",uS,[l.icon?(K(),ot(It,{key:1,class:"pv-icon-button",name:l.icon,onClick:n},null,8,["name"])):(K(),J("button",{key:0,class:"pv-select",style:{width:"auto"},onClick:n,disabled:l.disabled},[vn(l.$slots,"trigger",{},()=>[a[1]||(a[1]=jo("Open"))],!0)],8,hS)),Pe(qp,{class:as(i.value),"css-custom-properties":l.popoverCssProperties,alignment:l.alignment,isList:l.isList,isSortable:l.isSortable,onListOrderUpdated:a[0]||(a[0]=d=>l.$emit("list-order-updated",d))},{default:yt(()=>[vn(l.$slots,"default",{},()=>[a[2]||(a[2]=q("span",{class:"pv-shimmer"},"Loading...",-1))],!0)]),_:3},8,["class","css-custom-properties","alignment","isList","isSortable"])])),[[Ae(lS),r]])}}),[["styles",[".pv-icon-button[data-v-aa75cbe3]:hover{cursor:pointer;color:#176f6f}.pv-select[data-v-aa75cbe3]{font-size:14px}"]],["__scopeId","data-v-aa75cbe3"]]),pS=["onClick","data-active","aria-label"],gS=st({__name:"PvSegmentedControl",props:{options:{type:Array},iconOnly:{type:Boolean,default:!1},modelValue:{type:String},large:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const s=t,o=n=>{s("update:modelValue",n)},i=ge(()=>({"pv-segmented-control":!e.large,"pv-segmented-control-large":e.large,"pv-segmented-control-icon":e.iconOnly}));return(n,r)=>(K(),J("div",{class:as(i.value)},[(K(!0),J(Le,null,As(n.options,l=>(K(),J("button",{key:l.value,onClick:a=>o(l.value),"data-active":n.modelValue===l.value?!0:null,"aria-label":n.iconOnly?l.label:void 0},[l.iconPosition=="left"?(K(),ot(Ae(It),{key:0,name:l.iconName},null,8,["name"])):at("",!0),n.iconOnly?at("",!0):(K(),J(Le,{key:1},[jo(qe(l.label),1)],64)),l.iconPosition=="right"?(K(),ot(Ae(It),{key:2,name:l.iconName},null,8,["name"])):at("",!0)],8,pS))),128))],2))}}),fS={role:"list",class:"pv-tab-list"},mS=["onClick","data-active"],CS={class:"pv-text-body-xs",style:{"font-weight":"500"}},vS=bo(st({__name:"PvTabList",props:{modelValue:{type:String},options:{type:Array}},emits:["update:modelValue"],setup(e,{emit:t}){const s=t,o=i=>{s("update:modelValue",i)};return(i,n)=>(K(),J("div",null,[q("ul",fS,[(K(!0),J(Le,null,As(i.options,r=>(K(),J("li",{key:r.value,style:{cursor:"pointer"},onClick:l=>o(r.value),"data-active":i.modelValue===r.value?!0:null},[q("button",CS,qe(r.label),1)],8,mS))),128))])]))}}),[["styles",['.pv-tab-list[data-v-498bf523]{border:none}.pv-tab-list :where(li)[data-active][data-v-498bf523]:after{content:"";display:block;height:2px;width:100%;position:absolute;bottom:0;left:0;right:0;background-color:#176f6f}']],["__scopeId","data-v-498bf523"]]);var ro=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,s){const o=t?this.allAsyncListeners:this.allSyncListeners;let i=o.get(e);return!i&&s&&(i=new Set,o.set(e,i)),i}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,s=!1){this.getListeners(e,s,!0).add(t)}removeEventListener(e,t,s=!1){const o=this.getListeners(e,s,!1);o&&(o.delete(t),o.size===0&&(s?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const s=e.type;if(t&&"event"in e){const l=e.event;l instanceof Event&&(e.eventPath=l.composedPath())}const o=(l,a)=>l.forEach(d=>{if(!a.has(d))return;const c=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>d(e)):()=>d(e);t?this.dispatchAsync(c):c()}),i=this.getListeners(s,t,!1)??new Set,n=new Set(i);n.size>0&&o(n,i),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(l=>{const a=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>l(s,e)):()=>l(s,e);t?this.dispatchAsync(a):a()})}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=[],e.forEach(t=>t())}};function wS(e,t){return t}function Fd(e){return e?.getLocaleTextFunc()??wS}function gs(e,t,s){s==null||typeof s=="string"&&s==""?Dd(e,t):ss(e,t,s)}function ss(e,t,s){e.setAttribute(eg(t),s.toString())}function Dd(e,t){e.removeAttribute(eg(t))}function eg(e){return`aria-${e}`}function os(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function yS(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function bS(e){return parseInt(e.getAttribute("aria-posinset"),10)}function SS(e){return e.getAttribute("aria-label")}function Kt(e,t){gs(e,"label",t)}function Wn(e,t){gs(e,"labelledby",t)}function Ed(e,t){gs(e,"describedby",t)}function tg(e,t){gs(e,"live",t)}function RS(e,t){gs(e,"atomic",t)}function xS(e,t){gs(e,"relevant",t)}function sg(e,t){gs(e,"level",t)}function FS(e,t){gs(e,"disabled",t)}function og(e,t){gs(e,"hidden",t)}function Zo(e,t){ss(e,"expanded",t)}function DS(e){Dd(e,"expanded")}function ES(e,t){ss(e,"setsize",t)}function MS(e,t){ss(e,"posinset",t)}function AS(e,t){ss(e,"multiselectable",t)}function PS(e,t){ss(e,"rowcount",t)}function ig(e,t){ss(e,"rowindex",t)}function IS(e,t){ss(e,"colcount",t)}function ng(e,t){ss(e,"colindex",t)}function TS(e,t){ss(e,"colspan",t)}function LS(e,t){ss(e,"sort",t)}function kS(e){Dd(e,"sort")}function OS(e,t){gs(e,"selected",t)}function rg(e,t){ss(e,"checked",t===void 0?"mixed":t)}function GS(e,t){gs(e,"haspopup",t===!1?null:t)}function lg(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Md,Ad,Pd,Id,Td,Ld,kd;function fl(){return Md===void 0&&(Md=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Md}function Od(){return Ad===void 0&&(Ad=/(firefox)/i.test(navigator.userAgent)),Ad}function ag(){return Pd===void 0&&(Pd=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Pd}function ki(){return Id===void 0&&(Id=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Id}function dg(e){if(!e)return null;const t=e.tabIndex,s=e.getAttribute("tabIndex");return t===-1&&(s===null||s===""&&!Od())?null:t.toString()}function NS(){if(kd!==void 0)return kd;if(!document.body)return-1;let e=1e6;const t=Od()?6e6:1e9,s=document.createElement("div");for(document.body.appendChild(s);;){const o=e*2;if(s.style.height=o+"px",o>t||s.clientHeight!==o)break;e=o}return document.body.removeChild(s),kd=e,e}function _S(){return Ld==null&&cg(),Ld}function cg(){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 s=t.offsetWidth-t.clientWidth;s===0&&t.clientWidth===0&&(s=null),t.parentNode&&t.parentNode.removeChild(t),s!=null&&(Ld=s,Td=s===0)}function ug(){return Td==null&&cg(),Td}function hg(e,t,s){const o=e.parentElement;let i=o&&o.firstChild;for(;i;)t&&i.classList.toggle(t,i===e),i=i.nextSibling}var BS="[tabindex], input, select, button, textarea, [href]",pg="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Gd(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,o=t.call(e,"input, select, button, textarea"),i=t.call(e,pg),n=fs(e);return o&&!i&&n}function fe(e,t,s={}){const{skipAriaHidden:o}=s;e.classList.toggle("ag-hidden",!t),o||og(e,!t)}function HS(e,t,s={}){const{skipAriaHidden:o}=s;e.classList.toggle("ag-invisible",!t),o||og(e,!t)}function Nd(e,t){const s="disabled",o=t?n=>n.setAttribute(s,""):n=>n.removeAttribute(s);o(e);const i=e.querySelectorAll("input")??[];for(const n of i)o(n)}function Jo(e,t,s){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof s=="number"){if(++o>s)break}else if(e===s)break}return!1}function Oi(e){const{height:t,width:s,borderTopWidth:o,borderRightWidth:i,borderBottomWidth:n,borderLeftWidth:r,paddingTop:l,paddingRight:a,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:p,marginLeft:g,boxSizing:f}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(s||"0"),borderTopWidth:parseFloat(o||"0"),borderRightWidth:parseFloat(i||"0"),borderBottomWidth:parseFloat(n||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(p||"0"),marginLeft:parseFloat(g||"0"),boxSizing:f}}function _d(e){const t=Oi(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function zn(e){const t=Oi(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function gg(e){const{height:t,marginBottom:s,marginTop:o}=Oi(e);return Math.floor(t+s+o)}function fg(e){const{width:t,marginLeft:s,marginRight:o}=Oi(e);return Math.floor(t+s+o)}function mg(e){const t=e.getBoundingClientRect(),{borderTopWidth:s,borderLeftWidth:o,borderRightWidth:i,borderBottomWidth:n}=Oi(e);return{top:t.top+(s||0),left:t.left+(o||0),right:t.right+(i||0),bottom:t.bottom+(n||0)}}function ml(e,t){let s=e.scrollLeft;return t&&(s=Math.abs(s)),s}function Cl(e,t,s){s&&(t*=-1),e.scrollLeft=t}function is(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function lo(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Cg(e){return!!e.offsetParent}function fs(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!Cg(e)||window.getComputedStyle(e).visibility!=="visible")}function vl(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function vg(e,t,s){s&&s.nextSibling===t||(e.firstChild?s?s.nextSibling?e.insertBefore(t,s.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function wg(e,t){for(let s=0;s<t.length;s++){const o=t[s],i=e.children[s];i!==o&&e.insertBefore(o,i)}}function VS(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Un(e,t){if(t)for(const s of Object.keys(t)){const o=t[s];if(!s||!s.length||o==null)continue;const i=VS(s),n=o.toString(),r=n.replace(/\s*!important/g,""),l=r.length!=n.length?"important":void 0;e.style.setProperty(i,r,l)}}function WS(e){return e.clientWidth<e.scrollWidth}function zS(e){return e.clientHeight<e.scrollHeight}function yg(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ls(e,t)}function Ls(e,t){t=bg(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function $n(e,t){t=bg(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function bg(e){return typeof e=="number"?`${e}px`:e}function wl(e){return e instanceof Node||e instanceof HTMLElement}function Gi(e,t,s){s==null||s===""?e.removeAttribute(t):e.setAttribute(t,s.toString())}function Fo(e,t,s){const i=Ng(e).ResizeObserver,n=i?new i(s):null;return n?.observe(t),()=>n?.disconnect()}function US(e){const t=Bi(e),s="getSelection"in t?t.getSelection():null,o=[];for(let i=0;i<(s?.rangeCount??0);i++){const n=s?.getRangeAt(i);n&&o.push(n)}return{selection:s,ranges:o}}function Sg(e,t){if(!e.gos.get("enableCellTextSelection")||!Od()&&!fl())return t();const{selection:o,ranges:i}=US(e);t(),o?.removeAllRanges();for(const n of i)o?.addRange(n)}function ms(e,t){const s=Ng(e);s.requestAnimationFrame?s.requestAnimationFrame(t):s.webkitRequestAnimationFrame?s.webkitRequestAnimationFrame(t):s.setTimeout(t,0)}var Rg="data-ref",Bd;function xg(){return Bd??(Bd=document.createTextNode(" ")),Bd.cloneNode()}function Ne(e){const{attrs:t,children:s,cls:o,ref:i,role:n,tag:r}=e,l=document.createElement(r);if(o&&(l.className=o),i&&l.setAttribute(Rg,i),n&&l.setAttribute("role",n),t)for(const a of Object.keys(t))l.setAttribute(a,t[a]);if(s)if(typeof s=="string")l.textContent=s;else{let a=!0;for(const d of s)d&&(typeof d=="string"?(l.appendChild(document.createTextNode(d)),a=!1):(a&&(l.appendChild(xg()),a=!1),l.append(Ne(d)),l.appendChild(xg())))}return l}function kt(e){return e==null||e===""?null:e}function j(e){return e!=null&&e!==""}function ke(e){return!j(e)}function ao(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function jn(e,t){const s=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return s===o}function yl(e,t,s=!1){const o=e==null,i=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),o&&i)return 0;if(o)return-1;if(i)return 1;function n(r,l){return r>l?1:r<l?-1:0}if(typeof e!="string"||!s)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var Fg="https://www.ag-grid.com",Dg={};function Hd(e,t){Dg[t]||(e(),Dg[t]=!0)}function Kn(e,t,...s){e.get("debug")&&console.log("AG Grid: "+t,...s)}function Yn(e,...t){Hd(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function Ni(e,...t){Hd(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var $S={pending:!1,funcs:[]},jS={pending:!1,funcs:[]};function Vd(e,t="setTimeout",s){const o=t==="raf"?jS:$S;if(o.funcs.push(e),o.pending)return;o.pending=!0;const i=()=>{const n=o.funcs.slice();o.funcs.length=0,o.pending=!1,n.forEach(r=>r())};t==="raf"?ms(s,i):window.setTimeout(i,0)}function Yt(e,t,s){let o;return function(...i){const n=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(n,i)},s)}}function Eg(e,t){let s=0;return function(...o){const i=this,n=Date.now();n-s<t||(s=n,e.apply(i,o))}}function Mg(e,t,s=100,o){const i=Date.now();let n=null,r=!1;const l=()=>{const a=Date.now()-i>s;(e()||a)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null))};l(),r||(n=window.setInterval(l,10))}var Ce="33.2.4",Ag=2e3,Pg=100,Ig="_version_",Tg=null,ei=`${Fg}/javascript-data-grid`;function KS(e){Tg=e}function YS(e){ei=e}function Lg(e,t,s){return Tg?.getConsoleMessage(e,t)??[ZS(e,t,s)]}function Wd(e,t,s,o){e(`error #${t}`,...Lg(t,s,o))}function qS(e){if(!e)return String(e);const t={};for(const s of Object.keys(e))typeof e[s]!="object"&&typeof e[s]!="function"&&(t[s]=e[s]);return JSON.stringify(t)}function XS(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=qS(e)),t}function bl(e){return e===void 0?"undefined":e===null?"null":e}function zd(e,t){return`${e}?${t.toString()}`}function QS(e,t,s){const o=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let i=zd(e,t);for(const[n,r]of o){if(n===Ig)continue;const l=i.length-s;if(l<=0)break;const a="...",d=l+a.length,c=r.length-d>Pg?r.slice(0,r.length-d)+a:r.slice(0,Pg)+a;t.set(n,c),i=zd(e,t)}return i}function kg(e,t){const s=new URLSearchParams;if(s.append(Ig,Ce),t)for(const n of Object.keys(t))s.append(n,XS(t[n]));const o=`${ei}/errors/${e}`,i=zd(o,s);return i.length<=Ag?i:QS(o,s,Ag)}var ZS=(e,t,s)=>{const o=kg(e,t);return`${s?s+`
34
+ `:""}Visit ${o}${s?"":`
35
+ Alternatively register the ValidationModule to see the full message in the console.`}`};function I(...e){Wd(Yn,e[0],e[1])}function ue(...e){Wd(Ni,e[0],e[1])}function Ud(e,t,s){Wd(Ni,e,t,s)}function JS(e,t){const s=t[0];return`error #${s} `+Lg(s,t[1],e).join(" ")}function Do(...e){return JS(void 0,e)}function Og(e,t){return e.get("rowModelType")===t}function ks(e,t){return Og(e,"clientSide")}function Os(e,t){return Og(e,"serverSide")}function pt(e,t){return e.get("domLayout")===t}function Gs(e){return xl(e)!==void 0}function $d(e){return typeof e.get("getRowHeight")=="function"}function eR(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function ns(e,t,s=!1,o){const{gos:i,environment:n}=e;if(o==null&&(o=n.getDefaultRowHeight()),$d(i)){if(s)return{height:o,estimated:!0};const a={node:t,data:t.data},d=i.getCallback("getRowHeight")(a);if(jd(d))return d===0&&I(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&i.get("masterDetail"))return tR(i);const r=i.get("rowHeight");return{height:r&&jd(r)?r:o,estimated:!1}}function tR(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return jd(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ti(e){const{environment:t,gos:s}=e,o=s.get("rowHeight");if(!o||ke(o))return t.getDefaultRowHeight();const i=t.refreshRowHeightVariable();return i!==-1?i:(I(24),t.getDefaultRowHeight())}function jd(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function Gg(e,t,s){const o=t[e.getDomDataKey()];return o?o[s]:void 0}function _i(e,t,s,o){const i=e.getDomDataKey();let n=t[i];ke(n)&&(n={},t[i]=n),n[s]=o}function Xe(e){const{gos:t,eGridDiv:s}=e;let o=null;const i=t.get("getDocument");return i&&j(i)?o=i():s&&(o=s.ownerDocument),o&&j(o)?o:document}function Ng(e){return Xe(e).defaultView||window}function Bi(e){return e.eGridDiv.getRootNode()}function Be(e){return Bi(e).activeElement}function Kd(e){let t=null,s=null;try{t=Xe(e).fullscreenElement}catch{}finally{t||(t=Bi(e));const o=t.querySelector("body");o?s=o:t instanceof ShadowRoot?s=t:t instanceof Document?s=t?.documentElement:s=t}return s}function sR(e){return Kd(e)?.clientWidth??(window.innerHeight||-1)}function oR(e){return Kd(e)?.clientHeight??(window.innerHeight||-1)}function iR(e,t,s){const i=e.getBoundingClientRect().height,n=sR(s)-2,r=oR(s)-2;if(!e.offsetParent)return;const a=mg(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-a.top-i/2,h=c-a.left-10;const p=Xe(s),g=p.defaultView||window,f=g.pageYOffset||p.documentElement.scrollTop,m=g.pageXOffset||p.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+m&&(h=n+m-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+f&&(u=r+f-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}function Yd(e){const t=Xe(e),s=Be(e);return s===null||s===t.body}function Hi(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function Sl(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||pt(e,"print"))}function Cs(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function qn(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function qd(e){return e.get("grandTotalRow")}function Vi(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function _g(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function Xd(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Xn(e){const t=e.getCallback("getRowId");return t===void 0?t:s=>{let o=t(s);return typeof o!="string"&&(I(25,{id:o}),o=String(o)),o}}function nR(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function rR(e,t){const s=e.get("suppressGroupChangesColumnVisibility");if(s===!0||t&&s==="suppressHideOnGroup"||!t&&s==="suppressShowOnUngroup")return!1;const o=e.get("suppressRowGroupHidesColumns");if(t&&o===!0)return!1;const i=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&i===!0)}function si(e){return e?.checkboxes??!0}function Rl(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function Qn(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Qd(e){return e?.hideDisabledCheckboxes??!1}function Bg(e){return typeof e.get("rowSelection")!="string"}function oi(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function Hg(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const s=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return s&&o?!1:s?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function lR(e){const t=Hg(e);return t===!0||t==="enableSelection"}function aR(e){const t=Hg(e);return t===!0||t==="enableDeselection"}function Zd(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function xl(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?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function ii(e){return xl(e)==="multiRow"}function dR(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Vg(e){const t=e.get("rowSelection");if(typeof t=="string"){const s=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return s&&o?"filteredDescendants":s?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function Wg(e,t=!0){const s=e.get("rowSelection");return typeof s!="object"?t?"all":void 0:s.mode==="multiRow"?s.selectAll:"all"}function Zn(e){const t=Vg(e);return t==="descendants"||t==="filteredDescendants"}function Jd(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function rt(e){return e.get("columnMenu")==="legacy"}function zg(e){return!rt(e)}function ec(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function cR(e,t,s){typeof e!="object"&&(e={});const o={...e};return s.forEach(i=>{const n=t[i];typeof n<"u"&&(o[i]=n)}),o}function uR(e,t){if(!e)return;const s={};let o=!1;if(Object.keys(e).forEach(r=>{s[r]=e[r],o=!0}),!o)return;const i={type:"gridOptionsChanged",options:s};t.dispatchEvent(i);const n={type:"componentStateChanged",...s};t.dispatchEvent(n)}function he(e,t){return e.addGridCommonParams(t)}function Ug(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var $g="__ag_Grid_Stop_Propagation",hR=["touchstart","touchend","touchmove","touchcancel","scroll"],pR=["wheel"],tc={};function co(e){e[$g]=!0}function vs(e){return e[$g]===!0}var jg=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return s=>{if(typeof tc[s]=="boolean")return tc[s];const o=document.createElement(e[s]||"div");return s="on"+s,tc[s]=s in o}})();function Kg(e,t,s){let o=t;for(;o;){const i=Gg(e,o,s);if(i)return i;o=o.parentElement}return null}function sc(e,t){return!t||!e?!1:fR(t).indexOf(e)>=0}function gR(e){const t=[];let s=e.target;for(;s;)t.push(s),s=s.parentElement;return t}function fR(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():gR(t)}function mR(e,t,s,o){const i=Yg(s);let n;i!=null&&(n={passive:i}),e&&e.addEventListener&&e.addEventListener(t,s,o,n)}var Yg=e=>{const t=hR.includes(e),s=pR.includes(e);if(t)return!0;if(s)return!1},F=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,s){this.localEventService||(this.localEventService=new ro),this.localEventService.addEventListener(e,t,s)}removeEventListener(e,t,s){this.localEventService?.removeEventListener(e,t,s)}dispatchLocalEvent(e){this.localEventService?.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 s=[];for(const o of Object.keys(t)){const i=t[o];i&&s.push(this._setupListener(e,o,i))}return s}_setupListener(e,t,s){if(this.destroyed)return()=>null;let o;return CR(e)?(e.__addEventListener(t,s),o=()=>(e.__removeEventListener(t,s),null)):(e instanceof HTMLElement?mR(this.beans.frameworkOverrides,e,t,s):e.addEventListener(t,s),o=()=>(e.removeEventListener(t,s),null)),this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==o),null)}setupGridOptionListener(e,t){const{gos:s}=this;s.addPropertyEventListener(e,t);const o=()=>(s.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const s=e.join("-")+this.propertyListenerId++,o=i=>{if(i.changeSet){if(i.changeSet&&i.changeSet.id===this.lastChangeSetIdLookup[s])return;this.lastChangeSetIdLookup[s]=i.changeSet.id}const n={type:"gridPropertyChanged",changeSet:i.changeSet,source:i.source};t(n)};e.forEach(i=>this.setupGridOptionListener(i,o))}getLocaleTextFunc(){return Fd(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 s=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),s}createBean(e,t,s){return(t||this.stubContext).createBean(e,s)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function CR(e){return e.__addEventListener!==void 0}var qg=new Set(["__proto__","constructor","prototype"]);function vR(e,t){if(e!=null){if(Array.isArray(e)){for(let s=0;s<e.length;s++)t(s.toString(),e[s]);return}for(const s of Object.keys(e))t(s,e[s])}}function gt(e,t,s=!0,o=!1){j(t)&&vR(t,(i,n)=>{if(qg.has(i))return;let r=e[i];r!==n&&(o&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[i]=r),Xg(n)&&Xg(r)&&!Array.isArray(r)?gt(r,n,s,o):(s||n!==void 0)&&(e[i]=n))})}function Fl(e,t,s){if(!t||!e)return;if(!s)return e[t];const o=t.split(".");let i=e;for(let n=0;n<o.length;n++){if(i==null)return;i=i[o[n]]}return i}function Xg(e){return typeof e=="object"&&e!==null}var wR=/[&<>"']/g,yR={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ws(e,t){if(e==null)return null;const s=e.toString().toString();return t?s:s.replace(wR,o=>yR[o])}var bR={resizable:!0,sortable:!0},SR=0;function Qg(){return SR++}function Ns(e){return e instanceof Dl}var Dl=class extends F{constructor(e,t,s,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=s,this.primary=o,this.isColumn=!0,this.instanceId=Qg(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new ro,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=ws(s)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:s,colFlex:o}}=this;t?.initCol(this);const i=e.hide;i!==void 0?this.visible=!i:this.visible=!e.initialHide,s?.initCol(this),o?.initCol(this)}setColDef(e,t,s){const o=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),o&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",s)}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()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:s}}=this,o=e.get("suppressFieldDotNotation");this.fieldContainsDots=j(t)&&t.indexOf(".")>=0&&!o,this.tooltipFieldContainsDots=j(s)&&s.indexOf(".")>=0&&!o}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const s=e.width,o=e.initialWidth;return s!=null?t=s:o!=null?t=o:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.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){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const s=this.frameworkEventListenerService?.wrap(t)??t;this.colEventSvc.addEventListener(e,s)}removeEventListener(e,t){const s=this.frameworkEventListenerService?.unwrap(t)??t;this.colEventSvc.removeEventListener(e,s)}createColumnFunctionCallbackParams(e){return he(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable(this,e)??!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){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??bR[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const s=this.createColumnFunctionCallbackParams(e);return t(s)}return!1}createColumnEvent(e,t){return he(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 ke(this.sort)}isSorting(){return j(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(){return I(261),!!this.beans.colHover?.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 s=e===!0;this.visible!==s&&(this.visible=s,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let s=!0;for(;e;){if(!e.isPadding()){s=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:s}}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 he(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(ke(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.colSpan(t);return Math.max(s,1)}getRowSpan(e){if(ke(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.rowSpan(t);return Math.max(s,1)}setActualWidth(e,t,s=!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),s||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,s){const o=this.createColumnEvent(e,t);s&&gt(o,s),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function it(e){return e instanceof Jn}var Jn=class extends F{constructor(e,t,s,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=s,this.level=o,this.isColumn=!1,this.expandable=!1,this.instanceId=Qg(),this.expandableListenerRemoveCallback=null,this.expanded=!!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}addLeafColumns(e){this.children&&this.children.forEach(t=>{Ns(t)?e.push(t):it(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);this.getLeafColumns().forEach(t=>t.__addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.__removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,s=!1;const o=this.findChildrenRemovingPadding();for(let n=0,r=o.length;n<r;n++){const l=o[n];if(!l.isVisible())continue;const a=l.getColumnGroupShow();a==="open"?(e=!0,s=!0):a==="closed"?(t=!0,s=!0):(e=!0,t=!0)}const i=e&&t&&s;this.expandable!==i&&(this.expandable=i,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=s=>{s.forEach(o=>{it(o)&&o.isPadding()?t(o.children):e.push(o)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},RR={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},xR=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=ao(e);let s=0;for(;;){let o=e??t;if(o?s!==0&&(o+="_"+s):o=s,!this.existingKeys[o])return this.existingKeys[o]=!0,String(o);s++}}},oc=Object.freeze([]);function Re(e){if(e?.length)return e[e.length-1]}function _s(e,t,s){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((o,i)=>s?s(o,t[i]):t[i]===o)}function El(e,t){if(e)for(const s of e)t(s)}function Ot(e,t){const s=e.indexOf(t);s>=0&&e.splice(s,1)}function Zg(e,t,s){for(let o=0;o<t.length;o++)Ot(e,t[o]);for(let o=t.length-1;o>=0;o--)e.splice(s,0,t[o])}var ni="ag-Grid-AutoColumn",Jg="ag-Grid-SelectionColumn",FR="ag-Grid-RowNumbersColumn";function ic(e){const t=[],s=o=>{for(let i=0;i<o.length;i++){const n=o[i];Ns(n)?t.push(n):it(n)&&s(n.getChildren())}};return s(e),t}function Wi(e){return e.reduce((t,s)=>t+s.getActualWidth(),0)}function Eo(e,t,s){const o={};if(!t)return;uo(null,t,n=>{o[n.getInstanceId()]=n}),s&&uo(null,s,n=>{o[n.getInstanceId()]=null});const i=Object.values(o).filter(n=>n!=null);e.context.destroyBeans(i)}function nc(e){return e.getId().startsWith(ni)}function Mo(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Jg)??!1}function Ml(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(FR)??!1}function Al(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function ef(e,t){return _s(e,t,(s,o)=>s.getColId()===o.getColId())}function tf(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function ri(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function rc(e,t){const s=e===t,o=e.getColDef()===t,i=e.getColId()==t;return s||o||i}var DR=(e,t)=>(s,o)=>{const i={value1:void 0,value2:void 0};let n=!1;return e&&(e[s]!==void 0&&(i.value1=e[s],n=!0),j(o)&&e[o]!==void 0&&(i.value2=e[o],n=!0)),!n&&t&&(t[s]!==void 0&&(i.value1=t[s]),j(o)&&t[o]!==void 0&&(i.value2=t[o])),i};function sf(e,t=null,s,o,i){const n=new xR,{existingCols:r,existingGroups:l,existingColKeys:a}=ER(o);n.addExistingKeys(a);const d=of(e,t,0,s,r,n,l,i),{colGroupSvc:c}=e,u=c?.findMaxDepth(d,0)??0,h=c?c.balanceColumnTree(d,0,u,n):d;return uo(null,h,(g,f)=>{it(g)&&g.setupExpandable(),g.originalParent=f}),{columnTree:h,treeDept:u}}function ER(e){const t=[],s=[],o=[];return e&&uo(null,e,i=>{if(it(i)){const n=i;s.push(n)}else{const n=i;o.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:s,existingColKeys:o}}function of(e,t,s,o,i,n,r,l){if(!t)return[];const{colGroupSvc:a}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];a&&LR(u)?d[c]=a.createProvidedColumnGroup(o,u,s,i,n,r,l):d[c]=MR(e,o,u,i,n,l)}return d}function MR(e,t,s,o,i,n){const r=PR(s,o);r&&o?.splice(r.idx,1);let l=r?.column;if(l){const a=Pl(e,s,l.getColId());l.setColDef(a,s,n),AR(e,l,a,n)}else{const a=i.getUniqueKey(s.colId,s.field),d=Pl(e,s,a);l=new Dl(d,s,a,t),e.context.createBean(l)}return e.dataTypeSvc?.addColumnListeners(l),l}function nf(e,t,s,o,i,n,r,l){const{sortSvc:a,pinnedCols:d,colFlex:c}=e;s!==void 0&&t.setVisible(!s,l),a&&(a.updateColSort(t,o,l),i!==void 0&&a.setColSortIndex(t,i)),n!==void 0&&d?.setColPinned(t,n),r!==void 0&&c?.setColFlex(t,r)}function AR(e,t,s,o){nf(e,t,s.hide,s.sort,s.sortIndex,s.pinned,s.flex,o);const i=t.getFlex();if(!(i!=null&&i>0))if(s.width!=null)t.setActualWidth(s.width,o);else{const n=t.getActualWidth();t.setActualWidth(n,o)}}function PR(e,t){if(t)for(let s=0;s<t.length;s++){const o=t[s].getUserProvidedColDef();if(!o)continue;if(e.colId!=null){if(t[s].getId()===e.colId)return{idx:s,column:t[s]};continue}if(e.field!=null){if(o.field===e.field)return{idx:s,column:t[s]};continue}if(o===e)return{idx:s,column:t[s]}}}function Pl(e,t,s,o){const{gos:i,dataTypeSvc:n,validation:r}=e,l={},a=i.get("defaultColDef");gt(l,a,!1,!0);const d=IR(e,l,t,s);d&&TR(e,d,l),gt(l,t,!1,!0);const c=i.get("autoGroupColumnDef"),u=Cs(i);return t.rowGroup&&c&&u&&gt(l,{sort:c.sort,initialSort:c.initialSort},!1,!0),n?.validateColDef(l),r?.validateColDef(l,s,o),l}function IR(e,t,s,o){const i=e.dataTypeSvc?.updateColDefAndGetColumnType(t,s,o),n=s.type??i??t.type;return t.type=n,n?Al(n):void 0}function TR(e,t,s){if(!t.length)return;const o=Object.assign({},RR),i=e.gos.get("columnTypes")||{};for(const n of Object.keys(i)){const r=i[n];n in o?I(34,{key:n}):(r.type&&I(35),o[n]=r)}t.forEach(n=>{const r=o[n.trim()];r?gt(s,r,!1,!0):I(36,{t:n})})}function LR(e){return e.children!==void 0}function uo(e,t,s){if(t)for(let o=0;o<t.length;o++){const i=t[o];it(i)&&uo(i,i.getChildren(),s),s(i,e)}}function rf(e,t){const s=[],o=[],i=[];return e.forEach(r=>{const l=r.getColDef().lockPosition;l==="right"?i.push(r):l==="left"||l===!0?s.push(r):o.push(r)}),t.get("enableRtl")?[...i,...o,...s]:[...s,...o,...i]}function lf(e,t){let s=!0;return uo(null,t,o=>{if(!it(o))return;const i=o,n=i.getColGroupDef();if(!(n&&n.marryChildren))return;const l=[];i.getLeafColumns().forEach(h=>{const p=e.indexOf(h);l.push(p)});const a=Math.max.apply(Math,l),d=Math.min.apply(Math,l),c=a-d,u=i.getLeafColumns().length-1;c>u&&(s=!1)}),s}function af(e,t){if(!e||e.length==0)return;const s=t(e[0]);for(let o=1;o<e.length;o++)if(s!==t(e[o]))return;return s}function df(e,t,s){if(!t.length)return;const o=t.length===1?t[0]:null,i=af(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:i??null,columns:t,column:o,source:s})}function kR(e,t,s){if(!t.length)return;const o=t.length===1?t[0]:null,i=af(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:i,columns:t,column:o,source:s})}function cf(e,t,s,o){e.dispatchEvent({type:t,columns:s,column:s&&s.length==1?s[0]:null,source:o})}function Il(e,t,s,o,i=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:i,finished:s,source:o})}function Gt(e,t,s){const{colModel:o,rowGroupColsSvc:i,pivotColsSvc:n,autoColSvc:r,selectionColSvc:l,colAnimation:a,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:p,gos:g}=e,f=o.getColDefCols()||[];if(!f?.length)return!1;if(t?.state&&!t.state.forEach)return I(32),!1;const m=(w,b,x,A,H)=>{if(!w)return;const M=DR(b,t.defaultState),z=M("flex").value1;if(nf(e,w,M("hide").value1,M("sort").value1,M("sortIndex").value1,M("pinned").value1,z,s),z==null){const L=M("width").value1;if(L!=null){const ee=w.getColDef().minWidth??u.getDefaultColumnMinWidth();ee!=null&&L>=ee&&w.setActualWidth(L,s)}}H||!w.isPrimary()||(h?.syncColumnWithState(w,s,M),i?.syncColumnWithState(w,s,M,x),n?.syncColumnWithState(w,s,M,A))},v=(w,b,x)=>{const A=hf(e,s),H=b.slice(),M={},z={},L=[],ee=[],re=[];let de=0;const Ge=i?.columns.slice()??[],xe=n?.columns.slice()??[];w.forEach(De=>{const Ft=De.colId;if(Ft.startsWith(ni)){L.push(De),re.push(De);return}if(Mo(Ft)){ee.push(De),re.push(De);return}const ct=x(Ft);ct?(m(ct,De,M,z,!1),Ot(H,ct)):(re.push(De),de+=1)});const te=De=>m(De,null,M,z,!1);H.forEach(te),i?.sortColumns(gf.bind(i,M,Ge)),n?.sortColumns(gf.bind(n,z,xe)),o.refreshCols(!1);const Z=(De,Ft,_t=[])=>{Ft.forEach(ct=>{const Xt=De(ct.colId);Ot(_t,Xt),m(Xt,ct,null,null,!0)}),_t.forEach(te)};return Z(De=>r?.getColumn(De)??null,L,r?.getColumns()?.slice()),Z(De=>l?.getColumn(De)??null,ee,l?.getColumns()?.slice()),OR(t,o,g),d.refresh(s),p.dispatchEvent({type:"columnEverythingChanged",source:s}),A(),{unmatchedAndAutoStates:re,unmatchedCount:de}};a?.start();let{unmatchedAndAutoStates:y,unmatchedCount:R}=v(t.state||[],f,w=>o.getColDefCol(w));if(y.length>0||j(t.defaultState)){const w=c?.getPivotResultCols()?.list??[];R=v(y,w,b=>c?.getPivotResultCol(b)??null).unmatchedCount}return a?.finish(),R===0}function uf(e,t){const{colModel:s,autoColSvc:o,selectionColSvc:i}=e,n=s.getColDefCols();if(!n?.length)return;const r=s.getColDefColTree(),l=ic(r),a=[];let d=1e3,c=1e3;const u=m=>{const v=pf(m);ke(v.rowGroupIndex)&&v.rowGroup&&(v.rowGroupIndex=d++),ke(v.pivotIndex)&&v.pivot&&(v.pivotIndex=c++),a.push(v)};o?.getColumns()?.forEach(u),i?.getColumns()?.forEach(u),l?.forEach(u),Gt(e,{state:a},t);const h=o?.getColumns()??[],f=[...i?.getColumns()??[],...h,...n].map(m=>({colId:m.colId}));Gt(e,{state:f,applyOrder:!0},t)}function hf(e,t){const{rowGroupColsSvc:s,pivotColsSvc:o,valueColsSvc:i,colModel:n,sortSvc:r,eventSvc:l}=e,a={rowGroupColumns:s?.columns.slice()??[],pivotColumns:o?.columns.slice()??[],valueColumns:i?.columns.slice()??[]},d=er(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{const u=(x,A,H,M)=>{const z=A.map(M),L=H.map(M);if(_s(z,L))return;const re=new Set(A);H.forEach(Ge=>{re.delete(Ge)||re.add(Ge)});const de=[...re];l.dispatchEvent({type:x,columns:de,column:de.length===1?de[0]:null,source:t})},h=x=>{const A=[];return n.forAllCols(H=>{const M=c[H.getColId()];M&&x(M,H)&&A.push(H)}),A},p=x=>x.getColId();u("columnRowGroupChanged",a.rowGroupColumns,s?.columns??[],p),u("columnPivotChanged",a.pivotColumns,o?.columns??[],p);const f=h((x,A)=>{const H=x.aggFunc!=null,M=H!=A.isValueActive(),z=H&&x.aggFunc!=A.getAggFunc();return M||z});f.length>0&&cf(l,"columnValueChanged",f,t),Il(l,h((x,A)=>x.width!=A.getActualWidth()),!0,t),df(l,h((x,A)=>x.pinned!=A.getPinned()),t),kR(l,h((x,A)=>x.hide==A.isVisible()),t);const w=h((x,A)=>x.sort!=A.getSort()||x.sortIndex!=A.getSortIndex());w.length>0&&r?.dispatchSortChangedEvents(t,w);const b=er(e);NR(d,b,t,n,l)}}function er(e){const{colModel:t,rowGroupColsSvc:s,pivotColsSvc:o}=e,i=t.getColDefCols();if(ke(i)||!t.isAlive())return[];const n=s?.columns,r=o?.columns,l=[],a=c=>{const u=c.isRowGroupActive()&&n?n.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,p=c.isValueActive()?c.getAggFunc():null,g=c.getSort()!=null?c.getSort():null,f=c.getSortIndex()!=null?c.getSortIndex():null;l.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:g,sortIndex:f,aggFunc:p,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>a(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return l.sort((c,u)=>{const h=d.has(c.colId)?d.get(c.colId):-1,p=d.has(u.colId)?d.get(u.colId):-1;return h-p}),l}function pf(e){const t=(g,f)=>g??f??null,s=e.getColDef(),o=t(s.sort,s.initialSort),i=t(s.sortIndex,s.initialSortIndex),n=t(s.hide,s.initialHide),r=t(s.pinned,s.initialPinned),l=t(s.width,s.initialWidth),a=t(s.flex,s.initialFlex);let d=t(s.rowGroupIndex,s.initialRowGroupIndex),c=t(s.rowGroup,s.initialRowGroup);d==null&&(c==null||c==!1)&&(d=null,c=null);let u=t(s.pivotIndex,s.initialPivotIndex),h=t(s.pivot,s.initialPivot);u==null&&(h==null||h==!1)&&(u=null,h=null);const p=t(s.aggFunc,s.initialAggFunc);return{colId:e.getColId(),sort:o,sortIndex:i,hide:n,pinned:r,width:l,flex:a,rowGroup:c,rowGroupIndex:d,pivot:h,pivotIndex:u,aggFunc:p}}function OR(e,t,s){if(!e.applyOrder||!e.state)return;const o=[];e.state.forEach(i=>{i.colId!=null&&o.push(i.colId)}),GR(t.cols,o,t,s)}function GR(e,t,s,o){if(e==null)return;let i=[];const n={};t.forEach(l=>{if(n[l])return;const a=e.map[l];a&&(i.push(a),n[l]=!0)});let r=0;if(e.list.forEach(l=>{const a=l.getColId();if(n[a]!=null)return;a.startsWith(ni)?i.splice(r++,0,l):i.push(l)}),i=rf(i,o),!lf(i,s.getColTree())){I(39);return}e.list=i}function NR(e,t,s,o,i){const n={};t.forEach(c=>n[c.colId]=c);const r={};e.forEach(c=>{n[c.colId]&&(r[c.colId]=!0)});const l=e.filter(c=>r[c.colId]),a=t.filter(c=>r[c.colId]),d=[];a.forEach((c,u)=>{const h=l&&l[u];if(h&&h.colId!==c.colId){const p=o.getCol(h.colId);p&&d.push(p)}}),d.length&&i.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:s})}var gf=(e,t,s,o)=>{const i=e[s.getId()],n=e[o.getId()],r=i!=null,l=n!=null;if(r&&l)return i-n;if(r)return-1;if(l)return 1;const a=t.indexOf(s),d=t.indexOf(o),c=a>=0,u=d>=0;return c&&u?a-d:c?-1:1},_R=class extends F{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"],e=>this.refreshAll(ri(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),ri(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:s,colAutosize:o,rowGroupColsSvc:i,pivotColsSvc:n,valueColsSvc:r,visibleCols:l,colViewport:a,eventSvc:d}=t,c=this.colDefs?hf(t,e):void 0;s?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,p=sf(t,this.colDefs,!0,h,e);Eo(t,this.colDefCols?.tree,p.columnTree);const g=p.columnTree,f=p.treeDept,m=ic(g),v={};m.forEach(y=>v[y.getId()]=y),this.colDefCols={tree:g,treeDepth:f,list:m,map:v},i?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.refreshCols(!0),l.refresh(e),a.checkViewportColumns(),d.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),d.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&o?.applyAutosizeStrategy()}refreshCols(e){if(!this.colDefCols)return;const t=this.cols?.tree;this.saveColOrder();const{autoColSvc:s,selectionColSvc:o,rowNumbersSvc:i,quickFilter:n,pivotResultCols:r,showRowGroupCols:l,rowAutoHeight:a,visibleCols:d,colViewport:c,eventSvc:u}=this.beans,h=this.selectCols(r,this.colDefCols);this.createColumnsForService([s,o,i],h);const p=eR(this.gos,this.showingPivotResult);(!e||p)&&this.restoreColOrder(h),this.positionLockedCols(h),l?.refresh(),n?.refreshCols(),this.setColSpanActive(),a?.setAutoHeightActive(h),d.clear(),c.clear(),!_s(t,this.cols.tree)&&u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t){for(const s of e)s&&(s.createColumns(t,o=>{this.lastOrder=o(this.lastOrder),this.lastPivotOrder=o(this.lastPivotOrder)}),s.addColumns(t))}selectCols(e,t){const s=e?.getPivotResultCols()??null;this.showingPivotResult=s!=null;const{map:o,list:i,tree:n,treeDepth:r}=s??t;return this.cols={list:i.slice(),map:{...o},tree:n.slice(),treeDepth:r},s&&(s.list.some(a=>this.cols?.map[a.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const e=this.isPivotMode()&&!this.showingPivotResult,t=this.beans.valueColsSvc?.columns;return this.cols.list.filter(o=>{const i=nc(o);if(e){const n=t?.includes(o);return i||n}else return i||o.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,s){Gt(this.beans,{state:e.map(o=>({colId:typeof o=="string"?o:o.getColId(),hide:!t}))},s)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const s=new Map(t.map((d,c)=>[d,c]));if(!e.list.some(d=>s.has(d)))return;const i=new Map(e.list.map(d=>[d,!0])),n=t.filter(d=>i.has(d)),r=new Map(n.map(d=>[d,!0])),l=e.list.filter(d=>!r.has(d)),a=n.slice();l.forEach(d=>{let c=d.getOriginalParent();if(!c){a.push(d);return}const u=[];for(;!u.length&&c;)c.getLeafColumns().forEach(f=>{const m=a.indexOf(f)>=0,v=u.indexOf(f)<0;m&&v&&u.push(f)}),c=c.getOriginalParent();if(!u.length){a.push(d);return}const h=u.map(g=>a.indexOf(g)),p=Math.max(...h);a.splice(p+1,0,d)}),e.list=a}positionLockedCols(e){e.list=rf(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(){return this.colDefCols?this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[]):void 0}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1);const{visibleCols:s,eventSvc:o}=this.beans;s.refresh(t),o.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=ri(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){Eo(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:s,selectionColSvc:o}=this.beans;El(this.colDefCols?.list,e),El(s?.columns?.list,e),El(o?.columns?.list,e),El(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;const{map:s,list:o}=t;if(typeof e=="string"&&s[e])return s[e];for(let i=0;i<o.length;i++)if(rc(o[i],e))return o[i];return this.beans.autoColSvc?.getColumn(e)??this.beans.selectionColSvc?.getColumn(e)??null}},lc=class extends F{constructor(){super(...arguments),this.dispatchColumnChangedEvent=cf,this.columns=[],this.columnIndexMap={},this.updateIndexMap=()=>{this.columnIndexMap={},this.columns.forEach((e,t)=>this.columnIndexMap[e.getId()]=t)}}wireBeans(e){this.colModel=e.colModel,this.aggFuncSvc=e.aggFuncSvc,this.visibleCols=e.visibleCols}sortColumns(e){this.columns.sort(e),this.updateIndexMap()}setColumns(e,t){this.setColList(e,this.columns,this.eventName,!0,!0,this.columnProcessors.set,t)}addColumns(e,t){this.updateColList(e,this.columns,!0,!0,this.columnProcessors.add,this.eventName,t)}removeColumns(e,t){this.updateColList(e,this.columns,!1,!0,this.columnProcessors.remove,this.eventName,t)}getColumnIndex(e){return this.columnIndexMap[e]}setColList(e=[],t,s,o,i,n,r){const l=this.colModel.getCols();if(!l||l.length===0)return;const a=new Map;t.forEach((c,u)=>a.set(c,u)),t.length=0,j(e)&&e.forEach(c=>{const u=this.colModel.getColDefCol(c);u&&t.push(u)}),t.forEach((c,u)=>{const h=a.get(c);if(h===void 0){a.set(c,0);return}o&&h!==u||a.delete(c)}),this.updateIndexMap(),(this.colModel.getColDefCols()||[]).forEach(c=>{const u=t.indexOf(c)>=0;n(c,u,r)}),i&&this.colModel.refreshCols(!1),this.visibleCols.refresh(r),this.dispatchColumnChangedEvent(this.eventSvc,s,[...a.keys()],r)}updateColList(e=[],t,s,o,i,n,r){if(!e||e.length===0)return;let l=!1;const a=new Set;if(e.forEach(c=>{if(!c)return;const u=this.colModel.getColDefCol(c);if(u){if(a.add(u),s){if(t.indexOf(u)>=0)return;t.push(u)}else{const h=t.indexOf(u);if(h<0)return;for(let p=h+1;p<t.length;p++)a.add(t[p]);Ot(t,u)}i(u,s,r),l=!0}}),!l)return;this.updateIndexMap(),o&&this.colModel.refreshCols(!1),this.visibleCols.refresh(r);const d=Array.from(a);this.eventSvc.dispatchEvent({type:n,columns:d,column:d.length===1?d[0]:null,source:r})}extractCols(e,t=[]){const s=this.columns,o=[],i=[],{setFlagFunc:n,getIndexFunc:r,getInitialIndexFunc:l,getValueFunc:a,getInitialValueFunc:d}=this.columnExtractors;(this.colModel.getColDefCols()||[]).forEach(p=>{const g=t.indexOf(p)<0,f=p.getColDef(),m=a(f),v=d(f),y=r(f),R=l(f);let w;m!==void 0?w=m:y!==void 0?y===null?w=!1:w=y>=0:g?v!==void 0?w=v:R!==void 0?w=R!=null&&R>=0:w=!1:w=s.indexOf(p)>=0,w&&((g?y!=null||R!=null:y!=null)?o.push(p):i.push(p))});const u=p=>{const g=r(p.getColDef()),f=l(p.getColDef());return g??f};o.sort((p,g)=>{const f=u(p),m=u(g);return f===m?0:f<m?-1:1});const h=[].concat(o);return s.forEach(p=>{i.indexOf(p)>=0&&h.push(p)}),i.forEach(p=>{h.indexOf(p)<0&&h.push(p)}),s.forEach(p=>{h.indexOf(p)<0&&n(p,!1,e)}),h.forEach(p=>{s.indexOf(p)<0&&n(p,!0,e)}),this.columns=h,this.updateIndexMap(),this.columns}restoreColumnOrder(e,t){const s=this.columns,o=this.colModel.getColDefCols();if(!s.length||!o)return e;const i=Object.keys(t),n=new Set(i),r=new Set(i),l=new Set(s.map(R=>{const w=R.getColId();return r.delete(w),w}).concat(i)),a=[],d={};let c=0;for(let R=0;R<o.length;R++){const w=o[R].getColId();l.has(w)&&(a.push(w),d[w]=c++)}let u=1e3,h=!1,p=0;const g=this.columnOrdering.enableProp,f=this.columnOrdering.initialEnableProp,m=this.columnOrdering.indexProp,v=this.columnOrdering.initialIndexProp,y=R=>{const w=d[R];for(let b=p;b<w;b++){const x=a[b];r.has(x)&&(t[x][m]=u++,r.delete(x))}p=w};return s.forEach(R=>{const w=R.getColId();if(n.has(w))y(w),t[w][m]=u++;else{const b=R.getColDef();(b[m]===null||b[m]===void 0&&b[v]==null)&&(h||(b[g]||b[g]===void 0&&b[f]?y(w):(r.forEach(H=>{t[H][m]=u+d[H]}),u+=a.length,h=!0)),e[w]||(e[w]={colId:w}),e[w][m]=u++)}}),e}},BR=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let s;return typeof t!="number"?s=0:s=t+1,this.existingIds[e]=s,s}};function tr(e,t,s){return s&&e.addDestroyFunc(()=>t.destroyBean(s)),s??e}var ff=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){this.addOrRemoveCssClass(e,!0)}removeCssClass(e){this.addOrRemoveCssClass(e,!1)}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const o=(e||"").split(" ");if(o.length>1){o.forEach(i=>this.addOrRemoveCssClass(i,t));return}}if(this.cssClassStates[e]!==t&&e.length){const o=this.getGui();o&&o.classList.toggle(e,t),this.cssClassStates[e]=t}}},HR=0,k=null,ve=class extends F{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=HR++,this.cssClassManager=new ff(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(s=>[s.selector,s])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui());const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;this.css?.forEach(t=>this.beans.environment.addGlobalCSS(t,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(Rg):null}applyElementsToComponent(e,t,s,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const i=this[t];if(i===k)this[t]=o??e;else{const n=s&&s[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${i}`)}}}createChildComponentsFromTags(e,t){const s=[];for(const o of e.childNodes??[])s.push(o);s.forEach(o=>{if(!(o instanceof HTMLElement))return;const i=this.createComponentFromElement(o,n=>{const r=n.getGui();if(r)for(const l of o.attributes??[])r.setAttribute(l.name,l.value)},t);if(i){if(i.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);const n=Array.prototype.slice.call(o.children);i.addItems(n)}this.swapComponentForNode(i,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)})}createComponentFromElement(e,t,s){const o=e.nodeName,i=this.getDataRefAttribute(e),n=o.indexOf("AG-")===0,r=n?this.componentSelectors.get(o):null;let l=null;if(r){const a=s&&i?s[i]:void 0;l=new r.component(a),l.setParentComponent(this),this.createBean(l,null,t)}else if(n)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(e,i,s,l),l}swapComponentForNode(e,t,s){const o=e.getGui();t.replaceChild(o,s),t.insertBefore(document.createComment(s.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(s=>s.setAttribute("tabindex",t.toString()))}setTemplate(e,t,s){let o;typeof e=="string"||e==null?o=vl(e):o=Ne(e),this.setTemplateFromElement(o,t,s)}setTemplateFromElement(e,t,s,o=!1){if(this.eGui=e,this.suppressDataRefValidation=o,t)for(let i=0;i<t.length;i++){const n=t[i];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,s)}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 s=t;return e==null?null:(s||(s=this.eGui),wl(e)?{element:e,parent:s}:{element:e.getGui(),parent:s})}prependChild(e,t){const{element:s,parent:o}=this.getContainerAndElement(e,t)||{};!s||!o||o.insertAdjacentElement("afterbegin",s)}appendChild(e,t){const{element:s,parent:o}=this.getContainerAndElement(e,t)||{};!s||!o||o.appendChild(s)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:s}=t;HS(this.eGui,e,{skipAriaHidden:s})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:s}=t;fe(this.eGui,e,{skipAriaHidden:s});const o={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(o)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,s){this.eGui.addEventListener(e,t,s),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},Oe=class fr{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(s=>this.onDone(s),s=>this.onReject(s))}static all(t){return t.length?new fr(s=>{let o=t.length;const i=new Array(o);t.forEach((n,r)=>{n.then(l=>{i[r]=l,o--,o===0&&s(i)})})}):fr.resolve()}static resolve(t=null){return new fr(s=>s(t))}then(t){return new fr(s=>{this.status===1?s(t(this.resolution)):this.waiters.push(o=>s(t(o)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(s=>s(t))}onReject(t){}};function VR(e){return e?e.prototype&&"getGui"in e.prototype:!1}function mf(e,t,s,o){const{name:i}=s;let n,r,l,a,d,c;if(t){const u=t,h=u[i+"Selector"],p=h?h(o):null,g=f=>{typeof f=="string"?n=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?l=f:r=f)};p?(g(p.component),a=p.params,d=p.popup,c=p.popupPosition):g(u[i])}return{compName:n,jsComp:r,fwComp:l,paramsFromSelector:a,popupFromSelector:d,popupPositionFromSelector:c}}var WR=class extends F{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,s,o=!1){return this.getCompDetails(this.gridOptions,e,t,s,o)}getCompDetails(e,t,s,o,i=!1){const{name:n,cellRenderer:r}=t;let{compName:l,jsComp:a,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=mf(this.beans.frameworkOverrides,e,t,o),p;const g=y=>{const R=this.registry.getUserComponent(n,y);R&&(a=R.componentFromFramework?void 0:R.component,d=R.componentFromFramework?R.component:void 0,p=R.params)};if(l!=null&&g(l),a==null&&d==null&&s!=null&&g(s),a&&r&&!VR(a)&&(a=this.agCompUtils?.adaptFunction(t,a)),!a&&!d){const{validation:y}=this.beans;i&&(l!==s||!s)?l?y?.isProvidedUserComp(l)||ue(50,{compName:l}):s?y||ue(260,{...this.gos.getModuleErrorParams(),propName:n,compName:s}):ue(216,{name:n}):s&&!y&&ue(146,{comp:s});return}const f=this.mergeParams(e,t,o,c,p),m=a==null,v=a??d;return{componentFromFramework:m,componentClass:v,params:f,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(v,m,f,t)}}newAgStackInstance(e,t,s,o){const i=!t;let n;i?n=new e:n=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(n);const r=n.init?.(s);return r==null?Oe.resolve(n):r.then(()=>n)}mergeParams(e,t,s,o=null,i){const n={...s,...i},r=e,l=r&&r[t.name+"Params"];if(typeof l=="function"){const a=l(s);gt(n,a)}else typeof l=="object"&&gt(n,l);return gt(n,o),n}},zR={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},UR={name:"headerComponent",optionalMethods:["refresh"]},$R={name:"innerHeaderComponent"},jR={name:"innerHeaderGroupComponent"},KR={name:"headerGroupComponent"},YR={name:"innerRenderer",cellRenderer:!0,optionalMethods:["afterGuiAttached"]},qR={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},XR={name:"loadingCellRenderer",cellRenderer:!0},QR={name:"loadingOverlayComponent",optionalMethods:["refresh"]},ZR={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},ac={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},JR={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},ex={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},tx={name:"loadingCellRenderer",cellRenderer:!0},sx={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},ox={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function ix(e,t){return e.getCompDetailsFromGridOptions(zR,"agDragAndDropImage",t,!0)}function Tl(e,t,s){return e.getCompDetails(t,YR,void 0,s)}function nx(e,t,s){return e.getCompDetails(t,UR,"agColumnHeader",s)}function rx(e,t,s){return e.getCompDetails(t,$R,void 0,s)}function lx(e,t){const s=t.columnGroup.getColGroupDef();return e.getCompDetails(s,KR,"agColumnGroupHeader",t)}function ax(e,t,s){return e.getCompDetails(t,jR,void 0,s)}function dx(e,t){return e.getCompDetailsFromGridOptions(ex,void 0,t,!0)}function cx(e,t){return e.getCompDetailsFromGridOptions(tx,"agLoadingCellRenderer",t,!0)}function ux(e,t){return e.getCompDetailsFromGridOptions(sx,"agGroupRowRenderer",t,!0)}function hx(e,t){return e.getCompDetailsFromGridOptions(ox,"agDetailCellRenderer",t,!0)}function zi(e,t,s){return e.getCompDetails(t,qR,void 0,s)}function px(e,t,s){return e.getCompDetails(t,XR,"agSkeletonCellRenderer",s,!0)}function gx(e,t,s,o){return e.getCompDetails(t,ac,o,s,!0)}function fx(e,t){return e.getCompDetailsFromGridOptions(QR,"agLoadingOverlay",t,!0)}function mx(e,t){return e.getCompDetailsFromGridOptions(ZR,"agNoRowsOverlay",t,!0)}function Cx(e,t,s,o){return e.getCompDetails(t,JR,o,s)}function vx(e,t){return mf(e,t,ac)}function wx(e,t,s){return e.mergeParams(t,ac,s)}function Cf(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var vf=new Set,Ll={},Ui={},kl,wf=!1,yx=!1;function bx(e){const[t,s]=e.version.split(".")||[],[o,i]=kl.split(".")||[];return t===o&&s===i}function Sx(e){kl||(kl=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.`;if(e.version?bx(e)||Ni(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${kl}.`)):Ni(t(`'${e.moduleName}' is incompatible.`)),e.validate){const s=e.validate();s.isValid||Ni(`${s.message}`)}}function sr(e,t){Sx(e);const s=e.rowModels??["all"];vf.add(e);let o;t!==void 0?(wf=!0,Ui[t]===void 0&&(Ui[t]={}),o=Ui[t]):o=Ll,s.forEach(i=>{o[i]===void 0&&(o[i]={}),o[i][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(i=>sr(i,t))}function Rx(e){delete Ui[e]}function yf(e,t,s){const o=i=>!!Ll[i]?.[e]||!!Ui[t]?.[i]?.[e];return o(s)||o("all")}function dc(){return wf}function xx(e,t){const s=Ui[e]??{};return[...Object.values(Ll.all??{}),...Object.values(s.all??{}),...Object.values(Ll[t]??{}),...Object.values(s[t]??{})]}function Fx(){return new Set(vf)}function Dx(){return yx}var Ex=class{static register(e){sr(e,void 0)}static registerModules(e){e.forEach(t=>sr(t,void 0))}},Mx=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];e.beanClasses.forEach(t=>{const s=new t;s.beanName?this.beans[s.beanName]=s:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(s)}),e.derivedBeans?.forEach(t=>{const{beanName:s,bean:o}=t(this);this.beans[s]=o,this.createdBeans.push(o)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("null bean");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(s=>{s.preWireBeans?.(this.beans),s.wireBeans?.(this.beans)}),e.forEach(s=>s.preConstruct?.()),t&&e.forEach(t),e.forEach(s=>s.postConstruct?.())}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},Ax=class extends Mx{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){super.destroy(),Rx(this.gridId),this.destroyCallback?.()}getGridId(){return this.gridId}},Px="ag-column-first",Ix="ag-column-last";function bf(e,t,s,o){return ke(e)?[]:xf(e.headerClass,e,t,s,o)}function Sf(e,t,s,o){return ke(e)?[]:xf(e.toolPanelClass,e,t,s,o)}function Rf(e,t,s){e.addOrRemoveCssClass(Px,s.isColAtEdge(t,"first")),e.addOrRemoveCssClass(Ix,s.isColAtEdge(t,"last"))}function Tx(e,t,s,o){return he(t,{colDef:e,column:s,columnGroup:o})}function xf(e,t,s,o,i){if(ke(e))return[];let n;if(typeof e=="function"){const r=Tx(t,s,o,i);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}var D={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"},cc=!1,Ol=0;function Lx(e){Ol>0||(e.addEventListener("keydown",Gl),e.addEventListener("mousedown",Gl))}function kx(e){Ol>0||(e.removeEventListener("keydown",Gl),e.removeEventListener("mousedown",Gl))}function Gl(e){const t=cc,s=e.type==="keydown";s&&(e.ctrlKey||e.metaKey||e.altKey)||t!==s&&(cc=s)}function Ox(e){const t=Xe(e);return Lx(t),Ol++,()=>{Ol--,kx(t)}}function Ff(){return cc}function li(e,t,s=!1){const o=BS;let i=pg;t&&(i+=", "+t),s&&(i+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(a=>fs(a)),r=Array.prototype.slice.apply(e.querySelectorAll(i));return r.length?((a,d)=>a.filter(c=>d.indexOf(c)===-1))(n,r):n}function ys(e,t=!1,s=!1,o=!1){const i=li(e,o?".ag-tab-guard":null,s),n=t?Re(i):i[0];return n?(n.focus({preventScroll:!0}),!0):!1}function ho(e,t,s,o){const i=li(t,s?':not([tabindex="-1"])':null),n=Be(e);let r;s?r=i.findIndex(a=>a.contains(n)):r=i.indexOf(n);const l=r+(o?-1:1);return l<0||l>=i.length?null:i[l]}function uc(e,t=5){let s=0;for(;e&&dg(e)===null&&++s<=t;)e=e.parentElement;return dg(e)===null?null:e}function ai(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function hc(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function $i(e,t,s=!1){const o=e.ctrlsSvc.get("gridCtrl");return!s&&o.focusNextInnerContainer(t)?!0:((s||!t&&!o.isDetailGrid())&&o.forceFocusOutOfContainer(t),!1)}function Gx(e,t=!1){return e===D.DELETE?!0:!t&&e===D.BACKSPACE?ag():!1}var Nx=class extends F{constructor(e,t,s,o){super(),this.cellCtrl=e,this.rowNode=s,this.rowCtrl=o,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case D.ENTER:this.onEnterKeyDown(e);break;case D.F2:this.onF2KeyDown(e);break;case D.ESCAPE:this.onEscapeKeyDown(e);break;case D.TAB:this.onTabKeyDown(e);break;case D.BACKSPACE:case D.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case D.DOWN:case D.UP:case D.RIGHT:case D.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){if(!this.cellCtrl.editing){if(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const s=this.cellCtrl.getFocusedCellPosition();this.beans.navigation?.navigateToNextCell(e,t,s,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:s}=this.beans;if(!t)return;const o=t.extendLatestRangeInDirection(e);o&&s?.ensureCellVisible(o)}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:s,beans:o,rowNode:i}=this,{gos:n,rangeSvc:r,eventSvc:l}=o;if(!s.editing){if(l.dispatchEvent({type:"keyShortcutChangedCellStart"}),Gx(e,n.get("enableCellEditingOnBackspace"))){if(r&&oi(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(s.isCellEditable()){const{column:a}=s,d=this.beans.valueSvc.getDeleteValue(a,i);i.setDataValue(a,d,"cellClear")}}else o.editSvc?.startRowOrCellEdit(s,e,t);l.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){const{cellCtrl:t,beans:s}=this;if(t.editing||this.rowCtrl.editing)this.beans.editSvc?.stopRowOrCellEdit(t,!1,!1,e.shiftKey);else if(s.gos.get("enterNavigatesVertically")){const o=e.shiftKey?D.UP:D.DOWN;s.navigation?.navigateToNextCell(null,o,t.cellPosition,!1)}else s.editSvc?.startRowOrCellEdit(t,D.ENTER,e),t.editing&&e.preventDefault()}onF2KeyDown(e){const{cellCtrl:t,beans:s}=this;t.editing||s.editSvc?.startRowOrCellEdit(t,D.F2,e)}onEscapeKeyDown(e){const{cellCtrl:t,beans:s}=this;t.editing&&s.editSvc?.stopRowOrCellEdit(t,!0)}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.editing)return;const o=e.key;o===D.SPACE?this.onSpaceKeyDown(e):this.beans.editSvc?.startRowOrCellEdit(this.cellCtrl,o,e)&&e.preventDefault()}onSpaceKeyDown(e){const{gos:t}=this.beans;!this.cellCtrl.editing&&Gs(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,this.rowNode,"spaceKey"),e.preventDefault()}destroy(){super.destroy()}},_x=class extends F{constructor(e,t,s){super(),this.cellCtrl=e,this.column=s,this.beans=t}onMouseEvent(e,t){if(!vs(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){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:s,gos:o,editSvc:i}=this.beans,n=e.ctrlKey||e.metaKey;s&&n&&s.getCellRangeCount(this.cellCtrl.cellPosition)>1&&s.intersectLastRange(!0);const r=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(r);const l=this.column.getColDef();l.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{l.onCellClicked(r)})},0),(o.get("singleClickEdit")||l.singleClickEdit)&&!o.get("suppressClickEdit")&&!(e.shiftKey&&s?.getCellRanges().length!=0)&&i?.startRowOrCellEdit(this.cellCtrl,void 0,e)}onCellDoubleClicked(e){const{column:t,beans:s,cellCtrl:o}=this,{eventSvc:i,frameworkOverrides:n,gos:r,editSvc:l}=s,a=t.getColDef(),d=o.createEvent(e,"cellDoubleClicked");i.dispatchEvent(d),typeof a.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{a.onCellDoubleClicked(d)})},0),!r.get("singleClickEdit")&&!r.get("suppressClickEdit")&&l?.startRowOrCellEdit(o,null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:s,shiftKey:o}=e,i=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:l,rangeSvc:a,rowNumbersSvc:d,focusSvc:c,gos:u}=r;if(this.isRightClickInExistingRange(e))return;const h=a&&!a.isEmpty(),p=this.containsWidget(i),{cellPosition:g}=n,f=Ml(g.column);if(d&&f&&!d.handleMouseDownOnCell(g,e)){a&&e.preventDefault(),e.stopImmediatePropagation();return}if(!o||!h){const v=u.get("enableCellTextSelection")&&e.defaultPrevented,y=(fl()||v)&&!n.editing&&!Gd(i)&&!p;n.focusCell(y)}if(o&&h&&!c.isCellFocused(g)){e.preventDefault();const m=c.getFocusedCell();if(m){const{column:v,rowIndex:y,rowPinned:R}=m,b=r.rowRenderer.getRowByPosition({rowIndex:y,rowPinned:R})?.getCellCtrl(v);b?.editing&&b.stopEditing(),c.setFocusedCell({column:v,rowIndex:y,rowPinned:R,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!p){if(a)if(f&&e.preventDefault(),o)a.extendLatestRangeToCell(g);else{const m=t||s;a.setRangeToCell(g,m)}l.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const s=t.isCellInAnyRange(this.cellCtrl.cellPosition),o=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(s&&o)return!0}return!1}containsWidget(e){return Jo(e,"ag-selection-checkbox",3)||Jo(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:s}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),s?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:s}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),s?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,s=t.contains(e.target),o=t.contains(e.relatedTarget);return s&&o}destroy(){super.destroy()}},Bx=class extends F{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();e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e&&(this.refreshSpanHeight(e),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:this.refreshSpanHeight.bind(this,e),recalculateRowBounds:this.refreshSpanHeight.bind(this,e)}))}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();_s(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,s=e.getColSpan(t),o=[];if(s===1)o.push(e);else{let i=e;const n=e.getPinned();for(let r=0;i&&r<s&&(o.push(i),i=this.beans.visibleCols.getColAfter(i),!(!i||ke(i)||n!==i.getPinned()));r++);}return o}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=Re(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,s=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const o=t.bodyWidth;return s+o+(e||0)}return s+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const s=ti(this.beans)*this.rowSpan;this.eContent.style.height=`${s}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},Hx="ag-cell",Vx="ag-cell-auto-height",Wx="ag-cell-normal-height",zx="ag-cell-focus",Ux="ag-cell-first-right-pinned",$x="ag-cell-last-left-pinned",jx="ag-cell-not-inline-editing",Kx="ag-cell-wrap-text",Nl="cellCtrl";function Df(e,t){return Kg(e,t,Nl)}var Yx=0,_l=class extends F{constructor(e,t,s,o){super(),this.column=e,this.rowNode=t,this.rowCtrl=o,this.rangeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.tooltipFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.beans=s;const{colId:i,colIdSanitised:n}=e;this.instanceId=i+"-"+Yx++,this.colIdSanitised=n,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new Bx(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.mouseListener=new _x(this,e,this.column),this.keyboardListener=new Nx(this,e,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature();const{rangeSvc:t}=e;t&&oi(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}setComp(e,t,s,o,i,n,r){this.comp=e,this.eGui=t,this.printLayout=i,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(o,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),n&&this.isCellEditable()?this.beans.editSvc?.startEditing(this):this.showValue(!1,!0),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(l=>l()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.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}showValue(e,t){const{beans:s,column:o,rowNode:i,rangeFeature:n}=this,{userCompFactory:r}=s,l=this.getValueToDisplay();let a;const d=i.stub&&i.groupData?.[o.getId()]==null,c=o.getColDef();if(d||this.isCellRenderer()){const u=this.createCellRendererParams();!d||Ml(o)?a=zi(r,c,u):a=px(r,c,u)}if(!a&&!d&&s.findSvc?.isMatch(i,o)){const u=this.createCellRendererParams();a=zi(r,{...o.getColDef(),cellRenderer:"agFindCellRenderer"},u)}this.comp.setRenderDetails(a,l,e),!t&&n&&ms(s,()=>n?.refreshHandle())}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e)),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()}isIncludeControl(e){return this.rowNode.rowPinned!=null?!1:typeof e=="function"||e===!0}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:s}=this.beans.gridOptions,o=Qn(t),i=Mo(this.column);return s==="custom"&&o!=="selectionColumn"&&i?!1:e.checkboxSelection||i&&typeof t=="object"&&si(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),s=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),o=this.includeDndSource!=this.isIncludeControl(e.dndSource),i=this.isAutoHeight!=this.column.isAutoHeight();return t||s||o||i}onPopupEditorClosed(){this.editing&&this.beans.editSvc?.stopRowOrCellEdit(this)}stopEditing(e=!1){return this.beans.editSvc?.stopEditing(this,e)??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:s,rowNode:o,comp:i,eGui:n,beans:{valueSvc:r,gos:l}}=this;return he(l,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(s,o),setValue:d=>r.setValue(o,s,d),formatValue:this.formatValue.bind(this),data:o.data,node:o,pinned:s.getPinned(),colDef:s.getColDef(),column:s,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:i.getParentOfValue(),registerRowDragger:(d,c,u,h)=>this.registerRowDragger(d,c,h),setTooltip:(d,c)=>{l.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,c),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e)}refreshCell(e){if(this.suppressRefreshCell||this.editing)return;const t=this.column.getColDef(),s=e!=null&&!!e.newData,o=e!=null&&!!e.suppressFlash,i=t.field==null&&t.valueGetter==null&&t.showRowGroup==null,n=e&&e.forceRefresh||i||s,r=!!this.comp,l=this.updateAndFormatValue(r),a=n||l;if(r){if(a){this.showValue(s,!1);const d=this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();!o&&!d&&t.enableCellChangeFlash&&this.beans.cellFlashSvc?.flashCell(this),this.customStyleFeature?.applyUserStyles(),this.customStyleFeature?.applyClassesFromColDef()}this.tooltipFeature?.refreshTooltip(),this.customStyleFeature?.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,s=this.valueFormatted;return this.value=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=s:!0}valuesAreEqual(e,t){const s=this.column.getColDef();return s.equals?s.equals(e,t):e===t}addDomData(e){const t=this.eGui;_i(this.beans.gos,t,Nl,this),e.addDestroyFunc(()=>_i(this.beans.gos,t,Nl,null))}createEvent(e,t){const{rowNode:s,column:o,value:i,beans:n}=this;return he(n.gos,{type:t,node:s,data:s.data,value:i,column:o,colDef:o.getColDef(),rowPinned:s.rowPinned,event:e,rowIndex:s.rowIndex})}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature.getColSpanningList()}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:s}=this;Rf(e,t,s.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);ng(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1){this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e})}restoreFocus(e=!1){if(!this.comp||this.editing||!this.isCellFocused()||!this.beans.focusSvc.shouldTakeFocus())return;const t=()=>{if(!this.isAlive())return;const s=this.comp.getFocusableElement();this.isCellFocused()&&s.focus({preventScroll:!0})};if(e){setTimeout(t,0);return}t()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(Ml(this.column)&&(e=!0),Gi(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.addOrRemoveCssClass(Ux,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.addOrRemoveCssClass($x,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){const{beans:t}=this;if(hc(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const s=this.isCellFocused();if(this.comp.addOrRemoveCssClass(zx,s),s&&e&&e.forceBrowserFocus){let i=this.comp.getFocusableElement();if(this.editing){const n=li(i,null,!0);n.length&&(i=n[0])}i.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}const o=t.gos.get("editType")==="fullRow";!s&&!o&&this.editing&&t.editSvc?.stopRowOrCellEdit(this),s&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:kt(t),column:this.column}}setInlineEditingCss(){this.beans.editSvc?.setInlineEditingCss(this.rowCtrl)}applyStaticCssClasses(){const{comp:e}=this;e.addOrRemoveCssClass(Hx,!0),e.addOrRemoveCssClass(jx,!0);const t=this.column.isAutoHeight()==!0;e.addOrRemoveCssClass(Vx,t),e.addOrRemoveCssClass(Wx,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?this.beans.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.addOrRemoveCssClass(Kx,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),s=this.createEvent(e,"cellContextMenu"),{beans:o}=this;o.eventSvc.dispatchEvent(s),t.onCellContextMenu&&window.setTimeout(()=>{o.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(s)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(Be(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.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,s){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const o=this.createRowDragComp(e,t,s);o&&(this.customRowDragComp=o,this.addDestroyFunc(()=>{this.beans.context.destroyBean(o),this.customRowDragComp=null}))}createRowDragComp(e,t,s){const o=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,s);if(o)return this.beans.context.createBean(o),o}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}},Ef="__ag_grid_instance";function Mf(e,t){t[Ef]=e.gridInstanceId}function or(e,t){return qx(e,t.target)}function qx(e,t){let s=t;for(;s;){const o=s[Ef];if(j(o))return o===e.gridInstanceId;s=s.parentElement}return!1}function Xx(e,t){return Df(e,t.target)?.getFocusedCellPosition()??null}var Bl=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(Bl||{}),Qx=class extends F{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.dragSvc=e.dragSvc,this.environment=e.environment,this.userCompFactory=e.userCompFactory}addDragSource(e,t=!1){const s={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:s,dragSource:e}),this.dragSvc.addDragSource(s)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const{dragSourceAndParamsList:t,dragSvc:s}=this,o=t.find(i=>i.dragSource===e);o&&(s.removeDragSource(o.params),Ot(t,o))}destroy(){const{dragSourceAndParamsList:e,dragSvc:t,dropTargets:s}=this;e.forEach(o=>t.removeDragSource(o.params)),e.length=0,s.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),e.onDragStarted?.(),this.createDragAndDropImageComponent()}onDragStop(e){this.dragSource?.onDragStopped?.();const{lastDropTarget:t}=this;if(t?.onDragStop){const s=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(s)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t}=this;e?.onDragCancelled?.(),t?.onDragCancel&&t.onDragCancel(this.createDropTargetEvent(t,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){const s=this.getHorizontalDirection(e),o=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const i=this.dropTargets.filter(c=>this.isMouseOnDropTarget(e,c)),n=this.findCurrentDropTarget(e,i),{lastDropTarget:r,dragSource:l,dragAndDropImageComp:a,dragItem:d}=this;if(n!==r){if(this.leaveLastTargetIfExists(e,s,o,t),r!==null&&n===null&&l?.onGridExit?.(d),r===null&&n!==null&&l?.onGridEnter?.(d),this.enterDragTargetIfExists(n,e,s,o,t),n&&a){const{comp:c,promise:u}=a;c?c.setIcon(n.getIconName?n.getIconName():null,!1):u.then(h=>{h&&h.setIcon(n.getIconName?n.getIconName():null,!1)})}this.lastDropTarget=n}else if(n&&n.onDragging){const c=this.createDropTargetEvent(n,e,s,o,t);n.onDragging(c)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,s=[[e.getContainer()]];return t?s.concat(t):s}isMouseOnDropTarget(e,t){const s=this.getAllContainersFromDropTarget(t);let o=!1;const i=(l,a)=>{for(const d of a){const{width:c,height:u,left:h,right:p,top:g,bottom:f}=d.getBoundingClientRect();if(c===0||u===0)return!1;const m=l.clientX>=h&&l.clientX<p,v=l.clientY>=g&&l.clientY<f;if(!m||!v)return!1}return!0};for(const l of s)if(i(e,l)){o=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:o&&t.isInterestedIn(r,n)}findCurrentDropTarget(e,t){const s=t.length;if(s===0)return null;if(s===1)return t[0];const i=Bi(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of i)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(a=>a).indexOf(n)!==-1)return r;return null}enterDragTargetIfExists(e,t,s,o,i){if(e&&e.onDragEnter){const n=this.createDropTargetEvent(e,t,s,o,i);e.onDragEnter(n)}}leaveLastTargetIfExists(e,t,s,o){const{lastDropTarget:i}=this;if(!i)return;if(i.onDragLeave){const r=this.createDropTargetEvent(i,e,t,s,o);i.onDragLeave(r)}const n=this.getDragAndDropImageComponent();n&&n.setIcon(null,!1)}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.filter(s=>s.external).find(s=>s.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const s=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:o}=e;return s.contains(o)}getHorizontalDirection(e){const t=this.eventLastTime?.clientX,s=e.clientX;return t===s?null:t>s?"left":"right"}getVerticalDirection(e){const t=this.eventLastTime?.clientY,s=e.clientY;return t===s?null:t>s?"up":"down"}createDropTargetEvent(e,t,s,o,i){const n=e.getContainer(),r=n.getBoundingClientRect(),{dragItem:l,dragSource:a,gos:d}=this,c=t.clientX-r.left,u=t.clientY-r.top;return he(d,{event:t,x:c,y:u,vDirection:o,hDirection:s,dragSource:a,fromNudge:i,dragItem:l,dropZoneTarget:n})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&iR(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;if(e){const{comp:t}=e;if(t){const s=t.getGui();this.dragAndDropImageParent?.removeChild(s),this.destroyBean(t)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e,gos:t,userCompFactory:s}=this;if(!e)return;const o=ix(s,he(t,{dragSource:e}));if(!o)return;const i=o.newAgStackInstance();this.dragAndDropImageComp={promise:i},i.then(n=>{!n||!this.isAlive()||(this.processDragAndDropImageComponent(n),this.dragAndDropImageComp.comp=n)})}processDragAndDropImageComponent(e){const{dragSource:t,environment:s}=this;if(!t)return;const o=e.getGui();o.style.setProperty("position","absolute"),o.style.setProperty("z-index","9999"),Mf(this.gos,o),s.applyThemeClasses(o),e.setIcon(null,!1);let{dragItemName:i}=t;typeof i=="function"&&(i=i()),e.setLabel(i||""),o.style.top="20px",o.style.left="20px";const n=Kd(this.beans);this.dragAndDropImageParent=n,n?n.appendChild(o):I(54)}registerGridDropTarget(e,t){const s={getContainer:e,isInterestedIn:o=>o===1||o===0,getIconName:()=>"notAllowed"};this.addDropTarget(s),t.addDestroyFunc(()=>this.removeDropTarget(s))}},Zx=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,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)}check(e,t=!1){const s=t||this.shouldSkipVerticalScroll();if(s&&this.shouldSkipHorizontalScroll())return;const o=this.scrollContainer.getBoundingClientRect(),i=this.scrollByTick;this.tickLeft=e.clientX<o.left+i,this.tickRight=e.clientX>o.right-i,this.tickUp=e.clientY<o.top+i&&!s,this.tickDown=e.clientY>o.bottom-i&&!s,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)}};function Jx(e,t){const s=e.column===t.column,o=e.rowPinned===t.rowPinned,i=e.rowIndex===t.rowIndex;return s&&o&&i}function eF(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(j(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function tF(e){let t=0,s;const{pinnedRowModel:o,rowModel:i,pageBounds:n}=e;return o?.getPinnedTopRowCount()?s="top":i.getRowCount()?(s=null,t=n.getFirstRow()):o?.getPinnedBottomRowCount()&&(s="bottom"),s===void 0?null:{rowIndex:t,rowPinned:s}}function sF(e){let t,s=null;const{pinnedRowModel:o,pageBounds:i}=e,n=o?.getPinnedBottomRowCount(),r=o?.getPinnedTopRowCount();return n?(s="bottom",t=n-1):e.rowModel.getRowCount()?(s=null,t=i.getLastRow()):r&&(s="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:s}}function pc(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function Hl(e,t){const s=e.spannedRowRenderer?.getCellByPosition(t);if(s)return s;const o=e.rowRenderer.getRowByPosition(t);return o?o.getCellCtrl(t.column):null}function Vl(e,t){const{rowIndex:s,rowPinned:o}=t,{pageBounds:i,pinnedRowModel:n,rowModel:r}=e;if(s===0)return o==="top"?null:o==="bottom"&&r.isRowsToRender()?{rowIndex:i.getLastRow(),rowPinned:null}:n?.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null;const l=o?void 0:r.getRow(s);return Pf(e,l,!0)??{rowIndex:s-1,rowPinned:o}}function Af(e,t){const{rowIndex:s,rowPinned:o}=t,{pageBounds:i,pinnedRowModel:n,rowModel:r}=e;if(oF(e,t))return o==="bottom"?null:o==="top"&&r.isRowsToRender()?{rowIndex:i.getFirstRow(),rowPinned:null}:n?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;const l=o?void 0:r.getRow(s);return Pf(e,l)??{rowIndex:s+1,rowPinned:o}}function Pf(e,t,s){const{gos:o,rowRenderer:i}=e;if(!t?.sticky||!Sl(o))return;const n=s?i.getStickyTopRowCtrls():i.getStickyBottomRowCtrls();let r;for(let l=0;l<n.length;l++)if(n[l].rowNode.rowIndex===t.rowIndex){r=n[l+(s?-1:1)];break}return r?{rowIndex:r.rowNode.rowIndex,rowPinned:null}:void 0}function oF(e,t){const{rowPinned:s,rowIndex:o}=t,{pinnedRowModel:i,pageBounds:n}=e;return s==="top"?(i?.getPinnedTopRowCount()??0)-1<=o:s==="bottom"?(i?.getPinnedBottomRowCount()??0)-1<=o:n.getLastRow()<=o}function If(e,t,s){if(s===0)return!1;const o=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return Math.max(o,i)<=s}var iF=class extends F{constructor(){super(...arguments),this.beanName="dragSvc",this.dragEndFunctions=[],this.dragSources=[]}destroy(){const{dragSources:e}=this;e.forEach(this.removeListener.bind(this)),e.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,s=e.mouseDownListener;if(t.removeEventListener("mousedown",s),e.touchEnabled){const o=e.touchStartListener;t.removeEventListener("touchstart",o,{passive:!0})}}removeDragSource(e){const{dragSources:t}=this,s=t.find(o=>o.dragSource===e);s&&(this.removeListener(s),Ot(t,s))}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:s,includeTouch:o,stopPropagationForTouch:i}=e;s.addEventListener("mousedown",t);let n=null;const r=this.gos.get("suppressTouch");o&&!r&&(n=l=>{Gd(l.target)||(i&&l.stopPropagation(),this.onTouchStart(e,l))},s.addEventListener("touchstart",n,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:n,touchEnabled:!!o})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const s=t.touches[0];this.touchLastTime=s,this.touchStart=s;const o=a=>this.onTouchMove(a,e.eElement),i=a=>this.onTouchUp(a,e.eElement),n=a=>{a.cancelable&&a.preventDefault()},r=t.target,l=[{target:Bi(this.beans),type:"touchmove",listener:n,options:{passive:!1}},{target:r,type:"touchmove",listener:o,options:{passive:!0}},{target:r,type:"touchend",listener:i,options:{passive:!0}},{target:r,type:"touchcancel",listener:i,options:{passive:!0}}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onCommonMove(s,this.touchStart,e.eElement)}onMouseDown(e,t){const s=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||s._alreadyProcessedByDragService||(s._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const o=d=>this.onMouseMove(d,e.eElement),i=d=>this.onMouseUp(d,e.eElement),n=d=>d.preventDefault(),r=d=>{d.key===D.ESCAPE&&this.cancelDrag(e.eElement)},l=Bi(this.beans),a=[{target:l,type:"mousemove",listener:o},{target:l,type:"mouseup",listener:i},{target:l,type:"contextmenu",listener:n},{target:l,type:"keydown",listener:r}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:s,type:o,listener:i,options:n}=t;s.addEventListener(o,i,n)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:s,type:o,listener:i,options:n}=t;s.removeEventListener(o,i,n)})})}isEventNearStartEvent(e,t){const{dragStartPixels:s}=this.currentDragParams,o=j(s)?s:4;return If(e,t,o)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,s){if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventSvc.dispatchEvent({type:"dragStarted",target:s}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}this.currentDragParams?.onDragging(e)}onTouchMove(e,t){const s=this.getFirstActiveTouch(e.touches);s&&this.onCommonMove(s,this.touchStart,t)}onMouseMove(e,t){fl()&&Xe(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const{gos:t}=this,s=t.get("enableCellTextSelection"),o=e.type==="mousemove",i=n=>!!n.target?.tagName.toLocaleLowerCase()?.match("^a$|textarea|input|select|button");return s&&o&&e.cancelable&&or(t,e)&&!i(e)}onTouchUp(e,t){let s=this.getFirstActiveTouch(e.changedTouches);s||(s=this.touchLastTime),this.onUpCommon(s,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),this.currentDragParams?.onDragCancel?.(),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null;const{dragEndFunctions:e}=this;e.forEach(t=>t()),e.length=0}};function Tf(e,t){return e+"_"+t}function Ye(e){return e instanceof Lf}var Lf=class extends F{constructor(e,t,s,o){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=s,this.pinned=o,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return Tf(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(){if(this.displayedChildren.forEach(e=>{Ye(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=Re(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;return this.displayedChildren?.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),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(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{Ns(t)?e.push(t):Ye(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{Ns(t)?e.push(t):Ye(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||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){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}this.children.forEach(s=>{if(Ye(s)&&(!s.displayedChildren||!s.displayedChildren.length))return;switch(s.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(s);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(s);break;default:this.displayedChildren.push(s);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},Wl="row-group-",nF="t-",rF="b-",lF=0,di=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=lF++,this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:s,selectionSvc:o,eventSvc:i}=this.beans,n=this.data;this.data=e,s?.onDataChanged(),this.updateDataOnDetailNode(),o?.updateRowSelectable(this),this.resetQuickFilterAggregateText();const r=this.createDataChangedEvent(e,n,t);this.__localEventService?.dispatchEvent(r),i.dispatchEvent({type:"rowNodeDataChanged",node:this})}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,s){return{type:"dataChanged",node:this,oldData:t,newData:e,update:s}}getRowIndexString(){return this.rowIndex==null?(ue(13),null):this.rowPinned==="top"?nF+this.rowIndex:this.rowPinned==="bottom"?rF+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:s}=this.beans,o=s?.createDaemonNode?.(this),i=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),s&&(s.updateRowSelectable(this),s.syncInRowNode(this,o));const n=this.createDataChangedEvent(e,i,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=Xn(this.beans.gos);if(t)if(this.data){const s=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:s.length>0?s:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(Wl)&&ue(14,{groupPrefix:Wl})}else this.id=void 0;else this.id=e}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(e!==null))}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,s){this.beans.expansionSvc?.setExpanded(this,e,t,s)}setDataValue(e,t,s){const{colModel:o,valueSvc:i,gos:n,selectionSvc:r}=this.beans,l=typeof e!="string"?e:o.getCol(e)??o.getColDefCol(e);if(!l)return!1;const a=i.getValueForDisplay(l,this);if(n.get("readOnlyEdit")){const{beans:{eventSvc:c},data:u,rowIndex:h,rowPinned:p}=this;return c.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:p,column:l,colDef:l.colDef,data:u,node:this,oldValue:a,newValue:t,value:t,source:s}),!1}const d=i.setValue(this,l,t,s);return this.dispatchCellChangedEvent(l,t,a),r?.updateRowSelectable(this),d}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;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,s){const o={type:"cellChanged",node:this,column:e,newValue:t,oldValue:s};this.__localEventService?.dispatchEvent(o)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){return this.footer?this.sibling.isSelected():this.__selected}depthFirstSearch(e){this.childrenAfterGroup?.forEach(t=>t.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,s="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:s})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){this.__localEventService||(this.__localEventService=new ro),this.__localEventService.addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e),this.__localEventService||(this.__localEventService=new ro),this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.__localEventService);const s=this.frameworkEventListenerService?.wrap(t)??t;this.__localEventService.addEventListener(e,s)}removeEventListener(e,t){const s=this.frameworkEventListenerService?.unwrap(t)??t;this.removeLocalListener(e,s)}removeLocalListener(e,t){this.__localEventService?.removeEventListener(e,t),this.__localEventService?.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(I(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&&t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}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"))}};function kf(e,t,s){return he(t,{type:s,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var aF={tag:"div",cls:"ag-filter"},Of=class extends ve{constructor(e,t){super(aF),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){return this.filterWrapper?.filterPromise??null}afterInit(){return this.filterWrapper?.filterPromise?.then(()=>{})??Oe.resolve()}afterGuiAttached(e){this.filterWrapper?.filterPromise?.then(t=>{t?.afterGuiAttached?.(e)})}afterGuiDetached(){this.filterWrapper?.filterPromise?.then(e=>{e?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:s}=this;this.filterWrapper=this.beans.filterManager?.getOrCreateFilterWrapper(t)??null,this.filterWrapper?.filterPromise&&this.filterWrapper.filterPromise.then(o=>{const i=o.getGui();j(i)||I(69,{guiFromFilter:i}),this.appendChild(i),e&&this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:s,eGui:this.getGui()})})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(is(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},Gf="ag-resizer-wrapper",Ao=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),dF={tag:"div",cls:Gf,children:[Ao("eTopLeft","topLeft"),Ao("eTop","top"),Ao("eTopRight","topRight"),Ao("eRight","right"),Ao("eBottomRight","bottomRight"),Ao("eBottom","bottom"),Ao("eBottomLeft","bottomLeft"),Ao("eLeft","left")]},gc=class extends F{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(){const{clientHeight:e,clientWidth:t}=this.offsetParent,s=t/2-this.getWidth()/2,o=e/2-this.getHeight()/2;this.offsetElement(s,o)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:s,width:o,minHeight:i,height:n,x:r,y:l}=this.config;this.offsetParent||this.setOffsetParent();let a=0,d=0;const c=fs(this.element);if(c){const u=this.findBoundaryElement(),h=window.getComputedStyle(u);if(h.minWidth!=null){const p=u.offsetWidth-this.element.offsetWidth;d=parseInt(h.minWidth,10)-p}if(h.minHeight!=null){const p=u.offsetHeight-this.element.offsetHeight;a=parseInt(h.minHeight,10)-p}}if(this.minHeight=i||a,this.minWidth=s||d,o&&this.setWidth(o),n&&this.setHeight(n),(!o||!n)&&this.refreshSize(),e)this.center();else if(r||l)this.offsetElement(r,l);else if(c&&t){let u=this.boundaryEl,h=!0;if(u||(u=this.findBoundaryElement(),h=!1),u){const p=parseFloat(u.style.top),g=parseFloat(u.style.left);h?this.offsetElement(isNaN(g)?0:g,isNaN(p)?0:p):this.setPosition(g,p)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const s=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(s),this.moveElementDragListener=s):(this.dragSvc?.removeDragSource(s),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=>{const o=!!e[t],i=this.getResizerElement(t),n={dragStartPixels:0,eElement:i,onDragStart:r=>this.onResizeStart(r,t),onDragging:this.onResize.bind(this),onDragStop:r=>this.onResizeEnd(r,t)};(o||!this.isAlive()&&!o)&&(o?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),i.style.pointerEvents="all"):i.style.pointerEvents="none",this.resizable[t]=o)})}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,s=this.element;let o=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)$n(s,e),e=gg(s),o=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const i=this.getAvailableHeight();i&&e>i&&(e=i)}this.getHeight()!==e&&(o?(s.style.maxHeight="unset",s.style.minHeight="unset"):t?$n(s,e):(s.style.height=`${e}px`,s.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:s}=this.offsetParent;if(!s)return null;const o=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:o.top,r=e?0:i.top;let l=0;if(t){const d=this.element.parentElement;if(d){const{bottom:c}=d.getBoundingClientRect();l=c-o.bottom}}return s+r-n-l}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:s}=this.config;let o=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Ls(t,e),e=fg(t),o=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:i}=this.offsetParent,n=s?this.position.x:this.element.getBoundingClientRect().left;i&&e+n>i&&(e=i-n)}this.getWidth()!==e&&(o?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Ls(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:s}=this.config,o=s?this.boundaryEl:this.element;o&&(this.popupSvc?.positionPopup({ePopup:o,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(o.style.left),parseFloat(o.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const s=this.getAvailableHeight();this.element.style.setProperty("max-height",`${s}px`)};e&&this.popupSvc?this.resizeObserverSubscriber=Fo(this.beans,this.popupSvc?.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:s,isTop:o,anywhereWithin:i,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,l=t.clientY-this.dragStartPosition.y,a=this.shouldSkipX(t,!!s,!!i,r)?0:r,d=this.shouldSkipY(t,!!o,n,l)?0:l;return{movementX:a,movementY:d}}shouldSkipX(e,t,s,o){const i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:i.left;let a=l<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return a?!0:(t?a=o<0&&e.clientX>l+n.left||o>0&&e.clientX<l+n.left:s?a=o<0&&e.clientX>r.right||o>0&&e.clientX<l+n.left:a=o<0&&e.clientX>r.right||o>0&&e.clientX<r.right,a)}shouldSkipY(e,t,s=0,o){const i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.y:i.top;let a=l<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return a?!0:(t?a=o<0&&e.clientY>l+n.top+s||o>0&&e.clientY<l+n.top:a=o<0&&e.clientY>r.bottom||o>0&&e.clientY<r.bottom,a)}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(Ne(dF)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${Gf}`);e&&this.element.removeChild(e),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:s,forcePopupParentAsOffsetParent:o}=this.config;!s&&!o&&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(s=>!s.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,s=0;for(let o=0;o<e.length;o++){const i=e[o],n=!!i.style.flex&&i.style.flex!=="0 0 auto";if(i===this.element)continue;let r=this.minHeight||0,l=this.minWidth||0;if(n){const a=window.getComputedStyle(i);a.minHeight&&(r=parseInt(a.minHeight,10)),a.minWidth&&(l=parseInt(a.minWidth,10))}else r=i.offsetHeight,l=i.offsetWidth;t+=r,s+=l}return{height:t,width:s}}applySizeToSiblings(e){let t=null;const s=this.getSiblings();if(s){for(let o=0;o<s.length;o++){const i=s[o];i!==t&&(e?i.style.height=`${i.offsetHeight}px`:i.style.width=`${i.offsetWidth}px`,i.style.flex="0 0 auto",i===this.element&&(t=s[o+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:s}=this.config,{isTop:o,isRight:i,isBottom:n,isLeft:r}=this.currentResizer,l=i||r,a=n||o,{movementX:d,movementY:c}=this.calculateMouseMovement({e,isLeft:r,isTop:o}),u=this.position.x,h=this.position.y;let p=0,g=0;if(l&&d){const f=r?-1:1,m=this.getWidth(),v=m+d*f;let y=!1;r&&(p=m-v,(u+p<=0||v<=this.minWidth)&&(y=!0,p=0)),y||this.setWidth(v)}if(a&&c){const f=o?-1:1,m=this.getHeight(),v=m+c*f;let y=!1;o?(g=m-v,(h+g<=0||v<=this.minHeight)&&(y=!0,g=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&m<v&&this.getMinSizeOfSiblings().height+v>this.element.parentElement.offsetHeight&&(y=!0),y||this.setHeight(v)}this.updateDragStartPosition(e.clientX,e.clientY),((t||s)&&p||g)&&this.offsetElement(u+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:s}=this.position;let o;this.config.calculateTopBuffer&&(o=this.config.calculateTopBuffer());const{movementX:i,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:o});this.offsetElement(t+i,s+n),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(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},Nf="ag-focus-managed",ji=class extends F{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:s=>{if(s.defaultPrevented)return;const o=ho(this.beans,this.eFocusable,!1,s.shiftKey);o&&(o.focus(),s.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:s}}=this;e.classList.add(Nf),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),s&&this.addManagedElementListeners(e,{focusout:s})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||vs(t))return;const{callbacks:s}=this;if(s.shouldStopEventPropagation(t)){co(t);return}t.key===D.TAB?s.onTabKeyDown(t):s.handleKeyDown&&s.handleKeyDown(t)}})}},cF={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"};function uF(e,t){const{debounceMs:s}=e;return fc(e)?(s!=null&&I(71),0):s??t}function fc(e){return(e.buttons?.indexOf("apply")??-1)>=0}var hF=class extends ve{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=k,this.buttonListeners=[],this.defaultDebounceMs=0}postConstruct(){this.resetTemplate(),this.createManagedBean(new ji(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new gc(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t?.removeEventListener("submit",this.onFormSubmit);const s={tag:"form",cls:"ag-filter-wrapper",children:[{tag:"div",ref:"eFilterBody",cls:`ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper`,children:[this.createBodyTemplate()]}]};this.setTemplate(s,this.getAgComponents(),e),t=this.getGui(),t?.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.params.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.params=e,this.applyActive=fc(e),this.resetButtonsPanel(e)}updateParams(e){this.params=e,this.applyActive=fc(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){const{buttons:s,readOnly:o}=t??{},{buttons:i,readOnly:n}=e;if(o===n&&jn(s,i))return;const r=i&&i.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(is(this.eButtonsPanel),this.buttonListeners.forEach(d=>d()),this.buttonListeners=[]):r&&(this.eButtonsPanel=Ne({tag:"div",cls:"ag-filter-apply-panel"})),!r){this.eButtonsPanel&&lo(this.eButtonsPanel);return}const l=document.createDocumentFragment(),a=d=>{let c;const u=d?this.translate(`${d}Filter`):void 0;switch(d){case"apply":c=g=>this.onBtApply(!1,!1,g);break;case"clear":c=()=>this.onBtClear();break;case"reset":c=()=>this.onBtReset();break;case"cancel":c=g=>{this.onBtCancel(g)};break;default:I(75);return}const p=vl(`<button
36
+ type="${d==="apply"?"submit":"button"}"
37
+ data-ref="${d}FilterButton"
38
+ class="ag-button ag-standard-button ag-filter-apply-panel-button"
39
+ >${u}
40
+ </button>`);this.buttonListeners.push(...this.addManagedElementListeners(p,{click:c})),l.append(p)};i.forEach(d=>a(d)),this.eButtonsPanel.append(l),this.getGui().appendChild(this.eButtonsPanel)}setupOnBtApplyDebounce(){const e=uF(this.params,this.defaultDebounceMs),t=Yt(this,this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel??null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.params.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const s=()=>{this.onUiChanged(!1,"prevent"),t?.()};e!=null?this.setModelIntoUi(e).then(s):this.resetUiToDefaults().then(s)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const s=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(s,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,s){s&&s.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.params.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});const{closeOnApply:o}=this.params;o&&this.applyActive&&!e&&!t&&this.close(s)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,s=t&&t.key;let o;(s==="Enter"||s==="Space")&&(o={keyboardEvent:t}),this.hidePopup(o),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.params.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const s=this.isModelValid(this.getModelFromUi()),o=this.queryForHtmlElement('[data-ref="applyFilterButton"]');o&&Nd(o,!s)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:s}=this;if(!t||e==="toolPanel")return;e==="floatingFilter"||e==="columnFilter"?(t.restoreLastSize(),t.setResizable(s.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}refresh(e){const t=this.params;return this.params=e,this.resetButtonsPanel(e,t),!0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.getLocaleTextFunc()(e,cF[e])}getCellValue(e){return this.params.getValue(e)}getPositionableElement(){return this.eFilterBody}};function pF(e,t,s){if(t==null)return null;let o=null;const{compName:i,jsComp:n,fwComp:r}=vx(e,t);return i?o={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[i]:n==null&&r==null&&t.filter===!0&&(o=s()),o}var bs={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},mc=class extends F{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"},s=t.autoHeight?bs.AUTO_HEIGHT:t.print?bs.PRINT:bs.NORMAL;this.view.updateLayoutClasses(s,t)}},Po="Viewport",_f="fakeVScrollComp",Bf=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],Hf=100,Cc=150,gF=class extends F{constructor(e){super(),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.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=Yt(this,()=>this.lastScrollSource[1]=null,Cc),this.resetLastVScrollDebounced=Yt(this,()=>this.lastScrollSource[0]=null,Cc)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),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),gridSizeChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,s=>{this.centerRowsCtrl=s.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,Po)});for(const e of Bf){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"),s=t?Yt(this,this.onVScroll.bind(this,Po),Hf):this.onVScroll.bind(this,Po),o=t?Yt(this,this.onVScroll.bind(this,_f),Hf):this.onVScroll.bind(this,_f);this.addManagedElementListeners(this.eBodyViewport,{scroll:s}),this.registerScrollPartner(e,o)}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[...Bf,Po]){if(this.lastScrollSource[1]===t)continue;const s=this.getViewportForSource(t);Cl(s,e,this.enableRtl)}}getViewportForSource(e){return e===Po?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:s}=t;if(this.shouldBlockScrollUpdate(1,s,!0))return;const o=ml(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(o),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===Po?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:s}=this;s?.setScrollTop(t),this.nextScrollTop=t,e===Po?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,s?.active?s.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))}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Cc)}shouldBlockScrollUpdate(e,t,s=!1){return s&&!ki()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=_d(this.eBodyViewport),{scrollHeight:s}=this.eBodyViewport;return e<0||e+t>s}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:s}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>s}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll(Po)}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 o=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:o:e=Math.min(Math.max(e,0),o)),Cl(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:s,lastScrollTop:o}=this;return{top:o,bottom:o+s}}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:s}=this.beans,o=s.getRowCount();let i=-1;for(let n=0;n<o;n++){const r=s.getRow(n);if(typeof e=="function"){if(r&&e(r)){i=n;break}}else if(e===r||e===r.data){i=n;break}}i>=0&&this.ensureIndexVisible(i,t)}ensureIndexVisible(e,t){if(pt(this.gos,"print"))return;const{rowModel:s}=this.beans,o=s.getRowCount();if(typeof e!="number"||e<0||e>=o){I(88,{index:e});return}const{frameworkOverrides:i,pageBounds:n,rowContainerHeight:r,rowRenderer:l}=this.beans;i.wrapIncoming(()=>{const a=this.ctrlsSvc.getGridBodyCtrl(),d=s.getRow(e);let c,u,h=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:p,stickyBottomHeight:g}=a,f=d.rowTop,m=d.rowHeight,v=n.getPixelOffset(),y=d.rowTop-v,R=y+d.rowHeight,w=this.getVScrollPosition(),b=r.divStretchOffset,x=w.top+b,A=w.bottom+b,H=A-x,M=r.getScrollPositionForPixel(y),z=r.getScrollPositionForPixel(R-H),L=Math.min((M+z)/2,y),ee=x+p>y,re=A-g<R;let de=null;t==="top"?de=M-p:t==="bottom"?de=z+g:t==="middle"?de=L:ee?de=M-p:re&&(de=z+g),de!==null&&(this.setVerticalScrollPosition(de),l.redraw({afterScroll:!0})),c=f!==d.rowTop||m!==d.rowHeight,u=p!==a.stickyTopHeight||g!==a.stickyBottomHeight,h++}while((c||u)&&h<10);this.animationFrameSvc?.flushAllFrames()})}ensureColumnVisible(e,t="auto"){const{colModel:s,frameworkOverrides:o}=this.beans,i=s.getCol(e);if(!i||i.isPinned()||!this.visibleCols.isColDisplayed(i))return;const n=this.getPositionedHorizontalScroll(i,t);o.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:s,columnAfterEnd:o}=this.isColumnOutsideViewport(e),i=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let l=(r?s:o)||i,a=r?o:s;t!=="auto"&&(l=t==="start",a=t==="end");const d=t==="middle";if(l||a||d){const{colLeft:c,colMiddle:u,colRight:h}=this.getColumnBounds(e);return d?u-n/2:l?r?h:c:r?c-n:h-n}return null}isColumnOutsideViewport(e){const{start:t,end:s}=this.getViewportBounds(),{colLeft:o,colRight:i}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>i:s<i,l=n?s<o:t>o;return{columnBeforeStart:r,columnAfterEnd:l}}getColumnBounds(e){const t=this.enableRtl,s=this.visibleCols.bodyWidth,o=e.getActualWidth(),i=e.getLeft(),n=t?-1:1,r=t?s-i:i,l=r+o*n,a=r+o/2*n;return{colLeft:r,colMiddle:a,colRight:l}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),s=t,o=e+t;return{start:s,end:o,width:e}}},vc=class extends F{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=pt(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:s}=this.beans,o=t.bodyWidth,i=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=o+i+n:(r=o,this.addSpacer&&(this.gos.get("enableRtl")?i:n)===0&&s.verticalScrollShowing&&(r+=s.getScrollbarWidth())),this.callback(r)}},fF=class extends F{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:s}=this,o=()=>{ms(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(o),s.registerBodyViewportResizeListener(o)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const s=this.centerContainerCtrl.getCenterWidth();s!==this.centerWidth&&(this.centerWidth=s,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=_d(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){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 mF(e,t,s,o,i,n){if(s==null&&t==null)return;const r={},l={},a=(d,c)=>{d.split(" ").forEach(u=>{u.trim()!=""&&c(u)})};if(s){const d=Object.keys(s);for(let c=0;c<d.length;c++){const u=d[c],h=s[u];let p;typeof h=="string"?p=e?e.evaluate(h,o):!0:typeof h=="function"&&(p=h(o)),a(u,g=>{p?r[g]=!0:l[g]=!0})}}n&&Object.keys(l).forEach(n),Object.keys(r).forEach(i)}function Vf(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var CF=class extends F{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const s=this.gos,o=r=>{typeof r=="string"?e.push(r):Array.isArray(r)&&r.forEach(l=>e.push(l))},i=s.get("rowClass");i&&o(i);const n=s.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},l=n(r);o(l)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,s=>{e.push(s)},()=>{})}processRowClassRules(e,t,s){const{gos:o,expressionSvc:i}=this.beans,n=he(o,{data:e.data,node:e,rowIndex:e.rowIndex});mF(i,void 0,o.get("rowClassRules"),n,t,s)}processStylesFromGridOptions(e){const t=this.gos,s=t.get("rowStyle"),o=t.getCallback("getRowStyle");let i;if(o){const n={data:e.data,node:e,rowIndex:e.rowIndex};i=o(n)}if(i||s)return Object.assign({},s,i)}},vF=0,zl="renderedRow",wc=class extends F{constructor(e,t,s,o,i){super(),this.rowNode=e,this.useAnimationFrameForCreate=o,this.printLayout=i,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=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+vF++,this.rowId=ws(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=Vf(this.rowNode),this.setRowType(),this.setAnimateFlags(s),this.rowStyles=this.processStylesFromGridOptions(),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=ws(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,s,o){const{context:i,focusSvc:n}=this.beans;o=tr(this,i,o);const r={rowComp:e,element:t,containerType:s,compBean:o};this.allRowGuis.push(r),this.updateGui(s,r),this.initialiseRowComp(r);const l=this.rowNode,a=this.rowType==="FullWidthLoading"||l.stub,d=!l.data&&this.beans.rowModel.getType()==="infinite";!a&&!d&&!l.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const c=this.fullWidthGui?.element;c&&!this.editing&&n.isRowFocused(l.rowIndex,l.rowPinned)&&n.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":"";this.allRowGuis.forEach(s=>s.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),Gs(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const s=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(i=>s.addOrRemoveCssClass(i,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&Zo(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),_i(t,e.element,zl,this),e.compBean.addDestroyFunc(()=>_i(t,e.element,zl,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.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=ws(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(Vd(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(Vd(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const s=this.createBean(t,this.beans.context);this.rowDragComps.push(s),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(o=>o!==s),this.destroyBean(s,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),s=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(s)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.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:s,beans:{visibleCols:o}}=this,i=!!e||!o.isPinningLeft(),n=!!t,r=!!s||!o.isPinningRight();return i&&n&&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(),s=this.gos.get("masterDetail")&&this.rowNode.detail,o=this.beans.colModel.isPivotMode(),n=!!this.rowNode.group&&!this.rowNode.footer&&Xd(this.gos,o);e?this.rowType="FullWidthLoading":s?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":n?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:s}=this.beans;if(!s?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(s.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new _l(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,s=null){const o={list:[],map:{}},i=(d,c,u)=>{u!=null?o.list.splice(u,0,c):o.list.push(c),o.map[d]=c},n=[];for(const d of t){const c=d.getInstanceId();let u=e.map[c];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(d)),u&&i(c,u)}for(const d of e.list){const c=d.column.getInstanceId();if(o.map[c]!=null)continue;!this.isCellEligibleToBeRemoved(d,s)?n.push([c,d]):d.destroy()}if(n.length)for(const[d,c]of n){const u=o.list.findIndex(p=>p.column.getLeft()>c.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);i(d,c,h)}const{focusSvc:r,visibleCols:l}=this.beans,a=r.getFocusedCell();if(a&&a.column.getPinned()==s){const d=a.column.getInstanceId();if(!o.map[d]&&l.allCols.includes(a.column)){const u=this.createFocusedCellCtrl();if(u){const h=o.list.findIndex(g=>g.column.getLeft()>u.column.getLeft()),p=h===-1?void 0:Math.max(h-1,0);i(d,u,p)}}}return o}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,s=e.getFocusedCell();if(!s)return;const o=t?.getCellSpan(s.column,this.rowNode);if(o){if(o.firstNode!==this.rowNode||!o.doesSpanContain(s))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(s.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const s=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(s,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 s=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,s);const o=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,o,"left");const i=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,i,"right")}}isCellEligibleToBeRemoved(e,t){const{column:i}=e;if(i.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{editing:n}=e,{visibleCols:r}=this.beans,l=e.isCellFocused();return n||l?!(r.allCols.indexOf(i)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||pt(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=j(this.rowNode.oldRowTop),{visibleCols:s}=this.beans,o=s.isPinningLeft(),i=s.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=o,n.right=i}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=o,n.right=i}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,l)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,l).params):!0,t=e(this.fullWidthGui,null),s=e(this.centerGui,null),o=e(this.leftGui,"left"),i=e(this.rightGui,"right");return t&&s&&o&&i}addListeners(){this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...this.beans.expansionSvc?.getRowExpandedListeners(this)??{}}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{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)}),this.addManagedListeners(this.beans.eventSvc,{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()}),this.beans.rowSpanSvc&&this.addManagedListeners(this.beans.rowSpanSvc,{spannedCellsUpdated:({pinned:e})=>{e&&!this.rowNode.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(t=>{this.addRowDraggerToRow(t)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())},cellChanged:e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))}})}onRowNodeDataChanged(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}this.getAllCellCtrls().forEach(s=>s.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(s=>{this.setRowCompRowId(s.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(s.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{const s=e==="Above",o=e==="Below";t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",s),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",o)})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:kt(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:s,column:o}=t;if(!(s.element===e.target))return;const r=this.rowNode,{focusSvc:l,navigation:a}=this.beans,d=l.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:d?.column??o};a?.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||vs(e))return;const t=this.allRowGuis.find(l=>l.element.contains(e.target)),s=t?t.element:null,o=s===e.target,i=Be(this.beans);let n=!1;s&&i&&(n=s.contains(i)&&i.classList.contains("ag-cell"));let r=null;!o&&!n&&(r=ho(this.beans,s,!1,e.shiftKey)),(this.isFullWidth()&&o||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>fs(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(s=>{Gi(s.element,"tabindex",t)})}onFullWidthRowFocused(e){const t=this.rowNode,s=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1;let o;if(this.fullWidthGui)o=this.fullWidthGui.element;else{const n=this.beans.colModel.getCol(e?.column)?.pinned;n?o=n==="right"?this.rightGui?.element:this.leftGui?.element:o=this.centerGui?.element}o&&(o.classList.toggle("ag-full-width-focus",s),s&&e?.forceBrowserFocus&&o.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 s={list:[],map:{}};return e.list.forEach(o=>{o!==t&&(s.list.push(o),s.map[o.column.getInstanceId()]=o)}),s}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:s}=this;return he(this.gos,{type:e,node:s,data:s.data,rowIndex:s.rowIndex,rowPinned:s.rowPinned,event:t})}createRowEventWithSource(e,t){const s=this.createRowEvent(e,t);return s.source=this,s}onRowDblClick(e){vs(e)||this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),s=this.getColumnForFullWidth(t);if(!(!t||!s))return{rowGui:t,column:s}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(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=Jo(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:s,focusSvc:o}=this.beans;s?.removeAllCellRanges();const i=this.findFullWidthInfoForEvent(e);if(!i)return;const{rowGui:n,column:r}=i,l=n.element,a=e.target;let d=e.defaultPrevented||fl();l&&l.contains(a)&&Gd(a)&&(d=!1),o.setFocusedCell({rowIndex:t.rowIndex,column:r,rowPinned:t.rowPinned,forceBrowserFocus:d})}onRowClick(e){if(vs(e)||this.lastMouseDownOnDragger)return;const{eventSvc:s,selectionSvc:o}=this.beans;s.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),o?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:s,rowNode:o}=this,i=he(s,{fullWidth:!0,data:o.data,node:o,value:o.key,valueFormatted:o.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,l,a,d)=>this.addFullWidthRowDragging(r,l,a,d),setTooltip:(r,l)=>{s.assertModuleRegistered("Tooltip",3),this.refreshRowTooltip(r,l)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return hx(n,i);case"FullWidthGroup":return i.value=o.groupValue,i.valueFormatted=o.rowGroupColumn?this.beans.valueSvc.formatValue(o.rowGroupColumn,o,i.value):i.value,ux(n,i);case"FullWidthLoading":return cx(n,i);default:return dx(n,i)}}refreshRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.refreshRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,s="",o){const{rowDragSvc:i,context:n}=this.beans;if(!i||!this.isFullWidth())return;const r=i.createRowDragComp(()=>s,this.rowNode,void 0,e,t,o);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=Vf(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,s="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(o=>{o.rowComp.addOrRemoveCssClass(t,!0),o.rowComp.addOrRemoveCssClass(s,!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();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("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(){const e=[];this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(t=>{this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass(t,!0))})}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,s=>s.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),s=this.isFullWidth(),{rowNode:o,beans:i}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(o.rowIndex%2===0?"ag-row-even":"ag-row-odd"),o.isRowPinned()&&n.push("ag-row-pinned"),o.isSelected()&&n.push("ag-row-selected"),o.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),o.stub&&n.push("ag-row-loading"),s&&n.push("ag-full-width-row"),i.expansionSvc?.addExpandedCss(n,o),o.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=i;return r&&(r.processClassesFromGridOptions(n,o),r.preProcessRowClassRules(n,o)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),s&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:s}=e,{rowNode:o,beans:i,gos:n}=this;s.addManagedListeners(t,{mouseenter:()=>o.dispatchRowEvent("mouseEnter"),mouseleave:()=>o.dispatchRowEvent("mouseLeave")}),s.addManagedListeners(o,{mouseEnter:()=>{!i.dragSvc?.dragging&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),o.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(s=>s.element);for(const s of t)s.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),s=this.applyPaginationOffset(t.top,!0)-100,o=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(s,e),o)}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,s=this.beans.environment.getDefaultRowHeight(),i=$d(this.gos)?ns(this.beans,this.rowNode).height:void 0,n=i?`${Math.min(s,i)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&Hi(this.gos)&&!t.sticky)if(t.rowTop!=null){const i=this.roundRowTopToBounds(t.rowTop);this.setRowTop(i)}else this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.fullWidthGui?.element.contains(Be(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const s=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(s),this.beans.eventSvc.dispatchEvent(s),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.beans.editSvc?.stopRowEditing(this);const e=t=>(t.list.forEach(s=>s.destroy()),{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.addOrRemoveCssClass("ag-row-focus",this.rowFocused),t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e,editSvc:t}=this.beans,s=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);s!==this.rowFocused&&(this.rowFocused=s,this.setFocusedClasses()),!s&&this.editing&&t?.stopRowEditing(this,!1)}onPaginationChanged(){const e=this.beans.pagination?.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 s=this.beans.pageBounds.getPixelOffset();return e+s*(t?1:-1)}setRowTop(e){if(!this.printLayout&&j(e)){const t=this.applyPaginationOffset(e),i=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(i)}}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 s;if(t.sticky)s=t.stickyRowTop;else{const o=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,i=this.applyPaginationOffset(o);s=t.isRowPinned()?i:this.beans.rowContainerHeight.getRealPixelPosition(i)}return s+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let s=null;return this.getAllCellCtrls().forEach(o=>{o.column==e&&(s=o)}),s!=null||t||this.getAllCellCtrls().forEach(o=>{o.getColSpanningList().indexOf(e)>=0&&(s=o)}),s}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const s=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),o=this.rowNode.rowIndex%2===0,i=s+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.addOrRemoveCssClass("ag-row-even",o),n.rowComp.addOrRemoveCssClass("ag-row-odd",!o),ig(n.element,i)})}};function Wf(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function zf(e,t,s,o,i){const n=o?o.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=he(e,{event:t,editing:i,column:o,node:s,data:s.data,colDef:o.getColDef()});return!!(n&&n(r))}function wF(e){const{pinnedRowModel:t,rowModel:s}=e,[o,i]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],n=o?null:"top";let r,l;i?(r=null,l=s.getRowCount()-1):(r="bottom",l=t?.getPinnedBottomRowCount()??-1);const{visibleCols:a,rangeSvc:d}=e,c=a.allCols;!d||!c?.length||d.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:l,rowEndPinned:r})}var yF=65,bF=67,SF=86,RF=68,xF=90,FF=89;function DF(e){const{keyCode:t}=e;let s;switch(t){case yF:s=D.A;break;case bF:s=D.C;break;case SF:s=D.V;break;case RF:s=D.D;break;case xF:s=D.Z;break;case FF:s=D.Y;break;default:s=e.code}return s}var EF=class extends F{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this)}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",jg("touchstart")?"touchstart":"mousedown"].forEach(s=>{const o=this.processMouseEvent.bind(this,s);this.addManagedElementListeners(this.element,{[s]:o})})}processMouseEvent(e,t){if(!or(this.gos,t)||vs(t))return;const{cellCtrl:s,rowCtrl:o}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(s?.column&&s.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,o,s)):(s&&s.onMouseEvent(e,t),o&&o.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:Df(t,e),rowCtrl:Kg(t,e,zl)}}processKeyboardEvent(e,t){const{cellCtrl:s,rowCtrl:o}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(s?this.processCellKeyboardEvent(s,e,t):o&&o.isFullWidth()&&this.processFullWidthRowKeyboardEvent(o,e,t))}processCellKeyboardEvent(e,t,s){const{rowNode:o,column:i,editing:n}=e;!zf(this.gos,s,o,i,n)&&t==="keydown"&&(!n&&this.beans.navigation?.handlePageScrollingKey(s)||e.onKeyDown(s),this.doGridOperations(s,e.editing),Wf(s)&&e.processCharacter(s)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(s,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,s){const{rowNode:o}=e,{focusSvc:i,navigation:n}=this.beans,r=i.getFocusedCell(),l=r&&r.column;if(!zf(this.gos,s,o,l,!1)){const d=s.key;if(t==="keydown")switch(d){case D.PAGE_HOME:case D.PAGE_END:case D.PAGE_UP:case D.PAGE_DOWN:n?.handlePageScrollingKey(s,!0);break;case D.LEFT:case D.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case D.UP:case D.DOWN:e.onKeyboardNavigate(s);break;case D.TAB:e.onTabKeyDown(s);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",s))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!or(this.gos,e))return;const s=DF(e),{clipboardSvc:o,undoRedo:i}=this.beans;if(s===D.A)return this.onCtrlAndA(e);if(s===D.C)return this.onCtrlAndC(o,e);if(s===D.D)return this.onCtrlAndD(o,e);if(s===D.V)return this.onCtrlAndV(o,e);if(s===D.X)return this.onCtrlAndX(o,e);if(s===D.Y)return this.onCtrlAndY(i);if(s===D.Z)return this.onCtrlAndZ(i,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:s,selectionSvc:o},gos:i}=this;s&&oi(i)&&t.isRowsToRender()?wF(this.beans):o&&o?.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Wg(i)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:s,rowCtrl:o}=this.getControlsForEventTarget(t.target);s?.editing||o?.editing||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:s,rowCtrl:o}=this.getControlsForEventTarget(t.target);s?.editing||o?.editing||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:s,rowCtrl:o}=this.getControlsForEventTarget(t.target);s?.editing||o?.editing||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?.redo("ui")}},Uf=class extends F{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,s=t!=null?`${t}px`:"";this.eContainer.style.height=s,this.eViewport&&(this.eViewport.style.height=s)}},Ul=e=>e.topRowCtrls,$l=e=>e.getStickyTopRowCtrls(),jl=e=>e.getStickyBottomRowCtrls(),Kl=e=>e.bottomRowCtrls,Yl=e=>e.allRowCtrls,yc=e=>e.getCtrls("top"),bc=e=>e.getCtrls("center"),Sc=e=>e.getCtrls("bottom"),MF={center:{type:"center",name:"center-cols",getRowCtrls:Yl,getSpannedRowCtrls:bc},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Yl,getSpannedRowCtrls:bc},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Yl,getSpannedRowCtrls:bc},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Yl},topCenter:{type:"center",name:"floating-top",getRowCtrls:Ul,getSpannedRowCtrls:yc},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Ul,getSpannedRowCtrls:yc},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Ul,getSpannedRowCtrls:yc},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:Ul},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:$l},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:$l},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:$l},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:$l},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:jl},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:jl},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:jl},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:jl},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Kl,getSpannedRowCtrls:Sc},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Kl,getSpannedRowCtrls:Sc},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Kl,getSpannedRowCtrls:Sc},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Kl}};function $f(e){return`ag-${ir(e).name}-viewport`}function ql(e){const t=ir(e);return t.container??`ag-${t.name}-container`}function AF(e){return`ag-${ir(e).name}-spanned-cells-container`}function ir(e){return MF[e]}var PF=["topCenter","topLeft","topRight"],IF=["bottomCenter","bottomLeft","bottomRight"],TF=["center","left","right"],LF=["center","left","right","fullWidth"],kF=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],OF=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],GF=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],jf=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Kf=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],NF=[...jf,"stickyTopFullWidth",...Kf,"stickyBottomFullWidth"],_F=[...PF,...IF,...TF,...jf,...Kf],BF=class extends F{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=ir(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new fF(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,s,o){this.comp=e,this.eContainer=t,this.eSpannedContainer=s,this.eViewport=o,this.createManagedBean(new EF(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:i,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(OF,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(GF,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(LF,()=>this.createManagedBean(new Uf(this.eContainer,this.name==="center"?o:void 0))),n&&this.forContainers(_F,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(kF,()=>this.createManagedBean(new vc(l=>this.comp.setContainerWidth(`${l}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;this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsChanged.bind(this),displayedRowsChanged:s=>this.onDisplayedRowsChanged(s.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const s=this.options.getSpannedRowCtrls(e);s&&this.comp.setSpannedRowCtrls(s,!1)}})}listenOnDomOrder(){if(NF.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const s=this.gos.get("ensureDomOrder"),o=pt(this.gos,"print");this.comp.setDomOrder(s||o)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=s=>{e.dragging&&s.cancelable&&s.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),s=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,s,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return zn(this.eViewport)}getCenterViewportScrollLeft(){return ml(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=Fo(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return Cg(this.eViewport)}getViewportScrollLeft(){return ml(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||WS(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Cl(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 s=pt(this.gos,"print"),i=this.gos.get("embedFullWidthRows")||s,n=t.filter(r=>{const l=r.isFullWidth();return this.options.fullWidth?!i&&l:i||!l});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},Yf="ag-force-vertical-scroll",HF="ag-selectable",VF="ag-column-moving",WF=class extends F{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,s,o,i,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=s,this.eTop=o,this.eBottom=i,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=s.querySelector(`.${$f("center")}`),this.eFullWidthContainer=s.querySelector(`.${ql("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${ql("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${ql("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",l=>this.setCellTextSelection(l.currentValue)),this.createManagedBean(new mc(this.comp)),this.scrollFeature=this.createManagedBean(new gF(this.eBodyViewport)),this.beans.rowDragSvc?.setupRowDrag(this.eBodyViewport,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([o,s,i,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(o),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t}),this.addManagedPropertyListener("treeData",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 s=t&&e.getScrollbarWidth()||0,o=ug()?16:0,i=`calc(100% + ${s+o}px)`;ms(this.beans,()=>this.comp.setBodyViewportWidth(i)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let s=this.gos.get("treeData");if(!s){const o=t.isPivotMode();s=(e?e.columns.length:0)>=(o?2:1)}this.comp.setGridRootRole(s?"treegrid":"grid")}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:s=>{const{target:o}=s,i=Jo(o,"ag-root",t);t.classList.toggle("ag-has-focus",!i)},focusout:s=>{const{target:o,relatedTarget:i}=s,n=t.contains(i),r=Jo(i,"ag-root",t);Jo(o,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(VF,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(HF,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(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,s=t.isLastRowIndexKnown()?t.getRowCount():-1,o=s===-1?-1:e+s;this.comp.setRowCount(o)}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?Yf:null,s=pt(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||s&&zS(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let s=t.sizesMeasured;const o=()=>{const i=s&&Hi(this.gos)&&!e.stretching,n=i?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,i)};o(),this.addManagedEventListeners({heightScaleChanged:o}),this.addManagedPropertyListener("animateRows",o),this.addManagedEventListeners({gridStylesChanged:()=>{!s&&t.sizesMeasured&&(s=!0,o())}})}addBodyViewportListener(){const{popupSvc:e,touchSvc:t}=this.beans,s=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:s}),t?.mockBodyContextMenu(this,s),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this,e)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:s,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(s))&&or(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaX:t,deltaY:s,shiftKey:o}=e,i=o||Math.abs(t)>Math.abs(s),n=e.target;i?(this.eStickyTopFullWidthContainer.contains(n)||this.eStickyBottomFullWidthContainer.contains(n))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(s))}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:s}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||s})}onBodyViewportContextMenu(e,t,s){if(!e&&!s)return;this.gos.get("preventDefaultOnContextMenu")&&(e||s).preventDefault();const{target:o}=e||t;(o===this.eBodyViewport||o===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:s,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&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}=this,t=e?.getPinnedTopTotalHeight()??0,s=e?.getPinnedBottomTotalHeight()??0;this.comp.setTopHeight(t),this.comp.setBottomHeight(s),this.comp.setTopInvisible(t<=0),this.comp.setBottomInvisible(s<=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(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),s=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let o=0;t>0&&(o+=t),s>0&&(o+=s),o>0&&(o+=1),this.comp.setStickyTopTop(`${o}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:s}=this,o=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=o+n;s.setStickyBottomBottom(`${r}px`)}},qf=class extends ve{constructor(e,t){super(),this.direction=t,this.eViewport=k,this.eContainer=k,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",ag()||ki())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=ug(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),s=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:s,touchend:s})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),ms(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;Mg(()=>fs(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},zF={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"}]},UF=class extends qf{constructor(){super(zF,"horizontal"),this.eLeftSpacer=k,this.eRightSpacer=k,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 vc(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(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.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 s=!this.enableRtl&&e,o=this.scrollVisibleSvc.getScrollbarWidth();s&&(t+=o),Ls(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=o);let i=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(i+=o),Ls(this.eLeftSpacer,i),this.eLeftSpacer.classList.toggle("ag-scroller-corner",i<=o)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,s=this.gos.get("suppressHorizontalScroll"),o=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=s?0:o===0&&t?16:o,r=()=>{this.setScrollVisibleDebounce=0,this.addOrRemoveCssClass("ag-scrollbar-invisible",t),$n(this.getGui(),n),$n(this.eViewport,n),$n(this.eContainer,n),n||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 ml(this.eViewport,this.enableRtl)}setScrollPosition(e){fs(this.eViewport)||this.attemptSettingScrollPosition(e),Cl(this.eViewport,e,this.enableRtl)}},$F={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:UF},jF={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"}]}]},KF=class extends qf{constructor(){super(jF,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Uf(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,s=this.invisibleScrollbar,o=t&&e.getScrollbarWidth()||0,i=o===0&&s?16:o;this.addOrRemoveCssClass("ag-scrollbar-invisible",s),Ls(this.getGui(),i),Ls(this.eViewport,i),Ls(this.eContainer,i),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const s=e.getGridBodyCtrl().eBodyViewport,o=this.getScrollPosition(),i=s.scrollTop;o!=i&&this.setScrollPosition(i,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!fs(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},YF={selector:"AG-FAKE-VERTICAL-SCROLL",component:KF};function qF(e){return e.cols?e.cols.treeDepth+1:-1}function Bs(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function Rc(e){const t=[],s=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const o of s){if(!o)continue;const i=o.getGroupRowCount()||0;for(let n=0;n<i;n++){const r=o.getGroupRowCtrlAtIndex(n),l=t[n];if(r){const a=XF(e,r);(l==null||a>l)&&(t[n]=a)}}}return t}function XF(e,t){let o=e.colModel.isPivotMode()?ZF(e):Qf(e);const i=t.getHeaderCellCtrls();for(const n of i){const{column:r}=n,l=r.getAutoHeaderHeight();l!=null&&l>o&&r.isAutoHeaderHeight()&&(o=l)}return o}function xc(e){let s=e.colModel.isPivotMode()?QF(e):Xl(e);return e.colModel.forAllCols(o=>{const i=o.getAutoHeaderHeight();i!=null&&i>s&&o.isAutoHeaderHeight()&&(s=i)}),s}function Xl(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function Xf(e){return e.gos.get("floatingFiltersHeight")??Xl(e)}function Qf(e){return e.gos.get("groupHeaderHeight")??Xl(e)}function QF(e){return e.gos.get("pivotHeaderHeight")??Xl(e)}function ZF(e){return e.gos.get("pivotGroupHeaderHeight")??Qf(e)}var JF=class extends F{setComp(e,t,s){this.comp=e,this.eGui=t;const{beans:o}=this,{headerNavigation:i,touchSvc:n,ctrlsSvc:r}=o;i&&this.createManagedBean(new ji(s,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,o),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,o)}),this.onPivotModeChanged(o),this.setupHeaderHeight();const l=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:l}),n?.mockHeaderContextMenu(this,l),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>ms(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const s=Rc(e).reduce((n,r)=>n+r,0),o=xc(e);if(e.filterManager?.hasFloatingFilters()&&(t+=Xf(e)),t+=s,t+=o,this.headerHeight===t)return;this.headerHeight=t;const i=`${t+1}px`;this.comp.setHeightAndMinHeight(i),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",t),this.comp.addOrRemoveCssClass("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const s=e.visibleCols.allCols.some(o=>o.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",s)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),s=e.shiftKey,o=s!==t?"LEFT":"RIGHT",{beans:i}=this,{headerNavigation:n,focusSvc:r}=i;(n.navigateHorizontally(o,!0,e)||!s&&r.focusOverlay(!1)||$i(i,s,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:s}=this.beans;switch(e.key){case D.LEFT:t="LEFT";case D.RIGHT:{j(t)||(t="RIGHT"),s.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case D.UP:t="UP";case D.DOWN:{j(t)||(t="DOWN"),s.navigateVertically(t,null,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:s,beans:o}=this;!t&&s.contains(Be(o))||s.contains(t)||(o.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,s){const{menuSvc:o,ctrlsSvc:i}=this.beans;if(!e&&!s||!o?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===i.getHeaderRowContainerCtrl()?.eViewport)&&o.showHeaderContextMenu(void 0,e,s)}},Fc=class extends ve{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},eD={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"}]},tD=class extends Fc{constructor(e){super(eD,e),this.eResize=k,this.eHeaderCompWrapper=k,this.headerCompVersion=0}postConstruct(){const e=this.getGui();((i,n)=>{n!=null&&n!=""?e.setAttribute(i,n):e.removeAttribute(i)})("col-id",this.ctrl.column.getColId());const s={setWidth:i=>e.style.width=i,addOrRemoveCssClass:(i,n)=>this.addOrRemoveCssClass(i,n),setUserStyles:i=>Un(e,i),setAriaSort:i=>i?LS(e,i):kS(e),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(s,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);const o=this.ctrl.getSelectAllGui();o&&this.eResize.insertAdjacentElement("afterend",o)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(s=>this.afterCompCreated(t,s))}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())}},sD={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"}]},oD=class extends Fc{constructor(e){super(sD,e),this.eResize=k,this.eHeaderCompWrapper=k}postConstruct(){const e=this.getGui(),t=(o,i)=>i!=null?e.setAttribute(o,i):e.removeAttribute(o);e.setAttribute("col-id",this.ctrl.column.getUniqueId());const s={addOrRemoveCssClass:(o,i)=>this.addOrRemoveCssClass(o,i),setUserStyles:o=>Un(e,o),setHeaderWrapperHidden:o=>{o?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:o=>{o!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${o}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",o!=null)},setResizableDisplayed:o=>fe(this.eResize,o),setWidth:o=>e.style.width=o,setAriaExpanded:o=>t("aria-expanded",o),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(s,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 s=this.getGui(),o=e.getGui();this.eHeaderCompWrapper.appendChild(o),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(s)}addOrRemoveHeaderWrapperStyle(e,t){const{eHeaderCompWrapper:s}=this;t?s.style.setProperty(e,t):s.style.removeProperty(e)}},iD={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"}}]}]},nD=class extends Fc{constructor(e){super(iD,e),this.eFloatingFilterBody=k,this.eButtonWrapper=k,this.eButtonShowMainFilter=k}postConstruct(){const e=this.getGui(),t={addOrRemoveCssClass:(s,o)=>this.addOrRemoveCssClass(s,o),setUserStyles:s=>Un(e,s),addOrRemoveBodyCssClass:(s,o)=>this.eFloatingFilterBody.classList.toggle(s,o),setButtonWrapperDisplayed:s=>fe(this.eButtonWrapper,s),setCompDetails:s=>this.setCompDetails(s),getFloatingFilterComp:()=>this.compPromise,setWidth:s=>e.style.width=s,setMenuIcon:s=>this.eButtonShowMainFilter.appendChild(s)};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.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),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()}}},rD=class extends ve{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){ig(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,s)=>this.setHeaderCtrls(t,s),setWidth:t=>this.getGui().style.width=t};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const s=this.headerComps;if(this.headerComps={},e.forEach(o=>{const i=o.instanceId;let n=s[i];delete s[i],n==null&&(n=this.createHeaderComp(o),this.getGui().appendChild(n.getGui())),this.headerComps[i]=n}),Object.values(s).forEach(o=>{this.getGui().removeChild(o.getGui()),this.destroyBean(o)}),t){const o=Object.values(this.headerComps);o.sort((n,r)=>{const l=n.getCtrl().column.getLeft(),a=r.getCtrl().column.getLeft();return l-a});const i=o.map(n=>n.getGui());wg(this.getGui(),i)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new oD(e);break;case"filter":t=new nD(e);break;default:t=new tD(e);break}return this.createBean(t),t.setParentComponent(this),t}},Dc=class extends F{constructor(e,t,s,o){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=o,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=s}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?Re(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,s=e.get("suppressColumnMoveAnimation"),o=j(this.columnOrGroup.getOldLeft());t?.isActive()&&o&&!s?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),s=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=s,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===s&&this.setLeft(s)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:s,visibleCols:o}=this.beans;if(!pt(s,"print")||e.getPinned()==="left")return t;const n=o.getColsLeftWidth();if(e.getPinned()==="right"){const r=o.bodyWidth;return n+r+t}return n+t}setLeft(e){if(j(e)&&(this.eCell.style.left=`${e}px`),Ye(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&TS(this.ariaEl,t.length)}}},lD=0,Zf="headerCtrl",Ec=class extends F{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.instanceId=e.getUniqueId()+"-"+lD++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){const{headerRowIndex:t,column:s}=this.beans.focusSvc.focusedHeader,o=s.getDefinition(),i=o&&o.suppressHeaderKeyboardEvent;if(!j(i))return!1;const n=he(this.gos,{colDef:o,column:s,headerRowIndex:t,event:e});return!!i(n)}getWrapperHasFocus(){return Be(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 s;if(typeof t=="function"){const o=this.getHeaderClassParams();s=t(o)}else s=t;s&&this.comp.setUserStyles(s)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:s,compBean:o}=e,{beans:i}=this,n=u=>{if(!this.isAlive()||!o.isAlive())return;const{paddingTop:h,paddingBottom:p,borderBottomWidth:g,borderTopWidth:f}=Oi(this.eGui),m=h+p+g+f,y=t.offsetHeight+m;if(u<5){const R=Xe(i),w=!R||!R.contains(t),b=y==0;if(w||b){Vd(()=>n(u+1),"raf",i);return}}this.setColHeaderHeight(this.column,y)};let r=!1,l;const a=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,n(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),l=Fo(this.beans,t,()=>n(0))},c=()=>{r=!1,l&&l(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),l=void 0};a(),o.addDestroyFunc(()=>c()),o.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),o.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),s&&s(a)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:s,eGui:o}=this;!e||!t||!o||(Rf(e,t,s.visibleCols),ng(o,s.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=ai(this.beans);this.eGui&&Gi(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=Be(this.beans),s=e.key===D.LEFT||e.key===D.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||s)&&(e.preventDefault(),e.stopImmediatePropagation()),!s))return;const i=e.key===D.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const n=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(n,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(i)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:s}=this.beans;return s?s.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:s}=this;let o=e.key===D.LEFT!==t.get("enableRtl");const i=s.getPinned(),n=t.get("enableRtl");return i&&n!==(i==="right")&&(o=!o),(o?-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(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case D.PAGE_DOWN:case D.PAGE_UP:case D.PAGE_HOME:case D.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=Zf,{eGui:s,gos:o}=this;_i(o,s,t,this),e.addDestroyFunc(()=>_i(o,s,t,null))}focus(e){const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus(),!0):!1}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,s){const o=e??t,{menuSvc:i,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&o.preventDefault(),i?.isHeaderContextMenuEnabled(s)&&i.showHeaderContextMenu(s,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",s)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:s}=this;e.isColumn?s.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):s.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}},aD=class extends Ec{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}setComp(e,t,s,o,i){this.comp=e;const{rowCtrl:n,column:r,beans:l}=this,{colResize:a,context:d,colHover:c,rangeSvc:u}=l,h=tr(this,d,i);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:o,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(),a?this.resizeFeature=h.createManagedBean(a.createResizeFeature(n.pinned,r,s,e,this)):fe(s,!1),c?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new Dc(r,t,l)),h.createManagedBean(new ji(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){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.colDef;return he(t.gos,{colDef:s,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 nx(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:s,gos:o}=this.beans;return he(o,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!s&&(!this.openFilterEnabled||rt(this.gos)),showColumnMenu:(n,r)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t?.setSortForColumn(this.column,n,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature.setComp(this))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===D.SPACE&&this.selectAllFeature?.onSpaceKeyDown(e),e.key===D.ENTER&&this.onEnterKeyDown(e),e.key===D.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortSvc?.progressSort(this.column,e.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(e,t){const s=this.comp.getUserCompInstance();Jf(s)&&s.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),Ff()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),s=bf(t,this.gos,this.column,null),o=this.userHeaderClasses;this.userHeaderClasses=new Set(s),s.forEach(i=>{o.has(i)?o.delete(i):this.comp.addOrRemoveCssClass(i,!0)}),o.forEach(i=>this.comp.addOrRemoveCssClass(i,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!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(),Object.values(this.refreshFunctions).forEach(e=>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 s=this.column.getActualWidth();this.comp.setWidth(`${s}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const s=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",s),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,s=e===1;this.comp.addOrRemoveCssClass("ag-header-highlight-before",t),this.comp.addOrRemoveCssClass("ag-header-highlight-after",s)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:s,beans:o}=this,i=Rc(this.beans),n=i.reduce((c,u)=>c+=u,0)===0;if(s.addOrRemoveCssClass("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),s.addOrRemoveCssClass("ag-header-span-height",!1),s.addOrRemoveCssClass("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:l}=this.column.getColumnGroupPaddingInfo();s.addOrRemoveCssClass("ag-header-span-height",r>0);const a=xc(o);if(r===0){s.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${a}px`);return}s.addOrRemoveCssClass("ag-header-span-total",l);let d=0;for(let c=0;c<r;c++)d+=i[i.length-1-c];e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${a+d}px`)}refreshAriaSort(){if(this.sortable){const e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(yS(t)),this.setAriaDescriptionProperty("sort",e("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&&!rt(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(){if(!this.eGui.contains(Be(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,s)=>t==="filter"?-1:s.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnounce?.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=i=>this.handleMouseOverChange(i.type==="mouseenter"),s=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},o=i=>this.handleContextMenuMouseEvent(i,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:s,contextmenu:o})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return Jf(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Jf(e){return typeof e.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var dD=0,Mc=class extends F{constructor(e,t,s){super(),this.rowIndex=e,this.pinned=t,this.type=s,this.instanceId=dD++,this.allCtrls=[];const o=s=="group"?"ag-header-row-column-group":s=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${o}`}postConstruct(){this.isPrintLayout=pt(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,s=!0){this.comp=e,t=tr(this,this.beans.context,t),s&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),s=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:s,virtualColumnsChanged:o=>this.onVirtualColumnsChanged(o.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",s),e.addManagedPropertyListener("ensureDomOrder",o=>this.isEnsureDomOrder=o.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=pt(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){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(){const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{filterManager:e}=this.beans,t=[],s=Rc(this.beans),o=xc(this.beans);t.push(...s),t.push(o),e?.hasFloatingFilters()&&t.push(Xf(this.beans));let i=0;for(let r=0;r<this.rowIndex;r++)i+=t[r];const n=t[this.rowIndex];return{topOffset:i,rowHeight:n}}onVirtualColumnsChanged(e=!1){const t=this.getUpdatedHeaderCtrls(),s=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,s,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const o of t)this.recycleAndCreateHeaderCtrls(o,this.ctrlsById,e);const s=o=>{const{focusSvc:i,visibleCols:n}=this.beans;return i.isHeaderWrapperFocused(o)?n.isVisible(o.column):!1};if(e)for(const[o,i]of e)s(i)?this.ctrlsById.set(o,i):this.destroyBean(i);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,s){if(e.isEmptyGroup())return;const o=e.getUniqueId();let i;if(s&&(i=s.get(o),s.delete(o)),i&&i.column!=e&&(this.destroyBean(i),i=void 0),i==null)switch(this.type){case"filter":{i=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":i=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:i=this.createBean(new aD(e,this));break}t.set(o,i)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[];const t=this.getActualDepth(),{colViewport:s}=this.beans;return["left",null,"right"].forEach(o=>{const i=s.getHeadersToRender(o,t);e=e.concat(i)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.colViewport.getHeadersToRender(this.pinned,this.getActualDepth())}focusHeader(e,t){const s=this.allCtrls.find(i=>i.column==e);return s?s.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,super.destroy()}},cD=class extends F{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:s,ctrlsSvc:o,colModel:i,colMoves:n,filterManager:r}=this.beans;this.setupCenterWidth(),s?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const l=this.onDisplayedColumnsChanged.bind(this,r);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:l,advancedFilterEnabledChanged:l});const a=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;o.register(a,this),i.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,colModel:s,filterManager:o}=this.beans;let i=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const c=qF(s)-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let u=0;u<c;u++){const h=this.createBean(new Mc(i++,this.pinned,"group"));this.groupsRowCtrls.push(h)}},l=()=>{const c=i++,u=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.rowIndex!==c);(u||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),u&&(this.columnsRowCtrl=this.createBean(new Mc(c,this.pinned,"column")))},a=()=>{this.includeFloatingFilter=!!o?.hasFloatingFilters()&&!this.hidden;const c=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){c();return}const u=i++;if(this.filtersRowCtrl){const h=this.filtersRowCtrl.rowIndex!==u;(!e||h)&&c()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new Mc(u,this.pinned,"filter")))};r(),l(),a();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,n)}getHeaderCtrlForColumn(e){const t=s=>s?.getHeaderCellCtrls().find(o=>o.column===e);if(Ns(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let s=0;s<this.groupsRowCtrls.length;s++){const o=t(this.groupsRowCtrls[s]);if(o)return o}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,s){const i=this.getAllCtrls()[e];return i?i.focusHeader(t,s):!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 s=e?.createBodyDropTarget(this.pinned,t);s&&this.createManagedBean(s)}restoreFocusOnHeader(e,t){if(!t)return;const{column:s}=t;s.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(e){const t=!!e?.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==t&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new vc(e=>this.comp.setCenterWidth(`${e}px`),!0))}},uD=class extends F{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){const{enterpriseMenuFactory:t,filterMenuFactory:s}=this.beans,o=t&&rt(this.gos)?t:s;this.showColumnMenuCommon(o,e,e.containerType,!0)}showHeaderContextMenu(e,t,s){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,s)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(rt(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&Ns(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(ki()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!rt(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!rt(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 rt(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,s,o){const{positionBy:i,onClosedCallback:n}=t,r=t.column;if(i==="button"){const{buttonElement:l}=t;e?.showMenuAfterButtonClick(r,l,s,n,o)}else if(i==="mouse"){const{mouseEvent:l}=t;e?.showMenuAfterMouseEvent(r,l,s,n,o)}else if(r){const l=this.beans,a=l.ctrlsSvc;a.getScrollFeature().ensureColumnVisible(r,"auto"),ms(l,()=>{const d=a.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);d&&e?.showMenuAfterButtonClick(r,d.getAnchorElementForMenu(o),s,n,!0)})}}};function Ql(e,t,s){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",s))}var em=class extends ve{constructor(){super()}},hD={tag:"span",cls:"ag-overlay-loading-center",attrs:{"aria-live":"polite","aria-atomic":"true"}},pD=class extends em{init(){const e=kt(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??hD),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("loadingOoo","Loading...")})}}},gD={tag:"span",cls:"ag-overlay-no-rows-center"},fD=class extends em{init(){const e=kt(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??gD),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("noRowsToShow","No Rows To Show")})}}};function Ki(e,t,s){const o=pe(e,t,s);if(o){const{className:n}=o;if(typeof n=="string"&&n.indexOf("ag-icon")>-1||typeof n=="object"&&n["ag-icon"])return o}const i=Ne({tag:"span"});return i.appendChild(o),i}function pe(e,t,s){let o=null;e==="smallDown"?I(262):e==="smallLeft"?I(263):e==="smallRight"&&I(264);const i=s&&s.getColDef().icons;if(i&&(o=i[e]),t.gos&&!o){const n=t.gos.get("icons");n&&(o=n[e])}if(o){let n;if(typeof o=="function")n=o();else if(typeof o=="string")n=o;else{I(38,{iconName:e});return}if(typeof n=="string")return vl(n);if(wl(n))return n;I(133,{iconName:e});return}else{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),Ne({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var mD=".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}",CD={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"}]}]},vD=class extends ve{constructor(){super(),this.dragSource=null,this.eIcon=k,this.eLabel=k,this.eGhost=k,this.registerCSS(mD)}postConstruct(){const e=t=>Ki(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(CD),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:s,dragSource:o,dropIconMap:i,gos:n}=this;is(s);let r=null;e||(e=o?.getDefaultIconName?o.getDefaultIconName():"notAllowed"),r=i[e],s.classList.toggle("ag-shake-left-to-right",t),!(r===i.hide&&n.get("suppressDragLeaveHidesColumns"))&&r&&s.appendChild(r)}setLabel(e){this.eLabel.textContent=e}},wD=".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)}",yD=class extends ve{constructor(e,t,s){super(t,s),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(wD)}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:s,labelAlignment:o,disabled:i}=this.config;i!=null&&this.setDisabled(i),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),s!=null&&this.setLabelWidth(s),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;is(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(fe(t,!1),os(t,"presentation")):(fe(t,!0),os(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 s=this.getGui().classList;return s.toggle("ag-label-align-left",e==="left"),s.toggle("ag-label-align-right",e==="right"),s.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:(yg(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Nd(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},bD=class extends yD{constructor(e,t,s,o){super(e,t,s),this.className=o}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:s}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),s!=null&&this.onValueChange(s),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),s=this.getLabel();s==null||s==""||SS(e)!==null?Wn(e,""):Wn(e,t??"")}setAriaLabel(e){return Kt(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 Ls(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 SD(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 tm=class extends bD{constructor(e,t,s="text",o="input"){super(e,e?.template??SD(o),[],t),this.inputType=s,this.displayFieldTag=o,this.eLabel=k,this.eWrapper=k,this.eInput=k}postConstruct(){super.postConstruct(),this.setInputType();const{eLabel:e,eWrapper:t,eInput:s,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),s.classList.add(`${o}-input`),this.addCssClass("ag-input-field"),s.id=s.id||`ag-${this.getCompId()}-input`;const{inputName:i,inputWidth:n}=this.config;i!=null&&this.setInputName(i),n!=null&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([s])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return yg(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 Gi(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Kt(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Nd(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Gi(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Gi(this.eInput,"autocomplete",t)}return this}},sm=class extends tm{constructor(e,t="ag-checkbox",s="checkbox"){super(e,t,s),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 s=this.eInput;s.checked=e,s.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,s){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:s});const o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),s=this.selected=e.target.checked;this.refreshSelectedClass(s),this.dispatchChange(s,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Yi={selector:"AG-CHECKBOX",component:sm},RD=".ag-checkbox-cell{height:100%}",xD={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},FD=class extends ve{constructor(){super(xD,[Yi]),this.eCheckbox=k,this.registerCSS(RD)}init(e){this.refresh(e);const{eCheckbox:t,beans:s}=this,o=t.getInputElement();o.setAttribute("tabindex","-1"),tg(o,"polite"),this.addManagedListeners(o,{click:i=>{if(co(i),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:i=>{co(i)}}),this.addManagedElementListeners(e.eGridCell,{keydown:i=>{if(i.key===D.SPACE&&!t.isDisabled()){e.eGridCell===Be(s)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),i.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,s=!0;const{value:o,column:i,node:n}=e;if(n.group&&i)if(typeof o=="boolean")t=o;else{const u=i.getColId();u.startsWith(ni)?t=o==null||o===""?void 0:o==="true":n.aggData&&n.aggData[u]!==void 0?t=o??void 0:s=!1}else t=o??void 0;const{eCheckbox:r}=this;if(!s){r.setDisplayed(!1);return}r.setValue(t);const l=e.disabled??!i?.isCellEditable(n);r.setDisabled(l);const a=this.getLocaleTextFunc(),d=lg(a,t),c=l?d:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){const{eventSvc:t,params:s}=this,{column:o,node:i,value:n}=s,r={column:o,colDef:o.getColDef(),data:i.data,node:i,rowIndex:i.rowIndex,rowPinned:i.rowPinned,value:n};t.dispatchEvent({type:"cellEditingStarted",...r});const l=i.setDataValue(o,e,"edit");t.dispatchEvent({type:"cellEditingStopped",...r,oldValue:n,newValue:e,valueChanged:l}),l||this.updateCheckbox(s)}},DD="ROOT_NODE_ID",ED=class extends F{constructor(){super(...arguments),this.nextId=0,this.allNodesMap={},this.rootNode=null}get treeData(){return!1}getRowNode(e){return this.allNodesMap[e]}extractRowData(){return this.rootNode?.allLeafChildren?.map(e=>e.data)}activate(e){this.rootNode=e,e.group=!0,e.level=-1,e.id=DD,e.allLeafChildren=[],e.childrenAfterGroup=[],e.childrenAfterSort=[],e.childrenAfterAggFilter=[],e.childrenAfterFilter=[],this.updateRootSiblingArrays(e)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(e){const t=this.rootNode;t&&(this.dispatchRowDataUpdateStartedEvent(e),t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(e),this.updateRootSiblingArrays(t))}updateRootSiblingArrays(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenAfterAggFilter=e.childrenAfterAggFilter,t.childrenAfterSort=e.childrenAfterSort,t.childrenMapped=e.childrenMapped,t.allLeafChildren=e.allLeafChildren)}loadNewRowData(e){this.rootNode.allLeafChildren=e?.map((t,s)=>this.createRowNode(t,s))??[]}setImmutableRowData(e,t){const s=Xn(this.gos),o=!this.gos.get("suppressMaintainUnsortedOrder"),i=e.changedRowNodes,n=new Set,r=this.rootNode,l=r.allLeafChildren,a=l.length;let d=!1,c=!1,u=!1,h=!1;for(let g=0,f=-1,m=t.length;g<m;g++){const v=t[g];let y=this.getRowNode(s({data:v,level:0}));if(!y)d=!0,y=this.createRowNode(v,-1),i.add(y);else{if(o){const R=y.sourceRowIndex;h||(h=R<=f||d),f=R}y.data!==v&&(u=!0,y.updateData(v),i.update(y))}n.add(y)}const p=[];for(let g=0;g<a;g++){const f=l[g];n.has(f)||(c=!0,f.isSelected()&&p.push(f),this.rowNodeDeleted(f),i.remove(f))}if(d||c||h){const g=new Array(n.size);let f=0;if(!o)for(let v=0;v<a;++v){const y=l[v];n.delete(y)&&(y.sourceRowIndex=f,g[f++]=y)}for(const v of n)v.sourceRowIndex=f,g[f++]=v;r.allLeafChildren=g;const m=r.sibling;m&&(m.allLeafChildren=g),e.rowNodesOrderChanged||(e.rowNodesOrderChanged=h)}(d||c||h||u)&&(this.deselectNodes(p),e.rowDataUpdated=!0)}rowNodeDeleted(e){e.clearRowTopAndRowIndex();const t=e.id,s=this.allNodesMap;s[t]===e&&delete s[t]}updateRowData(e,t){this.dispatchRowDataUpdateStartedEvent(e.add);const s={changedRowNodes:t,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},o=[],i=Xn(this.gos);return this.executeRemove(i,e,s,o),this.executeUpdate(i,e,s,o),this.executeAdd(e,s),this.deselectNodes(o),s}executeAdd(e,t){const s=e.add;if(!s?.length)return;let o=this.rootNode.allLeafChildren,i=o.length;if(typeof e.addIndex=="number"&&(i=this.sanitizeAddIndex(e.addIndex),i>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let u=0;u<o.length;u++)if(o[u]?.rowIndex==i-1){i=u+1;break}}const n=s.length,r=t.changedRowNodes,l=new Array(n);for(let c=0;c<n;c++){const u=this.createRowNode(s[c],i+c);r.add(u),l[c]=u}const a=this.rootNode;if(i<o.length){const c=o.slice(0,i),u=o.slice(i,o.length),h=c.length+l.length;for(let p=0,g=u.length;p<g;++p)u[p].sourceRowIndex=h+p;o=[...c,...l,...u],t.rowsInserted=!0}else o=o.concat(l);a.allLeafChildren=o;const d=a.sibling;d&&(d.allLeafChildren=o),t.rowNodeTransaction.add=l}executeRemove(e,t,{changedRowNodes:s,rowNodeTransaction:o},i){const{remove:n}=t;if(!n?.length)return;const r={};n.forEach(d=>{const c=this.lookupRowNode(e,d);c&&(c.isSelected()&&i.push(c),c.clearRowTopAndRowIndex(),r[c.id]=!0,delete this.allNodesMap[c.id],o.remove.push(c),s.remove(c))});const l=this.rootNode;l.allLeafChildren=l.allLeafChildren?.filter(d=>!r[d.id])??null,l.allLeafChildren?.forEach((d,c)=>{d.sourceRowIndex=c});const a=l.sibling;a&&(a.allLeafChildren=l.allLeafChildren)}executeUpdate(e,t,{changedRowNodes:s,rowNodeTransaction:o},i){const{update:n}=t;n?.length&&n.forEach(r=>{const l=this.lookupRowNode(e,r);l&&(l.updateData(r),!l.selectable&&l.isSelected()&&i.push(l),o.update.push(l),s.update(l))})}dispatchRowDataUpdateStartedEvent(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselectNodes(e){const t="rowDataChanged",s=this.beans.selectionSvc,o=e.length>0;o&&s?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),s?.updateGroupsFromChildrenSelections?.(t),o&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:s?.getSelectedNodes()??null,serverSideState:null})}sanitizeAddIndex(e){const t=this.rootNode.allLeafChildren?.length??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}createRowNode(e,t){const s=new di(this.beans);return s.parent=this.rootNode,s.level=0,s.group=!1,s.expanded=!1,s.sourceRowIndex=t,s.setDataAndId(e,String(this.nextId)),this.allNodesMap[s.id]&&I(2,{nodeId:s.id}),this.allNodesMap[s.id]=s,this.nextId++,s}lookupRowNode(e,t){let s;if(e){const o=e({data:t,level:0});if(s=this.allNodesMap[o],!s)return ue(4,{id:o}),null}else if(s=this.rootNode?.allLeafChildren?.find(o=>o.data===t),!s)return ue(5,{data:t}),null;return s||null}},Hs=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(Hs||{}),MD={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},AD=class extends ve{constructor(){super(MD,[Yi]),this.eCheckbox=k}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:s}=this,o=t.isSelected(),i=lg(e,o),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],l=e(n,r);s.setValue(o,!0),s.setInputAriaLabel(`${l} (${i})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:co,click:o=>{co(o),this.beans.selectionSvc?.handleSelectionEvent(o,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:o,previousValue:i})=>{const n=typeof o=="object"?Qd(o):void 0,r=typeof i=="object"?Qd(i):void 0;n!==r&&this.onSelectableChanged()}),Zd(this.gos)||typeof this.getIsVisible()=="function"){const o=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o}),this.addManagedListeners(this.rowNode,{dataChanged:o,cellChanged:o}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:s,gos:o}=this;let i=t.selectable;const n=this.getIsVisible();if(i)if(typeof n=="function"){const a=s?.callbackParams;if(!e)i=n({...a,node:t,data:t.data});else{const d=e.createColumnFunctionCallbackParams(t);i=n({...a,...d})}}else i=n??!1;const r=o.get("rowSelection");if(r&&typeof r!="string"?!Qd(r):e?.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!i),this.setVisible(!0),this.setDisplayed(!0);return}if(s?.removeHidden){this.setDisplayed(i);return}this.setVisible(i)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?si(t):this.column?.getColDef()?.checkboxSelection}},PD=class{constructor(e){this.rowModel=e,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.rowModel.getNodesInRangeForSelection(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){return this.rootId?this.rowModel.getRowNode(this.rootId)??null:e?(this.setRoot(e),e):null}getEnd(){return this.endId?this.rowModel.getRowNode(this.endId)??null:null}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const s=t[0].id===this.rootId,o=t.findIndex(i=>i.id===e.id);if(o>-1){const i=t.slice(0,o),n=t.slice(o+1);return this.setEndRange(e),s?{keep:i,discard:n}:{keep:n,discard:i}}else return{keep:t,discard:[]}}extend(e,t=!1){const s=this.getRoot();if(s==null){const i=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&i.push(n)),i.push(e),this.setRoot(e),{keep:i,discard:[]}}const o=this.rowModel.getNodesInRangeForSelection(s,e);if(!o)return this.setRoot(e),{keep:[e],discard:[]};if(o.find(i=>i.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const i=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:i}}}},ID=class extends F{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Be(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new sm);this.cbSelectAll=t,t.addCssClass("ag-header-select-all"),os(t.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:o})=>{const i=n=>typeof n=="string"||!n||n.mode==="singleRow"?void 0:n.selectAll;i(s)!==i(o)&&this.showOrHideSelectAll()}),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)}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,s=this.cbSelectAll,o=t.getSelectAllState(e);s.setValue(o);const i=t.hasNodesToSelect(e);s.setDisabled(!i),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:s,cbSelectAll:o,cbSelectAllVisible:i}=this,r=o.getValue()?t("ariaChecked","checked"):t("ariaUnchecked","unchecked"),l=t("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",i?`${l} (${r})`:null),o.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||s.announceAriaDescription()}checkSelectionType(e){return ii(this.gos)?!0:(I(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:s}=this.beans;return ks(t)||Os(t)?!0:(I(129,{feature:e,rowModel:s.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let s="uiSelectAll";t==="currentPage"?s="uiSelectAllCurrentPage":t==="filtered"&&(s="uiSelectAllFiltered");const o={source:s,selectAll:t},i=this.beans.selectionSvc;e?i.selectAllRowNodes(o):i.deselectAllRowNodes(o)}isCheckboxSelection(){const{column:e,gos:t,beans:s}=this,o=t.get("rowSelection"),i=e.getColDef(),{headerCheckboxSelection:n}=i;let r=!1;const l=typeof o=="object";if(l){const d=Mo(e),c=nc(e);(Qn(o)==="autoGroupColumn"&&c||d&&s.selectionColSvc?.isSelectionColumnEnabled())&&(r=Rl(o))}else typeof n=="function"?r=n(he(t,{column:e,colDef:i})):r=!!n;const a=l?"headerCheckbox":"headerCheckboxSelection";return r&&this.checkRightRowModelType(a)&&this.checkSelectionType(a)}getSelectAllMode(){const e=Wg(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:s}=this.column.getColDef();return t?"currentPage":s?"filtered":"all"}},TD=class extends F{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new PD(t.rowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=Zd(e);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=Zd(e)}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new AD}createSelectAllFeature(e){return new ID(e)}isMultiSelect(){return ii(this.gos)}onRowCtrlSelected(e,t,s){const o=!!e.rowNode.isSelected();e.forEachGui(s,i=>{i.rowComp.addOrRemoveCssClass("ag-row-selected",o);const n=i.element;OS(n,o),n.contains(Be(this.beans))&&t(i)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected();if(!e.selectable)return;const o=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(o,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||!!e.rowPinned||!Gs(this.gos)}updateRowSelectable(e,t){const s=this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,s,t),s}setRowSelectable(e,t,s){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),s)return;if(Zn(this.gos)){const i=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:i??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,s=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let o=0;o<e.childrenAfterGroup.length;o++){const i=e.childrenAfterGroup[o];let n=i.isSelected();if(!i.selectable){const r=this.calculateSelectedFromChildren(i);if(r===null)continue;n=r}switch(n){case!0:t=!0;break;case!1:s=!0;break;default:return}}if(!(t&&s))return t?!0:s?!1:e.selectable?e.__selected:null}selectRowNode(e,t,s,o="api"){const i=!e.selectable&&t,n=e.__selected===t;if(i||n)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;return r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...kf(e,this.gos,"rowSelected"),event:s||null,source:o}),!0}isCellCheckboxSelection(e,t){const s=this.gos.get("rowSelection");if(s&&typeof s!="string"){const o=Mo(e)&&si(s);return e.isColumnFunc(t,o)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,s,o){const{gos:i,selectionCtx:n}=this,r=e.isSelected(),l=Zn(i),a=lR(i),d=aR(i),c=this.isMultiSelect(),u=o==="rowClicked";if(u&&l&&e.group||u&&!(a||d))return null;if(t&&s&&c){const h=n.getRoot();if(h)if(h.isSelected()){const p=n.isInRange(e)?n.truncate(e):n.extend(e,l);return{deselect:p.discard,select:p.keep,reset:!1}}else{const p=n.extend(e,l);return{select:[],deselect:p.keep,reset:!1}}else return null}else if(t&&c){const h=n.selectAll?this.beans.rowModel.getRow(0):void 0,p=n.getRoot(h),g=n.isInRange(e)?n.truncate(e):n.extend(e,l);return{select:g.keep,deselect:g.discard,reset:n.selectAll||!!(p&&!p.isSelected())}}else{if(s)return n.setRoot(e),u&&r&&!d?null:{node:e,newValue:!r,clearSelection:!c};{n.setRoot(e);const h=dR(i),p=Vg(i)==="filteredDescendants",g=u&&(!h||!a);if(p&&r===void 0&&ks(i))return{node:e,newValue:!1,clearSelection:!c||g};if(u){const f=r?!h:a;return f===r&&!g||f&&!a||!f&&!d?null:{node:e,newValue:f,clearSelection:!c||g}}return{node:e,newValue:!r,clearSelection:!c||g}}}}},LD=class extends tm{constructor(e,t="ag-text-field",s="text"){super(e,t,s)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const s=this.eInput;return s.value!==e&&(s.value=j(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=s=>{Wf(s)&&s.key&&!e.test(s.key)&&s.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:s=>{const o=s.clipboardData?.getData("text");o&&o.split("").some(i=>!e.test(i))&&s.preventDefault()}})}},Ac={selector:"AG-INPUT-TEXT-FIELD",component:LD};function om(e,t){return e.toString().padStart(t,"0")}function im(e,t=!0,s="-"){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(i=>om(i,2)).join(s);return t&&(o+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(i=>om(i,2)).join(":")),o}function nm(e){if(!e)return null;const[t,s]=e.split(" ");if(!t)return null;const o=t.split("-").map(u=>parseInt(u,10));if(o.filter(u=>!isNaN(u)).length!==3)return null;const[i,n,r]=o,l=new Date(i,n-1,r);if(l.getFullYear()!==i||l.getMonth()!==n-1||l.getDate()!==r)return null;if(!s||s==="00:00:00")return l;const[a,d,c]=s.split(":").map(u=>parseInt(u,10));return a>=0&&a<24&&l.setHours(a),d>=0&&d<60&&l.setMinutes(d),c>=0&&c<60&&l.setSeconds(c),l}function rm(e){return e.get("tooltipShowMode")==="whenTruncated"}function Pc(e,t){return rm(e)?kD(t):void 0}function kD(e){return()=>{const t=e();return t?t.scrollWidth>t.clientWidth:!0}}var Zl={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},OD=class extends F{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:s,eBottomGuard:o,focusTrapActive:i,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:r,focusInnerElement:l,onFocusIn:a,onFocusOut:d,shouldStopEventPropagation:c,onTabKeyDown:u,handleKeyDown:h,isEmpty:p,eFocusableElement:g}=e;this.comp=t,this.eTopGuard=s,this.eBottomGuard=o,this.providedFocusInnerElement=l,this.eFocusableElement=g,this.focusTrapActive=!!i,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=a,this.providedFocusOut=d,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=p}postConstruct(){this.createManagedBean(new ji(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(),[this.eTopGuard,this.eBottomGuard].forEach(e=>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():li(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){const t=Xe(this.beans),s=li(t.body,null,!0),o=s.indexOf(e?this.eTopGuard:this.eBottomGuard);if(o===-1)return;let i,n;e?(i=0,n=o):(i=o+1,n=s.length);const r=s.slice(i,n),l=this.gos.get("tabIndex");r.sort((a,d)=>{const c=parseInt(a.getAttribute("tabindex")||"0"),u=parseInt(d.getAttribute("tabindex")||"0");return u===l?1:c===l?-1:c===0?1:u===0?-1:c-u}),r[e?r.length-1:0]?.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 s=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),s&&(s.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=li(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 ho(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}},lm=class extends F{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:s,eFocusableElement:o}=this,i=[t,s],n={setTabIndex:m=>{i.forEach(v=>m!=null?v.setAttribute("tabindex",m):v.removeAttribute("tabindex"))}};this.addTabGuards(t,s);const{focusTrapActive:r=!1,onFocusIn:l,onFocusOut:a,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:g,isFocusableContainer:f}=e;this.tabGuardCtrl=this.createManagedBean(new OD({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:s,eFocusableElement:o,onFocusIn:l,onFocusOut:a,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:g,isFocusableContainer:f}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Xe(this.beans).createElement("div"),s=e==="top"?Zl.TAB_GUARD_TOP:Zl.TAB_GUARD_BOTTOM;return t.classList.add(Zl.TAB_GUARD,s),os(t,"presentation"),t}addTabGuards(e,t){const s=this.eFocusableElement;s.insertAdjacentElement("afterbegin",e),s.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];is(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,s){wl(t)||(t=t.getGui());const{eBottomGuard:o}=this;o?o.insertAdjacentElement("beforebegin",t):e(t,s)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;lo(e),lo(t),super.destroy()}},nr=class extends ve{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new lm(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},qi=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new ro,this.preventMouseClick=t;const s=this.onTouchStart.bind(this),o=this.onTouchMove.bind(this),i=this.onTouchEnd.bind(this);e.addEventListener("touchstart",s,{passive:!0}),e.addEventListener("touchmove",o,{passive:!0}),e.addEventListener("touchend",i,{passive:!1}),this.destroyFuncs.push(()=>{e.removeEventListener("touchstart",s,{passive:!0}),e.removeEventListener("touchmove",o,{passive:!0}),e.removeEventListener("touchend",i,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;const t=this.touchStart;window.setTimeout(()=>{const s=this.touchStart===t;if(this.touching&&s&&!this.moved){this.moved=!0;const o={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(o)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!If(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=Date.now();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const s={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(s),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}},am=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${Fg}/${this.frameworkName}-data-grid`,YS(this.baseDocLink)}setInterval(e,t){return new Oe(s=>{s(window.setInterval(e,t))})}addEventListener(e,t,s,o){let i={};if(typeof o=="object"?i=o:typeof o=="boolean"&&(i={capture:o}),i.passive==null){const n=Yg(t);n!=null&&(i.passive=n)}e.addEventListener(t,s,i)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`${this.baseDocLink}${e?`/${e}`:""}`}};function GD(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var ND=["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","funcColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],dm=Object.fromEntries(ND.map((e,t)=>[e,t]));function _D(e,t){const s=(e.beanName?dm[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,o=(t.beanName?dm[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return s-o}function BD(e,t){return e?.beanName==="gridDestroySvc"?-1:0}var HD={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},VD={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},WD={tag:"div",cls:"ag-header-viewport",role:"presentation",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"rowgroup"}]},Ic=class extends ve{constructor(e){super(),this.eCenterContainer=k,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:s=>this.setDisplayed(s),setCtrls:s=>this.setCtrls(s),setCenterWidth:s=>this.eCenterContainer.style.width=s,setViewportScrollLeft:s=>this.getGui().scrollLeft=s,setPinnedContainerWidth:s=>{const o=this.getGui();o.style.width=s,o.style.maxWidth=s,o.style.minWidth=s}};this.createManagedBean(new cD(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",s=e?HD:t?VD:WD;this.setTemplate(s),this.eRowContainer=this.eCenterContainer!==k?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let s;const o=i=>{const n=i.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),s&&vg(this.eRowContainer,n,s),s=n};e.forEach(i=>{const n=i.instanceId,r=t[n];delete t[n];const l=r||this.createBean(new rD(i));this.headerRowComps[n]=l,this.rowCompsList.push(l),o(l)}),Object.values(t).forEach(i=>this.destroyRowComp(i))}},zD={tag:"div",cls:"ag-header",role:"presentation"},UD=class extends ve{constructor(){super(zD)}postConstruct(){const e={addOrRemoveCssClass:(o,i)=>this.addOrRemoveCssClass(o,i),setHeightAndMinHeight:o=>{this.getGui().style.height=o,this.getGui().style.minHeight=o}};this.createManagedBean(new JF).setComp(e,this.getGui(),this.getFocusableElement());const s=o=>{this.createManagedBean(o),this.appendChild(o)};s(new Ic("left")),s(new Ic(null)),s(new Ic("right"))}},$D={selector:"AG-HEADER-ROOT",component:UD},jD=class extends ve{constructor(e,t,s,o,i){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.column,this.rowNode=t.rowNode,this.eRow=o;const n=Ne({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.colIdSanitised}});this.eCell=n;let r;t.isCellSpanning()?(r=Ne({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssClassManager=new ff(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const l={addOrRemoveCssClass:(a,d)=>this.cellCssClassManager.addOrRemoveCssClass(a,d),setUserStyles:a=>Un(n,a),getFocusableElement:()=>n,setIncludeSelection:a=>this.includeSelection=a,setIncludeRowDrag:a=>this.includeRowDrag=a,setIncludeDndSource:a=>this.includeDndSource=a,setRenderDetails:(a,d,c)=>this.setRenderDetails(a,d,c),setEditDetails:(a,d,c)=>this.setEditDetails(a,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};t.setComp(l,n,r,this.eCellWrapper,s,i,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,s){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const i=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(s||i)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,s){e?this.createCellEditorInstance(e,t,s):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,s=t||this.forceWrapper,o=s&&this.eCellWrapper==null;o&&(this.eCellWrapper=Ne({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const i=!s&&this.eCellWrapper!=null;i&&(lo(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssClassManager.addOrRemoveCssClass("ag-cell-value",!s);const n=!e&&s,r=n&&this.eCellValue==null;r&&(this.eCellValue=Ne({tag:"span",cls:"ag-cell-value",role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue));const l=!n&&this.eCellValue!=null;l&&(lo(this.eCellValue),this.eCellValue=void 0);const a=o||i||r||l;return a&&this.removeControls(),!e&&t&&this.addControls(),a}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:s,includeRowDrag:o,includeDndSource:i,includeSelection:n}=this,r=l=>{l&&t.insertBefore(l.getGui(),s)};o&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),r(this.rowDraggingComp)),i&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),r(this.dndSourceComp)),n&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),r(this.checkboxSelectionComp))}createCellEditorInstance(e,t,s){const o=this.editorVersion,i=e.newAgStackInstance(),{params:n}=e;i.then(l=>this.afterCellEditorCreated(o,l,n,t,s)),ke(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();is(t);const s=e!=null?ws(e,!0):null;s!=null&&(t.textContent=s)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),lo(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(Be(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),lo(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer?.refresh==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){const t=this.rendererVersion,{componentClass:s}=e,o=()=>{if(this.rendererVersion!==t||!this.isAlive())return;const r=e.newAgStackInstance(),l=this.afterCellRendererCreated.bind(this,t,s);r?.then(l)},{animationFrameSvc:i}=this.beans;i?.active&&this.firstRender?i.createTask(o,this.rowNode.rowIndex,"p2",e.componentFromFramework):o()}afterCellRendererCreated(e,t,s){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(s);return}this.cellRenderer=s,this.cellRendererClass=t;const i=s.getGui();if(this.cellRendererGui=i,i!=null){const n=this.getParentOfValue();is(n),n.appendChild(i)}}afterCellEditorCreated(e,t,s,o,i){const n=e!==this.editorVersion,{context:r}=this.beans;if(n){r.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){r.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){I(97,{colId:this.column.getId()}),r.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const a=o||t.isPopup!==void 0&&t.isPopup();a?this.addPopupCellEditor(s,i):this.addInCellEditor(),this.refreshEditStyles(!0,a),t.afterGuiAttached?.(),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssClassManager:s}=this;s.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),s.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),s.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),this.cellCtrl.setInlineEditingCss()}addInCellEditor(){const{eCell:e}=this;e.contains(Be(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),is(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){const{gos:s,context:o,editSvc:i,popupSvc:n,localeSvc:r}=this.beans;s.get("editType")==="fullRow"&&I(98);const l=this.cellEditor;this.cellEditorPopupWrapper=o.createBean(i.createPopupEditorWrapper(e));const a=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&a.appendChild(this.cellEditorGui);const d=s.get("stopEditingWhenCellsLoseFocus"),c=t??l.getPopupPosition?.()??"over",u=s.get("enableRtl"),h={ePopup:a,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.eCell,position:c,alignSide:u?"right":"left",keepWithinBounds:!0},p=n.positionPopupByComponent.bind(n,h),g=Fd(r),f=n.addPopup({modal:d,eChild:a,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.eCell,positionCallback:p,ariaLabel:g("ariaLabelCellEditor","Cell Editor")});f&&(this.hideEditorPopup=f.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},KD=class extends ve{constructor(e,t,s){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const o=Ne({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(o,s),this.setTemplateFromElement(o);const i=o.style;this.domOrder=this.rowCtrl.getDomOrder();const n={setDomOrder:r=>this.domOrder=r,setCellCtrls:r=>this.setCellCtrls(r),showFullWidth:r=>this.showFullWidth(r),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,addOrRemoveCssClass:(r,l)=>this.addOrRemoveCssClass(r,l),setUserStyles:r=>Un(o,r),setTop:r=>i.top=r,setTransform:r=>i.transform=r,setRowIndex:r=>o.setAttribute("row-index",r),setRowId:r=>o.setAttribute("row-id",r),setRowBusinessKey:r=>o.setAttribute("row-business-key",r),refreshFullWidth:r=>this.fullWidthCellRenderer?.refresh?.(r())??!1};e.setComp(n,this.getGui(),s,void 0),this.addDestroyFunc(()=>{e.unsetComp(s)})}setInitialStyle(e,t){const s=this.rowCtrl.getInitialTransform(t);if(s)e.style.setProperty("transform",s);else{const o=this.rowCtrl.getInitialRowTop(t);o&&e.style.setProperty("top",o)}}showFullWidth(e){const t=o=>{if(this.isAlive()){const i=o.getGui();this.getGui().appendChild(i),this.rowCtrl.setupDetailRowAutoHeight(i),this.setFullWidthRowComp(o)}else this.beans.context.destroyBean(o)};e.newAgStackInstance().then(t)}setCellCtrls(e){const t=new Map(this.cellComps);for(const s of e){const o=s.instanceId;this.cellComps.has(o)?t.delete(o):this.newCellComp(s)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const s of e){const o=this.cellComps.get(s.instanceId);o&&t.push(o.getGui())}wg(this.getGui(),t)}newCellComp(e){const t=new jD(this.beans,e,this.rowCtrl.printLayout,this.getGui(),this.rowCtrl.editing);this.cellComps.set(e.instanceId,t),this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e){this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}destroyCells(e){for(const t of e.values()){if(!t)return;const s=t.cellCtrl.instanceId;if(this.cellComps.get(s)!==t)return;t.detach(),t.destroy(),this.cellComps.delete(s)}}};function YD(e,t,s){const o=!!s.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,i={tag:"div",ref:"eContainer",cls:ql(e),role:"rowgroup"};if(t.type==="center"||o){const n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${AF(e)}`,role:"rowgroup"};return{tag:"div",ref:"eViewport",cls:`ag-viewport ${$f(e)}`,role:"presentation",children:[i,o?n:null]}}return i}var qD=class extends ve{constructor(e){super(),this.eViewport=k,this.eContainer=k,this.eSpannedContainer=k,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e?.name,this.options=ir(this.name)}postConstruct(){this.setTemplate(YD(this.name,this.options,this.beans));const e={setHorizontalScroll:s=>this.eViewport.scrollLeft=s,setViewportHeight:s=>this.eViewport.style.height=s,setRowCtrls:({rowCtrls:s})=>this.setRowCtrls(s),setSpannedRowCtrls:s=>this.setRowCtrls(s,!0),setDomOrder:s=>{this.domOrder=s},setContainerWidth:s=>{this.eContainer.style.width=s,this.eSpannedContainer&&(this.eSpannedContainer.style.width=s)},setOffsetTop:s=>{const o=`translateY(${s})`;this.eContainer.style.transform=o,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=o)}};this.createManagedBean(new BF(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:s,options:o}=this,i=t?this.eSpannedContainer:this.eContainer,n=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},r={};t?this.rowCompsWithSpan=r:this.rowCompsNoSpan=r,this.lastPlacedElement=null;const l=[];for(const a of e){const d=a.instanceId,c=n[d];let u;if(c)u=c,delete n[d];else{if(!a.rowNode.displayed)continue;u=new KD(a,s,o.type)}r[d]=u,l.push([u,!c])}this.removeOldRows(Object.values(n),i),this.addRowNodes(l,i)}addRowNodes(e,t){const{domOrder:s}=this;for(const[o,i]of e){const n=o.getGui();s?this.ensureDomOrder(n,t):i&&t.appendChild(n)}}removeOldRows(e,t){for(const s of e)t.removeChild(s.getGui()),s.destroy()}ensureDomOrder(e,t){vg(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},XD={selector:"AG-ROW-CONTAINER",component:qD};function rr(e,t){return t.map(s=>{const o=`e${s[0].toUpperCase()+s.substring(1)}RowContainer`;return e[o]={name:s},{tag:"ag-row-container",ref:o,attrs:{name:s}}})}function QD(e){const t={},s={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:rr(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:rr(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:rr(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:rr(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:rr(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:s}}var ZD=class extends ve{constructor(){super(...arguments),this.eGridRoot=k,this.eBodyViewport=k,this.eStickyTop=k,this.eStickyBottom=k,this.eTop=k,this.eBottom=k,this.eBody=k}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,s=e?.getOverlayWrapperSelector(),{paramsMap:o,elementParams:i}=QD(!!s);this.setTemplate(i,[...s?[s]:[],$F,YF,$D,XD],o);const n=(l,a)=>{const d=`${l}px`;a.style.minHeight=d,a.style.height=d},r={setRowAnimationCssOnBodyViewport:(l,a)=>this.setRowAnimationCssOnBodyViewport(l,a),setColumnCount:l=>IS(this.getGui(),l),setRowCount:l=>PS(this.getGui(),l),setTopHeight:l=>n(l,this.eTop),setBottomHeight:l=>n(l,this.eBottom),setTopInvisible:l=>this.eTop.classList.toggle("ag-invisible",l),setBottomInvisible:l=>this.eBottom.classList.toggle("ag-invisible",l),setStickyTopHeight:l=>this.eStickyTop.style.height=l,setStickyTopTop:l=>this.eStickyTop.style.top=l,setStickyTopWidth:l=>this.eStickyTop.style.width=l,setStickyBottomHeight:l=>{this.eStickyBottom.style.height=l,this.eStickyBottom.classList.toggle("ag-invisible",l==="0px")},setStickyBottomBottom:l=>this.eStickyBottom.style.bottom=l,setStickyBottomWidth:l=>this.eStickyBottom.style.width=l,setColumnMovingCss:(l,a)=>this.addOrRemoveCssClass(l,a),updateLayoutClasses:(l,a)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const c of d)c.toggle(bs.AUTO_HEIGHT,a.autoHeight),c.toggle(bs.NORMAL,a.normal),c.toggle(bs.PRINT,a.print);this.addOrRemoveCssClass(bs.AUTO_HEIGHT,a.autoHeight),this.addOrRemoveCssClass(bs.NORMAL,a.normal),this.addOrRemoveCssClass(bs.PRINT,a.print)},setAlwaysVerticalScrollClass:(l,a)=>this.eBodyViewport.classList.toggle(Yf,a),registerBodyViewportResizeListener:l=>{const a=Fo(this.beans,this.eBodyViewport,l);this.addDestroyFunc(()=>a())},setPinnedTopBottomOverflowY:l=>this.eTop.style.overflowY=this.eBottom.style.overflowY=l,setCellSelectableCss:(l,a)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(d=>d.classList.toggle(l,a))},setBodyViewportWidth:l=>this.eBodyViewport.style.width=l,setGridRootRole:l=>os(this.eGridRoot,l)};this.ctrl=this.createManagedBean(new WF),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&oi(this.gos)||ii(this.gos))&&AS(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const s=this.eBodyViewport.classList;s.toggle("ag-row-animation",t),s.toggle("ag-row-no-animation",!t)}},JD={selector:"AG-GRID-BODY",component:ZD},eE=class extends F{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,s){this.view=e,this.eGridHostDiv=t,this.eGui=s,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());const{dragAndDrop:o,ctrlsSvc:i}=this.beans;o?.registerGridDropTarget(()=>this.eGui,this),Mf(this.gos,t),this.createManagedBean(new mc(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=Fo(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),i.register("gridCtrl",this)}isDetailGrid(){return uc(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.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){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:s,nextIndex:o}=this.getNextFocusableIndex(t,e);if(o<0||o>=t.length)return!1;if(o===0){if(s>0){const{visibleCols:i,focusSvc:n}=this.beans,r=i.allCols,l=Re(r);if(n.focusGridView({column:l,backwards:!0}))return!0}return!1}return this.focusContainer(t[o],e)}focusInnerElement(e){const t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;const s=this.getFocusableContainers(),{focusSvc:o,visibleCols:i}=this.beans,n=i.allCols;if(e){if(s.length>1)return this.focusContainer(Re(s),e);const r=Re(n);if(o.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||ai(this.beans)){if(o.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<s.length;r++)if(ys(s[r].getGui(),e))return!0;return!1}return o.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{nextIndex:s,indexWithFocus:o}=this.getNextFocusableIndex(t,e);if(o===-1||s<0||s>=t.length)return;const i=t[s];i.setAllowFocus?.(!0),setTimeout(()=>{i.setAllowFocus?.(!1)})}isFocusable(){const e=this.beans;return!hc(e)||!ai(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const s=Be(this.beans),o=e.findIndex(n=>n.getGui().contains(s)),i=o+(t?-1:1);return{indexWithFocus:o,nextIndex:i}}focusContainer(e,t){e.setAllowFocus?.(!0);const s=ys(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),s}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},tE=class extends nr{constructor(e){super(),this.gridBody=k,this.sideBar=k,this.pagination=k,this.rootWrapperBody=k,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCssClass(n),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:n=>{this.getGui().style.userSelect=n??"",this.getGui().style.webkitUserSelect=n??""},setCursor:n=>{this.getGui().style.cursor=n??""}},t=this.createManagedBean(new eE),s=t.getOptionalSelectors(),o=this.createTemplate(s),i=[JD,...Object.values(s).filter(n=>!!n)];this.setTemplate(o,i),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>t.focusInnerElement(n),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),Kn(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const s=this.rootWrapperBody.classList,{AUTO_HEIGHT:o,NORMAL:i,PRINT:n}=bs,{autoHeight:r,normal:l,print:a}=t;s.toggle(o,r),s.toggle(i,l),s.toggle(n,a),this.addOrRemoveCssClass(o,r),this.addOrRemoveCssClass(i,l),this.addOrRemoveCssClass(n,a)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,s=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,o=e.statusBarSelector?{tag:"ag-status-bar"}:null,i=e.watermarkSelector?{tag:"ag-watermark"}:null,n=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"},s]},o,n,i]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];return[this.sideBar,this.pagination].forEach(t=>{t&&e.push(t)}),e.filter(t=>fs(t.getGui()))}},ne=(e,t)=>{for(const s of Object.keys(t))t[s]=e;return t},cm={dispatchEvent:"CommunityCore",...ne("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0}),...ne("GridState",{getState:0}),...ne("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...ne("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...ne("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...ne("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...ne("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...ne("ValueCache",{expireValueCache:0}),...ne("CellApi",{getCellValue:0}),...ne("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...ne("Sort",{onSortChanged:0}),...ne("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0}),...ne("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...ne("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...ne("HighlightChanges",{flashCells:0}),...ne("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0}),...ne("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}),...ne("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...ne("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...ne("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...ne("ColumnResize",{setColumnWidths:0}),...ne("ColumnHover",{isColumnHovered:0}),...ne("EditCore",{getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0}),...ne("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...ne("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...ne("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0}),...ne("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...ne("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...ne("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...ne("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,onRowHeightChanged:0}),...ne("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...ne("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...ne("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...ne("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...ne("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...ne("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...ne("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...ne("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...ne("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...ne("ContextMenu",{showContextMenu:0}),...ne("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...ne("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...ne("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...ne("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...ne("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}),...ne("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...ne("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...ne("StatusBar",{getStatusPanel:0})},Tc={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},sE=(e,t)=>e.eventSvc.dispatchEvent(t),um=class{};Reflect.defineProperty(um,"name",{value:"GridApi"});var oE=class extends F{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new um,this.fns={...Tc,dispatchEvent:sE},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(cm))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:s,beans:o}=this;s!==Tc&&(s[e]=o?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:s,fns:{[e]:o}}=this;return o?o(s,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:s,preDestroyLink:o}=this;if(!t)I(26,{fnName:e,preDestroyLink:o});else{const i=cm[e];s.assertModuleRegistered(i,`api.${e}`)&&I(27,{fnName:e,module:i})}}destroy(){super.destroy(),this.fns=Tc,this.beans=null}};function iE(e){return e.context.getGridId()}function nE(e){e.gridDestroySvc.destroy()}function rE(e){return e.gridDestroySvc.destroyCalled}function lE(e,t){return e.gos.get(t)}function aE(e,t,s){hm(e,{[t]:s})}function hm(e,t){e.gos.updateGridOptions({options:t})}var dE=class extends F{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:s}=this.beans;return s.addDragSource(t),()=>s.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const s=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(s)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!0),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)}},pm={moduleName:"Drag",version:Ce,beans:[iF]},gm={moduleName:"SharedDragAndDrop",version:Ce,beans:[Qx],dependsOn:[pm],userComponents:{agDragAndDropImage:vD},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},cE={moduleName:"HorizontalResize",version:Ce,beans:[dE],dependsOn:[pm]},uE=":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}}",hE=class extends F{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:s,executeLaterFuncs:o}=this;if(s.length===0&&o.length===0){e(),t();return}const i=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),i(s)},0),window.setTimeout(()=>{t(),i(o)},200)})}};function pE(e,t,s){e.colMoves?.moveColumnByIndex(t,s,"api")}function gE(e,t,s){e.colMoves?.moveColumns(t,s,"api")}var fE=class extends F{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;t&&t.forEach(s=>{s.isPrimary()&&(s.isAnyFunctionActive()||(s.isAllowValue()?this.columnsToAggregate.push(s):s.isAllowRowGroup()?this.columnsToGroup.push(s):s.isAllowPivot()&&this.columnsToPivot.push(s)))})}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:s,pivotColsSvc:o}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&s?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&o?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function mE(e,t){!t||t.length<=1||t.filter(o=>e.indexOf(o)<0).length>0||t.sort((o,i)=>{const n=e.indexOf(o),r=e.indexOf(i);return n-r})}function fm(e){const{isFromHeader:t,fromLeft:s,xPosition:o,fromEnter:i,fakeEvent:n,pinned:r,gos:l,colModel:a,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;if(t){const b=[];u.forEach(x=>{let A=null,H=x.getParent();for(;H!=null&&H.getDisplayedLeafColumns().length===1;)A=H,H=H.getParent();A!=null?(!!A.getColGroupDef()?.marryChildren?A.getProvidedColumnGroup().getLeafColumns():A.getLeafColumns()).forEach(L=>{b.includes(L)||b.push(L)}):b.includes(x)||b.push(x)}),u=b}const h=u.slice();mE(a.getCols(),h);const p=yE({movingCols:h,draggingRight:s,xPosition:o,pinned:r,gos:l,colModel:a,visibleCols:c}),g=CE(h,a);if(p.length===0)return;const f=p[0];let m=g!==null&&!i;if(t&&(m=g!==null),m&&!n&&(!s&&f>=g||s&&f<=g))return;const v=c.allCols,y=[];let R=null;for(let b=0;b<p.length;b++){const x=p[b],A=d.getProposedColumnOrder(h,x);if(!d.doesOrderPassRules(A))continue;const H=A.filter(z=>v.includes(z));if(R===null)R=H;else if(!_s(H,R))break;const M=vE(A);y.push({move:x,fragCount:M})}if(y.length===0)return;y.sort((b,x)=>b.fragCount-x.fragCount);const w=y[0].move;if(!(w>a.getCols().length-u.length))return{columns:u,toIndex:w}}function mm(e){const{columns:t,toIndex:s}=fm(e)||{},{finished:o,colMoves:i}=e;return!t||s==null?null:(i.moveColumns(t,s,"uiColumnMoved",o),o?null:{columns:t,toIndex:s})}function CE(e,t){const s=t.getCols(),o=e.map(a=>s.indexOf(a)).sort((a,d)=>a-d),i=o[0];return Re(o)-i!==o.length-1?null:i}function vE(e){function t(o){const i=[];let n=o.getOriginalParent();for(;n!=null;)i.push(n),n=n.getOriginalParent();return i}let s=0;for(let o=0;o<e.length-1;o++){let i=t(e[o]),n=t(e[o+1]);[i,n]=i.length>n.length?[i,n]:[n,i],i.forEach(r=>{n.indexOf(r)===-1&&s++})}return s}function wE(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function yE(e){const{movingCols:t,draggingRight:s,xPosition:o,pinned:i,gos:n,colModel:r,visibleCols:l}=e;if(n.get("suppressMovableColumns")||t.some(R=>R.getColDef().suppressMovable))return[];const d=wE(l,i),c=r.getCols(),u=d.filter(R=>t.includes(R)),h=d.filter(R=>!t.includes(R)),p=c.filter(R=>!t.includes(R));let g=0,f=o;if(s){let R=0;u.forEach(w=>R+=w.getActualWidth()),f-=R}if(f>0){for(let R=0;R<h.length;R++){const w=h[R];if(f-=w.getActualWidth(),f<0)break;g++}s&&g++}let m;if(g>0){const R=h[g-1];m=p.indexOf(R)+1}else m=p.indexOf(h[0]),m===-1&&(m=0);const v=[m],y=(R,w)=>R-w;if(s){let R=m+1;const w=c.length-1;for(;R<=w;)v.push(R),R++;v.sort(y)}else{let R=m;const w=c.length-1;let b=c[R];for(;R<=w&&d.indexOf(b)<0;)R++,v.push(R),b=c[R];R=m-1;const x=0;for(;R>=x;)v.push(R),R--;v.sort(y).reverse()}return v}function Lc(e){const{pinned:t,fromKeyboard:s,gos:o,ctrlsSvc:i,useHeaderRow:n,skipScrollPadding:r}=e;let l=i.getHeaderRowContainerCtrl(t)?.eViewport,{x:a}=e;return l?(s&&(a-=l.getBoundingClientRect().left),o.get("enableRtl")&&(n&&(l=l.querySelector(".ag-header-row")),a=l.clientWidth-a),t==null&&!r&&(a+=i.get("center").getCenterViewportScrollLeft()),a):0}function kc(e,t){for(const s of e)s.moving=t,s.dispatchColEvent("movingChanged","uiColumnMoved")}var Cm=7,Oc=100,Jl=Oc/2,bE=5,SE=100,RE=class extends F{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!j(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,s=t?.dragItem.columns??[];for(const o of s){const i=o.getPinned();if(o.getColDef().lockPinned){if(i==e)return"move";continue}if(i===e||!e)return"move";if(!i&&e)return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,s=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(s,!0,"uiColumnDragged");else{const i=t.visibleState,n=(s||[]).filter(r=>i[r.getId()]);this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(s,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,s=!1,o=!1){const{gos:i,ctrlsSvc:n}=this.beans,r=i.get("suppressMoveWhenColumnDragging");if(o&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!o&&ke(e.hDirection))return;const l=Lc({x:e.x,pinned:this.pinned,gos:i,ctrlsSvc:n});t||this.checkCenterForScrolling(l),r?this.handleColumnDragWhileSuppressingMovement(e,t,s,l,o):this.handleColumnDragWhileAllowingMovement(e,t,s,l,o)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),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,s){if(!e)return;const o=e.filter(i=>!i.getColDef().lockVisible);this.beans.colModel.setColsVisible(o,t,s)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:s}=e;this.beans.colMoves.moveColumns(t,s,"uiColumnMoved",!0)}handleColumnDragWhileSuppressingMovement(e,t,s,o,i){const n=this.getAllMovingColumns(e,!0);if(i){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:l,xPosition:a}=this.getNormalisedXPositionInfo(n,r)||{};if(l==null||a==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:a,fromEnter:t,fakeEvent:s,fromLeft:l})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,o)}}handleColumnDragWhileAllowingMovement(e,t,s,o,i){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",l=e.dragSource.type===1,a=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:l,xPosition:o,fromLeft:r,fromEnter:t,fakeEvent:s}),d=mm({...a,finished:i});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const s=e.dragSource.getDragItem();let o=null;t?(o=s.columnsInSplit,o||(o=s.columns)):o=s.columns;const i=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return o?o.filter(i):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:s,xPosition:o,fromLeft:i,fromEnter:n,fakeEvent:r}=e,{gos:l,colModel:a,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:s,fromLeft:i,xPosition:o,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:l,colModel:a,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){const{gos:s,colModel:o}=this.beans,i=s.get("enableRtl"),n=o.getCols().filter(c=>c.isVisible()&&c.getPinned()===this.pinned);let r=null,l=null,a=null;for(const c of n){if(l=c.getActualWidth(),r=this.getNormalisedColumnLeft(c,0,i),r!=null){const u=r+l;if(r<=t&&u>=t){a=c;break}}r=null,l=null}if(a)e.indexOf(a)!==-1&&(a=null);else{for(let c=n.length-1;c>=0;c--){const u=n[c],h=n[c].getParent();if(!h){a=u;break}const p=h?.getDisplayedLeafColumns();if(p.length){a=Re(p);break}}if(!a)return;r=this.getNormalisedColumnLeft(a,0,i),l=a.getActualWidth()}if(this.lastHighlightedColumn?.column!==a&&this.clearHighlighted(),a==null||r==null||l==null)return;let d;t-r<l/2!==i?d=0:d=1,vm(a,d),this.lastHighlightedColumn={column:a,position:d}}getNormalisedXPositionInfo(e,t){const{gos:s,visibleCols:o}=this.beans,i=s.get("enableRtl"),{firstMovingCol:n,column:r,position:l}=this.getColumnMoveAndTargetInfo(e,t,i);if(!n||!r||l==null)return;const a=o.allCols,d=a.indexOf(n),c=a.indexOf(r),u=l===0!==i,h=d<c||d===c&&!u;let p=0;if(u?h&&(p-=1):h||(p+=1),c+p===d)return;const g=a[c+p];if(!g)return;const f=this.getNormalisedColumnLeft(g,20,i);return{fromLeft:h,xPosition:f}}getColumnMoveAndTargetInfo(e,t,s){const o=this.lastHighlightedColumn||{},{firstMovingCol:i,lastMovingCol:n}=xE(e);if(!i||!n||o.column||!t)return{firstMovingCol:i,...o};const l=this.getPinDirection()==="left";return{firstMovingCol:i,position:l?1:0,column:l!==s?i:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,s){const{gos:o,ctrlsSvc:i}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return Lc({x:s?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:s,skipScrollPadding:!0,gos:o,ctrlsSvc:i})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,s=this.failedMoveAttempts>Cm;return t&&s||e.some(o=>o.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:s,fromEnter:o,fakeEvent:i,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:s,fromLeft:n,fromEnter:o,fakeEvent:i}),{columns:l,toIndex:a}=fm(r)||{};l&&a!=null&&(this.lastMovedInfo={columns:l,toIndex:a}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(vm(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),s=t.getCenterViewportScrollLeft(),o=s+t.getCenterWidth();let i,n;this.gos.get("enableRtl")?(i=e<s+Jl,n=e>o-Jl):(n=e<s+Jl,i=e>o-Jl),this.needToMoveRight=i,this.needToMoveLeft=n,n||i?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),SE),this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.getIconName(),!1))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*bE,e>Oc&&(e=Oc);let t=null;const s=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=s.scrollHorizontally(-e):this.needToMoveRight&&(t=s.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:o,dragAndDrop:i,gos:n}=this.beans;if(this.failedMoveAttempts<=Cm+1||!o)return;if(i.getDragAndDropImageComponent()?.setIcon("pinned",!1),!n.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,s=!1){const o=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!o.length)return 0;s&&(t=this.getPinDirection());const{pinnedCols:i,dragAndDrop:n}=this.beans;return i?.setColsPinned(o,t,"uiColumnDragged"),s&&n.nudge(),o.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function vm(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function xE(e){const t=e.length;let s,o;for(let i=0;i<t;i++){if(!s){const n=e[i];n.getLeft()!=null&&(s=n)}if(!o){const n=e[t-1-i];n.getLeft()!=null&&(o=n)}if(s&&o)break}return{firstMovingCol:s,lastMovingCol:o}}var FE=class extends F{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,s=this.pinned;e.whenReady(this,o=>{let i;const n=o.gridBodyCtrl.eBodyViewport;switch(s){case"left":i=[[n,o.left.eContainer],[o.bottomLeft.eContainer],[o.topLeft.eContainer]];break;case"right":i=[[n,o.right.eContainer],[o.bottomRight.eContainer],[o.topRight.eContainer]];break;default:i=[[n,o.center.eViewport],[o.bottomCenter.eViewport],[o.topCenter.eViewport]];break}this.eSecondaryContainers=i}),this.moveColumnFeature=this.createManagedBean(new RE(s)),this.bodyDropPivotTarget=this.createManagedBean(new fE(s)),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()}},DE=class extends F{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,s){const o=this.beans.colModel.getCols();if(!o)return;const i=o[e];this.moveColumns([i],t,s)}moveColumns(e,t,s,o=!0){const{colModel:i,colAnimation:n,visibleCols:r,eventSvc:l}=this.beans,a=i.getCols();if(!a)return;if(t>a.length-e.length){I(30,{toIndex:t});return}n?.start();const d=i.getColsForKeys(e);this.doesMovePassRules(d,t)&&(Zg(i.getCols(),d,t),r.refresh(s),l.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:o,source:s})),n?.finish()}doesMovePassRules(e,t){const s=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(s)}doesOrderPassRules(e){const{colModel:t,gos:s}=this.beans;return!(!lf(e,t.getColTree())||!(i=>{const n=d=>d?d==="left"||d===!0?-1:1:0,r=s.get("enableRtl");let l=r?1:-1,a=!0;return i.forEach(d=>{const c=n(d.getColDef().lockPosition);r?c>l&&(a=!1):c<l&&(a=!1),l=c}),a})(e))}getProposedColumnOrder(e,t){const o=this.beans.colModel.getCols().slice();return Zg(o,e,t),o}createBodyDropTarget(e,t){return new FE(e,t)}moveHeader(e,t,s,o,i){const{ctrlsSvc:n,gos:r,colModel:l,visibleCols:a,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=Ye(s),p=h?c.width:s.getActualWidth(),g=e==="left"!==r.get("enableRtl"),f=Lc({x:g?u-20:u+p+20,pinned:o,fromKeyboard:!0,gos:r,ctrlsSvc:n}),m=d.focusedHeader;mm({allMovingColumns:h?s.getLeafColumns():[s],isFromHeader:!0,fromLeft:e==="right",xPosition:f,pinned:o,fromEnter:!1,fakeEvent:!1,gos:r,colModel:l,colMoves:this,visibleCols:a,finished:!0});let v;if(h){const y=s.getDisplayedLeafColumns();v=g?y[0]:Re(y)}else v=s;if(n.getScrollFeature().ensureColumnVisible(v,"auto"),(!i.isAlive()||r.get("ensureDomOrder"))&&m){let y;if(h){const R=s.getGroupId(),w=s.getLeafColumns();if(!w.length)return;const b=w[0].getParent();if(!b)return;y=EE(b,R)}else y=s;y&&d.focusHeaderPosition({headerPosition:{...m,column:y}})}}setDragSourceForHeader(e,t,s){const{gos:o,colModel:i,dragAndDrop:n,visibleCols:r}=this.beans;let l=!o.get("suppressDragLeaveHidesColumns");const a=Ye(t),d=a?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>l?"hide":"notAllowed",getDragItem:a?()=>AE(t,r.allCols):()=>ME(t),dragItemName:s,onDragStarted:()=>{l=!o.get("suppressDragLeaveHidesColumns"),kc(d,!0)},onDragStopped:()=>kc(d,!1),onDragCancelled:()=>kc(d,!1),onGridEnter:h=>{if(l){const{columns:p=[],visibleState:g}=h??{},f=a?v=>!g||g[v.getColId()]:()=>!0,m=p.filter(v=>!v.getColDef().lockVisible&&f(v));i.setColsVisible(m,!0,"uiColumnMoved")}},onGridExit:h=>{if(l){const p=h?.columns?.filter(g=>!g.getColDef().lockVisible)||[];i.setColsVisible(p,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function EE(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function ME(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}function AE(e,t){const s=e.getProvidedColumnGroup().getLeafColumns(),o={};s.forEach(l=>o[l.getId()]=l.isVisible());const i=[];t.forEach(l=>{s.indexOf(l)>=0&&(i.push(l),Ot(s,l))}),s.forEach(l=>i.push(l));const n=[],r=e.getLeafColumns();for(const l of i)r.indexOf(l)!==-1&&n.push(l);return{columns:i,columnsInSplit:n,visibleState:o}}var wm={moduleName:"ColumnMove",version:Ce,beans:[DE,hE],apiFunctions:{moveColumnByIndex:pE,moveColumns:gE},dependsOn:[gm],css:[uE]},PE=class extends F{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const s=this.getHeaderCellForColumn(e);if(!s)return-1;const o=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||o.push(s),this.getPreferredWidthForElements(o)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const s=document.createElement("form");s.style.position="fixed";const o=this.centerRowContainerCtrl.eContainer;e.forEach(n=>this.cloneItemIntoDummy(n,s)),o.appendChild(s);const i=s.offsetWidth;return o.removeChild(s),t=t??this.gos.get("autoSizePadding"),i+t}getHeaderCellForColumn(e){let t=null;return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().forEach(s=>{const o=s.getHtmlElementForColumnHeader(e);o!=null&&(t=o)}),t}cloneItemIntoDummy(e,t){const s=e.cloneNode(!0);s.style.width="",s.style.position="static",s.style.left="";const o=document.createElement("div"),i=o.classList;["ag-header-cell","ag-header-group-cell"].some(l=>s.classList.contains(l))?(i.add("ag-header","ag-header-row"),o.style.position="static"):i.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(a=>r.classList.contains(a))){for(let a=0;a<r.classList.length;a++){const d=r.classList[a];d!="ag-row-position-absolute"&&i.add(d)}break}r=r.parentElement}o.appendChild(s),t.appendChild(o)}},IE={moduleName:"AutoWidth",version:Ce,beans:[PE]};function TE(e,t,s=!0,o="api"){e.colResize?.setColumnWidths(t,!1,s,o)}var LE=class extends F{constructor(e,t,s,o){super(),this.comp=e,this.eResize=t,this.pinned=s,this.columnGroup=o}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:s}=this.beans,o=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(o),!t.get("suppressAutoSize")&&s&&this.addDestroyFunc(s.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:s,resizeRatios:o,groupAfterColumns:i,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=s,this.resizeRatios=o,this.resizeTakeFromCols=i,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,s="uiColumnResized"){const o=this.normaliseDragChange(t),i=this.resizeStartWidth+o;this.resizeColumnsFromLocalValues(i,s,e)}getInitialValues(e){const t=a=>a.reduce((d,c)=>d+c.getActualWidth(),0),s=(a,d)=>a.map(c=>c.getActualWidth()/d),o=this.getColumnsToResize(),i=t(o),n=s(o,i),r={columnsToResize:o,resizeStartWidth:i,resizeRatios:n};let l=null;if(e&&(l=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),l){const a=l.getDisplayedLeafColumns(),d=r.groupAfterColumns=a.filter(u=>u.isResizable()),c=r.groupAfterStartWidth=t(d);r.groupAfterRatios=s(d,c)}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),s=this.getInitialValues();t>s.resizeStartWidth&&this.resizeColumns(s,t,e,!0)}resizeColumnsFromLocalValues(e,t,s=!0){if(!this.resizeCols||!this.resizeRatios)return;const o={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(o,e,t,s)}resizeColumns(e,t,s,o=!0){const{columnsToResize:i,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:d}=e,c=[];if(c.push({columns:i,ratios:r,width:t}),l){const u=t-n;c.push({columns:l,ratios:d,width:a-u})}this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:o,source:s}),o&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("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}},kE=class extends F{constructor(e,t,s,o,i){super(),this.pinned=e,this.column=t,this.eResize=s,this.comp=o,this.ctrl=i}postConstruct(){const e=[];let t,s;const o=()=>{if(fe(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:l}=this.beans,a=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(a),s&&l&&e.push(l.addColumnAutosize(this.eResize,this.column))},i=()=>{e.forEach(r=>r()),e.length=0},n=()=>{const r=this.column.isResizable(),l=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||l!==s)&&(t=r,s=l,i(),o())};n(),this.addDestroyFunc(i),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:s,lastResizeAmount:o,resizeStartWidth:i,beans:n}=this,r=this.normaliseResizeAmount(t),l=i+r,a=[{key:s,newWidth:l}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;if(this.column.getPinned()){const h=d?.leftWidth??0,p=d?.rightWidth??0,g=zn(c.getGridBodyCtrl().eBodyViewport)-50;if(h+p+(r-o)>g)return}this.lastResizeAmount=r,u?.setColumnWidths(a,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.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const s=this.pinned!=="left",o=this.pinned==="right";return this.gos.get("enableRtl")?s&&(t*=-1):o&&(t*=-1),t}},OE=class extends F{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,s,o){const i=[],{colModel:n,gos:r,visibleCols:l}=this.beans;e.forEach(a=>{const d=n.getColDefCol(a.key)||n.getCol(a.key);if(!d)return;if(i.push({width:a.newWidth,ratios:[1],columns:[d]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=l.getColAfter(d);if(!u)return;const h=d.getActualWidth()-a.newWidth,p=u.getActualWidth()+h;i.push({width:p,ratios:[1],columns:[u]})}}),i.length!==0&&this.resizeColumnSets({resizeSets:i,finished:s,source:o})}resizeColumnSets(e){const{resizeSets:t,finished:s,source:o}=e;if(!(!t||t.every(c=>GE(c)))){if(s){const c=t&&t.length>0?t[0].columns:null;Il(this.eventSvc,c,s,o)}return}const n=[],r=[];t.forEach(c=>{const{width:u,columns:h,ratios:p}=c,g={},f={};h.forEach(y=>r.push(y));let m=!0,v=0;for(;m;){if(v++,v>1e3){ue(31);break}m=!1;const y=[];let R=0,w=u;h.forEach((x,A)=>{if(f[x.getId()])w-=g[x.getId()];else{y.push(x);const M=p[A];R+=M}});const b=1/R;y.forEach((x,A)=>{const H=A===y.length-1;let M;H?M=w:(M=Math.round(p[A]*u*b),w-=M);const z=x.getMinWidth(),L=x.getMaxWidth();M<z?(M=z,f[x.getId()]=!0,m=!0):L>0&&M>L&&(M=L,f[x.getId()]=!0,m=!0),g[x.getId()]=M})}h.forEach(y=>{const R=g[y.getId()];y.getActualWidth()!==R&&(y.setActualWidth(R,o),n.push(y))})});const l=n.length>0;let a=[];if(l){const{colFlex:c,visibleCols:u,colViewport:h}=this.beans;a=c?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(o),u.updateBodyWidths(),h.checkViewportColumns()}const d=r.concat(a);(l||s)&&Il(this.eventSvc,d,s,o,a)}resizeHeader(e,t,s){if(!e.isResizable())return;const o=e.getActualWidth(),i=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(o+t,i),n);this.setColumnWidths([{key:e,newWidth:r}],s,!0,"uiColumnResized")}createResizeFeature(e,t,s,o,i){return new kE(e,t,s,o,i)}createGroupResizeFeature(e,t,s,o){return new LE(e,t,s,o)}};function GE(e){const{columns:t,width:s}=e;let o=0,i=0,n=!0;t.forEach(a=>{const d=a.getMinWidth();o+=d||0;const c=a.getMaxWidth();c>0?i+=c:n=!1});const r=s>=o,l=!n||s<=i;return r&&l}var NE={moduleName:"ColumnResize",version:Ce,beans:[OE],apiFunctions:{setColumnWidths:TE},dependsOn:[cE,IE]},_E=class extends F{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);this.columnGroup.getLeafColumns().forEach(t=>{t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",e===0)}},BE=class extends Ec{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}setComp(e,t,s,o,i){const{column:n,beans:r}=this,{context:l,colNames:a,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,i=tr(this,l,i),this.setGui(t,i),this.displayName=a.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(i),this.setupExpandable(i),this.setupTooltip(),this.setupAutoHeight({wrapperElement:o,compBean:i}),this.setupUserComp(),this.addHeaderMouseListeners(i),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,p=n.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(i,p,t),c?.createRangeHighlightFeature(i,n,e),i.createManagedBean(new Dc(n,t,r)),i.createManagedBean(new _E(e,n)),u?this.resizeFeature=i.createManagedBean(u.createGroupResizeFeature(e,s,h,n)):e.setResizableDisplayed(!1),i.createManagedBean(new ji(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(i,p),i.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(i),i.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.getDefinition();return he(t.gos,{colDef:s,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,s=e.get("groupHeaderHeight");s!=null?s===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(s):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const s of t)e.addManagedListeners(s,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,s)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),s=t[0]===e,o=Re(t)===e;if(!s&&!o)return;const i=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(a=>a.column.isMoving());let r=!1,l=!1;if(n){const a=this.beans.gos.get("enableRtl"),d=i===1,c=i===0;s&&(a?l=d:r=c),o&&(a?r=c:l=d)}this.comp.addOrRemoveCssClass("ag-header-highlight-before",r),this.comp.addOrRemoveCssClass("ag-header-highlight-after",l)}resizeHeader(e,t){const{resizeFeature:s}=this;if(!s)return;const o=s.getInitialValues(t);s.resizeColumns(o,o.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:s}=this.beans,o=he(s,{displayName:this.displayName,columnGroup:this.column,setExpanded:n=>{e.setColumnGroupOpened(this.column.getProvidedColumnGroup(),n,"gridInitializing")},setTooltip:(n,r)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}}),i=lx(t,o);i&&this.comp.setUserCompDetails(i)}addHeaderMouseListeners(e){const t=i=>this.handleMouseOverChange(i.type==="mouseenter"),s=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),o=i=>this.handleContextMenuMouseEvent(i,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:s,contextmenu:o})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const s=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:s,expandableChanged:s})}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(),s=bf(t,this.gos,null,e);e.isPadding()?(s.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(i=>i.isSpanHeaderHeight())&&s.push("ag-header-span-height")):(s.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&s.push("ag-header-cell-wrap-text")),s.forEach(o=>this.comp.addOrRemoveCssClass(o,!0))}setupMovingCss(e){const{column:t}=this,o=t.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",t.isMoving());o.forEach(n=>{e.addManagedListeners(n,{movingChanged:i})}),i()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===D.ENTER){const s=this.column,o=!s.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(s.getProvidedColumnGroup(),o,"uiColumnExpanded")}}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.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 HE(e,t,s){e.colGroupSvc?.setColumnGroupOpened(t,s,"api")}function VE(e,t,s){return e.colGroupSvc?.getColumnGroup(t,s)??null}function WE(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function zE(e,t,s){return e.colNames.getDisplayNameForColumnGroup(t,s)||""}function UE(e){return e.colGroupSvc?.getColumnGroupState()??[]}function $E(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function jE(e){e.colGroupSvc?.resetColumnGroupState("api")}function KE(e){return e.visibleCols.treeLeft}function YE(e){return e.visibleCols.treeCenter}function qE(e){return e.visibleCols.treeRight}function XE(e){return e.visibleCols.getAllTrees()}function QE(e,t){for(let s=0;s<t.length;s++){const o=e.indexOf(t[s]);o>=0&&(e[o]=e[e.length-1],e.pop())}}var ZE=class extends F{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colModel:s,colGroupSvc:o,colViewport:i}=this.beans;t||this.buildTrees(s,o),o?.updateOpenClosedVisibility();const n=Gc(this.treeLeft);this.leftCols=n,this.centerCols=Gc(this.treeCenter);const r=Gc(this.treeRight);this.rightCols=r,this.joinColsAriaOrder(s),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(l=>l.isAutoHeight()),this.beans.colFlex?.refreshFlexedColumns(),this.updateBodyWidths(),i.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(s,n,r,e),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}updateBodyWidths(){const e=Wi(this.centerCols),t=Wi(this.leftCols),s=Wi(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==s)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=s,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,s,o){let i,n;this.gos.get("enableRtl")?(i=t?t[0]:null,n=s?Re(s):null):(i=t?Re(t):null,n=s?s[0]:null),e.getCols().forEach(r=>{r.setLastLeftPinned(r===i,o),r.setFirstRightPinned(r===n,o)})}buildTrees(e,t){const s=e.getColsToShow(),o=s.filter(a=>a.getPinned()=="left"),i=s.filter(a=>a.getPinned()=="right"),n=s.filter(a=>a.getPinned()!="left"&&a.getPinned()!="right"),r=new BR,l=a=>t?t.createColumnGroups(a):a.columns;this.treeLeft=l({columns:o,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=l({columns:i,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=l({columns:n,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(),s=[],o=[],i=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?s.push(n):i.push(n):o.push(n)}this.ariaOrderColumns=s.concat(o).concat(i)}getAriaColIndex(e){let t;return Ye(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{Ye(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const o=t.getCols().slice(0),i=this.gos.get("enableRtl");[this.leftCols,this.rightCols,this.centerCols].forEach(n=>{if(i){let r=Wi(n);n.forEach(l=>{r-=l.getActualWidth(),l.setLeft(r,e)})}else{let r=0;n.forEach(l=>{l.setLeft(r,e),r+=l.getActualWidth()})}QE(o,n)}),o.forEach(n=>{n.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:s}}=this;return s.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:s}}=this;return s.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,s,o){const i=[];let n=null;for(let r=0;r<t.length;r++){const l=t[r],a=t.length-r,d=Math.min(l.getColSpan(e),a),c=[l];if(d>1){const h=d-1;for(let p=1;p<=h;p++)c.push(t[r+p]);r+=h}let u;s?(u=!1,c.forEach(h=>{s(h)&&(u=!0)})):u=!0,u&&(i.length===0&&n&&(o&&o(l))&&i.push(n),i.push(l)),n=l}return i}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,s=t.indexOf(e);return s>0?t[s-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};ci(this.treeCenter,!1,e),ci(this.treeLeft,!1,e),ci(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 s=0;s<t.length;s++){const o=this[t[s]];if(o.length)return e?Re(o):o[0]}return null}getColAfter(e){const t=this.allCols,s=t.indexOf(e);return s<t.length-1?t[s+1]:null}getColsLeftWidth(){return Wi(this.leftCols)}getDisplayedColumnsRightWidth(){return Wi(this.rightCols)}isColAtEdge(e,t){const s=this.allCols;if(!s.length)return!1;const o=t==="first";let i;if(Ye(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;i=o?n[0]:Re(n)}else i=e;return(o?s[0]:Re(s))===i}};function ci(e,t,s){if(e)for(let o=0;o<e.length;o++){const i=e[o];if(Ye(i)){const n=t?i.getDisplayedChildren():i.getChildren();ci(n,t,s)}s(i)}}function Gc(e){const t=[];return ci(e,!0,s=>{Ns(s)&&t.push(s)}),t}var JE=class extends F{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return uo(null,t,s=>{it(s)&&e.push({groupId:s.getGroupId(),open:s.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const s=[];uo(null,t,o=>{if(it(o)){const i=o.getColGroupDef(),n={groupId:o.getGroupId(),open:i?i.openByDefault:void 0};s.push(n)}}),this.setColumnGroupState(s,e)}setColumnGroupState(e,t){const{colModel:s,colAnimation:o,visibleCols:i,eventSvc:n}=this.beans;if(!s.getColTree().length)return;o?.start();const l=[];e.forEach(a=>{const d=a.groupId,c=a.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),l.push(u))}),i.refresh(t,!0),l.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:l.length===1?l[0]:void 0,columnGroups:l}),o?.finish()}setColumnGroupOpened(e,t,s){let o;it(e)?o=e.getId():o=e||"",this.setColumnGroupState([{groupId:o,open:t}],s)}getProvidedColGroup(e){let t=null;return uo(null,this.beans.colModel.getColTree(),s=>{it(s)&&s.getId()===e&&(t=s)}),t}getGroupAtDirection(e,t){const s=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),o=e.getDisplayedLeafColumns(),i=t==="After"?Re(o):o[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](i);if(!r)return null;const l=this.getColGroupAtLevel(r,s);if(l!==e)return l}}getColGroupAtLevel(e,t){let s=e.getParent(),o,i;for(;o=s.getProvidedColumnGroup().getLevel(),i=s.getPaddingLevel(),!(o+i<=t);)s=s.getParent();return s}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();ci(e,!1,t=>{Ye(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Ye(e))return e;const s=this.beans.visibleCols.getAllTrees(),o=typeof t=="number";let i=null;return ci(s,!1,n=>{if(Ye(n)){const r=n;let l;o?l=e===r.getGroupId()&&t===r.getPartId():l=e===r.getGroupId(),l&&(i=r)}}),i}createColumnGroups(e){const{columns:t,idCreator:s,pinned:o,oldDisplayedGroups:i,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(i),l=[];let a=t;for(;a.length;){const d=a;a=[];let c=0;const u=h=>{const p=c;c=h;const g=d[p],m=(Ye(g)?g.getProvidedColumnGroup():g).getOriginalParent();if(m==null){for(let y=p;y<h;y++)l.push(d[y]);return}const v=this.createColumnGroup(m,s,r,o,n);for(let y=p;y<h;y++)v.addChild(d[y]);a.push(v)};for(let h=1;h<d.length;h++){const p=d[h],f=(Ye(p)?p.getProvidedColumnGroup():p).getOriginalParent(),m=d[c],y=(Ye(m)?m.getProvidedColumnGroup():m).getOriginalParent();f!==y&&u(h)}c<d.length&&u(d.length)}return n||this.setupParentsIntoCols(l,null),l}createProvidedColumnGroup(e,t,s,o,i,n,r){const l=i.getUniqueKey(t.groupId||null,null),a=this.createMergedColGroupDef(t,l),d=new Jn(a,l,!1,s);this.createBean(d);const c=this.findExistingGroup(t,n);c&&n.splice(c.idx,1);const u=c?.group;u&&d.setExpanded(u.isExpanded());const h=of(this.beans,a.children,s+1,e,o,i,n,r);return d.setChildren(h),d}balanceColumnTree(e,t,s,o){const i=[];for(let n=0;n<e.length;n++){const r=e[n];if(it(r)){const l=r,a=this.balanceColumnTree(l.getChildren(),t+1,s,o);l.setChildren(a),i.push(l)}else{let l,a;for(let d=s-1;d>=t;d--){const c=o.getUniqueKey(null,null),u=this.createMergedColGroupDef(null,c),h=new Jn(u,c,!0,t);this.createBean(h),a&&a.setChildren([h]),a=h,l||(l=a)}if(l&&a)if(i.push(l),e.some(c=>it(c))){a.setChildren([r]);continue}else{a.setChildren(e);break}i.push(r)}}return i}findDepth(e){let t=0,s=e;for(;s&&s[0]&&it(s[0]);)t++,s=s[0].getChildren();return t}findMaxDepth(e,t){let s=t;for(let o=0;o<e.length;o++){const i=e[o];if(it(i)){const n=i,r=this.findMaxDepth(n.getChildren(),t+1);s<r&&(s=r)}}return s}balanceTreeForAutoCols(e,t){const s=[];return e.forEach(o=>{let i=o;for(let n=t-1;n>=0;n--){const r=new Jn(null,`FAKE_PATH_${o.getId()}}_${n}`,!0,n);this.createBean(r),r.setChildren([i]),i.originalParent=r,i=r}t===0&&(o.originalParent=null),s.push(i)}),s}createMergedColGroupDef(e,t){const s={},{gos:o,validation:i}=this.beans;return Object.assign(s,o.get("defaultColGroupDef")),Object.assign(s,e),i?.validateColDef(s,t),s}findExistingGroup(e,t){if(e.groupId!=null)for(let o=0;o<t.length;o++){const i=t[o];if(i.getColGroupDef()&&i.getId()===e.groupId)return{idx:o,group:i}}}createColumnGroup(e,t,s,o,i){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),l=Tf(n,r);let a=s[l];return a&&a.getProvidedColumnGroup()!==e&&(a=null),j(a)?a.reset():(a=new Lf(e,n,r,o),i||this.createBean(a)),a}mapOldGroupsById(e){const t={},s=o=>{o.forEach(i=>{if(Ye(i)){const n=i;t[i.getUniqueId()]=n,s(n.getChildren())}})};return e&&s(e),t}setupParentsIntoCols(e,t){e.forEach(s=>{if(s.parent=t,Ye(s)){const o=s;this.setupParentsIntoCols(o.getChildren(),o)}})}},ym={moduleName:"ColumnGroup",version:Ce,dynamicBeans:{headerGroupCellCtrl:BE},beans:[JE],apiFunctions:{getAllDisplayedColumnGroups:XE,getCenterDisplayedColumnGroups:YE,getColumnGroup:VE,getColumnGroupState:UE,getDisplayNameForColumnGroup:zE,getLeftDisplayedColumnGroups:KE,getProvidedColumnGroup:WE,getRightDisplayedColumnGroups:qE,resetColumnGroupState:jE,setColumnGroupOpened:HE,setColumnGroupState:$E}},eM={moduleName:"CheckboxCellRenderer",version:Ce,userComponents:{agCheckboxCellRenderer:FD}};function tM(e,t){const s=e.colModel.getColDefCol(t);return s?s.getColDef():null}function sM(e){return e.colModel.getColumnDefs()}function oM(e,t,s){return e.colNames.getDisplayNameForColumn(t,s)||""}function iM(e,t){return e.colModel.getColDefCol(t)}function nM(e){return e.colModel.getColDefCols()}function rM(e,t){return Gt(e,t,"api")}function lM(e){return er(e)}function aM(e){uf(e,"api")}function dM(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function cM(e){return e.visibleCols.isPinningLeft()}function uM(e){return e.visibleCols.isPinningRight()}function hM(e,t){return e.visibleCols.getColAfter(t)}function pM(e,t){return e.visibleCols.getColBefore(t)}function gM(e,t,s){e.colModel.setColsVisible(t,s,"api")}function fM(e,t,s){e.pinnedCols?.setColsPinned(t,s,"api")}function mM(e){return e.colModel.getCols()}function CM(e){return e.visibleCols.leftCols}function vM(e){return e.visibleCols.centerCols}function wM(e){return e.visibleCols.rightCols}function yM(e){return e.visibleCols.allCols}function bM(e){return e.colViewport.getViewportColumns()}function Nc(e,t){if(!e)return;const s=e,o={};return Object.keys(s).forEach(i=>{if(t&&t.indexOf(i)>=0||qg.has(i))return;const n=s[i];typeof n=="object"&&n!==null&&n.constructor===Object?o[i]=Nc(n):o[i]=n}),o}var SM=class extends F{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,s,o){const i=e.slice();t?i.sort((l,a)=>s.indexOf(l)-s.indexOf(a)):s&&i.sort((l,a)=>o.indexOf(l)-o.indexOf(a));const n=this.rowGroupColsSvc?.columns,r=this.pivotColsSvc?.columns;return this.buildColumnDefs(i,n,r)}buildColumnDefs(e,t=[],s=[]){const o=[],i={};return e.forEach(n=>{const r=this.createDefFromColumn(n,t,s);let l=!0,a=r,d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const h=i[d.getGroupId()];if(h){h.children.push(a),l=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[a],i[u.groupId]=u,a=u,d=d.getOriginalParent()),d!=null&&c===d){l=!1;break}c=d}l&&o.push(a)}),o}createDefFromGroup(e){const t=Nc(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,s){const o=Nc(e.getColDef());return o.colId=e.getColId(),o.width=e.getActualWidth(),o.rowGroup=e.isRowGroupActive(),o.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,o.pivot=e.isPivotActive(),o.pivotIndex=e.isPivotActive()?s.indexOf(e):null,o.aggFunc=e.isValueActive()?e.getAggFunc():null,o.hide=e.isVisible()?void 0:!0,o.pinned=e.isPinned()?e.getPinned():null,o.sort=e.getSort()?e.getSort():null,o.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,o}},RM=class extends F{constructor(){super(...arguments),this.beanName="colFlex"}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const s=this.flexViewportWidth;if(!s)return[];const{visibleCols:o}=this.beans,i=o.centerCols;let n=-1;if(e.resizingCols){const g=new Set(e.resizingCols);for(let f=i.length-1;f>=0;f--)if(g.has(i[f])){n=f;break}}let r=!1;const l=i.map((g,f)=>{const m=g.getFlex(),v=m!=null&&m>0&&f>n;return r||(r=v),{col:g,isFlex:v,flex:Math.max(0,m??0),initialSize:g.getActualWidth(),min:g.getMinWidth(),max:g.getMaxWidth(),targetSize:0}});if(!r)return[];let a=l.length,d=l.reduce((g,f)=>g+f.flex,0),c=s;const u=(g,f)=>{g.frozenSize=f,g.col.setActualWidth(f,t),c-=f,d-=g.flex,a-=1},h=g=>g.frozenSize!=null;for(const g of l)g.isFlex||u(g,g.initialSize);for(;a>0;){const g=Math.round(d<1?c*d:c);let f,m=0,v=0;for(const w of l){if(h(w))continue;f=w,v+=g*(w.flex/d);const b=v-m,x=Math.round(b);w.targetSize=x,m+=x}f&&(f.targetSize+=g-m);let y=0;for(const w of l){if(h(w))continue;const b=w.targetSize,x=Math.min(Math.max(b,w.min),w.max);y+=x-b,w.violationType=x===b?void 0:x<b?"max":"min",w.targetSize=x}const R=y===0?"all":y>0?"min":"max";for(const w of l)h(w)||(R==="all"||w.violationType===R)&&u(w,w.targetSize)}e.skipSetLeft||o.setLeftValues(t),e.updateBodyWidths&&o.updateBodyWidths();const p=l.filter(g=>g.isFlex&&!g.violationType).map(g=>g.col);if(e.fireResizedEvent){const g=l.filter(m=>m.initialSize!==m.frozenSize).map(m=>m.col),f=l.filter(m=>m.flex).map(m=>m.col);Il(this.eventSvc,g,!0,t,f)}return p}initCol(e){const{flex:t,initialFlex:s}=e.colDef;t!==void 0?e.flex=t:s!==void 0&&(e.flex=s)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},xM=class extends F{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}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={};this.dataTypeDefinitions=t;const s={};this.formatValueFuncs=s;const o=r=>l=>{const{column:a,node:d,value:c}=l;let u=a.getColDef().valueFormatter;return u===r.groupSafeValueFormatter&&(u=r.valueFormatter),this.beans.valueSvc.formatValue(a,d,c,u)};for(const r of Object.keys(e)){const l=e[r],a={...l,groupSafeValueFormatter:Rm(l,this.gos)};t[r]=a,s[r]=o(a)}const i=this.gos.get("dataTypeDefinitions")??{},n={};this.dataTypeMatchers=n;for(const r of Object.keys(i)){const l=i[r],a=this.processDataTypeDefinition(l,i,[r],e);a&&(t[r]=a,l.dataTypeMatcher&&(n[r]=l.dataTypeMatcher),s[r]=o(a))}this.checkObjectValueHandlers(e),["dateString","text","number","boolean","date"].forEach(r=>{const l=n[r];l&&delete n[r],n[r]=l??e[r].dataTypeMatcher})}processDataTypeDefinition(e,t,s,o){let i;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=o[n];const l=t[n];if(r&&l&&(r=l),!Sm(e,r,n))return;i=bm(r,e)}else{if(s.includes(n)){I(44);return}const r=t[n];if(!Sm(e,r,n))return;const l=this.processDataTypeDefinition(r,t,[...s,n],o);if(!l)return;i=bm(l,e)}return{...i,groupSafeValueFormatter:Rm(i,this.gos)}}updateColDefAndGetColumnType(e,t,s){let{cellDataType:o}=t;const{field:i}=t;if(o===void 0&&(o=e.cellDataType),(o==null||o===!0)&&(o=this.canInferCellDataType(e,t)?this.inferCellDataType(i,s):!1),!o){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[o];if(!n){I(47,{cellDataType:o});return}return e.cellDataType=o,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,o,n,s),n.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const s=o=>{t.add(o.key)};e.__addEventListener("columnStateUpdated",s),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",s))}canInferCellDataType(e,t){const{gos:s}=this;if(!ks(s))return!1;const o={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(_c(t,o))return!1;const i=t.type===null?e.type:t.type;if(i){const n=s.get("columnTypes")??{};if(Al(i).some(l=>{const a=n[l.trim()];return a&&_c(a,o)}))return!1}return!_c(e,o)}inferCellDataType(e,t){if(!e)return;let s;const o=this.getInitialData();if(o){const i=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");s=Fl(o,e,i)}else this.initWaitForRowData(t);if(s!=null)return Object.keys(this.dataTypeMatchers).find(i=>this.dataTypeMatchers[i](s))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?.allLeafChildren;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:s,eventSvc:o}=this.beans;t&&s&&(s.shouldQueueResizeOperations=!0);const[i]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(i?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&s?.processResizeOperations(),o.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const s=[];this.destroyColumnStateUpdateListeners();const o={},i={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],l=this.colModel.getCol(n);if(!l)return;const a=l.getColDef();if(!this.resetColDefIntoCol(l,"cellDataTypeInferred"))return;const d=l.getColDef();if(t&&d.type&&d.type!==a.type){const c=DM(l,r);c.rowGroup&&c.rowGroupIndex==null&&(o[n]=c),c.pivot&&c.pivotIndex==null&&(i[n]=c),s.push(c)}}t&&s.push(...this.generateColumnStateForRowGroupAndPivotIndexes(o,i)),s.length&&Gt(this.beans,{state:s},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const s={},{rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;return o?.restoreColumnOrder(s,e),i?.restoreColumnOrder(s,t),Object.values(s)}resetColDefIntoCol(e,t){const s=e.getUserProvidedColDef();if(!s)return!1;const o=Pl(this.beans,s,e.getColId());return e.setColDef(o,s,t),!0}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,s=e.object;this.hasObjectValueParser=t.valueParser!==s.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==s.valueFormatter}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}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const s=this.getDataTypeDefinition(e)?.dataTypeMatcher;return s?s(t):!0}validateColDef(e){const t=s=>I(48,{property:s});if(e.cellDataType==="object"){const{object:s}=this.dataTypeDefinitions;e.valueFormatter===s.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===s.valueParser&&!this.hasObjectValueParser&&t("Parser")}}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,s,o){const i=this.formatValueFuncs[t];switch(s.baseDataType){case"number":{e.cellEditor="agNumberCellEditor";break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.getFindText=()=>null,e.suppressKeyboardEvent=n=>!!n.colDef.editable&&n.event.key===D.SPACE;break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=i;break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=i;break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=(n,r)=>{const l=this.colModel.getColDefCol(o),a=l?.getColDef();if(!l||!a)return 0;const d=n==null?"":i({column:l,node:null,value:n}),c=r==null?"":i({column:l,node:null,value:r});return d===c?0:d>c?1:-1},e.keyCreator=i;break}}this.beans.filterManager?.setColDefPropertiesForDataType(e,s,i)}getDefaultDataTypes(){const e=s=>!!s.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:s=>s.newValue?.trim?.()===""?null:Number(s.newValue),valueFormatter:s=>s.value==null?"":typeof s.value!="number"||isNaN(s.value)?t("invalidNumber","Invalid Number"):String(s.value),dataTypeMatcher:s=>typeof s=="number"},text:{baseDataType:"text",valueParser:s=>s.newValue===""?null:ao(s.newValue),dataTypeMatcher:s=>typeof s=="string"},boolean:{baseDataType:"boolean",valueParser:s=>s.newValue==null?s.newValue:s.newValue?.trim?.()===""?null:String(s.newValue).toLowerCase()==="true",valueFormatter:s=>s.value==null?"":String(s.value),dataTypeMatcher:s=>typeof s=="boolean"},date:{baseDataType:"date",valueParser:s=>nm(s.newValue==null?null:String(s.newValue)),valueFormatter:s=>s.value==null?"":!(s.value instanceof Date)||isNaN(s.value.getTime())?t("invalidDate","Invalid Date"):im(s.value,!1)??"",dataTypeMatcher:s=>s instanceof Date},dateString:{baseDataType:"dateString",dateParser:s=>nm(s)??void 0,dateFormatter:s=>im(s??null,!1)??void 0,valueParser:s=>e(String(s.newValue))?s.newValue:null,valueFormatter:s=>e(String(s.value))?s.value:"",dataTypeMatcher:s=>typeof s=="string"&&e(s)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:s=>ao(s.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function bm(e,t){const s={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(s.columnTypes=[...Al(e.columnTypes),...Al(t.columnTypes)]),s}function Sm(e,t,s){return t?t.baseDataType!==e.baseDataType?(I(46),!1):!0:(I(45,{parentCellDataType:s}),!1)}function Rm(e,t){if(e.valueFormatter)return s=>{if(s.node?.group){const o=(s.colDef.pivotValueColumn??s.column).getAggFunc();if(o){if(o==="first"||o==="last")return e.valueFormatter(s);if(e.baseDataType==="number"&&o!=="count"){if(typeof s.value=="number")return e.valueFormatter(s);if(typeof s.value=="object"){if(!s.value)return;if("toNumber"in s.value)return e.valueFormatter({...s,value:s.value.toNumber()});if("value"in s.value)return e.valueFormatter({...s,value:s.value.value})}}return}if(t.get("groupDisplayType")==="groupRows"&&!t.get("treeData"))return}else if(t.get("groupHideOpenParents")&&s.column.isRowGroupActive()&&typeof s.value=="string"&&!e.dataTypeMatcher?.(s.value))return;return e.valueFormatter(s)}}function FM(e,t,s,o){if(!t[s])return!1;const i=e[s];return i===null?(t[s]=!1,!1):o===void 0?!!i:i===o}function _c(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([s,o])=>FM(e,t,s,o))}function DM(e,t){const s=pf(e);return t.forEach(o=>{delete s[o],o==="rowGroup"?delete s.rowGroupIndex:o==="pivot"&&delete s.pivotIndex}),s}var EM={moduleName:"DataType",version:Ce,beans:[xM],dependsOn:[eM]},MM={moduleName:"ColumnFlex",version:Ce,beans:[RM]},AM={moduleName:"ColumnApi",version:Ce,beans:[SM],apiFunctions:{getColumnDef:tM,getDisplayNameForColumn:oM,getColumn:iM,getColumns:nM,applyColumnState:rM,getColumnState:lM,resetColumnState:aM,isPinning:dM,isPinningLeft:cM,isPinningRight:uM,getDisplayedColAfter:hM,getDisplayedColBefore:pM,setColumnsVisible:gM,setColumnsPinned:fM,getAllGridColumns:mM,getDisplayedLeftColumns:CM,getDisplayedCenterColumns:vM,getDisplayedRightColumns:wM,getAllDisplayedColumns:yM,getAllDisplayedVirtualColumns:bM,getColumnDefs:sM}};function PM(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,s=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(s,"$1 $2$3").replace(/\./g," ").split(" ").map(i=>i.substring(0,1).toUpperCase()+(i.length>1?i.substring(1,i.length):"")).join(" ")}var IM=class extends F{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,s=!1){if(!e)return null;const o=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:i}=this.beans;return s&&i?i.getHeaderName(e,o):o}getDisplayNameForProvidedColumnGroup(e,t,s){const o=t?.getColGroupDef();return o?this.getHeaderName(o,null,e,t,s):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,s,o,i){const n=e.headerValueGetter;if(n){const r=he(this.gos,{colDef:e,column:t,columnGroup:s,providedColumnGroup:o,location:i});return typeof n=="function"?n(r):typeof n=="string"?this.beans.expressionSvc?.evaluate(n,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return PM(e.field)}return""}},TM=class extends F{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,s=!1){const{visibleCols:o}=this,i=o.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!i)){if(this.scrollWidth=e,this.scrollPosition=t,o.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=o.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(s)}}getHeadersToRender(e,t){let s;switch(e){case"left":s=this.rowsOfHeadersToRenderLeft[t];break;case"right":s=this.rowsOfHeadersToRenderRight[t];break;default:s=this.rowsOfHeadersToRenderCenter[t];break}return s||[]}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(e){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},e||(this.colsWithinViewportHash="")}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||LM(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,s=t+e.getActualWidth(),o=this.viewportLeft-200,i=this.viewportRight+200,n=t<o&&s<o,r=t>i&&s>i;return!n&&!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=n=>{const r=n.getLeft();return j(r)&&r>this.viewportLeft},s=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:o}=this,i=o.centerCols;return o.getColsForRow(e,i,s,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){this.clear(!0);const e={},{leftCols:t,rightCols:s,treeLeft:o,treeRight:i,treeCenter:n}=this.visibleCols;this.headerColsWithinViewport.concat(t).concat(s).forEach(a=>e[a.getId()]=!0);const l=(a,d,c)=>{let u=!1;for(let h=0;h<a.length;h++){const p=a[h];let g=!1;if(Ns(p))g=e[p.getId()]===!0;else{const m=p.getDisplayedChildren();m&&(g=l(m,d,c+1))}g&&(u=!0,d[c]||(d[c]=[]),d[c].push(p))}return u};l(o,this.rowsOfHeadersToRenderLeft,0),l(i,this.rowsOfHeadersToRenderRight,0),l(n,this.rowsOfHeadersToRenderCenter,0)}extractViewport(){const e=o=>`${o.getId()}-${o.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),s=this.colsWithinViewportHash!==t;return s&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),s}};function LM(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var kM=class extends F{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class s{refresh(){return!1}getGui(){return this.eGui}init(i){const n=t(i),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=vl("<span>"+n+"</span>");return}if(n==null){this.eGui=Ne({tag:"span"});return}this.eGui=n}}return s}},OM={moduleName:"CellRendererFunction",version:Ce,beans:[kM]},GM=class extends F{constructor(){super(...arguments),this.beanName="registry",this.agGridDefaults={},this.agGridDefaultParams={},this.jsComps={},this.dynamicBeans={},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:s,dynamicBeans:o,selectors:i}=e;if(s){const n=(r,l,a)=>{this.agGridDefaults[r]=l,a&&(this.agGridDefaultParams[r]=a)};for(const r of Object.keys(s)){const l=s[r];typeof l=="object"?n(r,l.classImp,l.params):n(r,l)}}if(o)for(const n of Object.keys(o))this.dynamicBeans[n]=o[n];if(i?.forEach(n=>{this.selectors[n.selector]=n}),t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const s=(l,a,d)=>({componentFromFramework:a,component:l,params:d}),{frameworkOverrides:o}=this.beans,i=o.frameworkComponent(t,this.gos.get("components"));if(i!=null)return s(i,!0);const n=this.jsComps[t];if(n){const l=o.isFrameworkComponent(n);return s(n,l)}const r=this.agGridDefaults[t];return r?s(r,!1,this.agGridDefaultParams[t]):(this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null)}createDynamicBean(e,t,...s){const o=this.dynamicBeans[e];if(o==null){if(t)throw new Error(Do(256));return}return new o(...s)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}},NM=23,_M=class extends F{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(e=>e(this.params)),this.readyCallbacks.length=0)},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===NM&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const s=this.readyCallbacks.indexOf(t);s>=0&&this.readyCallbacks.splice(s,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:s}=this.params;return[e,s,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}},BM=':where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.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(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.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-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.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-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,.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{border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom,.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-floating-bottom{border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-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}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}: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-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%}: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-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{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.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-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%{opacity:1}50%{opacity:.4}to{opacity:1}}.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-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-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-chart,.ag-dnd-ghost,.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}.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-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.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-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.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)}.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}: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-column-select-column-group-readonly,.ag-column-select-column-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.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-accent-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}.ag-menu,.ag-resizer{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-resizer{pointer-events: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}}',Bc=typeof window!="object"||!window?.document?.fonts?.forEach,Hc=new WeakMap,Xi=(e,t,s,o,i,n)=>{if(Bc)return;o&&(e=`@layer ${CSS.escape(o)} { ${e} }`);let r=Hc.get(t);if(r||(r=[],Hc.set(t,r)),r.find(c=>c.css===e))return;const l=document.createElement("style");n&&l.setAttribute("nonce",n),l.dataset.agGlobalCss=s,l.textContent=e;const a={css:e,el:l,priority:i};let d;for(const c of r){if(c.priority>i)break;d=c}if(d){d.el.insertAdjacentElement("afterend",l);const c=r.indexOf(d);r.splice(c+1,0,a)}else t.insertBefore(l,t.querySelector(":not(title, meta)")),r.push(a)},xm=(e,t,s)=>{Xi(BM,e,"core",t,0,s),Array.from(Fx()).sort((o,i)=>o.moduleName.localeCompare(i.moduleName)).forEach(o=>o.css?.forEach(i=>Xi(i,e,`module-${o.moduleName}`,t,0,s)))},Vc=new Set,HM=e=>{Vc.add(e)},VM=e=>{if(Vc.delete(e),Vc.size===0){Hc=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},po=e=>new Fm(e),Io="$default",WM=0,Fm=class{constructor({feature:e,params:t,modeParams:s={},css:o,cssImports:i}){this.feature=e,this.css=o,this.cssImports=i,this.modeParams={[Io]:{...s[Io]??{},...t??{}},...s}}use(e,t,s){let o=this._inject;if(o==null){let{css:i}=this;if(i){const n=`ag-theme-${this.feature??"part"}-${++WM}`;typeof i=="function"&&(i=i()),i=`:where(.${n}) {
41
+ ${i}
42
+ }
43
+ `;for(const r of this.cssImports??[])i=`@import url(${JSON.stringify(r)});
44
+ ${i}`;o={css:i,class:n}}else o=!1;this._inject=o}return o&&e&&Xi(o.css,e,o.class,t,1,s),o?o.class:!1}},zM=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),Dm=e=>`--ag-${zM(e)}`,Vs=e=>`var(${Dm(e)})`,UM=(e,t,s)=>Math.max(t,Math.min(s,e)),$M=e=>{const t=new Map;return s=>{const o=s;return t.has(o)||t.set(o,e(s)),t.get(o)}},Ws=e=>({ref:"accentColor",mix:e}),rs=e=>({ref:"foregroundColor",mix:e}),Ss=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),jM=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),qt={ref:"backgroundColor"},lr={ref:"foregroundColor"},To={ref:"accentColor"},ea={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:rs(.15),chromeBackgroundColor:Ss(.02),browserColorScheme:"light"},KM={...ea,textColor:lr,accentColor:"#2196f3",invalidColor:"#e02525",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:qt,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],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"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:To,rangeSelectionBackgroundColor:Ws(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Ws(.5),rangeHeaderHighlightColor:jM(.08),rowNumbersSelectedColor:Ws(.5),rowHoverColor:Ws(.08),columnHoverColor:Ws(.05),selectedRowBackgroundColor:Ws(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:qt,borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},dragAndDropImageBackgroundColor:qt,dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:rs(.7),focusShadow:{spread:3,color:Ws(.5)},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"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},iconSize:16,iconColor:"inherit",iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:rs(.1),iconButtonActiveColor:To,iconButtonActiveBackgroundColor:Ws(.28),iconButtonActiveIndicatorColor:To,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:To,toggleButtonOffBackgroundColor:Ss(.3),toggleButtonSwitchBackgroundColor:qt,toggleButtonSwitchInset:2,menuBorder:{color:rs(.2)},menuBackgroundColor:Ss(.03),menuTextColor:Ss(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:rs(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:To},cellEditingShadow:{ref:"cardShadow"},dialogBorder:{color:rs(.2)},panelBackgroundColor:qt,panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipTextColor:{ref:"textColor"},tooltipBorder:!0,columnDropCellBackgroundColor:rs(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:rs(.13)},selectCellBackgroundColor:rs(.07),selectCellBorder:{color:rs(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",findMatchColor:lr,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:lr,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:rs(.15),statusBarLabelColor:lr,statusBarLabelFontWeight:500,statusBarValueColor:lr,statusBarValueFontWeight:500},YM=":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)}}",qM={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"}},XM=()=>po({feature:"buttonStyle",params:{...qM,buttonBackgroundColor:qt,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:To}},css:YM}),QM=XM(),ZM=".ag-column-drop-vertical-empty-message{align-items:center;border:1px dashed;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}",JM=()=>po({feature:"columnDropStyle",css:ZM}),Em=JM(),e0=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],t0=$M(e=>(e=e.toLowerCase(),e0.find(t=>e.endsWith(t.toLowerCase()))??"length")),ta=e=>typeof e=="object"&&e?.ref?Vs(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,Wc=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){const t=Vs(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?Vs(e.onto):"transparent"}, ${t} ${UM(e.mix*100,0,100)}%)`}return!1},s0=ta,Qi=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,s=>s[0]==="-"?s:` ${Vs(s)} `)})`:e&&"ref"in e?Vs(e.ref):!1,o0=ta,i0=(e,t)=>typeof e=="string"?e:e===!0?"solid 1px var(--ag-border-color)":e===!1?t==="columnBorder"?"solid 1px transparent":"none":e&&"ref"in e?Vs(e.ref):Mm(e.style??"solid")+" "+Qi(e.width??1)+" "+Wc(e.color??{ref:"borderColor"}),n0=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?Vs(e.ref):[Qi(e.offsetX??0),Qi(e.offsetY??0),Qi(e.radius??0),Qi(e.spread??0),Wc(e.color??{ref:"foregroundColor"})].join(" "),Mm=ta,Am=e=>typeof e=="string"?e.includes(",")?e:Pm(e):e&&"googleFont"in e?Am(e.googleFont):e&&"ref"in e?Vs(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),Pm(t))).join(", "):!1,Pm=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),r0=ta,Im=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?Im({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?Vs(e.ref):!1,l0=(e,t)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&ue(104,{value:e,param:t}),`${e}s`):e&&"ref"in e?Vs(e.ref):!1,a0={color:Wc,colorScheme:s0,length:Qi,scale:o0,border:i0,borderStyle:Mm,shadow:n0,image:Im,fontFamily:Am,fontWeight:r0,duration:l0},d0=(e,t)=>{const s=t0(e);return a0[s](t,e)},c0=()=>new Tm().withPart(QM).withPart(Em),Tm=class lv{constructor(t=[]){this.parts=t}withPart(t){return typeof t=="function"&&(t=t()),t instanceof Fm?new lv([...this.parts,t]):(Ud(259,{part:t},"Invalid part"),this)}withoutPart(t){return this.withPart(po({feature:t}))}withParams(t,s=Io){return this.withPart(po({modeParams:{[s]:t}}))}_startUse({styleContainer:t,cssLayer:s,nonce:o,loadThemeGoogleFonts:i}){if(Bc)return;h0(),xm(t,s,o);const n=u0(this);if(n.length>0)for(const r of n)i&&g0(r,o);for(const r of this.parts)r.use(t,s,o)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=Lm(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const s={[Io]:{...KM}};for(const o of Lm(this.parts))for(const i of Object.keys(o.modeParams)){const n=o.modeParams[i];if(n){const r=s[i]??(s[i]={}),l=new Set;for(const a of Object.keys(n)){const d=n[a];d!==void 0&&(r[a]=d,l.add(a))}if(i===Io)for(const a of Object.keys(s)){const d=s[a];if(a!==Io)for(const c of l)delete d[c]}}}this._paramsCache=t=s}return t}_getPerGridCss(t){const s="##SELECTOR##";let o=this._paramsCssCache;if(!o){let i="",n="";const r=this._getModeParams();for(const a of Object.keys(r)){const d=r[a];if(a!==Io){const u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(a):a}"]) & {
45
+ `;i+=u,n+=u}for(const c of Object.keys(d).sort()){const u=d[c],h=d0(c,u);if(h===!1)ue(107,{key:c,value:u});else{const p=Dm(c),g=p.replace("--ag-","--ag-inherited-");i+=` ${p}: var(${g}, ${h});
46
+ `,n+=` ${g}: var(${p});
47
+ `}}a!==Io&&(i+=`}
48
+ `,n+=`}
49
+ `)}let l=`${s} {
50
+ ${i}}
51
+ `;l+=`:has(> ${s}):not(${s}) {
52
+ ${n}}
53
+ `,this._paramsCssCache=o=l}return o.replaceAll(s,`:where(.${t})`)}},Lm=e=>{const t=new Map;for(const o of e)t.set(o.feature,o);const s=[];for(const o of e)(!o.feature||t.get(o.feature)===o)&&s.push(o);return s},u0=e=>{const t=new Set,s=n=>{if(Array.isArray(n))n.forEach(s);else{const r=n?.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(s),Array.from(t).sort()},km=!1,h0=()=>{if(!km){km=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},p0=new Set,g0=async(e,t)=>{p0.add(e);const s=`@import url('https://${f0}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
54
+ `;Xi(s,document.head,`googleFont:${e}`,void 0,0,t)},f0="fonts.googleapis.com",m0='.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-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)}}',C0=()=>po({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:qt,checkboxUncheckedBorderColor:Ss(.3),checkboxCheckedBackgroundColor:To,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:qt,checkboxIndeterminateBackgroundColor:Ss(.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:qt,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:m0}),v0=C0(),Om=()=>({...ea,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Ss(.05),rowHoverColor:Ws(.15),selectedRowBackgroundColor:Ws(.2),menuBackgroundColor:Ss(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",findMatchColor:qt,findActiveMatchColor:qt,checkboxUncheckedBorderColor:Ss(.4),toggleButtonOffBackgroundColor:Ss(.4)}),w0=()=>({...Om(),backgroundColor:"#1f2836"}),y0=()=>po({feature:"colorScheme",params:ea,modeParams:{light:ea,dark:Om(),"dark-blue":w0()}}),b0=y0(),Gm={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"/>'},Nm={"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>'},S0=(e={})=>{let t="";for(const s of[...Object.keys(Gm),...Object.keys(Nm)]){const o=R0(s,e.strokeWidth);t+=`.ag-icon-${s}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(o)}'); }
55
+ `}return t},R0=(e,t=1.5)=>{const s=Nm[e];if(s)return s;const o=Gm[e];if(!o)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>`+o+"</svg>"},x0=(e={})=>po({feature:"iconSet",css:()=>S0(e)}),F0=x0(),D0=':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}}:where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){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) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){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-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-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-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)}}',E0=":where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){&:focus{box-shadow:var(--ag-focus-shadow)}}",M0={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"}},A0=()=>po({feature:"inputStyle",params:{...M0,inputBackgroundColor:qt,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:To},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Ss(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>D0+E0}),P0=A0(),I0='.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:1px solid var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:1px solid 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)}}}',T0={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:1,tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},L0=()=>po({feature:"tabStyle",params:{...T0,tabBarBorder:!0,tabBarBackgroundColor:rs(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:qt},css:I0}),k0=L0(),O0=()=>c0().withPart(v0).withPart(b0).withPart(F0).withPart(k0).withPart(P0).withPart(Em).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),_m=O0(),G0={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},N0={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},_0={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},Bm={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},Hm={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},Vm={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},zc={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},B0=0,H0=class extends F{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.paramsClass=`ag-theme-params-${++B0}`,this.globalCSS=[]}wireBeans(e){const{eGridDiv:t,gridOptions:s}=e;this.eGridDiv=t,this.eStyleContainer=s.themeStyleContainer??(t.getRootNode()===document?document.head:t),this.cssLayer=s.themeCssLayer,this.styleNonce=s.styleNonce}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(Bm),this.getSizeEl(Hm),this.getSizeEl(Vm),this.getSizeEl(zc),this.refreshRowBorderWidthVariable(),this.addDestroyFunc(()=>VM(this)),this.mutationObserver=new MutationObserver(()=>{this.fireGridStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}getDefaultRowHeight(){return this.getCSSVariablePixelValue(Bm)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(Hm)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(G0)}getDefaultIndentation(){return this.getCSSVariablePixelValue(N0)}getDefaultRowGroupIndentSize(){return this.getCSSVariablePixelValue(_0)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getDefaultIndentation(),s=this.getDefaultRowGroupIndentSize();return e-1+s*t}getCellPaddingRight(){return this.getDefaultCellHorizontalPadding()-1}getCellPadding(){return this.getCellPaddingLeft()+this.getCellPaddingRight()}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(Vm)}getRowBorderWidth(){return this.getCSSVariablePixelValue(zc)}applyThemeClasses(e){const{gridTheme:t}=this;let s="";if(t)s=`${this.paramsClass} ${t._getCssClass()}`;else{this.mutationObserver.disconnect();let o=this.eGridDiv;for(;o;){let i=!1;for(const n of Array.from(o.classList))n.startsWith("ag-theme-")&&(i=!0,s=s?`${s} ${n}`:n);i&&this.mutationObserver.observe(o,{attributes:!0,attributeFilter:["class"]}),o=o.parentElement}}for(const o of Array.from(e.classList))o.startsWith("ag-theme-")&&e.classList.remove(o);if(s){const o=e.className;e.className=o+(o?" ":"")+s}}refreshRowHeightVariable(){const{eGridDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),s=this.gos.get("rowHeight");if(s==null||isNaN(s)||!isFinite(s))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const o=`${s}px`;return t!=o?(e.style.setProperty("--ag-line-height",o),s):t!=""?parseFloat(t):-1}addGlobalCSS(e,t){this.gridTheme?Xi(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const s=this.measureSizeEl(e);return s==="detached"||s==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,s),s)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const s=t.offsetWidth;return s===Uc?"no-styles":(this.sizesMeasured=!0,s)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Ne({tag:"div",cls:"ag-measurement-container"}),this.eGridDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const s=this.getMeasurementContainer();t=Ne({tag:"div"});const{border:o,noWarn:i}=e;o?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${Uc}px)`)):t.style.width=`var(${e.cssName}, ${Uc}px)`,s.appendChild(t),this.sizeEls.set(e,t);let n=this.measureSizeEl(e);n==="no-styles"&&!i&&I(9,{variable:e});const r=Fo(this.beans,t,()=>{const l=this.measureSizeEl(e);l==="detached"||l==="no-styles"||(this.lastKnownValues.set(e,l),l!==n&&(n=l,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireGridStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(zc);this.eGridDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}handleThemeGridOptionChange(){const{gos:e,eGridDiv:t,globalCSS:s,gridTheme:o}=this,i=e.get("theme");let n;if(i==="legacy")n=void 0;else{const r=i??_m;r instanceof Tm?n=r:ue(240,{theme:r})}if(n!==o){if(n){HM(this),xm(this.eStyleContainer,this.cssLayer,this.styleNonce);for(const[l,a]of s)Xi(l,this.eStyleContainer,a,this.cssLayer,0,this.styleNonce);s.length=0}this.gridTheme=n,n?._startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce});let r=this.eParamsStyle;if(!r){r=this.eParamsStyle=Ne({tag:"style"});const l=this.gos.get("styleNonce");l&&r.setAttribute("nonce",l),t.appendChild(r)}Bc||(r.textContent=n?._getPerGridCss(this.paramsClass)||""),this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged")}n&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&ue(i?106:239)}},Uc=15538,V0=class extends F{constructor(){super(...arguments),this.beanName="eventSvc",this.globalEventService=new ro}postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}addEventListener(e,t,s){this.globalEventService.addEventListener(e,t,s)}removeEventListener(e,t,s){this.globalEventService.removeEventListener(e,t,s)}addGlobalListener(e,t=!1){this.globalEventService.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalEventService.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalEventService.dispatchEvent(he(this.gos,e))}dispatchEventOnce(e){this.globalEventService.dispatchEventOnce(he(this.gos,e))}};function Wm(e){return e?e.getLeafColumns().some(t=>t.isSpanHeaderHeight()):!1}function $c(e,t){let s;if(Ye(e)&&Wm(e)&&e.isPadding()){const o=e;s=o.getLeafColumns()[0];let i=s;for(;i!==o;)t++,i=i.getParent()}return{column:s||e,headerRowIndex:t}}var W0=class extends F{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,s=>{this.gridBodyCon=s.gridBodyCtrl});const t=Xe(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let s;const{colModel:o,colGroupSvc:i,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(s=o.getCol(e),s||(s=i?.getColumnGroup(e)??null)):s=e,!s)return null;const l=n.getHeaderRowContainerCtrl()?.getAllCtrls(),a=Re(l||[]).type==="filter",d=Bs(this.beans)-1;let c=-1,u=s;for(;u;)c++,u=u.getParent();let h=c;return t&&a&&h===d-1&&h++,h===-1?null:{headerRowIndex:h,column:s}}navigateVertically(e,t,s){const o=this.beans.focusSvc;if(t||(t=o.focusedHeader),!t)return!1;const{headerRowIndex:i}=t,n=t.column,r=Bs(this.beans),l=e==="UP",a=this.getHeaderRowType(i);let{headerRowIndex:d,column:c,headerRowIndexWithoutSpan:u}=l?z0(a,n,i):U0(a,n,i),h=!1;return d<0&&(d=0,c=n,h=!0),d>=r?(d=-1,this.currentHeaderRowWithoutSpan=-1):u!==void 0&&(this.currentHeaderRowWithoutSpan=u),!h&&!c?!1:o.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:c},allowUserOverride:!0,event:s})}navigateHorizontally(e,t=!1,s){const{focusSvc:o,gos:i}=this.beans,n=o.focusedHeader;let r,l;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==i.get("enableRtl")?(l="Before",r=this.findHeader(n,l)):(l="After",r=this.findHeader(n,l));const a=i.getCallback("tabToNextHeader");if(t&&a){const d=o.focusHeaderPositionFromUserFunc({userFunc:a,headerPosition:r,direction:l});if(d){const{headerRowIndex:c}=o.focusedHeader||{};c!=null&&c!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return r||!t?o.focusHeaderPosition({headerPosition:r,direction:l,fromTab:t,allowUserOverride:!0,event:s}):this.focusNextHeaderRow(n,l,s)}focusNextHeaderRow(e,t,s){const o=e.headerRowIndex;let i=null,n;const r=this.beans;if(t==="Before"?o>0&&(n=o-1,this.currentHeaderRowWithoutSpan-=1,i=this.findColAtEdgeForHeaderRow(n,"end")):(n=o+1,this.currentHeaderRowWithoutSpan<Bs(r)?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1,i=this.findColAtEdgeForHeaderRow(n,"start")),!i)return!1;const{column:l,headerRowIndex:a}=$c(i.column,i?.headerRowIndex);return r.focusSvc.focusHeaderPosition({headerPosition:{column:l,headerRowIndex:a},direction:t,fromTab:!0,allowUserOverride:!0,event:s})}scrollToColumn(e,t="After"){if(e.getPinned())return;let s;if(Ye(e)){const o=e.getDisplayedLeafColumns();s=t==="Before"?Re(o):o[0]}else s=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(s)}findHeader(e,t){let s,o;const{colGroupSvc:i,visibleCols:n}=this.beans;if(Ye(e.column)?s=i?.getGroupAtDirection(e.column,t)??void 0:(o=`getCol${t}`,s=n[o](e.column)),!s)return;const{headerRowIndex:r}=e;if(this.getHeaderRowType(r)!=="filter"){const d=[s];for(;s.getParent();)s=s.getParent(),d.push(s);s=d[Math.max(0,d.length-1-r)]}const{column:l,headerRowIndex:a}=$c(s,r);return{column:l,headerRowIndex:a}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const{visibleCols:s,ctrlsSvc:o,colGroupSvc:i}=this.beans,n=s.allCols,r=n[t==="start"?0:n.length-1];if(!r)return;const a=o.getHeaderRowContainerCtrl(r.getPinned())?.getRowType(e);if(a=="group"){const d=i?.getColGroupAtLevel(r,e);return{headerRowIndex:e,column:d}}return{headerRowIndex:a==null?-1:e,column:r}}};function z0(e,t,s){const o=e==="filter",i=e==="column";let n=o?t:t.getParent(),r=s-1,l=r;if(i&&Wm(t.getParent())){for(;n&&n.isPadding();)n=n.getParent(),r--;l=r,r<0&&(n=t,r=s,l=void 0)}return{column:n,headerRowIndex:r,headerRowIndexWithoutSpan:l}}function U0(e,t,s,o="After"){let i=t,n=s+1;const r=n;if(e==="group"){const l=t.getDisplayedLeafColumns(),a=o==="After"?l[0]:Re(l),d=[];let c=a;for(;c.getParent()!==t;)c=c.getParent(),d.push(c);if(i=a,a.isSpanHeaderHeight())for(let u=d.length-1;u>=0;u--){const h=d[u];if(!h.isPadding()){i=h;break}n++}else i=Re(d),i||(i=a)}return{column:i,headerRowIndex:n,headerRowIndexWithoutSpan:r}}var $0=class extends F{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(Ox(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(Be(this.beans),Zf)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=Be(this.beans);return this.isDomDataPresentInHierarchy(e,Nl)?!0:this.isDomDataPresentInHierarchy(e,zl)}isDomDataPresentInHierarchy(e,t){let s=e;for(;s;){if(Gg(this.gos,s,t))return!0;s=s.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:s,column:o}=e,i={rowIndex:t,rowPinned:s,column:o,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:s});return n&&(i.isFullWidthCell=n.isFullWidth()),i}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:s,rowPinned:o,forceBrowserFocus:i=!1,preventScrollOnBrowserFocus:n=!1}=e,r=this.colModel.getCol(t);if(!r){this.focusedCell=null;return}this.focusedCell={rowIndex:s,rowPinned:kt(o),column:r},this.eventSvc.dispatchEvent({type:"cellFocused",...this.getFocusEventParams(this.focusedCell),forceBrowserFocus:i,preventScrollOnBrowserFocus:n})}isCellFocused(e){return this.focusedCell==null?!1:Jx(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:s,pinned:o}}=e,{column:i,headerRowIndex:n}=this.focusedHeader;return t===i&&s===n&&o==i.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),ai(this.beans))return!1;const{direction:t,fromTab:s,allowUserOverride:o,event:i,fromCell:n,rowWithoutSpanValue:r}=e;let{headerPosition:l}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(l);if(o){const a=this.focusedHeader,d=Bs(this.beans);if(s){const c=this.gos.getCallback("tabToNextHeader");c&&(l=this.getHeaderPositionFromUserFunc({userFunc:c,direction:t,currentPosition:a,headerPosition:l,headerRowCount:d}))}else{const c=this.gos.getCallback("navigateToNextHeader");if(c&&i){const u={key:i.key,previousHeaderPosition:a,nextHeaderPosition:l,headerRowCount:d,event:i};l=c(u)}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:i,fromCell:n,rowWithoutSpanValue:r}):!1}focusHeaderPositionFromUserFunc(e){if(ai(this.beans))return!1;const{userFunc:t,headerPosition:s,direction:o,event:i}=e,n=this.focusedHeader,r=Bs(this.beans),l=this.getHeaderPositionFromUserFunc({userFunc:t,direction:o,currentPosition:n,headerPosition:s,headerRowCount:r});return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:o,event:i})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:s,currentPosition:o,headerPosition:i,headerRowCount:n}=e,l=t({backwards:s==="Before",previousHeaderPosition:o,nextHeaderPosition:i,headerRowCount:n});return l===!0?o:l===!1?null:l}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:s,fromCell:o,rowWithoutSpanValue:i,event:n}=e,{column:r,headerRowIndex:l}=t,{filterManager:a,ctrlsSvc:d,headerNavigation:c}=this.beans;if(l===-1)return a?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:r,event:n});c?.scrollToColumn(r,s);const h=d.getHeaderRowContainerCtrl(r.getPinned())?.focusHeader(t.headerRowIndex,r,n)||!1;return c&&h&&(i!=null||o)&&(c.currentHeaderRowWithoutSpan=i??-1),h}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;const{colGroupSvc:t}=this.beans;t&&e.getParent()&&(e=t.getColGroupAtLevel(e,0));const s=$c(e,0);return this.focusHeaderPosition({headerPosition:s,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const t=Bs(this.beans)-1,s=Re(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:s},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.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===kt(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&ys(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:s=!0,event:o}=e;if(this.overlays?.isExclusive())return s&&this.focusOverlay(t);if(hc(this.beans))return t&&!ai(this.beans)?this.focusLastHeader():s&&this.focusOverlay(t)?!0:t?!1:$i(this.beans,t);const i=t?sF(this.beans):tF(this.beans);if(i){const n=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:l}=i,a=pc(this.beans,i);if(!n||!a||r==null)return!1;if(n.isSuppressNavigable(a)){const d=this.gos.get("enableRtl");let c;return!o||o.key===D.TAB?c=d?D.LEFT:D.RIGHT:c=o.key,this.beans.navigation?.navigateToNextCell(null,c,{rowIndex:r,column:n,rowPinned:l||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:r,column:n,rowPinned:l}),t&&this.rowRenderer.getRowByPosition(i)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(i,t)||(this.setFocusedCell({rowIndex:r,column:n,rowPinned:kt(l),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:l,column:n})),!0}return!!(s&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const s=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:s,headerRowIndex:Bs(this.beans)-1}}):this.focusGridView({column:s})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},j0=class extends F{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.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(),s=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==s)&&(this.horizontalScrollGap=t,this.verticalScrollGap=s,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"),s=typeof e=="number"&&e>=0?e:_S();s!=null&&(this.scrollbarWidth=s,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},K0=class extends F{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:s}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),s.destroy(),super.destroy()}},zm=new Set(["gridPreDestroyed","fillStart","pasteStart"]),Y0={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,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},q0=0,X0=0,Q0=class extends F{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.gridInstanceId=X0++,this.propEventSvc=new ro,this.globalEventHandlerFactory=e=>(t,s)=>{if(!this.isAlive())return;const o=zm.has(t);if(o&&!e||!o&&e)return;const i=ec(t),n=this.gridOptions[i];typeof n=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{n(s)})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){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:"gridOptionsUpdated"})}})}get(e){return this.gridOptions[e]??Y0[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return j(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(s=>e(this.addGridCommonParams(s)))}updateGridOptions({options:e,force:t,source:s="api"}){const o={id:q0++,properties:[]},i=[],{gridOptions:n,validation:r}=this;for(const l of Object.keys(e)){const a=e[l];r?.warnOnInitialPropertyUpdate(s,l);const d=t||typeof a=="object"&&s==="api",c=n[l];if(d||c!==a){n[l]=a;const u={type:l,currentValue:a,previousValue:c,changeSet:o,source:s};i.push(u)}}r?.processGridOptions(this.gridOptions),o.properties=i.map(l=>l.type),i.forEach(l=>{Kn(this,`Updated property ${l.type} from`,l.previousValue," to ",l.currentValue),this.propEventSvc.dispatchEvent(l)})}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addGridCommonParams(e){return e.api=this.api,e.context=this.gridOptionsContext,e}assertModuleRegistered(e,t){const s=Array.isArray(e)?e.some(o=>this.isModuleRegistered(o)):this.isModuleRegistered(e);return s||ue(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),s}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:dc(),rowModelType:this.get("rowModelType"),isUmd:Dx()}}isModuleRegistered(e){return yf(e,this.gridId,this.get("rowModelType"))}};function Um(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 Z0=Um(!0),J0=Um(!1),eA=class extends ve{constructor(){super(...arguments),this.eFilter=k,this.eFilterButton=k,this.eSortIndicator=k,this.eMenu=k,this.eLabel=k,this.eText=k,this.eSortOrder=k,this.eSortAsc=k,this.eSortDesc=k,this.eSortMixed=k,this.eSortNone=k,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.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 s={...e};gt(s,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(s)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const s=e.template;return s?s?.trim?s.trim():s:t?Z0:J0}init(e){this.params=e;const{sortSvc:t,touchSvc:s,rowNumbersSvc:o,userCompFactory:i}=this.beans,n=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),s?.setupForHeader(this),this.setMenu(),this.setupSort(),o?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(i,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const s=rx(e,t,t);s&&(this.isLoadingInnerComponent=!0,s.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderComponent=o,this.eText.appendChild(o.getGui())):this.destroyBean(o))}))}setDisplayName(e){const{displayName:t}=e,s=this.currentDisplayName;if(this.currentDisplayName=t,s===t||this.innerHeaderComponent||this.isLoadingInnerComponent)return;const o=ws(t,!0);this.eText.textContent=o}addInIcon(e,t,s){if(t==null)return;const o=pe(e,this.beans,s);o&&t.appendChild(o)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){lo(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:s}=this,o=rt(e);this.addInIcon(o?"menu":"menuAlt",t,s.column),t.classList.toggle("ag-header-menu-icon",!o);const i=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=i,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(i)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:s}=this;t||this.toggleMenuAlwaysShow(!0),s.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:s,beans:o,eMenu:i,eFilterButton:n}=this,r=t.column,l=rt(s);if(e&&!l){if(o.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??i??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(i??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:s}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:o,eSortOrder:i,eSortAsc:n,eSortDesc:r,eSortMixed:l,eSortNone:a}=this;o.attachCustomElements(i,n,r,l,a)}this.eSortIndicator.setupSort(s),this.currentSort&&e.setupHeader(this,s,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;e&&this.configureFilter(t.enableFilterIcon,e,this.onFilterChangedIcon.bind(this),"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,s,o){if(!e)return lo(t),!1;const i=this.params.column;return this.addInIcon(o,t,i),this.addManagedListeners(i,{filterChanged:s}),s(),!0}onFilterChangedIcon(){const e=this.params.column.isFilterActive();fe(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:s}=this;return e?t??s??this.getGui():s??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},tA={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"}]},sA=class extends ve{constructor(){super(tA),this.agOpened=k,this.agClosed=k,this.agLabel=k,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons()}checkWarnings(){this.params.template&&I(89)}workOutInnerHeaderGroupComponent(e,t){const s=ax(e,t,t);s&&(this.isLoadingInnerComponent=!0,s.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderGroupComponent=o,this.agLabel.appendChild(o.getGui())):this.destroyBean(o))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:s},beans:o}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const i=a=>{if(vs(a))return;const d=!s.isExpanded();o.colGroupSvc.setColumnGroupOpened(s.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(o,t,i),this.addTouchAndClickListeners(o,e,i);const n=a=>{co(a)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:i}),this.updateIconVisibility();const r=s.getProvidedColumnGroup(),l=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:l,expandableChanged:l})}addTouchAndClickListeners(e,t,s){e.touchSvc?.setupForHeaderGroup(this,t,s),this.addManagedElementListeners(t,{click:s})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:s}}=this;if(s.isExpandable()){const o=s.isExpanded();fe(e,o),fe(t,!o)}else fe(e,!1),fe(t,!1)}addInIcon(e,t){const s=pe(e,this.beans,null);s&&t.appendChild(s)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:s}=this;fe(t,!1),fe(s,!1);return}}setupLabel(e){const{displayName:t,columnGroup:s}=e,o=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;if(j(t)&&!o){const i=ws(t,!0);this.agLabel.textContent=i}this.addOrRemoveCssClass("ag-sticky-label",!s.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},oA={moduleName:"ColumnHeaderComp",version:Ce,userComponents:{agColumnHeader:eA},icons:{menu:"menu",menuAlt:"menu-alt"}},iA={moduleName:"ColumnGroupHeaderComp",version:Ce,userComponents:{agColumnGroupHeader:sA},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},nA=class extends F{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&&I(92)}createTask(e,t,s,o){this.verify();let i=s;o&&this.batchFrameworkComps&&(i="f1");const n={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[i],n),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((s,o)=>s.index!==o.index?t*(o.index-s.index):o.createOrder-s.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:s,f1:o,destroyTasks:i,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:l}=n,a=t.list,d=s.list,c=o.list,u=Date.now();let h=0;const p=e<=0,g=r.getScrollFeature();for(;p||h<e;){if(!g.scrollGridIfNeeded()){let m;if(a.length)this.sortTaskList(t),m=a.pop().task;else if(d.length)this.sortTaskList(s),m=d.pop().task;else if(c.length)l.wrapOutgoing(()=>{for(;(p||h<e)&&!g.scrollGridIfNeeded();){if(c.length)this.sortTaskList(o),m=c.pop().task,m();else break;h=Date.now()-u}}),m=()=>{};else if(i.length)m=i.pop();else break;m()}h=Date.now()-u}a.length||d.length||c.length||i.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);ms(this.beans,e)}isQueueEmpty(){return!this.ticking}},rA={moduleName:"AnimationFrame",version:Ce,beans:[nA]},lA=class extends F{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(!ki())return;const t=(s,o,i)=>{const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget(i?.target??null);r?.column&&r.dispatchCellContextMenuEvent(i??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,i,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!ki()||jg("dblclick"))return!1;const o=Date.now(),i=o-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=o,i})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:s}=this.beans;if(t.get("suppressTouch"))return;const{params:o,eMenu:i,eFilterButton:n}=e,r=new qi(e.getGui(),!0),l=e.shouldSuppressMenuHide(),a=l&&j(i),d=a?new qi(i,!0):r;if(o.enableMenu){const c=a?"tap":"longTap",u=h=>o.showColumnMenuAfterMouseClick(h.touchStart);e.addManagedListeners(d,{[c]:u})}if(o.enableSorting){const c=u=>{const h=u.touchStart.target;l&&(i?.contains(h)||n?.contains(h))||s?.progressSort(o.column,!1,"uiColumnSorted")};e.addManagedListeners(r,{tap:c})}if(o.enableFilterButton&&n){const c=new qi(n,!0);e.addManagedListeners(c,{tap:()=>o.showFilter(n)}),e.addDestroyFunc(()=>c.destroy())}e.addDestroyFunc(()=>r.destroy()),a&&e.addDestroyFunc(()=>d.destroy())}setupForHeaderGroup(e,t,s){const o=new qi(t,!0);e.addManagedListeners(o,{tap:s}),e.addDestroyFunc(()=>o.destroy())}mockContextMenu(e,t,s){if(!ki())return;const o=new qi(t),i=n=>{or(this.gos,n.touchEvent)&&s(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(o,{longTap:i}),e.addDestroyFunc(()=>o.destroy())}},aA={moduleName:"Touch",version:Ce,beans:[lA]},dA=class extends F{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,s=!1){return s?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const s=e===D.UP,o=e===D.DOWN,i=e===D.LEFT;let n,r;const{pageBounds:l,gos:a,visibleCols:d}=this.beans;if(s||o)r=s?l.getFirstRow():l.getLastRow(),n=t.column;else{const c=a.get("enableRtl");r=t.rowIndex,n=(i!==c?d.allCols:[...d.allCols].reverse()).find(h=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:h}))}return n?{rowIndex:r,rowPinned:null,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let s=t,o=!1;for(;!o;){switch(e){case D.UP:s=this.getCellAbove(s);break;case D.DOWN:s=this.getCellBelow(s);break;case D.RIGHT:s=this.gos.get("enableRtl")?this.getCellToLeft(s):this.getCellToRight(s);break;case D.LEFT:s=this.gos.get("enableRtl")?this.getCellToRight(s):this.getCellToLeft(s);break;default:s=null,I(8,{key:e});break}s?o=this.isCellGoodToFocusOn(s):o=!0}return s}isCellGoodToFocusOn(e){const t=e.column;let s;const{pinnedRowModel:o,rowModel:i}=this.beans;switch(e.rowPinned){case"top":s=o?.getPinnedTopRow(e.rowIndex);break;case"bottom":s=o?.getPinnedBottomRow(e.rowIndex);break;default:s=i.getRow(e.rowIndex);break}return s?!this.isSuppressNavigable(t,s):!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){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,s=Af(this.beans,t);return s?{rowIndex:s.rowIndex,column:e.column,rowPinned:s.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,s=Vl(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned});return s?{rowIndex:s.rowIndex,column:e.column,rowPinned:s.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:s}=this.beans,o=t.allCols;let i=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=o[0];const l=Af(this.beans,e);if(ke(l)||!l.rowPinned&&!(s?.isRowInPage(l.rowIndex)??!0))return null;i=l?l.rowIndex:null,n=l?l.rowPinned:null}return{rowIndex:i,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:s,pagination:o}=t,i=s.allCols;let n=e.rowIndex,r=e.rowPinned,l=s.getColBefore(e.column);if(!l){l=Re(i);const a=Vl(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(ke(a)||!a.rowPinned&&!(o?.isRowInPage(a.rowIndex)??!0))return null;n=a?a.rowIndex:null,r=a?a.rowPinned:null}return{rowIndex:n,column:l,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:s}=e.colDef;if(typeof s=="boolean")return s;if(typeof s=="function"){const o=e.createColumnFunctionCallbackParams(t);return s(o)}return!1}};function cA(e){return e.focusSvc.getFocusedCell()}function uA(e){return e.focusSvc.clearFocusedCell()}function hA(e,t,s,o){e.focusSvc.setFocusedCell({rowIndex:t,column:s,rowPinned:o,forceBrowserFocus:!0})}function pA(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function gA(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function fA(e,t,s=!1){const o=e.headerNavigation?.getHeaderPositionForColumn(t,s);o&&e.focusSvc.focusHeaderPosition({headerPosition:o})}var mA=class extends F{constructor(){super(),this.beanName="navigation",this.onPageDown=Eg(this.onPageDown,100),this.onPageUp=Eg(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const s=e.key,o=e.altKey,i=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=Xx(this.gos,e);let l=!1;switch(s){case D.PAGE_HOME:case D.PAGE_END:!i&&!o&&(this.onHomeOrEndKey(s),l=!0);break;case D.LEFT:case D.RIGHT:case D.UP:case D.DOWN:if(!r)return!1;i&&!o&&!n&&(this.onCtrlUpDownLeftRight(s,r),l=!0);break;case D.PAGE_DOWN:case D.PAGE_UP:!i&&!o&&(l=this.handlePageUpDown(s,r,t));break}return l&&e.preventDefault(),l}handlePageUpDown(e,t,s){return s&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===D.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo(e){const{scrollIndex:t,scrollType:s,scrollColumn:o,focusIndex:i,focusColumn:n}=e,{scrollFeature:r}=this.gridBodyCon;j(o)&&!o.isPinned()&&r.ensureColumnVisible(o),j(t)&&r.ensureIndexVisible(t,s),e.isAsync||r.ensureIndexVisible(i);const{focusSvc:l,rangeSvc:a}=this.beans;l.setFocusedCell({rowIndex:i,column:n,rowPinned:null,forceBrowserFocus:!0}),a?.setRangeToCell({rowIndex:i,rowPinned:null,column:n})}onPageDown(e){const t=this.beans,s=jc(t),o=this.getViewportHeight(),{pageBounds:i,rowModel:n,rowAutoHeight:r}=t,l=i.getPixelOffset(),a=s.top+o,d=n.getRowIndexAtPixel(a+l);r?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,s=jc(t),{pageBounds:o,rowModel:i,rowAutoHeight:n}=t,r=o.getPixelOffset(),l=s.top,a=i.getRowIndexAtPixel(l+r);n?.active?this.navigateToNextPageWithAutoHeight(e,a,!0):this.navigateToNextPage(e,a,!0)}navigateToNextPage(e,t,s=!1){const{pageBounds:o,rowModel:i}=this.beans,n=this.getViewportHeight(),r=o.getFirstRow(),l=o.getLastRow(),a=o.getPixelOffset(),d=i.getRow(e.rowIndex),c=s?d?.rowHeight-n-a:n-a,u=d?.rowTop+c;let h=i.getRowIndexAtPixel(u+a);if(h===e.rowIndex){const g=s?-1:1;t=h=e.rowIndex+g}let p;s?(p="bottom",h<r&&(h=r),t<r&&(t=r)):(p="top",h>l&&(h=l),t>l&&(t=l)),this.isRowTallerThanView(i.getRow(h))&&(t=h,p="top"),this.navigateTo({scrollIndex:t,scrollType:p,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,s=!1){this.navigateTo({scrollIndex:t,scrollType:s?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const o=this.getNextFocusIndexForAutoHeight(e,s);this.navigateTo({scrollIndex:t,scrollType:s?"bottom":"top",scrollColumn:null,focusIndex:o,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const s=t?-1:1,o=this.getViewportHeight(),{pageBounds:i,rowModel:n}=this.beans,r=i.getLastRow();let l=0,a=e.rowIndex;for(;a>=0&&a<=r;){const d=n.getRow(a);if(d){const c=d.rowHeight??0;if(l+c>o)break;l+=c}a+=s}return Math.max(0,Math.min(a,r))}getViewportHeight(){const e=this.beans,t=jc(e),s=this.beans.scrollVisibleSvc.getScrollbarWidth();let o=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(o-=s),o}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const s=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),{rowIndex:o}=s,i=s.column;this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:i,focusIndex:o,focusColumn:i})}onHomeOrEndKey(e){const t=e===D.PAGE_HOME,{visibleCols:s,pageBounds:o,rowModel:i}=this.beans,n=s.allCols,r=t?o.getFirstRow():o.getLastRow(),l=i.getRow(r);if(!l)return;const a=(t?n:[...n].reverse()).find(d=>!d.isSuppressNavigable(l));a&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:a,focusIndex:r,focusColumn:a})}onTabKeyDown(e,t){const s=t.shiftKey,o=this.tabToNextCellCommon(e,s,t),i=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:l,gos:a}=i;if(o!==!1){o?t.preventDefault():o===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(s);return}if(s){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===r.getFirstRow())&&(a.get("headerHeight")===0||ai(i)?$i(i,!0,!0):(t.preventDefault(),l.focusPreviousFromFirstCell(t)))}else e instanceof _l&&e.focusCell(!0),(!s&&l.focusOverlay(!1)||$i(i,s))&&t.preventDefault()}tabToNextCell(e,t){const s=this.beans,{focusSvc:o,rowRenderer:i}=s,n=o.getFocusedCell();if(!n)return!1;let r=Hl(s,n);return!r&&(r=i.getRowByPosition(n),!r||!r.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t)}tabToNextCellCommon(e,t,s){let o=e.editing;if(!o&&e instanceof _l){const r=e.rowCtrl;r&&(o=r.editing)}let i;return o?this.gos.get("editType")==="fullRow"?i=this.moveToNextEditingRow(e,t,s):i=this.moveToNextEditingCell(e,t,s):i=this.moveToNextCellNotEditing(e,t,s),i===null?i:i||!!this.beans.focusSvc.focusedHeader}moveToNextEditingCell(e,t,s=null){const o=e.cellPosition;e.eGui.focus(),e.stopEditing();const i=this.findNextCellToFocusOn(o,t,!0);return i===!1?null:i==null?!1:(this.beans.editSvc?.startEditing(i,null,!0,s),i.focusCell(!1),!0)}moveToNextEditingRow(e,t,s=null){const o=e.cellPosition,i=this.findNextCellToFocusOn(o,t,!0);if(i===!1)return null;if(i==null)return!1;const n=i.cellPosition,r=this.isCellEditable(o),l=this.isCellEditable(n),a=n&&o.rowIndex===n.rowIndex&&o.rowPinned===n.rowPinned,{editSvc:d,rowEditSvc:c}=this.beans;if(r&&d?.setFocusOutOnEditor(e),!a){const u=e.rowCtrl;d?.stopRowEditing(u);const h=i.rowCtrl;c?.startEditing(h,void 0,void 0,s)}return l?(d?.setFocusInOnEditor(i),i.focusCell()):i.focusCell(!0),!0}moveToNextCellNotEditing(e,t,s){const o=this.beans.visibleCols.allCols;let i;if(e instanceof wc){if(i={...e.getRowPosition(),column:t?o[0]:Re(o)},this.gos.get("embedFullWidthRows")&&s){const r=e.findFullWidthInfoForEvent(s);r&&(i.column=r.column)}}else i=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(i,t,!1);if(n===!1)return null;if(n instanceof _l)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return j(n)}findNextCellToFocusOn(e,t,s){let o=e;const i=this.beans,{cellNavigation:n,gos:r,focusSvc:l,rowRenderer:a,rangeSvc:d}=i;for(;;){e!==o&&(e=o),t||(o=this.getLastCellOfColSpan(o)),o=n.getNextTabbedCell(o,t);const c=r.getCallback("tabToNextCell");if(j(c)){const g=c({backwards:t,editing:s,previousCellPosition:e,nextCellPosition:o||null});if(g===!0)o=e;else{if(g===!1)return!1;o={rowIndex:g.rowIndex,column:g.column,rowPinned:g.rowPinned}}}if(!o)return null;if(o.rowIndex<0){const p=Bs(i);return l.focusHeaderPosition({headerPosition:{headerRowIndex:p+o.rowIndex,column:o.column},fromCell:!0}),null}const u=r.get("editType")==="fullRow";if(s&&!u&&!this.isCellEditable(o))continue;this.ensureCellVisible(o);const h=Hl(i,o);if(!h){const p=a.getRowByPosition(o);if(!p||!p.isFullWidth()||s)continue;return{...p.getRowPosition(),column:o?.column}}if(!n.isSuppressNavigable(h.column,h.rowNode))return h.setFocusedCellPosition(o),d?.setRangeToCell(o),h}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:s,rowModel:o}=this.beans;return t==="top"?s?.getPinnedTopRow(e):t==="bottom"?s?.getPinnedBottomRow(e):o.getRow(e)}navigateToNextCell(e,t,s,o){let i=s,n=!1;const r=this.beans,{cellNavigation:l,focusSvc:a,gos:d}=r;for(;i&&(i===s||!this.isValidNavigateCell(i));)d.get("enableRtl")?t===D.LEFT&&(i=this.getLastCellOfColSpan(i)):t===D.RIGHT&&(i=this.getLastCellOfColSpan(i)),i=l.getNextCellToFocus(t,i),n=ke(i);if(n&&e&&e.key===D.UP&&(i={rowIndex:-1,rowPinned:null,column:s.column}),o){const u=d.getCallback("navigateToNextCell");if(j(u)){const p=u({key:t,previousCellPosition:s,nextCellPosition:i||null,event:e});j(p)?i={rowPinned:p.rowPinned,rowIndex:p.rowIndex,column:p.column}:i=null}}if(!i)return;if(i.rowIndex<0){const u=Bs(r);a.focusHeaderPosition({headerPosition:{headerRowIndex:u+i.rowIndex,column:s.column},event:e||void 0,fromCell:!0});return}const c=this.getNormalisedPosition(i);c?this.focusPosition(c):this.tryToFocusFullWidthRow(i)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const s=Hl(this.beans,e);return s?(e=s.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:s,rowRenderer:o,focusSvc:i,eventSvc:n}=this.beans,r=s.allCols,l=o.getRowByPosition(e);if(!l||!l.isFullWidth())return!1;const a=i.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Re(r):r[0])};this.focusPosition(d);const c=t??(a!=null&&eF(d,a));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:s}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),s?.setRangeToCell(e)}isValidNavigateCell(e){return!!pc(this.beans,e)}getLastCellOfColSpan(e){const t=Hl(this.beans,e);if(!t)return e;const s=t.getColSpanningList();return s.length===1?e:{rowIndex:e.rowIndex,column:Re(s),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=Sl(this.gos),s=this.beans.rowModel.getRow(e.rowIndex),o=t&&s?.sticky,{scrollFeature:i}=this.gridBodyCon;!o&&ke(e.rowPinned)&&i.ensureIndexVisible(e.rowIndex),e.column.isPinned()||i.ensureColumnVisible(e.column)}};function jc(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var CA={moduleName:"KeyboardNavigation",version:Ce,beans:[mA,dA,W0],apiFunctions:{getFocusedCell:cA,clearFocusedCell:uA,setFocusedCell:hA,setFocusedHeader:fA,tabToNextCell:pA,tabToPreviousCell:gA}},vA=class extends F{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?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:s}=this.beans;t?t.calculatePages():e.calculateBounds(0,s.getRowCount()-1)}},wA=class extends F{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.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,s=e?.rowTop??0,o=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:s,pageLastPixel:o}}calculateBounds(e,t){const{rowModel:s}=this.beans,o=s.getRowBounds(e);o&&(o.rowIndex=e),this.topRowBounds=o;const i=s.getRowBounds(t);i&&(i.rowIndex=t),this.bottomRowBounds=i,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},yA=".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}",bA=class extends F{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 s of this.elements)s&&(fe(s,t),Ls(s,e))}},SA=class extends F{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:s}=this.beans,o=pt(e,"print"),i=o?0:t.getColsLeftWidth(),n=o?0:t.getDisplayedColumnsRightWidth();i!=this.leftWidth&&(this.leftWidth=i,s.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,s.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=zn(e);if(t<=50)return;const s=this.getPinnedColumnsOverflowingViewport(t-50),o=this.gos.getCallback("processUnpinnedColumns"),{columns:i,hasLockedPinned:n}=s;let r=i;!r.length&&!n||(o&&(r=o({columns:r,viewportWidth:t})),!(!r||!r.length)&&(r=r.filter(l=>!Ml(l)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new bA(e,t)}setColsPinned(e,t,s){const{colModel:o,colAnimation:i,visibleCols:n,gos:r}=this.beans;if(!o.cols||!e?.length)return;if(pt(r,"print")){I(37);return}i?.start();let l;t===!0||t==="left"?l="left":t==="right"?l="right":l=null;const a=[];e.forEach(d=>{if(!d)return;const c=o.getCol(d);c&&c.getPinned()!==l&&(this.setColPinned(c,l),a.push(c))}),a.length&&(n.refresh(s),df(this.eventSvc,a,s)),i?.finish()}initCol(e){const{pinned:t,initialPinned:s}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,s)}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 s=e.pinned==="left",o=e.pinned==="right";e.hidden=!0;const i=()=>{const n=s?this.leftWidth:this.rightWidth;if(n==null)return;const r=n==0,l=e.hidden!==r,a=this.gos.get("enableRtl"),d=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(a&&s||!a&&o)?n+d:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),l&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:i,rightPinnedWidthChanged:i,scrollVisibilityChanged:i,scrollbarWidthChanged:i})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:o,rightWidth:i}=this,n=zn(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(o+i+e>n)if(n>o+i)e=n-o-i;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,s=this.leftWidth??0,o=t+s;let i=!1;if(o<e)return{columns:[],hasLockedPinned:i};const{visibleCols:n}=this.beans,r=[...n.leftCols],l=[...n.rightCols];let a=0,d=0;const c=0,u=[];let h=o-c-e;for(;(d<r.length||a<l.length)&&h>0;){if(a<l.length){const p=l[a++];if(p.colDef.lockPinned){i=!0;continue}h-=p.getActualWidth(),u.push(p)}if(d<r.length&&h>0){const p=r[d++];if(p.colDef.lockPinned){i=!0;continue}h-=p.getActualWidth(),u.push(p)}}return{columns:u,hasLockedPinned:i}}},RA={moduleName:"PinnedColumn",version:Ce,beans:[SA],css:[yA]},xA=class extends F{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=Yt(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=Xe(e),s=this.descriptionContainer=t.createElement("div");s.classList.add("ag-aria-description-container"),tg(s,"polite"),xS(s,"additions text"),RS(s,!0),e.eGridDiv.appendChild(s)}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(()=>{if(this.isAlive()&&this.descriptionContainer){let t=e;this.lastAnnouncement===t&&(t=`${t}.`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}},50)}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(is(e),e.parentElement?.removeChild(e)),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},FA={moduleName:"Aria",version:Ce,beans:[xA]};function DA(e){e.overlays?.showLoadingOverlay()}function EA(e){e.overlays?.showNoRowsOverlay()}function MA(e){e.overlays?.hideOverlay()}var AA=".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:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",PA={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"}]}]},$m=class extends ve{constructor(){super(PA),this.eOverlayWrapper=k,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(AA)}handleKeyDown(e){if(e.key!==D.TAB||e.defaultPrevented||vs(e))return;const t=this.beans;if(ho(t,this.eOverlayWrapper,!1,e.shiftKey))return;let o=!1;e.shiftKey?o=t.focusSvc.focusGridView({column:Re(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):o=$i(t,!1),o&&e.preventDefault()}updateLayoutClasses(e,t){const s=this.eOverlayWrapper.classList,{AUTO_HEIGHT:o,NORMAL:i,PRINT:n}=bs;s.toggle(o,t.autoHeight),s.toggle(i,t.normal),s.toggle(n,t.print)}postConstruct(){this.createManagedBean(new mc(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,s,o){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),s&&this.isGridFocused()){const i=Be(this.beans);i&&!Yd(this.beans)&&(this.elToFocusAfter=i)}e.then(i=>{if(this.activePromise!==e){this.activeOverlay!==i&&(this.destroyBean(i),i=null);return}if(this.activePromise=null,!!i){if(this.activeOverlay!==i&&(this.eOverlayWrapper.appendChild(i.getGui()),this.activeOverlay=i,o)){const n=i;this.updateListenerDestroyFunc=this.addManagedPropertyListener(o,({currentValue:r})=>{n.refresh?.(he(this.gos,{...r??{}}))})}s&&this.isGridFocused()&&ys(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){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 s=this.updateListenerDestroyFunc;s&&(s(),this.updateListenerDestroyFunc=null),this.destroyBean(e),is(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=Be(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},IA={selector:"AG-OVERLAY-WRAPPER",component:$m},TA=class extends F{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=ks(this.gos),this.isServerSide=!this.isClientSide&&Os(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")){I(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return IA}getOverlayWrapperCompClass(){return $m}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}const{state:e,isClientSide:t,isServerSide:s,beans:{gos:o,colModel:i,rowModel:n}}=this;let r=this.gos.get("loading");r!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&r===void 0&&!o.get("suppressLoadingOverlay")&&(r=!o.get("columnDefs")||!i.ready||!o.get("rowData")&&t),r?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&n.isEmpty()&&!o.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!s&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(fx(this.beans.userCompFactory,he(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(mx(this.beans.userCompFactory,he(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,s){const o=e?.newAgStackInstance()??null;this.eWrapper?.showOverlay(o,t,this.isExclusive(),s),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;this.state===2?t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0:this.wrapperPadding!==0&&(t=0),this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},LA={moduleName:"Overlay",version:Ce,userComponents:{agLoadingOverlay:pD,agNoRowsOverlay:fD},apiFunctions:{showLoadingOverlay:DA,showNoRowsOverlay:EA,hideOverlay:MA},beans:[TA]},kA=class extends F{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=NS(),Kn(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;Kn(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(),s=e/t;return this.maxScrollY*s}},OA=400,GA=class extends F{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=()=>{this.getAllCellCtrls().forEach(n=>n.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(n=>n.updateRangeBordersIfRangeCount())},s=()=>{this.eventSvc.addEventListener("cellSelectionChanged",e),this.eventSvc.addEventListener("columnMoved",t),this.eventSvc.addEventListener("columnPinned",t),this.eventSvc.addEventListener("columnVisible",t)},o=()=>{this.eventSvc.removeEventListener("cellSelectionChanged",e),this.eventSvc.removeEventListener("columnMoved",t),this.eventSvc.removeEventListener("columnPinned",t),this.eventSvc.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>o()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{oi(this.gos)?s():o()}),oi(this.gos)&&s()}}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}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),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",o=>this.onSuppressCellFocusChanged(o.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:o,previousValue:i})=>{(!i&&o||i&&!o)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:s}=this.beans;if(s&&this.addManagedPropertyListener("showOpenedGroup",()=>{const o=s.getShowRowGroupCols();o.length&&this.refreshCells({columns:o,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const o=this.gridBodyCtrl;o.setStickyTopHeight(0),o.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=pt(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 NA(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),s=this.cachedRowCtrls?.getEntries()??[];t.length>0||s.length>0?this.allRowCtrls=[...e,...t,...s]:this.allRowCtrls=e}isCellBeingRendered(e,t){const s=this.rowCtrlsByRowIndex[e];return!t||!s?!!s:s.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!s.getCellCtrl(t)||!s.isRowRendered()}updateCellFocus(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onCellFocusChanged(e){if(e&&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){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;t&&this.getAllCellCtrls().forEach(s=>t.onFlashCells(s,e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.colModel.getCols().forEach(t=>{const s=a=>{this.getAllCellCtrls().forEach(d=>{d.column===t&&a(d)})},o=()=>{s(a=>a.onLeftChanged())},i=()=>{s(a=>a.onWidthChanged())},n=()=>{s(a=>a.onFirstRightPinnedChanged())},r=()=>{s(a=>a.onLastLeftPinnedChanged())},l=()=>{s(a=>a.onColDefChanged())};t.__addEventListener("leftChanged",o),t.__addEventListener("widthChanged",i),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",l),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",o),t.__removeEventListener("widthChanged",i),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",l)})})}onDomLayoutChanged(){const e=pt(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),s=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,s&&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){const t=[];return this.getAllRowCtrls().forEach(s=>{const o=s.getCellCtrl(e,!0)?.eGui;o&&t.push(o)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,"top"),this.refreshFloatingRows(this.bottomRowCtrls,"bottom")}refreshFloatingRows(e,t){const{pinnedRowModel:s,beans:o,printLayout:i}=this,n=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));s?.forEachPinnedRow(t,(l,a)=>{const d=e[a];d&&s.getPinnedRowById(d.rowNode.id,t)===void 0&&(d.destroyFirstPass(),d.destroySecondPass()),l.id in n?(e[a]=n[l.id],delete n[l.id]):e[a]=new wc(l,o,!1,!1,i)});const r=(t==="top"?s?.getPinnedTopRowCount():s?.getPinnedBottomRowCount())??0;e.length=r}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const s=o=>{const i=o[e.rowIndex];i&&i.rowNode===e&&(i.destroyFirstPass(),i.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){if(e!=null){e?.forEach(s=>this.redrawRow(s,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const s=!e.domLayoutChanged&&!!e.recycleRows,o=e.animate&&Hi(this.gos),i=s?this.getRowsToRecycle():null;s||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n}=this;if(n){n.checkStickyRows();const r=n.extraTopHeight+n.extraBottomHeight;r&&this.updateContainerHeights(r)}this.recycleRows(i,o),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,s=this.gos.get("suppressScrollOnNewData");t&&!s&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let s=this.pageBounds.getCurrentPageHeight();s===0&&(s=1),t.setModelHeight(s+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(Do(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,s=this.findPositionToFocus(e);if(!s){t.focusHeaderPosition({headerPosition:{headerRowIndex:Bs(this.beans)-1,column:e.column}});return}if(e.rowIndex!==s.rowIndex||e.rowPinned!=s.rowPinned){t.setFocusedCell({...s,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(he(this.gos,{...s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:s}=this.beans;let o=e;for(o.rowPinned==null&&t&&s&&!t.isRowInPage(o.rowIndex)&&(o={rowPinned:null,rowIndex:s.getFirstRow()});o;){if(o.rowPinned==null&&s)if(o.rowIndex<s.getFirstRow()){if(o=Vl(this.beans,{rowPinned:null,rowIndex:0}),!o)return null}else o.rowIndex>s.getLastRow()&&(o={rowPinned:null,rowIndex:s.getLastRow()});const i=this.getRowByPosition(o);if(i?.isAlive())return{...i.getRowPosition(),column:e.column};o=Vl(this.beans,o)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),s=t.length;for(let o=0;o<s;o++){const i=t[o].getAllCellCtrls(),n=i.length;for(let r=0;r<n;r++)e.push(i[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),s=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...s,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,s){const o=this.rowCtrlsByRowIndex[t];o&&o.addEventListener(e,s)}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};for(const s of this.getCellCtrls(e.rowNodes,e.columns))s.refreshOrDestroyCell(t);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const s of this.getRowCtrls(e)){if(!s.isFullWidth())continue;s.refreshFullWidth()||(t=!0,this.redrawRow(s.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=jm(e),s=this.getAllRowCtrls();return!e||!t?s:s.filter(o=>{const i=o.rowNode;return Km(i,t)})}getCellCtrls(e,t){let s;j(t)&&(s={},t.forEach(i=>{const n=this.colModel.getCol(i);j(n)&&(s[n.getId()]=!0)}));const o=[];return this.getRowCtrls(e).forEach(i=>{i.getAllCellCtrls().forEach(n=>{const r=n.column.getId();s&&!s[r]||o.push(n)})}),o}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const s of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[s].rowNode.id==null&&e.push(s);this.removeRowCtrls(e);const t={};for(const s of Object.values(this.rowCtrlsByRowIndex)){const o=s.rowNode;t[o.id]=s}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(s=>{const o=this.rowCtrlsByRowIndex[s];o&&(o.destroyFirstPass(t),o.destroySecondPass()),delete this.rowCtrlsByRowIndex[s]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:s}=this.beans,{afterScroll:o}=e;let i;const n=this.stickyRowFeature;n&&(i=t?.getFocusCellToUseAfterRefresh()||void 0);const r=this.firstRenderedRow,l=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let a=!1;if(n){a=n.checkStickyRows();const c=n.extraTopHeight+n.extraBottomHeight;c&&this.updateContainerHeights(c)}const d=this.firstRenderedRow!==r||this.lastRenderedRow!==l;if(!(o&&!a&&!d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,o),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(o&&!a),i!=null)){const c=t?.getFocusCellToUseAfterRefresh();i!=null&&c==null&&(s?.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){const s={};e.forEach(n=>s[n]=!0);const i=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!s[n]);this.removeRowCtrls(i,t)}calculateIndexesToDraw(e){const t=[];for(let r=this.firstRenderedRow;r<=this.lastRenderedRow;r++)t.push(r);const s=this.beans.pagination,o=this.beans.focusSvc?.getFocusedCell()?.rowIndex;o!=null&&(o<this.firstRenderedRow||o>this.lastRenderedRow)&&(!s||s.isRowInPage(o))&&t.push(o);const i=r=>{const l=r.rowNode.rowIndex;l==null||l===o||(l<this.firstRenderedRow||l>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(l)};for(const r of Object.values(this.rowCtrlsByRowIndex))i(r);if(e)for(const r of Object.values(e))i(r);t.sort((r,l)=>r-l);const n=[];for(let r=0;r<t.length;r++){const l=t[r],a=this.rowModel.getRow(l);a&&!a.sticky&&n.push(l)}return n}recycleRows(e,t=!1,s=!1){const o=this.calculateIndexesToDraw(e);if((this.printLayout||s)&&(t=!1),this.removeRowCompsNotToDraw(o,!t),o.forEach(i=>{this.createOrUpdateRowCtrl(i,e,t,s)}),e){const{animationFrameSvc:i}=this.beans;i?.active&&s&&!this.printLayout?i.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(),s=e.isPinningRight();(this.pinningLeft!==t||s!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=s,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const s=t.rowNode.rowIndex;e.push(s.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=jm(e);return this.getAllRowCtrls().filter(s=>{if(!s.isFullWidth())return!1;const o=s.rowNode;return!(t!=null&&!Km(o,t))})}createOrUpdateRowCtrl(e,t,s,o){let i,n=this.rowCtrlsByRowIndex[e];if(n||(i=this.rowModel.getRow(e),j(i)&&j(t)&&t[i.id]&&i.alreadyRendered&&(n=t[i.id],t[i.id]=null)),!n)if(i||(i=this.rowModel.getRow(e)),j(i))n=this.createRowCon(i,s,o);else return;return i&&(i.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n,n}destroyRowCtrls(e,t){const s=[];if(e){for(const o of Object.values(e))if(o){if(this.cachedRowCtrls&&o.isCacheable()){this.cachedRowCtrls.addRow(o);continue}if(o.destroyFirstPass(!t),t){const i=o.instanceId;this.zombieRowCtrls[i]=o,s.push(()=>{o.destroySecondPass(),delete this.zombieRowCtrls[i]})}else o.destroySecondPass()}}t&&(s.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),window.setTimeout(()=>s.forEach(o=>o()),OA))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=ti(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:s}=this;e.updateOffset();let o,i;if(!s.isRowsToRender())o=0,i=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),o=t.getFirstRow(),i=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let p=!1,g,f;do{const w=t.getPixelOffset(),{pageFirstPixel:b,pageLastPixel:x}=t.getCurrentPagePixelRange(),A=e.divStretchOffset,H=u.getVScrollPosition(),M=H.top,z=H.bottom;h?(g=b+A,f=x+A):(g=Math.max(M+w-c,b)+A,f=Math.min(z+w+c,x)+A),this.firstVisibleVPixel=Math.max(M+w,b)+A,this.lastVisibleVPixel=Math.min(z+w,x)+A,p=this.ensureAllRowsInRangeHaveHeightsCalculated(g,f)}while(p);let m=s.getRowIndexAtPixel(g),v=s.getRowIndexAtPixel(f);const y=t.getFirstRow(),R=t.getLastRow();m<y&&(m=y),v>R&&(v=R),o=m,i=v}const n=pt(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),l=Math.max(this.getRowBuffer(),500);n&&!r&&i-o>l&&(i=o+l);const a=o!==this.firstRenderedRow,d=i!==this.lastRenderedRow;(a||d)&&(this.firstRenderedRow=o,this.lastRenderedRow=i,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:o,lastRow:i}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,ms(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const s=this.pinnedRowModel?.ensureRowHeightsValid(),o=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:i,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,i.getFirstRow(),i.getLastRow());return(r||o)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),o||r||s?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const o=e.rowNode,i=this.focusSvc.isRowFocused(o.rowIndex,o.rowPinned),n=e.editing,r=o.detail;return i||n||r?!!this.isRowPresent(o):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,s){const o=this.cachedRowCtrls?.getRow(e)??null;if(o)return o;const i=s&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new wc(e,this.beans,t,i,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(o=>o.rowNode),t=this.getStickyTopRowCtrls().map(o=>o.rowNode),s=this.getStickyBottomRowCtrls().map(o=>o.rowNode);return[...t,...e,...s]}getRowByPosition(e){let t;const{rowIndex:s}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[s];break;case"bottom":t=this.bottomRowCtrls[s];break;default:t=this.rowCtrlsByRowIndex[s],t||(t=this.getStickyTopRowCtrls().find(o=>o.rowNode.rowIndex===s)||null,t||(t=this.getStickyBottomRowCtrls().find(o=>o.rowNode.rowIndex===s)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const o=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!o}},NA=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||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,s=this.entriesMap[t];delete this.entriesMap[t],Ot(this.entriesList,s)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],Ot(this.entriesList,e)}getEntries(){return this.entriesList}};function jm(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(s=>{const o=s.id;switch(s.rowPinned){case"top":t.top[o]=s;break;case"bottom":t.bottom[o]=s;break;default:t.normal[o]=s;break}}),t}function Km(e,t){const s=e.id;switch(e.rowPinned){case"top":return t.top[s]!=null;case"bottom":return t.bottom[s]!=null;default:return t.normal[s]!=null}}var _A=class extends F{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=Cs(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=Cs(e))}doFullSort(e,t){const s=e.map((o,i)=>({currentPos:i,rowNode:o}));return s.sort(this.compareRowNodes.bind(this,t)),s.map(o=>o.rowNode)}compareRowNodes(e,t,s){const o=t.rowNode,i=s.rowNode;for(let n=0,r=e.length;n<r;n++){const l=e[n],a=l.sort==="desc",d=this.getValue(o,l.column),c=this.getValue(i,l.column);let u;const h=this.getComparator(l,o);if(h?u=h(d,c,o,i,a):u=yl(d,c,this.isAccentedSort),!isNaN(u)&&u!==0)return l.sort==="asc"?u:u*-1}return t.currentPos-s.currentPos}getComparator(e,t){const s=e.column,o=s.getColDef().comparator;if(o!=null)return o;if(!s.getColDef().showRowGroup)return;const i=!t.group&&s.getColDef().field;if(!i)return;const n=this.beans.colModel.getColDefCol(i);if(n)return n.getColDef().comparator}getValue(e,t){const{valueSvc:s,colModel:o,showRowGroupCols:i,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return s.getValue(t,e,!1);if(e.rowGroupColumn===t){if(Xd(n,o.isPivotActive())){const d=e.allLeafChildren?.[0];return d?s.getValue(t,d,!1):void 0}const a=i?.getShowRowGroupCol(t.getId());return a?e.groupData?.[a.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return s.getValue(t,e,!1)}};function BA(e){e.sortSvc?.onSortChanged("api")}var ar=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),HA={tag:"span",cls:"ag-sort-indicator-container",children:[ar("Order","order"),ar("Asc","ascending-icon"),ar("Desc","descending-icon"),ar("Mixed","mixed-icon"),ar("None","none-icon")]},Kc=class extends ve{constructor(e){super(),this.eSortOrder=k,this.eSortAsc=k,this.eSortDesc=k,this.eSortMixed=k,this.eSortNone=k,e||this.setTemplate(HA)}attachCustomElements(e,t,s,o,i){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=s,this.eSortMixed=o,this.eSortNone=i}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 s=this.updateIcons.bind(this),o=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",s),this.addManagedEventListeners({newColumnsLoaded:s,sortChanged:o,columnRowGroupChanged:o}),this.onSortChanged()}addInIcon(e,t,s){if(t==null)return;const o=pe(e,this.beans,s);o&&t.appendChild(o)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:s,column:o,gos:i,beans:n}=this,r=n.sortSvc.getDisplaySortForColumn(o);if(e&&fe(e,r==="asc",{skipAriaHidden:!0}),t&&fe(t,r==="desc",{skipAriaHidden:!0}),s){const l=!o.getColDef().unSortIcon&&!i.get("unSortIcon"),a=r==null;fe(s,!l&&a,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:s}=this;this.addInIcon("sortUnSort",e,t);const o=t.getColDef().showRowGroup;Cs(s)&&o&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:s}=this;if(e){const o=t.sortSvc.getDisplaySortForColumn(s)==="mixed";fe(e,o,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:s}}=this;if(!e)return;const o=s.getColumnsWithSortingOrdered(),i=s.getDisplaySortIndexForColumn(t)??-1,n=o.some(l=>s.getDisplaySortIndexForColumn(l)??!1),r=i>=0&&n;fe(e,r,{skipAriaHidden:!0}),i>=0?e.textContent=(i+1).toString():is(e)}},VA={selector:"AG-SORT-INDICATOR",component:Kc},dr=["asc","desc",null],WA=class extends F{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,s){const o=this.getNextSortDirection(e);this.setSortForColumn(e,o,t,s)}progressSortFromEvent(e,t){const o=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,o,"uiColumnSorted")}setSortForColumn(e,t,s,o){t!=="asc"&&t!=="desc"&&(t=null);const{gos:i,showRowGroupCols:n}=this.beans,r=Cs(i);let l=[e];if(r&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(l=[e,...u])}l.forEach(c=>this.setColSort(c,t,o));const a=(s||i.get("alwaysMultiSort"))&&!i.get("suppressMultiSort"),d=[];if(!a){const c=this.clearSortBarTheseColumns(l,o);d.push(...c)}this.updateSortIndex(e),d.push(...l),this.dispatchSortChangedEvents(o,d)}updateSortIndex(e){const{gos:t,colModel:s,showRowGroupCols:o}=this.beans,i=Cs(t),n=o?.getShowRowGroupCol(e.getId()),r=i&&n||e,l=this.getColumnsWithSortingOrdered();s.forAllCols(c=>this.setColSortIndex(c,null));const a=l.filter(c=>i&&c.getColDef().showRowGroup?!1:c!==r);(r.getSort()?[...a,r]:a).forEach((c,u)=>this.setColSortIndex(c,u))}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 s={type:"sortChanged",source:e};t&&(s.columns=t),this.eventSvc.dispatchEvent(s)}clearSortBarTheseColumns(e,t){const s=[];return this.beans.colModel.forAllCols(o=>{e.includes(o)||(o.getSort()&&s.push(o),this.setColSort(o,void 0,t))}),s}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??dr,s=t.indexOf(e.getSort()),o=s<0,i=s==t.length-1;return o||i?t[0]:t[s+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:s,rowGroupColsSvc:o}=this.beans;let i=[];if(t.forAllCols(d=>{d.getSort()&&i.push(d)}),t.isPivotMode()){const d=Cs(e);i=i.filter(c=>{const u=!!c.getAggFunc(),h=!c.isPrimary(),p=d?s?.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return u||h||p})}const n=o?.columns.filter(d=>!!d.getSort())??[],r={};i.forEach((d,c)=>r[d.getId()]=c),i.sort((d,c)=>{const u=d.getSortIndex(),h=c.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){const p=r[d.getId()],g=r[c.getId()];return p>g?1:-1}else return h==null?-1:1});const l=Cs(e)&&!!n.length;l&&(i=[...new Set(i.map(d=>s?.getShowRowGroupCol(d.getId())??d))]);const a=new Map;return i.forEach((d,c)=>a.set(d,c)),l&&n.forEach(d=>{const c=s.getShowRowGroupCol(d.getId());a.set(d,a.get(c))}),a}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=Cs(this.gos),s=!!e.getColDef().showRowGroup;return t&&s}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();const o=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,i=o[0].getSort();return o.every(r=>r.getSort()==i)?i:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,s){let o=0;e.addManagedListeners(t,{movingChanged:()=>{o=Date.now()}}),s&&e.addManagedElementListeners(s,{click:n=>{const r=t.isMoving(),a=Date.now()-o<50;r||a||this.progressSortFromEvent(t,n)}});const i=()=>{const n=t.getSort();if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",n==="asc"),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",n==="desc"),e.addOrRemoveCssClass("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){const a=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(d=>t.getSort()==d.getSort());e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",a)}};e.addManagedEventListeners({sortChanged:i,columnRowGroupChanged:i})}initCol(e){const{sort:t,initialSort:s,sortIndex:o,initialSortIndex:i}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(s==="asc"||s==="desc")&&(e.sort=s),o!==void 0?o!==null&&(e.sortIndex=o):i!==null&&(e.sortIndex=i)}updateColSort(e,t,s){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,s):this.setColSort(e,void 0,s))}setColSort(e,t,s){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",s)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new Kc(e)}getSortIndicatorSelector(){return VA}},Yc={moduleName:"Sort",version:Ce,beans:[WA,_A],apiFunctions:{onSortChanged:BA},userComponents:{agSortIndicator:Kc},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},zA=class extends F{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:s}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),s.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Kn(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,ri(e.source))}}},Ym=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:s,children:o}=e;if(o)for(let i=0;i<o.length;++i)this.depthFirstSearchChangedPath(o[i],t);t(s)}depthFirstSearchEverything(e,t,s){const o=e.childrenAfterGroup;if(o)for(let i=0,n=o.length;i<n;++i){const r=o[i];r.childrenAfterGroup?this.depthFirstSearchEverything(r,t,s):s&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,s=!1){this.active&&!s?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,s=0;for(;!this.mapToItems[t.id];){const o={rowNode:t,children:null};this.mapToItems[t.id]=o,s++,t=t.parent}return s}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let s=e;for(;s;)this.nodeIdsToColumns[s.id]||(this.nodeIdsToColumns[s.id]={}),t.forEach(o=>this.nodeIdsToColumns[s.id][o.getId()]=!0),s=s.parent}linkPathItems(e,t){let s=e;for(let o=0;o<t;o++){const i=this.mapToItems[s.id],n=this.mapToItems[s.parent.id];n.children||(n.children=[]),n.children.push(i),s=s.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const s=this.createPathItems(e);this.linkPathItems(e,s),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const s=this.nodeIdsToColumns[e.id];return t.filter(i=>s[i.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const s=this.nodeIdsToColumns[e.id];return t.filter(i=>!s[i.getId()])}},UA="paste",$A=class extends F{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;ks(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:s}=this.beans;if(e.source===UA||t.get("suppressChangeDetection"))return;const o=e.node,i=[o],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!o.isRowPinned()){const l=t.get("aggregateOnlyChangedColumns"),a=new Ym(l,r);a.addParentNode(o.parent,[e.column]),n.doAggregate(a),a.forEachChangedNodeDepthFirst(d=>{i.push(d),d.sibling&&i.push(d.sibling)})}s.refreshCells({rowNodes:i})}},jA=class extends F{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);ue(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(s){return ue(16,{expression:e,params:t,e:s}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const s=this.createFunctionBody(e),o=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",s);return t[e]=o,o}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},KA={moduleName:"Expression",version:Ce,beans:[jA]},YA={moduleName:"ChangeDetection",version:Ce,beans:[$A]},qA=class extends F{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=Os(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.addEventListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeEventListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t){const s=e.getColDef().showRowGroup;if(s!=null){if(typeof s=="string"){const a=this.getDisplayedNode(t,e,!0);if(a)return this.getValue(e,a)}const l=this.getValue(e,t);if(l==null){const a=this.getDisplayedNode(t,e);if(a)return this.getValue(e,a)}return l}const o=t.leafGroup&&this.colModel.isPivotMode(),i=t.group&&t.expanded&&!t.footer&&!o,n=this.gos.get("groupSuppressBlankHeader")||!t.sibling,r=i&&!n;return this.getValue(e,t,r)}getValue(e,t,s=!1){if(this.initialised||this.init(),!t)return;const o=e.getColDef(),i=o.field,n=e.getColId(),r=t.data;let l;const a=o.showRowGroup;if(typeof a=="string"&&(this.beans.rowGroupColsSvc?.getColumnIndex(a)??-1)>t.level)return null;const d=t.groupData&&t.groupData[n]!==void 0,c=!s&&t.aggData&&t.aggData[n]!==void 0,u=this.isSsrm&&s&&!!e.getColDef().aggFunc,h=this.isSsrm&&t.footer&&t.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===t.field);if(this.isTreeData&&c?l=t.aggData[n]:this.isTreeData&&o.valueGetter?l=this.executeValueGetter(o.valueGetter,r,e,t):this.isTreeData&&i&&r?l=Fl(r,i,e.isFieldContainsDots()):d?l=t.groupData[n]:c?l=t.aggData[n]:o.valueGetter?l=this.executeValueGetter(o.valueGetter,r,e,t):h?l=Fl(r,t.field,e.isFieldContainsDots()):i&&r&&!u&&(l=Fl(r,i,e.isFieldContainsDots())),this.cellExpressions&&typeof l=="string"&&l.indexOf("=")===0){const p=l.substring(1);l=this.executeValueGetter(p,r,e,t)}return l}parseValue(e,t,s,o){const i=e.getColDef(),n=i.valueParser;if(j(n)){const r=he(this.gos,{node:t,data:t?.data,oldValue:o,newValue:s,colDef:i,column:e});return typeof n=="function"?n(r):this.expressionSvc?.evaluate(n,r)}return s}getDeleteValue(e,t){return j(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t))??null:null}formatValue(e,t,s,o,i=!0){let n=null,r;const l=e.getColDef();if(o?r=o:i&&(r=l.valueFormatter),r){const a=he(this.gos,{value:s,node:t,data:t?t.data:null,colDef:l,column:e});typeof r=="function"?n=r(a):n=this.expressionSvc?this.expressionSvc.evaluate(r,a):null}else if(l.refData)return l.refData[s]||"";return n==null&&Array.isArray(s)&&(n=s.join(", ")),n}getDisplayedNode(e,t,s=!1){const o=this.gos,i=o.get("groupHideOpenParents"),n=o.get("showOpenedGroup")&&!s;if(!i&&!n)return;const r=t.colDef.showRowGroup;if(r===!0)return e.group?void 0:e.parent??void 0;let l=e;for(;l&&l.rowGroupColumn?.getId()!=r;){const a=l===l.parent?.childrenAfterSort?.[0];if(!n&&!a)return;l=l.parent}if(l!==e)return l??void 0}setValue(e,t,s,o){const i=this.colModel.getColDefCol(t);if(!e||!i)return!1;ke(e.data)&&(e.data={});const{field:n,valueSetter:r}=i.getColDef();if(ke(n)&&ke(r))return I(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(i,s))return I(135),!1;const l=he(this.gos,{node:e,data:e.data,oldValue:this.getValue(i,e),newValue:s,colDef:i.getColDef(),column:i});l.newValue=s;let a;if(j(r)?typeof r=="function"?a=r(l):a=this.expressionSvc?.evaluate(r,l):a=this.setValueUsingField(e.data,n,s,i.isFieldContainsDots()),a===void 0&&(a=!0),!a)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const d=this.getValue(i,e);return this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:l.column,colDef:l.colDef,data:e.data,node:e,oldValue:l.oldValue,newValue:d,value:d,source:o}),!0}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,s,o){if(!t)return!1;let i=!1;if(!o)i=e[t]===s,i||(e[t]=s);else{const n=t.split(".");let r=e;for(;n.length>0&&r;){const l=n.shift();n.length===0?(i=r[l]===s,i||(r[l]=s)):r=r[l]}}return!i}executeValueGetterWithValueCache(e,t,s,o){const i=s.getColId(),n=this.valueCache.getValue(o,i);if(n!==void 0)return n;const r=this.executeValueGetterWithoutValueCache(e,t,s,o);return this.valueCache.setValue(o,i,r),r}executeValueGetterWithoutValueCache(e,t,s,o){const i=he(this.gos,{data:t,node:o,column:s,colDef:s.getColDef(),getValue:this.getValueCallback.bind(this,o)});let n;return typeof e=="function"?n=e(i):n=this.expressionSvc?.evaluate(e,i),n}getValueCallback(e,t){const s=this.colModel.getColDefCol(t);return s?this.getValue(s,e):null}getKeyForNode(e,t){const s=this.getValue(e,t),o=e.getColDef().keyCreator;let i=s;if(o){const n=he(this.gos,{value:s,colDef:e.getColDef(),column:e,node:t,data:t.data});i=o(n)}return typeof i=="string"||i==null||(i=String(i),i==="[object Object]"&&I(121)),i}},XA={moduleName:"CommunityCore",version:Ce,beans:[K0,oE,GM,WR,kA,ZE,V0,Q0,_R,wA,vA,GA,qA,$0,H0,j0,_M,zA,IM,TM],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:iE,destroy:nE,isDestroyed:rE,getGridOption:lE,setGridOption:aE,updateGridOptions:hm},dependsOn:[EM,wm,NE,Yc,oA,ym,iA,LA,YA,rA,CA,RA,FA,aA,OM,MM,KA]},qc=class fi{static applyGlobalGridOptions(t){if(!fi.gridOptions)return{...t};let s={};return gt(s,fi.gridOptions,!0,!0),fi.mergeStrategy==="deep"?gt(s,t,!0,!0):s={...s,...t},fi.gridOptions.context&&(s.context=fi.gridOptions.context),t.context&&(fi.mergeStrategy==="deep"&&s.context&&gt(t.context,s.context,!0,!0),s.context=t.context),s}};qc.gridOptions=void 0,qc.mergeStrategy="shallow";var QA=qc;function ZA(e,t,s){if(!t)return ue(11),{};const o=s;let i;if(!o?.setThemeOnGridDiv){const r=Ne({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,i=()=>e.remove()}return new eP().create(e,t,r=>{const l=new tE(e);r.createBean(l)},void 0,s,i)}var JA=1,eP=class{create(e,t,s,o,i,n){const r=QA.applyGlobalGridOptions(t),l=r.gridId??String(JA++),a=r.rowModelType??"clientSide",d=this.getRegisteredModules(i,l,a),c=this.createBeansList(a,d,l),u=this.createProvidedBeans(e,r,i);if(!c)return;const h={providedBeanInstances:u,beanClasses:c,gridId:l,beanInitComparator:_D,beanDestroyComparator:BD,derivedBeans:[GD],destroyCallback:n},p=new Ax(h);return this.registerModuleFeatures(p,d),s(p),p.getBean("syncSvc").start(),o&&o(p),p.getBean("gridApi")}getRegisteredModules(e,t,s){return sr(XA,void 0),e?.modules?.forEach(o=>sr(o,t)),xx(t,s)}registerModuleFeatures(e,t){const s=e.getBean("registry"),o=e.getBean("apiFunctionSvc");t.forEach(i=>{s.registerModule(i);const n=i.apiFunctions;n&&Object.keys(n).forEach(l=>{o?.addFunction(l,n[l])})})}createProvidedBeans(e,t,s){let o=s?s.frameworkOverrides:null;ke(o)&&(o=new am);const i={gridOptions:t,eGridDiv:e,globalListener:s?s.globalListener:null,globalSyncListener:s?s.globalSyncListener:null,frameworkOverrides:o};return s&&s.providedBeanInstances&&Object.assign(i,s.providedBeanInstances),i}createBeansList(e,t,s){const i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"}[e];if(!i){Ud(201,{rowModelType:e},`Unknown rowModelType ${e}.`);return}if(!yf(i,s,e)){Ud(200,{reasonOrId:`rowModelType = '${e}'`,moduleName:i,gridScoped:dc(),gridId:s,rowModelType:e},`Missing module ${i}Module for rowModelType ${e}.
56
+ If upgrading from before v33, see ${ei}/upgrading-to-ag-grid-33/#changes-to-modules/`);return}const n=new Set;return t.forEach(r=>r.beans?.forEach(l=>n.add(l))),Array.from(n)}};function zs(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function tP(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var sP=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","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","filterOpened","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"],oP=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged","beforeRefreshModel","rowNodeDataChanged"],qm=[...sP,...oP],iP=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce"],nP=["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","initialState","autoSizeStrategy","selectionColumnDef","findOptions"],rP=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],Xm=["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"],lP=["theme","rowSelection"],aP=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild"],Qm=["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"],dP=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","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"],Xc=[...rP,...nP,...iP,...Xm,...dP,...Qm,...aP,...lP],cP=class{wrap(e,t,s,o){const i=this.createWrapper(e,o);return t?.forEach(n=>{this.createMethod(i,n,!0)}),s?.forEach(n=>{this.createMethod(i,n,!1)}),i}createMethod(e,t,s){e.addMethod(t,this.createMethodProxy(e,t,s))}createMethodProxy(e,t,s){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(s&&I(49,{methodName:t}),null)}}};function Zm(e){const{inputValue:t,allSuggestions:s,hideIrrelevant:o,filterByPercentageOfBestMatch:i}=e;let n=s.map((a,d)=>({value:a,relevance:uP(t,a),idx:d}));if(n.sort((a,d)=>d.relevance-a.relevance),o&&(n=n.filter(a=>a.relevance!==0)),n.length>0&&i&&i>0){const d=n[0].relevance*i;n=n.filter(c=>d-c.relevance<0)}const r=[],l=[];for(const a of n)r.push(a.value),l.push(a.idx);return{values:r,indices:l}}function uP(e,t){if(e===t)return 1e3;const s=e.length,o=t.length;if(s===0||o===0)return 0;const i=e.toLocaleLowerCase(),n=t.toLocaleLowerCase(),r=n.indexOf(i);if(r!==-1)return 980-r*2;if([...i].filter(u=>n.includes(u)).length===0)return 0;let a=Array.from({length:o+1},(u,h)=>h);for(let u=0;u<s;u++){const h=[u+1];for(let p=0;p<o;p++){const g=a[p+1]+1,f=h[p]+1;let m=a[p]+(e[u]!==t[p]?1:0);o>10&&p>o/2&&(m+=1),u>0&&p>0&&e[u-1]===t[p-1]&&(m-=4),h.push(Math.min(g,f,m))}a=h}const d=Math.round(a[o]),c=Math.max(1,1e3-d*30);return Math.max(1,c)}var hP={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,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0},Nt="clientSide",xt="serverSide",Zi="infinite",pP={onGroupExpandedOrCollapsed:[Nt],refreshClientSideRowModel:[Nt],isRowDataEmpty:[Nt],forEachLeafNode:[Nt],forEachNodeAfterFilter:[Nt],forEachNodeAfterFilterAndSort:[Nt],resetRowHeights:[Nt],applyTransaction:[Nt],applyTransactionAsync:[Nt],flushAsyncTransactions:[Nt],getBestCostNodeSelection:[Nt],getServerSideSelectionState:[xt],setServerSideSelectionState:[xt],applyServerSideTransaction:[xt],applyServerSideTransactionAsync:[xt],applyServerSideRowData:[xt],retryServerSideLoads:[xt],flushServerSideAsyncTransactions:[xt],refreshServerSide:[xt],getServerSideGroupLevelState:[xt],refreshInfiniteCache:[Zi],purgeInfiniteCache:[Zi],getInfiniteRowCount:[Zi],isLastRowIndexKnown:[Zi,xt],expandAll:[Nt,xt],collapseAll:[Nt,xt],onRowHeightChanged:[Nt,xt],setRowCount:[Zi,xt],getCacheBlockState:[Zi,xt]},gP={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 fP(e,t,s){const o=gP[e];if(o){const{version:n,new:r,old:l,message:a}=o,d=l??e;return(...c)=>{const u=r?`Please use ${r} instead. `:"";return Yn(`Since ${n} api.${d} is deprecated. ${u}${a??""}`),t.apply(t,c)}}const i=pP[e];return i?(...n)=>{const r=s.rowModel.getType();if(!i.includes(r)){Ni(`api.${e} can only be called when gridOptions.rowModelType is ${i.join(" or ")}`);return}return t.apply(t,n)}:t}var Jm={AdvancedFilter:1,AllEnterprise: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,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},Qc=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],mP={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:Qc,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...Qc,"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:[...Qc,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},CP={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function vP(e,t){const s=[];return(Array.isArray(e)?e:[e]).forEach(o=>{const i=mP[o];i?i.forEach(n=>{const r=CP[n];(!r||r===t)&&s.push(n)}):s.push(o)}),s}var Ji={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",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"},wP=e=>{const t=e.map(o=>`import { ${cr(o)} } from '${Jm[o]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(o=>o==="IntegratedCharts"||o==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
57
+ ${t.join(`
58
+ `)}
59
+
60
+ ModuleRegistry.registerModules([ ${e.map(o=>cr(o,!0)).join(", ")} ]);
61
+
62
+ For more info see: ${ei}/modules/`};function cr(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function yP(e,t){const s=t.filter(n=>n==="IntegratedCharts"||n==="Sparklines");let o="";return!globalThis?.agCharts&&s.length>0?o=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
63
+ `:t.some(n=>Jm[n])&&(o=o+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
64
+ `),o}var eC=({reasonOrId:e,moduleName:t,gridScoped:s,gridId:o,rowModelType:i,additionalText:n,isUmd:r})=>{const l=vP(t,i),a=typeof e=="string"?e:xP[e];if(r)return yP(a,l);const d=l.filter(h=>h==="IntegratedCharts"||h==="Sparklines"),c=d.length>0?`${d.map(h=>cr(h)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${a} as ${l.length>1?"one of "+l.map(h=>cr(h)).join(", "):cr(l[0])} is not registered${s?" for gridId: "+o:""}. ${c} Check if you have registered the module:
65
+ `}
66
+ ${wP(l)}`+(n?`
67
+
68
+ ${n}`:"")},tC=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
69
+
70
+ import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
71
+ import { ModuleRegistry } from 'ag-grid-community';
72
+ import { ${e} } from 'ag-grid-enterprise';
73
+
74
+ ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
75
+ `,bP=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.`,SP={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?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${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:s})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",s],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:
76
+ "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.
77
+ Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
78
+ 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}
79
+ ${bP(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:s,pageSizeOptions:o})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${s?"":" the default"} paginationPageSizeSelector=[${o?.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.",100:({rowModelType:e})=>`selectAll only available when rowModelType='clientSide', ie not ${e}`,101:({propertyName:e,componentName:t,agGridDefaults:s,jsComps:o})=>{const i=[],n=[...Object.keys(s??[]).filter(l=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(l)),...Object.keys(o??[])],r=Zm({inputValue:t,allSuggestions:n,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return i.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
80
+ `),r.length>0&&i.push(` Did you mean: [${r.slice(0,3)}]?
81
+ `),i.push("If using a custom component check it has been registered correctly."),i},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: ${ei}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({aggFuncOrString:e})=>`unrecognised aggregation function ${e}`,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.
82
+ 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:s})=>["duplicate group keys for row data, keys should be unique",e,t,...s??[]],187:({rowId:e,firstData:t,secondData:s})=>[`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",s],188:()=>"getRowId callback must be provided for Server Side Row Model 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:eC,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 ${ei}/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.
83
+ 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.
84
+ Your code probably called a grid API method while the grid was in the render stage.
85
+ To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
86
+ 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?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>tC("IntegratedChartsModule"),258:()=>tC("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:s,gridId:o,rowModelType:i})=>eC({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Ji[t],gridId:o,gridScoped:s,rowModelType:i}),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 ${ei}/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.`};function RP(e,t){const s=SP[e];if(!s)return[`Missing error text for error id ${e}!`];const o=s(t),n=`
87
+ See ${kg(e,t)}`;return Array.isArray(o)?o.concat(n):[o,n]}var xP={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},FP=()=>({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."}}),DP=()=>({aggFunc:{module:"SharedAggregation"},autoHeight:{supportedRowModels:["clientSide","serverSide"],module:"RowAutoHeight"},cellClass:{module:"CellStyle"},cellClassRules:{module:"CellStyle"},cellEditor:({cellEditor:e,editable:t})=>{if(!t)return null;if(typeof e=="string"){const s=Ji[e];if(s)return{module:s}}return{module:"CustomEditor"}},cellRenderer:({cellRenderer:e})=>{if(typeof e!="string")return null;const t=Ji[e];return t?{module:t}:null},cellRendererParams:{validate:e=>(e.rowGroup!=null||e.rowGroupIndex!=null||e.cellRenderer==="agGroupCellRenderer")&&"checkbox"in e.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},cellStyle:{module:"CellStyle"},children:()=>sC(),columnChooserParams:{module:"ColumnMenu"},contextMenuItems:{module:"ContextMenu"},dndSource:{module:"DragAndDrop"},dndSourceOnRowDrag:{module:"DragAndDrop"},editable:({editable:e,cellEditor:t})=>e&&!t?{module:"TextEditor"}:null,enableCellChangeFlash:{module:"HighlightChanges"},enablePivot:{module:"SharedPivot"},enableRowGroup:{module:"SharedRowGrouping"},enableValue:{module:"SharedAggregation"},filter:({filter:e})=>{if(e&&typeof e!="string"&&typeof e!="boolean")return{module:"CustomFilter"};if(typeof e=="string"){const t=Ji[e];if(t)return{module:t}}return{module:"ColumnFilter"}},floatingFilter:{module:"ColumnFilter"},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerTooltip:{module:"Tooltip"},headerValueGetter:{validate:e=>{const t=e.headerValueGetter;return typeof t=="function"||typeof t=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:e})=>{if(e){if(e.smallDown)return Do(262);if(e.smallLeft)return Do(263);if(e.smallRight)return Do(264)}return null}},mainMenuItems:{module:"ColumnMenu"},menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(s=>t.includes(s))?{module:"ColumnMenu"}:null},pivot:{module:"SharedPivot"},pivotIndex:{module:"SharedPivot"},rowDrag:{module:"RowDrag"},rowGroup:{module:"SharedRowGrouping"},rowGroupIndex:{module:"SharedRowGrouping"},sortingOrder:{validate:e=>{const t=e.sortingOrder;if(Array.isArray(t)&&t.length>0){const s=t.filter(o=>!dr.includes(o));if(s.length>0)return`sortingOrder must be an array with elements from [${dr.map(bl).join()}], currently it includes [${s.map(bl).join()}]`}else if(!Array.isArray(t)||t.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${t}`;return null}},tooltipField:{module:"Tooltip"},tooltipValueGetter:{module:"Tooltip"},type:{validate:e=>{const t=e.type;return t instanceof Array?t.some(o=>typeof o!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof t=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(e,{suppressRowTransform:t})=>t?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{module:"CellSpan",dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[!1,void 0]},rowSpan:{required:[!1,void 0]}},validate:(e,{rowSelection:t,cellSelection:s,suppressRowTransform:o,enableCellSpan:i,rowDragEntireRow:n,enableCellTextSelection:r})=>typeof t=="object"&&t?.mode==="singleRow"&&t?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":s?"colDef.spanRows is not supported with cellSelection.":o?"colDef.spanRows is not supported with suppressRowTransform.":i?n?"colDef.spanRows is not supported with rowDragEntireRow.":r?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."}}),EP={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,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,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},MP=()=>Object.keys(EP),sC=()=>({objectName:"colDef",allProperties:MP(),docsUrl:"column-properties/",deprecations:FP(),validations:DP()}),AP=()=>({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."}});function Us(e,t,s,o=Number.MAX_VALUE){return typeof t=="number"||t==null?t==null||t>=s&&t<=o?null:o===Number.MAX_VALUE?`${e}: value should be greater than or equal to ${s}`:`${e}: value should be between ${s} and ${o}`:`${e}: value should be a number`}var PP=()=>{const e={alignedGrids:{module:"AlignedGrids"},allowContextMenuWithControlKey:{module:"ContextMenu"},autoSizePadding:{validate({autoSizePadding:s}){return Us("autoSizePadding",s,0)}},autoSizeStrategy:{module:"ColumnAutoSize"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:s}){return Us("cacheBlockSize",s,1)}},cacheOverflowSize:{validate({cacheOverflowSize:s}){return Us("cacheOverflowSize",s,1)}},cellSelection:{module:"CellSelection"},columnHoverHighlight:{module:"ColumnHover"},datasource:{supportedRowModels:["infinite"],module:"InfiniteRowModel"},doesExternalFilterPass:{module:"ExternalFilter"},domLayout:{validate:s=>{const o=s.domLayout,i=["autoHeight","normal","print"];return o&&!i.includes(o)?`domLayout must be one of [${i.join()}], currently it's ${o}`:null}},editType:{module:"EditCore"},enableAdvancedFilter:{module:"AdvancedFilter"},enableCharts:{module:"IntegratedCharts"},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{module:"CellSelection",dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},findSearchValue:{module:"Find"},rowNumbers:{module:"RowNumbers"},getContextMenuItems:{module:"ContextMenu"},getLocaleText:{module:"Locale"},getMainMenuItems:{module:"ColumnMenu"},getRowClass:{module:"RowStyle"},getRowStyle:{module:"RowStyle"},grandTotalRow:{module:"SharedRowGrouping"},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"]}}},icons:{validate:({icons:s})=>{if(s){if(s.smallDown)return Do(262);if(s.smallLeft)return Do(263);if(s.smallRight)return Do(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:s}){return Us("infiniteInitialRowCount",s,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},initialState:{module:"GridState"},isExternalFilterPresent:{module:"ExternalFilter"},keepDetailRowsCount:{validate({keepDetailRowsCount:s}){return Us("keepDetailRowsCount",s,1)}},localeText:{module:"Locale"},masterDetail:{module:"SharedMasterDetail"},pagination:{module:"Pagination"},paginationPageSize:{validate({paginationPageSize:s}){return Us("paginationPageSize",s,1)}},paginationPageSizeSelector:{validate:s=>{const o=s.paginationPageSizeSelector;return typeof o=="boolean"||o==null||o.length?null:`'paginationPageSizeSelector' cannot be an empty array.
88
+ If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pinnedTopRowData:{module:"PinnedRow"},pinnedBottomRowData:{module:"PinnedRow"},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}},module:"SharedPivot"},pivotPanelShow:{module:"RowGroupingPanel"},quickFilterText:{supportedRowModels:["clientSide"],module:"QuickFilter"},rowBuffer:{validate({rowBuffer:s}){return Us("rowBuffer",s,0)}},rowClass:{validate:s=>typeof s.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null,module:"RowStyle"},rowClassRules:{module:"RowStyle"},rowData:{supportedRowModels:["clientSide"],module:"ClientSideRowModel"},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{treeData:{required:[!1,void 0]},pagination:{required:[!1,void 0]}},module:"RowDrag"},rowGroupPanelShow:{module:"RowGroupingPanel"},rowSelection:{validate({rowSelection:s}){return s&&typeof s=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':s&&typeof s!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":s&&s.mode!=="multiRow"&&s.mode!=="singleRow"?`Selection mode "${s.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null},module:"SharedRowSelection"},rowStyle:{validate:s=>{const o=s.rowStyle;return o&&typeof o=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null},module:"RowStyle"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"ServerSideRowModel"},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:s}){return Us("serverSideInitialRowCount",s,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sideBar:{module:"SideBar"},sortingOrder:{validate:s=>{const o=s.sortingOrder;if(Array.isArray(o)&&o.length>0){const i=o.filter(n=>!dr.includes(n));if(i.length>0)return`sortingOrder must be an array with elements from [${dr.map(bl).join()}], currently it includes [${i.map(bl).join()}]`}else if(!Array.isArray(o)||o.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${o}`;return null}},statusBar:{module:"StatusBar"},tooltipHideDelay:{validate:s=>s.tooltipHideDelay&&s.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:s=>s.tooltipShowDelay&&s.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],module:"SharedTreeData",validate:s=>{const o=s.rowModelType??"clientSide";switch(o){case"clientSide":{const{treeDataChildrenField:i,treeDataParentIdField:n,getDataPath:r,getRowId:l}=s;if(!i&&!n&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(i){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!l)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 i=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${o} row model.`;return s.isServerSideGroup&&s.getServerSideGroupKey?null:i}}return null}},treeDataChildrenField:{module:"SharedTreeData"},treeDataParentIdField:{module:"SharedTreeData"},undoRedoCellEditing:{module:"UndoRedoEdit"},valueCache:{module:"ValueCache"},viewportDatasource:{supportedRowModels:["viewport"],module:"ViewportRowModel"},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:s}){return Us("viewportRowModelBufferSize",s,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:s}){return Us("viewportRowModelPageSize",s,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},enableCellSpan:{module:"CellSpan"},autoGroupColumnDef:{validate({autoGroupColumnDef:s,showOpenedGroup:o}){return s?.field&&o?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":s?.valueGetter&&o?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}}},t={};return Qm.forEach(s=>{t[s]={expectedType:"boolean"}}),Xm.forEach(s=>{t[s]={expectedType:"number"}}),gt(t,e),t},IP=()=>({objectName:"gridOptions",allProperties:[...Xc,...qm.map(e=>ec(e))],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:AP(),validations:PP()}),TP={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,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},LP={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",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",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"},kP=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),OP={pinSubMenu:"PinnedColumn",pinLeft:"PinnedColumn",pinRight:"PinnedColumn",clearPinned:"PinnedColumn",valueAggSubMenu:"SharedAggregation",autoSizeThis:"ColumnAutoSize",autoSizeAll:"ColumnAutoSize",rowGroup:"SharedRowGrouping",rowUnGroup:"SharedRowGrouping",resetColumns:"CommunityCore",expandAll:["ClientSideRowModelHierarchy","ServerSideRowModel"],contractAll:["ClientSideRowModelHierarchy","ServerSideRowModel"],copy:"Clipboard",copyWithHeaders:"Clipboard",copyWithGroupHeaders:"Clipboard",cut:"Clipboard",paste:"Clipboard",export:["CsvExport","ExcelExport"],csvExport:"CsvExport",excelExport:"ExcelExport",separator:"CommunityCore",pivotChart:"IntegratedCharts",chartRange:"IntegratedCharts",columnFilter:"ColumnFilter",columnChooser:"ColumnMenu",sortAscending:"Sort",sortDescending:"Sort",sortUnSort:"Sort"},GP=class extends F{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,KS(this)}postConstruct(){this.processGridOptions(this.gridOptions)}warnOnInitialPropertyUpdate(e,t){e==="api"&&hP[t]&&I(22,{key:t})}processGridOptions(e){this.processOptions(e,IP())}validateApiFunction(e,t){return fP(e,t,this.beans)}missingUserComponent(e,t,s,o){const i=Ji[t];i?this.gos.assertModuleRegistered(i,`AG Grid '${e}' component: ${t}`):I(101,{propertyName:e,componentName:t,agGridDefaults:s,jsComps:o})}checkRowEvents(e){_P.has(e)&&I(10,{eventType:e})}validateIcon(e){if(kP.has(e)&&I(43,{iconName:e}),TP[e])return;const t=LP[e];if(t){ue(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:dc(),gridId:this.beans.context.getGridId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}I(134,{iconName:e})}validateMenuItem(e){const t=OP[e];t&&this.gos.assertModuleRegistered(t,`menu item '${e}'`)}isProvidedUserComp(e){return!!Ji[e]}validateColDef(e,t,s){(s||!this.beans.dataTypeSvc?.isColPendingInference(t))&&this.processOptions(e,sC())}processOptions(e,t){const{validations:s,deprecations:o,allProperties:i,propertyExceptions:n,objectName:r,docsUrl:l}=t;i&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(o)],i,r,l);const a=new Set,d=u=>{const h=s[u];if(h)if(typeof h=="function"){const p=h(e,this.gridOptions,this.beans);if(!p)return;if("objectName"in p){const g=e[u];if(Array.isArray(g)){g.forEach(f=>{this.processOptions(f,p)});return}this.processOptions(e[u],p);return}return p}else return h;else return};Object.keys(e).forEach(u=>{const h=o[u];if(h){const{message:w,version:b}=h;a.add(`As of v${b}, ${String(u)} is deprecated. ${w??""}`)}const p=e[u];if(p==null||p===!1)return;const g=d(u);if(!g)return;const{module:f,dependencies:m,validate:v,supportedRowModels:y,expectedType:R}=g;if(R){const w=typeof p;if(w!==R){a.add(`${String(u)} should be of type '${R}' but received '${w}' (${p}).`);return}}if(y){const w=this.gridOptions.rowModelType??"clientSide";if(!y.includes(w)){a.add(`${String(u)} is not supported with the '${w}' row model. It is only valid with: ${y.join(", ")}.`);return}}if(f){const w=Array.isArray(f)?f:[f];let b=!0;if(w.forEach(x=>{this.gos.assertModuleRegistered(x,String(u))||(b=!1)}),!b)return}if(m){const w=this.checkForRequiredDependencies(u,m,e);if(w){a.add(w);return}}if(v){const w=v(e,this.gridOptions,this.beans);if(w){a.add(w);return}}}),a.size>0&&a.forEach(u=>{Yn(u)})}checkForRequiredDependencies(e,t,s){const i=Object.entries(t).filter(([n,r])=>{const l=s[n];return!r.required.includes(l)});return i.length===0?null:i.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(l=>l===null?"null":l===void 0?"undefined":l).join(", ")}]. ${r.reason??""}`).join(`
89
+ `)}checkProperties(e,t,s,o,i){const n=["__ob__","__v_skip","__metadata__"],r=NP(Object.getOwnPropertyNames(e),[...n,...t,...s],s),l=Object.keys(r);for(const a of l){const d=r[a];let c=`invalid ${o} property '${a}' did you mean any of these: ${d.slice(0,8).join(", ")}.`;s.includes("context")&&(c+=`
90
+ If you are trying to annotate ${o} with application data, use the '${o}.context' property instead.`),Yn(c)}if(l.length>0&&i){const a=this.beans.frameworkOverrides.getDocLink(i);Yn(`to see all the valid ${o} properties please check: ${a}`)}}getConsoleMessage(e,t){return RP(e,t)}};function NP(e,t,s){const o={},i=e.filter(n=>!t.some(r=>r===n));return i.length>0&&i.forEach(n=>o[n]=Zm({inputValue:n,allSuggestions:s}).values),o}var _P=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),BP={moduleName:"Validation",version:Ce,beans:[GP]};function oC(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}var HP=class extends F{constructor(){super(...arguments),this.beanName="filterStage",this.refreshProps=new Set(["excludeChildrenWhenTreeDataFiltering"]),this.step="filter"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const s=(o,i)=>{o.hasChildren()&&e&&!i?o.childrenAfterFilter=o.childrenAfterGroup.filter(n=>{const r=n.childrenAfterFilter&&n.childrenAfterFilter.length>0,l=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return r||l}):o.childrenAfterFilter=o.childrenAfterGroup,oC(o)};if(this.doingTreeDataFiltering()){const o=(n,r)=>{if(n.childrenAfterGroup)for(let l=0;l<n.childrenAfterGroup.length;l++){const a=n.childrenAfterGroup[l],d=r||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?o(n.childrenAfterGroup[l],d):s(a,d)}s(n,r)},i=n=>o(n,!1);t.executeFromRootNode(i)}else{const o=i=>s(i,!1);t.forEachChangedNodeDepthFirst(o,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},VP=class extends Ec{constructor(){super(...arguments),this.iconCreated=!1}setComp(e,t,s,o,i){this.comp=e;const n=tr(this,this.beans.context,i);this.eButtonShowMainFilter=s,this.eFloatingFilterBody=o,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n),n.addManagedListeners(this.column,{colDefChanged:()=>this.onColDefChanged(n)}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.colDef;return he(t.gos,{colDef:s,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,s=!!e.floatingFilter;this.active=t&&s}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=pe("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new ji(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();Kt(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(Be(t)===this.eGui)return;const i=ho(t,this.eGui,null,e.shiftKey);if(i){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),i.focus();return}const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let s=this.column;do if(s=e?t.getColBefore(s):t.getColAfter(s),!s)break;while(!s.getColDef().filter||!s.getColDef().floatingFilter);return s}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case D.UP:case D.DOWN:t||e.preventDefault();case D.LEFT:case D.RIGHT:if(t)return;e.stopPropagation();case D.ENTER:t&&ys(this.eGui)&&e.preventDefault();break;case D.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const s=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&Jo(e.relatedTarget,"ag-floating-filter");if(s&&o&&e.target===this.eGui){const i=this.lastFocusEvent,n=!!(i&&i.key===D.TAB);if(i&&n){const r=i.shiftKey;ys(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new Dc(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!rt(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{filterManager:t}=this.beans,s=o=>{if(o?.source==="filterDestroyed"&&!this.isAlive())return;const i=this.comp.getFloatingFilterComp();i&&i.then(n=>{if(n){const r=t?.getCurrentFloatingFilterParentModel(this.column),l=o?{...o,columns:o.columns??[],source:o.source==="api"?"api":"columnFilter"}:null;n.onParentModelChanged(r,l)}})};[this.destroySyncListener]=e.addManagedListeners(this.column,{filterChanged:s}),t?.isFilterActive(this.column)&&s(null)}setupWidth(e){const t=()=>{const s=`${this.column.getActualWidth()}px`;this.comp.setWidth(s)};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(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const s=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const o=this.active?this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,i=this.comp.getFloatingFilterComp();!i||!o?this.updateCompDetails(e,o,s):i.then(n=>{!n||this.beans.filterManager?.areFilterCompsDifferent(this.userCompDetails??null,o)?this.updateCompDetails(e,o,s):this.updateFloatingFilterParams(o)})}updateCompDetails(e,t,s){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),s&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e){if(!e)return;const t=e.params;this.comp.getFloatingFilterComp()?.then(s=>{s?.refresh&&typeof s.refresh=="function"&&s.refresh(t)})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function WP(e,t){const s=e.colModel.getCol(t);if(!s){ue(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:s,positionBy:"auto"})}function zP(e){e.menuSvc?.hidePopupMenu()}var iC={moduleName:"SharedMenu",version:Ce,beans:[uD],apiFunctions:{showColumnMenu:WP,hidePopupMenu:zP}},UP=0,$P=200,jP=class extends F{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:s,column:o,node:i,event:n}=e,r=t.getBoundingClientRect(),l=this.getParentRect();this.setAlignedTo(t,s);let a=!1;const d=()=>{const c=this.keepXYWithinBounds(s,r.top-l.top,0),u=s.clientWidth>0?s.clientWidth:200;a||(s.style.minWidth=`${u}px`,a=!0);const p=l.right-l.left-u;let g;return this.gos.get("enableRtl")?(g=m(),g<0&&(g=f(),this.setAlignedStyles(s,"left")),g>p&&(g=0,this.setAlignedStyles(s,"right"))):(g=f(),g>p&&(g=m(),this.setAlignedStyles(s,"right")),g<0&&(g=0,this.setAlignedStyles(s,"left"))),{x:g,y:c};function f(){return r.right-l.left-2}function m(){return r.left-l.left-u}};this.positionPopup({ePopup:s,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",s,t,n instanceof MouseEvent?n:void 0,o,i)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:s,nudgeY:o,skipObserver:i}=e;this.positionPopup({ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:!0,skipObserver:i,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:i,eventSource:n,alignSide:r="left",position:l="over",column:a,rowNode:d,type:c}=e,u=n.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(n,t);const p=()=>{let g=u.left-h.left;r==="right"&&(g-=t.offsetWidth-u.width);let f;return l==="over"?(f=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?f=u.top-h.top+u.height:f=u.top-t.offsetHeight-(o||0)*2-h.top),{x:g,y:f}};this.positionPopup({ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:i,updatePosition:p,postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,a,d)})}shouldRenderUnderOrAbove(e,t,s,o){const i=s.bottom-t.bottom,n=t.top-s.top,r=e.offsetHeight+o;return i>r?"under":n>r||n>i?"above":"under"}setAlignedStyles(e,t){const s=this.getPopupIndex(e);if(s===-1)return;const o=this.popupList[s],{alignedToElement:i}=o;!i||(["right","left","over","above","under"].forEach(r=>{i.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(i.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const s=this.getPopupIndex(t);if(s!==-1){const o=this.popupList[s];o.alignedToElement=e}}callPostProcessPopup(e,t,s,o,i,n){const r=this.gos.getCallback("postProcessPopup");r&&r({column:i,rowNode:n,ePopup:t,type:e,eventSource:s,mouseEvent:o})}positionPopup(e){const{ePopup:t,keepWithinBounds:s,nudgeX:o,nudgeY:i,skipObserver:n,updatePosition:r}=e,l={width:0,height:0},a=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,o&&(c+=o),i&&(u+=i),s&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!n){const d=Fo(this.beans,t,()=>a(!0));setTimeout(()=>d(),$P)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=Xe(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),mg(t)}keepXYWithinBounds(e,t,s){const o=s===0,i=o?"clientHeight":"clientWidth",n=o?"top":"left",r=o?"height":"width",l=o?"scrollTop":"scrollLeft",a=Xe(this.beans),d=a.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),p=a.documentElement.getBoundingClientRect(),g=c===a.body,f=Math.ceil(u[r]);let v=g?(o?gg:fg)(d)+d[l]:c[i];g&&(v-=Math.abs(p[n]-h[n]));const y=v-f;return Math.min(Math.max(t,0),Math.abs(y))}addPopup(e){const t=Xe(this.beans),{eChild:s,ariaLabel:o,alwaysOnTop:i,positionCallback:n,anchorToElement:r}=e;if(!t)return I(122),{hideFunc:()=>{}};const l=this.getPopupIndex(s);if(l!==-1)return{hideFunc:this.popupList[l].hideFunc};this.initialisePopupPosition(s);const a=this.createPopupWrapper(s,o,!!i),d=this.addEventListenersToPopup({...e,wrapperEl:a});return n&&n(),this.addPopupToPopupList(s,a,d,r),{hideFunc:d}}initialisePopupPosition(e){const s=this.getPopupParent().getBoundingClientRect();j(e.style.top)||(e.style.top=`${s.top*-1}px`),j(e.style.left)||(e.style.left=`${s.left*-1}px`)}createPopupWrapper(e,t,s){const o=this.getPopupParent(),{environment:i,gos:n}=this.beans,r=Ne({tag:"div"});return i.applyThemeClasses(r),r.classList.add("ag-popup"),e.classList.add(n.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||os(e,"dialog"),Kt(e,t),r.appendChild(e),o.appendChild(r),s?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),r}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const s of this.popupList)t.applyThemeClasses(s.wrapper)}}addEventListenersToPopup(e){const t=this.beans,s=Xe(t),o=this.getPopupParent(),{wrapperEl:i,eChild:n,closedCallback:r,afterGuiAttached:l,closeOnEsc:a,modal:d}=e;let c=!1;const u=f=>{if(!i.contains(Be(t)))return;f.key===D.ESCAPE&&!vs(f)&&g({keyboardEvent:f})},h=f=>g({mouseEvent:f}),p=f=>g({touchEvent:f}),g=(f={})=>{const{mouseEvent:m,touchEvent:v,keyboardEvent:y,forceHide:R}=f;!R&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:v},n)||c)||(c=!0,o.removeChild(i),s.removeEventListener("keydown",u),s.removeEventListener("mousedown",h),s.removeEventListener("touchstart",p),s.removeEventListener("contextmenu",h),this.eventSvc.removeEventListener("dragStarted",h),r&&r(m||v||y),this.removePopupFromPopupList(n))};return l&&l({hidePopup:g}),window.setTimeout(()=>{a&&s.addEventListener("keydown",u),d&&(s.addEventListener("mousedown",h),this.eventSvc.addEventListener("dragStarted",h),s.addEventListener("touchstart",p),s.addEventListener("contextmenu",h))},0),g}addPopupToPopupList(e,t,s,o){this.popupList.push({element:e,wrapper:t,hideFunc:s,instanceId:UP++,isAnchored:!!o}),o&&this.setPopupPositionRelatedToElement(e,o)}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const s=this.getPopupIndex(e);if(s===-1)return;const o=this.popupList[s];if(o.stopAnchoringPromise&&o.stopAnchoringPromise.then(n=>n&&n()),o.stopAnchoringPromise=void 0,o.isAnchored=!1,!t)return;const i=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:o.hideFunc});return o.stopAnchoringPromise=i,o.isAnchored=!0,i}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),s=t.getBoundingClientRect(),{element:o,ePopup:i}=e,n=o.getBoundingClientRect(),r=u=>parseInt(u.substring(0,u.length-1),10),l=(u,h)=>{const p=s[u]-n[u],g=r(i.style[u]);return{initialDiff:p,lastDiff:p,initial:g,last:g,direction:h}},a=l("top",0),d=l("left",1),c=this.beans.frameworkOverrides;return new Oe(u=>{c.wrapIncoming(()=>{c.setInterval(()=>{const h=t.getBoundingClientRect(),p=o.getBoundingClientRect();if(p.top==0&&p.left==0&&p.height==0&&p.width==0){e.hidePopup();return}const f=(m,v)=>{const y=r(i.style[v]);m.last!==y&&(m.initial=y,m.last=y);const R=h[v]-p[v];if(R!=m.lastDiff){const w=this.keepXYWithinBounds(i,m.initial+m.initialDiff-R,m.direction);i.style[v]=`${w}px`,m.last=w}m.lastDiff=R};f(a,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:s,touchEvent:o}=e,i=s||o;if(!i)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const l=this.popupList[r];if(sc(l.element,i))return!0}return this.isElementWithinCustomPopup(i.target)}isElementWithinCustomPopup(e){const t=Xe(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 s=this.getWrapper(e);s&&(s.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(s))}bringPopupToFront(e){const t=this.getPopupParent(),s=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),o=s.length,i=this.getWrapper(e);if(!i||o<=1||!t.contains(e))return;const n=[],r=[];for(const h of s)h!==i&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const l=[],a=r.length,u=i.classList.contains("ag-always-on-top")||!a?[...n,...r,i]:[...n,i,...r];for(let h=0;h<=o;h++){const p=u[h];if(s[h]===u[h]||p===i)continue;p.querySelectorAll("div").forEach(f=>{f.scrollTop!==0&&l.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",p):u[h-1].insertAdjacentElement("afterend",p)}for(;l.length;){const h=l.pop();h[0].scrollTop=h[1]}}},nC={moduleName:"Popup",version:Ce,beans:[jP]},KP=".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]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-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:1px solid 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 YP(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function qP(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function XP(e,t){const s=e.colModel.getColDefCol(t);if(s)return e.filterManager?.destroyFilter(s,"api")}function QP(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function ZP(e){return e.filterManager?.getFilterModel()??{}}function JP(e,t){return e.filterManager?.getColumnFilterModel(t)??null}function eI(e,t,s){return e.filterManager?.setColumnFilterModel(t,s)??Promise.resolve()}function tI(e,t){const s=e.colModel.getCol(t);if(!s){ue(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:s,containerType:"columnFilter",positionBy:"auto"})}var rC={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},lC=["january","february","march","april","may","june","july","august","september","october","november","december"];function sI(e,t){return e==null?-1:t==null?1:parseFloat(e)-parseFloat(t)}var oI=class extends F{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[]}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),beforeRefreshModel:({params:e})=>{(e.rowDataUpdated||e.changedProps?.has("treeData"))&&this.onNewRowsLoaded("rowDataUpdated")},dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.initialFilterModel={...this.gos.get("initialState")?.filter?.filterModel??{}}}setFilterModel(e,t="api"){const{colModel:s,dataTypeSvc:o,filterManager:i}=this.beans;if(o?.isPendingInference){this.filterModelUpdateQueue.push({model:e,source:t});return}const n=[],r=this.getFilterModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((a,d)=>{const c=e[d];n.push(sa(a.filterPromise,c)),l.delete(d)}),l.forEach(a=>{const d=s.getColDefCol(a)||s.getCol(a);if(!d){I(62,{colId:a});return}if(!d.isFilterAllowed()){I(63,{colId:a});return}const c=this.getOrCreateFilterWrapper(d);if(!c){I(64,{colId:a});return}n.push(sa(c.filterPromise,e[a]))})}else this.allColumnFilters.forEach(l=>{n.push(sa(l.filterPromise,null))});Oe.all(n).then(()=>{const l=this.getFilterModel(!0),a=[];this.allColumnFilters.forEach((d,c)=>{const u=r?r[c]:null,h=l?l[c]:null;jn(u,h)||a.push(d.column)}),a.length>0&&i?.onFilterChanged({columns:a,source:t})})}getFilterModel(e){const t={},{allColumnFilters:s,initialFilterModel:o,beans:{colModel:i}}=this;if(s.forEach((n,r)=>{const l=this.getModelFromFilterWrapper(n);j(l)&&(t[r]=l)}),!e)for(const n of Object.keys(o)){const r=o[n];j(r)&&!s.has(n)&&i.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}getModelFromFilterWrapper(e){const{filter:t}=e;return t?typeof t.getModel!="function"?(I(66),null):t.getModel():this.getModelFromInitialState(e.column)}getModelFromInitialState(e){return this.initialFilterModel[e.getColId()]??null}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}disableColumnFilters(){this.initialFilterModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){const e=l=>l?l.isFilterActive?l.isFilterActive():(I(67),!1):!1,{colModel:t,gos:s}=this.beans,o=!!qn(s),i=l=>{if(!l.isPrimary())return!0;const d=!t.isPivotActive();return!l.isValueActive()||!d?!1:t.isPivotMode()?!0:o},n=[],r=[];return this.forEachColumnFilter((l,a)=>{e(l)&&(i(a.column)?n.push(l):r.push(l))}).then(()=>{this.activeAggregateFilters=n,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){return this.forEachColumnFilter((s,o)=>this.setColFilterActive(o.column,s.isFilterActive(),e,t))}forEachColumnFilter(e){const t=[];return this.allColumnFilters.forEach(s=>{const o=s.filterPromise;o&&t.push(o.then(i=>e(i,s)))}),Oe.all(t)}doColumnFiltersPass(e,t,s){const{data:o,aggData:i}=e,n=s?this.activeAggregateFilters:this.activeColumnFilters,r=s?i:o;for(let l=0;l<n.length;l++){const a=n[l];if(!(a==null||a===t)){if(typeof a.doesFilterPass!="function"){ue(91);continue}if(!a.doesFilterPass({node:e,data:r}))return!1}}return!0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:s}=this.beans,o=()=>{this.isAlive()&&s?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(o,0):o()}updateBeforeFilterChanged(e={}){const{filterInstance:t,additionalEventAttributes:s}=e;return this.updateDependentFilters(),this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",s).then(()=>{this.allColumnFilters.forEach(o=>{o.filterPromise&&o.filterPromise.then(i=>{i&&i!==t&&i.onAnyFilterChanged&&i.onAnyFilterChanged()})}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){this.forEachColumnFilter(t=>{t.onNewRowsLoaded?.()}).then(()=>this.updateFilterFlagInColumns(e,{afterDataChange:!0})).then(()=>this.updateActiveFilters())}createGetValue(e){const{filterValueSvc:t,colModel:s}=this.beans;return(o,i)=>{const n=i?s.getCol(i):e;return n?t.getValue(n,o):void 0}}isFilterActive(e){const{filter:t}=this.cachedFilter(e)??{};return t?t.isFilterActive():this.getModelFromInitialState(e)!=null}getOrCreateFilterWrapper(e){if(!e.isFilterAllowed())return null;let t=this.cachedFilter(e);return t||(t=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,t)),t}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;const{gos:s,dataTypeSvc:o}=this.beans;if(Jd(s))t="agSetColumnFilter";else{const i=o?.getBaseDataType(e);i==="number"?t="agNumberColumnFilter":i==="date"||i==="dateString"?t="agDateColumnFilter":t="agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;const{gos:s,dataTypeSvc:o}=this.beans;if(Jd(s))t="agSetColumnFloatingFilter";else{const i=o?.getBaseDataType(e);i==="number"?t="agNumberColumnFloatingFilter":i==="date"||i==="dateString"?t="agDateColumnFloatingFilter":t="agTextColumnFloatingFilter"}return t}createFilterInstance(e,t){const s=this.getDefaultFilter(e),o=e.getColDef();let i;const n={...this.createFilterParams(e,o),filterModifiedCallback:()=>this.filterModifiedCallbackFactory(i,e)(),filterChangedCallback:l=>this.filterChangedCallbackFactory(i,e)(l),doesRowPassOtherFilter:l=>this.beans.filterManager?.doesRowPassOtherFilters(i,l)??!0},r=gx(this.beans.userCompFactory,o,n,s);return r?{filterPromise:()=>{const l=r.newAgStackInstance();return l.then(a=>{i=a,t&&(t.filter=a??void 0)}),l},compDetails:r}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return he(this.gos,{column:e,colDef:t,rowModel:this.beans.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e){const t={column:e,filterPromise:null,compDetails:null},{filterPromise:s,compDetails:o}=this.createFilterInstance(e,t);return t.filterPromise=s?.()??null,t.compDetails=o,t}onColumnsChanged(){const e=[],{colModel:t,filterManager:s}=this.beans;this.allColumnFilters.forEach((i,n)=>{let r;i.column.isPrimary()?r=t.getColDefCol(n):r=t.getCol(n),!(r&&r===i.column)&&(e.push(i.column),this.disposeFilterWrapper(i,"columnChanged"),this.disposeColumnListener(n))});const o=e.every(aC);e.length>0&&!o?s?.onFilterChanged({columns:e,source:"api"}):this.updateDependentFilters()}updateDependentFilters(){this.beans.autoColSvc?.getColumns()?.forEach(e=>{aC(e)&&this.getOrCreateFilterWrapper(e)})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const{filter:s}=this.allColumnFilters.get(e.getColId())??{};return s&&typeof s?.isFilterAllowed=="function"?s.isFilterAllowed():!0}getFloatingFilterCompDetails(e,t){const s=c=>{const u=this.getOrCreateFilterWrapper(e)?.filterPromise;u?.then(h=>{c(Cf(h))})},o=e.getColDef(),i={...this.createFilterParams(e,o),filterChangedCallback:()=>s(c=>this.filterChangedCallbackFactory(c,e)())},{userCompFactory:n,frameworkOverrides:r}=this.beans,l=wx(n,o,i);let a=pF(r,o,()=>this.getDefaultFloatingFilter(e));a==null&&(a="agReadOnlyFloatingFilter");const d=he(this.gos,{column:e,filterParams:l,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:s,showParentFilter:t});return Cx(n,o,d,a)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilter(e,t="api"){const s=e.getColId(),o=this.allColumnFilters.get(s);this.disposeColumnListener(s),delete this.initialFilterModel[s],o&&this.disposeFilterWrapper(o,t).then(i=>{i&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){return e.filterPromise?.then(s=>{const o=!!s?.isFilterActive();return this.destroyBean(s),this.setColFilterActive(e.column,!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId()),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:e.column}),o})??Oe.resolve(!1)}filterModifiedCallbackFactory(e,t){return()=>{this.eventSvc.dispatchEvent({type:"filterModified",column:t,filterInstance:e})}}filterChangedCallbackFactory(e,t){return s=>{const o=s?.source??"columnFilter",i={filter:e,additionalEventAttributes:s,columns:[t],source:o};this.callOnFilterChangedOutsideRenderCycle(i)}}checkDestroyFilter(e){const t=this.allColumnFilters.get(e);if(!t)return;const s=t.column,{compDetails:o}=s.isFilterAllowed()?this.createFilterInstance(s):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,o)){this.destroyFilter(s,"paramsUpdated");return}const i=s.getColDef().filterParams;if(!t.filterPromise){this.destroyFilter(s,"paramsUpdated");return}t.filterPromise.then(n=>{(n?.refresh?n.refresh({...this.createFilterParams(s,s.getColDef()),filterModifiedCallback:this.filterModifiedCallbackFactory(n,s),filterChangedCallback:this.filterChangedCallbackFactory(n,s),doesRowPassOtherFilter:l=>this.beans.filterManager?.doesRowPassOtherFilters(n,l)??!0,...i}):!0)===!1&&this.destroyFilter(s,"paramsUpdated")})}setColumnFilterWrapper(e,t){const s=e.getColId();this.allColumnFilters.set(s,t),this.allColumnListeners.set(s,this.addManagedListeners(e,{colDefChanged:()=>this.checkDestroyFilter(s)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:s}=e,{componentClass:o}=t;return!(s===o||s?.render&&o?.render&&s.render===o.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstanceImpl(e).then(s=>{t(Cf(s))})})}getFilterInstanceImpl(e){const t=this.beans.colModel.getColDefCol(e);return t?this.getOrCreateFilterWrapper(t)?.filterPromise??Oe.resolve(null):Oe.resolve(void 0)}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:s})=>{this.setColumnFilterModel(e,t).then(()=>s())}),this.columnFilterModelUpdateQueue=[]}getColumnFilterModel(e){const t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){const{colModel:s,dataTypeSvc:o}=this.beans;if(o?.isPendingInference){let l=()=>{};const a=new Promise(d=>{l=d});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:l}),a}const i=s.getColDefCol(e),n=i?this.getOrCreateFilterWrapper(i):null;return n?(l=>new Promise(a=>{l.then(d=>a(d))}))(sa(n.filterPromise,t)):Promise.resolve()}getFilterWrapper(e){const t=this.beans.colModel.getColDefCol(e);return t?this.cachedFilter(t)??null:null}setColDefPropertiesForDataType(e,t,s){const o=Jd(this.gos),i=this.getLocaleTextFunc(),n=r=>{const{filterParams:l}=e;e.filterParams=typeof l=="object"?{...l,...r}:r};switch(t.baseDataType){case"number":{o&&n({comparator:sI});break}case"boolean":{n(o?{valueFormatter:r=>j(r.value)?i(String(r.value),r.value?"True":"False"):i("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(r,l)=>l,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(r,l)=>l===!1,numberOfInputs:0}]});break}case"date":{n(o?{valueFormatter:r=>{const l=s(r);return j(l)?l:i("blanks","(Blanks)")},treeList:!0,treeListFormatter:(r,l)=>{if(r==="NaN")return i("invalidDate","Invalid Date");if(l===1&&r!=null){const a=lC[Number(r)-1];return i(a,rC[a])}return r??i("blanks","(Blanks)")}}:{isValidDate:dC});break}case"dateString":{const r=t.dateParser;n(o?{valueFormatter:l=>{const a=s(l);return j(a)?a:i("blanks","(Blanks)")},treeList:!0,treeListPathGetter:l=>{const a=r(l??void 0);return a?[String(a.getFullYear()),String(a.getMonth()+1),String(a.getDate())]:null},treeListFormatter:(l,a)=>{if(a===1&&l!=null){const d=lC[Number(l)-1];return i(d,rC[d])}return l??i("blanks","(Blanks)")}}:{comparator:(l,a)=>{const d=r(a);return a==null||d<l?-1:d>l?1:0},isValidDate:l=>typeof l=="string"&&dC(r(l))});break}case"object":{o?n({valueFormatter:r=>{const l=s(r);return j(l)?l:i("blanks","(Blanks)")}}):e.filterValueGetter=r=>s({column:r.column,node:r.node,value:this.beans.valueSvc.getValue(r.column,r.node)});break}}}setColFilterActive(e,t,s,o){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",s)),e.dispatchColEvent("filterChanged",s,o)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};function sa(e,t){return e?new Oe(s=>{e.then(o=>{typeof o.setModel!="function"&&(I(65),s()),(o.setModel(t)||Oe.resolve()).then(()=>s())})}):Oe.resolve()}function aC(e){return e.getColDef().filter==="agGroupColumnFilter"}function dC(e){return e instanceof Date&&!isNaN(e.getTime())}function iI(e){return!!e.filterManager?.isAnyFilterPresent()}function nI(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var rI=class extends F{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:o})=>this.onAdvFilterEnabledChanged(o),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:s}=this;this.alwaysPassFilter=s.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=s.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)}setFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){this.warnAdvFilters();return}this.colFilter?.setFilterModel(e,t)}getFilterModel(){return this.colFilter?.getFilterModel()??{}}isColumnFilterPresent(){return!!this.colFilter?.isColumnFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggregateFilterPresent()}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){e?this.colFilter?.disableColumnFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){qn(this.gos)&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:s,columns:o=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):Oe.resolve()).then(()=>{const i={source:t,type:"filterChanged",columns:o};s&&gt(i,s),this.eventSvc.dispatchEvent(i),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!qn(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,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doAggregateFiltersPass(t,e.filterInstanceToSkip))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doColumnFiltersPass(t,e.filterInstanceToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterActive(e){return!!this.colFilter?.isFilterActive(e)}getOrCreateFilterWrapper(e){return this.colFilter?.getOrCreateFilterWrapper(e)??null}getDefaultFloatingFilter(e){return this.colFilter.getDefaultFloatingFilter(e)}createFilterParams(e,t){return this.colFilter.createFilterParams(e,t)}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getFloatingFilterCompDetails(e,t){return this.colFilter?.getFloatingFilterCompDetails(e,t)}getCurrentFloatingFilterParentModel(e){return this.colFilter?.getCurrentFloatingFilterParentModel(e)}destroyFilter(e,t="api"){this.colFilter?.destroyFilter(e,t)}areFilterCompsDifferent(e,t){return!!this.colFilter?.areFilterCompsDifferent(e,t)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.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(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getColumnFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){I(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.advFilterModelUpdateQueue.forEach(e=>this.setAdvFilterModel(e)),this.advFilterModelUpdateQueue=[]}getColumnFilterModel(e){return this.colFilter?.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setColumnFilterModel(e,t)??Promise.resolve()}setColDefPropertiesForDataType(e,t,s){this.colFilter?.setColDefPropertiesForDataType(e,t,s)}},lI=class extends F{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,s,o){this.showPopup(e,i=>{this.popupSvc?.positionPopupUnderMouseEvent({column:e,type:s,mouseEvent:t,ePopup:i})},s,t.target,rt(this.gos),o)}showMenuAfterButtonClick(e,t,s,o){let i=-1,n="left";const r=rt(this.gos);!r&&this.gos.get("enableRtl")&&(i=1,n="right");const l=r?void 0:4*i,a=r?void 0:4;this.showPopup(e,d=>{this.popupSvc?.positionPopupByComponent({type:s,eventSource:t,ePopup:d,nudgeX:l,nudgeY:a,alignSide:n,keepWithinBounds:!0,position:"under",column:e})},s,t,r,o)}showPopup(e,t,s,o,i,n){const r=e?this.createBean(new Of(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){ue(57);return}const l=Ne({tag:"div",cls:`ag-menu${i?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(l,{keydown:f=>this.trapFocusWithin(f,l)}),l.appendChild(r?.getGui());let a;const d=()=>r?.afterGuiDetached(),c=zg(this.gos)?o??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=f=>{Ql(e,!1,"contextMenu");const m=f instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),m&&o&&fs(o)&&uc(o)?.focus({preventScroll:!0}),d(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,s,e),n?.()},h=this.getLocaleTextFunc(),p=i&&s!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),g=this.popupSvc?.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(l),anchorToElement:c,ariaLabel:p});g&&(this.hidePopup=a=g.hideFunc),r.afterInit().then(()=>{t(l),r.afterGuiAttached({container:s,hidePopup:a})}),Ql(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,s,e)}trapFocusWithin(e,t){e.key!==D.TAB||e.defaultPrevented||ho(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),ys(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,s){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:s??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},aI=class extends F{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t){if(!t)return;const s=e.getColDef(),{filterValueGetter:o}=s;return o?this.executeFilterValueGetter(o,t.data,e,t,s):this.beans.valueSvc.getValue(e,t)}executeFilterValueGetter(e,t,s,o,i){const{expressionSvc:n,valueSvc:r}=this.beans,l=he(this.gos,{data:t,node:o,column:s,colDef:i,getValue:r.getValueCallback.bind(r,o)});return typeof e=="function"?e(l):n?.evaluate(e,l)}},dI={moduleName:"ClientSideRowModelFilter",version:Ce,rowModels:["clientSide"],beans:[HP]},cI={moduleName:"FilterCore",version:Ce,beans:[rI],apiFunctions:{isAnyFilterPresent:iI,onFilterChanged:nI},css:[KP],dependsOn:[dI]},uI={moduleName:"FilterValue",version:Ce,beans:[aI]},hI={moduleName:"ColumnFilter",version:Ce,beans:[oI,lI],dynamicBeans:{headerFilterCellCtrl:VP},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:YP,getColumnFilterInstance:qP,destroyFilter:XP,setFilterModel:QP,getFilterModel:ZP,getColumnFilterModel:JP,setColumnFilterModel:eI,showColumnFilter:tI},dependsOn:[cI,nC,uI,iC]},pI=class extends F{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,ri(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),tf(e))}createColumns(e,t){const s=()=>{Eo(this.beans,this.columns?.tree),this.columns=null},o=e.treeDepth,n=(this.columns?.treeDepth??-1)==o,r=this.generateSelectionCols();if(ef(r,this.columns?.list??[])&&n)return;s();const{colGroupSvc:a}=this.beans,d=a?.findDepth(e.tree)??0,c=a?.balanceTreeForAutoCols(r,d)??[];this.columns={list:r,tree:c,treeDepth:d,map:{}},t(h=>{if(!h)return null;const p=h.filter(g=>!Mo(g));return[...r,...p]})}updateColumns(e){const t=ri(e.source),s=e.currentValue;this.columns?.list.forEach(o=>{const i=this.createSelectionColDef(s);o.setColDef(i,null,t),Gt(this.beans,{state:[{colId:o.getColId(),...i}]},t)})}getColumn(e){return this.columns?.list.find(t=>rc(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,s=e.get("rowSelection");if(typeof s!="object"||!Gs(e))return!1;const o=(t.autoColSvc?.getColumns()?.length??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&o)return!1;const i=!!si(s),n=Rl(s);return i||n}createSelectionColDef(e){const{gos:t}=this.beans,s=e??t.get("selectionColumnDef"),o=t.get("enableRtl"),{rowSpan:i,spanRows:n,...r}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:o?"right":"left",comparator(l,a,d,c){const u=d.isSelected(),h=c.isSelected();return u===h?0:u?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...r,colId:Jg}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.beans.validation?.validateColDef(e,t,!0);const s=new Dl(e,null,t,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(e,t,s){const o=t&&typeof t!="string"?si(t):void 0,i=e&&typeof e!="string"?si(e):void 0,n=o!==i,r=t&&typeof t!="string"?Rl(t):void 0,l=e&&typeof e!="string"?Rl(e):void 0,a=r!==l,d=Qn(e),c=Qn(t);(n||a||d!==c)&&this.beans.colModel.refreshAll(s)}destroy(){Eo(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e){if(!this.isSelectionColumnEnabled())return;const t=this.beans,s=t.visibleCols.getAllTrees()??[];if(s.length!==0){if(!s.some(cC)){const o=er(t).find(i=>Mo(i.colId));o&&Gt(t,{state:[{colId:o.colId,hide:!o.hide}]},e)}if(s.length===1){const o=s[0],i=uC(o);if(!i)return;Gt(t,{state:[{colId:i.getColId(),hide:!0}]},e)}}}},cC=e=>e.isColumn?Mo(e):e.getChildren()?.some(cC)??!1;function uC(e){if(e.isColumn)return Mo(e)?e:null;const t=e.getChildren()??[];for(const s of t){const o=uC(s);if(o)return o}return null}function gI(e,t){if(!t.nodes.every(r=>r.rowPinned?(I(59),!1):r.id===void 0?(I(60),!1):!0))return;const{nodes:o,source:i,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:o,source:i??"api",newValue:n})}function fI(e,t,s="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:s,selectAll:t})}function mI(e,t,s="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:s,selectAll:t})}function CI(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function vI(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function wI(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function yI(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function bI(e){return e.selectionSvc?.getSelectedNodes()??[]}function SI(e){return e.selectionSvc?.getSelectedRows()??[]}var RI={moduleName:"SharedRowSelection",version:Ce,beans:[pI],apiFunctions:{setNodesSelected:gI,selectAll:fI,deselectAll:mI,selectAllFiltered:CI,deselectAllFiltered:vI,selectAllOnCurrentPage:wI,deselectAllOnCurrentPage:yI,getSelectedNodes:bI,getSelectedRows:SI}};function xI(e){e.expansionSvc?.expandAll(!0)}function FI(e){e.expansionSvc?.expandAll(!1)}function DI(e){const t=zs(e),s=tP(e);t?t.onRowHeightChanged():s&&s.onRowHeightChanged()}var EI={moduleName:"CsrmSsrmSharedApi",version:Ce,apiFunctions:{expandAll:xI,collapseAll:FI,onRowHeightChanged:DI}},MI=class extends ED{constructor(){super(...arguments),this.beanName="csrmNodeSvc"}},Zc=class{constructor(){this.removals=new Set,this.updates=new Set,this.adds=new Set}remove(e){this.adds.delete(e)||(this.updates.delete(e),this.removals.add(e))}update(e){this.adds.has(e)||this.updates.add(e)}add(e){this.adds.add(e)}};function AI(e){if(ke(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let s=0;s<t.length;s++){const o=t[s],i=s===0,n=s===e.childrenAfterSort.length-1;o.setFirstChild(i),o.lastChild!==n&&(o.lastChild=n,o.dispatchRowEvent("lastChildChanged")),o.childIndex!==s&&(o.childIndex=s,o.dispatchRowEvent("childIndexChanged"))}}function hC(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),AI(e)}var PI=class extends F{constructor(){super(...arguments),this.beanName="sortStage",this.refreshProps=new Set(["postSortRows","groupDisplayType","accentedSort"]),this.step="sort"}execute(e){const t=this.beans,s=t.sortSvc.getSortOptions(),o=j(s)&&s.length>0,i=o&&!!e.changedRowNodes&&this.gos.get("deltaSort"),n=s.some(({column:r})=>Cs(t.gos)?r.isPrimary()&&r.isRowGroupActive():!!r.getColDef().showRowGroup);this.sort(t,s,o,i,e.changedRowNodes,e.changedPath,n)}sort(e,t,s,o,i,n,r){const{gos:l,colModel:a,rowGroupColsSvc:d,rowNodeSorter:c,rowRenderer:u,showRowGroupCols:h}=e,p=l.get("groupMaintainOrder"),g=a.getCols().some(R=>R.isRowGroupActive()),f=a.isPivotMode(),m=l.getCallback("postSortRows");let v=!1;const y=R=>{const w=f&&R.leafGroup,b=p&&g&&!R.leafGroup&&!r;let x;if(b){const H=d?.columns?.[R.level+1]?.getSort()===null,M=R.childrenAfterAggFilter.slice(0);if(R.childrenAfterSort&&!H){const z={};R.childrenAfterSort.forEach((L,ee)=>{z[L.id]=ee}),M.sort((L,ee)=>(z[L.id]??0)-(z[ee.id]??0))}x=M}else!s||w?x=R.childrenAfterAggFilter.slice(0):o&&i?x=II(c,R,i,n,t):x=c.doFullSort(R.childrenAfterAggFilter,t);if(v||(v=R.childrenAfterSort?.[0]!==x[0]),R.childrenAfterSort=x,hC(R),m){const A={nodes:R.childrenAfterSort};m(A)}};if(n?.forEachChangedNodeDepthFirst(y),v&&this.gos.get("groupHideOpenParents")){const R=h?.getShowRowGroupCols();R?.length&&u.refreshCells({columns:R,force:!0})}}};function II(e,t,s,o,i){const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,i);const l=new Set,a=[],{updates:d,adds:c}=s;for(let h=0,p=n.length;h<p;++h){const g=n[h];d.has(g)||c.has(g)||o&&!o.canSkip(g)?a.push({currentPos:a.length,rowNode:g}):l.add(g.id)}const u=r.filter(h=>l.has(h.id)).map((h,p)=>({currentPos:p,rowNode:h}));return a.sort((h,p)=>e.compareRowNodes(i,h,p)),TI(e,i,a,u)}function TI(e,t,s,o){const i=[];let n=0,r=0;const l=s.length,a=o.length;for(;n<l&&r<a;){const d=s[n],c=o[r],u=e.compareRowNodes(t,d,c);let h;u<0?(h=d,++n):(h=c,++r),i.push(h.rowNode)}for(;n<l;)i.push(s[n++].rowNode);for(;r<a;)i.push(o[r++].rowNode);return i}var LI=class extends F{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowsToDisplay=[],this.started=!1,this.isRefreshingModel=!1,this.rowNodesCountReady=!1,this.rowCountReady=!1,this.onRowHeightChanged_debounced=Yt(this,this.onRowHeightChanged.bind(this),100)}wireBeans(e){this.colModel=e.colModel,this.valueCache=e.valueCache,this.filterStage=e.filterStage,this.sortStage=e.sortStage,this.flattenStage=e.flattenStage,this.groupStage=e.groupStage,this.aggStage=e.aggStage,this.pivotStage=e.pivotStage,this.filterAggStage=e.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(o=>!!o);const e=this.refreshModel.bind(this,{step:"group"}),t=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:t,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new di(this.beans);const s=this.getNewNodeManager();this.nodeManager=s,s.activate(this.rootNode)}getNewNodeManager(){const{gos:e,beans:t}=this;switch(Ug(e)){case"treeNested":return t.csrmChildrenTreeNodeSvc??t.csrmNodeSvc;case"treePath":return t.csrmPathTreeNodeSvc??t.csrmNodeSvc;default:return t.csrmNodeSvc}}addPropertyListeners(){const e=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:t})=>[...t])];this.addManagedPropertyListeners(e,t=>{const s=t.changeSet?.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,s,o){let i,n=!1;do{i=!1;const r=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(t),a=Math.max(r,s),d=Math.min(l,o);for(let c=a;c<=d;c++){const u=this.getRow(c);if(u.rowHeightEstimated){const h=ns(this.beans,u);u.setRowHeight(h.height),i=!0,n=!0}}i&&this.setRowTopAndRowIndex()}while(i);return n}onPropChange(e){if(!this.rootNode)return;const t=this.gos,s=new Set(e),o={step:"nothing",changedProps:s},i=s.has("rowData"),n=this.nodeManager,r=this.getNewNodeManager(),l=n!==r||i&&s.has("treeData")&&t.get("treeData")||s.has("treeDataChildrenField")&&t.get("treeData");let a;if((l||i)&&(a=t.get("rowData"),a!=null&&!Array.isArray(a)&&(a=null,I(1))),l&&(i||(a=n?.extractRowData()??a),n!==r&&(n?.deactivate(),this.nodeManager=r),r.activate(this.rootNode)),a&&(!l&&!this.isEmpty()&&a.length>0&&t.exists("getRowId")&&!t.get("resetRowDataOnUpdate")?(o.keepRenderedRows=!0,o.animate=!this.gos.get("suppressAnimationFrame"),o.changedRowNodes=new Zc,r.setImmutableRowData(o,a)):(o.rowDataUpdated=!0,o.newData=!0,this.beans.selectionSvc?.reset("rowDataChanged"),this.rowNodesCountReady=!0,r.setNewRowData(a))),o.rowDataUpdated)o.step="group";else if(o.step==="nothing"){for(const{refreshProps:d,step:c}of this.orderedStages)if(e.some(u=>d.has(u))){o.step=c;break}}o.step!=="nothing"&&this.refreshModel(o)}setRowTopAndRowIndex(){const{beans:e}=this,t=e.environment.getDefaultRowHeight();let s=0;const o=new Set,i=pt(this.gos,"normal"),n=this.rowsToDisplay;for(let r=0,l=n.length;r<l;++r){const a=n[r];if(a.id!=null&&o.add(a.id),a.rowHeight==null){const d=ns(e,a,i,t);a.setRowHeight(d.height,d.estimated)}a.setRowTop(s),a.setRowIndex(r),s+=a.rowHeight}return o}clearRowTopAndRowIndex(e,t){const s=e.active,o=n=>{n&&n.id!=null&&!t.has(n.id)&&n.clearRowTopAndRowIndex()},i=n=>{if(n!==null&&(o(n),o(n.detailNode),o(n.sibling),n.hasChildren()&&n.childrenAfterGroup)){const r=n.level==-1;s&&!r&&!n.expanded||n.childrenAfterGroup.forEach(i)}};i(this.rootNode)}ensureRowsAtPixel(e,t,s=0){const o=this.getRowIndexAtPixel(t),i=this.getRow(o),n=!this.gos.get("suppressAnimationFrame");if(i===e[0])return!1;const r=this.rootNode?.allLeafChildren;return r?(e.forEach(l=>{Ot(r,l)}),e.forEach((l,a)=>{r.splice(Math.max(o+s,0)+a,0,l)}),e.forEach((l,a)=>{l.sourceRowIndex=a}),this.refreshModel({step:"group",keepRenderedRows:!0,animate:n,rowNodesOrderChanged:!0}),!0):!1}highlightRowAtPixel(e,t){const s=t!=null?this.getRowIndexAtPixel(t):null,o=s!=null?this.getRow(s):null;if(!o||!e||t==null){this.clearHighlightedRow();return}const i=this.getHighlightPosition(t,o),n=this.isHighlightingCurrentPosition(e,o,i),r=this.lastHighlightedRow!=null&&this.lastHighlightedRow!==o;(n||r)&&(this.clearHighlightedRow(),n)||(this.setRowNodeHighlighted(o,i),this.lastHighlightedRow=o)}setRowNodeHighlighted(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchRowEvent("rowHighlightChanged"))}getHighlightPosition(e,t){if(!t){const i=this.getRowIndexAtPixel(e);if(t=this.getRow(i||0),!t)return"Below"}const{rowTop:s,rowHeight:o}=t;return e-s<o/2?"Above":"Below"}getLastHighlightedRowNode(){return this.lastHighlightedRow}isHighlightingCurrentPosition(e,t,s){if(e===t)return!0;const o=s==="Above"?-1:1;return this.getRow(t.rowIndex+o)===e}clearHighlightedRow(){this.lastHighlightedRow&&(this.setRowNodeHighlighted(this.lastHighlightedRow,null),this.lastHighlightedRow=null)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const e=this.rootNode;if(!e||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===e)return 1;const s=e.childrenAfterAggFilter,o=e.sibling?1:0;return(s?s.length:0)+o}getTopLevelRowDisplayedIndex(e){const{rootNode:t,rowsToDisplay:s}=this;if(!t||!s.length||s[0]===t)return e;const{childrenAfterSort:i}=t,n=l=>{let a=i[l];if(this.gos.get("groupHideOpenParents"))for(;a.expanded&&a.childrenAfterSort&&a.childrenAfterSort.length>0;)a=a.childrenAfterSort[0];return a.rowIndex},{footerSvc:r}=this.beans;return r?r.getTopDisplayIndex(s,e,i,n):n(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:s}=this;if(!t||!s.length||s[0]===t)return e;let i=this.getRow(e);for(i.footer&&(i=i.sibling);i.parent&&i.parent!==t;)i=i.parent;const n=t.childrenAfterSort?.findIndex(r=>r===i);return n===-1?e:n??e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=Hi(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=Hi(this.gos),o=e.columns.length===0||e.columns.some(i=>i.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:o,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=Hi(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new Ym(!1,this.rootNode);return e||(t.active=!1),t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:s,rowDataUpdated:o}=e;return!(!t||s||!o||t.removals.size||t.adds.size)}refreshModel(e){if(!this.rootNode)return;const t=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&!!e.rowDataUpdated));if(this.nodeManager.refreshModel?.(e,this.started),this.eventSvc.dispatchEvent({type:"beforeRefreshModel",params:e}),!this.started||(e.rowDataUpdated&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)))return;switch(this.isRefreshingModel=!0,e.step){case"group":this.doRowGrouping(e.changedRowNodes,t,!!e.rowNodesOrderChanged,!!e.afterColumnsChanged);case"filter":this.doFilter(t);case"pivot":this.doPivot(t);case"aggregate":this.doAggregate(t);case"filter_aggregates":this.doFilterAggregates(t);case"sort":this.doSort(e.changedRowNodes,t);case"map":this.doRowsToDisplay()}const s=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(t,s),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?.allLeafChildren?.length||!this.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let s=!1,o=!1;const i=[],n=Zn(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(o)return;if(s&&(r===t||r===e)&&(o=!0,r.group&&n)){i.push(...r.allLeafChildren);return}if(!s){if(r!==t&&r!==e)return;s=!0}if(!r.group||!n){i.push(r);return}}),i}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay;if(this.isEmpty()||t.length===0)return-1;let s=0,o=t.length-1;if(e<=0)return 0;if(Re(t).rowTop<=e)return t.length-1;let n=-1,r=-1;for(;;){const l=Math.floor((s+o)/2),a=t[l];if(this.isRowInPixel(a,e)||(a.rowTop<e?s=l+1:a.rowTop>e&&(o=l-1),n===s&&r===o))return l;n=s,r=o}}isRowInPixel(e,t){const s=e.rowTop,o=e.rowTop+e.rowHeight;return s<=t&&o>t}forEachLeafNode(e){this.rootNode?.allLeafChildren?.forEach((t,s)=>e(t,s))}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){this.rowsToDisplay.forEach(e)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,s=>s.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,s=>s.childrenAfterSort)}forEachPivotNode(e,t=!1,s=!1){const o=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,i=>i.leafGroup?null:i[o])}depthFirstSearchRowNodes(e,t=!1,s=n=>n.childrenAfterGroup,o=this.rootNode,i=0){let n=i;if(!o)return n;const r=o===this.rootNode;r||e(o,n++);const{footerSvc:l}=this.beans;if(o.hasChildren()&&!o.footer){const a=s(o);if(a){n=l?.addTotalRows(n,o,e,t,r,"top")??n;for(const d of a)n=this.depthFirstSearchRowNodes(e,t,s,d,n);return l?.addTotalRows(n,o,e,t,r,"bottom")??n}}return n}doAggregate(e){const t=this.rootNode;t&&this.aggStage?.execute({rowNode:t,changedPath:e})}doFilterAggregates(e){const t=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:t,changedPath:e}):t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t}):t.forEachChangedNodeDepthFirst(s=>{s.childrenAfterSort=s.childrenAfterAggFilter.slice(0),hC(s)})}doRowGrouping(e,t,s,o){const i=this.rootNode;if(!this.groupStage?.execute({rowNode:i,changedPath:t,changedRowNodes:e,rowNodesOrderChanged:s,afterColumnsChanged:o})&&!this.nodeManager.treeData){const r=i.sibling;i.childrenAfterGroup=i.allLeafChildren,r&&(r.childrenAfterGroup=i.childrenAfterGroup),i.updateHasChildren()}this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:e}):e.forEachChangedNodeDepthFirst(t=>{t.childrenAfterFilter=t.childrenAfterGroup,oC(t)},!0)}doPivot(e){this.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){if(typeof e=="string"&&e.indexOf(Wl)==0){let s;return this.forEachNode(o=>{o.id===e&&(s=o)}),s}return this.nodeManager.getRowNode(e)}batchUpdateRowData(e,t){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const s=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},s)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache?.onDataChanged();const e=[],t=[],s=new Zc;let o=!1;this.rowDataTransactionBatch?.forEach(i=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:n,rowsInserted:r}=this.nodeManager.updateRowData(i.rowDataTransaction,s);r&&(o=!0),t.push(n),i.callback&&e.push(i.callback.bind(null,n))}),this.commitTransactions(o,s),e.length>0&&window.setTimeout(()=>{e.forEach(i=>i())},0),t.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:t}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e){this.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const t=new Zc,{rowNodeTransaction:s,rowsInserted:o}=this.nodeManager.updateRowData(e,t);return this.commitTransactions(o,t),s}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:e,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:t,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{flattenStage:e,rootNode:t}=this;let s;if(e)s=e.execute({rowNode:t});else{s=t?.childrenAfterSort??[];for(const o of s)o.setUiLevel(0)}this.rowsToDisplay=s}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),e.sibling&&e.sibling.setRowHeight(e.sibling.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const s=t.detailNode;s&&s.setRowHeight(s.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){if(e.rowHeightChanged){if(this.beans.rowAutoHeight?.active)return;this.resetRowHeights()}}onGridReady(){this.started||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.clearHighlightedRow(),this.started=!1,this.rootNode=null,this.nodeManager=null,this.rowDataTransactionBatch=null,this.lastHighlightedRow=null,this.orderedStages=oc,this.rowsToDisplay=oc}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}};function kI(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function OI(e,t){const s=zs(e);s&&((!t||t==="everything")&&(t="group"),s.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function GI(e){return zs(e)?.isEmpty()??!0}function NI(e,t){zs(e)?.forEachLeafNode(t)}function _I(e,t){zs(e)?.forEachNodeAfterFilter(t)}function BI(e,t){zs(e)?.forEachNodeAfterFilterAndSort(t)}function HI(e){if(e.rowAutoHeight?.active){I(3);return}zs(e)?.resetRowHeights()}function VI(e,t){return e.frameworkOverrides.wrapIncoming(()=>zs(e)?.updateRowData(t))}function WI(e,t,s){e.frameworkOverrides.wrapIncoming(()=>zs(e)?.batchUpdateRowData(t,s))}function zI(e){e.frameworkOverrides.wrapIncoming(()=>zs(e)?.flushAsyncTransactions())}function UI(e){return e.selectionSvc?.getBestCostNodeSelection()}var $I={moduleName:"ClientSideRowModel",version:Ce,rowModels:["clientSide"],beans:[MI,LI,PI],dependsOn:[Yc]},jI={moduleName:"ClientSideRowModelApi",version:Ce,apiFunctions:{onGroupExpandedOrCollapsed:kI,refreshClientSideRowModel:OI,isRowDataEmpty:GI,forEachLeafNode:NI,forEachNodeAfterFilter:_I,forEachNodeAfterFilterAndSort:BI,resetRowHeights:HI,applyTransaction:VI,applyTransactionAsync:WI,flushAsyncTransactions:zI,getBestCostNodeSelection:UI},dependsOn:[EI]};function KI(e){return e.stateSvc?.getState()??{}}function YI(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=qI(e)}return e}function qI(e){return e.cellSelection=XI(e,"rangeSelection"),e}function XI(e,t){if(e&&typeof e=="object")return e[t]}var QI=class extends F{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Yt(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Yt(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=Yt(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=ks(this.gos),this.cachedState=this.getInitialState(),this.setCachedStateValue("version",Ce);const e=this.suppressEventsAndDispatchInitEvent.bind(this);this.beans.ctrlsSvc.whenReady(this,()=>e(()=>this.setupStateOnGridReady()));const[t,s,o]=this.addManagedEventListeners({newColumnsLoaded:({source:i})=>{i==="gridInitializing"&&(t(),e(()=>this.setupStateOnColumnsInitialised()))},rowCountReady:()=>{s?.(),e(()=>this.setupStateOnRowCountReady())},firstDataRendered:()=>{o?.(),e(()=>this.setupStateOnFirstDataRendered())}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getInitialState(){return YI(this.gos.get("initialState")??{})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){const e=()=>this.updateCachedState("sideBar",this.getSideBarState());e(),this.addManagedEventListeners({toolPanelVisibleChanged:e,sideBarUpdated:e})}setupStateOnColumnsInitialised(){const e=this.getInitialState();this.setColumnState(e),this.setColumnGroupState(e),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState());const t=s=>()=>this.updateColumnState([s]);this.addManagedEventListeners({columnValueChanged:t("aggregation"),columnMoved:t("columnOrder"),columnPinned:t("columnPinning"),columnResized:t("columnSizing"),columnVisible:t("columnVisibility"),columnPivotChanged:t("pivot"),columnPivotModeChanged:t("pivot"),columnRowGroupChanged:t("rowGroup"),sortChanged:t("sort"),newColumnsLoaded:()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setupStateOnRowCountReady(){const{filter:e,rowGroupExpansion:t,rowSelection:s,pagination:o}=this.getInitialState();e&&this.setFilterState(e),t&&this.setRowGroupExpansionState(t),s&&this.setRowSelectionState(s),o&&this.setPaginationState(o);const i=this.updateCachedState.bind(this);i("filter",this.getFilterState()),i("rowGroupExpansion",this.getRowGroupExpansionState()),i("rowSelection",this.getRowSelectionState()),i("pagination",this.getPaginationState());const n=()=>{this.updateRowGroupExpansionStateTimer=0,i("rowGroupExpansion",this.getRowGroupExpansionState())};this.addManagedEventListeners({filterChanged:()=>i("filter",this.getFilterState()),rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{this.gos.get("groupDefaultExpanded")!==0&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&i("pagination",this.getPaginationState())}})}setupStateOnFirstDataRendered(){const{scroll:e,cellSelection:t,focusedCell:s,columnOrder:o}=this.getInitialState();s&&this.setFocusedCellState(s),t&&this.setCellSelectionState(t),e&&this.setScrollState(e),this.setColumnPivotState(!!o?.orderedColIds);const i=this.updateCachedState.bind(this);i("sideBar",this.getSideBarState()),i("focusedCell",this.getFocusedCellState());const n=this.getRangeSelectionState();i("rangeSelection",n),i("cellSelection",n),i("scroll",this.getScrollState()),this.addManagedEventListeners({cellFocused:()=>i("focusedCell",this.getFocusedCellState()),cellSelectionChanged:r=>{if(r.finished){const l=this.getRangeSelectionState();i("rangeSelection",l),i("cellSelection",l)}},bodyScrollEnd:()=>i("scroll",this.getScrollState())})}getColumnState(){const e=this.beans,t=e.colModel.isPivotMode(),s=[],o=[],i=[],n=[],r=[],l=[],a=[],d=[],c=[];let u=0;const h=er(e);for(let p=0;p<h.length;p++){const{colId:g,sort:f,sortIndex:m,rowGroup:v,rowGroupIndex:y,aggFunc:R,pivot:w,pivotIndex:b,pinned:x,hide:A,width:H,flex:M}=h[p];c.push(g),f&&(s[m??u++]={colId:g,sort:f}),v&&(o[y??0]=g),typeof R=="string"&&i.push({colId:g,aggFunc:R}),w&&(n[b??0]=g),x&&(x==="right"?l:r).push(g),A&&a.push(g),(M!=null||H)&&d.push({colId:g,flex:M??void 0,width:H})}return{sort:s.length?{sortModel:s}:void 0,rowGroup:o.length?{groupColIds:o}:void 0,aggregation:i.length?{aggregationModel:i}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:n}:void 0,columnPinning:r.length||l.length?{leftColIds:r,rightColIds:l}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}setColumnState(e){const{sort:t,rowGroup:s,aggregation:o,pivot:i,columnPinning:n,columnVisibility:r,columnSizing:l,columnOrder:a,partialColumnState:d}=e,c={},u=m=>{let v=c[m];return v||(v={colId:m},c[m]=v,v)},h=d?{}:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};t&&(t.sortModel.forEach(({colId:m,sort:v},y)=>{const R=u(m);R.sort=v,R.sortIndex=y}),h.sort=null,h.sortIndex=null),s&&(s.groupColIds.forEach((m,v)=>{const y=u(m);y.rowGroup=!0,y.rowGroupIndex=v}),h.rowGroup=null,h.rowGroupIndex=null),o&&(o.aggregationModel.forEach(({colId:m,aggFunc:v})=>{u(m).aggFunc=v}),h.aggFunc=null),i&&(i.pivotColIds.forEach((m,v)=>{const y=u(m);y.pivot=!0,y.pivotIndex=v}),this.gos.updateGridOptions({options:{pivotMode:i.pivotMode},source:"gridInitializing"}),h.pivot=null,h.pivotIndex=null),n&&(n.leftColIds.forEach(m=>{u(m).pinned="left"}),n.rightColIds.forEach(m=>{u(m).pinned="right"}),h.pinned=null),r&&(r.hiddenColIds.forEach(m=>{u(m).hide=!0}),h.hide=null),l&&(l.columnSizingModel.forEach(({colId:m,flex:v,width:y})=>{const R=u(m);R.flex=v??null,R.width=y}),h.flex=null);const p=a?.orderedColIds,g=!!p?.length,f=g?p.map(m=>u(m)):Object.values(c);f.length&&(this.columnStates=f,Gt(this.beans,{state:f,applyOrder:g,defaultState:h},"gridInitializing"))}setColumnPivotState(e){const t=this.columnStates;this.columnStates=void 0;const s=this.columnGroupStates;this.columnGroupStates=void 0;const o=this.beans,{pivotResultCols:i,colGroupSvc:n}=o;if(i?.isPivotResultColsPresent()){if(t){const r=[];for(const l of t)i.getPivotResultCol(l.colId)&&r.push(l);Gt(o,{state:r,applyOrder:e},"gridInitializing")}s&&n?.setColumnGroupState(s,"gridInitializing")}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState(),s=[];return t.forEach(({groupId:o,open:i})=>{i&&s.push(o)}),s.length?{openColumnGroupIds:s}:void 0}setColumnGroupState(e){const t=this.beans.colGroupSvc;if(!Object.prototype.hasOwnProperty.call(e,"columnGroup")||!t)return;const s=new Set(e.columnGroup?.openColumnGroupIds),i=t.getColumnGroupState().map(({groupId:n})=>{const r=s.has(n);return r&&s.delete(n),{groupId:n,open:r}});s.forEach(n=>{i.push({groupId:n,open:!0})}),i.length&&(this.columnGroupStates=i),t.setColumnGroupState(i,"gridInitializing")}getFilterState(){const e=this.beans.filterManager;let t=e?.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const s=e?.getAdvFilterModel()??void 0;return t||s?{filterModel:t,advancedFilterModel:s}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:s,advancedFilterModel:o}=e??{};s&&t?.setFilterModel(s,"columnFilter"),o&&t?.setAdvFilterModel(o,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:s,type:o,startRow:i,endRow:n,columns:r,startColumn:l}=t;return{id:s,type:o,startRow:i,endRow:n,colIds:r.map(a=>a.getColId()),startColId:l.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:s,colModel:o,visibleCols:i}=this.beans;if(!oi(t)||!s)return;const n=[];e.cellRanges.forEach(r=>{const l=[];if(r.colIds.forEach(d=>{const c=o.getCol(d);c&&l.push(c)}),!l.length)return;let a=o.getCol(r.startColId);if(!a){const d=i.allCols,c=new Set(l);a=d.find(u=>c.has(u))}n.push({...r,columns:l,startColumn:a})}),s.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:s}=e?.getVScrollPosition()??{top:0};return s||t?{top:s,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:s}=e,{frameworkOverrides:o,rowRenderer:i,animationFrameSvc:n,ctrlsSvc:r}=this.beans;o.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(s),r.getScrollFeature()?.setVerticalScrollPosition(t),i.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:s,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:s,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{colId:t,rowIndex:s,rowPinned:o}=e,{focusSvc:i,colModel:n}=this.beans;i.setFocusedCell({column:n.getCol(t),rowIndex:s,rowPinned:o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const s=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!s&&!o))return{page:s,pageSize:o}}setPaginationState(e){const{pagination:t,gos:s}=this.beans;t&&(e.pageSize&&!s.get("paginationAutoPageSize")&&t.setPageSize(e.pageSize,"initialState"),typeof e.page=="number"&&t.setPage(e.page))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e){this.beans.selectionSvc?.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){const{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;const s=[];return t.forEachNode(({expanded:o,id:i})=>{o&&i&&s.push(i)}),s.length?{expandedRowGroupIds:s}:void 0}setRowGroupExpansionState(e){this.beans.expansionSvc?.expandRows(e.expandedRowGroupIds)}updateColumnState(e){const t=this.getColumnState();let s=!1;const o=this.cachedState;for(const i of Object.keys(t)){const n=t[i];jn(n,o[i])||(s=!0)}this.cachedState={...o,...t},s&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const s=this.cachedState[e];this.setCachedStateValue(e,t),jn(t,s)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;e.forEach(t=>{switch(t){case"rowSelection":this.setCachedStateValue(t,this.getRowSelectionState());break}}),e.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>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})}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0;const t=this.beans.colAnimation;t?.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(t?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}},ZI={moduleName:"GridState",version:Ce,beans:[QI],apiFunctions:{getState:KI}};function JI(e,t={}){const s=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(s))}function pC(e,t,s,o,i){t&&(o&&t.parent&&t.parent.level!==-1&&pC(e,t.parent,s,o,i),t.setExpanded(s,void 0,i))}function eT(e,t){return e.rowModel.getRowNode(t)}function tT(e,t,s,o){e.rowRenderer.addRenderedRowListener(t,s,o)}function sT(e){return e.rowRenderer.getRenderedNodes()}function oT(e,t,s){e.rowModel.forEachNode(t,s)}function iT(e){return e.rowRenderer.firstRenderedRow}function nT(e){return e.rowRenderer.lastRenderedRow}function rT(e,t){return e.rowModel.getRow(t)}function lT(e){return e.rowModel.getRowCount()}var aT={moduleName:"RowApi",version:Ce,apiFunctions:{redrawRows:JI,setRowNodeExpanded:pC,getRowNode:eT,addRenderedRowListener:tT,getRenderedNodes:sT,forEachNode:oT,getFirstDisplayedRowIndex:iT,getLastDisplayedRowIndex:nT,getDisplayedRowAtIndex:rT,getDisplayedRowCount:lT}},dT={moduleName:"RowStyle",version:Ce,beans:[CF]},cT=Object.defineProperty,uT=(e,t,s)=>t in e?cT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,en=(e,t,s)=>uT(e,typeof t!="symbol"?t+"":t,s);class ur{static getComponentDefinition(t,s){let o;return typeof t=="string"?o=this.searchForComponentInstance(s,t):o={extends:st({...t})},o||ue(114,{component:t}),o.extends?(o.extends.setup&&(o.setup=o.extends.setup),o.extends.props=this.addParamsToProps(o.extends.props)):o.props=this.addParamsToProps(o.props),o}static addParamsToProps(t){return!t||Array.isArray(t)&&t.indexOf("params")===-1?t=["params",...t||[]]:typeof t=="object"&&!t.params&&(t.params={type:Object}),t}static createAndMountComponent(t,s,o,i){const n=ur.getComponentDefinition(t,o);if(!n)return;const{vNode:r,destroy:l,el:a}=this.mount(n,{params:Object.freeze(s)},o,i||{});return{componentInstance:r.component.proxy,element:a,destroy:l}}static mount(t,s,o,i){let n=Pe(t,s);n.appContext={...o.appContext,provides:i};let r=document.createElement("div");return td(n,r),{vNode:n,destroy:()=>{r&&td(null,r),r=null,n=null},el:r}}static searchForComponentInstance(t,s,o=10,i=!1){let n=null,r=0,l=t.parent;for(;!n&&l&&l.components&&++r<o;)l.components&&l.components[s]&&(n=l.components[s]),l=l.parent;for(r=0,l=t.parent;!n&&l&&l.$options&&++r<o;){const a=l;a.$options&&a.$options.components&&a.$options.components[s]?n=a.$options.components[s]:a[s]&&(n=a[s]),l=l.parent}for(r=0,l=t.parent;!n&&l&&++r<o;){if(l.exposed){const a=l;a.exposed&&a.exposed[s]?n=a.exposed[s]:a[s]&&(n=a[s])}l=l.parent}if(!n){const a=t.appContext.components;a&&a[s]&&(n=a[s])}return!n&&!i?(ue(114,{component:s}),null):n}}class hT extends cP{constructor(t,s){super(),en(this,"parent"),en(this,"provides"),this.parent=t,this.provides=s}createWrapper(t){const s=this;class o extends pT{init(r){super.init(r)}hasMethod(r){var l,a;const d=i.getFrameworkComponentInstance();return d[r]?!0:((l=d.$.exposed)==null?void 0:l[r])!=null||((a=d.exposed)==null?void 0:a[r])!=null||d.$.setupState[r]!=null}callMethod(r,l){var a,d;const c=this.getFrameworkComponentInstance(),u=i.getFrameworkComponentInstance();if(u[r])return u[r].apply(c,l);{const h=((a=c.$.exposed)==null?void 0:a[r])||((d=c.exposed)==null?void 0:d[r])||c.$.setupState[r];return h?.apply(c,l)}}addMethod(r,l){i[r]=l}processMethod(r,l){return r==="refresh"&&(this.getFrameworkComponentInstance().params=l[0]),this.hasMethod(r)?this.callMethod(r,l):r==="refresh"}createComponent(r){return s.createComponent(t,r)}}const i=new o;return i}createComponent(t,s){return ur.createAndMountComponent(t,s,this.parent,this.provides)}createMethodProxy(t,s,o){return function(){return t.hasMethod(s)?t.callMethod(s,arguments):(o&&I(233,{methodName:s}),null)}}destroy(){this.parent=null}}class pT{constructor(){en(this,"componentInstance"),en(this,"element"),en(this,"unmount")}getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(t){const{componentInstance:s,element:o,destroy:i}=this.createComponent(t);this.componentInstance=s,this.unmount=i,this.element=o.firstElementChild??o}}class gT extends am{constructor(t){super("vue"),en(this,"parent"),this.parent=t}frameworkComponent(t,s){let o=ur.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!o&&s&&s[t]){const i=s[t];o=ur.searchForComponentInstance(this.parent,i,10,!0)?i:null}return o}isFrameworkComponent(t){return typeof t=="object"}}function fT(){return{gridOptions:{},modules:[],statusBar:void 0,sideBar:void 0,suppressContextMenu:void 0,preventDefaultOnContextMenu:void 0,allowContextMenuWithControlKey:void 0,columnMenu:void 0,suppressMenuHide:void 0,enableBrowserTooltips:void 0,tooltipTrigger:void 0,tooltipShowDelay:void 0,tooltipHideDelay:void 0,tooltipMouseTrack:void 0,tooltipShowMode:void 0,tooltipInteraction:void 0,popupParent:void 0,copyHeadersToClipboard:void 0,copyGroupHeadersToClipboard:void 0,clipboardDelimiter:void 0,suppressCopyRowsToClipboard:void 0,suppressCopySingleCellRanges:void 0,suppressLastEmptyLineOnPaste:void 0,suppressClipboardPaste:void 0,suppressClipboardApi:void 0,suppressCutToClipboard:void 0,columnDefs:void 0,defaultColDef:void 0,defaultColGroupDef:void 0,columnTypes:void 0,dataTypeDefinitions:void 0,maintainColumnOrder:void 0,enableStrictPivotColumnOrder:void 0,suppressFieldDotNotation:void 0,headerHeight:void 0,groupHeaderHeight:void 0,floatingFiltersHeight:void 0,pivotHeaderHeight:void 0,pivotGroupHeaderHeight:void 0,allowDragFromColumnsToolPanel:void 0,suppressMovableColumns:void 0,suppressColumnMoveAnimation:void 0,suppressMoveWhenColumnDragging:void 0,suppressDragLeaveHidesColumns:void 0,suppressGroupChangesColumnVisibility:void 0,suppressMakeColumnVisibleAfterUnGroup:void 0,suppressRowGroupHidesColumns:void 0,colResizeDefault:void 0,suppressAutoSize:void 0,autoSizePadding:void 0,skipHeaderOnAutoSize:void 0,autoSizeStrategy:void 0,components:void 0,editType:void 0,singleClickEdit:void 0,suppressClickEdit:void 0,readOnlyEdit:void 0,stopEditingWhenCellsLoseFocus:void 0,enterNavigatesVertically:void 0,enterNavigatesVerticallyAfterEdit:void 0,enableCellEditingOnBackspace:void 0,undoRedoCellEditing:void 0,undoRedoCellEditingLimit:void 0,defaultCsvExportParams:void 0,suppressCsvExport:void 0,defaultExcelExportParams:void 0,suppressExcelExport:void 0,excelStyles:void 0,findSearchValue:void 0,findOptions:void 0,quickFilterText:void 0,cacheQuickFilter:void 0,includeHiddenColumnsInQuickFilter:void 0,quickFilterParser:void 0,quickFilterMatcher:void 0,applyQuickFilterBeforePivotOrAgg:void 0,excludeChildrenWhenTreeDataFiltering:void 0,enableAdvancedFilter:void 0,alwaysPassFilter:void 0,includeHiddenColumnsInAdvancedFilter:void 0,advancedFilterParent:void 0,advancedFilterBuilderParams:void 0,suppressAdvancedFilterEval:void 0,suppressSetFilterByDefault:void 0,enableCharts:void 0,chartThemes:void 0,customChartThemes:void 0,chartThemeOverrides:void 0,chartToolPanelsDef:void 0,chartMenuItems:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,localeText:void 0,masterDetail:void 0,keepDetailRows:void 0,keepDetailRowsCount:void 0,detailCellRenderer:void 0,detailCellRendererParams:void 0,detailRowHeight:void 0,detailRowAutoHeight:void 0,context:void 0,dragAndDropImageComponent:void 0,dragAndDropImageComponentParams:void 0,alignedGrids:void 0,tabIndex:void 0,rowBuffer:void 0,valueCache:void 0,valueCacheNeverExpires:void 0,enableCellExpressions:void 0,suppressTouch:void 0,suppressFocusAfterRefresh:void 0,suppressBrowserResizeObserver:void 0,suppressPropertyNamesCheck:void 0,suppressChangeDetection:void 0,debug:void 0,loading:void 0,overlayLoadingTemplate:void 0,loadingOverlayComponent:void 0,loadingOverlayComponentParams:void 0,suppressLoadingOverlay:void 0,overlayNoRowsTemplate:void 0,noRowsOverlayComponent:void 0,noRowsOverlayComponentParams:void 0,suppressNoRowsOverlay:void 0,pagination:void 0,paginationPageSize:void 0,paginationPageSizeSelector:void 0,paginationAutoPageSize:void 0,paginateChildRows:void 0,suppressPaginationPanel:void 0,pivotMode:void 0,pivotPanelShow:void 0,pivotMaxGeneratedColumns:void 0,pivotDefaultExpanded:void 0,pivotColumnGroupTotals:void 0,pivotRowTotals:void 0,pivotSuppressAutoColumn:void 0,suppressExpandablePivotGroups:void 0,functionsReadOnly:void 0,aggFuncs:void 0,suppressAggFuncInHeader:void 0,alwaysAggregateAtRootLevel:void 0,aggregateOnlyChangedColumns:void 0,suppressAggFilteredOnly:void 0,removePivotHeaderRowWhenSingleValueColumn:void 0,animateRows:void 0,cellFlashDuration:void 0,cellFadeDuration:void 0,allowShowChangeAfterFilter:void 0,domLayout:void 0,ensureDomOrder:void 0,enableCellSpan:void 0,enableRtl:void 0,suppressColumnVirtualisation:void 0,suppressMaxRenderedRowRestriction:void 0,suppressRowVirtualisation:void 0,rowDragManaged:void 0,suppressRowDrag:void 0,suppressMoveWhenRowDragging:void 0,rowDragEntireRow:void 0,rowDragMultiRow:void 0,rowDragText:void 0,fullWidthCellRenderer:void 0,fullWidthCellRendererParams:void 0,embedFullWidthRows:void 0,groupDisplayType:void 0,groupDefaultExpanded:void 0,autoGroupColumnDef:void 0,groupMaintainOrder:void 0,groupSelectsChildren:void 0,groupLockGroupColumns:void 0,groupAggFiltering:void 0,groupTotalRow:void 0,grandTotalRow:void 0,suppressStickyTotalRow:void 0,groupSuppressBlankHeader:void 0,groupSelectsFiltered:void 0,showOpenedGroup:void 0,groupHideParentOfSingleChild:void 0,groupRemoveSingleChildren:void 0,groupRemoveLowestSingleChildren:void 0,groupHideOpenParents:void 0,groupAllowUnbalanced:void 0,rowGroupPanelShow:void 0,groupRowRenderer:void 0,groupRowRendererParams:void 0,treeData:void 0,treeDataChildrenField:void 0,treeDataParentIdField:void 0,rowGroupPanelSuppressSort:void 0,suppressGroupRowsSticky:void 0,pinnedTopRowData:void 0,pinnedBottomRowData:void 0,rowModelType:void 0,rowData:void 0,asyncTransactionWaitMillis:void 0,suppressModelUpdateAfterUpdateTransaction:void 0,datasource:void 0,cacheOverflowSize:void 0,infiniteInitialRowCount:void 0,serverSideInitialRowCount:void 0,suppressServerSideFullWidthLoadingRow:void 0,cacheBlockSize:void 0,maxBlocksInCache:void 0,maxConcurrentDatasourceRequests:void 0,blockLoadDebounceMillis:void 0,purgeClosedRowNodes:void 0,serverSideDatasource:void 0,serverSideSortAllLevels:void 0,serverSideEnableClientSideSort:void 0,serverSideOnlyRefreshFilteredGroups:void 0,serverSidePivotResultFieldSeparator:void 0,viewportDatasource:void 0,viewportRowModelPageSize:void 0,viewportRowModelBufferSize:void 0,alwaysShowHorizontalScroll:void 0,alwaysShowVerticalScroll:void 0,debounceVerticalScrollbar:void 0,suppressHorizontalScroll:void 0,suppressScrollOnNewData:void 0,suppressScrollWhenPopupsAreOpen:void 0,suppressAnimationFrame:void 0,suppressMiddleClickScrolls:void 0,suppressPreventDefaultOnMouseWheel:void 0,scrollbarWidth:void 0,rowSelection:void 0,cellSelection:void 0,rowMultiSelectWithClick:void 0,suppressRowDeselection:void 0,suppressRowClickSelection:void 0,suppressCellFocus:void 0,suppressHeaderFocus:void 0,selectionColumnDef:void 0,rowNumbers:void 0,suppressMultiRangeSelection:void 0,enableCellTextSelection:void 0,enableRangeSelection:void 0,enableRangeHandle:void 0,enableFillHandle:void 0,fillHandleDirection:void 0,suppressClearOnFillReduction:void 0,sortingOrder:void 0,accentedSort:void 0,unSortIcon:void 0,suppressMultiSort:void 0,alwaysMultiSort:void 0,multiSortKey:void 0,suppressMaintainUnsortedOrder:void 0,icons:void 0,rowHeight:void 0,rowStyle:void 0,rowClass:void 0,rowClassRules:void 0,suppressRowHoverHighlight:void 0,suppressRowTransform:void 0,columnHoverHighlight:void 0,gridId:void 0,deltaSort:void 0,treeDataDisplayType:void 0,enableGroupEdit:void 0,initialState:void 0,theme:void 0,loadThemeGoogleFonts:void 0,themeCssLayer:void 0,styleNonce:void 0,themeStyleContainer:void 0,getContextMenuItems:void 0,getMainMenuItems:void 0,postProcessPopup:void 0,processUnpinnedColumns:void 0,processCellForClipboard:void 0,processHeaderForClipboard:void 0,processGroupHeaderForClipboard:void 0,processCellFromClipboard:void 0,sendToClipboard:void 0,processDataFromClipboard:void 0,isExternalFilterPresent:void 0,doesExternalFilterPass:void 0,getChartToolbarItems:void 0,createChartContainer:void 0,focusGridInnerElement:void 0,navigateToNextHeader:void 0,tabToNextHeader:void 0,navigateToNextCell:void 0,tabToNextCell:void 0,getLocaleText:void 0,getDocument:void 0,paginationNumberFormatter:void 0,getGroupRowAgg:void 0,isGroupOpenByDefault:void 0,initialGroupOrderComparator:void 0,processPivotResultColDef:void 0,processPivotResultColGroupDef:void 0,getDataPath:void 0,getChildCount:void 0,getServerSideGroupLevelParams:void 0,isServerSideGroupOpenByDefault:void 0,isApplyServerSideTransaction:void 0,isServerSideGroup:void 0,getServerSideGroupKey:void 0,getBusinessKeyForNode:void 0,getRowId:void 0,resetRowDataOnUpdate:void 0,processRowPostCreate:void 0,isRowSelectable:void 0,isRowMaster:void 0,fillOperation:void 0,postSortRows:void 0,getRowStyle:void 0,getRowClass:void 0,getRowHeight:void 0,isFullWidthRow:void 0,"onColumn-everything-changed":void 0,"onNew-columns-loaded":void 0,"onColumn-pivot-mode-changed":void 0,"onPivot-max-columns-exceeded":void 0,"onColumn-row-group-changed":void 0,"onExpand-or-collapse-all":void 0,"onColumn-pivot-changed":void 0,"onGrid-columns-changed":void 0,"onColumn-value-changed":void 0,"onColumn-moved":void 0,"onColumn-visible":void 0,"onColumn-pinned":void 0,"onColumn-group-opened":void 0,"onColumn-resized":void 0,"onDisplayed-columns-changed":void 0,"onVirtual-columns-changed":void 0,"onColumn-header-mouse-over":void 0,"onColumn-header-mouse-leave":void 0,"onColumn-header-clicked":void 0,"onColumn-header-context-menu":void 0,"onAsync-transactions-flushed":void 0,"onRow-group-opened":void 0,"onRow-data-updated":void 0,"onPinned-row-data-changed":void 0,"onRange-selection-changed":void 0,"onCell-selection-changed":void 0,"onChart-created":void 0,"onChart-range-selection-changed":void 0,"onChart-options-changed":void 0,"onChart-destroyed":void 0,"onTool-panel-visible-changed":void 0,"onTool-panel-size-changed":void 0,"onModel-updated":void 0,"onCut-start":void 0,"onCut-end":void 0,"onPaste-start":void 0,"onPaste-end":void 0,"onFill-start":void 0,"onFill-end":void 0,"onCell-selection-delete-start":void 0,"onCell-selection-delete-end":void 0,"onRange-delete-start":void 0,"onRange-delete-end":void 0,"onUndo-started":void 0,"onUndo-ended":void 0,"onRedo-started":void 0,"onRedo-ended":void 0,"onCell-clicked":void 0,"onCell-double-clicked":void 0,"onCell-mouse-down":void 0,"onCell-context-menu":void 0,"onCell-value-changed":void 0,"onCell-edit-request":void 0,"onRow-value-changed":void 0,"onHeader-focused":void 0,"onCell-focused":void 0,"onRow-selected":void 0,"onSelection-changed":void 0,"onTooltip-show":void 0,"onTooltip-hide":void 0,"onCell-key-down":void 0,"onCell-mouse-over":void 0,"onCell-mouse-out":void 0,"onFilter-changed":void 0,"onFilter-modified":void 0,"onFilter-opened":void 0,"onAdvanced-filter-builder-visible-changed":void 0,"onSort-changed":void 0,"onVirtual-row-removed":void 0,"onRow-clicked":void 0,"onRow-double-clicked":void 0,"onGrid-ready":void 0,"onGrid-pre-destroyed":void 0,"onGrid-size-changed":void 0,"onViewport-changed":void 0,"onFirst-data-rendered":void 0,"onDrag-started":void 0,"onDrag-stopped":void 0,"onDrag-cancelled":void 0,"onRow-editing-started":void 0,"onRow-editing-stopped":void 0,"onCell-editing-started":void 0,"onCell-editing-stopped":void 0,"onBody-scroll":void 0,"onBody-scroll-end":void 0,"onPagination-changed":void 0,"onComponent-state-changed":void 0,"onStore-refreshed":void 0,"onState-updated":void 0,"onColumn-menu-visible-changed":void 0,"onContext-menu-visible-changed":void 0,"onRow-drag-enter":void 0,"onRow-drag-move":void 0,"onRow-drag-leave":void 0,"onRow-drag-end":void 0,"onRow-drag-cancel":void 0,"onFind-changed":void 0}}const mT=(e,t)=>{let s;return()=>{const o=function(){e()};window.clearTimeout(s),s=window.setTimeout(o,t)}};function CT(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function hr(e){const t=s=>CT(s)?ce(s):Array.isArray(s)?s.map(o=>t(o)):We(s)||fo(s)||wi(s)?t(ce(s)):s;return t(e)}const vT={ref:"root"},wT=st({__name:"AgGridVue",props:ph(Bw({gridOptions:{},modules:{},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:{},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:{},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:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},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:{},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},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},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},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},pinnedTopRowData:{},pinnedBottomRowData:{},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:{},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},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},"onTool-panel-visible-changed":{},"onTool-panel-size-changed":{},"onColumn-menu-visible-changed":{},"onContext-menu-visible-changed":{},"onCut-start":{},"onCut-end":{},"onPaste-start":{},"onPaste-end":{},"onColumn-visible":{},"onColumn-pinned":{},"onColumn-resized":{},"onColumn-moved":{},"onColumn-value-changed":{},"onColumn-pivot-mode-changed":{},"onColumn-pivot-changed":{},"onColumn-group-opened":{},"onNew-columns-loaded":{},"onGrid-columns-changed":{},"onDisplayed-columns-changed":{},"onVirtual-columns-changed":{},"onColumn-everything-changed":{},"onColumn-header-mouse-over":{},"onColumn-header-mouse-leave":{},"onColumn-header-clicked":{},"onColumn-header-context-menu":{},"onComponent-state-changed":{},"onCell-value-changed":{},"onCell-edit-request":{},"onRow-value-changed":{},"onCell-editing-started":{},"onCell-editing-stopped":{},"onRow-editing-started":{},"onRow-editing-stopped":{},"onUndo-started":{},"onUndo-ended":{},"onRedo-started":{},"onRedo-ended":{},"onCell-selection-delete-start":{},"onCell-selection-delete-end":{},"onRange-delete-start":{},"onRange-delete-end":{},"onFill-start":{},"onFill-end":{},"onFilter-opened":{},"onFilter-changed":{},"onFilter-modified":{},"onAdvanced-filter-builder-visible-changed":{},"onFind-changed":{},"onChart-created":{},"onChart-range-selection-changed":{},"onChart-options-changed":{},"onChart-destroyed":{},"onCell-key-down":{},"onGrid-ready":{},"onGrid-pre-destroyed":{},"onFirst-data-rendered":{},"onGrid-size-changed":{},"onModel-updated":{},"onVirtual-row-removed":{},"onViewport-changed":{},"onBody-scroll":{},"onBody-scroll-end":{},"onDrag-started":{},"onDrag-stopped":{},"onDrag-cancelled":{},"onState-updated":{},"onPagination-changed":{},"onRow-drag-enter":{},"onRow-drag-move":{},"onRow-drag-leave":{},"onRow-drag-end":{},"onRow-drag-cancel":{},"onColumn-row-group-changed":{},"onRow-group-opened":{},"onExpand-or-collapse-all":{},"onPivot-max-columns-exceeded":{},"onPinned-row-data-changed":{},"onRow-data-updated":{},"onAsync-transactions-flushed":{},"onStore-refreshed":{},"onHeader-focused":{},"onCell-clicked":{},"onCell-double-clicked":{},"onCell-focused":{},"onCell-mouse-over":{},"onCell-mouse-out":{},"onCell-mouse-down":{},"onRow-clicked":{},"onRow-double-clicked":{},"onRow-selected":{},"onSelection-changed":{},"onCell-context-menu":{},"onRange-selection-changed":{},"onCell-selection-changed":{},"onTooltip-show":{},"onTooltip-hide":{},"onSort-changed":{}},fT()),{modelValue:{},modelModifiers:{}}),emits:ph(["update:modelValue"],["update:modelValue"]),setup(e,{expose:t,emit:s}){const o=e,i=ah("root"),n=me(void 0),r=me(!1),l=me(!1),a=me(!1),d=me({}),c=me(null),u=Qv(o);Xc.filter(M=>M!="gridOptions").forEach(M=>{St(()=>u[M],(z,L)=>{(M==="rowData"&&!f.value||M!=="rowData")&&A(M,z),f.value=!1},{deep:!0})});const h=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),p=my(e,"modelValue"),g=me(!1),f=me(!1),m=s;St(p,(M,z)=>{r.value&&(f.value||(g.value=!0,A("rowData",hr(M),hr(z))),f.value=!1)},{deep:!0});const v=mT(()=>{f.value=!0,m("update:modelValue",b())},10),y=yo(),R=M=>{var z,L;a.value&&h.has(M)&&(L=(z=y?.vnode)==null?void 0:z.props)!=null&&L["onUpdate:modelValue"]&&v()},w=()=>p.value||o.rowData||o.gridOptions.rowData,b=()=>{const M=[];return n?.value.forEachLeafNode(z=>{M.push(z.data)}),M},x=M=>z=>{if(l.value)return;z==="gridReady"&&(a.value=!0);const L=zm.has(z);L&&!M||!L&&M||h.has(z)&&(g.value||R(z),g.value=!1)},A=(M,z,L)=>{if(r.value){let ee=z.value||z;M==="rowData"&&ee!=null&&(ee=hr(ee)),d.value[M]=ee,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,uR(d.value,n.value),d.value={}},0))}},H=()=>Object.create(yo().provides);return to(()=>{Ex.registerModules([aT]);const M=new hT(yo(),H()),z={globalListener:x(),globalSyncListener:x(!0),frameworkOverrides:new gT(yo()),providedBeanInstances:{frameworkCompWrapper:M},modules:o.modules},L=Vu(cR(hr(o.gridOptions),o,[...Xc,...qm.map(re=>ec(re))])),ee=w();ee!==void 0&&(L.rowData=hr(ee)),n.value=ZA(i.value,L,z),r.value=!0}),Wr(()=>{var M;r.value&&((M=n?.value)==null||M.destroy(),l.value=!0)}),t({api:n}),(M,z)=>(K(),J("div",vT,null,512))}});var yT=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(e,t){let s=e[0],o=e[1],i=e[2],n=e[3];s=this.ff(s,o,i,n,t[0],7,-680876936),n=this.ff(n,s,o,i,t[1],12,-389564586),i=this.ff(i,n,s,o,t[2],17,606105819),o=this.ff(o,i,n,s,t[3],22,-1044525330),s=this.ff(s,o,i,n,t[4],7,-176418897),n=this.ff(n,s,o,i,t[5],12,1200080426),i=this.ff(i,n,s,o,t[6],17,-1473231341),o=this.ff(o,i,n,s,t[7],22,-45705983),s=this.ff(s,o,i,n,t[8],7,1770035416),n=this.ff(n,s,o,i,t[9],12,-1958414417),i=this.ff(i,n,s,o,t[10],17,-42063),o=this.ff(o,i,n,s,t[11],22,-1990404162),s=this.ff(s,o,i,n,t[12],7,1804603682),n=this.ff(n,s,o,i,t[13],12,-40341101),i=this.ff(i,n,s,o,t[14],17,-1502002290),o=this.ff(o,i,n,s,t[15],22,1236535329),s=this.gg(s,o,i,n,t[1],5,-165796510),n=this.gg(n,s,o,i,t[6],9,-1069501632),i=this.gg(i,n,s,o,t[11],14,643717713),o=this.gg(o,i,n,s,t[0],20,-373897302),s=this.gg(s,o,i,n,t[5],5,-701558691),n=this.gg(n,s,o,i,t[10],9,38016083),i=this.gg(i,n,s,o,t[15],14,-660478335),o=this.gg(o,i,n,s,t[4],20,-405537848),s=this.gg(s,o,i,n,t[9],5,568446438),n=this.gg(n,s,o,i,t[14],9,-1019803690),i=this.gg(i,n,s,o,t[3],14,-187363961),o=this.gg(o,i,n,s,t[8],20,1163531501),s=this.gg(s,o,i,n,t[13],5,-1444681467),n=this.gg(n,s,o,i,t[2],9,-51403784),i=this.gg(i,n,s,o,t[7],14,1735328473),o=this.gg(o,i,n,s,t[12],20,-1926607734),s=this.hh(s,o,i,n,t[5],4,-378558),n=this.hh(n,s,o,i,t[8],11,-2022574463),i=this.hh(i,n,s,o,t[11],16,1839030562),o=this.hh(o,i,n,s,t[14],23,-35309556),s=this.hh(s,o,i,n,t[1],4,-1530992060),n=this.hh(n,s,o,i,t[4],11,1272893353),i=this.hh(i,n,s,o,t[7],16,-155497632),o=this.hh(o,i,n,s,t[10],23,-1094730640),s=this.hh(s,o,i,n,t[13],4,681279174),n=this.hh(n,s,o,i,t[0],11,-358537222),i=this.hh(i,n,s,o,t[3],16,-722521979),o=this.hh(o,i,n,s,t[6],23,76029189),s=this.hh(s,o,i,n,t[9],4,-640364487),n=this.hh(n,s,o,i,t[12],11,-421815835),i=this.hh(i,n,s,o,t[15],16,530742520),o=this.hh(o,i,n,s,t[2],23,-995338651),s=this.ii(s,o,i,n,t[0],6,-198630844),n=this.ii(n,s,o,i,t[7],10,1126891415),i=this.ii(i,n,s,o,t[14],15,-1416354905),o=this.ii(o,i,n,s,t[5],21,-57434055),s=this.ii(s,o,i,n,t[12],6,1700485571),n=this.ii(n,s,o,i,t[3],10,-1894986606),i=this.ii(i,n,s,o,t[10],15,-1051523),o=this.ii(o,i,n,s,t[1],21,-2054922799),s=this.ii(s,o,i,n,t[8],6,1873313359),n=this.ii(n,s,o,i,t[15],10,-30611744),i=this.ii(i,n,s,o,t[6],15,-1560198380),o=this.ii(o,i,n,s,t[13],21,1309151649),s=this.ii(s,o,i,n,t[4],6,-145523070),n=this.ii(n,s,o,i,t[11],10,-1120210379),i=this.ii(i,n,s,o,t[2],15,718787259),o=this.ii(o,i,n,s,t[9],21,-343485551),e[0]=this.add32(s,e[0]),e[1]=this.add32(o,e[1]),e[2]=this.add32(i,e[2]),e[3]=this.add32(n,e[3])}cmn(e,t,s,o,i,n){return t=this.add32(this.add32(t,e),this.add32(o,n)),this.add32(t<<i|t>>>32-i,s)}ff(e,t,s,o,i,n,r){return this.cmn(t&s|~t&o,e,t,i,n,r)}gg(e,t,s,o,i,n,r){return this.cmn(t&o|s&~o,e,t,i,n,r)}hh(e,t,s,o,i,n,r){return this.cmn(t^s^o,e,t,i,n,r)}ii(e,t,s,o,i,n,r){return this.cmn(s^(t|~o),e,t,i,n,r)}md51(e){const t=e.length,s=[1732584193,-271733879,-1732584194,271733878];let o;for(o=64;o<=e.length;o+=64)this.md5cycle(s,this.md5blk(e.substring(o-64,o)));e=e.substring(o-64);const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(o=0;o<e.length;o++)i[o>>2]|=e.charCodeAt(o)<<(o%4<<3);if(i[o>>2]|=128<<(o%4<<3),o>55)for(this.md5cycle(s,i),o=0;o<16;o++)i[o]=0;return i[14]=t*8,this.md5cycle(s,i),s}md5blk(e){const t=[];for(let s=0;s<64;s+=4)t[s>>2]=e.charCodeAt(s)+(e.charCodeAt(s+1)<<8)+(e.charCodeAt(s+2)<<16)+(e.charCodeAt(s+3)<<24);return t}rhex(e){const t="0123456789abcdef".split("");let s="",o=0;for(;o<4;o++)s+=t[e>>o*8+4&15]+t[e>>o*8&15];return s}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t&4294967295}add32Compat(e,t){const s=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(s>>16)<<16|s&65535}},oa={"01":"GRID","02":"CHARTS","0102":"BOTH"},gC="https://www.ag-grid.com/licensing/",fC=class Vt{constructor(t){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=t,this.md5=new yT,this.md5.init()}validateLicense(){const t=this.getLicenseDetails(Vt.licenseKey),s=`AG Grid ${t.currentLicenseType==="BOTH"?"and AG Charts ":""}Enterprise`,o=t.suppliedLicenseType===void 0?"":`AG ${t.suppliedLicenseType==="BOTH"?"Grid and AG Charts":t.suppliedLicenseType==="GRID"?"Grid":"Charts"} Enterprise`;if(t.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(s);else if(t.expired){const i=Vt.getGridReleaseDate(),n=Vt.formatDate(i);this.outputExpiredKey(t.expiry,n,s,o)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,s,o):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,s,o)}static extractExpiry(t){const s=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(Vt.decode(s),10))}static extractLicenseComponents(t){let s=t.replace(/[\u200B-\u200D\uFEFF]/g,"");if(s=s.replace(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};const o=s.length-32,i=s.substring(o),n=s.substring(0,o),[r,l,a]=Vt.extractBracketedInformation(s);return{md5:i,license:n,version:r,isTrial:l,type:a}}getLicenseDetails(t){const s=Vt.chartsLicenseManager?"BOTH":"GRID";if(!t?.length)return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:s};const o=Vt.getGridReleaseDate(),{md5:i,license:n,version:r,isTrial:l,type:a}=Vt.extractLicenseComponents(t);let d=i===this.md5.md5(n)&&t.indexOf("For_Trialing_ag-Grid_Only")===-1,c,u,h=null,p=!1,g;function f(){c=h<new Date,u=void 0}if(d&&(h=Vt.extractExpiry(n),d=!isNaN(h.getTime()),d))switch(u=o>h,r){case"legacy":case"2":{l&&f();break}case"3":a?.length?(g=a,a!==oa["01"]&&a!==oa["0102"]||s==="BOTH"&&g!=="BOTH"?(d=!1,p=!0):l&&f()):d=!1}return d?{licenseKey:t,valid:d,expiry:Vt.formatDate(h),expired:u,version:r,isTrial:l,trialExpired:c,incorrectLicenseType:p,currentLicenseType:s,suppliedLicenseType:g}:{licenseKey:t,valid:d,incorrectLicenseType:p,currentLicenseType:s,suppliedLicenseType:g}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!!this.watermarkMessage?.length}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){const s=(this.document.defaultView||window).location,{hostname:o=""}=s;return o}isForceWatermark(){const s=(this.document.defaultView||window).location,{pathname:o}=s;return o?o.indexOf("forceWatermark")!==-1:!1}isWebsiteUrl(){return this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)!==null}isLocalhost(){return this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)!==null}static formatDate(t){const s=["January","February","March","April","May","June","July","August","September","October","November","December"],o=t.getDate(),i=t.getMonth(),n=t.getFullYear();return o+" "+s[i]+" "+n}static getGridReleaseDate(){return new Date(parseInt(Vt.decode(Vt.RELEASE_INFORMATION),10))}static decode(t){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let o="",i,n,r,l,a,d,c,u=0;const h=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;u<h.length;)l=s.indexOf(h.charAt(u++)),a=s.indexOf(h.charAt(u++)),d=s.indexOf(h.charAt(u++)),c=s.indexOf(h.charAt(u++)),i=l<<2|a>>4,n=(a&15)<<4|d>>2,r=(d&3)<<6|c,o=o+String.fromCharCode(i),d!=64&&(o=o+String.fromCharCode(n)),c!=64&&(o=o+String.fromCharCode(r));return o=Vt.utf8_decode(o),o}static utf8_decode(t){t=t.replace(/rn/g,"n");let s="";for(let o=0;o<t.length;o++){const i=t.charCodeAt(o);i<128?s+=String.fromCharCode(i):i>127&&i<2048?(s+=String.fromCharCode(i>>6|192),s+=String.fromCharCode(i&63|128)):(s+=String.fromCharCode(i>>12|224),s+=String.fromCharCode(i>>6&63|128),s+=String.fromCharCode(i&63|128))}return s}static setChartsLicenseManager(t){this.chartsLicenseManager=t}static setLicenseKey(t){this.licenseKey=t,this.chartsLicenseManager?.setLicenseKey(t,!0)}static extractBracketedInformation(t){if(!t.includes("["))return["legacy",!1,void 0];const s=t.match(/\[(.*?)\]/g).map(l=>l.replace("[","").replace("]",""));if(!s||s.length===0)return["legacy",!1,void 0];const o=s.filter(l=>l==="TRIAL").length===1,i=s.filter(l=>l.indexOf("v")===0)[0],n=i?i.replace("v",""):"legacy",r=oa[s.filter(l=>oa[l])[0]];return[n,o,r]}centerPadAndOutput(t){const s=this.totalMessageLength-t.length;console.error(t.padStart(s/2+t.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(t,s="*",o=""){console.error(t.padEnd(this.totalMessageLength-o.length,s)+o)}outputInvalidLicenseKey(t,s,o){t?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${s} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${o} only and does not cover you for ${s}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${gC}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${s} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${gC}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(t,s,o){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${s} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${o} expired on ${t}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(t){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${t} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(t,s,o,i){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${i} released before ${t}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${s}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};fC.RELEASE_INFORMATION="MTc0NDc4ODcwODE2Nw==";var ia=fC,bT='.ag-watermark{bottom:20px;color:#9b9b9b;opacity:.7;position:absolute;transition:opacity 1s ease-out 3s;&:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDkiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMDkgMzYiPjxwYXRoIGZpbGw9IiM5QjlCOUIiIGQ9Ik0xOTIuOTkzIDIzLjY1OHYtNy45NDZoLTEzLjU0MWwtNy45NDcgNy45NDZ6TTIwOC4yNSAzLjk1aC0xNi45NzRsLTguMDEgNy45NDdoMjQuOTg0ek0xNjMuNjIyIDMxLjYwNWw0LjA2OS00LjA2OWgxMy43MzJ2Ny45NDdoLTE3LjgwMXoiLz48cGF0aCBmaWxsPSIjOUI5QjlCIiBkPSJNMTY2LjYxIDE5Ljc4aDguNzczbDguMDEtNy45NDZIMTY2LjYxek0xNTcuMDExIDMxLjYwNWg2LjYxMWw3Ljg4My03Ljk0N2gtMTQuNDk0ek0xOTEuMjc2IDMuOTVsLTQuMDY4IDQuMDdIMTYxLjI3Vi4wNzJoMzAuMDA2ek0yMC44NCAzMC4yMDZIOC4zNzhsLTIuMTYyIDUuMzRILjc1TDEyLjI1NyA4LjU5Mmg0Ljc2OEwyOC41MyAzNS41NDZoLTUuNTN6bS0xLjcxNy00LjI2TDE0LjYwOSAxNC45NWwtNC41MTQgMTAuOTk4ek0xMDQuNDM3IDE4LjUwOWMxLjU4OS0yLjM1MiA1LjU5NC0yLjYwNyA3LjI0Ny0yLjYwN3Y0LjU3OGMtMi4wMzQgMC00LjA2OS4wNjMtNS4yNzcuOTUzLTEuMjA3Ljg5LTEuODQzIDIuMDk4LTEuODQzIDMuNTZ2MTAuNTUzaC00Ljk1OVYxNS45MDJoNC43Njh6TTExOS4zNzYgMTUuOTAyaC00Ljk1OHYxOS42NDRoNC45NTh6TTExOS4zNzYgNy4xM2gtNC45NTh2NS44NDhoNC45NTh6TTE0My45NzkgNy4xM3YyOC40MTZoLTQuNzY4bC0uMTI3LTIuOTg4YTguMyA4LjMgMCAwIDEtMi42NyAyLjQ4Yy0xLjA4MS41NzItMi40MTYuODktMy45NDIuODktMS4zMzUgMC0yLjYwNi0uMjU1LTMuNjg3LS43LTEuMTQ0LS41MDgtMi4xNjItMS4xNDQtMi45ODgtMi4wMzRhOS42IDkuNiAwIDAgMS0xLjk3MS0zLjE3OWMtLjUwOC0xLjIwNy0uNjk5LTIuNjA2LS42OTktNC4xMzJzLjI1NC0yLjkyNC42OTktNC4xOTZjLjUwOS0xLjI3MSAxLjE0NS0yLjM1MiAxLjk3MS0zLjI0MnMxLjg0NC0xLjU4OSAyLjk4OC0yLjA5OCAyLjM1Mi0uNzYzIDMuNjg3LS43NjNjMS41MjYgMCAyLjc5Ny4yNTUgMy44NzguODI3czEuOTcxIDEuMzM1IDIuNjcgMi40MTZWNy4xOTNoNC45NTl6bS0xMC40MjYgMjQuNTM4YzEuNjUzIDAgMi45MjQtLjU3MiAzLjk0MS0xLjY1M3MxLjUyNi0yLjU0MyAxLjUyNi00LjMyMy0uNTA5LTMuMTc4LTEuNTI2LTQuMzIyYy0xLjAxNy0xLjA4MS0yLjI4OC0xLjY1My0zLjk0MS0xLjY1My0xLjU5IDAtMi45MjUuNTcyLTMuODc4IDEuNjUzLTEuMDE3IDEuMDgtMS41MjYgMi41NDMtMS41MjYgNC4zMjIgMCAxLjc4LjUwOSAzLjE4IDEuNTI2IDQuMjYgMS4wMTcgMS4xNDQgMi4yODggMS43MTYgMy44NzggMS43MTZNNTcuMjAyIDIwLjM1M0g0NC45MzN2NC4yNTloNi45OTNjLS4xOSAyLjE2MS0xLjAxNyAzLjgxNC0yLjQxNiA1LjE1LTEuMzk4IDEuMjctMy4xNzggMS45MDYtNS40NjcgMS45MDYtMS4yNzEgMC0yLjQ4LS4yNTQtMy40OTYtLjY5OWE3IDcgMCAwIDEtMi43MzQtMS45N2MtLjc2My0uODI3LTEuMzM1LTEuODQ0LTEuNzgtMy4wNTJzLS42MzYtMi40OC0uNjM2LTMuOTQyLjE5LTIuNzMzLjYzNi0zLjk0MWMuMzgxLTEuMjA4IDEuMDE3LTIuMTYyIDEuNzgtMy4wNTIuNzYzLS44MjYgMS42NTMtMS40NjIgMi43MzMtMS45N2E5LjEgOS4xIDAgMCAxIDMuNTYtLjdxNC4wMDUgMCA2LjEwMyAxLjkwN2wzLjMwNi0zLjMwNWMtMi40OC0xLjkwNy01LjY1OC0yLjkyNS05LjQwOS0yLjkyNS0yLjA5NyAwLTQuMDA0LjMxOC01LjcyMSAxLjAxOC0xLjcxNi42OTktMy4xNzkgMS41ODktNC4zODYgMi43OTdBMTIuMSAxMi4xIDAgMCAwIDMxLjIgMTYuMjJjLS42MzUgMS43MTctLjk1MyAzLjYyNC0uOTUzIDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1NyAxLjAxNyAyLjAzNSAwIDMuODc4LS4zMTggNS41MzEtMS4wMTcgMS42NTMtLjcgMy4wNTItMS41OSA0LjE5Ni0yLjc5N3ExLjcxNi0xLjgxMiAyLjY3LTQuMzg3Yy42MzYtMS43MTYuOTU0LTMuNjIzLjk1NC01LjY1OHYtLjgyNmMtLjE5MS0uMTI3LS4yNTUtLjQ0NS0uMjU1LS43TTk1Ljk4MiAyMC4zNTNoLTEyLjI3djQuMjU5aDYuOTkzYy0uMTkgMi4xNjEtMS4wMTcgMy44MTQtMi40MTYgNS4xNS0xLjM5OCAxLjI3LTMuMTc4IDEuOTA2LTUuNDY3IDEuOTA2LTEuMjcxIDAtMi40OC0uMjU0LTMuNDk2LS42OTlhNyA3IDAgMCAxLTIuNzM0LTEuOTdjLS43NjMtLjgyNy0xLjMzNS0xLjg0NC0xLjc4LTMuMDUycy0uNjM2LTIuNDgtLjYzNi0zLjk0Mi4xOS0yLjczMy42MzYtMy45NDFjLjM4MS0xLjIwOCAxLjAxNy0yLjE2MiAxLjc4LTMuMDUyLjc2My0uODI2IDEuNjUzLTEuNDYyIDIuNzM0LTEuOTdhOS4xIDkuMSAwIDAgMSAzLjU2LS43cTQuMDA1IDAgNi4xMDMgMS45MDdsMy4zMDUtMy4zMDVjLTIuNDc5LTEuOTA3LTUuNjU4LTIuOTI1LTkuNDA4LTIuOTI1LTIuMDk4IDAtNC4wMDUuMzE4LTUuNzIyIDEuMDE4LTEuNzE2LjY5OS0zLjE3OCAxLjU4OS00LjM4NiAyLjc5N2ExMi4xIDEyLjEgMCAwIDAtMi43OTcgNC4zODZjLS42MzYgMS43MTctLjk1NCAzLjYyNC0uOTU0IDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1OCAxLjAxNyAyLjAzNCAwIDMuODc4LS4zMTggNS41My0xLjAxNyAxLjY1My0uNyAzLjA1Mi0xLjU5IDQuMTk2LTIuNzk3cTEuNzE4LTEuODEyIDIuNjctNC4zODdjLjYzNi0xLjcxNi45NTQtMy42MjMuOTU0LTUuNjU4di0uODI2Yy0uMTktLjEyNy0uMjU1LS40NDUtLjI1NS0uNyIvPjwvc3ZnPg==");background-repeat:no-repeat;background-size:170px 40px;content:"";display:block;height:40px;width:170px}}:where(.ag-ltr) .ag-watermark{right:25px}:where(.ag-rtl) .ag-watermark{left:25px}.ag-watermark-text{font-family:Impact,sans-serif;font-size:19px;font-weight:700;opacity:.5}:where(.ag-ltr) .ag-watermark-text{padding-left:.7rem}:where(.ag-rtl) .ag-watermark-text{padding-right:.7rem}',ST={tag:"div",cls:"ag-watermark",children:[{tag:"div",ref:"eLicenseTextRef",cls:"ag-watermark-text"}]},RT=class extends ve{constructor(){super(ST),this.eLicenseTextRef=k,this.registerCSS(bT)}wireBeans(e){this.licenseManager=e.licenseManager}postConstruct(){const e=this.shouldDisplayWatermark();this.setDisplayed(e),e&&(this.eLicenseTextRef.textContent=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}},xT={selector:"AG-WATERMARK",component:RT},mC=class extends F{constructor(){super(...arguments),this.beanName="licenseManager"}postConstruct(){this.validateLicense()}validateLicense(){this.licenseManager=new ia(Xe(this.beans)),this.licenseManager.validateLicense()}static getLicenseDetails(e){return new ia(null).getLicenseDetails(e)}getWatermarkSelector(){return xT}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(e){ia.setLicenseKey(e)}static setChartsLicenseManager(e){ia.setChartsLicenseManager(e)}},lt="33.2.4",Rs={moduleName:"EnterpriseCore",version:lt,beans:[mC],icons:{accordionOpen:"tree-open",accordionClosed:"tree-closed",accordionIndeterminate:"tree-indeterminate",close:"cross",cancel:"cancel",maximize:"maximize",minimize:"minimize",columnDrag:"grip"},dependsOn:[]},FT=".ag-panel{background-color:var(--ag-panel-background-color);display:flex;flex-direction:column;overflow:hidden;position:relative}.ag-dialog{border:var(--ag-dialog-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dialog-shadow);position:absolute}.ag-panel-title-bar{align-items:center;background-color:var(--ag-panel-title-bar-background-color);border-bottom:var(--ag-panel-title-bar-border);color:var(--ag-panel-title-bar-text-color);cursor:default;display:flex;flex:none;font-weight:var(--ag-panel-title-bar-font-weight);height:var(--ag-header-height);padding:var(--ag-spacing) var(--ag-cell-horizontal-padding)}.ag-panel-title-bar-button{color:var(--ag-panel-title-bar-icon-color);cursor:pointer}:where(.ag-ltr) .ag-panel-title-bar-button{margin-left:calc(var(--ag-spacing)*2);margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-panel-title-bar-button{margin-left:var(--ag-spacing);margin-right:calc(var(--ag-spacing)*2)}.ag-panel-title-bar-title{flex:1 1 auto}.ag-panel-title-bar-buttons{display:flex}.ag-panel-content-wrapper{display:flex;flex:1 1 auto;overflow:hidden;position:relative}:where(.ag-dragging-fill-handle) .ag-dialog,:where(.ag-dragging-range-handle) .ag-dialog{opacity:.7;pointer-events:none}";function DT(e){const t=e.cssIdentifier||"default";return{tag:"div",cls:`ag-panel ag-${t}-panel`,attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eTitleBar",cls:`ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable`,children:[{tag:"span",ref:"eTitle",cls:`ag-panel-title-bar-title ag-${t}-panel-title-bar-title`},{tag:"div",ref:"eTitleBarButtons",cls:`ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons`}]},{tag:"div",ref:"eContentWrapper",cls:`ag-panel-content-wrapper ag-${t}-panel-content-wrapper`}]}}var ET=class extends ve{constructor(e){super(DT(e)),this.config=e,this.closable=!0,this.eContentWrapper=k,this.eTitleBar=k,this.eTitleBarButtons=k,this.eTitle=k,this.registerCSS(FT)}postConstruct(){const{component:e,closable:t,hideTitleBar:s,title:o,minWidth:i=250,width:n,minHeight:r=250,height:l,centered:a,popup:d,x:c,y:u}=this.config;this.positionableFeature=new gc(this.getGui(),{minWidth:i,width:n,minHeight:r,height:l,centered:a,x:c,y:u,popup:d,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const h=this.getGui();e&&this.setBodyComponent(e),s?fe(this.eTitleBar,!1):(o&&this.setTitle(o),this.setClosable(t??this.closable)),this.addManagedElementListeners(this.eTitleBar,{mousedown:p=>{if(h.contains(p.relatedTarget)||h.contains(Be(this.beans))||this.eTitleBarButtons.contains(p.target)){p.preventDefault();return}const g=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");g&&g.focus()}}),!(d&&this.positionableFeature.isPositioned())&&(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){const e=this.getGui();e.focus(),this.close=()=>{e.parentElement.removeChild(e),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(e){this.positionableFeature.setHeight(e)}getWidth(){return this.positionableFeature.getWidth()}setWidth(e){this.positionableFeature.setWidth(e)}setClosable(e){if(e!==this.closable&&(this.closable=e),e){const t=this.closeButtonComp=new ve({tag:"div",cls:"ag-button"});this.createBean(t);const s=t.getGui(),o=pe("close",this.beans);o.classList.add("ag-panel-title-bar-button-icon"),s.appendChild(o),this.addTitleBarButton(t),t.addManagedElementListeners(s,{click:this.onBtClose.bind(this)})}else if(this.closeButtonComp){const t=this.closeButtonComp.getGui();t.parentElement.removeChild(t),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())}addTitleBarButton(e,t){const s=this.eTitleBarButtons,o=s.children,i=o.length;t==null&&(t=i),t=Math.max(0,Math.min(t,i)),e.addCssClass("ag-panel-title-bar-button");const n=e.getGui();t===0?s.insertAdjacentElement("afterbegin",n):t===i?s.insertAdjacentElement("beforeend",n):o[t-1].insertAdjacentElement("afterend",n),e.setParentComponent(this)}getBodyHeight(){return _d(this.eContentWrapper)}getBodyWidth(){return zn(this.eContentWrapper)}setTitle(e){this.eTitle.innerText=e}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));const e=this.getGui();e&&fs(e)&&this.close(),super.destroy()}},MT=class extends ET{constructor(e){super({...e,popup:!0}),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){const e=this.getGui(),{movable:t,resizable:s,maximizable:o,modal:i,postProcessPopupParams:n}=this.config;if(this.addCssClass("ag-dialog"),super.postConstruct(),n){const{type:r,eventSource:l,column:a,mouseEvent:d,rowNode:c}=n;this.popupSvc?.callPostProcessPopup(r,e,l,d,a,c)}if(this.tabGuardFeature=this.createManagedBean(new lm(this)),this.tabGuardFeature.initialiseTabGuard({isFocusableContainer:!0,onFocusIn:()=>{this.popupSvc?.bringPopupToFront(e)},onTabKeyDown:r=>{if(i)return;const l=r.shiftKey,a=ho(this.beans,e,!1,l);(!a||this.tabGuardFeature.getTabGuardCtrl().isTabGuard(a))&&$i(this.beans,l)&&r.preventDefault()}}),t&&this.setMovable(t),o&&this.setMaximizable(o),s&&this.setResizable(s),!this.config.modal){const r=this.beans.ctrlsSvc.get("gridCtrl");r.addFocusableContainer(this),this.addDestroyFunc(()=>r.removeFocusableContainer(this))}}setAllowFocus(e){this.tabGuardFeature.getTabGuardCtrl().setAllowFocus(e)}renderComponent(){const e=this.getGui(),{alwaysOnTop:t,modal:s,title:o,afterGuiAttached:i}=this.config,n=this.getLocaleTextFunc(),r=this.popupSvc?.addPopup({modal:s,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:o||n("ariaLabelDialog","Dialog"),afterGuiAttached:i});r&&(this.close=r.hideFunc)}onClosed(e){this.destroy(),this.config.closedCallback?.(e)}toggleMaximize(){const e=this.positionableFeature.getPosition();if(this.isMaximized){const{x:t,y:s,width:o,height:i}=this.lastPosition;this.setWidth(o),this.setHeight(i),this.positionableFeature.offsetElement(t,s)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){fe(this.maximizeIcon,!this.isMaximized),fe(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}const t=this.eTitleBar;if(!t||e===this.isMaximizable)return;const s=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),s.addManagedElementListeners(s.getGui(),{click:this.toggleMaximize.bind(this)}),this.addTitleBarButton(s,0),this.maximizeListeners.push(...this.addManagedElementListeners(t,{dblclick:this.toggleMaximize.bind(this)})),[this.resizeListenerDestroy]=this.addManagedListeners(this.positionableFeature,{resize:()=>{this.isMaximized=!1,this.refreshMaximizeIcon()}})}buildMaximizeAndMinimizeElements(){const e=this.maximizeButtonComp=this.createBean(new ve({tag:"div",cls:"ag-dialog-button"})),t=e.getGui();return this.maximizeIcon=pe("maximize",this.beans),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=pe("minimize",this.beans),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}};function AT(e){return{tag:"div",cls:`ag-virtual-list-viewport ag-${e}-virtual-list-viewport`,role:"presentation",children:[{tag:"div",ref:"eContainer",cls:`ag-virtual-list-container ag-${e}-virtual-list-container`}]}}var CC=class extends nr{constructor(e){super(AT(e?.cssIdentifier||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0,this.eContainer=k,this.awaitStableCallbacks=[];const{cssIdentifier:t="default",ariaRole:s="listbox",listName:o,moveItemCallback:i}=e||{};this.cssIdentifier=t,this.ariaRole=s,this.listName=o,this.moveItemCallback=i}wireBeans(e){this.environment=e.environment}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e),focusInnerElement:e=>this.focusInnerElement(e),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)}),this.refreshAriaProperties(),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanged.bind(this)})}onGridStylesChanged(e){e.listItemHeightChanged&&(this.rowHeight=this.getItemHeight(),this.refresh())}refreshAriaProperties(){const t=this.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),s=this.eContainer;os(s,this.model?.getRowCount()>0?this.ariaRole:"presentation"),Kt(s,t)}addResizeObserver(){const e=()=>ms(this.beans,()=>this.drawVirtualRows()),t=Fo(this.beans,this.getGui(),e);this.addDestroyFunc(t)}focusInnerElement(e){return this.focusRow(e?this.model.getRowCount()-1:0),!0}onFocusIn(e){const t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=bS(t)-1)}onFocusOut(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(e){const{key:t,shiftKey:s}=e;switch(t){case D.UP:case D.DOWN:{const o=t===D.UP;e.preventDefault(),s?this.moveItem(o):this.navigate(o)}break;case D.PAGE_HOME:case D.PAGE_END:case D.PAGE_UP:case D.PAGE_DOWN:this.navigateToPage(t)!==null&&e.preventDefault();break}}onTabKeyDown(e){co(e),this.forceFocusOutOfContainer(e.shiftKey)}getNextRow(e){if(this.lastFocusedRowIndex==null)return;const t=this.lastFocusedRowIndex+(e?-1:1);if(!(t<0||t>=this.model.getRowCount()))return t}moveItem(e){if(!this.moveItemCallback)return;const t=this.getComponentAt(this.lastFocusedRowIndex);t&&this.moveItemCallback(t,e)}navigate(e){const t=this.getNextRow(e);t!==void 0&&this.focusRow(t)}navigateToPage(e,t="focused"){let s=!1;t==="focused"&&(t=this.getLastFocusedRow(),s=!0);const o=this.model.getRowCount()-1;let i=-1;return e===D.PAGE_HOME?i=0:e===D.PAGE_END?i=o:e===D.PAGE_DOWN?i=Math.min(t+this.pageSize,o):e===D.PAGE_UP&&(i=Math.max(t-this.pageSize,0)),i===-1?null:(s?this.focusRow(i):this.ensureIndexVisible(i),i)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(e){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(e),ms(this.beans,()=>{if(this.isScrolling=!1,!this.isAlive())return;const t=this.renderedRows.get(e);t&&t.eDiv.focus()}))}getComponentAt(e){const t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach((t,s)=>e(t.rowComponent,s))}getItemHeight(){return this.isHeightFromTheme?this.environment.getDefaultListItemHeight():this.rowHeight}ensureIndexVisible(e,t=!0){const s=this.model.getRowCount();if(typeof e!="number"||e<0||e>=s)return I(229,{index:e}),!1;const o=e*this.rowHeight,i=o+this.rowHeight,n=this.getGui(),r=n.scrollTop,l=n.offsetHeight,a=r+l,d=t?0:this.rowHeight,c=r>o+d,u=a<i-d;if(c)return n.scrollTop=o,!0;if(u){const h=i-l;return n.scrollTop=h,!0}return!1}setComponentCreator(e){this.componentCreator=e}setComponentUpdater(e){this.componentUpdater=e}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(e){this.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}refresh(e){if(this.model==null||!this.isAlive())return;const t=this.model.getRowCount();this.eContainer.style.height=`${t*this.rowHeight}px`,this.refreshAriaProperties(),this.awaitStable(()=>{this.isAlive()&&(this.canSoftRefresh(e)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}awaitStable(e){if(this.awaitStableCallbacks.push(e),this.awaitStableCallbacks.length>1)return;const t=this.model.getRowCount();Mg(()=>this.eContainer.clientHeight>=t*this.rowHeight,()=>{if(!this.isAlive())return;const s=this.awaitStableCallbacks;this.awaitStableCallbacks=[],s.forEach(o=>o())})}canSoftRefresh(e){return!!(e&&this.renderedRows.size&&typeof this.model.areRowsEqual=="function"&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((e,t)=>this.removeRow(t))}drawVirtualRows(e){if(!this.isAlive()||!this.model)return;const t=this.getGui(),s=t.scrollTop,o=s+t.offsetHeight;if(s===o)this.clearVirtualRows();else{const i=Math.floor(s/this.rowHeight),n=Math.floor(o/this.rowHeight);this.pageSize=Math.floor((o-s)/this.rowHeight),this.ensureRowsRendered(i,n,e)}}ensureRowsRendered(e,t,s){this.renderedRows.forEach((o,i)=>{(i<e||i>t)&&i!==this.lastFocusedRowIndex&&this.removeRow(i)}),s&&this.refreshRows();for(let o=e;o<=t;o++)this.renderedRows.has(o)||o<this.model.getRowCount()&&this.insertRow(o)}insertRow(e){const t=this.model.getRow(e),s=this.ariaRole==="tree"?"treeitem":"option",o=Ne({tag:"div",cls:`ag-virtual-list-item ag-${this.cssIdentifier}-virtual-list-item`,role:s,attrs:{tabindex:"-1"}});ES(o,this.model.getRowCount()),MS(o,e+1),o.style.height=`${this.rowHeight}px`,o.style.top=`${this.rowHeight*e}px`;const i=this.componentCreator(t,o);i.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=e),o.appendChild(i.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",o):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",o):this.eContainer.appendChild(o),this.renderedRows.set(e,{rowComponent:i,eDiv:o,value:t})}removeRow(e){const t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}refreshRows(){const e=this.model.getRowCount();this.renderedRows.forEach((t,s)=>{if(s>=e)this.removeRow(s);else{const o=this.model.getRow(s);this.model.areRowsEqual?.(t.value,o)?this.componentUpdater(o,t.rowComponent):this.removeRow(s)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(e){this.model=e}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),this.awaitStableCallbacks.length=0,super.destroy())}},Jc="ag-list-item-hovered",PT=class extends F{constructor(e,t,s){super(),this.comp=e,this.virtualList=t,this.params=s,this.currentDragValue=null,this.lastHoveredListItem=null}wireBeans(e){this.dragAndDrop=e.dragAndDrop}postConstruct(){this.addManagedListeners(this.params.eventSource,{[this.params.listItemDragStartEvent]:this.listItemDragStart.bind(this),[this.params.listItemDragEndEvent]:this.listItemDragEnd.bind(this)}),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){const e={isInterestedIn:t=>t===this.params.dragSourceType,getIconName:()=>this.moveBlocked?"pinned":"move",getContainer:()=>this.comp.getGui(),onDragging:t=>this.onDragging(t),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave(),onDragCancel:()=>this.onDragCancel()};this.dragAndDrop?.addDropTarget(e)}createAutoScrollService(){const e=this.virtualList.getGui();this.autoScrollService=new Zx({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;const t=this.getListDragItem(e),s=this.virtualList.getComponentAt(t.rowIndex);if(!s)return;const o=s.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,hg(o,Jc),hg(o,`ag-item-highlight-${t.position}`))}getListDragItem(e){const t=this.virtualList.getGui(),s=parseFloat(window.getComputedStyle(t).paddingTop),o=this.virtualList.getRowHeight(),i=this.virtualList.getScrollTop(),n=Math.max(0,(e.y-s+i)/o),r=this.params.getNumRows(this.comp)-1,l=Math.min(r,n)|0;return{rowIndex:l,position:Math.round(n)>n||n>r?"bottom":"top",component:this.virtualList.getComponentAt(l)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearDragProperties())}onDragCancel(){this.clearDragProperties()}onDragLeave(){this.clearDragProperties()}clearDragProperties(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${Jc}`).forEach(t=>{[Jc,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(s=>{t.classList.remove(s)})}),this.lastHoveredListItem=null}};function vC(e,t){if(!t)return null;const s=li(e),o=s.indexOf(t);if(o===-1)return null;let i=-1;for(let n=o-1;n>=0;n--)if(s[n].classList.contains(Zl.TAB_GUARD_TOP)){i=n;break}return i<=0?null:s[i-1]}function IT(e,t){if(!t)return!1;const s=e.querySelectorAll(`.${Nf}`);if(!s.length)return!1;for(let o=0;o<s.length;o++)if(s[o].contains(t))return!0;return!1}var TT={tag:"div"},LT=class extends ve{constructor(){super(TT)}init(e){this.params=e,this.cssClassPrefix=this.params.cssClassPrefix??"ag-menu-option",this.addAriaAttributes(),this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addAriaAttributes(){const{checked:e,subMenu:t}=this.params,s=this.getGui();e&&rg(s,e),t&&Zo(s,!1)}addIcon(){if(this.params.isCompact)return;const e=Ne({tag:"span",ref:"eIcon",cls:`${this.getClassName("part")} ${this.getClassName("icon")}`,role:"presentation"}),{checked:t,icon:s}=this.params;t?e.appendChild(pe("check",this.beans)):s&&(wl(s)?e.appendChild(s):typeof s=="string"?e.innerHTML=s:I(227)),this.getGui().appendChild(e)}addName(){const e=Ne({tag:"span",ref:"eName",cls:`${this.getClassName("part")} ${this.getClassName("text")}`,children:this.params.name||""});this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;const e=Ne({tag:"span",ref:"eShortcut",cls:`${this.getClassName("part")} ${this.getClassName("shortcut")}`,children:this.params.shortcut||""});this.getGui().appendChild(e)}addSubMenu(){const e=Ne({tag:"span",ref:"ePopupPointer",cls:`${this.getClassName("part")} ${this.getClassName("popup-pointer")}`}),t=this.getGui();if(this.params.subMenu){const s=this.gos.get("enableRtl")?"subMenuOpenRtl":"subMenuOpen";e.appendChild(pe(s,this.beans))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}},kT='.ag-menu-list{cursor:default;display:table;padding:var(--ag-spacing) 0;width:100%}.ag-menu-option,.ag-menu-separator{display:table-row}.ag-menu-option-part,.ag-menu-separator-part{display:table-cell;vertical-align:middle}.ag-menu-option{cursor:pointer;font-weight:500}:where(.ag-ltr) :where(.ag-menu-option-popup-pointer) .ag-icon{text-align:right}:where(.ag-rtl) :where(.ag-menu-option-popup-pointer) .ag-icon{text-align:left}.ag-menu-option-text{white-space:nowrap}.ag-menu-option-custom{display:contents}.ag-compact-menu-option{display:flex;flex-wrap:nowrap;width:100%}.ag-compact-menu-option-text{flex:1 1 auto;white-space:nowrap}.ag-menu-separator{height:calc(var(--ag-spacing)*2 + 1px)}.ag-menu-separator-part:after{border-top:1px solid var(--ag-menu-separator-color);content:"";display:block}.ag-compact-menu-option-active,.ag-menu-option-active{background-color:var(--ag-row-hover-color)}.ag-compact-menu-option-part,.ag-menu-option-part{line-height:var(--ag-icon-size);padding:calc(var(--ag-spacing) + 2px) 0}.ag-compact-menu-option-disabled,.ag-menu-option-disabled{cursor:not-allowed;opacity:.5}.ag-compact-menu-option-icon,.ag-menu-option-icon{width:var(--ag-icon-size)}:where(.ag-ltr) .ag-compact-menu-option-icon,:where(.ag-ltr) .ag-menu-option-icon{padding-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-compact-menu-option-icon,:where(.ag-rtl) .ag-menu-option-icon{padding-right:calc(var(--ag-spacing)*2)}.ag-compact-menu-option-text,.ag-menu-option-text{padding-left:calc(var(--ag-spacing)*2);padding-right:calc(var(--ag-spacing)*2)}:where(.ag-ltr) .ag-compact-menu-option-shortcut,:where(.ag-ltr) .ag-menu-option-shortcut{padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-compact-menu-option-shortcut,:where(.ag-rtl) .ag-menu-option-shortcut{padding-left:var(--ag-spacing)}:where(.ag-ltr) .ag-compact-menu-option-popup-pointer,:where(.ag-ltr) .ag-menu-option-popup-pointer{padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-compact-menu-option-popup-pointer,:where(.ag-rtl) .ag-menu-option-popup-pointer{padding-left:var(--ag-spacing)}.ag-menu-column-select-wrapper{height:265px;overflow:auto;:where(.ag-column-select){height:100%}}.ag-menu:where(.ag-tabs){min-width:290px}.ag-context-menu-loading-icon{pointer-events:none;position:absolute}',OT={moduleName:"MenuItem",version:lt,userComponents:{agMenuItem:LT},icons:{check:"tick",subMenuOpen:"small-right",subMenuOpenRtl:"small-left"},css:[kT]},GT=".ag-column-select{display:flex;flex:3 1 0px;flex-direction:column;overflow:hidden;position:relative}.ag-column-select-header{align-items:center;display:flex;flex:none;gap:var(--ag-widget-horizontal-spacing);height:var(--ag-header-height);padding-left:var(--ag-widget-container-horizontal-padding);padding-right:var(--ag-widget-container-horizontal-padding);position:relative}.ag-column-select-column,.ag-column-select-column-group{align-items:center;display:flex;gap:var(--ag-widget-horizontal-spacing);height:100%;position:relative;&:where(:not(:last-child)){margin-bottom:var(--ag-widget-vertical-spacing)}}:where(.ag-ltr) .ag-column-select-column,:where(.ag-ltr) .ag-column-select-column-group{padding-left:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}:where(.ag-rtl) .ag-column-select-column,:where(.ag-rtl) .ag-column-select-column-group{padding-right:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-column-select-header-icon{border-radius:var(--ag-border-radius);cursor:pointer;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-column-select-header-filter-wrapper{flex:1 1 auto}.ag-column-select-header-filter{width:100%}.ag-column-select-list{flex:1 1 0px;overflow:hidden}:where(.ag-ltr) .ag-column-select-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}:where(.ag-rtl) .ag-column-select-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly{opacity:.5;pointer-events:none}.ag-column-select-virtual-list-viewport{padding:calc(var(--ag-widget-container-vertical-padding)*.5) 0}.ag-column-select-virtual-list-item{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-column-select-column-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-select-checkbox{display:flex}",NT=300,_T={tag:"div",cls:"ag-column-select-header",role:"presentation",children:[{tag:"div",ref:"eExpand",cls:"ag-column-select-header-icon"},{tag:"ag-checkbox",ref:"eSelect",cls:"ag-column-select-header-checkbox"},{tag:"ag-input-text-field",ref:"eFilterTextField",cls:"ag-column-select-header-filter-wrapper"}]},BT=class extends ve{constructor(){super(_T,[Yi,Ac]),this.eExpand=k,this.eSelect=k,this.eFilterTextField=k}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:t=>{t.key===D.SPACE&&(t.preventDefault(),this.onExpandClicked())}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});const e=this.getLocaleTextFunc();this.eSelect.setInputAriaLabel(e("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)}init(e){this.params=e;const t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.beans.colModel.ready&&this.showOrHideOptions()}createExpandIcons(){const e=this.beans;this.eExpand.appendChild(this.eExpandChecked=pe("columnSelectOpen",e)),this.eExpand.appendChild(this.eExpandUnchecked=pe("columnSelectClosed",e)),this.eExpand.appendChild(this.eExpandIndeterminate=pe("columnSelectIndeterminate",e)),this.setExpandState(0)}showOrHideOptions(){const e=this.params,t=!e.suppressColumnFilter,s=!e.suppressColumnSelectAll,o=!e.suppressColumnExpandAll,i=!!this.beans.colModel.colDefCols?.treeDepth,n=this.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(n("searchOoo","Search...")),fe(this.eFilterTextField.getGui(),t),fe(this.eSelect.getGui(),s),fe(this.eExpand,o&&i)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=Yt(this,()=>{const e=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:e})},NT)),this.onFilterTextChangedDebounced()}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(e){this.expandState=e,fe(this.eExpandChecked,e===0),fe(this.eExpandUnchecked,e===1),fe(this.eExpandIndeterminate,e===2)}setSelectionState(e){this.selectState=e,this.eSelect.setValue(this.selectState)}},HT={selector:"AG-PRIMARY-COLS-HEADER",component:BT};function tn(e){return!!e&&typeof e.children<"u"}function Lo(e){return tn(e)?e.groupId:e.colId}function wC(e,t,s){const o=(r,l)=>{const d=r.children.map(Lo).includes(Lo(l)),c=Re(r.children),u=c&&Lo(c)!==Lo(l);return d&&u};if(!tn(e))return!0;const i=e,n=s;if(o(i,n)||i.groupId===t&&!i.children.map(Lo).includes(Lo(n)))return i.children.push(n),!0;for(let r=i.children.length-1;r>=0&&!wC(i.children[r],t,s);r--);return!1}function VT(e){const t=(i,n)=>tn(i)&&tn(n)&&Lo(i)===Lo(n),s=(i,n)=>{if(!tn(n))return i;const r=i,l=n;return l.children&&l.groupId&&wC(r,l.groupId,l.children[0])||l.children.forEach(a=>s(r,a)),r},o=[];for(let i=1;i<=e.length;i++){const n=e[i-1],r=e[i];t(n,r)?e[i]=s(n,r):o.push(n)}return o}function WT(e,t){const s=[],o=(n,r)=>{if(tn(n)){const l=n,a=typeof l.groupId<"u"?l.groupId:l.headerName,d=new Jn(l,a,!1,r),c=[];return l.children.forEach(u=>{const h=o(u,r+1);h&&c.push(h)}),d.setChildren(c),d}else{const l=n,a=l.colId?l.colId:l.field,d=e.getColDefCol(a);return d||s.push(l),d}},i=[];return t.forEach(n=>{const r=o(n,0);r&&i.push(r)}),s.length>0&&I(217,{invalidColIds:s}),i}function zT(e,t){const s=UT(e),o=VT(s);t(o)}function UT(e){const t=(i,n)=>{let r;if(it(i))if(i.isPadding())r=n;else{const a=Object.assign({},i.getColGroupDef());a.groupId=i.getGroupId(),a.children=[n],r=a}else{const a=Object.assign({},i.getColDef());a.colId=i.getColId(),r=a}const l=i.getOriginalParent();return l?t(l,r):r};return e.getCols().filter(i=>{const n=i.getColDef();return i.isPrimary()&&!n.showRowGroup}).map(i=>t(i,i.getColDef()))}var yC=class{constructor(e,t,s,o=!1,i){this.displayName=e,this.depth=s,this.group=o,this.localEventService=new ro,o?(this.columnGroup=t,this._expanded=i,this.children=[]):this.column=t}get expanded(){return!!this._expanded}set expanded(e){e!==this._expanded&&(this._expanded=e,this.localEventService.dispatchEvent({type:"expandedChanged"}))}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}};function bC(e,t,s,o){const i=$T(t);SC(e,i,s,o)}function SC(e,t,s,o){e.colModel.isPivotMode()?KT(e,t,s,o):jT(e,t,s,o)}function $T(e){const t=[],s=o=>{o.forEach(i=>{i.passesFilter&&(i.group?s(i.children):t.push(i.column))})};return s(e),t}function jT(e,t,s,o){const i=[];t.forEach(n=>{n.getColDef().lockVisible||n.isVisible()!=s&&i.push({colId:n.getId(),hide:!s})}),i.length>0&&Gt(e,{state:i},o),e.selectionColSvc?.refreshVisibility(o)}function KT(e,t,s,o){YT(e,t,s,o)}function YT(e,t,s,o){const i=[],l=s?a=>{if(!a.isAnyFunctionActive())if(a.isAllowValue()){const d=typeof a.getAggFunc()=="string"?a.getAggFunc():e.aggFuncSvc?.getDefaultAggFunc(a);i.push({colId:a.getId(),aggFunc:d})}else a.isAllowRowGroup()?i.push({colId:a.getId(),rowGroup:!0}):a.isAllowPivot()&&i.push({colId:a.getId(),pivot:!0})}:a=>{(a.isPivotActive()||a.isRowGroupActive()||a.isValueActive())&&i.push({colId:a.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};t.forEach(l),i.length>0&&Gt(e,{state:i},o)}function RC(e,t){const{columns:s,visibleState:o,pivotState:i,eventType:n}=t,r=s.map(l=>{const a=l.getColId();if(e.colModel.isPivotMode()){const d=i?.[a];return{colId:a,pivot:d?.pivot,rowGroup:d?.rowGroup,aggFunc:d?.aggFunc}}else return{colId:a,hide:!o?.[a]}});Gt(e,{state:r},n)}function xC(e){return{pivot:e.isPivotActive(),rowGroup:e.isRowGroupActive(),aggFunc:e.isValueActive()?e.getAggFunc():void 0}}function FC(e,t,s,o){const i=t.getCol(s);e.groupData||(e.groupData={});const n=i.getColId(),r=e.groupData[n];r!==o&&(e.groupData[n]=o,e.dispatchCellChangedEvent(i,o,r))}function qT(e,t,s){e.group!==s&&(e.group,e.group=s,e.updateHasChildren(),t.selectionSvc?.updateRowSelectable(e),e.dispatchRowEvent("groupChanged"))}function na(e,t){const{gos:s,rowGroupColsSvc:o}=t;if(!o||!e)return!1;const i=s.get("groupLockGroupColumns");if(!e.isRowGroupActive()||i===0)return!1;if(i===-1)return!0;const n=o.columns.findIndex(r=>r.getColId()===e.getColId());return i>n}var XT=class extends nr{constructor(e){super(),this.setTemplateFromElement(e.getGui(),void 0,void 0,!0)}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===D.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}};function QT(e,t,s){return e.getCompDetails(t,ZT,"agMenuItem",s,!0)}var ZT={name:"menuItem",optionalMethods:["setActive","select","setExpanded","configureDefaults"]},JT={tag:"div",cls:"ag-menu",role:"presentation"},DC=class extends F{constructor(){super(...arguments),this.ACTIVATION_DELAY=80,this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory,this.registry=e.registry}init(e){const{menuItemDef:t,isAnotherSubMenuOpen:s,level:o,childComponent:i,contextParams:n}=e;return this.params=e.menuItemDef,this.level=o,this.isAnotherSubMenuOpen=s,this.childComponent=i,this.contextParams=n,this.cssClassPrefix=this.params.menuItemParams?.cssClassPrefix??"ag-menu-option",QT(this.userCompFactory,this.params,he(this.gos,{...t,level:o,isAnotherSubMenuOpen:s,openSubMenu:l=>this.openSubMenu(l),closeSubMenu:()=>this.closeSubMenu(),closeMenu:l=>this.closeMenu(l),updateTooltip:(l,a)=>this.refreshTooltip(l,a),onItemActivated:()=>this.onItemActivated()}))?.newAgStackInstance().then(l=>{this.menuItemComp=l;const a=l.configureDefaults?.();a&&this.configureDefaults(a===!0?void 0:a)})??Oe.resolve()}addListeners(e,t){t?.suppressClick||this.addManagedElementListeners(e,{click:s=>this.onItemSelected(s)}),t?.suppressKeyboardSelect||this.addManagedElementListeners(e,{keydown:s=>{(s.key===D.ENTER||s.key===D.SPACE)&&(s.preventDefault(),this.onItemSelected(s))}}),t?.suppressMouseDown||this.addManagedElementListeners(e,{mousedown:s=>{s.stopPropagation(),s.preventDefault()}}),t?.suppressMouseOver||this.addManagedElementListeners(e,{mouseenter:()=>this.onMouseEnter(),mouseleave:()=>this.onMouseLeave()})}isDisabled(){return!!this.params.disabled}openSubMenu(e=!1,t){if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;const s=Ne(JT);this.eSubMenuGui=s;let o,i=()=>{this.subMenuIsOpening=!1};if(this.childComponent){const d=this.createBean(new XT(this.childComponent));d.setParentComponent(this);const c=d.getGui(),u="mouseenter",h=()=>this.cancelDeactivate();c.addEventListener(u,h),o=()=>{c.removeEventListener(u,h),this.destroyBean(d)},s.appendChild(c),this.childComponent.afterGuiAttached&&(i=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){const d=this.createBean(new eu(this.level+1,this.contextParams));d.setParentComponent(this),d.addMenuItems(this.params.subMenu),s.appendChild(d.getGui()),this.addManagedListeners(d,{closeMenu:c=>this.dispatchLocalEvent(c)}),d.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),o=()=>this.destroyBean(d),e&&(i=()=>{d.activateFirstItem(),this.subMenuIsOpening=!1})}const{popupSvc:n}=this,r=()=>{const d=this.eGui,{column:c,node:u}=this.contextParams;n?.positionPopupForMenu({eventSource:d,ePopup:s,event:t instanceof MouseEvent?t:void 0,column:c,node:u})},l=this.getLocaleTextFunc(),a=n?.addPopup({modal:!0,eChild:s,positionCallback:r,anchorToElement:this.eGui,ariaLabel:l("ariaLabelSubMenu","SubMenu"),afterGuiAttached:i});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{a&&a.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),o(),this.menuItemComp.setExpanded?.(!1),this.eSubMenuGui=void 0},this.menuItemComp.setExpanded?.(!0)}setAriaExpanded(e){this.suppressAria||Zo(this.eGui,e)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(e,t){this.cancelActivate(),!(this.params.disabled&&!t)&&(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!0),this.suppressFocus||Sg(this.beans,()=>this.eGui.focus({preventScroll:!t})),e&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!1),this.isActive=!1,this.subMenuIsOpen&&this.closeSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(e){this.parentComponent=e}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(e){this.menuItemComp.select?.(),this.params.action?this.beans.frameworkOverrides.wrapOutgoing(()=>this.params.action(he(this.gos,{...this.contextParams}))):this.openSubMenu(e&&e.type==="keydown",e),!(this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect)&&this.closeMenu(e)}closeMenu(e){const t={type:"closeMenu"};e&&(e instanceof MouseEvent?t.mouseEvent=e:t.keyboardEvent=e),this.dispatchLocalEvent(t)}onItemActivated(){const e={type:"menuItemActivated",menuItem:this};this.dispatchLocalEvent(e)}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),this.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),this.ACTIVATION_DELAY):this.deactivate()}configureDefaults(e){if(!this.menuItemComp){setTimeout(()=>this.configureDefaults(e));return}let t=this.menuItemComp.getGui();const{suppressRootStyles:s,suppressTooltip:o,suppressAria:i,suppressTabIndex:n,suppressFocus:r}=e||{},l=this.menuItemComp.getRootElement?.();l&&(s||t.classList.add("ag-menu-option-custom"),t=l),this.eGui=t,this.suppressRootStyles=!!s,this.suppressRootStyles||(t.classList.add(this.cssClassPrefix),this.params.cssClasses?.forEach(a=>t.classList.add(a)),this.params.disabled&&t.classList.add(`${this.cssClassPrefix}-disabled`)),o||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!i,this.suppressAria||(os(t,"menuitem"),this.params.subMenu&&GS(t,this.params.subMenuRole??"menu"),this.params.disabled&&FS(t,!0)),n||t.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(t,e),this.suppressFocus=!!r}refreshTooltip(e,t){if(this.tooltip=e,this.tooltipFeature=this.destroyBean(this.tooltipFeature),!e||!this.menuItemComp)return;const s=this.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:t});s&&(this.tooltipFeature=this.createBean(s))}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),this.menuItemComp?.destroy?.(),super.destroy()}},eu=class extends nr{constructor(e=0,t){super({tag:"div",cls:"ag-menu-list",role:"menu"}),this.level=e,this.menuItems=[],this.params=t??{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>Sg(this.beans,()=>this.handleKeyDown(e)),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){this.getParentComponent()?.getGui()?.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case D.UP:case D.RIGHT:case D.DOWN:case D.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case D.ESCAPE:this.closeIfIsChild()&&co(e);break}}handleFocusIn(e){const t=e.relatedTarget;!this.tabGuardFeature.getTabGuardCtrl().isTabGuard(t)&&(this.getGui().contains(t)||this.activeMenuItem?.getSubMenuGui()?.contains(t))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){const t=e.relatedTarget;!this.activeMenuItem||this.getGui().contains(t)||this.activeMenuItem.getSubMenuGui()?.contains(t)||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate()}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){e!=null&&Oe.all(e.map(t=>t==="separator"?Oe.resolve({eGui:this.createSeparator()}):typeof t=="string"?(I(228,{menuItemOrString:t}),Oe.resolve({eGui:null})):this.addItem(t))).then(t=>{(t??[]).forEach(s=>{s?.eGui&&(this.appendChild(s.eGui),s.comp&&this.menuItems.push(s.comp))})})}addItem(e){const t=this.createManagedBean(new DC);return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(s=>s.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListeners(t,{closeMenu:s=>{this.dispatchLocalEvent(s)},menuItemActivated:s=>{this.activeMenuItem&&this.activeMenuItem!==s.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=s.menuItem}}),{comp:t,eGui:t.getGui()}))}activateFirstItem(){const e=this.menuItems.filter(t=>!t.isDisabled())[0];e&&e.activate()}createSeparator(){const e={tag:"div",cls:"ag-menu-separator-part"};return Ne({tag:"div",cls:"ag-menu-separator",attrs:{"aria-hidden":"true"},children:[e,e,e,e]})}handleNavKey(e){switch(e){case D.UP:case D.DOWN:{const s=this.findNextItem(e===D.UP);s&&s!==this.activeMenuItem&&s.activate(!1,!0);return}}const t=this.gos.get("enableRtl")?D.RIGHT:D.LEFT;e===t?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){const t=this.getParentComponent();return t&&t instanceof DC?(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0):!1}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){const t=[...this.menuItems];if(!t.length)return;if(!this.activeMenuItem)return e?Re(t):t[0];e&&t.reverse();let s,o=!1;for(const i of t){if(!o){i===this.activeMenuItem&&(o=!0);continue}s=i;break}return o&&!s?t[0]:s||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}},EC=class extends ve{constructor(e,t,s){super({tag:"div",cls:"ag-menu"}),this.column=e,this.mouseEvent=t,this.parentEl=s,this.displayName=null}postConstruct(){const{column:e,beans:{colNames:t}}=this;this.initializeProperties(e);let s;if(Ns(e)?s=t.getDisplayNameForColumn(e,"columnToolPanel"):s=t.getDisplayNameForProvidedColumnGroup(null,e,"columnToolPanel"),this.displayName=s,this.buildMenuItemMap(),this.isActive()){this.mouseEvent.preventDefault();const o=this.getMappedMenuItems();if(o.length===0)return;this.displayContextMenu(o)}}initializeProperties(e){let t;it(e)?t=e.getLeafColumns():t=[e],this.columns=t,this.allowGrouping=t.some(s=>s.isPrimary()&&s.isAllowRowGroup()),this.allowValues=t.some(s=>s.isPrimary()&&s.isAllowValue()),this.allowPivoting=this.beans.colModel.isPivotMode()&&t.some(s=>s.isPrimary()&&s.isAllowPivot())}buildMenuItemMap(){const e=this.getLocaleTextFunc(),{beans:t,displayName:s}=this,{rowGroupColsSvc:o,valueColsSvc:i,pivotColsSvc:n,colModel:r}=t,l=new Map;this.menuItemMap=l,l.set("rowGroup",{allowedFunction:a=>a.isPrimary()&&a.isAllowRowGroup()&&!na(a,t),activeFunction:a=>a.isRowGroupActive(),activateLabel:()=>`${e("groupBy","Group by")} ${s}`,deactivateLabel:()=>`${e("ungroupBy","Un-Group by")} ${s}`,activateFunction:()=>o?.setColumns(this.addColumnsToList(o.columns),"toolPanelUi"),deActivateFunction:()=>o?.setColumns(this.removeColumnsFromList(o.columns),"toolPanelUi"),addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),l.set("value",{allowedFunction:a=>a.isPrimary()&&a.isAllowValue(),activeFunction:a=>a.isValueActive(),activateLabel:()=>e("addToValues",`Add ${s} to values`,[s]),deactivateLabel:()=>e("removeFromValues",`Remove ${s} from values`,[s]),activateFunction:()=>i?.setColumns(this.addColumnsToList(i.columns),"toolPanelUi"),deActivateFunction:()=>i?.setColumns(this.removeColumnsFromList(i.columns),"toolPanelUi"),addIcon:"valuePanel",removeIcon:"valuePanel"}),l.set("pivot",{allowedFunction:a=>r.isPivotMode()&&a.isPrimary()&&a.isAllowPivot(),activeFunction:a=>a.isPivotActive(),activateLabel:()=>e("addToLabels",`Add ${s} to labels`,[s]),deactivateLabel:()=>e("removeFromLabels",`Remove ${s} from labels`,[s]),activateFunction:()=>n?.setColumns(this.addColumnsToList(n.columns),"toolPanelUi"),deActivateFunction:()=>n?.setColumns(this.removeColumnsFromList(n.columns),"toolPanelUi"),addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(e){return[...e].concat(this.columns.filter(t=>e.indexOf(t)===-1))}removeColumnsFromList(e){return e.filter(t=>this.columns.indexOf(t)===-1)}displayContextMenu(e){const t=this.getGui(),s=this.createBean(new eu),o=this.getLocaleTextFunc();let i=()=>{};t.appendChild(s.getGui()),s.addMenuItems(e),s.addManagedListeners(s,{closeMenu:()=>{this.parentEl.focus(),i()}});const n=this.beans.popupSvc,r=n.addPopup({modal:!0,eChild:t,closeOnEsc:!0,afterGuiAttached:()=>ys(s.getGui()),ariaLabel:o("ariaLabelContextMenu","Context Menu"),closedCallback:l=>{l instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(s)}});r&&(i=r.hideFunc),n.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:t})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){const e=[],{menuItemMap:t,columns:s,displayName:o,beans:i}=this;for(const n of t.values()){const r=s.some(a=>n.allowedFunction(a)&&!n.activeFunction(a)),l=s.some(a=>n.allowedFunction(a)&&n.activeFunction(a));r&&e.push({name:n.activateLabel(o),icon:pe(n.addIcon,i,null),action:()=>n.activateFunction()}),l&&e.push({name:n.deactivateLabel(o),icon:pe(n.removeIcon,i,null),action:()=>n.deActivateFunction()})}return e}},eL={tag:"div",cls:"ag-column-select-column-group",children:[{tag:"span",ref:"eColumnGroupIcons",cls:"ag-column-group-icons",children:[{tag:"span",ref:"eGroupClosedIcon",cls:"ag-column-group-closed-icon"},{tag:"span",ref:"eGroupOpenedIcon",cls:"ag-column-group-opened-icon"}]},{tag:"ag-checkbox",ref:"cbSelect",cls:"ag-column-select-checkbox"},{tag:"span",ref:"eLabel",cls:"ag-column-select-column-label"}]},MC=class extends ve{constructor(e,t,s,o){super(),this.modelItem=e,this.allowDragging=t,this.eventType=s,this.focusWrapper=o,this.cbSelect=k,this.eLabel=k,this.eGroupOpenedIcon=k,this.eGroupClosedIcon=k,this.eColumnGroupIcons=k,this.processingColumnStateChange=!1;const{columnGroup:i,depth:n,displayName:r}=e;this.columnGroup=i,this.columnDepth=n,this.displayName=r}postConstruct(){this.setTemplate(eL,[Yi]);const{beans:e,cbSelect:t,eLabel:s,displayName:o,columnDepth:i,modelItem:n,focusWrapper:r,columnGroup:l}=this,{registry:a,gos:d}=e,c=pe("columnDrag",e);this.eDragHandle=c,c.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");const u=t.getGui(),h=t.getInputElement();u.insertAdjacentElement("afterend",c),h.setAttribute("tabindex","-1"),s.innerHTML=o??"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+i),this.getGui().style.setProperty("--ag-indentation-level",String(i)),this.tooltipFeature=this.createOptionalManagedBean(a.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getLocation:()=>"columnToolPanelColumnGroup",shouldDisplayTooltip:Pc(d,()=>s)})),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(s,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(t,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(n,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(r,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),Sf(l.getColGroupDef(),d,null,l).forEach(g=>this.addOrRemoveCssClass(g,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){const e=this.columnGroup.getColGroupDef();if(!e)return;const t=()=>this.tooltipFeature?.setTooltipAndRefresh(e.headerTooltip);t(),this.addManagedEventListeners({newColumnsLoaded:t})}handleKeyDown(e){switch(e.key){case D.LEFT:e.preventDefault(),this.modelItem.expanded=!1;break;case D.RIGHT:e.preventDefault(),this.modelItem.expanded=!0;break;case D.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected());break}}onContextMenu(e){const{columnGroup:t,gos:s}=this;if(s.get("functionsReadOnly"))return;const o=this.createBean(new EC(t,e,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}addVisibilityListenersToAllChildren(){const e=this.onColumnStateChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{this.addManagedListeners(t,{visibleChanged:e,columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e})})}setupDragging(){if(!this.allowDragging){fe(this.eDragHandle,!1);return}const e=this.beans,{gos:t,eventSvc:s,dragAndDrop:o}=e;let i=!t.get("suppressDragLeaveHidesColumns");const n={type:Bl.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>i?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{i=!t.get("suppressDragLeaveHidesColumns"),s.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{s.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:r=>{i&&RC(e,{columns:this.columnGroup.getLeafColumns(),visibleState:r?.visibleState,pivotState:r?.pivotState,eventType:this.eventType})},onGridExit:()=>{i&&this.onChangeCommon(!1)}};o.addDragSource(n,!0),this.addDestroyFunc(()=>o.removeDragSource(n))}createDragItem(){const e=this.columnGroup.getLeafColumns(),t={},s={};return e.forEach(o=>{const i=o.getId();t[i]=o.isVisible(),s[i]=xC(o)}),{columns:e,visibleState:t,pivotState:s}}setupExpandContract(){const{beans:e,eGroupClosedIcon:t,eGroupOpenedIcon:s,eColumnGroupIcons:o}=this;t.appendChild(Ki("columnSelectClosed",e,null)),s.appendChild(Ki("columnSelectOpen",e,null));const i=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(t,{click:i}),this.addManagedElementListeners(s,{click:i});const n=new qi(o,!0);this.addManagedListeners(n,{tap:i}),this.addDestroyFunc(n.destroy.bind(n))}onLabelClicked(){const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}getVisibleLeafColumns(){const e=[],t=s=>{s.forEach(o=>{o.passesFilter&&(o.group?t(o.children):e.push(o.column))})};return t(this.modelItem.children),e}onChangeCommon(e){this.refreshAriaLabel(),!this.processingColumnStateChange&&bC(this.beans,this.modelItem.children,e,this.eventType)}refreshAriaLabel(){const{cbSelect:e,focusWrapper:t,displayName:s}=this,o=this.getLocaleTextFunc(),i=o("ariaColumnGroup","Column Group"),n=e.getValue(),r=n===void 0?o("ariaIndeterminate","indeterminate"):n?o("ariaVisible","visible"):o("ariaHidden","hidden"),l=o("ariaToggleVisibility","Press SPACE to toggle visibility");Kt(t,`${s} ${i}`),e.setInputAriaLabel(`${l} (${r})`),Ed(t,e.getInputElement().id)}onColumnStateChanged(){const e=this.workOutSelectedValue(),t=this.workOutReadOnlyValue();this.processingColumnStateChange=!0;const s=this.cbSelect;s.setValue(e),s.setReadOnly(t),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",t),this.processingColumnStateChange=!1}workOutSelectedValue(){const e=this.beans.colModel.isPivotMode(),t=this.getVisibleLeafColumns();let s=0,o=0;if(t.forEach(i=>{!e&&i.getColDef().lockVisible||(this.isColumnChecked(i,e)?s++:o++)}),!(s>0&&o>0))return s>0}workOutReadOnlyValue(){const e=this.beans.colModel.isPivotMode();let t=0;return this.columnGroup.getLeafColumns().forEach(s=>{e?s.isAnyFunctionAllowed()&&t++:s.getColDef().lockVisible||t++}),t===0}isColumnChecked(e,t){if(t){const s=e.isPivotActive(),o=e.isRowGroupActive(),i=e.isValueActive();return s||o||i}return e.isVisible()}onExpandOrContractClicked(){const e=this.modelItem,t=e.expanded;e.expanded=!t}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const e=this.modelItem.expanded;fe(this.eGroupClosedIcon,!e),fe(this.eGroupOpenedIcon,e)}refreshAriaExpanded(){Zo(this.focusWrapper,this.modelItem.expanded)}getDisplayName(){return this.displayName}onSelectAllChanged(e){const t=this.cbSelect,s=t.getValue();!t.isReadOnly()&&(e&&!s||!e&&s)&&t.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(e){this.cbSelect.setValue(e,!0)}},tu=e=>it(e)?e.getLeafColumns():e?[e]:[],tL=(e,t,s,o)=>{if(!s||!t)return null;const i=e.colModel.getCols(),n=i.indexOf(s),r=o?n:n+1,l=sL(i,t,r);return r-l},sL=(e,t,s)=>{if(!t)return 0;const o=t[0],i=t.length;return e.indexOf(o)<s?i:0},AC=(e,t,s)=>e.get("suppressMovableColumns")||t.colModel.isPivotMode()?!0:!!s.find(({colDef:n})=>!!n.suppressMovable||!!n.lockPosition),PC=(e,t,s)=>{if(!s)return;const{component:o}=s;let i=null,n=s.position==="top";if(o instanceof MC?(i=o.getColumns()[0],n=!0):o&&(i=o.column),!i)return;const r=tL(e,t,i,n);r!=null&&e.colMoves?.moveColumns(t,r,"toolPanelUi")},oL=e=>e.column,iL={tag:"div",cls:"ag-column-select-column",children:[{tag:"ag-checkbox",ref:"cbSelect",cls:"ag-column-select-checkbox"},{tag:"span",ref:"eLabel",cls:"ag-column-select-column-label"}]},nL=class extends ve{constructor(e,t,s,o){super(),this.modelItem=e,this.allowDragging=t,this.groupsExist=s,this.focusWrapper=o,this.eLabel=k,this.cbSelect=k,this.processingColumnStateChange=!1;const{column:i,depth:n,displayName:r}=e;this.column=i,this.columnDepth=n,this.displayName=r}postConstruct(){this.setTemplate(iL,[Yi]);const{beans:e,cbSelect:t,displayName:s,eLabel:o,columnDepth:i,groupsExist:n,column:r,gos:l,focusWrapper:a}=this,d=pe("columnDrag",e);this.eDragHandle=d,d.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const c=t.getGui(),u=t.getInputElement();c.insertAdjacentElement("afterend",d),u.setAttribute("tabindex","-1");const h=ws(s);o.innerHTML=h,n&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${i}`),this.getGui().style.setProperty("--ag-indentation-level",String(i)),this.tooltipFeature=this.createOptionalManagedBean(e.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getLocation:()=>"columnToolPanelColumn",getColDef:()=>r.getColDef(),shouldDisplayTooltip:Pc(l,()=>o)})),this.setupDragging();const p=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:p}),this.addManagedListeners(r,{columnValueChanged:p,columnPivotChanged:p,columnRowGroupChanged:p,visibleChanged:p}),this.addManagedListeners(a,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(t,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(o,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),Sf(r.getColDef(),l,r,null).forEach(f=>this.addOrRemoveCssClass(f,!0))}getColumn(){return this.column}setupTooltip(){const e=()=>this.tooltipFeature?.setTooltipAndRefresh(this.column.getColDef().headerTooltip);e(),this.addManagedEventListeners({newColumnsLoaded:e})}onContextMenu(e){const{column:t,gos:s}=this;if(s.get("functionsReadOnly"))return;const o=this.createBean(new EC(t,e,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}handleKeyDown(e){e.key===D.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}onChangeCommon(e){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),!this.processingColumnStateChange&&SC(this.beans,[this.column],e,"toolPanelUi"))}refreshAriaLabel(){const{cbSelect:e,focusWrapper:t,displayName:s}=this,o=this.getLocaleTextFunc(),i=o("ariaColumn","Column"),n=e.getValue()?o("ariaVisible","visible"):o("ariaHidden","hidden"),r=o("ariaToggleVisibility","Press SPACE to toggle visibility");Kt(t,`${s} ${i}`),this.cbSelect.setInputAriaLabel(`${r} (${n})`),Ed(t,e.getInputElement().id)}setupDragging(){const e=this.eDragHandle;if(!this.allowDragging){fe(e,!1);return}const t=this.beans,{gos:s,eventSvc:o,dragAndDrop:i}=t;let n=!s.get("suppressDragLeaveHidesColumns");const r={type:Bl.ToolPanel,eElement:e,dragItemName:this.displayName,getDefaultIconName:()=>n?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{n=!s.get("suppressDragLeaveHidesColumns"),o.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{o.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:l=>{n&&RC(t,{columns:[this.column],visibleState:l?.visibleState,pivotState:l?.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{n&&this.onChangeCommon(!1)}};i.addDragSource(r,!0),this.addDestroyFunc(()=>i.removeDragSource(r))}createDragItem(){const e=this.column.getColId(),t={[e]:this.column.isVisible()},s={[e]:xC(this.column)};return{columns:[this.column],visibleState:t,pivotState:s}}onColumnStateChanged(){this.processingColumnStateChange=!0;const e=this.beans.colModel.isPivotMode();if(e){const o=this.column.isAnyFunctionActive();this.cbSelect.setValue(o)}else this.cbSelect.setValue(this.column.isVisible());let t=!0,s=!0;if(e){const o=this.gos.get("functionsReadOnly"),i=!this.column.isAnyFunctionAllowed();t=!o&&!i,s=t}else{const{enableRowGroup:o,enableValue:i,lockPosition:n,suppressMovable:r,lockVisible:l}=this.column.getColDef(),a=!!o||!!i,d=!!n||!!r;t=!l,s=a||!d}this.cbSelect.setReadOnly(!t),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!s),this.addOrRemoveCssClass("ag-column-select-column-readonly",!s&&!t),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(e){const t=this.cbSelect;e!==t.getValue()&&(t.isReadOnly()||t.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(e){I(158)}},rL=class{constructor(e){this.items=e}getRowCount(){return this.items.length}getRow(e){return this.items[e]}},lL="ag-column-select-list",aL=class extends ve{constructor(){super({tag:"div",cls:lL,role:"presentation"}),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1,this.skipRefocus=!1}wireBeans(e){this.colModel=e.colModel}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(e=>e()),this.destroyColumnItemFuncs=[]}init(e,t,s){this.params=e;const{suppressSyncLayoutWithGrid:o,contractColumnSelection:i,suppressColumnMove:n}=e;this.allowDragging=t,this.eventType=s,o||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});const r=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:r,columnPivotModeChanged:r,columnRowGroupChanged:r,columnValueChanged:r,columnVisible:r,newColumnsLoaded:r}),this.expandGroupsByDefault=!i;const l=n||o,a=this.createManagedBean(new CC({cssIdentifier:"column-select",ariaRole:"tree",moveItemCallback:(d,c)=>{l||this.moveItems(d,c)}}));this.virtualList=a,this.appendChild(a.getGui()),a.setComponentCreator((d,c)=>(sg(c,d.depth+1),this.createComponentFromItem(d,c))),this.colModel.ready&&this.onColumnsChanged(),!l&&this.createItemDragFeature()}createItemDragFeature(){const{gos:e,beans:t,eventSvc:s,virtualList:o}=this;this.createManagedBean(new PT(this,o,{dragSourceType:Bl.ToolPanel,listItemDragStartEvent:"columnPanelItemDragStart",listItemDragEndEvent:"columnPanelItemDragEnd",eventSource:s,getCurrentDragValue:i=>oL(i),isMoveBlocked:i=>AC(e,t,tu(i)),getNumRows:i=>i.getDisplayedColsList().length,moveItem:(i,n)=>PC(t,tu(i),n)}))}moveItems(e,t){const{gos:s,beans:o}=this,{modelItem:i}=e,{group:n,columnGroup:r,column:l,expanded:a}=i,d=tu(n?r:l);if(AC(s,o,d))return;const c=this.displayedColsList.indexOf(i),u=t?-1:1;let h=0;if(t){const g=e.columnDepth>0&&l.getParent()?.getChildren();g&&g.length&&l===g[0]&&(h=-1)}else n&&(h=a?i.children.length:0);const p=Math.min(Math.max(c+h+u,0),this.displayedColsList.length-1);this.skipRefocus=!0,PC(o,d,{position:t?"top":"bottom",component:this.virtualList.getComponentAt(p)}),this.focusRowIfAlive(p-h).then(()=>{this.skipRefocus=!1})}createComponentFromItem(e,t){const s=this.allowDragging;if(e.group){const i=new MC(e,s,this.eventType,t);return this.createBean(i),i}const o=new nL(e,s,this.groupsExist,t);return this.createBean(o),o}onColumnsChanged(){const e=this.params;this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!e.initialState);const t=this.getExpandedStates(),s=this.colModel.isPivotMode();!e.suppressSyncLayoutWithGrid&&!s?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(t),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const e={};if(this.isInitialState){const{expandedGroupIds:t}=this.params.initialState;return t.forEach(s=>{e[s]=!0}),e}return this.allColsTree?(this.forEachItem(t=>{if(!t.group)return;const s=t.columnGroup;s&&(e[s.getId()]=t.expanded)}),e):{}}setExpandedStates(e){if(!this.allColsTree)return;const{isInitialState:t}=this;this.forEachItem(s=>{if(!s.group)return;const o=s.columnGroup;if(o){const i=e[o.getId()];(i!=null||t)&&(s.expanded=!!i)}})}buildTreeFromWhatGridIsDisplaying(){zT(this.colModel,this.setColumnLayout.bind(this))}setColumnLayout(e){const t=WT(this.colModel,e);this.buildListModel(t),this.groupsExist=e.some(s=>s&&typeof s.children<"u"),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){const e=this.colModel;this.buildListModel(e.getColDefColTree()),this.groupsExist=!!e.colDefCols?.treeDepth}buildListModel(e){const t=this.onColumnExpanded.bind(this),s=l=>{l.addEventListener("expandedChanged",t);const a=l.removeEventListener.bind(l,"expandedChanged",t);this.destroyColumnItemFuncs.push(a)},o=this.beans.colNames,i=(l,a,d)=>{l.forEach(c=>{it(c)?n(c,a,d):r(c,a,d)})},n=(l,a,d)=>{const c=l.getColGroupDef();if(c&&c.suppressColumnsToolPanel)return;if(l.isPadding()){i(l.getChildren(),a,d);return}const h=o.getDisplayNameForProvidedColumnGroup(null,l,"columnToolPanel"),p=new yC(h,l,a,!0,this.expandGroupsByDefault);d.push(p),s(p),i(l.getChildren(),a+1,p.children)},r=(l,a,d)=>{if(l.getColDef()&&l.getColDef().suppressColumnsToolPanel)return;const u=o.getDisplayNameForColumn(l,"columnToolPanel");d.push(new yC(u,l,a))};this.destroyColumnTree(),i(e,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const e=o=>{o.passesFilter&&(this.displayedColsList.push(o),o.group&&o.expanded&&o.children.forEach(e))},t=this.virtualList;this.allColsTree.forEach(e),t.setModel(new rL(this.displayedColsList));let s=null;this.skipRefocus||(s=t.getLastFocusedRow()),t.refresh(),s!=null&&this.focusRowIfAlive(s),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const e=this.getLocaleTextFunc(),t=e("ariaColumnPanelList","Column List"),s=e("columns","Columns"),o=this.displayedColsList.length;Kt(this.virtualList.getAriaElement(),`${t} ${o} ${s}`)}focusRowIfAlive(e){return e===-1?Promise.resolve():new Promise(t=>{window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(e),t()},0)})}forEachItem(e){const t=o=>{o.forEach(i=>{e(i),i.group&&t(i.children)})},s=this.allColsTree;s&&t(s)}doSetExpandedAll(e){this.forEachItem(t=>{t.group&&(t.expanded=e)})}setGroupsExpanded(e,t){if(!t){this.doSetExpandedAll(e);return}const s=[];this.forEachItem(i=>{if(!i.group)return;const n=i.columnGroup.getId();t.indexOf(n)>=0&&(i.expanded=e,s.push(n))});const o=t.filter(i=>!s.includes(i));o.length>0&&I(157,{unrecognisedGroupIds:o})}getExpandState(){let e=0,t=0;return this.forEachItem(s=>{s.group&&(s.expanded?e++:t++)}),e>0&&t>0?2:t>0?1:0}doSetSelectedAll(e){bC(this.beans,this.allColsTree,e,this.eventType)}getSelectionState(){let e=0,t=0;const s=this.colModel.isPivotMode();if(this.forEachItem(o=>{if(o.group||!o.passesFilter)return;const i=o.column,n=i.getColDef();let r;if(s){if(!i.isAllowPivot()&&!i.isAllowRowGroup()&&!i.isAllowValue())return;r=i.isValueActive()||i.isPivotActive()||i.isRowGroupActive()}else{if(n.lockVisible)return;r=i.isVisible()}r?e++:t++}),!(e>0&&t>0))return!(e===0||t>0)}setFilterText(e){this.filterText=j(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const e=s=>{if(!j(this.filterText))return!0;const o=s.displayName;return o==null||o.toLowerCase().indexOf(this.filterText)!==-1},t=(s,o)=>{let i=!1;if(s.group){const r=e(s);s.children.forEach(l=>{const a=t(l,r||o);a&&(i=a)})}const n=o||i?!0:e(s);return s.passesFilter=n,n};this.allColsTree.forEach(s=>t(s,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const e=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:e})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const e=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:e})}getExpandedGroups(){const e=[];return this.allColsTree&&this.forEachItem(t=>{t.group&&t.expanded&&e.push(t.columnGroup.getId())}),e}},dL={selector:"AG-PRIMARY-COLS-LIST",component:aL},cL={tag:"div",cls:"ag-column-select",children:[{tag:"ag-primary-cols-header",ref:"primaryColsHeaderPanel"},{tag:"ag-primary-cols-list",ref:"primaryColsListPanel"}]},uL=class extends ve{constructor(){super(cL,[HT,dL]),this.primaryColsHeaderPanel=k,this.primaryColsListPanel=k,this.registerCSS(GT)}init(e,t,s){const{primaryColsHeaderPanel:o,primaryColsListPanel:i}=this;o.init(t);const n=t.suppressColumnFilter,r=t.suppressColumnSelectAll;t.suppressColumnExpandAll&&n&&r&&o.setDisplayed(!1),this.addManagedListeners(i,{groupExpanded:a=>{o.setExpandState(a.state),t.onStateUpdated()},selectionChanged:a=>o.setSelectionState(a.state)}),i.init(t,e,s),this.addManagedListeners(o,{expandAll:i.doSetExpandedAll.bind(i,!0),collapseAll:i.doSetExpandedAll.bind(i,!1),selectAll:i.doSetSelectedAll.bind(i,!0),unselectAll:i.doSetSelectedAll.bind(i,!1),filterChanged:a=>i.setFilterText(a.filterText)}),this.positionableFeature=this.createManagedBean(new gc(this.getGui(),{minHeight:100}))}toggleResizable(e){this.positionableFeature.setResizable(e?{bottom:!0}:!1)}expandGroups(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)}collapseGroups(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)}setColumnLayout(e){this.primaryColsListPanel.setColumnLayout(e)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},hL=class extends F{constructor(){super(...arguments),this.beanName="chartMenuItemMapper"}getChartItems(e){const t=this.beans,s=t.chartSvc,o=e==="pivotChart";if(!s)return null;const i=this.getLocaleTextFunc.bind(this),n=o?new pL(t,s,i):new gL(t,s,i),r=s.isEnterprise();let l=n.getMenuItem();if(l&&l.subMenu&&!r){const d=c=>({...c,subMenu:c.subMenu?.filter(u=>!u._enterprise).map(u=>d(u))});l=d(l)}const a=this.gos.get("chartToolPanelsDef")?.settingsPanel?.chartGroupsDef;return a&&(l=this.filterAndOrderChartMenu(l,a,n.getConfigLookup())),this.cleanInternals(l)}cleanInternals(e){if(!e)return e;const t=s=>(delete s?._key,delete s?._enterprise,s?.subMenu?.forEach(o=>t(o)),s);return t(e)}buildLookup(e){const t={},s=o=>{t[o._key]=o,o.subMenu&&o.subMenu.forEach(i=>s(i))};return s(e),t}filterAndOrderChartMenu(e,t,s){const o=this.buildLookup(e),i={...e,subMenu:[]};for(const n of Object.keys(t)){const r=t[n],l=s[n];if(l===null)continue;if(l==null){I(173,{group:n});continue}const a=o[l._key];if(a)if(a.subMenu){const d=r.map(c=>{const u=l[c];if(u==null){I(174,{group:n,chartType:c});return}return o[u]}).filter(c=>c!==void 0);d.length>0&&(a.subMenu=d,i.subMenu?.push(a))}else i.subMenu?.push(a)}return i.subMenu?.length==0?null:i}},pL=class{constructor(e,t,s){this.beans=e,this.chartSvc=t,this.getLocaleTextFunc=s}getMenuItem(){const e=this.getLocaleTextFunc(),t=(s,o,i,n,r=!1)=>({name:e(s,o+"‎"),action:()=>this.chartSvc.createPivotChart({chartType:i}),_key:n,_enterprise:r});return{name:e("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped","groupedColumn","pivotGroupedColumn"),t("stackedColumn","Stacked","stackedColumn","pivotStackedColumn"),t("normalizedColumn","100% Stacked","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped","groupedBar","pivotGroupedBar"),t("stackedBar","Stacked","stackedBar","pivotStackedBar"),t("normalizedBar","100% Stacked","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:e("pieChart","Pie"),subMenu:[t("pie","Pie","pie","pivotPie"),t("donut","Donut","donut","pivotDonut")]},{_key:"pivotLineChart",name:e("lineChart","Line"),subMenu:[t("lineChart","Line","line","pivotLineChart"),t("stackedLine","Stacked","stackedLine","pivotStackedLine"),t("normalizedLine","100% Stacked","normalizedLine","pivotNormalizedLine")]},{_key:"pivotAreaChart",name:e("areaChart","Area"),subMenu:[t("areaChart","Area","area","pivotArea"),t("stackedArea","Stacked","stackedArea","pivotStackedArea"),t("normalizedArea","100% Stacked","normalizedArea","pivotNormalizedArea")]},{_key:"pivotXYChart",name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter","scatter","pivotScatter"),t("bubble","Bubble","bubble","pivotBubble")]},{_key:"pivotStatisticalChart",_enterprise:!1,name:e("statisticalChart","Statistical"),subMenu:[t("histogramChart","Histogram","histogram","pivotHistogram",!1)]},{_key:"pivotHierarchicalChart",_enterprise:!0,name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemapChart","Treemap","treemap","pivotTreemap",!0),t("sunburstChart","Sunburst","sunburst","pivotSunburst",!0)]},{_key:"pivotFunnel",name:e("funnel","Funnel"),subMenu:[t("funnel","Funnel","funnel","pivotFunnel"),t("coneFunnel","Cone Funnel","coneFunnel","pivotConeFunnel"),t("pyramid","Pyramid","pyramid","pivotPyramid")]},{_key:"pivotCombinationChart",name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line","columnLineCombo","pivotColumnLineCombo"),t("AreaColumnCombo","Area & Column","areaColumnCombo","pivotAreaColumnCombo")]}],icon:pe("chart",this.beans,void 0)}}getConfigLookup(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",donut:"pivotDonut",doughnut:"pivotDonut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart",stackedLine:"pivotStackedLine",normalizedLine:"pivotNormalizedLine"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:null},hierarchicalGroup:{_key:"pivotHierarchicalChart",treemap:"pivotTreemap",sunburst:"pivotSunburst"},statisticalGroup:{_key:"pivotStatisticalChart",histogram:"pivotHistogram",rangeBar:null,rangeArea:null,boxPlot:null},funnelGroup:{_key:"pivotFunnel",funnel:"pivotFunnel",coneFunnel:"pivotConeFunnel",pyramid:"pivotPyramid"},polarGroup:null,specializedGroup:null}}},gL=class{constructor(e,t,s){this.beans=e,this.chartSvc=t,this.getLocaleTextFunc=s}getMenuItem(){const e=this.getLocaleTextFunc(),t=(s,o,i,n,r=!1)=>({name:e(s,o),action:()=>this.chartSvc.createChartFromCurrentRange(i),_key:n,_enterprise:r});return{name:e("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped","groupedColumn","rangeGroupedColumn"),t("stackedColumn","Stacked","stackedColumn","rangeStackedColumn"),t("normalizedColumn","100% Stacked","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped","groupedBar","rangeGroupedBar"),t("stackedBar","Stacked","stackedBar","rangeStackedBar"),t("normalizedBar","100% Stacked","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:e("pieChart","Pie"),subMenu:[t("pie","Pie","pie","rangePie"),t("donut","Donut","donut","rangeDonut")],_key:"rangePieChart"},{name:e("lineChart","Line"),subMenu:[t("lineChart","Line","line","rangeLineChart"),t("stackedLine","Stacked","stackedLine","rangeStackedLine"),t("normalizedLine","100% Stacked","normalizedLine","rangeNormalizedLine")],_key:"rangeLineChart"},{name:e("areaChart","Area"),subMenu:[t("areaChart","Area","area","rangeArea"),t("stackedArea","Stacked","stackedArea","rangeStackedArea"),t("normalizedArea","100% Stacked","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},{name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter","scatter","rangeScatter"),t("bubble","Bubble","bubble","rangeBubble")],_key:"rangeXYChart"},{name:e("polarChart","Polar"),subMenu:[t("radarLine","Radar Line","radarLine","rangeRadarLine"),t("radarArea","Radar Area","radarArea","rangeRadarArea"),t("nightingale","Nightingale","nightingale","rangeNightingale"),t("radialColumn","Radial Column","radialColumn","rangeRadialColumn"),t("radialBar","Radial Bar","radialBar","rangeRadialBar")],_key:"rangePolarChart",_enterprise:!0},{name:e("statisticalChart","Statistical"),subMenu:[t("boxPlot","Box Plot","boxPlot","rangeBoxPlot",!0),t("histogramChart","Histogram","histogram","rangeHistogram",!1),t("rangeBar","Range Bar","rangeBar","rangeRangeBar",!0),t("rangeArea","Range Area","rangeArea","rangeRangeArea",!0)],_key:"rangeStatisticalChart",_enterprise:!1},{name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemap","Treemap","treemap","rangeTreemap"),t("sunburst","Sunburst","sunburst","rangeSunburst")],_key:"rangeHierarchicalChart",_enterprise:!0},{name:e("specializedChart","Specialized"),subMenu:[t("heatmap","Heatmap","heatmap","rangeHeatmap"),t("waterfall","Waterfall","waterfall","rangeWaterfall")],_key:"rangeSpecializedChart",_enterprise:!0},{name:e("funnel","Funnel"),subMenu:[t("funnel","Funnel","funnel","rangeFunnel"),t("coneFunnel","Cone Funnel","coneFunnel","rangeConeFunnel"),t("pyramid","Pyramid","pyramid","rangePyramid")],_key:"rangeFunnel",_enterprise:!0},{name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line","columnLineCombo","rangeColumnLineCombo"),t("AreaColumnCombo","Area & Column","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:pe("chart",this.beans,void 0)}}getConfigLookup(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",donut:"rangeDonut",doughnut:"rangeDonut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart",stackedLine:"rangeStackedLine",normalizedLine:"rangeNormalizedLine"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},polarGroup:{_key:"rangePolarChart",radarLine:"rangeRadarLine",radarArea:"rangeRadarArea",nightingale:"rangeNightingale",radialColumn:"rangeRadialColumn",radialBar:"rangeRadialBar"},statisticalGroup:{_key:"rangeStatisticalChart",boxPlot:"rangeBoxPlot",histogram:"rangeHistogram",rangeBar:"rangeRangeBar",rangeArea:"rangeRangeArea"},hierarchicalGroup:{_key:"rangeHierarchicalChart",treemap:"rangeTreemap",sunburst:"rangeSunburst"},specializedGroup:{_key:"rangeSpecializedChart",heatmap:"rangeHeatmap",waterfall:"rangeWaterfall"},funnelGroup:{_key:"rangeFunnel",funnel:"rangeFunnel",coneFunnel:"rangeConeFunnel",pyramid:"rangePyramid"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:null}}}},fL=class extends F{constructor(){super(...arguments),this.beanName="colChooserFactory"}createColumnSelectPanel(e,t,s,o){const i=e.createManagedBean(new uL),n=o??t?.getColDef().columnChooserParams??{},{contractColumnSelection:r,suppressColumnExpandAll:l,suppressColumnFilter:a,suppressColumnSelectAll:d,suppressSyncLayoutWithGrid:c,columnLayout:u}=n;return i.init(!!s,he(this.gos,{suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!r,suppressColumnExpandAll:!!l,suppressColumnFilter:!!a,suppressColumnSelectAll:!!d,suppressSyncLayoutWithGrid:!!u||!!c,onStateUpdated:()=>{}}),"columnMenu"),u&&i.setColumnLayout(u),i}showColumnChooser({column:e,chooserParams:t,eventSource:s,headerPosition:o}){this.hideActiveColumnChooser();const i=this.createColumnSelectPanel(this,e,!0,t),n=this.getLocaleTextFunc(),r=this.beans,{visibleCols:l,focusSvc:a,menuUtils:d}=r,c=l.allCols.indexOf(e),u=e?a.focusedHeader??o??null:null;this.activeColumnChooserDialog=this.createBean(new MT({title:n("chooseColumns","Choose Columns"),component:i,width:300,height:300,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{ho(r,i.getGui())?.focus({preventScroll:!0}),this.dispatchVisibleChangedEvent(!0,e)},closedCallback:h=>{const p=this.activeColumnChooser.getGui();this.destroyBean(this.activeColumnChooser),this.activeColumnChooser=void 0,this.activeColumnChooserDialog=void 0,this.dispatchVisibleChangedEvent(!1,e),e&&d.restoreFocusOnClose({column:e,headerPosition:u,columnIndex:c,eventSource:s},p,h,!0)},postProcessPopupParams:{type:"columnChooser",column:e,eventSource:s}})),this.activeColumnChooser=i}hideActiveColumnChooser(){this.destroyBean(this.activeColumnChooserDialog)}dispatchVisibleChangedEvent(e,t){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:"columnChooser",column:t??null})}},ui="separator";function IC(e,t){if(e)for(let s=e.length-2;s>=0;s--){const o=e[s]===t,i=e[s+1]===t;o&&i&&e.splice(s+1,1)}}var mL=class extends F{constructor(){super(...arguments),this.beanName="menuItemMapper"}mapWithStockItems(e,t,s,o){if(!e)return[];const i=[],n=this.getLocaleTextFunc(),{beans:r,gos:l}=this,{validation:a,pinnedCols:d,colAutosize:c,aggFuncSvc:u,rowGroupColsSvc:h,colNames:p,colModel:g,clipboardSvc:f,expansionSvc:m,focusSvc:v,csvCreator:y,excelCreator:R,menuSvc:w,colChooserFactory:b,sortSvc:x,chartMenuItemMapper:A,valueColsSvc:H}=r,M=(z,L,ee,re)=>{switch(a?.validateMenuItem(z),z){case"pinSubMenu":return d&&L?{name:n("pinColumn","Pin Column"),icon:pe("menuPin",r,null),subMenu:["clearPinned","pinLeft","pinRight"]}:null;case"pinLeft":return d&&L?{name:n("pinLeft","Pin Left"),action:()=>d.setColsPinned([L],"left",re),checked:!!L&&L.isPinnedLeft()}:null;case"pinRight":return d&&L?{name:n("pinRight","Pin Right"),action:()=>d.setColsPinned([L],"right",re),checked:!!L&&L.isPinnedRight()}:null;case"clearPinned":return d&&L?{name:n("noPin","No Pin"),action:()=>d.setColsPinned([L],null,re),checked:!!L&&!L.isPinned()}:null;case"valueAggSubMenu":return u&&H&&(L?.isPrimary()||L?.getColDef().pivotValueColumn)?{name:n("valueAggregation","Value Aggregation"),icon:pe("menuValue",r,null),subMenu:CL(L,u,H,n),disabled:l.get("functionsReadOnly")}:null;case"autoSizeThis":return c?{name:n("autosizeThisColumn","Autosize This Column"),action:()=>c.autoSizeColumn(L,re,l.get("skipHeaderOnAutoSize"))}:null;case"autoSizeAll":return c?{name:n("autosizeAllColumns","Autosize All Columns"),action:()=>c.autoSizeAllColumns(re,l.get("skipHeaderOnAutoSize"))}:null;case"rowGroup":return h?{name:n("groupBy","Group by")+" "+ws(p.getDisplayNameForColumn(L,"header")),disabled:l.get("functionsReadOnly")||L?.isRowGroupActive()||!L?.getColDef().enableRowGroup,action:()=>h.addColumns([L],re),icon:pe("menuAddRowGroup",r,null)}:null;case"rowUnGroup":if(h&&l.isModuleRegistered("SharedRowGrouping")){const de=L?.getColDef().showRowGroup,Ge=l.get("groupLockGroupColumns");let xe,te,Z;if(de===!0)xe=n("ungroupAll","Un-Group All"),te=l.get("functionsReadOnly")||Ge===-1||Ge>=(h.columns.length??0),Z=()=>h.setColumns(h.columns.slice(0,Ge),re);else if(typeof de=="string"){const De=g.getColDefCol(de),Ft=De!=null?ws(p.getDisplayNameForColumn(De,"header")):de;xe=n("ungroupBy","Un-Group by")+" "+Ft,te=l.get("functionsReadOnly")||na(De,r),Z=()=>{h.removeColumns([de],re)}}else xe=n("ungroupBy","Un-Group by")+" "+ws(p.getDisplayNameForColumn(L,"header")),te=l.get("functionsReadOnly")||!L?.isRowGroupActive()||!L?.getColDef().enableRowGroup||na(L,r),Z=()=>h.removeColumns([L],re);return{name:xe,disabled:te,action:Z,icon:pe("menuRemoveRowGroup",r,null)}}else return null;case"resetColumns":return{name:n("resetColumns","Reset Columns"),action:()=>uf(r,re)};case"expandAll":return m?{name:n("expandAll","Expand All Row Groups"),action:()=>m.expandAll(!0)}:null;case"contractAll":return m?{name:n("collapseAll","Collapse All Row Groups"),action:()=>m.expandAll(!1)}:null;case"copy":return f?{name:n("copy","Copy"),shortcut:n("ctrlC","Ctrl+C"),icon:pe("clipboardCopy",r,null),action:()=>f.copyToClipboard()}:null;case"copyWithHeaders":return f?{name:n("copyWithHeaders","Copy with Headers"),icon:pe("clipboardCopy",r,null),action:()=>f.copyToClipboard({includeHeaders:!0})}:null;case"copyWithGroupHeaders":return f?{name:n("copyWithGroupHeaders","Copy with Group Headers"),icon:pe("clipboardCopy",r,null),action:()=>f.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}:null;case"cut":if(f){const de=v.getFocusedCell(),Ge=de?pc(r,de):null,xe=Ge?de?.column.isCellEditable(Ge):!1;return{name:n("cut","Cut"),shortcut:n("ctrlX","Ctrl+X"),icon:pe("clipboardCut",r,null),disabled:!xe||l.get("suppressCutToClipboard"),action:()=>f.cutToClipboard(void 0,"contextMenu")}}else return null;case"paste":return f?{name:n("paste","Paste"),shortcut:n("ctrlV","Ctrl+V"),disabled:!0,icon:pe("clipboardPaste",r,null),action:()=>f.pasteFromClipboard()}:null;case"export":{const de=[];return!l.get("suppressCsvExport")&&y&&de.push("csvExport"),!l.get("suppressExcelExport")&&R&&de.push("excelExport"),de.length?{name:n("export","Export"),subMenu:de,icon:pe("save",r,null)}:null}case"csvExport":return y?{name:n("csvExport","CSV Export"),icon:pe("csvExport",r,null),action:()=>y.exportDataAsCsv()}:null;case"excelExport":return R?{name:n("excelExport","Excel Export"),icon:pe("excelExport",r,null),action:()=>R.exportDataAsExcel()}:null;case"separator":return"separator";case"pivotChart":case"chartRange":return A.getChartItems(z);case"columnFilter":return w&&L?{name:n("columnFilter","Column Filter"),icon:pe("filter",r,null),action:()=>w.showFilterMenu({column:L,buttonElement:ee(),containerType:"columnFilter",positionBy:"button"})}:null;case"columnChooser":{const de=v.focusedHeader;return b?{name:n("columnChooser","Choose Columns"),icon:pe("columns",r,null),action:()=>b.showColumnChooser({column:L,eventSource:ee(),headerPosition:de})}:null}case"sortAscending":return x?{name:n("sortAscending","Sort Ascending"),icon:pe("sortAscending",r,null),action:()=>x.setSortForColumn(L,"asc",!1,re)}:null;case"sortDescending":return x?{name:n("sortDescending","Sort Descending"),icon:pe("sortDescending",r,null),action:()=>x.setSortForColumn(L,"desc",!1,re)}:null;case"sortUnSort":return x?{name:n("sortUnSort","Clear Sort"),icon:pe("sortUnSort",r,null),action:()=>x.setSortForColumn(L,null,!1,re)}:null;default:return I(176,{key:z}),null}};return e.forEach(z=>{let L;if(typeof z=="string"?L=M(z,t,s,o):L={...z},!L)return;const ee=L,{subMenu:re}=ee;re&&re instanceof Array&&(ee.subMenu=this.mapWithStockItems(re,t,s,o)),L!=null&&i.push(L)}),IC(i,ui),i}};function CL(e,t,s,o){let i;if(e.isPrimary())i=e;else{const r=e.getColDef().pivotValueColumn;i=j(r)?r:void 0}const n=[];if(i){const r=i.isValueActive(),l=t.getFuncNames(i);n.push({name:o("noAggregation","None"),action:()=>{s.removeColumns([i],"contextMenu"),s.setColumnAggFunc(i,void 0,"contextMenu")},checked:!r}),l.forEach(a=>{n.push({name:o(a,t.getDefaultFuncLabel(a)),action:()=>{s.setColumnAggFunc(i,a,"contextMenu"),s.addColumns([i],"contextMenu")},checked:r&&i.getAggFunc()===a})})}return n}var vL=class extends F{constructor(){super(...arguments),this.beanName="colMenuFactory"}createMenu(e,t,s,o){const i=e.createManagedBean(new eu(0,{column:s??null,node:null,value:null})),n=this.beans.menuItemMapper.mapWithStockItems(t,s??null,o,"columnMenu");return i.addMenuItems(n),i}getMenuItems(e=null,t=null){const s=this.getDefaultMenuOptions(e);let o;const i=(e?.getColDef()??t?.getColGroupDef())?.mainMenuItems;if(Array.isArray(i))o=i;else if(typeof i=="function")o=i(he(this.gos,{column:e,columnGroup:t,defaultItems:s}));else{const n=this.gos.getCallback("getMainMenuItems");n?o=n({column:e,columnGroup:t,defaultItems:s}):o=s}return IC(o,ui),o}getDefaultMenuOptions(e){const t=[],{beans:s,gos:o}=this,{colChooserFactory:i,rowGroupColsSvc:n,colModel:r,expansionSvc:l,sortSvc:a,menuSvc:d,pinnedCols:c,aggFuncSvc:u,colAutosize:h}=s,p=rt(o),g=()=>{!p&&i&&t.push("columnChooser"),t.push("resetColumns")};if(!e)return g(),t;const{colDef:f}=e,m=c&&!f.lockPinned,v=n?.columns.length??0,y=v>0,R=e.isPrimary(),w=u&&R&&y&&e.isAllowValue()||!R;if(a&&!p&&e.isSortable()){const b=e.getSort();b!=="asc"&&t.push("sortAscending"),b!=="desc"&&t.push("sortDescending"),b&&t.push("sortUnSort"),t.push(ui)}if(d?.isFilterMenuItemEnabled(e)&&(t.push("columnFilter"),t.push(ui)),m&&t.push("pinSubMenu"),w&&t.push("valueAggSubMenu"),(m||w)&&t.push(ui),h&&(t.push("autoSizeThis"),t.push("autoSizeAll"),t.push(ui)),n&&o.isModuleRegistered("SharedRowGrouping")){const b=t.length;f.showRowGroup?t.push("rowUnGroup"):e.isAllowRowGroup()&&R&&(e.isRowGroupActive()?na(e,s)||t.push("rowUnGroup"):t.push("rowGroup")),t.length>b&&t.push(ui)}return g(),l&&ks(o)&&(o.get("treeData")||v>(r.isPivotMode()?1:0))&&(t.push("expandAll"),t.push("contractAll")),t}};function wL(e){return{tag:"div",cls:`ag-tabs ${e}`,children:[{tag:"div",ref:"eHeader"},{tag:"div",ref:"eBody",role:"presentation",cls:`ag-tabs-body ${e?`${e}-body`:""}`}]}}var yL=class extends nr{constructor(e){super(wL(e.cssClass)),this.eHeader=k,this.eBody=k,this.items=[],this.tabbedItemScrollMap=new Map,this.params=e}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEach(e=>this.addItem(e)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>this.activeItem?.tabbedItem?.afterDetachedCallback?.())}setupHeader(){const{enableCloseButton:e,cssClass:t}=this.params,s=(o,i)=>{o.classList.add(`ag-tabs-${i}`),t&&o.classList.add(`${t}-${i}`)};e?(this.setupCloseButton(s),this.eTabHeader=Xe(this.beans).createElement("div"),s(this.eHeader,"header-wrapper"),os(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,os(this.eTabHeader,"tablist"),s(this.eTabHeader,"header")}setupCloseButton(e){const t=Xe(this.beans),s=t.createElement("button");e(s,"close-button");const o=pe("close",this.beans);Kt(s,this.params.closeButtonAriaLabel),s.appendChild(o),this.addManagedElementListeners(s,{click:()=>this.params.onCloseClicked?.()});const i=t.createElement("div");e(i,"close-button-wrapper"),os(i,"presentation"),i.appendChild(s),this.eHeader.appendChild(i),this.eCloseButton=s}handleKeyDown(e){switch(e.key){case D.RIGHT:case D.LEFT:{if(!this.eTabHeader.contains(Be(this.beans)))return;const t=e.key===D.RIGHT,s=this.gos.get("enableRtl"),o=this.items.indexOf(this.activeItem),i=t!==s?Math.min(o+1,this.items.length-1):Math.max(o-1,0);if(o===i)return;e.preventDefault();const n=this.items[i];this.showItemWrapper(n),n.eHeaderButton.focus();break}case D.UP:case D.DOWN:e.stopPropagation();break}}onTabKeyDown(e){if(e.defaultPrevented)return;const{beans:t,eHeader:s,eBody:o,activeItem:i,params:n}=this,{suppressTrapFocus:r,enableCloseButton:l}=n,a=Be(t),d=e.target,c=e.shiftKey;if(s.contains(a)){e.preventDefault(),l&&c&&!this.eCloseButton?.contains(a)?this.eCloseButton?.focus():r&&c?vC(Xe(t).body,d)?.focus():this.focusBody(e.shiftKey);return}let u=null;if(IT(o,d)&&(c&&(u=vC(o,d)),!u&&!r&&(u=i.eHeaderButton)),!u&&o.contains(a)&&(u=ho(t,o,!1,c),!u)){r&&!c?this.forceFocusOutOfContainer(c):l&&!c?(e.preventDefault(),this.eCloseButton?.focus()):(e.preventDefault(),this.focusHeader());return}u&&(e.preventDefault(),u.focus())}focusInnerElement(e){return e?this.focusBody(!0):(this.focusHeader(),!0)}focusHeader(e){this.activeItem.eHeaderButton.focus({preventScroll:e})}focusBody(e){return ys(this.eBody,e)}setAfterAttachedParams(e){this.afterAttachedParams=e}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(e){const t=Ne({tag:"span",cls:"ag-tab",role:"tab",attrs:{tabindex:"-1"}});t.appendChild(e.title),this.eTabHeader.appendChild(t),Kt(t,e.titleLabel);const s={tabbedItem:e,eHeaderButton:t};this.items.push(s),t.addEventListener("click",this.showItemWrapper.bind(this,s))}showItem(e){const t=this.items.find(s=>s.tabbedItem===e);t&&this.showItemWrapper(t)}showItemWrapper(e){const{tabbedItem:t,eHeaderButton:s}=e;if(this.params.onItemClicked?.({item:t}),this.activeItem===e){this.params.onActiveItemClicked?.();return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),is(this.eBody),t.bodyPromise.then(o=>{this.eBody.appendChild(o);const i=!Ff();if(this.params.suppressFocusBodyOnOpen||ys(this.eBody,!1,i),t.afterAttachedCallback&&t.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const n=t.getScrollableContainer&&t.getScrollableContainer()||o;[this.lastScrollListener]=this.addManagedElementListeners(n,{scroll:()=>{this.tabbedItemScrollMap.set(t.name,n.scrollTop)}});const r=this.tabbedItemScrollMap.get(t.name);r!==void 0&&setTimeout(()=>{n.scrollTop=r},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),this.activeItem.tabbedItem.afterDetachedCallback?.()),s.classList.add("ag-tab-selected"),this.activeItem=e}},ko="filterMenuTab",Oo="generalMenuTab",hi="columnsMenuTab",ra=[Oo,ko,hi],bL=class extends F{constructor(){super(...arguments),this.beanName="enterpriseMenuFactory"}hideActiveMenu(){this.destroyBean(this.activeMenu)}showMenuAfterMouseEvent(e,t,s,o,i){const{column:n,columnGroup:r}=this.splitColumnOrGroup(e),l=i?"filterMenuTab":void 0;this.showMenu(n,r,a=>{const d=a.getGui();this.beans.popupSvc.positionPopupUnderMouseEvent({type:s,column:n,mouseEvent:t,ePopup:d}),l&&a.showTab?.(l),this.dispatchVisibleChangedEvent(!0,!1,n,r,l)},s,l,void 0,t.target,o)}splitColumnOrGroup(e){const t=e&&Ns(e);return{column:t?e:void 0,columnGroup:t?void 0:e}}showMenuAfterButtonClick(e,t,s,o,i){let n=-1,r="left";this.gos.get("enableRtl")&&(n=1,r="right");const l=i?"filterMenuTab":void 0,a=l?[l]:void 0,d=rt(this.gos),c=(d?9:4)*n,u=d?-23:4,{column:h,columnGroup:p}=this.splitColumnOrGroup(e);this.showMenu(h,p,g=>{const f=g.getGui();this.beans.popupSvc.positionPopupByComponent({type:s,column:h,eventSource:t,ePopup:f,alignSide:r,nudgeX:c,nudgeY:u,position:"under",keepWithinBounds:!0}),l&&g.showTab?.(l),this.dispatchVisibleChangedEvent(!0,!1,h,p,l)},s,l,a,t,o)}showMenu(e,t,s,o,i,n,r,l){const a=this.getMenuParams(e,t,n,r);if(!a)return;const{menu:d,eMenuGui:c,anchorToElement:u,restoreFocusParams:h}=a,p=[],{menuUtils:g,popupSvc:f}=this.beans;p.push(v=>{const y=d.getGui();this.destroyBean(d),e&&(Ql(e,!1,"contextMenu"),g.restoreFocusOnClose(h,y,v)),l?.()});const m=this.getLocaleTextFunc();if(f.addPopup({modal:!0,eChild:c,closeOnEsc:!0,closedCallback:v=>{p.forEach(y=>y(v)),this.dispatchVisibleChangedEvent(!1,!1,e,t,i)},afterGuiAttached:v=>d.afterGuiAttached(Object.assign({},{container:o},v)),positionCallback:i?()=>s(d):void 0,ariaLabel:m("ariaLabelColumnMenu","Column Menu")}),i||(d.showTabBasedOnPreviousSelection?.(),s(d)),zg(this.gos)){const v=f.setPopupPositionRelatedToElement(c,u);v&&e&&this.addStopAnchoring(v,e,p)}d.addEventListener("tabSelected",v=>{this.dispatchVisibleChangedEvent(!1,!0,e),this.lastSelectedTab=v.key,this.dispatchVisibleChangedEvent(!0,!0,e)}),e&&Ql(e,!0,"contextMenu"),this.activeMenu=d,d.addEventListener("destroyed",()=>{this.activeMenu===d&&(this.activeMenu=null)})}addStopAnchoring(e,t,s){e.then(o=>{t.__addEventListener("leftChanged",o),t.__addEventListener("visibleChanged",o),s.push(()=>{t.__removeEventListener("leftChanged",o),t.__removeEventListener("visibleChanged",o)})})}getMenuParams(e,t,s,o){const{focusSvc:i,visibleCols:n,ctrlsSvc:r}=this.beans,l={column:e,headerPosition:i.focusedHeader,columnIndex:n.allCols.indexOf(e),eventSource:o},a=this.createMenu(e,t,l,s,o);return a?{menu:a,eMenuGui:a.getGui(),anchorToElement:o||r.getGridBodyCtrl().eGridBody,restoreFocusParams:l}:void 0}createMenu(e,t,s,o,i){if(rt(this.gos))return this.createBean(new SL(e,s,this.lastSelectedTab,o,i));{const n=this.beans.colMenuFactory.getMenuItems(e,t);return n.length?this.createBean(new RL(n,e,s,i)):void 0}}dispatchVisibleChangedEvent(e,t,s,o,i){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:t,key:this.lastSelectedTab??i??(rt(this.gos)?Oo:"columnMenu"),column:s??null,columnGroup:o??null})}isMenuEnabled(e){if(!rt(this.gos))return!0;const t=!this.beans.filterManager?.isFilterAllowed(e),s=e.getColDef().menuTabs??ra;return(t&&s.includes(ko)?s.length-1:s.length)>0}showMenuAfterContextMenuEvent(e,t,s){this.beans.menuUtils.onContextMenu({mouseEvent:t,touchEvent:s,source:"ui",showMenuCallback:o=>(this.showMenuAfterMouseEvent(e,o,"columnMenu"),!0)})}},SL=class extends F{constructor(e,t,s,o,i){super(),this.column=e,this.restoreFocusParams=t,this.initialSelection=s,this.restrictTo=o,this.sourceElement=i,this.tabFactories={},this.includeChecks={};const{tabFactories:n,includeChecks:r}=this;n[Oo]=this.createMainPanel.bind(this),n[ko]=this.createFilterPanel.bind(this),n[hi]=this.createColumnsPanel.bind(this),r[Oo]=()=>!0,r[ko]=()=>e?!!this.beans.filterManager?.isFilterAllowed(e):!1,r[hi]=()=>!0}postConstruct(){const e=this.getTabsToCreate().map(s=>this.createTab(s)),t=new yL({items:e,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)});this.tabbedLayout=this.createBean(t),this.mainMenuList?.setParentComponent(t),this.addDestroyFunc(()=>this.destroyBean(t))}getTabsToCreate(){return this.restrictTo?this.restrictTo:(this.column?.getColDef().menuTabs??ra).filter(e=>this.isValidMenuTabItem(e)&&this.isNotSuppressed(e))}isValidMenuTabItem(e){let t=!0,s=ra;return this.restrictTo!=null&&(t=this.restrictTo.indexOf(e)>-1,s=this.restrictTo),t=t&&ra.indexOf(e)>-1,t||I(175,{menuTabName:e,itemsToConsider:s}),t}isNotSuppressed(e){return this.includeChecks[e]()}createTab(e){return this.tabFactories[e]()}showTabBasedOnPreviousSelection(){this.showTab(this.initialSelection)}showTab(e){const{tabItemColumns:t,tabbedLayout:s,tabItemFilter:o,tabItemGeneral:i}=this;t&&e===hi?s.showItem(t):o&&e===ko?s.showItem(o):i&&e===Oo?s.showItem(i):s.showFirstItem()}onTabItemClicked(e){let t=null;switch(e.item){case this.tabItemColumns:t=hi;break;case this.tabItemFilter:t=ko;break;case this.tabItemGeneral:t=Oo;break}t&&this.activateTab(t)}activateTab(e){const t={type:"tabSelected",key:e};this.dispatchLocalEvent(t)}createMainPanel(){const{beans:e,column:t}=this,s=e.colMenuFactory,o=s.createMenu(this,s.getMenuItems(t),this.column,()=>this.sourceElement??this.getGui());this.mainMenuList=o,o.addEventListener("closeMenu",this.onHidePopup.bind(this));const i={title:pe("legacyMenu",e,t),titleLabel:Oo.replace("MenuTab",""),bodyPromise:Oe.resolve(o.getGui()),name:Oo};return this.tabItemGeneral=i,i}onHidePopup(e){this.beans.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}createFilterPanel(){const e=this.column?this.createBean(new Of(this.column,"COLUMN_MENU")):null;this.filterComp=e,e?.hasFilter()||ue(119);const t=o=>e?.afterGuiAttached(o),s=()=>e?.afterGuiDetached();return this.tabItemFilter={title:pe("filterTab",this.beans,this.column),titleLabel:ko.replace("MenuTab",""),bodyPromise:Oe.resolve(e?.getGui()),afterAttachedCallback:t,afterDetachedCallback:s,name:ko},this.tabItemFilter}createColumnsPanel(){const e=Ne({tag:"div",cls:"ag-menu-column-select-wrapper"}),{beans:t,column:s}=this,i=t.colChooserFactory.createColumnSelectPanel(this,s).getGui();i.classList.add("ag-menu-column-select"),e.appendChild(i);const n={title:pe("columns",t,s),titleLabel:hi.replace("MenuTab",""),bodyPromise:Oe.resolve(e),name:hi};return this.tabItemColumns=n,n}afterGuiAttached(e){const{container:t,hidePopup:s}=e;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:s}),s&&(this.hidePopupFunc=s,this.addDestroyFunc(s))}getGui(){return this.tabbedLayout.getGui()}destroy(){super.destroy(),this.destroyBean(this.filterComp)}},RL=class extends ve{constructor(e,t,s,o){super({tag:"div",ref:"eColumnMenu",cls:"ag-menu ag-column-menu",role:"presentation"}),this.menuItems=e,this.column=t,this.restoreFocusParams=s,this.sourceElement=o,this.eColumnMenu=k}postConstruct(){const e=this.beans.colMenuFactory.createMenu(this,this.menuItems,this.column,()=>this.sourceElement??this.getGui());this.mainMenuList=e,e.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eColumnMenu.appendChild(e.getGui())}onHidePopup(e){this.beans.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}afterGuiAttached({hidePopup:e}){e&&(this.hidePopupFunc=e,this.addDestroyFunc(e)),ys(this.mainMenuList.getGui())}};function xL(e,t){e.colChooserFactory?.showColumnChooser({chooserParams:t})}function FL(e){e.colChooserFactory?.hideActiveColumnChooser()}var DL=class extends F{constructor(){super(...arguments),this.beanName="menuUtils"}restoreFocusOnClose(e,t,s,o){const{eventSource:i}=e,n=s instanceof KeyboardEvent;if(!o&&!n||!i)return;const r=Be(this.beans);!t.contains(r)&&!Yd(this.beans)||this.focusHeaderCell(e)}closePopupAndRestoreFocusOnSelect(e,t,s){let o;s&&s.keyboardEvent&&(o=s.keyboardEvent),e(o&&{keyboardEvent:o});const i=this.beans,n=i.focusSvc,r=n.getFocusedCell();if(Yd(i))if(r){const{rowIndex:l,rowPinned:a,column:d}=r;n.setFocusedCell({rowIndex:l,column:d,rowPinned:a,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}else this.focusHeaderCell(t)}onContextMenu(e){const{mouseEvent:t,touchEvent:s,showMenuCallback:o,source:i}=e;if(!this.gos.get("allowContextMenuWithControlKey")&&t&&(t.ctrlKey||t.metaKey)||(t&&this.blockMiddleClickScrollsIfNeeded(t),i==="ui"&&this.gos.get("suppressContextMenu")))return;const n=t??s.touches[0];if(o(n)){const r=t??s;r&&r.cancelable&&r.preventDefault()}}async focusHeaderCell(e){const{column:t,columnIndex:s,headerPosition:o,eventSource:i}=e,{visibleCols:n,headerNavigation:r,focusSvc:l}=this.beans,a=await n.allCols.some(d=>d===t);if(this.isAlive()){if(t?.isAlive()&&a&&i&&fs(i)){const d=uc(i);d&&(r?.scrollToColumn(t),d.focus())}else if(o&&s!==-1){const d=n.allCols,c=d[s]||Re(d);c&&l.focusHeaderPosition({headerPosition:{headerRowIndex:o.headerRowIndex,column:c}})}}}blockMiddleClickScrollsIfNeeded(e){this.gos.get("suppressMiddleClickScrolls")&&e.which===2&&e.preventDefault()}},EL={moduleName:"MenuCore",version:lt,beans:[mL,hL,DL],icons:{chart:"chart",columns:"columns",loadingMenuItems:"loading",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",save:"save",csvExport:"csv",excelExport:"excel",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"},dependsOn:[Rs,nC,iC,OT]},ML={moduleName:"ColumnMenu",version:lt,beans:[bL,vL,fL],icons:{legacyMenu:"menu",filterTab:"filter",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate"},apiFunctions:{showColumnChooser:xL,hideColumnChooser:FL},dependsOn:[EL,gm,wm]},pi="__AG_SELECT_ALL__",gi="__AG_ADD_SELECTION_TO_FILTER__",AL={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noMatches:"No matches."},PL={tag:"div",cls:"ag-set-filter-item",attrs:{"aria-hidden":"true"},children:[{tag:"span",cls:"ag-set-filter-group-icons",children:[{tag:"span",ref:"eGroupClosedIcon",cls:"ag-set-filter-group-closed-icon"},{tag:"span",ref:"eGroupOpenedIcon",cls:"ag-set-filter-group-opened-icon"},{tag:"span",ref:"eGroupIndeterminateIcon",cls:"ag-set-filter-group-indeterminate-icon"}]},{tag:"ag-checkbox",ref:"eCheckbox",cls:"ag-set-filter-item-checkbox"}]},IL={tag:"div",cls:"ag-set-filter-item",children:[{tag:"ag-checkbox",ref:"eCheckbox",cls:"ag-set-filter-item-checkbox"}]},TL=class extends ve{constructor(e){super(e.isGroup?PL:IL,[Yi]),this.eCheckbox=k,this.eGroupOpenedIcon=k,this.eGroupClosedIcon=k,this.eGroupIndeterminateIcon=k,this.formattedValue=null,this.focusWrapper=e.focusWrapper,this.value=e.value,this.params=e.params,this.translate=e.translate,this.valueFormatter=e.valueFormatter,this.item=e.item,this.isSelected=e.isSelected,this.isTree=e.isTree,this.depth=e.depth??0,this.isGroup=e.isGroup,this.groupsExist=e.groupsExist,this.isExpanded=e.isExpanded,this.hasIndeterminateExpandState=e.hasIndeterminateExpandState}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,getLocation:()=>"setFilterValue",shouldDisplayTooltip:()=>this.shouldDisplayTooltip?.()??!0,getValueFormatted:()=>this.formattedValue,getAdditionalParams:()=>this.isTree?{level:this.depth}:{}})),this.addDestroyFunc(()=>this.destroyCellRendererComponent?.()),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&(this.addCssClass("ag-set-filter-indent-"+this.depth),this.getGui().style.setProperty("--ag-indentation-level",String(this.depth))),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),sg(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),!this.params.readOnly&&this.eCheckbox.onValueChange(e=>this.onCheckboxChanged(!!e))}getFocusableElement(){return this.focusWrapper}setupExpansion(){const{eGroupClosedIcon:e,eGroupOpenedIcon:t,eGroupIndeterminateIcon:s,hasIndeterminateExpandState:o,beans:i}=this;e.appendChild(Ki("setFilterGroupClosed",i,null)),t.appendChild(Ki("setFilterGroupOpen",i,null));const n=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(e,{click:n}),this.addManagedElementListeners(t,{click:n}),o&&(s.appendChild(Ki("setFilterGroupIndeterminate",i,null)),this.addManagedElementListeners(s,{click:n})),this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(e,t){if(this.isGroup&&e!==this.isExpanded){this.isExpanded=e;const s={type:"expandedChanged",isExpanded:!!e,item:this.item};t||this.dispatchLocalEvent(s),this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){const{isExpanded:e,hasIndeterminateExpandState:t,eGroupClosedIcon:s,eGroupOpenedIcon:o,eGroupIndeterminateIcon:i}=this;fe(s,t?e===!1:!e),fe(o,e===!0),t&&fe(i,e===void 0)}onCheckboxChanged(e){this.isSelected=e;const t={type:"selectionChanged",isSelected:e,item:this.item};this.dispatchLocalEvent(t),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){this.params.readOnly||this.setSelected(!this.isSelected)}setSelected(e,t){this.isSelected=e,this.eCheckbox.setValue(e,t),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;const e=this.getLocaleTextFunc(),t=this.eCheckbox.getValue(),s=t===void 0?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),o=e("ariaToggleVisibility","Press SPACE to toggle visibility");Wn(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${o} (${s})`)}setupFixedAriaLabels(e){if(!this.isTree)return;const s=this.getLocaleTextFunc()("ariaFilterValue","Filter Value"),o=this.getAriaElement();Kt(o,`${e} ${s}`),Ed(o,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){const e=this.getAriaElement();rg(e,this.eCheckbox.getValue())}refreshAriaExpanded(){Zo(this.getAriaElement(),!!this.isExpanded)}refresh(e,t,s){this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(s,!0);const{cellRendererComponent:o,cellRendererParams:i,beans:n,params:r}=this;if(this.valueFunction){const l=this.valueFunction();this.setTooltipAndCellRendererParams(l,l),o||this.renderCellWithoutCellRenderer()}if(o){const l=zi(n.userCompFactory,r,i);if(!o.refresh?.(l?.params??i)){const d=o;this.renderCell(),this.destroyBean(d)}}}render(){const{params:{column:e}}=this;let{value:t}=this,s=null;typeof t=="function"?(this.valueFunction=t,s=this.valueFunction(),t=s):this.isTree?s=ao(t):s=this.getFormattedValue(e,t),this.formattedValue=s,this.setTooltipAndCellRendererParams(t,s),this.renderCell()}setTooltipAndCellRendererParams(e,t){const s=this.gos;if(this.params.showTooltips&&(!rm(s)||!this.params.cellRenderer)){const o=t??ao(e);this.shouldDisplayTooltip=Pc(s,()=>this.eCheckbox.getGui().querySelector(".ag-label")),this.tooltipFeature?.setTooltipAndRefresh(o)}this.cellRendererParams=he(s,{value:e,valueFormatted:t,colDef:this.params.colDef,column:this.params.column,setTooltip:(o,i)=>{s.assertModuleRegistered("Tooltip",3),this.shouldDisplayTooltip=i,this.tooltipFeature?.setTooltipAndRefresh(o)}})}getFormattedValue(e,t){return this.beans.valueSvc.formatValue(e,null,t,this.valueFormatter,!1)}renderCell(){const t=zi(this.beans.userCompFactory,this.params,this.cellRendererParams)?.newAgStackInstance();if(t==null){this.renderCellWithoutCellRenderer();return}t.then(s=>{s&&(this.cellRendererComponent=s,this.eCheckbox.setLabel(s.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(s))})}renderCellWithoutCellRenderer(){const{valueFormatted:e,value:t}=this.cellRendererParams;let s=e??t??this.translate("blanks");typeof s!="string"&&(I(208),s=""),this.eCheckbox.setLabel(s),this.setupFixedAriaLabels(s)}getComponentHolder(){return this.params.column.getColDef()}},TC=class{getModelAsString(e,t){const{values:s}=e||t.getModel()||{},o=t.getValueModel();if(s==null||o==null)return"";const i=s.filter(l=>o.isKeyAvailable(l)),n=i.length,r=i.slice(0,10).map(l=>t.getFormattedValue(l));return`(${n}) ${r.join(",")}${n>10?",...":""}`}};function su(e,t,s){let o=e;return o?(o=o.map(i=>ao(kt(i))),!t&&s&&o.some(i=>i==null)?Re(o)==null?null:o.filter(i=>i!=null):o):null}var LL=class{constructor(e,t,s,o,i,n,r,l,a,d){this.rowModel=e,this.filterParams=t,this.createKey=s,this.caseFormat=o,this.valueSvc=i,this.treeDataOrGrouping=n,this.treeData=r,this.groupAllowUnbalanced=l,this.addManagedEventListeners=a,this.rowGroupColsSvc=d}extractUniqueValuesAsync(e,t){return new Oe(s=>{if(this.rowModel.isRowDataLoaded())s(this.extractUniqueValues(e,t));else{const[o]=this.addManagedEventListeners({rowCountReady:()=>{o?.(),s(this.extractUniqueValues(e,t))}})}})}extractUniqueValues(e,t){const s=new Map,o=this.extractExistingFormattedKeys(t),i=new Set,n=this.treeData,r=this.rowGroupColsSvc?.columns,l=(a,d)=>{const c=this.caseFormat(a);if(!i.has(c)){i.add(c);let u=a,h=kt(d);const p=o?.get(c);p!=null&&(u=p,h=t.get(p)),s.set(u,h)}};return this.rowModel.forEachLeafNode(a=>{if(!a.data||!e(a))return;if(this.treeDataOrGrouping){this.addValueForTreeDataOrGrouping(a,n,r,l);return}const d=this.getValue(a);d!=null&&Array.isArray(d)?(d.forEach(c=>{l(this.createKey(c,a),c)}),d.length===0&&l(null,null)):l(this.createKey(d,a),d)}),s}addValueForTreeDataOrGrouping(e,t,s=[],o){let i;if(t){if(e.childrenAfterGroup?.length)return;i=e.getRoute()??[e.key??e.id]}else i=s.map(r=>this.valueSvc.getKeyForNode(r,e)),i.push(this.getValue(e));const n=su(i,t,this.groupAllowUnbalanced);o(this.createKey(n),n)}getValue(e){return this.filterParams.getValue(e)}extractExistingFormattedKeys(e){if(!e)return null;const t=new Map;return e.forEach((s,o)=>{t.set(this.caseFormat(o),o)}),t}},kL=class{constructor({caseFormat:e}){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=e}allFilteringKeys(){return this.filteringKeys}allFilteringKeysCaseFormatted(){return this.filteringKeysCaseFormatted}setFilteringKeys(e){this.filteringKeys=new Set(e),this.hasNoAppliedFilteringKeys=!this.filteringKeys||this.filteringKeys.size===0,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach(t=>this.filteringKeysCaseFormatted.add(this.caseFormat(t)))}addFilteringKey(e){this.filteringKeys==null&&(this.filteringKeys=new Set,this.filteringKeysCaseFormatted=new Set),this.filteringKeys.add(e),this.filteringKeysCaseFormatted.add(this.caseFormat(e)),this.hasNoAppliedFilteringKeys&&(this.hasNoAppliedFilteringKeys=!1)}hasCaseFormattedFilteringKey(e){return this.filteringKeysCaseFormatted.has(this.caseFormat(e))}hasFilteringKey(e){return this.filteringKeys.has(e)}reset(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1}},OL=class{constructor(e,t,s,o){this.valueSvc=e,this.valueFormatter=t,this.formatter=s,this.column=o,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(e,t,s){this.displayedKeys=Array.from(s)}updateDisplayedValuesToMatchMiniFilter(e,t,s,o,i){this.displayedKeys=[];for(const n of s)if(n==null)i&&this.displayedKeys.push(n);else{const r=e(n),l=this.valueSvc.formatValue(this.column,null,r,this.valueFormatter,!1),a=this.formatter(l);o(a)&&this.displayedKeys.push(n)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(e){return this.displayedKeys[e]}getSelectAllItem(){return pi}getAddSelectionToFilterItem(){return gi}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(e){this.displayedKeys.forEach(e)}someDisplayedKey(e){return this.displayedKeys.some(e)}hasGroups(){return!1}refresh(){}},GL=e=>ke(e)?null:!(e instanceof Date)||isNaN(e.getTime())?["NaN"]:[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())],LC=class{constructor(e,t,s,o){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=s,this.treeDataOrGrouping=o,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:pi,children:this.allDisplayedItemsTree,expanded:!0,key:pi,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:gi,expanded:!0,key:gi,parentTreeKeys:[]}}updateOnParamsChange(e){this.treeListFormatter=e}updateDisplayedValuesToAllAvailable(e,t,s,o){o==="reload"?this.generateItemTree(e,t,s):o==="otherFilter"?(this.updateAvailable(s),this.updateExpandAll()):o==="miniFilter"&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(e,t,s,o,i,n){n==="reload"?this.generateItemTree(e,t,s):n==="otherFilter"&&this.updateAvailable(s),this.updateFilter(o,i),this.updateExpandAll(),this.flattenItems()}generateItemTree(e,t,s){this.allDisplayedItemsTree=[],this.groupsExist=!1;const o=this.getTreeListPathGetter(e,s);for(const i of t){const n=e(i),r=o(n)??[null];r.length>1&&(this.groupsExist=!0);const l=s.has(i);let a=this.allDisplayedItemsTree,d,c=[];r.forEach((u,h)=>{a||(a=[],d.children=a),d=a.find(p=>p.treeKey?.toUpperCase()===u?.toUpperCase()),d||(d={treeKey:u,depth:h,filterPasses:!0,expanded:!1,available:l,parentTreeKeys:c},h===r.length-1&&(d.key=i),a.push(d)),a=d.children,c=[...c,u]})}this.updateAvailable(s),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1}getTreeListPathGetter(e,t){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return o=>o;let s=!1;for(const o of t){const i=e(o);if(i instanceof Date){s=!0;break}else if(i!=null)break}return s?GL:(I(211),o=>[String(o)])}flattenItems(){this.activeDisplayedItemsFlat=[];const e=t=>{t.forEach(s=>{!s.filterPasses||!s.available||(this.activeDisplayedItemsFlat.push(s),s.children&&s.expanded&&e(s.children))})};e(this.allDisplayedItemsTree)}resetFilter(){const e=t=>{t.children&&t.children.forEach(s=>{e(s)}),t.filterPasses=!0};this.allDisplayedItemsTree.forEach(t=>e(t))}updateFilter(e,t){const s=o=>o.available?o.treeKey==null?t:e(this.formatter(this.treeListFormatter?this.treeListFormatter(o.treeKey,o.depth,o.parentTreeKeys):o.treeKey)):!1;this.allDisplayedItemsTree.forEach(o=>this.recursiveItemCheck(o,!1,s,"filterPasses"))}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(e){return this.activeDisplayedItemsFlat[e]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){const e=[];return this.forEachDisplayedKey(t=>e.push(t)),e}forEachDisplayedKey(e){const t=(s,o)=>{s.children?(!s.expanded||!o)&&s.children.forEach(i=>{i.filterPasses&&t(i,!1)}):e(s.key)};this.activeDisplayedItemsFlat.forEach(s=>t(s,!0))}someDisplayedKey(e){const t=(s,o)=>{if(s.children){if(!s.expanded||!o)return s.children.some(i=>i.filterPasses?t(i,!1):!1)}else return e(s.key);return!1};return this.activeDisplayedItemsFlat.some(s=>t(s,!0))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){const e=(s,o,i)=>{for(const n of s){if(!n.filterPasses||!n.available||!n.children)continue;if(o=o||!!n.expanded,i=i||!n.expanded,o&&i)return;const r=e(n.children,o,i);if(r===void 0)return;r?o=!0:i=!0}return o&&i?void 0:o},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)}recursiveItemCheck(e,t,s,o){let i=!1;e.children&&e.children.forEach(r=>{const l=this.recursiveItemCheck(r,t||s(e),s,o);i=i||l});const n=t||i||s(e);return e[o]=n,n}updateAvailable(e){const t=s=>e.has(s.key);this.allDisplayedItemsTree.forEach(s=>this.recursiveItemCheck(s,!1,t,"available"))}},NL=class{constructor(e){this.localEventService=new ro,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;const{usingComplexObjects:t,rowGroupColsSvc:s,valueSvc:o,treeDataTreeList:i,groupingTreeList:n,filterParams:r,gos:l,valueFormatter:a,addManagedEventListeners:d}=e,{column:c,colDef:u,textFormatter:h,doesRowPassOtherFilter:p,suppressSorting:g,comparator:f,rowModel:m,values:v,caseSensitive:y,treeList:R,treeListPathGetter:w,treeListFormatter:b}=r;this.filterParams=r,this.gos=l,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=h??(M=>M??null),this.doesRowPassOtherFilters=p,this.suppressSorting=g||!1,this.filteringKeys=new kL({caseFormat:this.caseFormat});const x=f??u.comparator,A=!!i||!!n;this.compareByValue=!!(t&&x||A||R&&!w),A&&!x?this.entryComparator=this.createTreeDataOrGroupingComparator():R&&!w&&!x?this.entryComparator=([M,z],[L,ee])=>yl(z,ee):this.entryComparator=([M,z],[L,ee])=>x(z,ee),this.keyComparator=x??yl,this.caseSensitive=!!y;const H=l.get("groupAllowUnbalanced");ks(l)&&(this.clientSideValuesExtractor=new LL(m,this.filterParams,this.createKey,this.caseFormat,o,A,!!i,H,d,s)),v==null?this.valuesType=2:(this.valuesType=Array.isArray(v)?0:1,this.providedValues=v),this.displayValueModel=R?new LC(this.formatter,w,b,i||n):new OL(o,a,this.formatter,c),this.updateAllValues().then(M=>this.resetSelectionState(M||[]))}addEventListener(e,t,s){this.localEventService.addEventListener(e,t,s)}removeEventListener(e,t,s){this.localEventService.removeEventListener(e,t,s)}updateOnParamsChange(e){return new Oe(t=>{const{values:s,textFormatter:o,suppressSorting:i,treeListFormatter:n}=e,r=this.providedValues,l=this.suppressSorting;if(this.filterParams=e,this.formatter=o??(a=>a??null),this.suppressSorting=i||!1,this.providedValues=s??null,this.displayValueModel instanceof LC&&this.displayValueModel.updateOnParamsChange(n),this.providedValues!==r||this.suppressSorting!==l){!s||s.length===0?(this.valuesType=2,this.providedValues=null):this.valuesType=Array.isArray(s)?0:1;const a=this.getModel();this.updateAllValues().then(()=>{this.setModel(a).then(()=>t())})}else t()})}refreshValues(){return new Oe(e=>{this.allValuesPromise.then(()=>{const t=this.getModel();this.updateAllValues(),this.setModel(t).then(()=>e())})})}overrideValues(e){return new Oe(t=>{this.allValuesPromise.then(()=>{this.valuesType=0,this.providedValues=e,this.refreshValues().then(()=>t())})})}refreshAfterAnyFilterChanged(){return this.showAvailableOnly()?this.allValuesPromise.then(e=>(this.updateAvailableKeys(e??[],"otherFilter"),!0)):Oe.resolve(!1)}isInitialised(){return this.initialised}updateAllValues(){return this.allValuesPromise=new Oe(e=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync(!1).then(t=>e(this.processAllValues(t)));break;case 0:{e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break}case 1:{this.setIsLoading(!0);const t=this.providedValues,{column:s,colDef:o}=this.filterParams,i=he(this.gos,{success:n=>{this.setIsLoading(!1),e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(n))))},colDef:o,column:s});window.setTimeout(()=>t(i),0);break}}}),this.allValuesPromise.then(e=>this.updateAvailableKeys(e||[],"reload")).then(()=>this.initialised=!0),this.allValuesPromise}processAllValues(e){const t=this.sortKeys(e);return this.allValues=e??new Map,t}validateProvidedValues(e){if(this.usingComplexObjects&&e?.length){const t=e[0];t&&typeof t!="object"&&typeof t!="function"&&(this.createKey(t)==null?I(209):I(210))}return e}setValuesType(e){this.valuesType=e}getValuesType(){return this.valuesType}isKeyAvailable(e){return this.availableKeys.has(e)}showAvailableOnly(){return this.valuesType===2}updateAvailableKeys(e,t){const s=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):e;this.availableKeys=new Set(s),this.localEventService.dispatchEvent({type:"availableValuesChanged"}),this.updateDisplayedValues(t,e)}sortKeys(e){const t=e??new Map;if(this.suppressSorting)return Array.from(t.keys());let s;return this.compareByValue?s=Array.from(t.entries()).sort(this.entryComparator).map(([o])=>o):s=Array.from(t.keys()).sort(this.keyComparator),this.filterParams.excelMode&&t.has(null)&&(s=s.filter(o=>o!=null),s.push(null)),s}getParamsForValuesFromRows(e=!1){if(!this.clientSideValuesExtractor)return ue(113),null;const t=o=>!e||this.doesRowPassOtherFilters(o),s=e&&!this.caseSensitive?this.allValues:void 0;return{predicate:t,existingValues:s}}getValuesFromRows(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValues(t.predicate,t.existingValues):null}getValuesFromRowsAsync(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValuesAsync(t.predicate,t.existingValues):Oe.resolve(null)}setMiniFilter(e){return e=kt(e),this.miniFilterText===e?!1:(e===null&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)}getMiniFilter(){return this.miniFilterText}updateDisplayedValues(e,t){if(e==="expansion"){this.displayValueModel.refresh();return}if(this.miniFilterText==null){this.displayValueModel.updateDisplayedValuesToAllAvailable(n=>this.getValue(n),t,this.availableKeys,e);return}const s=this.caseFormat(this.formatter(this.miniFilterText)||""),o=n=>n!=null&&this.caseFormat(n).indexOf(s)>=0,i=!!this.filterParams.excelMode&&o(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(n=>this.getValue(n),t,this.availableKeys,o,i,e)}getDisplayedValueCount(){return this.displayValueModel.getDisplayedValueCount()}getDisplayedItem(e){return this.displayValueModel.getDisplayedItem(e)}getSelectAllItem(){return this.displayValueModel.getSelectAllItem()}getAddSelectionToFilterItem(){return this.displayValueModel.getAddSelectionToFilterItem()}hasSelections(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size}getKeys(){return Array.from(this.allValues.keys())}getValues(){return Array.from(this.allValues.values())}getValue(e){return this.allValues.get(e)}setAddCurrentSelectionToFilter(e){this.addCurrentSelectionToFilter=e}isInWindowsExcelMode(){return this.filterParams.excelMode==="windows"}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&j(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(e=!1){this.miniFilterText==null?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey(t=>this.selectedKeys.add(t)))}deselectAllMatchingMiniFilter(){this.miniFilterText==null?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.delete(e))}selectKey(e){this.selectedKeys.add(e)}deselectKey(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)}isKeySelected(e){return this.selectedKeys.has(e)}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>!this.isKeySelected(e))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>this.isKeySelected(e))}getModel(){if(!this.hasSelections())return null;const e=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;if(e&&e.size>0){if(this.selectedKeys){const t=new Set([...Array.from(e),...Array.from(this.selectedKeys).filter(s=>!e.has(s))]);return Array.from(t)}return Array.from(e)}return Array.from(this.selectedKeys)}setModel(e){return this.allValuesPromise.then(t=>{if(e==null)this.resetSelectionState(t??[]);else{this.selectedKeys.clear();const s=new Map;this.allValues.forEach((o,i)=>{s.set(this.caseFormat(i),i)}),e.forEach(o=>{const i=this.caseFormat(kt(o)),n=s.get(i);n!==void 0&&this.selectKey(n)})}})}uniqueValues(e){const t=new Map,s=new Set;return(e??[]).forEach(o=>{const i=kt(o),n=this.createKey(i),r=this.caseFormat(n);s.has(r)||(s.add(r),t.set(n,i))}),t}resetSelectionState(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)}hasGroups(){return this.displayValueModel.hasGroups()}createTreeDataOrGroupingComparator(){return([e,t],[s,o])=>{if(t==null)return o==null?0:-1;if(o==null)return 1;for(let i=0;i<t.length;i++){if(i>=o.length)return 1;const n=yl(t[i],o[i]);if(n!==0)return n}return 0}}setAppliedModelKeys(e){this.filteringKeys.setFilteringKeys(e)}addToAppliedModelKeys(e){this.filteringKeys.addFilteringKey(e)}getAppliedModelKeys(){return this.filteringKeys.allFilteringKeys()}getCaseFormattedAppliedModelKeys(){return this.filteringKeys.allFilteringKeysCaseFormatted()}hasAppliedModelKey(e){return this.filteringKeys.hasCaseFormattedFilteringKey(e)}hasAnyAppliedModelKey(){return!this.filteringKeys.hasNoAppliedFilteringKeys}},kC=class extends hF{constructor(){super("setFilter"),this.filterType="set",this.eMiniFilter=k,this.eFilterLoading=k,this.eFilterLoadingIcon=k,this.eSetFilterList=k,this.eFilterNoMatches=k,this.caseSensitive=!1,this.treeDataTreeList=!1,this.groupingTreeList=!1,this.hardRefreshVirtualList=!1,this.noValueFormatterSupplied=!1,this.filterModelFormatter=new TC,this.updateSetFilterOnParamsChange=e=>{this.setFilterParams=e,this.caseSensitive=!!e.caseSensitive;const t=e.keyCreator??e.colDef.keyCreator;this.setValueFormatter(e.valueFormatter,t,!!e.treeList,!!e.colDef.refData);const s=e.column.getId().startsWith(ni);this.treeDataTreeList=this.gos.get("treeData")&&!!e.treeList&&s,this.groupingTreeList=!!this.rowGroupColsSvc?.columns.length&&!!e.treeList&&s,this.createKey=this.generateCreateKey(t,this.treeDataTreeList||this.groupingTreeList)}}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc,this.dataTypeSvc=e.dataTypeSvc}postConstruct(){super.postConstruct()}updateUiVisibility(){}createBodyTemplate(){return{tag:"div",cls:"ag-set-filter",children:[{tag:"div",ref:"eFilterLoading",cls:"ag-filter-loading ag-loading ag-hidden",children:[{tag:"span",ref:"eFilterLoadingIcon",cls:"ag-loading-icon"},{tag:"span",cls:"ag-loading-text",children:this.translateForSetFilter("loadingOoo")}]},{tag:"ag-input-text-field",ref:"eMiniFilter",cls:"ag-mini-filter"},{tag:"div",ref:"eFilterNoMatches",cls:"ag-filter-no-matches ag-hidden",children:this.translateForSetFilter("noMatches")},{tag:"div",ref:"eSetFilterList",cls:"ag-set-filter-list",role:"presentation"}]}}getAgComponents(){return[Ac]}handleKeyDown(e){if(super.handleKeyDown(e),!e.defaultPrevented)switch(e.key){case D.SPACE:this.handleKeySpace(e);break;case D.ENTER:this.handleKeyEnter(e);break;case D.LEFT:this.handleKeyLeft(e);break;case D.RIGHT:this.handleKeyRight(e);break}}handleKeySpace(e){this.getComponentForKeyEvent(e)?.toggleSelected()}handleKeyEnter(e){const{excelMode:t,readOnly:s}=this.setFilterParams;!t||s||(e.preventDefault(),this.onBtApply(!1,!1,e),this.setFilterParams.excelMode==="mac"&&this.eMiniFilter.getInputElement().select())}handleKeyLeft(e){this.getComponentForKeyEvent(e)?.setExpanded(!1)}handleKeyRight(e){this.getComponentForKeyEvent(e)?.setExpanded(!0)}getComponentForKeyEvent(e){if(!this.eSetFilterList.contains(Be(this.beans)))return;const t=this.virtualList.getLastFocusedRow();if(t==null)return;const s=this.virtualList.getComponentAt(t);if(s==null)return;e.preventDefault();const{readOnly:o}=this.setFilterParams;if(!o)return s}getCssIdentifier(){return"set-filter"}setModel(e){return e==null&&this.valueModel.getModel()==null?(this.setMiniFilter(null),Oe.resolve()):super.setModel(e)}refresh(e){if(this.applyExcelModeOptions(e),!super.refresh(e))return!1;const t=this.setFilterParams;return["treeList","treeListPathGetter","caseSensitive","comparator","excelMode"].some(o=>e[o]!==t?.[o])||this.haveColDefParamsChanged(e)?!1:(super.updateParams(e),this.updateSetFilterOnParamsChange(e),this.updateMiniFilter(),e.suppressSelectAll!==t?.suppressSelectAll&&this.createVirtualListModel(e),this.valueModel.updateOnParamsChange(e).then(()=>{this.isAlive()&&this.refreshFilterValues()}),!0)}haveColDefParamsChanged(e){const{colDef:t,keyCreator:s}=e,{colDef:o,keyCreator:i}=this.setFilterParams,n=s??t.keyCreator,r=i??o?.keyCreator,l=t.filterValueGetter!==o?.filterValueGetter,a=n!==r,d=!!this.dataTypeSvc&&!!n&&this.dataTypeSvc.getFormatValue(t.cellDataType)===n&&t.valueFormatter!==o?.valueFormatter;return l||a||d}setModelAndRefresh(e){return this.valueModel.setModel(e).then(()=>{this.isAlive()&&this.checkAndRefreshVirtualList()})}resetUiToDefaults(){return this.setMiniFilter(null),this.setModelAndRefresh(null)}setModelIntoUi(e){this.setMiniFilter(null);const t=e==null?null:e.values;return this.setModelAndRefresh(t)}getModelFromUi(){const e=this.valueModel.getModel();return e?{values:e,filterType:this.filterType}:null}getValueModel(){return this.valueModel}areModelsEqual(e,t){return e==null&&t==null?!0:e!=null&&t!=null&&_s(e.values,t.values)}setParams(e){this.applyExcelModeOptions(e),super.setParams(e),this.updateSetFilterOnParamsChange(e);const t=e.keyCreator??e.colDef.keyCreator;this.valueModel=new NL({filterParams:e,setIsLoading:s=>this.setIsLoading(s),translate:s=>this.translateForSetFilter(s),caseFormat:s=>this.caseFormat(s),createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!t,gos:this.gos,rowGroupColsSvc:this.rowGroupColsSvc,valueSvc:this.valueSvc,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedEventListeners:s=>this.addManagedEventListeners(s)}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()}onAddCurrentSelectionToFilterChange(e){this.valueModel.setAddCurrentSelectionToFilter(e)}setValueFormatter(e,t,s,o){let i=e;if(!i){if(t&&!s){ue(249);return}this.noValueFormatterSupplied=!0,o||(i=n=>ao(n.value))}this.valueFormatter=i}generateCreateKey(e,t){return t&&!e?(ue(250),()=>null):e?(s,o=null)=>{const i=this.getKeyCreatorParams(s,o);return kt(e(i))}:s=>kt(ao(s))}getFormattedValue(e){let t=this.valueModel.getValue(e);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(t)&&(t=Re(t));const s=this.valueSvc.formatValue(this.setFilterParams.column,null,t,this.valueFormatter,!1);return s??ao(t)??this.translateForSetFilter("blanks")}applyExcelModeOptions(e){e.excelMode==="windows"?(e.buttons||(e.buttons=["apply","cancel"]),e.closeOnApply==null&&(e.closeOnApply=!0)):e.excelMode==="mac"&&(e.buttons||(e.buttons=["reset"]),e.applyMiniFilterWhileTyping==null&&(e.applyMiniFilterWhileTyping=!0),e.debounceMs==null&&(e.debounceMs=500)),e.excelMode&&e.defaultToNothingSelected&&(e.defaultToNothingSelected=!1,I(207))}addEventListenersForDataChanges(){if(!this.isValuesTakenFromGrid())return;this.addManagedPropertyListeners(["groupAllowUnbalanced"],()=>{this.syncAfterDataChange()});const e=Yt(this,this.syncAfterDataChange.bind(this),0);this.addManagedEventListeners({cellValueChanged:t=>{t.column===this.setFilterParams.column&&e()}})}syncAfterDataChange(){const e=!this.applyActive||this.areModelsEqual(this.getModel(),this.getModelFromUi());return this.valueModel.refreshValues().then(()=>{this.isAlive()&&(this.checkAndRefreshVirtualList(),e&&this.onBtApply(!1,!0))})}setIsLoading(e){fe(this.eFilterLoading,e),e||(this.hardRefreshVirtualList=!0)}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter(),this.initLoading()}initLoading(){const e=pe("setFilterLoading",this.beans,this.setFilterParams.column);e&&this.eFilterLoadingIcon.appendChild(e)}initVirtualList(){const t=this.getLocaleTextFunc()("ariaFilterList","Filter List"),s=!!this.setFilterParams.treeList,o=this.virtualList=this.createBean(new CC({cssIdentifier:"filter",ariaRole:s?"tree":"listbox",listName:t})),i=this.eSetFilterList;s&&i.classList.add("ag-set-filter-tree-list"),i&&i.appendChild(o.getGui());const{cellHeight:n}=this.setFilterParams;n!=null&&o.setRowHeight(n);const r=(a,d)=>this.createSetListItem(a,s,d);o.setComponentCreator(r);const l=(a,d)=>this.updateSetListItem(a,d);o.setComponentUpdater(l),this.createVirtualListModel(this.setFilterParams)}createVirtualListModel(e){let t;e.suppressSelectAll?t=new _L(this.valueModel):t=new BL(this.valueModel,()=>this.isSelectAllSelected()),e.treeList&&(t=new HL(t)),this.virtualList.setModel(t)}getSelectAllLabel(){const e=this.valueModel.getMiniFilter()==null||!this.setFilterParams.excelMode?"selectAll":"selectAllSearchResults";return this.translateForSetFilter(e)}getAddSelectionToFilterLabel(){return this.translateForSetFilter("addCurrentSelectionToFilter")}createSetListItem(e,t,s){const o=this.valueModel.hasGroups(),{isSelected:i,isExpanded:n}=this.isSelectedExpanded(e),{value:r,depth:l,isGroup:a,hasIndeterminateExpandState:d,selectedListener:c,expandedListener:u}=this.newSetListItemAttributes(e),h={focusWrapper:s,value:r,params:this.setFilterParams,translate:g=>this.translateForSetFilter(g),valueFormatter:this.valueFormatter,item:e,isSelected:i,isTree:t,depth:l,groupsExist:o,isGroup:a,isExpanded:n,hasIndeterminateExpandState:d},p=this.createBean(new TL(h));return p.addEventListener("selectionChanged",c),u&&p.addEventListener("expandedChanged",u),p}newSetTreeItemAttributes(e){const t=this.valueModel.hasGroups();return e.key===pi?{value:()=>this.getSelectAllLabel(),isGroup:t,depth:e.depth,hasIndeterminateExpandState:!0,selectedListener:s=>this.onSelectAll(s.isSelected),expandedListener:s=>this.onExpandAll(s.item,s.isExpanded)}:e.key===gi?{value:()=>this.getAddSelectionToFilterLabel(),depth:e.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:s=>{this.onAddCurrentSelectionToFilterChange(s.isSelected)}}:e.children?{value:this.setFilterParams.treeListFormatter?.(e.treeKey,e.depth,e.parentTreeKeys)??e.treeKey,depth:e.depth,isGroup:!0,selectedListener:s=>this.onGroupItemSelected(s.item,s.isSelected),expandedListener:s=>this.onExpandedChanged(s.item,s.isExpanded)}:{value:this.setFilterParams.treeListFormatter?.(e.treeKey,e.depth,e.parentTreeKeys)??e.treeKey,depth:e.depth,selectedListener:s=>this.onItemSelected(s.item.key,s.isSelected)}}newSetListItemAttributes(e){return this.isSetFilterModelTreeItem(e)?this.newSetTreeItemAttributes(e):e===pi?{value:()=>this.getSelectAllLabel(),selectedListener:t=>this.onSelectAll(t.isSelected)}:e===gi?{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:t=>{this.onAddCurrentSelectionToFilterChange(t.isSelected)}}:{value:this.valueModel.getValue(e),selectedListener:t=>this.onItemSelected(t.item,t.isSelected)}}updateSetListItem(e,t){const{isSelected:s,isExpanded:o}=this.isSelectedExpanded(e);t.refresh(e,s,o)}isSelectedExpanded(e){let t,s;return this.isSetFilterModelTreeItem(e)?(s=e.expanded,e.key===pi?t=this.isSelectAllSelected():e.key===gi?t=this.valueModel.isAddCurrentSelectionToFilterChecked():e.children?t=this.areAllChildrenSelected(e):t=this.valueModel.isKeySelected(e.key)):e===pi?t=this.isSelectAllSelected():e===gi?t=this.valueModel.isAddCurrentSelectionToFilterChecked():t=this.valueModel.isKeySelected(e),{isSelected:t,isExpanded:s}}isSetFilterModelTreeItem(e){return e?.treeKey!==void 0}initMiniFilter(){const{eMiniFilter:e}=this,t=this.getLocaleTextFunc();e.setDisplayed(!this.setFilterParams.suppressMiniFilter),e.setValue(this.valueModel.getMiniFilter()),e.onValueChange(()=>this.onMiniFilterInput()),e.setInputAriaLabel(t("ariaSearchFilterValues","Search filter values")),this.addManagedElementListeners(e.getInputElement(),{keydown:s=>this.onMiniFilterKeyDown(s)})}updateMiniFilter(){const{eMiniFilter:e}=this;e.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&e.setDisplayed(!this.setFilterParams.suppressMiniFilter);const t=this.valueModel.getMiniFilter();e.getValue()!==t&&e.setValue(t)}afterGuiAttached(e){super.afterGuiAttached(e),this.resetExpansion(),this.refreshVirtualList();const{eMiniFilter:t}=this;t.setInputPlaceholder(this.translateForSetFilter("searchOoo")),(!e||!e.suppressFocus)&&(t.isDisplayed()?t.getFocusableElement().focus():this.virtualList.awaitStable(()=>this.virtualList.focusRow(0)))}afterGuiDetached(){super.afterGuiDetached(),this.setFilterParams.excelMode&&this.resetMiniFilter();const e=this.getModel();(this.setFilterParams.excelMode||!this.areModelsEqual(e,this.getModelFromUi()))&&(this.resetUiToActiveModel(e),this.showOrHideResults())}applyModel(e="api"){this.setFilterParams.excelMode&&e!=="rowDataUpdated"&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();const t=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(t&&!this.getModel())return!1;const s=super.applyModel(e),o=this.getModel();return o?(t||this.valueModel.setAppliedModelKeys(new Set),o.values.forEach(i=>{this.valueModel.addToAppliedModelKeys(i)})):t||this.valueModel.setAppliedModelKeys(null),s}isModelValid(e){return this.setFilterParams.excelMode?e==null||e.values.length>0:!0}doesFilterPass(e){if(!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;const{node:t}=e;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(t);if(this.groupingTreeList)return this.doesFilterPassForGrouping(t);const s=this.getValueFromNode(t);return s!=null&&Array.isArray(s)?s.length===0?this.valueModel.hasAppliedModelKey(null):s.some(o=>this.isInAppliedModel(this.createKey(o,t))):this.isInAppliedModel(this.createKey(s,t))}doesFilterPassForTreeData(e){return e.childrenAfterGroup?.length?!1:this.isInAppliedModel(this.createKey(su(e.getRoute()??[e.key??e.id],!0,this.gos.get("groupAllowUnbalanced"))))}doesFilterPassForGrouping(e){const t=(this.rowGroupColsSvc?.columns??[]).map(s=>this.valueSvc.getKeyForNode(s,e));return t.push(this.getValueFromNode(e)),this.isInAppliedModel(this.createKey(su(t,!1,this.gos.get("groupAllowUnbalanced"))))}isInAppliedModel(e){return this.valueModel.hasAppliedModelKey(e)}getValueFromNode(e){return this.setFilterParams.getValue(e)}getKeyCreatorParams(e,t=null){const{colDef:s,column:o,api:i,context:n}=this.setFilterParams;return{value:e,colDef:s,column:o,node:t,data:t?.data,api:i,context:n}}onNewRowsLoaded(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()}isValuesTakenFromGrid(){return this.valueModel.getValuesType()===2}setFilterValues(e){this.valueModel.overrideValues(e).then(()=>{this.isAlive()&&(this.checkAndRefreshVirtualList(),this.onUiChanged())})}resetFilterValues(){this.valueModel.setValuesType(2),this.syncAfterDataChange()}refreshFilterValues(){this.valueModel.isInitialised()&&this.valueModel.refreshValues().then(()=>{this.isAlive()&&(this.hardRefreshVirtualList=!0,this.checkAndRefreshVirtualList(),this.onUiChanged())})}onAnyFilterChanged(){setTimeout(()=>{this.isAlive()&&this.valueModel.refreshAfterAnyFilterChanged().then(e=>{e&&this.isAlive()&&(this.checkAndRefreshVirtualList(),this.showOrHideResults())})},0)}onMiniFilterInput(){if(!this.valueModel.setMiniFilter(this.eMiniFilter.getValue()))return;const{applyMiniFilterWhileTyping:e,readOnly:t}=this.setFilterParams;!t&&e?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}updateUiAfterMiniFilterChange(){const{excelMode:e,readOnly:t}=this.setFilterParams;e==null||t?this.checkAndRefreshVirtualList():this.valueModel.getMiniFilter()==null?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()}showOrHideResults(){const e=this.valueModel.getMiniFilter()!=null&&this.valueModel.getDisplayedValueCount()<1;fe(this.eFilterNoMatches,e),fe(this.eSetFilterList,!e)}resetMiniFilter(){this.eMiniFilter.setValue(null,!0),this.valueModel.setMiniFilter(null)}resetUiToActiveModel(e,t){this.setModelAndRefresh(e==null?null:e.values).then(()=>{this.isAlive()&&(this.onUiChanged(!1,"prevent"),t?.())})}handleCancelEnd(e){this.setMiniFilter(null),super.handleCancelEnd(e)}onMiniFilterKeyDown(e){const{excelMode:t,readOnly:s}=this.setFilterParams;e.key===D.ENTER&&!t&&!s&&this.filterOnAllVisibleValues()}filterOnAllVisibleValues(e=!0){this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,e?"immediately":"debounce"),this.showOrHideResults()}focusRowIfAlive(e){return e==null?Promise.resolve():new Promise(t=>{window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(e),t()},0)})}onSelectAll(e){e?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()}onGroupItemSelected(e,t){const s=o=>{o.filterPasses&&(o.children?o.children.forEach(i=>s(i)):this.selectItem(o.key,t))};s(e),this.refreshAfterSelection()}onItemSelected(e,t){this.selectItem(e,t),this.refreshAfterSelection()}selectItem(e,t){t?this.valueModel.selectKey(e):this.valueModel.deselectKey(e)}onExpandAll(e,t){const s=o=>{o.filterPasses&&o.available&&o.children&&(o.children.forEach(i=>s(i)),o.expanded=t)};s(e),this.refreshAfterExpansion()}onExpandedChanged(e,t){e.expanded=t,this.refreshAfterExpansion()}refreshAfterExpansion(){const e=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(e)}refreshAfterSelection(){const e=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(e)}setMiniFilter(e){this.eMiniFilter.setValue(e),this.onMiniFilterInput()}getMiniFilter(){return this.valueModel.getMiniFilter()}checkAndRefreshVirtualList(){this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)}getFilterKeys(){return this.valueModel.getKeys()}getFilterValues(){return this.valueModel.getValues()}getValues(){return this.getFilterKeys()}refreshVirtualList(){this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()}translateForSetFilter(e){return this.getLocaleTextFunc()(e,AL[e])}isSelectAllSelected(){if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}}areAllChildrenSelected(e){const t=s=>{if(s.children){let o=!1,i=!1;return s.children.some(r=>{if(!r.filterPasses||!r.available)return!1;const l=t(r);return l===void 0?!0:(l?o=!0:i=!0,o&&i)})?void 0:o}else return this.valueModel.isKeySelected(s.key)};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&t(e):t(e)}destroy(){this.virtualList=this.destroyBean(this.virtualList),super.destroy()}caseFormat(e){return e==null||typeof e!="string"||this.caseSensitive?e:e.toUpperCase()}resetExpansion(){if(!this.setFilterParams.treeList)return;const e=this.valueModel.getSelectAllItem();if(this.isSetFilterModelTreeItem(e)){const t=s=>{s.children&&(s.children.forEach(o=>t(o)),s.expanded=!1)};t(e),this.valueModel.updateDisplayedValues("expansion")}}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e,this)}getPositionableElement(){return this.eSetFilterList}},_L=class{constructor(e){this.model=e}getRowCount(){return this.model.getDisplayedValueCount()}getRow(e){return this.model.getDisplayedItem(e)}areRowsEqual(e,t){return e===t}},BL=class{constructor(e,t){this.model=e,this.isSelectAllSelected=t}getRowCount(){const t=this.model.showAddCurrentSelectionToFilter()?2:1;return this.model.getDisplayedValueCount()+t}getRow(e){if(e===0)return this.model.getSelectAllItem();const t=this.model.showAddCurrentSelectionToFilter(),s=t?2:1;return e===1&&t?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(e-s)}areRowsEqual(e,t){return e===t}},HL=class{constructor(e){this.model=e}getRowCount(){return this.model.getRowCount()}getRow(e){return this.model.getRow(e)}areRowsEqual(e,t){return e==null&&t==null?!0:e!=null&&t!=null&&e.treeKey===t.treeKey&&e.depth===t.depth}},VL={tag:"div",cls:"ag-floating-filter-input ag-set-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},WL=class extends ve{constructor(){super(VL,[Ac]),this.eFloatingFilterText=k,this.availableValuesListenerAdded=!1,this.filterModelFormatter=new TC}wireBeans(e){this.colNames=e.colNames}init(e){this.params=e,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams(e)}setParams(e){const t=this.colNames.getDisplayNameForColumn(e.column,"header",!0),s=this.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel(`${t} ${s("ariaFilterInput","Filter Input")}`)}refresh(e){this.params=e,this.setParams(e)}onParentModelChanged(e){this.updateFloatingFilterText(e)}parentSetFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof kC)){ue(248);return}e(t)})}addAvailableValuesListener(){this.parentSetFilterInstance(e=>{const t=e.getValueModel();t&&this.addManagedListeners(t,{availableValuesChanged:()=>this.updateFloatingFilterText()})}),this.availableValuesListenerAdded=!0}updateFloatingFilterText(e){this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance(t=>{this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(e,t))})}},zL={moduleName:"SetFilter",version:lt,userComponents:{agSetColumnFilter:kC,agSetColumnFloatingFilter:WL},icons:{setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",setFilterLoading:"loading"},dependsOn:[Rs,hI]},UL=class extends F{constructor(){super(...arguments),this.beanName="aggColNameSvc"}getHeaderName(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const{valueColsSvc:s,colModel:o,rowGroupColsSvc:i}=this.beans,n=e.getColDef().pivotValueColumn,r=j(n);let l=null,a;if(r){const d=s?.columns??[],c=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&d.length===1,u=e.getColDef().pivotTotalColumnIds!==void 0;if(c&&!u)return t;l=n?n.getAggFunc():null,a=!0}else{const d=e.isValueActive(),c=o.isPivotMode()||i?.columns.length!==0;d&&c?(l=e.getAggFunc(),a=!0):a=!1}if(a){const d=typeof l=="string"?l:"func";return`${this.getLocaleTextFunc()(d,d)}(${t})`}return t}},$L={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},jL=class extends F{constructor(){super(...arguments),this.beanName="aggFuncSvc",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){const e=this.aggFuncsMap;e.sum=KL,e.first=YL,e.last=qL,e.min=XL,e.max=QL,e.count=ZL,e.avg=JL,this.initialised=!0}isAggFuncPossible(e,t){const o=this.getFuncNames(e).includes(t),i=j(this.aggFuncsMap[t]);return o&&i}getDefaultFuncLabel(e){return $L[e]??e}getDefaultAggFunc(e){const t=e.getColDef().defaultAggFunc;if(j(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,"sum"))return"sum";const s=this.getFuncNames(e);return s?.length?s[0]:null}addAggFuncs(e){if(this.init(),!!e)for(const t of Object.keys(e))this.aggFuncsMap[t]=e[t]}getAggFunc(e){return this.init(),this.aggFuncsMap[e]}getFuncNames(e){const t=e.getColDef().allowedAggFuncs;return t??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};function KL(e){const{values:t}=e;let s=null;for(let o=0;o<t.length;o++){const i=t[o];typeof i=="number"?s===null?s=i:s+=typeof s=="number"?i:BigInt(i):typeof i=="bigint"&&(s===null?s=i:s=(typeof s=="bigint"?s:BigInt(s))+i)}return s}function YL(e){return e.values.length>0?e.values[0]:null}function qL(e){return e.values.length>0?Re(e.values):null}function XL(e){const{values:t}=e;let s=null;for(let o=0;o<t.length;o++){const i=t[o];(typeof i=="number"||typeof i=="bigint")&&(s===null||s>i)&&(s=i)}return s}function QL(e){const{values:t}=e;let s=null;for(let o=0;o<t.length;o++){const i=t[o];(typeof i=="number"||typeof i=="bigint")&&(s===null||s<i)&&(s=i)}return s}function ZL(e){const{values:t}=e;let s=0;for(let i=0;i<t.length;i++){const n=t[i];s+=n!=null&&typeof n.value=="number"?n.value:1}const o=e.rowNode?.aggData?.[e.column.getColId()];return o&&o.value===s?o:{value:s,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function JL(e){const{values:t}=e;let s=0,o=0;for(let r=0;r<t.length;r++){const l=t[r];let a=null;typeof l=="number"||typeof l=="bigint"?(a=l,o++):l!=null&&(typeof l.value=="number"||typeof l.value=="bigint")&&typeof l.count=="number"&&(a=l.value*(typeof l.value=="number"?l.count:BigInt(l.count)),o+=l.count),typeof a=="number"?s+=typeof s=="number"?a:BigInt(a):typeof a=="bigint"&&(s=(typeof s=="bigint"?s:BigInt(s))+a)}let i=null;o>0&&(i=s/(typeof s=="number"?o:BigInt(o)));const n=e.rowNode?.aggData?.[e.column?.getColId()];return n&&n.count===o&&n.value===i?n:{count:o,value:i,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}function ek(e,t){e.aggFuncSvc&&e.aggFuncSvc.addAggFuncs(t)}function tk(e){e.aggFuncSvc&&e.aggFuncSvc.clear()}function sk(e,t,s){e.valueColsSvc?.setColumnAggFunc?.(t,s,"api")}function ou(e,t,s,o,i,n){const r=typeof s=="string"?e.aggFuncSvc.getAggFunc(s):s;if(typeof r!="function")return ue(109,{aggFuncOrString:s}),null;const l=he(e.gos,{values:t,column:o,colDef:o.colDef,pivotResultColumn:n,rowNode:i,data:i?.data});return r(l)}var ok=class extends F{constructor(){super(...arguments),this.beanName="aggStage",this.refreshProps=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","suppressAggFilteredOnly","grandTotalRow"]),this.step="aggregate"}wireBeans(e){this.colModel=e.colModel,this.pivotColsSvc=e.pivotColsSvc,this.valueColsSvc=e.valueColsSvc,this.pivotResultCols=e.pivotResultCols,this.valueSvc=e.valueSvc}execute(e){const t=!this.valueColsSvc?.columns?.length,s=!this.gos.getCallback("getGroupRowAgg");if(t&&s&&e.changedPath?.active)return;const o=this.createAggDetails(e);this.recursivelyCreateAggData(o)}createAggDetails(e){const t=this.colModel.isPivotActive(),s=this.valueColsSvc?.columns,o=t&&this.pivotColsSvc?this.pivotColsSvc.columns:[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!qd(this.gos),changedPath:e.changedPath,valueColumns:s??[],pivotColumns:o,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return qn(this.gos)!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(e){const t=s=>{if(!s.hasChildren()){s.aggData&&this.setAggData(s,null);return}if(s.level===-1&&!e.groupIncludeTotalFooter){const n=!this.colModel.isPivotMode();if(!e.alwaysAggregateAtRootLevel&&n){this.setAggData(s,null);return}}this.aggregateRowNode(s,e)};e.changedPath.forEachChangedNodeDepthFirst(t,!0)}aggregateRowNode(e,t){const s=t.valueColumns.length===0,o=t.pivotColumns.length===0;let i;t.userAggFunc?i=t.userAggFunc({nodes:e.childrenAfterFilter}):s?i=null:o?i=this.aggregateRowNodeUsingValuesOnly(e,t):i=this.aggregateRowNodeUsingValuesAndPivot(e),this.setAggData(e,i),e.sibling&&this.setAggData(e.sibling,i)}aggregateRowNodeUsingValuesAndPivot(e){const t={},s=this.pivotResultCols?.getPivotResultCols()?.list??[];let o=!0;const i=this.beans;for(let n=0;n<s.length;n++){const r=s[n],l=r.getColDef();if(l.pivotTotalColumnIds!=null){o=!1;continue}const a=l.pivotKeys??[];let d;e.leafGroup?d=this.getValuesFromMappedSet(e.childrenMapped,a,l.pivotValueColumn):d=this.getValuesPivotNonLeaf(e,l.colId),t[l.colId]=ou(i,d,l.pivotValueColumn.getAggFunc(),l.pivotValueColumn,e,r)}if(!o)for(let n=0;n<s.length;n++){const r=s[n],l=r.getColDef();if(l.pivotTotalColumnIds==null||!l.pivotTotalColumnIds.length)continue;const a=l.pivotTotalColumnIds.map(d=>t[d]);t[l.colId]=ou(i,a,l.pivotValueColumn.getAggFunc(),l.pivotValueColumn,e,r)}return t}aggregateRowNodeUsingValuesOnly(e,t){const s={},{changedPath:o,valueColumns:i,filteredOnly:n}=t,r=o.active?o.getValueColumnsForNode(e,i):i,l=o.active?o.getNotValueColumnsForNode(e,i):null,a=this.getValuesNormal(e,r,n),d=e.aggData,c=this.beans;return r.forEach((u,h)=>{s[u.getId()]=ou(c,a[h],u.getAggFunc(),u,e)}),l&&d&&l.forEach(u=>{s[u.getId()]=d[u.getId()]}),s}getValuesPivotNonLeaf(e,t){return e.childrenAfterFilter.map(s=>s.aggData[t])}getValuesFromMappedSet(e,t,s){let o=e;for(let i=0;i<t.length;i++){const n=t[i];o=o?o[n]:null}return o?o.map(i=>this.valueSvc.getValue(s,i)):[]}getValuesNormal(e,t,s){const o=[];t.forEach(()=>o.push([]));const i=t.length,n=s?e.childrenAfterFilter:e.childrenAfterGroup,r=n.length;for(let l=0;l<r;l++){const a=n[l];for(let d=0;d<i;d++){const c=t[d],u=this.valueSvc.getValue(c,a);o[d].push(u)}}return o}setAggData(e,t){const s=e.aggData;if(e.aggData=t,e.__localEventService){const o=i=>{const n=e.aggData?e.aggData[i]:void 0,r=s?s[i]:void 0;if(n===r)return;const l=this.colModel.getCol(i);l&&e.dispatchCellChangedEvent(l,n,r)};if(s)for(const i of Object.keys(s))o(i);if(t)for(const i of Object.keys(t))(!s||!(i in s))&&o(i)}}},ik=class extends F{constructor(){super(...arguments),this.beanName="filterAggStage",this.refreshProps=new Set([]),this.step="filter_aggregates"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const t=this.beans.colModel.isPivotMode(),s=this.filterManager?.isAggregateFilterPresent()||this.filterManager?.isAggregateQuickFilterPresent(),o=d=>!d.node.group,i=d=>d.node.leafGroup,n=qn(this.gos)||(t?i:o),{changedPath:r}=e,l=(d,c=!1)=>{d.childrenAfterFilter&&(d.childrenAfterAggFilter=d.childrenAfterFilter,c&&d.childrenAfterAggFilter.forEach(u=>l(u,c)),this.setAllChildrenCount(d)),d.sibling&&(d.sibling.childrenAfterAggFilter=d.childrenAfterAggFilter)},a=d=>{d.childrenAfterAggFilter=d.childrenAfterFilter?.filter(c=>n({node:c})&&this.filterManager.doesRowPassAggregateFilters({rowNode:c})?(l(c,!0),!0):c.childrenAfterAggFilter?.length)||null,this.setAllChildrenCount(d),d.sibling&&(d.sibling.childrenAfterAggFilter=d.childrenAfterAggFilter)};r.forEachChangedNodeDepthFirst(s?a:l,!0)}setAllChildrenCountTreeData(e){const t=e.childrenAfterAggFilter;let s=0;if(t){const o=t.length;s=o;for(let i=0;i<o;++i)s+=t[i].allChildrenCount??0}e.setAllChildrenCount(s===0&&e.level>=0?null:s)}setAllChildrenCountGridGrouping(e){let t=0;e.childrenAfterAggFilter.forEach(s=>{s.group?t+=s.allChildrenCount:t++}),e.setAllChildrenCount(t)}setAllChildrenCount(e){if(!e.hasChildren()){e.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e)}},nk=new Set(["__localEventService","__objectId","sticky","__autoHeights","__checkAutoHeightsDebounced"]);function go(e,t){if(e.sibling)return;const s=new di(t);Object.keys(e).forEach(o=>{nk.has(o)||(s[o]=e[o])}),s.footer=!0,s.setRowTop(null),s.setRowIndex(null),s.oldRowTop=null,s.id="rowGroupFooter_"+e.id,s.sibling=e,e.sibling=s}function iu(e){e.sibling&&(e.sibling.setRowTop(null),e.sibling.setRowIndex(null),e.sibling=void 0)}var rk=class extends F{constructor(){super(...arguments),this.beanName="footerSvc"}addTotalRows(e,t,s,o,i,n){let r=e;if(i)return(o&&qd(this.gos))===n&&(go(t,this.beans),s(t.sibling,r++)),r;const l=Vi(this.gos);return(o&&l({node:t}))===n&&(go(t,this.beans),s(t.sibling,r++)),r}getTopDisplayIndex(e,t,s,o){let i=t;if(e[0].footer){if(t===0)return 0;i-=1}const n=e[e.length-1],r=i>=s.length;return n.footer&&r?n.rowIndex:o(i)}getTotalValue(e){return this.getLocaleTextFunc()("footerTotal","Total")+" "+(e??"")}},OC=class extends lc{constructor(){super(...arguments),this.beanName="valueColsSvc",this.eventName="columnValueChanged",this.columnProcessors={set:(e,t,s)=>this.setValueActive(t,e,s),add:(e,t,s)=>this.setValueActive(!0,e,s),remove:(e,t,s)=>this.setValueActive(!1,e,s)},this.columnExtractors={setFlagFunc:(e,t,s)=>this.setColValueActive(e,t,s),getIndexFunc:()=>{},getInitialIndexFunc:()=>{},getValueFunc:e=>{const t=e.aggFunc;if(t===null||t==="")return null;if(t!==void 0)return!!t},getInitialValueFunc:e=>e.initialAggFunc!=null&&e.initialAggFunc!=""},this.modifyColumnsNoEventsCallbacks={addCol:e=>this.columns.push(e),removeCol:e=>Ot(this.columns,e)}}extractCols(e,t){return this.columns=super.extractCols(e,t),this.columns.forEach(s=>{const o=s.getColDef();o.aggFunc!=null&&o.aggFunc!=""?this.setColAggFunc(s,o.aggFunc):s.getAggFunc()||this.setColAggFunc(s,o.initialAggFunc)}),this.columns}setColumnAggFunc(e,t,s){if(!e)return;const o=this.colModel.getColDefCol(e);o&&(this.setColAggFunc(o,t),this.dispatchColumnChangedEvent(this.eventSvc,this.eventName,[o],s))}syncColumnWithState(e,t,s){const o=s("aggFunc").value1;o!==void 0&&(typeof o=="string"?(this.setColAggFunc(e,o),e.isValueActive()||(this.setColValueActive(e,!0,t),this.modifyColumnsNoEventsCallbacks.addCol(e))):(j(o)&&I(33),e.isValueActive()&&(this.setColValueActive(e,!1,t),this.modifyColumnsNoEventsCallbacks.removeCol(e))))}setValueActive(e,t,s){if(e!==t.isValueActive()&&(this.setColValueActive(t,e,s),e&&!t.getAggFunc()&&this.aggFuncSvc)){const o=this.aggFuncSvc.getDefaultAggFunc(t);this.setColAggFunc(t,o)}}setColAggFunc(e,t){e.aggFunc=t,e.dispatchStateUpdatedEvent("aggFunc")}setColValueActive(e,t,s){e.aggregationActive!==t&&(e.aggregationActive=t,e.dispatchColEvent("columnValueChanged",s))}},nu={moduleName:"SharedAggregation",version:lt,beans:[jL,UL,rk,OC],apiFunctions:{addAggFuncs:ek,clearAggFuncs:tk,setColumnAggFunc:sk},dependsOn:[Rs]},lk={moduleName:"Aggregation",version:lt,beans:[ok,ik],rowModels:["clientSide"],dependsOn:[nu]},GC=class extends lc{constructor(){super(...arguments),this.beanName="pivotColsSvc",this.eventName="columnPivotChanged",this.columnProcessors={set:(e,t,s)=>this.setColPivotActive(e,t,s),add:(e,t,s)=>this.setColPivotActive(e,!0,s),remove:(e,t,s)=>this.setColPivotActive(e,!1,s)},this.columnOrdering={enableProp:"pivot",initialEnableProp:"initialPivot",indexProp:"pivotIndex",initialIndexProp:"initialPivotIndex"},this.columnExtractors={setFlagFunc:(e,t,s)=>this.setColPivotActive(e,t,s),getIndexFunc:e=>e.pivotIndex,getInitialIndexFunc:e=>e.initialPivotIndex,getValueFunc:e=>e.pivot,getInitialValueFunc:e=>e.initialPivot},this.modifyColumnsNoEventsCallbacks={addCol:e=>this.columns.push(e),removeCol:e=>Ot(this.columns,e)}}syncColumnWithState(e,t,s,o){const{value1:i,value2:n}=s("pivot","pivotIndex");(i!==void 0||n!==void 0)&&(typeof n=="number"||i?(e.isPivotActive()||(this.setColPivotActive(e,!0,t),this.modifyColumnsNoEventsCallbacks.addCol(e)),o&&typeof n=="number"&&(o[e.getId()]=n)):e.isPivotActive()&&(this.setColPivotActive(e,!1,t),this.modifyColumnsNoEventsCallbacks.removeCol(e)))}setColPivotActive(e,t,s){e.pivotActive!==t&&(e.pivotActive=t,e.dispatchColEvent("columnPivotChanged",s)),e.dispatchStateUpdatedEvent("pivot")}},ak=class extends lc{constructor(){super(...arguments),this.beanName="rowGroupColsSvc",this.eventName="columnRowGroupChanged",this.columnProcessors={set:(e,t,s)=>this.setActive(t,e,s),add:(e,t,s)=>this.setActive(!0,e,s),remove:(e,t,s)=>this.setActive(!1,e,s)},this.columnOrdering={enableProp:"rowGroup",initialEnableProp:"initialRowGroup",indexProp:"rowGroupIndex",initialIndexProp:"initialRowGroupIndex"},this.columnExtractors={setFlagFunc:(e,t,s)=>this.setColRowGroupActive(e,t,s),getIndexFunc:e=>e.rowGroupIndex,getInitialIndexFunc:e=>e.initialRowGroupIndex,getValueFunc:e=>e.rowGroup,getInitialValueFunc:e=>e.initialRowGroup},this.modifyColumnsNoEventsCallbacks={addCol:e=>this.columns.push(e),removeCol:e=>Ot(this.columns,e)}}moveColumn(e,t,s){if(this.columns.length===0)return;const o=this.columns[e],i=this.columns.slice(e,t);this.columns.splice(e,1),this.columns.splice(t,0,o),this.updateIndexMap(),this.eventSvc.dispatchEvent({type:this.eventName,columns:i,column:i.length===1?i[0]:null,source:s})}syncColumnWithState(e,t,s,o){const{value1:i,value2:n}=s("rowGroup","rowGroupIndex");(i!==void 0||n!==void 0)&&(typeof n=="number"||i?(e.isRowGroupActive()||(this.setColRowGroupActive(e,!0,t),this.modifyColumnsNoEventsCallbacks.addCol(e)),o&&typeof n=="number"&&(o[e.getId()]=n)):e.isRowGroupActive()&&(this.setColRowGroupActive(e,!1,t),this.modifyColumnsNoEventsCallbacks.removeCol(e)))}setActive(e,t,s){e!==t.isRowGroupActive()&&(this.setColRowGroupActive(t,e,s),rR(this.gos,e)&&this.colModel.setColsVisible([t],!e,s))}setColRowGroupActive(e,t,s){e.rowGroupActive!==t&&(e.rowGroupActive=t,e.dispatchColEvent("columnRowGroupChanged",s)),e.dispatchStateUpdatedEvent("rowGroup")}},dk=class extends F{constructor(){super(...arguments),this.beanName="autoColSvc"}postConstruct(){this.addManagedPropertyListener("autoGroupColumnDef",this.updateColumns.bind(this))}addColumns(e){this.columns!=null&&(e.list=this.columns.list.concat(e.list),e.tree=this.columns.tree.concat(e.tree),tf(e))}createColumns(e,t){const s=this.beans,{colModel:o,gos:i,rowGroupColsSvc:n,colGroupSvc:r}=s,l=o.isPivotMode(),a=Xd(i,l),d=l?i.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),c=n?.columns,h=!(c&&c.length>0||i.get("treeData"))||d||a,p=()=>{this.columns&&(Eo(s,this.columns.tree),this.columns=null)};if(h){p();return}const g=this.generateAutoCols(c),f=ef(g,this.columns?.list||null),m=e.treeDepth,y=(this.columns?this.columns.treeDepth:-1)==m;if(f&&y)return;p();const R=r?.findDepth(e.tree)??0,w=r?.balanceTreeForAutoCols(g,R)??[];this.columns={list:g,tree:w,treeDepth:R,map:{}},t(x=>{if(!x)return null;const A=x.filter(H=>!nc(H));return[...g,...A]})}updateColumns(e){const t=ri(e.source);this.columns?.list.forEach((s,o)=>this.updateOneAutoCol(s,o,t))}getColumn(e){return this.columns?.list.find(t=>rc(t,e))??null}getColumns(){return this.columns?.list??null}generateAutoCols(e=[]){const t=[],s=this.gos.get("treeData");let o=_g(this.gos);return s&&o&&(I(182),o=!1),o?e.forEach((i,n)=>{t.push(this.createOneAutoCol(i,n))}):t.push(this.createOneAutoCol()),t}isSuppressAutoCol(){const e=this.gos;return e.get("groupDisplayType")==="custom"?!0:e.get("treeDataDisplayType")==="custom"}createOneAutoCol(e,t){let s;e?s=`${ni}-${e.getId()}`:s=ni;const o=this.createAutoColDef(s,e,t);o.colId=s;const i=new Dl(o,null,s,!0);return this.createBean(i),i}updateOneAutoCol(e,t,s){const o=e.getColDef(),i=typeof o.showRowGroup=="string"?o.showRowGroup:void 0,n=this.beans,r=i!=null?n.colModel.getColDefCol(i):void 0,l=e.getId(),a=this.createAutoColDef(l,r??void 0,t);e.setColDef(a,null,s),Gt(n,{state:[{colId:l,...a}]},s)}createAutoColDef(e,t,s){let o=this.createBaseColDef(t);const i=this.gos.get("autoGroupColumnDef");gt(o,i),o=Pl(this.beans,o,e,!0),this.gos.get("treeData")||ke(o.field)&&ke(o.valueGetter)&&ke(o.filterValueGetter)&&o.filter!=="agGroupColumnFilter"&&(o.filter=!1),s&&s>0&&(o.headerCheckboxSelection=!1);const n=Cs(this.gos),r=o.valueGetter||o.field!=null;return n&&!r&&(o.sortIndex=void 0,o.initialSort=void 0),o}createBaseColDef(e){const t=this.gos.get("autoGroupColumnDef"),o={headerName:this.getLocaleTextFunc()("group","Group"),showRowGroup:e?.getColId()??!0};return t&&(t.cellRenderer||t.cellRendererSelector)||(o.cellRenderer="agGroupCellRenderer",this.beans.findSvc?.setupGroupCol(o)),e&&(o.headerName=this.beans.colNames.getDisplayNameForColumn(e,"header")??void 0,o.headerValueGetter=e.colDef.headerValueGetter),o}destroy(){Eo(this.beans,this.columns?.tree),super.destroy()}},NC=class extends F{addExpandedCss(e,t){t.isExpandable()&&(e.push("ag-row-group"),e.push(t.expanded?"ag-row-group-expanded":"ag-row-group-contracted"))}getRowExpandedListeners(e){const{rowNode:t}=e,s=this.updateExpandedCss.bind(this,e,t);return{expandedChanged:s,hasChildrenChanged:s}}setExpanded(e,t,s,o){if(e.expanded===t)return;e.expanded=t,e.dispatchRowEvent("expandedChanged");const i={...kf(e,this.gos,"rowGroupOpened"),expanded:t,event:s||null};this.dispatchExpandedEvent(i,o),this.beans.rowRenderer.refreshCells({rowNodes:[e]})}isExpandable(e){return e.footer?!1:this.beans.colModel.isPivotMode()?e.hasChildren()&&!e.leafGroup:e.hasChildren()||e.master}updateExpandedCss(e,t){const s=t.isExpandable(),o=t.expanded==!0;e.forEachGui(void 0,i=>{const n=i.rowComp;n.addOrRemoveCssClass("ag-row-group",s),n.addOrRemoveCssClass("ag-row-group-expanded",s&&o),n.addOrRemoveCssClass("ag-row-group-contracted",s&&!o),Zo(i.element,s&&o)})}},ck=class extends NC{constructor(){super(...arguments),this.beanName="expansionSvc",this.events=[]}wireBeans(e){this.rowModel=e.rowModel}expandRows(e){const t=new Set(e);this.rowModel.forEachNode(s=>{s.id&&t.has(s.id)&&(s.expanded=!0)}),this.onGroupExpandedOrCollapsed()}expandAll(e){const{gos:t,colModel:s,eventSvc:o}=this.beans,i=this.rowModel,n=t.get("treeData"),r=s.isPivotActive(),l=d=>{d&&d.forEach(c=>{const u=()=>{c.expanded=e,l(c.childrenAfterGroup)};if(n){j(c.childrenAfterGroup)&&u();return}if(r){!c.leafGroup&&u();return}c.group&&u()})},a=i.rootNode;a&&l(a.childrenAfterGroup),i.refreshModel({step:"map"}),o.dispatchEvent({type:"expandOrCollapseAll",source:e?"expandAll":"collapseAll"})}onGroupExpandedOrCollapsed(){this.rowModel.refreshModel({step:"map"})}dispatchExpandedEvent(e,t){this.events.push(e);const s=()=>{this.rowModel.onRowGroupOpened(),this.events.forEach(o=>this.eventSvc.dispatchEvent(o)),this.events=[]};t?s():(this.dispatchExpandedDebounced==null&&(this.dispatchExpandedDebounced=this.debounce(s)),this.dispatchExpandedDebounced())}debounce(e){const t=this.beans.animationFrameSvc;if(!t)return()=>window.setTimeout(e,0);let s=!1;return()=>{if(!t.active){window.setTimeout(e,0);return}s||(s=!0,t.addDestroyTask(()=>{s=!1,e()}))}}};function uk(e){let t=e.get("groupHideParentOfSingleChild");return t||(t=e.get("groupRemoveSingleChildren"),!t&&e.get("groupRemoveLowestSingleChildren")&&(t="leafGroupsOnly")),{groupHideParentOfSingleChild:t,isGroupMultiAutoColumn:_g(e),hideOpenParents:e.get("groupHideOpenParents"),grandTotalRow:qd(e),groupTotalRow:Vi(e)}}function hk(e,t,s){return e.groupHideParentOfSingleChild===!0&&s&&t.childrenAfterGroup.length===1}function pk(e,t,s){return e.groupHideParentOfSingleChild==="leafGroupsOnly"&&s&&t.leafGroup&&t.childrenAfterGroup.length===1}function gk(e,t,s,o,i,n){const r=o&&!s,l=o&&t.leafGroup,a=e.hideOpenParents&&t.expanded&&!t.master&&!l;return!r&&!a&&!i&&!n}var fk=class extends F{constructor(){super(...arguments),this.beanName="flattenStage",this.refreshProps=new Set(["groupHideParentOfSingleChild","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupTotalRow","masterDetail"]),this.step="map"}execute(e){const t=e.rowNode,s=[],o=this.beans.colModel.isPivotMode(),i=o&&t.leafGroup&&t.aggData,n=i?[t]:t.childrenAfterSort,r=uk(this.gos);this.recursivelyAddToRowsToDisplay(r,n,s,o,0);const l=s.length>0;if(!i&&l&&r.grandTotalRow){go(t,this.beans);const d=r.grandTotalRow==="top";this.addRowNodeToRowsToDisplay(r,t.sibling,s,0,d)}return s}recursivelyAddToRowsToDisplay(e,t,s,o,i){if(t?.length)for(let n=0;n<t.length;n++){const r=t[n],l=r.hasChildren(),a=hk(e,r,l),d=pk(e,r,l);if(gk(e,r,l,o,a,d)&&this.addRowNodeToRowsToDisplay(e,r,s,i),!(o&&r.leafGroup))if(l){const u=a||d;if(r.expanded||u){const h=e.groupTotalRow({node:r});h||iu(r);const p=u?i:i+1;h==="top"&&(go(r,this.beans),this.addRowNodeToRowsToDisplay(e,r.sibling,s,p)),this.recursivelyAddToRowsToDisplay(e,r.childrenAfterSort,s,o,p),h==="bottom"&&(go(r,this.beans),this.addRowNodeToRowsToDisplay(e,r.sibling,s,p))}}else{const u=this.beans.masterDetailSvc?.getDetail(r);u&&this.addRowNodeToRowsToDisplay(e,u,s,i)}}}addRowNodeToRowsToDisplay(e,t,s,o,i){i?s.unshift(t):s.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:o)}},mk=class extends F{constructor(){super(...arguments),this.beanName="groupStage",this.refreshProps=new Set(["groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType","treeData","treeDataChildrenField","treeDataParentIdField"]),this.step="group",this.approach=null,this.strategy=void 0}destroy(){super.destroy(),this.strategy=void 0,this.approach=null}createStrategy(){const{beans:e,approach:t}=this;let s;switch(t){case"treeSelfRef":s="treeParentIdStrategy";break;case"group":s="groupStrategy";break}if(s){const o=e.registry.createDynamicBean(s,!1);return this.createOptionalManagedBean(o),o}}execute(e){let t=this.strategy;const s=Ug(this.gos);return this.approach!==s&&(this.approach=s,this.destroyBean(t),t&&this.approach!=="treeNested"&&this.approach!=="treePath"&&Ck(e.rowNode),t=this.createStrategy(),this.strategy=t),t?.execute(e),!!t}},Ck=e=>{const t=e.allLeafChildren,s=e.sibling;e.treeNodeFlags=0,e.childrenAfterGroup=t,e.childrenMapped=null,e.groupData=null,s&&(s.childrenAfterGroup=e.childrenAfterGroup,s.childrenAfterAggFilter=e.childrenAfterAggFilter,s.childrenAfterFilter=e.childrenAfterFilter,s.childrenAfterSort=e.childrenAfterSort,s.childrenMapped=null,s.groupData=null);for(const o of t){const i=o.sibling;_C(o),i&&_C(i),o.parent=e,o.level=0,o.key=null,o.treeNodeFlags=0,(o.group||o.hasChildren())&&(o.group=!1,o.updateHasChildren())}e.updateHasChildren()},_C=e=>{e.allLeafChildren=null,e.childrenAfterGroup=null,e.childrenAfterAggFilter=null,e.childrenAfterFilter=null,e.childrenAfterSort=null,e.childrenMapped=null,e.groupData&&(e.groupData=null)};function ru(e,t,s){let o=e;const i=o.level-t.level;if(i<=0||!s.get("groupHideOpenParents"))return!1;for(let r=0;r<i;r++){if(!(o.parent?.childrenAfterSort?.[0]===o))return!1;o=o.parent}return o===t}function BC(e,t,s,o){const i=s.key==="",n=!!s.rowGroupColumn&&(!e||e?.isRowGroupDisplayed(s.rowGroupColumn.getId()));if(i&&n){const r=ru(t,s,o.gos);if(s===t||r)return Fd(o.localeSvc)("blanks","(Blanks)")}return null}var HC=class extends F{constructor(){super(...arguments),this.indentClass=null}init(e,t,s,o,i,n,r){this.params=r,this.eGui=t,this.eCheckbox=s,this.eExpanded=o,this.eContracted=i,this.comp=e,this.compClass=n;const{node:l,column:a}=r;if(this.node=l,this.displayedNode=l,!this.isEmbeddedRowMismatch()){if(l.footer){this.initFooterCell();return}if(!a){this.initFullWidthCell();return}this.displayedNode=this.beans.valueSvc.getDisplayedNode(l,a)??this.node,this.setupExpand(),this.setupCheckbox(),this.addGroupValue(),this.setupIndent()}}initFooterCell(){const{node:e,column:t}=this.params,s=e.level===-1;!(e.rowGroupColumn&&t&&t.isRowGroupDisplayed(e.rowGroupColumn.getId()))&&!s||(this.addFooterValue(),this.setupIndent(),s||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!0))}initFullWidthCell(){const e=()=>{const{rowDragSvc:t}=this.beans;if(!this.params.rowDrag||!t)return;const s=t.createRowDragComp(()=>this.params.value,this.params.node);this.createManagedBean(s),this.eGui.insertAdjacentElement("afterbegin",s.getGui())};this.setupExpand(),e(),this.setupCheckbox(),this.addGroupValue(),this.setupIndent()}getCellAriaRole(){const e=this.params.colDef?.cellAriaRole,t=this.params.column?.getColDef().cellAriaRole;return e||t||"gridcell"}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;const{visibleCols:e}=this.beans,t=this.params.pinned==="left",s=this.params.pinned==="right",o=!t&&!s;return this.gos.get("enableRtl")?e.isPinningLeft()?!s:!o:e.isPinningLeft()?!t:!o}addGroupValue(){const{params:{column:e,value:t},node:s,displayedNode:o,beans:i}=this,n=this.getFormattedValue()??BC(e,s,o,i),r=this.getInnerCompDetails(n);this.comp.setInnerRenderer(r,n??t??null)}getFormattedValue(){const{valueSvc:e}=this.beans,{value:t,valueFormatted:s,column:o}=this.params,{rowGroupColumn:i}=this.displayedNode;return!i||!o?s:o?.isRowGroupDisplayed(i.getId())?e.formatValue(i,this.node,t):null}addFooterValue(){const{expressionSvc:e,footerSvc:t}=this.beans,{totalValueGetter:s,column:o,node:i,value:n}=this.params,r=this.getFormattedValue()??BC(o,i,i,this.beans);let l="";s?typeof s=="function"?l=s({...this.params,valueFormatted:r}):typeof s=="string"?l=e?.evaluate(s,{...this.params,valueFormatted:r}):I(179):l=t?.getTotalValue(r??n);const a=this.getInnerCompDetails(r);this.comp.setInnerRenderer(a,l??"")}setupExpand(){const{colModel:e}=this.beans,{eGridCell:t,column:s,suppressDoubleClickExpand:o}=this.params,i=(d,c)=>{const u=pe(d,this.beans,null);u&&(c.appendChild(u),this.addDestroyFunc(()=>c.removeChild(u)))};i("groupExpanded",this.eExpanded),i("groupContracted",this.eContracted);const n=this.comp,r=()=>{if(!this.isExpandable())return;const c=this.displayedNode.expanded;n.setExpandedDisplayed(c),n.setContractedDisplayed(!c),Zo(t,!!this.displayedNode.expanded)},l=()=>{const d=this.isExpandable();n.addOrRemoveCssClass("ag-cell-expandable",d),n.addOrRemoveCssClass("ag-row-group",d);const c=!d&&e.isPivotMode();n.addOrRemoveCssClass("ag-pivot-leaf-group",c);const u=!e.isPivotMode()&&(!this.displayedNode.footer||this.displayedNode.level!==-1);n.addOrRemoveCssClass("ag-row-group-leaf-indent",!d&&u);const h=this.getChildCount(),p=h>0?`(${h})`:"";n.setChildCount(p),d?r():(n.setExpandedDisplayed(!1),n.setContractedDisplayed(!1),DS(t))};(()=>{!(s?.isCellEditable(this.displayedNode)&&this.gos.get("enableGroupEdit"))&&!o&&this.addManagedListeners(t,{dblclick:this.onCellDblClicked.bind(this)}),this.addManagedListeners(this.eExpanded,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(this.eContracted,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedListeners(this.displayedNode,{allChildrenCountChanged:l,masterChanged:l,groupChanged:l,hasChildrenChanged:l,expandedChanged:r})})(),l()}getInnerCompDetails(e){const{userCompFactory:t,findSvc:s}=this.beans,o={...this.params,valueFormatted:e};if(o.fullWidth){const d=this.gos.get("groupRowRendererParams"),c=Tl(t,d,o);return c||(s?.isMatch(o.node,null)?Tl(t,{...d,innerRenderer:"agFindCellRenderer"},o):void 0)}const i=d=>d&&d.componentClass==this.compClass,n=Tl(t,o,o);if(n&&!i(n))return n;const{displayedNode:{rowGroupColumn:r}}=this,l=r?.colDef,a=r&&o.column?.isRowGroupDisplayed(r.getId());if(l&&a){const d=zi(t,l,o);if(d)if(i(d)){if(l?.cellRendererParams?.innerRenderer)return Tl(t,l.cellRendererParams,o)}else return d}if(s?.isMatch(o.node,o.column))return zi(t,{...l??o.colDef,cellRenderer:"agFindCellRenderer"},o)}getChildCount(){const{column:e,suppressCount:t}=this.params;if(t)return 0;const{allChildrenCount:s,rowGroupColumn:o}=this.displayedNode;return!((s??0)>0&&(!o||!e||e?.isRowGroupDisplayed(o.getId())))||this.gos.get("showOpenedGroup")&&this.displayedNode!==this.node&&!ru(this.node,this.displayedNode,this.gos)?0:s??0}isExpandable(){const{node:e,column:t,colDef:s}=this.params;if(!this.displayedNode.isExpandable())return!1;if(!t)return!0;if(e.hasChildren()&&s){const{showRowGroup:n}=s;if(!n)return!1;if(n===!0)return!0}return e===this.displayedNode?e.rowGroupColumn&&t?.isRowGroupDisplayed(e.rowGroupColumn.getId())?!0:e.master?s?.showRowGroup===!0||s?.showRowGroup==null:!1:ru(this.node,this.displayedNode,this.gos)}setupIndent(){const{suppressPadding:e,node:t,colDef:s}=this.params;if(e)return;const o=()=>{let i=0;s&&s.showRowGroup!==!0?i=0:i=t.uiLevel;const n="ag-row-group-indent-"+i;n!==this.indentClass&&(this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass=n,this.comp.addOrRemoveCssClass(n,!0),this.eGui.style.setProperty("--ag-indentation-level",String(i)))};this.addManagedListeners(t,{uiLevelChanged:o.bind(this)}),o()}setupCheckbox(){const{node:e}=this.params;!e.footer&&!e.rowPinned&&!e.detail&&(this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:o})=>{const i=typeof s=="object"?s:void 0,n=typeof o=="object"?o:void 0;i?.checkboxLocation!==n?.checkboxLocation&&(this.destroyCheckbox(),this.addCheckbox())}),this.addCheckbox())}addCheckbox(){const{selectionSvc:e}=this.beans;if(!e||!Gs(this.gos))return;const{node:t,column:s}=this.params,o=this.gos.get("rowSelection"),i=Qn(o);if(i==="selectionColumn")return;if(i==="autoGroupColumn"){const d=s?.getColDef().showRowGroup!=null,c=!s&&t.group;if(!(d||c))return}const n=typeof o=="object"?si(o):this.params.checkbox;if(!(typeof n=="function"||n===!0))return;if(typeof s?.getColDef().showRowGroup=="string"&&!this.isExpandable()){this.comp.setCheckboxSpacing(!0);return}const a=e.createCheckboxSelectionComponent();this.cbComp=a,this.createBean(a),a.init({rowNode:t,column:s,overrides:{isVisible:n,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(a.getGui()),this.comp.setCheckboxVisible(!0)}destroyCheckbox(){this.comp.setCheckboxSpacing(!1),this.comp.setCheckboxVisible(!1),this.cbComp&&this.eCheckbox.removeChild(this.cbComp.getGui()),this.cbComp=this.destroyBean(this.cbComp)}onExpandClicked(e){vs(e)||(co(e),this.onExpandOrContract(e))}onKeyDown(e){!(e.key===D.ENTER)||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){if(vs(e))return;sc(this.eExpanded,e)||sc(this.eContracted,e)||this.onExpandOrContract(e)}onExpandOrContract(e){if(!this.isExpandable())return;const t=this.displayedNode,s=!t.expanded;!s&&t.sticky&&this.beans.ctrlsSvc.getScrollFeature().setVerticalScrollPosition(t.rowTop-t.stickyRowTop),t.setExpanded(s,e)}destroy(){super.destroy(),this.destroyCheckbox()}},vk={tag:"span",cls:"ag-cell-wrapper",children:[{tag:"span",ref:"eExpanded",cls:"ag-group-expanded ag-hidden"},{tag:"span",ref:"eContracted",cls:"ag-group-contracted ag-hidden"},{tag:"span",ref:"eCheckbox",cls:"ag-group-checkbox ag-invisible"},{tag:"span",ref:"eValue",cls:"ag-group-value"},{tag:"span",ref:"eChildCount",cls:"ag-group-child-count"}]},VC=class extends ve{constructor(){super(vk),this.eExpanded=k,this.eContracted=k,this.eCheckbox=k,this.eValue=k,this.eChildCount=k}init(e){const t={setInnerRenderer:(n,r)=>this.setRenderDetails(n,r),setChildCount:n=>this.eChildCount.textContent=n,addOrRemoveCssClass:(n,r)=>this.addOrRemoveCssClass(n,r),setContractedDisplayed:n=>fe(this.eContracted,n),setExpandedDisplayed:n=>fe(this.eExpanded,n),setCheckboxVisible:n=>this.eCheckbox.classList.toggle("ag-invisible",!n),setCheckboxSpacing:n=>this.eCheckbox.classList.toggle("ag-group-checkbox-spacing",n)},s=this.createManagedBean(new HC),o=!e.colDef,i=this.getGui();s.init(t,i,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),o&&os(i,s.getCellAriaRole())}setRenderDetails(e,t){e?e.newAgStackInstance().then(s=>{if(!s)return;const o=()=>this.destroyBean(s);this.isAlive()?(this.eValue.appendChild(s.getGui()),this.addDestroyFunc(o)):o()}):this.eValue.innerText=t}destroy(){this.destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}},wk=".ag-group-checkbox-spacing{width:var(--ag-icon-size)}:where(.ag-ltr) .ag-group-checkbox-spacing{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-checkbox-spacing{margin-left:var(--ag-cell-widget-spacing)}",yk=class extends F{constructor(){super(...arguments),this.beanName="showRowGroupCols"}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={};const{colModel:e,rowGroupColsSvc:t}=this.beans;e.getCols().forEach(s=>{const i=s.getColDef().showRowGroup,n=typeof i=="string";!n&&!(i===!0)||(this.showRowGroupCols.push(s),n?this.showRowGroupColsMap[i]=s:t&&t.columns.forEach(l=>{this.showRowGroupColsMap[l.getId()]=s}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(e){return this.showRowGroupColsMap[e]}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;const{rowGroupColsSvc:s,colModel:o}=this.beans;if(t===!0&&s)return s.columns.slice(0);const i=o.getColDefCol(t);return i?[i]:null}isRowGroupDisplayed(e,t){const{colDef:s}=e;if(s?.showRowGroup==null)return!1;const o=s.showRowGroup===!0,i=s.showRowGroup===t;return o||i}},bk=class extends F{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.extraTopHeight=0,this.extraBottomHeight=0}postConstruct(){this.isClientSide=ks(this.gos),this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl}),this.resetStickyContainers()}setOffsetTop(e){this.extraTopHeight!==e&&(this.extraTopHeight=e,this.eventSvc.dispatchEvent({type:"stickyTopOffsetChanged",offset:e}))}setOffsetBottom(e){this.extraBottomHeight!==e&&(this.extraBottomHeight=e)}resetOffsets(){this.setOffsetBottom(0),this.setOffsetTop(0)}getLastPixelOfGroup(e){return this.isClientSide?Rk(e):Sk(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}updateStickyRows(e){const t=e==="top";let s=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,s);const{rowModel:o,rowRenderer:i}=this.beans,n=t?i.firstVisibleVPixel-this.extraTopHeight:i.lastVisibleVPixel-this.extraTopHeight,r=new Set,l=u=>{if(r.add(u),t){const h=this.getLastPixelOfGroup(u),p=n+s+u.rowHeight;h<p?u.stickyRowTop=s+(h-p):u.stickyRowTop=s}else{const h=this.getFirstPixelOfGroup(u),p=n-(s+u.rowHeight);h>p?u.stickyRowTop=s-(h-p):u.stickyRowTop=s}s=0,r.forEach(h=>{const p=h.stickyRowTop+h.rowHeight;s<p&&(s=p)})},a=this.areFooterRowsStickySuppressed(),d=this.gos.get("suppressGroupRowsSticky"),c=u=>{if(!u.displayed)return!1;if(u.footer){if(a===!0||a==="grand"&&u.level===-1||a==="group"&&u.level>-1)return!1;const h=u.sibling.rowIndex?u.sibling.rowIndex+1===u.rowIndex:!1;return e==="bottom"&&h?!1:!r.has(u)}return u.isExpandable()?d===!0||e==="bottom"?!1:!r.has(u)&&u.expanded:!1};for(let u=0;u<100;u++){let h=n+s;t||(h=n-s);const p=o.getRowIndexAtPixel(h),g=o.getRow(p);if(g==null)break;const m=this.getStickyAncestors(g).find(y=>(t?y.rowIndex<p:y.rowIndex>p)&&c(y));if(m){l(m);continue}if((t?g.rowTop<h:g.rowTop+g.rowHeight>h)&&c(g)){l(g);continue}break}return t||r.forEach(u=>{u.stickyRowTop=s-(u.stickyRowTop+u.rowHeight)}),this.refreshNodesAndContainerHeight(e,r,s)}areFooterRowsStickySuppressed(){const e=this.gos.get("suppressStickyTotalRow");if(e===!0)return!0;const t=e==="group",s=e==="grand";return t&&s?!0:s?"grand":t?"group":!1}canRowsBeSticky(){const e=Sl(this.gos),t=this.areFooterRowsStickySuppressed(),s=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!s)}getStickyAncestors(e){const t=[];let s=e.footer?e.sibling:e.parent;for(;s;)s.sibling&&t.push(s.sibling),t.push(s),s=s.parent;return t.reverse()}checkStickyRows(){const e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t}destroyStickyCtrls(){this.resetStickyContainers()}resetStickyContainers(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){const t=new Set;if(this.stickyTopRowCtrls.some(s=>s.rowNode===e)){for(let s=0;s<this.stickyTopRowCtrls.length;s++){const o=this.stickyTopRowCtrls[s].rowNode;o!==e&&t.add(o)}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows();return}for(let s=0;s<this.stickyBottomRowCtrls.length;s++){const o=this.stickyBottomRowCtrls[s].rowNode;o!==e&&t.add(o)}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows()}refreshNodesAndContainerHeight(e,t,s){const o=e==="top",i=o?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,n={},r=[];for(let p=0;p<i.length;p++){const g=i[p].rowNode;if(!t.has(g)){n[g.id]=i[p],g.sticky=!1;continue}r.push(i[p])}const l=new Set;for(let p=0;p<r.length;p++)l.add(r[p].rowNode);const a=[];t.forEach(p=>{l.has(p)||(p.sticky=!0,a.push(this.createRowCon(p,!1,!1)))});let d=!!a.length||r.length!==i.length;o?this.topContainerHeight!==s&&(this.topContainerHeight=s,this.gridBodyCtrl.setStickyTopHeight(s),d=!0):this.bottomContainerHeight!==s&&(this.bottomContainerHeight=s,this.gridBodyCtrl.setStickyBottomHeight(s),d=!0),this.destroyRowCtrls(n,!1);const c=[...r,...a];c.sort((p,g)=>g.rowNode.rowIndex-p.rowNode.rowIndex),o||c.reverse(),c.forEach(p=>p.setRowTop(p.rowNode.stickyRowTop));const u=this.beans.pageBounds;let h=0;return o?(t.forEach(p=>{p.rowIndex<u.getFirstRow()&&(h+=p.rowHeight)}),h>this.topContainerHeight&&(h=this.topContainerHeight),this.setOffsetTop(h)):(t.forEach(p=>{p.rowIndex>u.getLastRow()&&(h+=p.rowHeight)}),h>this.bottomContainerHeight&&(h=this.bottomContainerHeight),this.setOffsetBottom(h)),d?(o?this.stickyTopRowCtrls=c:this.stickyBottomRowCtrls=c,!0):!1}ensureRowHeightsValid(){let e=!1;const t=s=>{const o=s.rowNode;if(o.rowHeightEstimated){const i=ns(this.beans,o);o.setRowHeight(i.height),e=!0}};return this.stickyTopRowCtrls.forEach(t),this.stickyBottomRowCtrls.forEach(t),e}};function Sk(e){if(e.isExpandable()||e.footer){if(e.master&&e.detailNode)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1){let s=e.childStore?.getStoreBounds();return e.footer&&(s=e.sibling.childStore?.getStoreBounds()),(s?.heightPx??0)+(s?.topPx??0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}function Rk(e){if(e.isExpandable()||e.footer){if(e.footer&&e.rowIndex===0)return Number.MAX_SAFE_INTEGER;if(!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1){let o=e.footer?e.sibling:e;for(;o.isExpandable()&&o.expanded;)if(o.master&&o.detailNode)o=o.detailNode;else if(o.childrenAfterSort){if(o.childrenAfterSort.length===0)break;o=Re(o.childrenAfterSort)}return o.rowTop+o.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}var xk=class extends F{constructor(){super(...arguments),this.beanName="stickyRowSvc"}createStickyRowFeature(e,t,s){const o=this.gos;if(Sl(o)&&ks(o)||Os(o))return e.createManagedBean(new bk(t,s))}},Fk={moduleName:"GroupCellRenderer",version:lt,userComponents:{agGroupRowRenderer:VC,agGroupCellRenderer:VC},dynamicBeans:{groupCellRendererCtrl:HC},icons:{groupContracted:"tree-closed",groupExpanded:"tree-open"},css:[wk],dependsOn:[Rs]},WC={moduleName:"GroupColumn",version:lt,beans:[dk,yk,ak,GC,OC],dependsOn:[Rs,Fk]},Dk={moduleName:"ClientSideRowModelHierarchy",version:lt,rowModels:["clientSide"],beans:[mk,fk,ck],dependsOn:[Rs]},zC={moduleName:"StickyRow",version:lt,beans:[xk]},lu=class{constructor(){this.allSets=new Map}removeFromChildrenAfterGroup(e,t){const s=this.getSet(e);(s.fromChildrenAfterGroup??(s.fromChildrenAfterGroup=new Set)).add(t)}isRemoveFromAllLeafChildren(e,t){return!!this.allSets.get(e)?.fromAllLeafChildren?.has(t)}preventRemoveFromAllLeafChildren(e,t){this.allSets.get(e)?.fromAllLeafChildren?.delete(t)}removeFromAllLeafChildren(e,t){const s=this.getSet(e);(s.fromAllLeafChildren??(s.fromAllLeafChildren=new Set)).add(t)}getSet(e){let t=this.allSets.get(e);return t||(t={fromChildrenAfterGroup:null,fromAllLeafChildren:null},this.allSets.set(e,t)),t}getAllParents(){return Array.from(this.allSets.keys())}flush(){const e=this.allSets;for(const t of e.keys()){const s=e.get(t);if(s){const{fromChildrenAfterGroup:o,fromAllLeafChildren:i}=s,{childrenAfterGroup:n,allLeafChildren:r}=t;n&&o&&(UC(n,o),t.updateHasChildren()),r&&i&&UC(r,i)}}e.clear()}};function UC(e,t){let s=0;for(let o=0,i=e.length;o<i;++o){const n=e[o];t.has(n)||(e[s++]=n)}e.length=s}function Ek(e){if(!e)return!1;const t=e.length;if(t<2)return!1;let s=!1;for(let o=1;o<t;o++)if($C(e[o-1],e[o])>0){s=!0;break}return s?(e.sort($C),!0):!1}function $C(e,t){const s=e.sourceRowIndex,o=t.sourceRowIndex,i=s>=0,n=o>=0,r=i&&n,l=!i&&!n;return r?s-o:l?e.__objectId-t.__objectId:i?1:-1}var Mk=class extends F{wireBeans(e){this.colModel=e.colModel,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc,this.selectionSvc=e.selectionSvc,this.showRowGroupCols=e.showRowGroupCols}execute(e){const t=this.createGroupingDetails(e),s=e.changedRowNodes;s?this.handleDeltaUpdate(t,s):this.shotgunResetEverything(t,!!e.afterColumnsChanged);const o=e.changedPath;this.positionLeafsAndGroups(o),this.orderGroups(t),this.selectionSvc?.updateSelectableAfterGrouping(o)}positionLeafsAndGroups(e){e.forEachChangedNodeDepthFirst(t=>{if(t.childrenAfterGroup){const s=[],o=[];let i;t.childrenAfterGroup.forEach(n=>{n.childrenAfterGroup?.length?n.key===""&&!i?i=n:o.push(n):s.push(n)}),i&&o.push(i),t.childrenAfterGroup=[...s,...o]}},!1)}createGroupingDetails(e){const{rowNode:t,changedPath:s,rowNodesOrderChanged:o}=e,i=this.rowGroupColsSvc?.columns;return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:i,rootNode:t,pivotMode:this.colModel.isPivotMode(),groupedColCount:i?.length??0,rowNodesOrderChanged:!!o,changedPath:s,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),keyCreators:i?.map(r=>r.getColDef().keyCreator)??[]}}handleDeltaUpdate(e,{removals:t,updates:s,adds:o}){const i=new lu;t.size&&this.removeNodes(t,e,i);for(const l of s)this.moveNodeInWrongPath(l,e,i);const n=e.changedPath;for(const l of o)this.insertOneNode(l,e),n.active&&n.addParentNode(l.parent);const r=i.getAllParents();i.flush(),this.removeEmptyGroups(r,e),e.rowNodesOrderChanged&&this.sortChildren(e)}sortChildren(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{Ek(t.childrenAfterGroup)&&e.changedPath.addParentNode(t)},!1,!0)}orderGroups(e){const t=e.initialGroupOrderComparator;j(t)&&s(e.rootNode);function s(o){j(o.childrenAfterGroup)&&!o.leafGroup&&(o.childrenAfterGroup.sort((n,r)=>t({nodeA:n,nodeB:r})),o.childrenAfterGroup.forEach(n=>s(n)))}}getExistingPathForNode(e,t){const s=[];let o=e.parent;for(;o&&o!==t.rootNode;)s.push({key:o.key,rowGroupColumn:o.rowGroupColumn,field:o.field}),o=o.parent;return s.reverse(),s}moveNodeInWrongPath(e,t,s){t.changedPath.active&&t.changedPath.addParentNode(e.parent);const o=l=>l.key,i=this.getExistingPathForNode(e,t).map(o),n=this.getGroupInfo(e,t).map(o);_s(i,n)||this.moveNode(e,t,s)}moveNode(e,t,s){if(this.removeNodesFromParents([e],t,s),this.insertOneNode(e,t,s),e.setData(e.data),t.changedPath.active){const o=e.parent;t.changedPath.addParentNode(o)}}removeNodes(e,t,s){if(this.removeNodesFromParents(e,t,s),t.changedPath.active)for(const o of e)t.changedPath.addParentNode(o.parent)}forEachParentGroup(e,t,s){let o=t;for(;o&&o!==e.rootNode;)s(o),o=o.parent}removeNodesFromParents(e,t,s){const o=s==null,i=s||new lu;for(const n of e)this.removeFromParent(n,i),this.forEachParentGroup(t,n.parent,r=>{i.removeFromAllLeafChildren(r,n)});o&&i.flush()}removeEmptyGroups(e,t){let s=!0;const o=i=>{const n=this.getChildrenMappedKey(i.key,i.rowGroupColumn),r=i.parent;return(r?.childrenMapped?!r.childrenMapped[n]:!0)?!1:!!i.group&&(i.childrenAfterGroup?.length??0)===0};for(;s;){s=!1;const i=new lu;e.forEach(n=>{this.forEachParentGroup(t,n,r=>{o(r)&&(s=!0,this.removeFromParent(r,i),this.selectionSvc?.setNodesSelected({nodes:[r],newValue:!1,source:"rowGroupChanged"}))})}),i.flush()}}removeFromParent(e,t){e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):(Ot(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));const s=this.getChildrenMappedKey(e.key,e.rowGroupColumn);e.parent?.childrenMapped&&delete e.parent.childrenMapped[s],e.setRowTop(null),e.setRowIndex(null)}addToParent(e,t){const s=this.getChildrenMappedKey(e.key,e.rowGroupColumn);t?.childrenMapped&&t.childrenMapped[s]!==e&&(t.childrenMapped[s]=e,t.childrenAfterGroup.push(e),qT(t,this.beans,!0))}areGroupColsEqual(e,t){return e==null||t==null||e.pivotMode!==t.pivotMode?!1:_s(e.groupedCols,t.groupedCols)&&_s(e.keyCreators,t.keyCreators)}checkAllGroupDataAfterColsChanged(e){const t=s=>{s&&s.forEach(o=>{if(!o.group)return;const n={field:o.field,key:o.key,rowGroupColumn:o.rowGroupColumn,leafNode:o.allLeafChildren?.[0]};this.setGroupData(o,n),t(o.childrenAfterGroup)})};t(e.rootNode.childrenAfterGroup)}shotgunResetEverything(e,t){if(this.noChangeInGroupingColumns(e,t))return;this.selectionSvc?.filterFromSelection?.(n=>!n.group);const{groupedCols:s}=e,o=e.rootNode;o.leafGroup=s.length===0,o.childrenAfterGroup=[],o.childrenMapped={},o.updateHasChildren();const i=o.sibling;i&&(i.childrenAfterGroup=o.childrenAfterGroup,i.childrenMapped=o.childrenMapped),this.insertNodes(o.allLeafChildren,e)}noChangeInGroupingColumns(e,t){let s=!1;const o=this.showRowGroupCols.getShowRowGroupCols(),i=o?o.map(n=>n.getId()).join("-"):"";return t&&(s=this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==i&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=i,s}insertNodes(e,t){e.forEach(s=>{this.insertOneNode(s,t),t.changedPath.active&&t.changedPath.addParentNode(s.parent)})}insertOneNode(e,t,s){const o=this.getGroupInfo(e,t),i=this.findParentForNode(e,o,t,s);i.group||I(184,{parentGroupData:i.data,childNodeData:e.data}),e.parent=i,e.level=o.length,i.childrenAfterGroup.push(e),i.updateHasChildren()}findParentForNode(e,t,s,o){let i=s.rootNode;return t.forEach((n,r)=>{i=this.getOrCreateNextNode(i,n,r,s),o?.isRemoveFromAllLeafChildren(i,e)?o?.preventRemoveFromAllLeafChildren(i,e):i.allLeafChildren.push(e)}),i}getOrCreateNextNode(e,t,s,o){const i=this.getChildrenMappedKey(t.key,t.rowGroupColumn);let n=e?.childrenMapped?.[i];return n||(n=this.createGroup(t,e,s,o),this.addToParent(n,e)),n}createGroup(e,t,s,o){const i=new di(this.beans);return i.group=!0,i.field=e.field,i.rowGroupColumn=e.rowGroupColumn,this.setGroupData(i,e),i.key=e.key,i.id=this.createGroupId(i,t,s),i.level=s,i.leafGroup=s===o.groupedColCount-1,i.allLeafChildren=[],i.setAllChildrenCount(0),i.rowGroupIndex=s,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren(),i.parent=t,this.setExpandedInitialValue(o,i),i}createGroupId(e,t,s){const o=(i,n)=>{if(!i.rowGroupColumn)return null;const r=n?o(n,n.parent):null;return`${r==null?"":r+"-"}${i.rowGroupColumn.getColId()}-${i.key}`};return Wl+o(e,t)}setGroupData(e,t){const s=t.rowGroupColumn;s&&t.leafNode&&(e.groupValue=this.valueSvc.getValue(s,t.leafNode)),e.groupData={},this.showRowGroupCols.getShowRowGroupCols().forEach(i=>{const n=e.rowGroupColumn;n!==null&&i.isRowGroupDisplayed(n.getId())&&(e.groupData[i.getColId()]=this.valueSvc.getValue(n,t.leafNode))})}getChildrenMappedKey(e,t){return t?t.getId()+"-"+e:e}setExpandedInitialValue(e,t){if(e.pivotMode&&t.leafGroup){t.expanded=!1;return}const s=e.isGroupOpenByDefault;if(s){const o={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};t.expanded=s(o)==!0;return}if(e.expandByDefault===-1){t.expanded=!0;return}t.expanded=t.level<e.expandByDefault}getGroupInfo(e,t){const s=[];return t.groupedCols.forEach(o=>{let i=this.valueSvc.getKeyForNode(o,e),n=i!=null&&i!=="";if((t.pivotMode||!t.groupAllowUnbalanced)&&!n&&(i="",n=!0),n){const l={key:i,field:o.getColDef().field,rowGroupColumn:o,leafNode:e};s.push(l)}}),s}};function Ak(e,t){e.rowGroupColsSvc?.setColumns(t,"api")}function Pk(e,t){e.rowGroupColsSvc?.removeColumns(t,"api")}function Ik(e,t){e.rowGroupColsSvc?.addColumns(t,"api")}function Tk(e,t,s){e.rowGroupColsSvc?.moveColumn?.(t,s,"api")}function Lk(e){return e.rowGroupColsSvc?.columns??[]}var jC={moduleName:"SharedRowGrouping",version:lt,apiFunctions:{setRowGroupColumns:Ak,removeRowGroupColumns:Pk,addRowGroupColumns:Ik,getRowGroupColumns:Lk,moveRowGroupColumn:Tk},dependsOn:[Rs,nu,WC,zC]},kk={moduleName:"RowGrouping",version:lt,dynamicBeans:{groupStrategy:Mk},rowModels:["clientSide"],dependsOn:[jC,lk,Dk]},Ok={tag:"div",cls:"ag-loading",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},Gk=class extends ve{constructor(){super(Ok),this.eLoadingIcon=k,this.eLoadingText=k}init(e){e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const e=this.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")}setupLoading(){const e=pe("groupLoading",this.beans,null);e&&this.eLoadingIcon.appendChild(e);const t=this.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}},Nk={tag:"div",cls:"ag-skeleton-container"},_k=class extends ve{constructor(){super(Nk)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>Wn(e.eParentOfValue)),Wn(e.eParentOfValue,t),e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().innerText=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");Kt(this.getGui(),t)}setupLoading(e){const s=Xe(this.beans).createElement("div");s.classList.add("ag-skeleton-effect");const o=e.node.rowIndex;if(o!=null){const r=75+25*(o%2===0?Math.sin(o):Math.cos(o));s.style.width=`${r}%`}this.getGui().appendChild(s);const n=this.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");Kt(this.getGui(),n)}refresh(e){return!1}},Bk={moduleName:"LoadingCellRenderer",version:lt,userComponents:{agLoadingCellRenderer:Gk},icons:{groupLoading:"loading"},dependsOn:[Rs]},Hk={moduleName:"SkeletonCellRenderer",version:lt,userComponents:{agSkeletonCellRenderer:_k},dependsOn:[Rs]};function Vk(e){return e.colModel.isPivotMode()}function Wk(e,t,s){return e.pivotResultCols?.lookupPivotResultCol(t,s)??null}function zk(e,t){e.valueColsSvc?.setColumns(t,"api")}function Uk(e){return e.valueColsSvc?.columns??[]}function $k(e,t){e.valueColsSvc?.removeColumns(t,"api")}function jk(e,t){e.valueColsSvc?.addColumns(t,"api")}function Kk(e,t){e.pivotColsSvc?.setColumns(t,"api")}function Yk(e,t){e.pivotColsSvc?.removeColumns(t,"api")}function qk(e,t){e.pivotColsSvc?.addColumns(t,"api")}function Xk(e){return e.pivotColsSvc?.columns??[]}function Qk(e,t){e.pivotResultCols?.setPivotResultCols(t,"api")}function Zk(e){const t=e.pivotResultCols?.getPivotResultCols();return t?t.list:null}var KC="PivotRowTotal_",Jk=({headerName:e},{headerName:t})=>e&&!t?1:!e&&t?-1:!e&&!t?0:e<t?-1:e>t?1:0,eO=e=>(t,s)=>e(t.headerName,s.headerName),tO=class extends F{constructor(){super(...arguments),this.beanName="pivotColDefSvc"}wireBeans(e){this.colModel=e.colModel,this.pivotColsSvc=e.pivotColsSvc,this.valueColsSvc=e.valueColsSvc,this.colNames=e.colNames}postConstruct(){const e=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=e(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=e()});const t=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=t(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=t()})}createPivotColumnDefs(e){const t=this.createPivotColumnsFromUniqueValues(e);function s(n,r=[]){return n.forEach(l=>{l.children!==void 0?s(l.children,r):r.push(l)}),r}const o=s(t);this.addRowGroupTotals(t,o),this.addExpandablePivotGroups(t,o),this.addPivotTotalsToGroups(t,o);const i=o.map(n=>({...n}));return{pivotColumnGroupDefs:t,pivotColumnDefs:i}}createPivotColumnsFromUniqueValues(e){const t=this.pivotColsSvc?.columns??[],s=t.length;return this.recursivelyBuildGroup(0,e,[],s,t)}recursivelyBuildGroup(e,t,s,o,i){if(e>=o)return this.buildMeasureCols(s);const{pivotComparator:n}=i[e].getColDef(),r=n?eO(n):Jk,l=this.valueColsSvc?.columns;if(l?.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&e===o-1){const d=[];for(const c of t.keys()){const u=[...s,c],h=this.createColDef(l[0],c,u);h.columnGroupShow="open",d.push(h)}return d.sort(r),d}const a=[];for(const d of t.keys()){const c=this.pivotDefaultExpanded===-1||e<this.pivotDefaultExpanded,u=[...s,d];a.push({children:this.recursivelyBuildGroup(e+1,t.get(d),u,o,i),headerName:d,pivotKeys:u,columnGroupShow:"open",openByDefault:c,groupId:this.generateColumnGroupId(u)})}return a.sort(r),a}buildMeasureCols(e){const t=this.valueColsSvc?.columns??[];return t.length===0?[this.createColDef(null,"-",e)]:t.map(s=>{const o=this.colNames.getDisplayNameForColumn(s,"header");return{...this.createColDef(s,o,e),columnGroupShow:"open"}})}addExpandablePivotGroups(e,t){const s=this.gos.get("suppressExpandablePivotGroups");if(s||this.gos.get("pivotColumnGroupTotals"))return;const o=(i,n,r)=>{if("children"in i){const{valueColsSvc:d}=this,{columns:c=[]}=d??{},u=new Map;i.children.forEach(g=>{o(g,n,u)});const h=!i.children.some(g=>g.children),p=h&&c.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn");c.forEach(g=>{const f=this.colNames.getDisplayNameForColumn(g,"header"),m=this.createColDef(g,f,i.pivotKeys);m.pivotTotalColumnIds=u.get(g.getColId()),m.columnGroupShow=s?"open":"closed",m.aggFunc=g.getAggFunc(),(!h||p)&&(i.children.push(m),n.push(m))}),this.merge(r,u);return}if(!i.pivotValueColumn)return;const l=i.pivotValueColumn.getColId();r.has(l)?r.get(l).push(i.colId):r.set(l,[i.colId])};e.forEach(i=>{o(i,t,new Map)})}addPivotTotalsToGroups(e,t){if(!this.gos.get("pivotColumnGroupTotals"))return;const s=this.gos.get("pivotColumnGroupTotals")==="after",o=this.valueColsSvc?.columns,i=o?.map(n=>n.getAggFunc());if(!(!i||i.length<1||!this.sameAggFuncs(i))&&o){const n=o[0];e.forEach(r=>{this.recursivelyAddPivotTotal(r,t,n,s)})}}recursivelyAddPivotTotal(e,t,s,o){const i=e;if(!i.children){const r=e;return r.colId?[r.colId]:null}let n=[];if(i.children.forEach(r=>{const l=this.recursivelyAddPivotTotal(r,t,s,o);l&&(n=n.concat(l))}),i.children.length>1){const l=this.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),a=this.createColDef(s,l,e.pivotKeys,!0);a.pivotTotalColumnIds=n,a.aggFunc=s.getAggFunc(),a.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const d=e.children;o?d.push(a):d.unshift(a),t.push(a)}return n}addRowGroupTotals(e,t){if(!this.gos.get("pivotRowTotals"))return;const s=this.gos.get("pivotRowTotals")==="after",i=(this.valueColsSvc?.columns??[]).slice();s||i.reverse();const n=i.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let r=0;r<i.length;r++){const l=i[r],a=this.colNames.getDisplayNameForColumn(l,"header"),d=this.createColDef(l,a,[]),c=[];for(let h=0;h<t.length;h++){const p=t[h];p.pivotValueColumn===l&&c.push(p.colId)}d.pivotTotalColumnIds=c,d.colId=KC+d.colId;const u=n?{children:[d],pivotKeys:[],groupId:`${KC}_pivotGroup_${l.getColId()}`}:d;t.push(d),s?e.push(u):e.unshift(u)}}createColDef(e,t,s,o=!1){const i={};if(e){const n=e.getColDef();Object.assign(i,n),i.hide=!1}return i.headerName=t,i.colId=this.generateColumnId(s||[],e&&!o?e.getColId():""),i.field=i.colId,i.valueGetter=n=>n.data?.[n.colDef.field],i.pivotKeys=s,i.pivotValueColumn=e,i.filter===!0&&(i.filter="agNumberColumnFilter"),i}sameAggFuncs(e){if(e.length==1)return!0;for(let t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0}merge(e,t){t.forEach((s,o)=>{const n=[...e.has(o)?e.get(o):[],...s];e.set(o,n)})}generateColumnGroupId(e){return`pivotGroup_${(this.pivotColsSvc?.columns??[]).map(s=>s.getColId()).join("-")}_${e.join("-")}`}generateColumnId(e,t){return`pivot_${(this.pivotColsSvc?.columns??[]).map(o=>o.getColId()).join("-")}_${e.join("-")}_${t}`}createColDefsFromFields(e){const t={};for(let i=0;i<e.length;i++){const r=e[i].split(this.fieldSeparator);let l=t;for(let a=0;a<r.length;a++){const d=r[a];l[d]==null&&(l[d]={}),l=l[d]}}const s=(i,n,r,l)=>{const a=[];for(const u of Object.keys(r)){const h=r[u],p=s(`${i}${this.fieldSeparator}${u}`,u,h,l+1);a.push(p)}if(a.length===0){const u=this.colModel.getColDefCol(n);if(u){const p=this.colNames.getDisplayNameForColumn(u,"header")??n,g=this.createColDef(u,p,void 0,!1);return g.colId=i,g.aggFunc=u.getAggFunc(),g.valueGetter=f=>f.data?.[i],g}return{colId:i,headerName:n,valueGetter:p=>p.data?.[i]}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&a.length===1&&"colId"in a[0]?(a[0].headerName=n,a[0]):{openByDefault:this.pivotDefaultExpanded===-1||l<this.pivotDefaultExpanded,groupId:i,headerName:n,children:a}},o=[];for(const i of Object.keys(t)){const n=t[i],r=s(i,i,n,0);o.push(r)}return o}},sO=class extends F{constructor(){super(...arguments),this.beanName="pivotResultCols"}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols}destroy(){Eo(this.beans,this.pivotResultCols?.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;const s=this.colModel.getColDefCol(t);let o=null;return this.pivotResultCols.list.forEach(i=>{const n=i.getColDef().pivotKeys,r=i.getColDef().pivotValueColumn;_s(n,e)&&r===s&&(o=i)}),o}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.colModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){if(this.colModel.ready&&!(e==null&&this.pivotResultCols==null)){if(e){this.processPivotResultColDef(e);const s=sf(this.beans,e,!1,this.pivotResultCols?.tree||this.previousPivotResultCols||void 0,t);Eo(this.beans,this.pivotResultCols?.tree,s.columnTree);const o=s.columnTree,i=s.treeDept,n=ic(o),r={};this.pivotResultCols={tree:o,treeDepth:i,list:n,map:r},this.pivotResultCols.list.forEach(a=>this.pivotResultCols.map[a.getId()]=a);const l=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.colModel.refreshCols(!l)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.colModel.refreshCols(!1);this.visibleCols.refresh(t)}}processPivotResultColDef(e){const t=this.gos.get("processPivotResultColDef"),s=this.gos.get("processPivotResultColGroupDef");if(!t&&!s)return;const o=i=>{i.forEach(n=>{if(j(n.children)){const l=n;s&&s(l),o(l.children)}else t&&t(n)})};e&&o(e)}},oO={moduleName:"SharedPivot",version:lt,beans:[sO,tO,GC],apiFunctions:{isPivotMode:Vk,getPivotResultColumn:Wk,setValueColumns:zk,getValueColumns:Uk,removeValueColumns:$k,addValueColumns:jk,setPivotColumns:Kk,removePivotColumns:Yk,addPivotColumns:qk,getPivotColumns:Xk,setPivotResultColumns:Qk,getPivotResultColumns:Zk},dependsOn:[jC,ym]};oc.values();var iO={moduleName:"SharedTreeData",version:lt,dependsOn:[Rs,nu,WC,zC]},nO="ag-Grid-MissingKey",rO=class extends F{constructor(){super(...arguments),this.beanName="ssrmBlockUtils"}wireBeans(e){this.valueSvc=e.valueSvc,this.showRowGroupCols=e.showRowGroupCols,this.nodeManager=e.ssrmNodeManager,this.expansionSvc=e.expansionSvc,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}createRowNode(e){const t=new di(this.beans),s=e.rowHeight!=null?e.rowHeight:ti(this.beans);return t.setRowHeight(s),t.group=e.group,t.leafGroup=e.leafGroup,t.level=e.level,t.uiLevel=e.level,t.parent=e.parent,t.stub=!0,t.__needsRefreshWhenVisible=!1,t.group&&(t.expanded=!1,t.field=e.field,t.rowGroupColumn=e.rowGroupColumn,t.rowGroupIndex=e.level),t}destroyRowNode(e,t=!1){e.childStore&&!t&&(this.destroyBean(e.childStore),e.childStore=null),e.sibling&&!e.footer&&this.destroyRowNode(e.sibling,!1),e.clearRowTopAndRowIndex(),e.id!=null&&this.nodeManager.removeNode(e)}setTreeGroupInfo(e){e.updateHasChildren();const t=this.gos.get("getServerSideGroupKey"),s=e.hasChildren();s&&t!=null&&(e.key=t(e.data)),!s&&e.childStore!=null&&(this.destroyBean(e.childStore),e.childStore=null,e.expanded=!1)}setRowGroupInfo(e){if(e.key=this.valueSvc.getValue(e.rowGroupColumn,e),(e.key===null||e.key===void 0)&&Hd(()=>{I(190,{rowGroupId:e.rowGroupColumn?.getId(),data:e.data})},"SSBlock-BadKey"),this.gos.get("groupAllowUnbalanced")&&e.key===""){const i=this.serverSideRowModel.getParams();e.childStore=this.createBean(this.storeFactory.createStore(i,e))}Vi(this.beans.gos)({node:e})&&(go(e,this.beans),e.sibling&&(e.sibling.uiLevel=e.uiLevel+1))}setMasterDetailInfo(e){const t=this.gos.get("isRowMaster");t!=null?e.master=t(e.data):e.master=!0}updateDataIntoRowNode(e,t){e.updateData(t),this.gos.get("treeData")?(this.setTreeGroupInfo(e),this.setChildCountIntoRowNode(e)):e.group?(this.setChildCountIntoRowNode(e),e.footer||(Vi(this.beans.gos)({node:e})?e.sibling?e.sibling.updateData(t):go(e,this.beans):e.sibling&&iu(e))):this.gos.get("masterDetail")}setDataIntoRowNode(e,t,s,o){e.stub=!1;const i=this.gos.get("treeData");e.setDataAndId(t,s),i?this.setTreeGroupInfo(e):e.group?this.setRowGroupInfo(e):this.gos.get("masterDetail")&&this.setMasterDetailInfo(e),(i||e.group)&&(this.setGroupDataIntoRowNode(e),this.setChildCountIntoRowNode(e)),j(t)&&(e.setRowHeight(ns(this.beans,e,!1,o).height),e.sibling?.setRowHeight(ns(this.beans,e.sibling,!1,o).height))}setChildCountIntoRowNode(e){const t=this.gos.get("getChildCount");t&&e.setAllChildrenCount(t(e.data))}setGroupDataIntoRowNode(e){e.groupValue=e.key;const t=this.showRowGroupCols?.getShowRowGroupCols()??[],s=this.gos.get("treeData");t.forEach(o=>{if(e.groupData==null&&(e.groupData={}),s)e.groupData[o.getColId()]=e.key;else if(o.isRowGroupDisplayed(e.rowGroupColumn.getId())){const i=this.valueSvc.getValue(e.rowGroupColumn,e);e.groupData[o.getColId()]=i}})}clearDisplayIndex(e){e.clearRowTopAndRowIndex(),e.hasChildren()&&!!e.childStore&&e.childStore?.clearDisplayIndexes(),e.master&&e.detailNode&&e.detailNode?.clearRowTopAndRowIndex()}setDisplayIndex(e,t,s,o){const i=this.gos.get("groupAllowUnbalanced")&&e.group&&e.key==="";if(this.gos.get("groupHideOpenParents")&&e.group&&e.expanded||i?(e.setRowIndex(null),e.setRowTop(null)):(e.setRowIndex(t.value++),e.setRowTop(s.value),s.value+=e.rowHeight),e.setUiLevel(o),e.footer)return;if(e.master&&(e.expanded&&e.detailNode?(e.detailNode.setRowIndex(t.value++),e.detailNode.setRowTop(s.value),s.value+=e.detailNode.rowHeight):e.detailNode&&e.detailNode.clearRowTopAndRowIndex()),e.hasChildren()&&!!e.childStore){const a=e.childStore;e.expanded||i?a.setDisplayIndexes(t,s,i?o:o+1):a.clearDisplayIndexes()}}extractRowBounds(e,t){const s=o=>({rowHeight:o.rowHeight,rowTop:o.rowTop});if(e.rowIndex===t)return s(e);if(e.hasChildren()&&e.expanded&&e.childStore){const o=e.childStore;if(o.isDisplayIndexInStore(t))return o.getRowBounds(t)}else if(e.master&&e.expanded&&e.detailNode&&e.detailNode.rowIndex===t)return s(e.detailNode)}isPixelInNodeRange(e,t){return!j(e.rowTop)||!j(e.rowHeight)?!1:t>=e.rowTop&&t<e.rowTop+e.rowHeight}getIndexAtPixel(e,t){if(this.isPixelInNodeRange(e,t))return e.rowIndex;const s=e.master&&e.expanded,o=e.detailNode;if(s&&o&&this.isPixelInNodeRange(o,t))return o.rowIndex;if(e.hasChildren()&&e.expanded&&e.childStore){const i=e.childStore;if(i.isPixelInRange(t))return i.getRowIndexAtPixel(t)}return null}createNodeIdPrefix(e){const t=[];let s=e;for(;s&&s.level>=0;)s.key===""?t.push(nO):t.push(s.key),s=s.parent;if(t.length>0)return t.reverse().join("-")}checkOpenByDefault(e){return this.expansionSvc?.checkOpenByDefault(e)}},lO=class extends F{constructor(){super(...arguments),this.beanName="ssrmExpandListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}postConstruct(){Os(this.gos)&&this.addManagedEventListeners({rowGroupOpened:this.onRowGroupOpened.bind(this)})}onRowGroupOpened(e){const t=e.node;if(t.expanded){if(t.master)this.createDetailNode(t);else if(ke(t.childStore)){const s=this.serverSideRowModel.getParams();t.childStore=this.createBean(this.storeFactory.createStore(s,t))}}else this.gos.get("purgeClosedRowNodes")&&j(t.childStore)&&(t.childStore=this.destroyBean(t.childStore));this.eventSvc.dispatchEvent({type:"storeUpdated"})}createDetailNode(e){if(j(e.detailNode))return e.detailNode;const t=new di(this.beans);t.detail=!0,t.selectable=!1,t.parent=e,j(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1;const s=200,o=ns(this.beans,t).height;return t.rowHeight=o||s,e.detailNode=t,t}},aO=class extends F{constructor(){super(...arguments),this.beanName="ssrmFilterListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.filterManager=e.filterManager,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){Os(this.gos)&&this.addManagedEventListeners({advancedFilterEnabledChanged:()=>this.onFilterChanged(!0),filterChanged:()=>this.onFilterChanged()})}onFilterChanged(e){const t=this.serverSideRowModel.getParams();if(!t)return;const s=t.filterModel;let o,i;if(this.filterManager?.isAdvFilterEnabled()){o=this.filterManager.getAdvFilterModel();const a=e?Object.keys(s??{}):this.getAdvancedFilterColumns(s),d=this.getAdvancedFilterColumns(o);a.forEach(c=>d.add(c)),i=Array.from(d)}else if(o=this.filterManager?.getFilterModel()??{},e){const a=this.getAdvancedFilterColumns(s);Object.keys(o).forEach(d=>a.add(d)),i=Array.from(a)}else i=this.findChangedColumns(s,o);const n=this.listenerUtils.isSortingWithValueColumn(i),r=this.listenerUtils.isSortingWithSecondaryColumn(i),l={valueColChanged:n,secondaryColChanged:r,changedColumns:i};this.serverSideRowModel.refreshAfterFilter(o,l)}findChangedColumns(e,t){const s={};Object.keys(e).forEach(i=>s[i]=!0),Object.keys(t).forEach(i=>s[i]=!0);const o=[];return Object.keys(s).forEach(i=>{const n=JSON.stringify(e[i]),r=JSON.stringify(t[i]);n!=r&&o.push(i)}),o}getAdvancedFilterColumns(e){const t=new Set;if(!e)return t;const s=o=>{o.filterType==="join"?o.conditions.forEach(i=>s(i)):t.add(o.colId)};return s(e),t}},dO=class extends F{constructor(){super(...arguments),this.beanName="ssrmListenerUtils"}wireBeans(e){this.pivotResultCols=e.pivotResultCols,this.valueColsSvc=e.valueColsSvc}isSortingWithValueColumn(e){const t=(this.valueColsSvc?.columns??[]).map(s=>s.getColId());for(let s=0;s<e.length;s++)if(t.indexOf(e[s])>-1)return!0;return!1}isSortingWithSecondaryColumn(e){const t=this.pivotResultCols?.getPivotResultCols();if(!t)return!1;const s=t.list.map(o=>o.getColId());for(let o=0;o<e.length;o++)if(s.indexOf(e[o])>-1)return!0;return!1}},cO=class extends F{constructor(){super(...arguments),this.beanName="ssrmSortSvc"}wireBeans(e){this.sortSvc=e.sortSvc,this.serverSideRowModel=e.rowModel,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){Os(this.gos)&&this.addManagedEventListeners({sortChanged:this.onSortChanged.bind(this)})}onSortChanged(){const e=this.serverSideRowModel.getParams();if(!e)return;const t=this.sortSvc.getSortModel(),s=e.sortModel,o=this.findChangedColumnsInSort(t,s),i=this.listenerUtils.isSortingWithValueColumn(o),n=this.listenerUtils.isSortingWithSecondaryColumn(o),r={valueColChanged:i,secondaryColChanged:n,changedColumns:o};this.serverSideRowModel.refreshAfterSort(t,r)}findChangedColumnsInSort(e,t){let s=[];[e,t].forEach(n=>{if(n){const r=n.map(l=>l.colId);s=s.concat(r)}});const o=(n,r)=>{const l=n?n.sort:null,a=r?r.sort:null;return l!==a},i=(n,r)=>{const l=n?t.indexOf(n):-1,a=r?e.indexOf(r):-1;return l!==a};return s.filter(n=>{const r=t.find(a=>a.colId===n),l=e.find(a=>a.colId===n);return o(r,l)||i(r,l)})}},uO=class extends F{constructor(){super(...arguments),this.beanName="ssrmNodeManager",this.rowNodes=new Map}addRowNode(e){const t=e.id;this.rowNodes.has(t)&&I(187,{rowId:t,firstData:this.rowNodes.get(t).data,secondData:e.data}),this.rowNodes.set(t,e)}removeNode(e){const t=e.id;this.rowNodes.delete(t)}destroy(){this.clear(),super.destroy()}clear(){this.rowNodes.clear(),super.destroy()}},hO=class extends F{constructor(){super(...arguments),this.beanName="rowModel",this.pauseStoreUpdateListening=!1,this.started=!1,this.managingPivotResultColumns=!1,this.onRowHeightChanged_debounced=Yt(this,this.onRowHeightChanged.bind(this),100)}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.pivotResultCols=e.pivotResultCols,this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc,this.valueColsSvc=e.valueColsSvc,this.filterManager=e.filterManager,this.sortSvc=e.sortSvc,this.rowRenderer=e.rowRenderer,this.nodeManager=e.ssrmNodeManager,this.storeFactory=e.ssrmStoreFactory,this.pivotColDefSvc=e.pivotColDefSvc}ensureRowHeightsValid(){return!1}start(){this.started=!0,this.updateDatasource()}destroyDatasource(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)}postConstruct(){const e=this.resetRootStore.bind(this);this.addManagedEventListeners({newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onStoreUpdated.bind(this),columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e,columnPivotModeChanged:e}),this.addManagedPropertyListeners(["masterDetail","treeData","removePivotHeaderRowWhenSingleValueColumn","cacheBlockSize"],e),this.addManagedPropertyListener("groupAllowUnbalanced",()=>this.onStoreUpdated()),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights()),this.verifyProps(),this.addManagedPropertyListener("serverSideDatasource",()=>this.updateDatasource())}updateDatasource(){const e=this.gos.get("serverSideDatasource");e&&this.setDatasource(e)}verifyProps(){Gs(this.gos)&&!this.gos.exists("getRowId")&&I(188)}setDatasource(e){this.started&&(this.destroyDatasource(),this.datasource=e,this.resetRootStore())}applyRowData(e,t,s){const o=this.getRootStore();if(!o)return;const i=o.getChildStore(s);i&&i.applyRowData(e,t,e.rowData.length)}isLastRowIndexKnown(){const e=this.getRootStore();return e?e.isLastRowIndexKnown():!1}onColumnEverything(){if(!this.storeParams){this.resetRootStore();return}const e=this.columnsToValueObjects(this.rowGroupColsSvc?.columns),t=this.columnsToValueObjects(this.valueColsSvc?.columns),s=this.columnsToValueObjects(this.pivotColsSvc?.columns),o=d=>{const c={};d.oldCols.forEach(p=>c[p.id]=p);const u=d.newCols.every(p=>{const g=c[p.id];return g&&delete c[p.id],g&&g.field===p.field&&g.aggFunc===p.aggFunc}),h=!d.allowRemovedColumns&&!!Object.values(c).length;return u&&!h},i=!jn(this.storeParams.sortModel,this.sortSvc?.getSortModel()??[]),n=!o({oldCols:this.storeParams.rowGroupCols,newCols:e}),r=!o({oldCols:this.storeParams.pivotCols,newCols:s}),l=!!e?.length&&!o({oldCols:this.storeParams.valueCols,newCols:t,allowRemovedColumns:!0});if(i||n||r||l)this.resetRootStore();else{const d=this.createStoreParams();this.storeParams.rowGroupCols=d.rowGroupCols,this.storeParams.pivotCols=d.pivotCols,this.storeParams.valueCols=d.valueCols}}destroyRootStore(){!this.rootNode||!this.rootNode.childStore||(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())}refreshAfterSort(e,t){this.storeParams&&(this.storeParams.sortModel=e);const s=this.getRootStore();s&&(s.refreshAfterSort(t),this.onStoreUpdated())}generateSecondaryColumns(e){if(!this.pivotColDefSvc){this.gos.assertModuleRegistered("SharedPivot",2);return}const t=this.pivotColDefSvc.createColDefsFromFields(e);this.managingPivotResultColumns=!0,this.pivotResultCols?.setPivotResultCols(t,"rowModelUpdated")}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes(),t=ns(this.beans,this.rootNode);if(this.rootNode.setRowHeight(t.height,t.estimated),this.rootNode.sibling){const s=ns(this.beans,this.rootNode.sibling);this.rootNode.sibling.setRowHeight(s.height,s.estimated)}e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{const s=ns(this.beans,t);t.setRowHeight(s.height,s.estimated);const o=t.detailNode;if(o){const i=ns(this.beans,o);o.setRowHeight(i.height,i.estimated)}if(t.sibling){const i=ns(this.beans,t.sibling);o?.setRowHeight(i.height,i.estimated)}e=!0}),e}resetRootStore(){this.destroyRootStore(),this.rootNode=new di(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds()),this.managingPivotResultColumns&&(this.pivotResultCols?.setPivotResultCols(null,"api"),this.managingPivotResultColumns=!1),this.dispatchModelUpdated(!0)}columnsToValueObjects(e=[]){return e.map(t=>({id:t.getId(),aggFunc:t.getAggFunc(),displayName:this.colNames.getDisplayNameForColumn(t,"model"),field:t.getColDef().field}))}createStoreParams(){const e=this.columnsToValueObjects(this.rowGroupColsSvc?.columns),t=this.columnsToValueObjects(this.valueColsSvc?.columns),s=this.columnsToValueObjects(this.pivotColsSvc?.columns),o=$d(this.gos);return{valueCols:t,rowGroupCols:e,pivotCols:s,pivotMode:this.colModel.isPivotMode(),filterModel:this.filterManager?.isAdvFilterEnabled()?this.filterManager?.getAdvFilterModel():this.filterManager?.getFilterModel()??{},sortModel:this.sortSvc?.getSortModel()??[],datasource:this.datasource,lastAccessedSequence:{value:0},dynamicRowHeight:o}}getParams(){return this.storeParams}dispatchModelUpdated(e=!1){this.eventSvc.dispatchEvent({type:"modelUpdated",animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1})}onStoreUpdated(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())}onRowHeightChanged(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()}updateRowIndexesAndBounds(){const e=this.getRootStore();e&&e.setDisplayIndexes({value:0},{value:0},0)}retryLoads(){const e=this.getRootStore();e&&(e.retryLoads(),this.onStoreUpdated())}getRow(e){const t=this.getRootStore();if(t)return t.getRowUsingDisplayIndex(e)}setPaused(e){this.pauseStoreUpdateListening=e}expandAll(e){this.pauseStoreUpdateListening=!0,this.forEachNode(t=>{t.stub||t.hasChildren()&&t.setExpanded(e)}),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()}refreshAfterFilter(e,t){this.storeParams&&(this.storeParams.filterModel=e);const s=this.getRootStore();s&&(s.refreshAfterFilter(t),this.onStoreUpdated())}getRootStore(){return this.rootNode?.childStore}getRowCount(){const e=this.getRootStore();return e?e.getDisplayIndexEnd():0}getTopLevelRowCount(){const e=this.getRootStore();return e?e.getRowCount():1}getTopLevelRowDisplayedIndex(e){const t=this.getRootStore();return t?t.getTopLevelRowDisplayedIndex(e):e}getRowBounds(e){const t=this.getRootStore();return t?t.getRowBounds(e):{rowTop:0,rowHeight:ti(this.beans)}}getBlockStates(){const e=this.getRootStore();if(!e)return;const t={};return e.forEachStoreDeep(s=>{const o=s.getBlockStates();for(const i of Object.keys(o))t[i]=o[i]}),t}getRowIndexAtPixel(e){const t=this.getRootStore();return e<=0||!t?0:t.getRowIndexAtPixel(e)}isEmpty(){return!1}isRowsToRender(){return this.getRootStore()!=null&&this.getRowCount()>0}getType(){return"serverSide"}forEachNode(e){const t=this.getRootStore();t&&t.forEachNodeDeep(e)}forEachDisplayedNode(e){const t=(s,o)=>{s.stub||!s.displayed||e(s,o)};this.forEachNode(t)}forEachNodeAfterFilterAndSort(e,t=!1){const s=this.getRootStore();s&&s.forEachNodeDeepAfterFilterAndSort(e,void 0,t)}executeOnStore(e,t){if(!this.started)return!1;const s=this.getRootStore();if(!s)return!0;const o=s.getChildStore(e);return o&&t(o),!0}refreshStore(e={}){const t=e.route?e.route:[];this.executeOnStore(t,s=>s.refreshStore(e.purge==!0))}getStoreState(){const e=[],t=this.getRootStore();return t&&t.addStoreStates(e),e}getNodesInRangeForSelection(e,t){const s=e.rowIndex,o=t.rowIndex;if(s===null&&o===null)return[];if(o===null)return e?[e]:[];if(s===null)return[t];const i=[],[n,r]=[s,o].sort((l,a)=>l-a);return this.forEachNode(l=>{const a=l.rowIndex;a==null||l.stub||a>=n&&a<=r&&i.push(l)}),i.length!==r-n+1?null:i}getRowNode(e){let t;return this.forEachNode(s=>{s.id===e&&(t=s),s.detailNode&&s.detailNode.id===e&&(t=s.detailNode)}),t}isRowPresent(e){return!!this.getRowNode(e.id)}setRowCount(e,t){const s=this.getRootStore();s&&s.setRowCount(e,t)}destroy(){this.destroyDatasource(),this.destroyRootStore(),super.destroy()}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},pO=class extends NC{constructor(){super(...arguments),this.beanName="expansionSvc",this.queuedRowIds=new Set}wireBeans(e){this.serverSideRowModel=e.rowModel}postConstruct(){this.addManagedEventListeners({columnRowGroupChanged:()=>{this.queuedRowIds.clear()}})}checkOpenByDefault(e){if(!e.isExpandable())return;if(this.queuedRowIds.has(e.id)){this.queuedRowIds.delete(e.id),e.setExpanded(!0);return}const t=this.gos.getCallback("isServerSideGroupOpenByDefault");if(!t)return;const s={data:e.data,rowNode:e};t(s)&&e.setExpanded(!0)}expandRows(e){e.forEach(t=>{const s=this.serverSideRowModel.getRowNode(t);s?s.setExpanded(!0):this.queuedRowIds.add(t)})}expandAll(e){this.serverSideRowModel.expandAll(e)}onGroupExpandedOrCollapsed(){}dispatchExpandedEvent(e){this.eventSvc.dispatchEvent(e)}},au=class extends F{constructor(){super(...arguments),this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectAllUsed=!1,this.selectedNodes={}}getSelectedState(){return{selectAll:this.selectedState.selectAll,toggledNodes:[...this.selectedState.toggledNodes]}}setSelectedState(e){if(typeof e!="object"){ue(116);return}if(!("selectAll"in e)){ue(116);return}if(typeof e.selectAll!="boolean"){ue(117);return}if(!("toggledNodes"in e)||!Array.isArray(e.toggledNodes))return I(197);const t={selectAll:e.selectAll,toggledNodes:new Set};e.toggledNodes.forEach(o=>{typeof o=="string"?t.toggledNodes.add(o):I(196,{key:o})});const s=t.selectAll||t.toggledNodes.size>1;if(Bg(this.gos)&&!ii(this.gos)&&s){I(130);return}this.selectedState=t}deleteSelectionStateFromParent(e,t){if(this.selectedState.toggledNodes.size===0)return!1;let s=!1;return t.forEach(o=>{this.selectedState.toggledNodes.delete(o)&&(s=!0)}),s}setNodesSelected(e){const{nodes:t,clearSelection:s,newValue:o}=e;if(t.length===0)return 0;const i=s&&o;if(!ii(this.gos)||i){if(t.length>1)return ue(130),0;const r=t[0],l=r.footer?r.sibling:r;return o&&l.selectable?(this.selectedNodes={[l.id]:l},this.selectedState={selectAll:!1,toggledNodes:new Set([l.id])}):(this.selectedNodes={},this.selectedState={selectAll:!1,toggledNodes:new Set}),1}const n=(r,l=o)=>{const a=r.footer?r.sibling:r;l&&a.selectable?this.selectedNodes[a.id]=a:delete this.selectedNodes[a.id],l===this.selectedState.selectAll||!a.selectable?this.selectedState.toggledNodes.delete(a.id):this.selectedState.toggledNodes.add(a.id)};return t.forEach(r=>n(r)),1}processNewRow(e){this.selectedNodes[e.id]&&(this.selectedNodes[e.id]=e)}isNodeSelected(e){const t=this.selectedState.toggledNodes.has(e.id);return this.selectedState.selectAll?!t:t}getSelectedNodes(e=!1,t=!0){const{selectedState:{selectAll:s},selectedNodes:o,selectAllUsed:i}=this;return t&&i&&I(199),e&&s?null:Object.values(o)}getSelectedRows(){return(this.getSelectedNodes()??[]).map(e=>e.data)}getSelectionCount(){return this.selectedState.selectAll?-1:this.selectedState.toggledNodes.size}isEmpty(){return!this.selectedState.selectAll&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.reset(!0)}deselectAllRowNodes(){this.reset(!1)}reset(e){this.selectedState={selectAll:e,toggledNodes:new Set},this.selectedNodes={},this.selectAllUsed||(this.selectAllUsed=e)}getSelectAllState(){return this.selectedState.selectAll?this.selectedState.toggledNodes.size>0?null:!0:this.selectedState.toggledNodes.size>0?null:!1}},la=class extends F{constructor(){super(...arguments),this.selectedState={selectAllChildren:!1,toggledNodes:new Map}}wireBeans(e){this.rowModel=e.rowModel,this.rowGroupColsSvc=e.rowGroupColsSvc,this.filterManager=e.filterManager,this.selectionSvc=e.selectionSvc}postConstruct(){this.addManagedEventListeners({modelUpdated:()=>this.removeRedundantState(),columnRowGroupChanged:()=>this.selectionSvc.reset("rowGroupChanged")})}getSelectedState(){const{gos:e,rowGroupColsSvc:t,selectedState:s}=this,o=e.get("treeData"),i=(n,r,l)=>{const a={nodeId:l};if((o||t&&r<=t.columns.length)&&(a.selectAllChildren=n.selectAllChildren),n.toggledNodes.size){const d=[];n.toggledNodes.forEach((c,u)=>{const h=i(c,r+1,u);d.push(h)}),a.toggledNodes=d}return a};return i(s,0)}setSelectedState(e){if("selectAll"in e){ue(111);return}const t=(s,o)=>{if(typeof s!="object")throw ue(243),new Error;if("selectAllChildren"in s&&typeof s.selectAllChildren!="boolean")throw ue(244),new Error;if("toggledNodes"in s){if(!Array.isArray(s.toggledNodes))throw ue(245),new Error;if(!s.toggledNodes.every(a=>typeof a=="object"&&"nodeId"in a&&typeof a.nodeId=="string"))throw ue(246),new Error}const i=s.selectAllChildren??!o,n=s.toggledNodes?.map(l=>[l.nodeId,t(l,i)]);if(n?.some(([,l])=>i===l.selectAllChildren&&l.toggledNodes.size===0))throw ue(247),new Error;return{selectAllChildren:i,toggledNodes:new Map(n)}};try{this.selectedState=t(e,!!e.selectAllChildren)}catch{}}deleteSelectionStateFromParent(e,t){let s=this.selectedState;const o=[...e];for(;s&&o.length;)s=s.toggledNodes.get(o.pop());if(!s)return!1;let i=!1;return t.forEach(n=>{s?.toggledNodes.delete(n)&&(i=!0)}),i&&this.removeRedundantState(),i}setNodesSelected({nodes:e,newValue:t,clearSelection:s}){if(e.length===0)return 0;const o=s&&t;if(!ii(this.gos)||o){if(e.length>1)return ue(130),0;this.deselectAllRowNodes()}return e.forEach(i=>{const n=i.footer?i.sibling:i,r=this.getRouteToNode(n);this.recursivelySelectNode(r,this.selectedState,t)}),this.removeRedundantState(),1}isNodeSelected(e){const t=this.getRouteToNode(e);return this.isNodePathSelected(t,this.selectedState)}isNodePathSelected([e,...t],s){if(t.length===0){const o=s.toggledNodes.has(e.id);if(e.hasChildren()){const i=s.toggledNodes.get(e.id);if(i&&i.toggledNodes.size)return}return s.selectAllChildren?!o:o}if(s.toggledNodes.has(e.id)){const o=s.toggledNodes.get(e.id);if(o)return this.isNodePathSelected(t,o)}return s.selectAllChildren}getRouteToNode(e){const t=[];let s=e;for(;s.parent;)t.push(s),s=s.parent;return t.reverse()}removeRedundantState(){if(this.filterManager?.isAnyFilterPresent())return;const e=(t=this.selectedState,s,o)=>{if(t.toggledNodes.forEach((r,l)=>{e(r,l,t)}),s){const l=this.rowModel.getRowNode(s)?.childStore;if(l?.isLastRowIndexKnown()&&t.toggledNodes.size>=l.getRowCount()){for(const c of t.toggledNodes.entries()){const[u,h]=c;if(h.toggledNodes.size>0||!this.rowModel.getRowNode(u))return}t.selectAllChildren=!t.selectAllChildren,t.toggledNodes.clear()}}const i=t.toggledNodes.size===0,n=o?.selectAllChildren===t.selectAllChildren;i&&n&&o?.toggledNodes.delete(s)};e()}recursivelySelectNode([e,...t],s,o){if(!e)return;if(!t.length){const l=e.selectable;if(s.selectAllChildren===o||!l){s.toggledNodes.delete(e.id);return}const d={selectAllChildren:o,toggledNodes:new Map};s.toggledNodes.set(e.id,d);return}const n=s.toggledNodes.has(e.id),r=s.toggledNodes.get(e.id)??{selectAllChildren:s.selectAllChildren,toggledNodes:new Map};n||s.toggledNodes.set(e.id,r),this.recursivelySelectNode(t,r,o),s.selectAllChildren===r.selectAllChildren&&r.toggledNodes.size===0&&s.toggledNodes.delete(e.id)}getSelectedNodes(e=!1){if(I(202),this.selectedState.selectAllChildren&&e)return null;const t=[];return this.rowModel.forEachNode(s=>{s.isSelected()&&t.push(s)}),t}processNewRow(){}getSelectedRows(){return this.getSelectedNodes()?.map(e=>e.data)??[]}getSelectionCount(){return-1}isEmpty(){return!this.selectedState.selectAllChildren&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.reset(!0)}deselectAllRowNodes(){this.reset(!1)}reset(e){this.selectedState={selectAllChildren:e,toggledNodes:new Map}}getSelectAllState(){return this.selectedState.selectAllChildren?this.selectedState.toggledNodes.size>0?null:!0:this.selectedState.toggledNodes.size>0?null:!1}},gO=class extends TD{constructor(){super(...arguments),this.beanName="selectionSvc"}postConstruct(){super.postConstruct(),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{const s=Zn(this.gos),o=s&&this.selectionStrategy instanceof au?la:!s&&this.selectionStrategy instanceof la?au:void 0;o&&(this.destroyBean(this.selectionStrategy),this.selectionStrategy=this.createManagedBean(new o),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}),this.addManagedPropertyListeners(["rowSelection"],()=>{const s=xl(this.gos);s!==this.selectionMode&&(this.selectionMode=s,this.deselectAllRowNodes({source:"api"}))}),this.selectionMode=xl(this.gos);const t=Zn(this.gos)?la:au;this.selectionStrategy=this.createManagedBean(new t)}handleSelectionEvent(e,t,s){if(this.isRowSelectionBlocked(t))return 0;let o=0;const i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,s);return i==null?0:(this.selectionCtx.selectAll=!1,"select"in i?(i.reset?this.selectionStrategy.deselectAllRowNodes({source:"api"}):this.selectionStrategy.setNodesSelected({nodes:i.deselect,newValue:!1,source:s}),o=this.selectionStrategy.setNodesSelected({nodes:i.select,newValue:!0,source:s})):o=this.selectionStrategy.setNodesSelected({nodes:[i.node],newValue:i.newValue,clearSelection:i.clearSelection,event:e,source:s}),this.shotgunResetNodeSelectionState(s),this.dispatchSelectionChanged(s),o)}getSelectionState(){return this.selectionStrategy.getSelectedState()}setSelectionState(e,t){if(!Gs(this.gos)){I(132);return}Array.isArray(e)||(this.selectionStrategy.setSelectedState(e),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged(t))}setNodesSelected(e){if(!Gs(this.gos)&&e.newValue)return I(132),0;const{nodes:t,...s}=e;if(t.length>1&&this.selectionMode!=="multiRow")return I(130),0;const o={nodes:t.filter(n=>n.selectable),...s};if(!o.nodes.length)return 0;const i=this.selectionStrategy.setNodesSelected(o);return this.shotgunResetNodeSelectionState(o.source),this.dispatchSelectionChanged(o.source),i}deleteSelectionStateFromParent(e,t){this.selectionStrategy.deleteSelectionStateFromParent(e,t)&&(this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}shotgunResetNodeSelectionState(e){this.beans.rowModel.forEachNode(t=>{if(t.stub)return;const s=this.selectionStrategy.isNodeSelected(t);s!==t.isSelected()&&this.selectRowNode(t,s,void 0,e)})}getSelectedNodes(){return this.selectionStrategy.getSelectedNodes()??[]}getSelectedRows(){return this.selectionStrategy.getSelectedRows()}getSelectionCount(){return this.selectionStrategy.getSelectionCount()}syncInRowNode(e){this.selectionStrategy.processNewRow(e);const t=this.selectionStrategy.isNodeSelected(e);if(t!=!1&&!e.selectable){this.selectionStrategy.setNodesSelected({nodes:[e],newValue:!1,source:"api"}),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api");return}e.__selected=t}reset(){this.selectionStrategy.deselectAllRowNodes({source:"api"}),this.selectionCtx.reset()}isEmpty(){return this.selectionStrategy.isEmpty()}hasNodesToSelect(){return!0}selectAllRowNodes(e){if(!Gs(this.gos)){I(132);return}if(YC(e),Bg(this.gos)&&!ii(this.gos))return I(130);this.selectionStrategy.selectAllRowNodes(e),this.selectionCtx.selectAll=!0,this.beans.rowModel.forEachNode(t=>{t.stub||this.selectRowNode(t,!0,void 0,e.source)}),this.dispatchSelectionChanged(e.source)}deselectAllRowNodes(e){YC(e),this.selectionStrategy.deselectAllRowNodes(e),this.selectionCtx.selectAll=!1,this.beans.rowModel.forEachNode(t=>{t.stub||this.selectRowNode(t,!1,void 0,e.source)}),this.dispatchSelectionChanged(e.source)}getSelectAllState(e){return this.selectionStrategy.getSelectAllState(e)}getBestCostNodeSelection(){return I(194,{method:"getBestCostNodeSelection"})}updateSelectable(){if(!Gs(this.gos))return;const e=[];this.beans.rowModel.forEachNode(t=>{!this.updateRowSelectable(t,!0)&&t.isSelected()&&e.push(t)}),e.length&&this.setNodesSelected({nodes:e,newValue:!1,source:"selectableChanged"})}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.selectionStrategy instanceof la?null:this.selectionStrategy.getSelectedNodes(!0,!1),serverSideState:this.getSelectionState()})}updateSelectableAfterGrouping(){return ue(194,{method:"updateSelectableAfterGrouping"})}refreshMasterNodeState(){}setDetailSelectionState(){}};function YC({selectAll:e}){(e==="filtered"||e==="currentPage")&&I(195,{justCurrentPage:e==="currentPage"})}var fO=class extends F{constructor(){super(...arguments),this.beanName="rowChildrenSvc"}getHasChildrenValue(e){const t=this.gos.get("treeData"),s=this.gos.get("isServerSideGroup");return!e.stub&&!e.footer&&(t?!!s&&s(e.data):!!e.group)}},mO=class extends F{constructor(){super(...arguments),this.beanName="lazyBlockLoadingSvc",this.outboundRequests=0,this.cacheLoadingNodesMap=new Map,this.isCheckQueued=!1,this.nextBlockToLoad=void 0}wireBeans(e){this.rowRenderer=e.rowRenderer,this.rowModel=e.rowModel}postConstruct(){this.maxOutboundRequests=nR(this.gos)}subscribe(e){this.cacheLoadingNodesMap.set(e,new Set)}unsubscribe(e){this.cacheLoadingNodesMap.delete(e)}queueLoadCheck(){this.isCheckQueued||(this.isCheckQueued=!0,window.queueMicrotask(()=>{this.queueLoadAction(),this.isCheckQueued=!1}))}onLoadComplete(){this.outboundRequests-=1,this.queueLoadCheck()}hasAvailableLoadBandwidth(){return this.maxOutboundRequests===void 0?!0:this.outboundRequests<this.maxOutboundRequests}queueLoadAction(){const e=this.getBlockToLoad();if(!e)return;const t=this.nextBlockToLoad&&this.nextBlockToLoad.cache===e.cache&&this.nextBlockToLoad.index===e.index;if(!t&&(!this.nextBlockToLoad||!t)){this.nextBlockToLoad=e,window.clearTimeout(this.loaderTimeout);const s=Number(this.nextBlockToLoad.index),o=this.nextBlockToLoad.cache,i=e.index+e.cache.getBlockSize();this.loaderTimeout=window.setTimeout(()=>{o.isAlive()&&(this.loaderTimeout=void 0,this.attemptLoad(o,s,i),this.nextBlockToLoad=void 0)},this.gos.get("blockLoadDebounceMillis"))}}attemptLoad(e,t,s){this.hasAvailableLoadBandwidth()&&(this.executeLoad(e,t,s),this.queueLoadCheck())}executeLoad(e,t,s){const o=e.getSsrmParams(),i={startRow:t,endRow:s,rowGroupCols:o.rowGroupCols,valueCols:o.valueCols,pivotCols:o.pivotCols,pivotMode:o.pivotMode,groupKeys:e.store.getParentNode().getRoute()??[],filterModel:o.filterModel,sortModel:o.sortModel},n=this.cacheLoadingNodesMap.get(e),r=()=>{for(let u=0;u<s-t;u++)n.delete(t+u)},l=()=>{for(let u=0;u<s-t;u++)n.add(t+u)},a=u=>{this.onLoadComplete(),e.onLoadSuccess(t,s-t,u),r()},d=()=>{this.onLoadComplete(),e.onLoadFailed(t,s-t),r()},c=he(this.gos,{request:i,success:a,fail:d,parentNode:e.store.getParentNode()});l(),this.outboundRequests+=1,e.getSsrmParams().datasource?.getRows(c)}getBlockToLoad(){const e=this.rowRenderer.firstRenderedRow,t=this.rowRenderer.lastRenderedRow;for(let l=e;l<=t;l++){const a=this.rowModel.getRow(l);if(!a)continue;const d=a.parent?.childStore;if(!d)continue;const c=d.getCache(),u=c.getNodes().getBy("node",a);if(!(!u||this.cacheLoadingNodesMap.get(c)?.has(u.index))&&(a.__needsRefreshWhenVisible||a.stub&&!a.failedLoad))return{cache:c,index:c.getBlockStartIndex(u.index)}}let s=null,o=null,i=Number.MAX_SAFE_INTEGER;for(const l of this.cacheLoadingNodesMap.keys())l.getNodesToRefresh().forEach(d=>{if(d.rowIndex==null){o=d,s=l;return}const c=l.getNodes().getBy("node",d);if(!c||this.cacheLoadingNodesMap.get(l)?.has(c.index))return;const h=Math.abs(e-d.rowIndex),p=Math.abs(d.rowIndex-t);h<i&&(o=d,i=h,s=l),p<i&&(o=d,i=p,s=l)});if(!s)return;const n=s,r=n.getNodes().getBy("node",o)?.index;return r==null?void 0:{cache:n,index:n.getBlockStartIndex(r)}}isRowLoading(e,t){return this.cacheLoadingNodesMap.get(e)?.has(t)??!1}},CO=class{constructor(...e){this.indexes=e,this.maps=new Map(this.indexes.map(t=>[t,new Map]))}getSize(){return this.maps.get(this.indexes[0]).size}getBy(e,t){return this.maps.get(e).get(t)}set(e){this.indexes.forEach(t=>{this.maps.get(t).set(e[t],e)})}delete(e){this.indexes.forEach(t=>{this.maps.get(t).delete(e[t])})}clear(){this.maps.forEach(e=>e.clear())}getIterator(e){return this.maps.get(e).values()}forEach(e){const t=this.getIterator(this.indexes[0]);let s;for(;(s=t.next())&&!s.done;)e(s.value)}find(e){const t=this.getIterator(this.indexes[0]);let s;for(;(s=t.next())&&!s.done;)if(e(s.value))return s.value}filter(e){const t=this.getIterator(this.indexes[0]);let s;const o=[];for(;(s=t.next())&&!s.done;)e(s.value)&&o.push(s.value);return o}},vO=100,du=class extends F{constructor(e,t,s,o){super(),this.live=!0,this.removedNodeCache=new Map,this.store=e,this.numberOfRows=t,this.isLastRowKnown=s,this.storeParams=o}wireBeans(e){this.rowRenderer=e.rowRenderer,this.blockUtils=e.ssrmBlockUtils,this.focusSvc=e.focusSvc,this.nodeManager=e.ssrmNodeManager,this.serverSideRowModel=e.rowModel,this.rowNodeSorter=e.rowNodeSorter,this.sortSvc=e.sortSvc,this.lazyBlockLoadingSvc=e.lazyBlockLoadingSvc,this.colModel=e.colModel}postConstruct(){this.lazyBlockLoadingSvc.subscribe(this),this.nodeMap=new CO("index","id","node"),this.nodeDisplayIndexMap=new Map,this.nodesToRefresh=new Set,this.defaultNodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),this.getRowIdFunc=Xn(this.gos),this.isMasterDetail=this.gos.get("masterDetail")}destroy(){this.lazyBlockLoadingSvc.unsubscribe(this),this.numberOfRows=0,this.nodeMap.forEach(e=>this.blockUtils.destroyRowNode(e.node)),this.nodeMap.clear(),this.nodeDisplayIndexMap.clear(),this.nodesToRefresh.clear(),this.live=!1,super.destroy()}getRowByDisplayIndex(e){if(!this.store.isDisplayIndexInStore(e))return;const t=this.nodeDisplayIndexMap.get(e);if(t)return(t.stub||t.__needsRefreshWhenVisible)&&this.lazyBlockLoadingSvc.queueLoadCheck(),t;if(this.gos.get("groupHideOpenParents")||this.gos.get("groupAllowUnbalanced")){const a=this.nodeMap.find(d=>!!d.node.childStore?.isDisplayIndexInStore(e));if(a)return a.node.childStore?.getRowUsingDisplayIndex(e)}if(e===this.store.getDisplayIndexStart())return this.createStubNode(0,e);const o=this.nodeDisplayIndexMap.get(e-1);if(o){if(this.isMasterDetail&&o.master&&o.expanded)return o.detailNode;if(o.expanded&&o.childStore?.isDisplayIndexInStore(e))return o.childStore?.getRowUsingDisplayIndex(e);const a=this.nodeMap.getBy("node",o);return this.createStubNode(a.index+1,e)}const i=this.getSurroundingNodesByDisplayIndex(e);if(i==null){const a=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(a,e)}const{previousNode:n,nextNode:r}=i;if(n&&n.node.expanded&&n.node.childStore?.isDisplayIndexInStore(e))return n.node.childStore?.getRowUsingDisplayIndex(e);if(r){const a=r.node.rowIndex-e,d=r.index-a;return this.createStubNode(d,e)}const l=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(l,e)}createStubNode(e,t){const s=this.store.getRowBounds(t),o=this.createRowAtIndex(e,null,i=>{i.setRowIndex(t),i.setRowTop(s.rowTop),this.nodeDisplayIndexMap.set(t,i)});if(e===0&&this.gos.get("groupHideOpenParents")){const i=this.store.getParentNode().groupData;if(i)for(const n of Object.keys(i))FC(o,this.colModel,n,i[n])}return this.lazyBlockLoadingSvc.queueLoadCheck(),o}getRowByStoreIndex(e){return this.nodeMap.getBy("index",e)?.node}skipDisplayIndexes(e,t,s){if(e===0)return;const o=ti(this.beans);t.value+=e,s.value+=e*o}setDisplayIndexes(e,t,s){this.nodeDisplayIndexMap.clear();const o={};this.nodeMap.forEach(r=>{o[r.index]=r.node});let i=-1;for(const r of Object.keys(o)){const l=o[r],a=Number(r),d=a-1-i;this.skipDisplayIndexes(d,e,t);const c=a===0;if(l.setFirstChild(c),c&&this.gos.get("groupHideOpenParents")){const u=this.store.getParentNode().groupData;if(u)for(const h of Object.keys(u))FC(l,this.colModel,h,c?u[h]:void 0)}this.blockUtils.setDisplayIndex(l,e,t,s),l.rowIndex!=null&&this.nodeDisplayIndexMap.set(l.rowIndex,l),i=a}const n=this.numberOfRows-1-i;this.skipDisplayIndexes(n,e,t),this.purgeExcessRows()}getRowCount(){return this.numberOfRows}setRowCount(e,t){this.numberOfRows=e,t!=null&&(this.isLastRowKnown=t,t===!1&&(this.numberOfRows+=1)),this.fireStoreUpdatedEvent()}getNodes(){return this.nodeMap}getNodeCachedByDisplayIndex(e){return this.nodeDisplayIndexMap.get(e)??null}getNodesToRefresh(){return this.nodesToRefresh}getSurroundingNodesByDisplayIndex(e){let t,s;return this.nodeMap.forEach(o=>{if(e>o.node.rowIndex){(s==null||s.node.rowIndex<o.node.rowIndex)&&(s=o);return}if(t==null||t.node.rowIndex>o.node.rowIndex){t=o;return}}),!s&&!t?null:{previousNode:s,nextNode:t}}getDisplayIndexFromStoreIndex(e){const t=this.nodeMap.getBy("index",e);if(t)return t.node.rowIndex;let s,o;if(this.nodeMap.forEach(r=>{if(e>r.index){(o==null||o.index<r.index)&&(o=r);return}if(s==null||s.index>r.index){s=r;return}}),!s)return this.store.getDisplayIndexEnd()-(this.numberOfRows-e);if(!o)return this.store.getDisplayIndexStart()+e;const i=e-o.index;return(o.node.childStore?.getDisplayIndexEnd()??o.node.rowIndex)+i}createRowAtIndex(e,t,s){const o=this.nodeMap.getBy("index",e);if(o){const{node:n}=o;if(n.__needsRefreshWhenVisible=!1,this.doesNodeMatch(t,n))return this.blockUtils.updateDataIntoRowNode(n,t),this.nodesToRefresh.delete(n),n;if(this.getRowIdFunc==null&&n.hasChildren()&&n.expanded)return this.nodesToRefresh.delete(n),n;this.destroyRowAtIndex(e)}if(t&&this.getRowIdFunc!=null){const n=this.getRowId(t),r=n&&this.removedNodeCache?.get(n);if(r)return this.removedNodeCache?.delete(n),this.blockUtils.updateDataIntoRowNode(r,t),this.nodeMap.set({id:r.id,node:r,index:e}),this.nodesToRefresh.delete(r),r.__needsRefreshWhenVisible=!1,r;const l=this.nodeMap.getBy("id",n);if(l){this.nodeMap.delete(l);const{node:a,index:d}=l;return this.blockUtils.updateDataIntoRowNode(a,t),this.nodeMap.set({id:a.id,node:a,index:e}),this.nodesToRefresh.delete(a),a.__needsRefreshWhenVisible=!1,this.getBlockStartIndex(d)===this.getBlockStartIndex(e)||this.markBlockForVerify(d),a}}const i=this.blockUtils.createRowNode(this.store.getRowDetails());if(t!=null){const n=this.getPrefixedId(this.store.getIdSequence().value++);this.blockUtils.setDataIntoRowNode(i,t,n,void 0),this.serverSideRowModel.setPaused(!0),this.blockUtils.checkOpenByDefault(i),this.serverSideRowModel.setPaused(!1),this.nodeManager.addRowNode(i)}return this.nodeMap.set({id:i.id,node:i,index:e}),s&&s(i),i}getBlockStates(){const e={},t={};this.nodeMap.forEach(({node:n,index:r})=>{const l=this.getBlockStartIndex(r);!n.stub&&!n.failedLoad&&(e[l]=(e[l]??0)+1);let a="loaded";n.failedLoad?a="failed":this.lazyBlockLoadingSvc.isRowLoading(this,l)?a="loading":(this.nodesToRefresh.has(n)||n.stub)&&(a="needsLoading"),t[l]||(t[l]=new Set),t[l].add(a)});const s={loading:4,failed:3,needsLoading:2,loaded:1},o=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),i={};for(const n of Object.keys(t)){const l=[...t[n]].sort((c,u)=>(s[c]??0)-(s[u]??0))[0],a=Number(n)/this.getBlockSize(),d=o?`${o}-${a}`:String(a);i[d]={blockNumber:a,startRow:Number(n),endRow:Number(n)+this.getBlockSize(),pageStatus:l,loadedRowCount:e[n]??0}}return i}destroyRowAtIndex(e){const t=this.nodeMap.getBy("index",e);t&&(this.nodeMap.delete(t),this.nodeDisplayIndexMap.delete(t.node.rowIndex),this.nodesToRefresh.size>0?this.removedNodeCache.set(t.node.id,t.node):this.blockUtils.destroyRowNode(t.node),this.nodesToRefresh.delete(t.node))}getSsrmParams(){return this.store.getSsrmParams()}getPrefixedId(e){return this.defaultNodeIdPrefix?this.defaultNodeIdPrefix+"-"+e:e.toString()}markBlockForVerify(e){const[t,s]=this.getBlockBounds(e);this.nodeMap.filter(i=>i.index>=t&&i.index<s).forEach(({node:i})=>{i.__needsRefreshWhenVisible=!0})}doesNodeMatch(e,t){if(t.stub)return!1;const s=this.getRowId(e);return s===null?t.data===e:t.id===s}purgeStubsOutsideOfViewport(){const{firstRenderedRow:e,lastRenderedRow:t}=this.rowRenderer,s=this.getBlockStartIndex(e),[,o]=this.getBlockBounds(t);this.nodeMap.forEach(i=>{this.lazyBlockLoadingSvc.isRowLoading(this,i.index)||i.node.failedLoad||i.node.stub&&(i.index<s||i.index>o)&&this.destroyRowAtIndex(i.index)})}getBlocksDistanceFromRow(e,t){const s={};return e.forEach(({node:o,index:i})=>{const[n,r]=this.getBlockBounds(i);if(n in s)return;const l=Math.abs(o.rowIndex-t);let a;const d=this.nodeMap.getBy("index",[r-1]);d&&(a=Math.abs(d.node.rowIndex-t));const c=a==null||l<a?l:a;s[n]=c}),Object.entries(s)}purgeExcessRows(){if(this.purgeStubsOutsideOfViewport(),this.store.getDisplayIndexEnd()==null||this.storeParams.maxBlocksInCache==null)return;const{firstRenderedRow:e,lastRenderedRow:t}=this.rowRenderer,s=new Set,o=new Set;this.nodeMap.forEach(({index:p,node:g})=>{const f=this.getBlockStartIndex(p);s.add(f),g.rowIndex>=e&&g.rowIndex<=t&&o.add(f)});const i=Math.max(o.size,this.storeParams.maxBlocksInCache??0),r=s.size-i;if(r<=0)return;let l=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;o.forEach(p=>{l>p&&(l=p),a<p&&(a=p)});const d=this.nodeMap.filter(({node:p,index:g})=>{const f=this.getBlockStartIndex(g);return!(f>=l&&f<=a)&&!this.isNodeCached(p)});if(d.length===0)return;const c=e+(t-e)/2,u=this.getBlocksDistanceFromRow(d,c),h=this.getBlockSize();u.sort((p,g)=>Math.sign(g[1]-p[1]));for(let p=0;p<Math.min(r,u.length);p++){const g=Number(u[p][0]);for(let f=g;f<g+h;f++){const m=this.nodeMap.getBy("index",f);!m||this.isNodeCached(m.node)||this.destroyRowAtIndex(f)}}}isNodeFocused(e){const t=this.focusSvc.getFocusCellToUseAfterRefresh();return!t||t.rowPinned!=null?!1:t.rowIndex===e.rowIndex}isNodeCached(e){const t=this.gos.get("groupAllowUnbalanced")&&e.key==="";return e.isExpandable()&&e.expanded||this.isNodeFocused(e)||t}extractDuplicateIds(e){if(this.getRowIdFunc==null)return[];const t=new Set,s=new Set;return e.forEach(o=>{const i=this.getRowId(o);if(t.has(i)){s.add(i);return}t.add(i)}),[...s]}onLoadSuccess(e,t,s){if(!this.live)return;const o=s.groupLevelInfo;if(this.store.setStoreInfo(o),this.getRowIdFunc!=null){const r=this.extractDuplicateIds(s.rowData);if(r.length>0){const l=r.join(", ");I(205,{duplicateIdText:l}),this.onLoadFailed(e,t);return}}s.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(s.pivotResultFields);const i=this.nodesToRefresh.size>0;if(s.rowData.forEach((r,l)=>{const a=e+l,d=this.nodeMap.getBy("index",a);if(d?.node?.stub){this.createRowAtIndex(a,r);return}if(d&&this.doesNodeMatch(r,d.node)){this.blockUtils.updateDataIntoRowNode(d.node,r),this.nodesToRefresh.delete(d.node),d.node.__needsRefreshWhenVisible=!1;return}this.createRowAtIndex(a,r)}),s.rowCount!=null&&s.rowCount!==-1)this.numberOfRows=s.rowCount,this.isLastRowKnown=!0;else if(t>s.rowData.length)this.numberOfRows=e+s.rowData.length,this.isLastRowKnown=!0;else if(!this.isLastRowKnown){const r=e+s.rowData.length+1;r>this.numberOfRows&&(this.numberOfRows=r)}this.isLastRowKnown&&this.nodeMap.filter(l=>l.index>=this.numberOfRows).forEach(l=>this.destroyRowAtIndex(l.index)),this.fireStoreUpdatedEvent();const n=this.nodesToRefresh.size===0;i&&n&&this.fireRefreshFinishedEvent()}fireRefreshFinishedEvent(){this.nodesToRefresh.size===0&&(this.removedNodeCache.forEach(t=>{this.blockUtils.destroyRowNode(t)}),this.removedNodeCache=new Map,this.store.fireRefreshFinishedEvent())}isStoreFullyLoaded(){const e=this.isLastRowKnown,t=this.nodeMap.getSize()===this.numberOfRows;if(!e||!t||this.nodesToRefresh.size>0)return;let s=-1;return this.nodeMap.find(i=>(s+=1,!!(i.index!==s||i.node.__needsRefreshWhenVisible||i.node.stub)))==null}isLastRowIndexKnown(){return this.isLastRowKnown}onLoadFailed(e,t){if(!this.live)return;const s=this.nodesToRefresh.size>0;for(let i=e;i<e+t&&i<this.getRowCount();i++){let{node:n}=this.nodeMap.getBy("index",i)??{};n&&this.nodesToRefresh.delete(n),(!n||!n.stub)&&(n&&!n.stub&&this.destroyRowAtIndex(i),n=this.createRowAtIndex(i)),n.__needsRefreshWhenVisible=!1,n.failedLoad=!0}const o=this.nodesToRefresh.size===0;s&&o&&this.fireRefreshFinishedEvent(),this.fireStoreUpdatedEvent()}markNodesForRefresh(){this.nodeMap.forEach(e=>{e.node.stub&&!e.node.failedLoad||this.nodesToRefresh.add(e.node)}),this.lazyBlockLoadingSvc.queueLoadCheck(),this.isLastRowKnown&&this.numberOfRows===0&&(this.numberOfRows=1,this.isLastRowKnown=!1,this.fireStoreUpdatedEvent())}isNodeInCache(e){return!!this.nodeMap.getBy("id",e)}fireStoreUpdatedEvent(){this.live&&this.store.fireStoreUpdatedEvent()}getRowId(e){if(this.getRowIdFunc==null)return null;const{level:t}=this.store.getRowDetails(),s=this.store.getParentNode().getRoute()??[];return this.getRowIdFunc({data:e,parentKeys:s.length>0?s:void 0,level:t})}getOrderedNodeMap(){const e={};return this.nodeMap.forEach(t=>e[t.index]=t),e}clearDisplayIndexes(){this.nodeDisplayIndexMap.clear()}clientSideSortRows(){const e=this.sortSvc?.getSortOptions()??[];if(!e.some(i=>i.sort!=null)||!this.rowNodeSorter)return;const s=new Array(this.nodeMap.getSize());this.nodeMap.forEach(i=>s[i.index]=i.node),this.nodeMap.clear(),this.rowNodeSorter.doFullSort(s,e).forEach((i,n)=>{this.nodeMap.set({id:i.id,node:i,index:n})})}updateRowNodes(e){const t=[];return e.forEach(s=>{const o=this.getRowId(s),i=this.nodeMap.getBy("id",o);i&&(this.blockUtils.updateDataIntoRowNode(i.node,s),t.push(i.node))}),t}insertRowNodes(e,t){const s=this.store.getRowCount()-(this.store.getParentNode().sibling?1:0),o=t==null&&this.isLastRowKnown?s:t;if(o==null||s<o)return[];const i={};e.forEach(a=>{const d=this.getRowId(a);d&&this.isNodeInCache(d)||(i[d]=a)});const n=Object.values(i),r=n.length;if(r===0)return[];const l=this.nodeMap.filter(a=>a.index>=o);return l.forEach(a=>this.nodeMap.delete(a)),l.forEach(a=>{this.nodeMap.set({node:a.node,index:a.index+r,id:a.id})}),this.numberOfRows+=r,n.map((a,d)=>this.createRowAtIndex(o+d,a))}removeRowNodes(e){const t=[],s=[];let o=0;const i=[...e],n=this.getOrderedNodeMap();let r=-1;for(const l of Object.keys(n)){r+=1;const a=n[l],d=i.findIndex(u=>u===a.id);if(d!==-1){i.splice(d,1),this.destroyRowAtIndex(Number(l)),t.push(a.node),o+=1;continue}if(o===0)continue;const c=Number(l);r!==c&&s.push(a.node),this.nodeMap.delete(a),this.nodeMap.set({id:a.id,node:a.node,index:c-o})}return this.numberOfRows-=this.isLastRowIndexKnown()?e.length:o,i.length>0&&s.length>0&&(s.forEach(l=>l.__needsRefreshWhenVisible=!0),this.lazyBlockLoadingSvc.queueLoadCheck()),t}getBlockSize(){return this.storeParams.cacheBlockSize||vO}getBlockStartIndex(e){const t=this.getBlockSize();return e-e%t}getBlockBounds(e){const t=this.getBlockStartIndex(e),s=this.getBlockSize();return[t,t+s]}},wO=class extends F{constructor(e,t,s){super(),this.idSequence={value:0},this.ssrmParams=e,this.parentRowNode=s,this.storeParams=t,this.level=s.level+1,this.group=e.rowGroupCols?this.level<e.rowGroupCols.length:!1,this.leafGroup=e.rowGroupCols?this.level===e.rowGroupCols.length-1:!1,this.info={}}wireBeans(e){this.blockUtils=e.ssrmBlockUtils,this.storeUtils=e.ssrmStoreUtils,this.selectionSvc=e.selectionSvc,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){let e=1;if(this.level===0&&(e=this.storeUtils.getServerSideInitialRowCount()??1,this.eventSvc.dispatchEventOnce({type:"rowCountReady"})),this.cache=this.createManagedBean(new du(this,e,!1,this.storeParams)),!this.gos.get("treeData")&&this.group&&this.rowGroupColsSvc){const s=this.ssrmParams.rowGroupCols[this.level];this.groupField=s.field,this.rowGroupColumn=this.rowGroupColsSvc.columns[this.level]}}destroy(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.destroyBean(this.cache),super.destroy()}applyRowData(e,t,s){this.cache.onLoadSuccess(t,s,e)}applyTransaction(e){const t=Xn(this.gos);if(!t)return I(206),{status:Hs.Cancelled};const s=this.gos.getCallback("isApplyServerSideTransaction");if(s){const c={transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info};if(!s(c))return{status:Hs.Cancelled}}const o=this.cache.isStoreFullyLoaded();let i;e.update?.length&&(i=this.cache.updateRowNodes(e.update));let n;if(e.add?.length){let c=e.addIndex;c!=null&&c<0&&(c=void 0),n=this.cache.insertRowNodes(e.add,c)}let r;if(e.remove?.length){const c=e.remove.map(h=>t({level:this.level,parentKeys:this.parentRowNode.getRoute()??[],data:h})),u=[...new Set(c)];r=this.cache.removeRowNodes(u)}const l=this.gos.get("serverSideEnableClientSideSort"),a=i?.length||n?.length;return o&&l&&a&&this.cache.clientSideSortRows(),this.updateSelectionAfterTransaction(i,r),{status:Hs.Applied,update:i,add:n,remove:r}}updateSelectionAfterTransaction(e,t){if(!this.selectionSvc)return;const s=[];e?.forEach(o=>{o.isSelected()&&!o.selectable&&s.push(o)}),t?.forEach(o=>{o.isSelected()&&s.push(o)}),s.length&&this.selectionSvc.setNodesSelected({newValue:!1,clearSelection:!1,nodes:s,source:"rowDataChanged"})}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.cache.getNodes().forEach(e=>this.blockUtils.clearDisplayIndex(e.node)),this.parentRowNode.sibling&&this.blockUtils.clearDisplayIndex(this.parentRowNode.sibling),this.cache.clearDisplayIndexes()}getDisplayIndexStart(){return this.displayIndexStart}getDisplayIndexEnd(){return this.displayIndexEnd}getRowCount(){return this.parentRowNode.sibling?this.cache.getRowCount()+1:this.cache.getRowCount()}setRowCount(e,t){this.cache.setRowCount(e,t)}isDisplayIndexInStore(e){return this.cache.getRowCount()===0?!1:this.displayIndexStart<=e&&e<this.getDisplayIndexEnd()}setDisplayIndexes(e,t,s){this.displayIndexStart=e.value,this.topPx=t.value;const o=this.parentRowNode.level>-1&&Vi(this.gos)({node:this.parentRowNode});o||iu(this.parentRowNode),o==="top"&&(go(this.parentRowNode,this.beans),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,s)),this.cache.setDisplayIndexes(e,t,s),o==="bottom"&&(go(this.parentRowNode,this.beans),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,s)),this.displayIndexEnd=e.value,this.heightPx=t.value-this.topPx}forEachStoreDeep(e,t={value:0}){e(this,t.value++),this.cache.getNodes().forEach(s=>{const o=s.node.childStore;o&&o.forEachStoreDeep(e,t)})}forEachNodeDeep(e,t={value:0}){this.cache.getNodes().forEach(s=>{e(s.node,t.value++);const o=s.node.childStore;o&&o.forEachNodeDeep(e,t)})}forEachNodeDeepAfterFilterAndSort(e,t={value:0},s=!1){const o=this.parentRowNode.level>-1&&Vi(this.gos)({node:this.parentRowNode});o==="top"&&e(this.parentRowNode.sibling,t.value++);const i=this.cache.getOrderedNodeMap();for(const n of Object.values(i)){e(n.node,t.value++);const r=n.node.childStore;r&&r.forEachNodeDeepAfterFilterAndSort(e,t,s)}o==="bottom"&&e(this.parentRowNode.sibling,t.value++)}retryLoads(){this.cache.getNodes().forEach(({node:e})=>{e.failedLoad&&(e.failedLoad=!1,e.__needsRefreshWhenVisible=!0,e.stub=!0)}),this.forEachChildStoreShallow(e=>e.retryLoads()),this.fireStoreUpdatedEvent()}getRowUsingDisplayIndex(e){return this.parentRowNode.sibling&&e===this.parentRowNode.sibling.rowIndex?this.parentRowNode.sibling:this.cache.getRowByDisplayIndex(e)}getRowBounds(e){if(!this.isDisplayIndexInStore(e))return null;const t=this.cache.getNodeCachedByDisplayIndex(e);if(t){const l=this.blockUtils.extractRowBounds(t,e);if(l)return l}const{previousNode:s,nextNode:o}=this.cache.getSurroundingNodesByDisplayIndex(e)??{};if(s){const l=this.blockUtils.extractRowBounds(s.node,e);if(l!=null)return l}const i=ti(this.beans);if(o){const l=(o.node.rowIndex-e)*i;return{rowTop:o.node.rowTop-l,rowHeight:i}}const n=this.topPx+this.heightPx,r=(this.getDisplayIndexEnd()-e)*i;return{rowTop:n-r,rowHeight:i}}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<this.topPx)return this.getDisplayIndexStart();if(e>=this.topPx+this.heightPx)return this.getDisplayIndexEnd()-1;if(this.parentRowNode.sibling&&e>this.parentRowNode.sibling.rowTop&&e<this.parentRowNode.sibling.rowTop+this.parentRowNode.sibling.rowHeight)return this.parentRowNode.sibling.rowIndex;let t=Number.MAX_SAFE_INTEGER,s=null,o=Number.MAX_SAFE_INTEGER,i=null;if(this.cache.getNodes().forEach(({node:a})=>{const d=Math.abs(e-a.rowTop);if(a.rowTop<e){d<t&&(t=d,s=a);return}d<o&&(o=d,i=a)}),s=s,i=i,s){const a=this.blockUtils.getIndexAtPixel(s,e);if(a!=null)return a}const n=ti(this.beans);if(i){const a=i.rowTop,d=Math.ceil((a-e)/n);return i.rowIndex-d}const r=this.topPx+this.heightPx,l=Math.floor((r-e)/n);return this.getDisplayIndexEnd()-l}getChildStore(e){return this.storeUtils.getChildStore(e,this,t=>{const s=this.cache.getNodes().find(o=>o.node.key==t);return s?s.node:null})}forEachChildStoreShallow(e){this.cache.getNodes().forEach(({node:t})=>{t.childStore&&e(t.childStore)})}refreshAfterSort(e){if(this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){const s=this.cache.isStoreFullyLoaded(),o=this.gos.get("serverSideEnableClientSideSort");if(!(s&&o)){const n=this.cache.getRowCount(),r=this.cache.isLastRowIndexKnown();this.destroyBean(this.cache),this.cache=this.createManagedBean(new du(this,n,r,this.storeParams));return}this.cache.clientSideSortRows()}this.forEachChildStoreShallow(s=>s.refreshAfterSort(e))}refreshAfterFilter(e){if(!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){this.refreshStore(!0);return}this.forEachChildStoreShallow(s=>s.refreshAfterFilter(e))}refreshStore(e){if(e){this.destroyBean(this.cache),this.cache=this.createManagedBean(new du(this,1,!1,this.storeParams)),this.fireStoreUpdatedEvent();return}this.cache.markNodesForRefresh()}getTopLevelRowDisplayedIndex(e){return this.cache.getDisplayIndexFromStoreIndex(e)??e}isLastRowIndexKnown(){return this.cache.isLastRowIndexKnown()}getRowNodesInRange(e,t){return this.cache.getNodes().filter(({node:s})=>s.rowIndex>=e.rowIndex&&s.rowIndex<=t.rowIndex).map(({node:s})=>s)}addStoreStates(e){e.push({route:this.parentRowNode.getRoute()??[],rowCount:this.getRowCount(),lastRowIndexKnown:this.isLastRowIndexKnown(),info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow(t=>t.addStoreStates(e))}getIdSequence(){return this.idSequence}getParentNode(){return this.parentRowNode}getRowDetails(){return{field:this.groupField,group:this.group,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn}}getSsrmParams(){return this.ssrmParams}setStoreInfo(e){e&&Object.assign(this.info,e)}fireStoreUpdatedEvent(){this.eventSvc.dispatchEvent({type:"storeUpdated"})}fireRefreshFinishedEvent(){this.eventSvc.dispatchEvent({type:"storeRefreshed",route:this.parentRowNode.getRoute()})}getBlockStates(){return this.cache.getBlockStates()}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}getCache(){return this.cache}},yO=class extends F{constructor(){super(...arguments),this.beanName="ssrmStoreFactory"}wireBeans(e){this.colModel=e.colModel,this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc,this.rowAutoHeight=e.rowAutoHeight}createStore(e,t){const s=this.getStoreParams(e,t);return new wO(e,s,t)}getStoreParams(e,t){const s=this.getLevelSpecificParams(t),o=this.getBlockSize(s),i=this.getMaxBlocksInCache(e,s);return{cacheBlockSize:o,maxBlocksInCache:i}}getMaxBlocksInCache(e,t){const s=t&&t.maxBlocksInCache!=null?t.maxBlocksInCache:this.gos.get("maxBlocksInCache");if(s!=null&&s>=0){if(e.dynamicRowHeight){I(203);return}if(this.rowAutoHeight?.active){I(204);return}return s}}getBlockSize(e){const t=e&&e.cacheBlockSize!=null?e.cacheBlockSize:this.gos.get("cacheBlockSize");return t!=null&&t>0?t:100}getLevelSpecificParams(e){const t=this.gos.getCallback("getServerSideGroupLevelParams");if(!t)return;const s={level:e.level+1,parentRowNode:e.level>=0?e:void 0,rowGroupColumns:this.rowGroupColsSvc?.columns??[],pivotColumns:this.pivotColsSvc?.columns??[],pivotMode:this.colModel.isPivotMode()};return t(s)}},bO=class extends F{constructor(){super(...arguments),this.beanName="ssrmStoreUtils"}wireBeans(e){this.colModel=e.colModel,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}getChildStore(e,t,s){if(!e?.length)return t;const o=e[0],i=s(o);if(i){if(e.length===1&&!i.childStore){const l=this.serverSideRowModel.getParams();i.childStore=this.createBean(this.storeFactory.createStore(l,i))}const n=e.slice(1,e.length),r=i.childStore;return r?r.getChildStore(n):null}return null}isServerRefreshNeeded(e,t,s){if(s.valueColChanged||s.secondaryColChanged)return!0;const o=e.level+1;if(!(o<t.length))return!0;const r=t[o].id;return s.changedColumns.indexOf(r)>-1?!0:this.colModel.getCols().filter(c=>c.getColDef().showRowGroup&&s.changedColumns.includes(c.getId())).map(c=>c.getColDef().showRowGroup).some(c=>c===!0||c===r)}getServerSideInitialRowCount(){return this.gos.get("serverSideInitialRowCount")}isServerSideSortAllLevels(){return this.gos.get("serverSideSortAllLevels")&&Os(this.gos)}isServerSideOnlyRefreshFilteredGroups(){return this.gos.get("serverSideOnlyRefreshFilteredGroups")&&Os(this.gos)}},SO=class extends F{constructor(){super(...arguments),this.beanName="ssrmTxnManager",this.asyncTransactions=[]}wireBeans(e){this.valueCache=e.valueCache,this.serverSideRowModel=e.rowModel,this.selectionSvc=e.selectionSvc}postConstruct(){Os(this.gos)}applyTransactionAsync(e,t){this.asyncTransactionsTimeout==null&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:e,callback:t})}scheduleExecuteAsync(){const e=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimeout=window.setTimeout(()=>{this.executeAsyncTransactions()},e)}executeAsyncTransactions(){if(!this.asyncTransactions)return;const e=[],t=[],s=[];let o=!1;this.asyncTransactions.forEach(i=>{let n;if(this.serverSideRowModel.executeOnStore(i.transaction.route,a=>{n=a.applyTransaction(i.transaction)})?n==null&&(n={status:Hs.StoreNotFound}):n={status:Hs.StoreNotStarted},t.push(n),n.status==Hs.StoreLoading){s.push(i);return}i.callback&&e.push(()=>i.callback(n)),n.status===Hs.Applied&&(o=!0)}),e.length>0&&window.setTimeout(()=>{e.forEach(i=>i())},0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=s,o&&(this.valueCache?.onDataChanged(),this.eventSvc.dispatchEvent({type:"storeUpdated"})),t.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:t})}flushAsyncTransactions(){this.asyncTransactionsTimeout!=null&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()}applyTransaction(e){let t;if(this.serverSideRowModel.executeOnStore(e.route,o=>{t=o.applyTransaction(e)}))if(t){if(this.valueCache?.onDataChanged(),t.remove&&this.selectionSvc){const o=t.remove.map(i=>i.id);this.selectionSvc.deleteSelectionStateFromParent(e.route||[],o)}return this.eventSvc.dispatchEvent({type:"storeUpdated"}),t}else return{status:Hs.StoreNotFound};else return{status:Hs.StoreNotStarted}}},RO={moduleName:"ServerSideRowModel",version:lt,rowModels:["serverSide"],beans:[hO,lO,bO,rO,uO,SO,aO,yO,dO,gO,mO,fO,pO,cO],dependsOn:[Rs,Yc,RI,oO,iO,Bk,Hk]},xO=["number","category","grouped-category","log","time"];xO.reduce((e,t)=>({...e,[t]:{title:{_enabledFromTheme:!0}}}),{});function qC(e){return e.map((t,s,o)=>t.map((i,n)=>o.slice(0,s+1).reduce((r,l)=>r+l[n],0)))}function XC(e){const t=e.map((s,o)=>e.reduce((i,n)=>Math.max(i,n[o]),0));return e.map(s=>s.map((o,i)=>o/t[i]*19))}var QC=[[1,3,5],[2,6,4],[5,3,1]],FO=qC(QC);XC(FO);var DO=QC,EO=qC(DO);XC(EO);const MO={class:"pv-flex",style:{"--flex-wrap":"nowrap"}},AO=["id"],PO={class:"pv-flex"},IO={key:1,style:{"padding-left":"16px"}},TO=["checked","disabled","onChange"],LO={key:2},kO={key:1,class:"pv-inset-block-8",id:"divider"},ZC=2,OO=st({__name:"GroupBySelector",setup(e){const t=je("gridApi"),s=je("availableRowGroupColumns"),o=je("rowGroupColumnFields");St(o,()=>{},{deep:!0});const i=p=>o.value.includes(p||""),n=(p,g)=>{g?t.value.addRowGroupColumns([p]):t.value.removeRowGroupColumns([p])},r=ge(()=>({"pv-hide":s.value.length===0})),l=ge(()=>o.value.length>=ZC),a=ge(()=>o.value.map(p=>s.value.find(g=>g.field===p)).filter(p=>p!==void 0)),d=ge(()=>s.value.filter(p=>!o.value.includes(p.field))),c=ge(()=>{const p={label:"",value:"divider"},g=a.value.map(m=>({label:m.headerName,value:m.field})),f=d.value.map(m=>({label:m.headerName,value:m.field}));return[...g,p,...f]}),u=p=>`group-by-list-item-${p}`,h=p=>{const g=p.findIndex(v=>v==="divider"),m=p.slice(0,g).slice(0,ZC).map(v=>v.replace("group-by-list-item-",""));t.value.setRowGroupColumns(m)};return(p,g)=>(K(),ot(Vn,{isList:!0,isSortable:!0,popoverCssProperties:{width:"auto"},alignment:"right",class:as(r.value),onListOrderUpdated:h},{trigger:yt(()=>[q("div",MO,[g[0]||(g[0]=q("p",{class:"pv-truncate"},"Group by",-1)),Ae(o).length>0?(K(),ot(Ae(An),{key:0,label:`${Ae(o).length}`},null,8,["label"])):at("",!0)])]),default:yt(()=>[(K(!0),J(Le,null,As(c.value,(f,m)=>(K(),J(Le,{key:f.value},[f.value!=="divider"?(K(),J("li",{key:0,id:u(f.value)},[q("label",PO,[i(f.value)?(K(),ot(It,{key:0,name:"reorder",style:{color:"#B8C1C4"}})):(K(),J("span",IO)),q("input",{type:"checkbox",class:"pv-checkbox",checked:i(f.value),disabled:!i(f.value)&&l.value,onChange:v=>n(f.value,v.target.checked)},null,40,TO),q("span",null,qe(f.label),1),i(f.value)?(K(),J("sup",LO,qe(m+1),1)):at("",!0)])],8,AO)):(K(),J("li",kO,g[1]||(g[1]=[q("hr",null,null,-1)])))],64))),128))]),_:1},8,["class"]))}}),GO={},NO={class:"ag-custom-loading-cell pv-shimmer"};function _O(e,t){return K(),J("div",NO)}const BO=bo(GO,[["render",_O]]),HO={key:0},VO={class:"pv-text-body-xxs pv-text-subdued"},WO={class:"pv-flex pv-space-between",style:{"line-height":"20px"}},zO={class:"pv-text-title-xs"},UO={key:0,class:"pv-text-subdued pv-text-body-xxs",style:{"padding-right":"12px"}},$O=st({__name:"GroupedCellRenderer",props:{params:{type:Object}},setup(e){const t=e,s=je("rowGroupColumnFields"),o=je("groupColumnCellValueColumn"),i=je("expandedRows"),n=ge(()=>!t.params.displayBaseAggregationsOnly||l.value.level===s.value.length-1),r=ge(()=>t.params.rowNode.group),l=Fp(t.params,"rowNode"),a=ge(()=>{if(!o.value)return"";const u=o.value.getColId()||"",h=l.value;return u&&h&&h.data&&u in h.data&&h.data[u]||""}),d=ge(()=>l.value.allChildrenCount||0),c=u=>{const h=u.node.expanded,p=u.node.rowIndex;p!=null&&(i.value[p]=h)};return to(()=>{const u=l.value,h=u.rowIndex,p=u.expanded;h!=null&&(i.value[h]=p),l.value.addEventListener("expandedChanged",c)}),ch(()=>{const u=l.value;l.value.removeEventListener("expandedChanged",c);const h=u.rowIndex;h!=null&&(i.value[h]=!1)}),(u,h)=>(K(),J(Le,null,[r.value?(K(),J("div",HO,[q("p",VO,qe(Ae(l).rowGroupColumn?.getColDef().headerName),1),q("div",WO,[q("p",zO,qe(Ae(l).key),1),n.value&&d.value>0?(K(),J("p",UO," Count "+qe(d.value),1)):at("",!0)])])):at("",!0),q("div",null,[q("p",null,qe(a.value),1)])],64))}});function JC(e){const t=e.filter(o=>o!=null&&!isNaN(o)).sort((o,i)=>o-i),s=t.length;return s===0?null:t[Math.floor(s/2)]}const jO={style:{"line-height":"20px"}},KO={class:"pv-text-subdued pv-text-body-xxs pv-relative"},YO=st({__name:"GroupAggCellRenderer",props:{params:{type:Object}},setup(e){const t=e,s=je("expandedRows"),o=ge(()=>(t.params.column?.getAggFunc()||"agg").toLowerCase()),i=()=>{const a=t.params.api;if(a){const d=!r.value;a.setRowNodeExpanded(t.params.node,d),n.value&&(s.value[n.value]=d)}},n=ge(()=>t.params.node?.rowIndex),r=ge(()=>{let a=!1;return n.value!=null&&(a=n.value in s.value?s.value[n.value]:!1),a}),l=ge(()=>r.value?"chevron-down":"chevron-right");return to(()=>{t.params.node.expanded&&n.value&&(s.value[n.value]=!0)}),(a,d)=>(K(),J("div",{class:"pv-flex",ondblclick:i},[q("div",jO,[q("p",null,qe(a.params.valueFormatted),1),q("p",KO,qe(o.value),1)]),Pe(Ko,{variant:"icon",onClick:i},{default:yt(()=>[Pe(It,{name:l.value},null,8,["name"])]),_:1})]))}}),qO={class:"pv-flex",style:{"--flex-wrap":"nowrap"}},XO={class:"pv-truncate"},QO={class:"pv-flex"},ZO=["value","checked","disabled","onChange"],JO={style:{"padding-left":"4px"}},eG={key:1,class:"pv-full-width pv-inset-block-24"},tG={class:"pv-details",open:""},sG={class:"pv-text-title-sm pv-stack-8"},oG={role:"list",class:"pv-flex pv-stack-8",style:{"--flex-wrap":"wrap"}},iG={class:"pv-flex"},nG=["value"],rG={style:{"padding-left":"4px"}},lG={role:"list",class:"pv-flex pv-stack-8",style:{"--flex-wrap":"wrap"}},aG=["onClick"],dG={class:"pv-text-body-xxs"},cG={key:0},ev=4,tv=st({__name:"SetFilter",props:{filterColDef:{type:Object},filterStyle:{default:"horizontal",type:String}},emits:["filter-selection-changed"],setup(e,{emit:t}){const s=e,o=t,i=je("gridApi"),n=je("filterModel"),r=je("firstDataRendered"),l=je("filterValuesSetTrigger"),a=me([]),d=me([]),c=ge(()=>s.filterColDef.field||""),u=ge(()=>s.filterColDef.headerName||""),h=async()=>{p(),await g()},p=()=>{const w=[];if(n.value&&n.value[c.value]?.values){const b=n.value[c.value].values||[];w.push(...b)}a.value=w},g=async()=>{const w=await i.value.getColumnFilterInstance(c.value),b=new Set(w.getFilterValues());a.value.forEach(x=>{b.add(x)}),d.value=f(Array.from(b))},f=w=>w.sort((b,x)=>{const A=a.value.includes(b),H=a.value.includes(x);return A&&!H?-1:!A&&H?1:0}),m=ge(()=>d.value.filter(b=>!a.value.includes(b)));St(()=>l.value,()=>{g()}),St(()=>n.value,()=>{p()}),St(()=>r.value,()=>{p()}),St(()=>a.value,w=>{if(s.filterStyle==="horizontal")return;const b=w.length>0?w:null;i.value.setColumnFilterModel(c.value,{values:b})});const v=w=>{w&&!a.value.includes(w)&&(a.value=[...a.value,w]),o("filter-selection-changed")},y=w=>{a.value=a.value.filter(b=>b!==w),o("filter-selection-changed")},R=(w,b)=>{w.target.checked?v(b):y(b);const A=a.value.length>0?a.value:null;i.value.setColumnFilterModel(c.value,{values:A}).then(()=>{i.value.onFilterChanged()})};return to(()=>{h()}),(w,b)=>w.filterStyle==="horizontal"?(K(),ot(Vn,{key:0,isList:!0,popoverCssProperties:{width:"auto"},onDropdownOpen:g,onDropdownClosed:b[0]||(b[0]=x=>d.value=f(d.value))},{trigger:yt(()=>[q("div",qO,[a.value.length>0?(K(),ot(Ae(An),{key:0,label:`${a.value.length}`},null,8,["label"])):at("",!0),q("p",XO,qe(u.value),1)])]),default:yt(()=>[(K(!0),J(Le,null,As(d.value,x=>(K(),J("li",{key:x},[q("label",QO,[q("input",{type:"checkbox",class:"pv-checkbox",value:x,checked:a.value.includes(x)||d.value.length===1,disabled:d.value.length===1,onChange:A=>R(A,x)},null,40,ZO),q("span",JO,qe(x),1)])]))),128))]),_:1})):(K(),J("div",eG,[q("details",tG,[q("summary",sG,qe(u.value),1),q("div",null,[q("ul",oG,[(K(!0),J(Le,null,As(a.value,x=>(K(),J("li",{key:`${u.value}-${x}`},[Pe(xp,{label:x||"",removable:!0,onRemoveTag:A=>y(x)},null,8,["label","onRemoveTag"])]))),128)),Pe(Vn,{isList:!0,icon:"add-circle",onDropdownOpen:g,onDropdownClosed:b[3]||(b[3]=x=>d.value=f(d.value))},{default:yt(()=>[(K(!0),J(Le,null,As(d.value,x=>(K(),J("li",{key:x},[q("label",iG,[nh(q("input",{type:"checkbox",class:"pv-checkbox",value:x,"onUpdate:modelValue":b[1]||(b[1]=A=>a.value=A),onClick:b[2]||(b[2]=A=>o("filter-selection-changed"))},null,8,nG),[[rb,a.value]]),q("span",rG,qe(x),1)])]))),128))]),_:1})]),q("ul",lG,[(K(!0),J(Le,null,As(m.value.slice(0,ev),(x,A)=>(K(),J("li",{key:`${u.value}-${x}-suggest`},[q("a",{role:"button",style:{cursor:"pointer"},onClick:H=>v(x)},[q("span",dG,qe(x),1),A!==Math.min(ev-1,m.value.length-1)?(K(),J("span",cG,",")):at("",!0)],8,aG)]))),128))])])])]))}}),uG={class:"pv-flex"},hG={class:"pv-flex-vertical pv-space-between",style:{width:"100%",height:"100%"}},pG={class:"pv-flex pv-inset-squish pv-full-width pv-space-between"},gG={class:"pv-text-title-sm"},fG={class:"pv-full-width pv-inset-inline-24"},mG={class:"pv-sticky pv-border-top pv-full-width pv-inset-squish pv-flex pv-space-between pv-surface",style:{"--top":"unset",bottom:"0"}},CG={class:"pv-flex"},aa=5,vG=st({__name:"FilterPanel",props:{enableVerticalPanel:{type:Boolean,default:!0}},setup(e){const t=je("gridApi"),s=je("filterModel"),o=je("availableFilterColumns"),i=je("currentlyActiveFilter"),n=je("rowGroupColumnFields"),r=me(null),l=me(null),a=me([]),d=ge(()=>{const w=o.value.map(b=>b.field);return s.value?w.filter(b=>s.value[b]):[]}),c=ge(()=>{const w=[...d.value,...n.value];return i.value&&w.push(i.value.field),w.filter((b,x)=>w.indexOf(b)===x)}),u=w=>{let b=a.value.filter(x=>w.includes(x.field));if(aa-b.length>0){const x=w.filter(A=>!a.value.some(H=>H.field===A)).map(A=>o.value.find(H=>H.field===A)).filter(A=>A!==void 0);b.push(...x)}if(aa-b.length>0){const x=o.value.filter(A=>!b.some(H=>H.field===A.field));b.push(...x)}b=b.slice(0,aa),a.value=b};St(c,w=>{u(w)}),to(()=>{u(c.value)});const h=ge(()=>d.value.every(w=>c.value.includes(w))),p=ge(()=>o.value.length-aa),g=me(!1),f=()=>{g.value=!0},m=()=>{g.value=!1,l.value=t.value.getFilterModel(),r.value?.showModal()},v=()=>{l.value=null,t.value.setFilterModel(null)},y=()=>{l.value&&t.value.setFilterModel(l.value),l.value=null,r.value?.close()},R=()=>{t.value.onFilterChanged(),r.value?.close()};return(w,b)=>(K(),J("div",uG,[(K(!0),J(Le,null,As(a.value,x=>(K(),J(Le,{key:x.field},[Ae(t)?(K(),ot(tv,{key:0,filterColDef:x,"data-horizontal-filter-field":x.field},null,8,["filterColDef","data-horizontal-filter-field"])):at("",!0)],64))),128)),w.enableVerticalPanel?(K(),J("button",{key:0,class:"pv-button-ghost",onClick:m},[Pe(Ae(It),{name:"filter"}),b[5]||(b[5]=jo(" All Filters")),Pe(Ae(An),{label:`+${p.value}`,variant:h.value?"secondary":"primary"},null,8,["label","variant"])])):at("",!0),w.enableVerticalPanel?(K(),J("dialog",{key:1,ref_key:"filterDrawer",ref:r,id:"filter-vertical-drawer",class:"pv-drawer pv-surface",onClick:b[4]||(b[4]=yp(x=>y(),["self"])),style:{"max-width":"450px"}},[q("div",hG,[q("div",pG,[q("p",gG," All Filters ("+qe(Ae(o).length)+") ",1),q("button",{class:"pv-button-ghost",onClick:b[0]||(b[0]=x=>y())},[Pe(Ae(It),{name:"close"})])]),q("div",fG,[(K(!0),J(Le,null,As(Ae(o),(x,A)=>(K(),J("div",{key:x.field,class:as({"pv-border-bottom":A<Ae(o).length-1})},[Ae(t)?(K(),ot(tv,{key:0,"filter-style":"vertical",filterColDef:x,onFilterSelectionChanged:f},null,8,["filterColDef"])):at("",!0)],2))),128))]),q("div",mG,[q("button",{class:"pv-button-ghost",onClick:b[1]||(b[1]=x=>v())}," Clear All "),q("div",CG,[Pe(Ko,{variant:"ghost",onClick:b[2]||(b[2]=x=>y())},{default:yt(()=>b[6]||(b[6]=[jo(" Cancel ")])),_:1}),g.value?(K(),ot(Ko,{key:0,variant:"primary",onClick:b[3]||(b[3]=x=>R())},{default:yt(()=>b[7]||(b[7]=[jo(" Apply ")])),_:1})):(K(),ot(Ko,{key:1,variant:"primary",disabled:""},{default:yt(()=>b[8]||(b[8]=[jo(" No Changes ")])),_:1}))])])])],512)):at("",!0)]))}});function sv(e){return Math.floor(e).toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2})}function ov(e){const t=e.value?.value!=null?e.value.value:e.value;return t==null||t===""?"":t}function wG(e){const t=ov(e);return t===""?"":"$"+sv(t)}function yG(e){return ov(e)===""?"":sv(e.value)+"%"}const bG={class:"pv-flex"},SG={class:"pv-flex ag-header-actions"},RG=bo(st({__name:"HeaderCellRenderer",props:{params:{type:Object}},setup(e,{expose:t}){const s=e,o=me(!1),i=me(!1),n=me(null),r=me(null),l=me(null),a=me(!1),d=me(null),c=ge(()=>d.value==="asc"?"arrow-up":d.value==="desc"?"arrow-down":""),u=ge(()=>i.value?{cursor:"pointer"}:{}),h=ge(()=>a.value?{opacity:1}:{}),p=w=>{const b="fonts";if(!w)return b;switch(w){case ft.String:return"fonts";case ft.Number:return"hash";case ft.Boolean:return"list";case ft.Date:return"calendar";case ft.Currency:return"currency-dollar";case ft.Formula:return"formula";case ft.Select:return"list";case ft.Percent:return"percent";case ft.Entity:return"building";case ft.Id:return"id-2";case ft.Link:return"link";case ft.User:return"user";case ft.Status:return"list";case ft.Tag:return"list";case ft.None:return null;default:return b}},g=()=>{console.log("menu closed"),a.value=!1},f=()=>{a.value=!0,l.value&&s.params.showColumnMenu(l.value,g)},m=w=>{o.value=w.enableFilterButton,i.value=w.enableSorting||!1,n.value=w.displayName,w.column.getColId()!="ag-Grid-AutoColumn"&&(r.value=p(w.column.getColDef().context?.dataType))},v=w=>{w.column.getSort()!==void 0&&(d.value=w.column.getSort())},y=()=>{i.value&&s.params.progressSort(!1)};ka(()=>{m(s.params)}),to(()=>{s.params.column.addEventListener("sortChanged",v)}),Wr(()=>{s.params.column.removeEventListener("sortChanged",v)});function R(w){return m(w),!0}return t({refresh:R}),(w,b)=>(K(),J("div",{class:"ag-custom-header-cell pv-flex pv-full-width pv-space-between",style:_o(u.value),onClick:y},[q("div",bG,[r.value?(K(),ot(It,{key:0,name:r.value,style:{color:"#B8C1C4"}},null,8,["name"])):at("",!0),q("p",null,qe(n.value),1),i.value&&c.value!==""?(K(),ot(It,{key:1,name:c.value},null,8,["name"])):at("",!0)]),q("div",SG,[q("div",{ref_key:"menuButton",ref:l,class:"ag-header-cell-menu-button",style:_o(h.value)},[Pe(Ko,{variant:"icon",onClick:yp(f,["stop","prevent"])},{default:yt(()=>[Pe(It,{name:"menu"})]),_:1})],4)])],4))}}),[["styles",[".ag-custom-header-cell[data-v-547fa808]{height:100%;align-items:center}.ag-header-actions .ag-header-cell-menu-button[data-v-547fa808]{opacity:0;transition:opacity .2s ease-in-out}.ag-header-cell-menu-button:hover .ag-header-actions .ag-header-cell-menu-button[data-v-547fa808]{opacity:1}.ag-header-cell-menu-button:focus .ag-header-actions .ag-header-cell-menu-button[data-v-547fa808]{opacity:1}"]],["__scopeId","data-v-547fa808"]]),xG={class:"pv-flex",style:{"--flex-wrap":"nowrap"}},FG=["id"],DG={class:"pv-flex pv-space-between pv-inset-block-8"},EG={class:"pv-flex"},MG={class:"pv-truncate"},AG={key:1,class:"pv-inset-block-8",id:"divider"},PG=100,IG=st({__name:"ColumnVisibilitySelector",setup(e){const t=je("gridApi"),s=je("columnDisplayOrder"),o=ge(()=>s.value?.filter(c=>c.isVisible()&&!c.getColId().includes("ag-Grid-AutoColumn"))||[]),i=ge(()=>s.value?.filter(c=>!c.isVisible())||[]),n=ge(()=>{const c={label:"",value:"divider"},u=o.value.map(p=>({label:p.getColDef().headerName,value:p.getColId()})),h=i.value.map(p=>({label:p.getColDef().headerName,value:p.getColId()}));return[...u,c,...h]}),r=c=>o.value.some(u=>u.getColId()===c),l=c=>{t.value.setColumnsVisible([c],!r(c)),s.value=t.value.getAllGridColumns()},a=c=>`column-visibility-list-item-${c}`,d=c=>{const u=c.findIndex(m=>m==="divider"),h=c.slice(0,u).slice(0,PG),p=c.slice(u+1),g=h.map(m=>m.replace("column-visibility-list-item-","")),f=p.map(m=>m.replace("column-visibility-list-item-",""));t.value.setColumnsVisible(g,!0),t.value.setColumnsVisible(f,!1)};return(c,u)=>Ae(s)?(K(),ot(Vn,{key:0,isList:!0,isSortable:!0,popoverCssProperties:{width:"auto"},onListOrderUpdated:d},{trigger:yt(()=>[q("div",xG,[Pe(Ae(An),{label:`${i.value.length}`,variant:"ghost"},null,8,["label"]),u[0]||(u[0]=q("p",{class:"pv-truncate"},"Hidden Columns",-1))])]),default:yt(()=>[(K(!0),J(Le,null,As(n.value,h=>(K(),J(Le,{key:h.value},[h.value!=="divider"?(K(),J("li",{key:0,id:a(h.value)},[q("div",DG,[q("div",EG,[Pe(It,{name:"reorder",style:{color:"#B8C1C4"}}),q("span",MG,qe(h.label),1)]),Pe(Ko,{variant:"icon",onClick:p=>l(h.value)},{default:yt(()=>[Pe(It,{name:r(h.value)?"show":"hide"},null,8,["name"])]),_:2},1032,["onClick"])])],8,FG)):(K(),J("li",AG,u[1]||(u[1]=[q("hr",null,null,-1)])))],64))),128))]),_:1})):at("",!0)}}),TG=_m.withParams({headerHeight:"30px",headerBackgroundColor:"white",headerCellHoverBackgroundColor:"rgba(33,150,243,0.18)",headerColumnResizeHandleHeight:"50%",headerColumnResizeHandleWidth:"3px",headerColumnBorder:"none",headerFontWeight:"bold",headerFontSize:"14px",fontFamily:"Inter, sans-serif",fontSize:14,headerRowBorder:!0}),LG={class:"pv-stack-8"},kG={class:"pv-flex pv-space-between"},OG={class:"pv-flex"};var ft=(e=>(e.String="string",e.Number="number",e.Boolean="boolean",e.Date="date",e.Currency="currency",e.Formula="formula",e.Select="select",e.Percent="percent",e.Entity="entity",e.Id="id",e.User="user",e.Link="link",e.Status="status",e.Tag="tag",e.None="none",e))(ft||{});const GG=Object.freeze(Object.defineProperty({__proto__:null,PvBadge:An,PvButton:Ko,PvChip:xp,PvDataTable:bo(st({__name:"PvDataTable",props:{colDefs:{type:Array},rowData:{type:Array},serverSideRowHandler:{type:Function},filterValuesSetHandler:{type:Function},initialGridState:{type:Object},theme:{default:()=>TG,type:null},displayBaseAggregationsOnly:{type:Boolean,default:!1},enableVerticalFilterPanel:{type:Boolean,default:!0},storeChartData:{type:Boolean,default:!1},containerHeight:{default:500,type:Number},containerMinHeight:{default:200,type:Number},devMode:{type:Boolean,default:!1},debugMode:{type:Boolean,default:!1}},emits:["column-moved","column-resized","column-row-group-changed","grid-ready","filter-changed","filter-opened","first-data-rendered"],setup(e,{emit:t}){const s=[jI,$I,AM,ML,ZI,RO,zL,kk,dT];mC.setLicenseKey("Using_this_{AG_Grid}_Enterprise_key_{AG-065231}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Turquoise_Health}_is_granted_a_{Multiple_Applications}_Developer_License_for_{3}_Front-End_JavaScript_developers___All_Front-End_JavaScript_developers_need_to_be_licensed_in_addition_to_the_ones_working_with_{AG_Grid}_Enterprise___This_key_has_been_granted_a_Deployment_License_Add-on_for_{2}_Production_Environments___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{16_August_2025}____[v3]_[01]_MTc1NTI5ODgwMDAwMA==c042c2db0e82c322692ccb41e7b58f3e");const i=e;i.devMode&&s.push(BP);const n=ge(()=>({height:`${i.containerHeight}px`,minHeight:`${i.containerMinHeight}px`})),r=t,l="serverSideRowHandler"in i&&i.serverSideRowHandler?{getRows:U=>{console.log("fetching data and gridInitializationComplete is",w.value),i.serverSideRowHandler?.(U)}}:null,a="filterValuesSetHandler"in i&&i.filterValuesSetHandler?async U=>{let ye={...x.value};!v.value&&i.initialGridState&&(ye=i.initialGridState.filter?.filterModel||{});const $e={api:U.api,colDef:U.colDef,column:U.column,filterModel:ye},Bt=await i.filterValuesSetHandler?.($e)||[];U.success(Bt),re.value++}:null,d=U=>{const ye=U.node,$e=U.column?.getColId();return!ye.group||!$e?!1:z.value.some(Dt=>{if(Dt.field===$e)return!0})},c=(()=>{const U={suppressHeaderFilterButton:!0,editable:!1,sortable:!0,suppressHeaderMenuButton:!0,suppressColumnsToolPanel:!0,minWidth:200,flex:1,headerComponent:RG,cellRendererSelector:ye=>{if(d(ye))return{component:YO,params:ye}}};return l&&a&&(U.filterParams={values:a}),U})(),u=me(void 0),h={name:"Column Filter",icon:'<span class="ag-icon ag-icon-filter"></span>',action:function(U){let ye=U.column?.getColId();if(U.column&&xe(U.column)&&(ye=L.value?.getColId()||""),!Ft(ye)){const Dt=U.api.getColumn(ye)?.getColDef();Dt&&(f.value=Dt,gn(()=>{Ft(ye)}))}}},p=(U,ye)=>{const $e={...U};return ye.dataType==="percent"&&!U.valueFormatter?$e.valueFormatter=yG:ye.dataType==="currency"&&!U.valueFormatter&&($e.valueFormatter=wG),$e},g=ge(()=>!i.colDefs||i.colDefs.length===0?[]:i.colDefs.map(U=>{const ye=U.context;return ye?p(U,ye):U})),f=me(null),m=me([]),v=me(!1),y=me(!0),R=me(void 0),w=ge(()=>i.initialGridState?y.value&&JSON.stringify(R.value)===JSON.stringify(i.initialGridState):y.value),b=hn(null),x=hn(null),A=me(null),H=ge(()=>g.value.filter(U=>U.filter)),M=ge(()=>g.value.filter(U=>U.enableRowGroup)),z=ge(()=>g.value.filter(U=>U.aggFunc)),L=me(null),ee=me({}),re=me(0);Jt("filterModel",x),Jt("gridApi",b),Jt("columnDisplayOrder",A),Jt("currentlyActiveFilter",f),Jt("availableFilterColumns",H),Jt("availableRowGroupColumns",M),Jt("rowGroupColumnFields",m),Jt("groupColumnCellValueColumn",L),Jt("expandedRows",ee),Jt("firstDataRendered",v),Jt("filterValuesSetTrigger",re);const de=U=>{b.value=U.api,U.api.setColumnsVisible(m.value,!1),A.value=U.api.getAllGridColumns(),r("grid-ready",U)},Ge=U=>{b.value&&(x.value=b.value.getFilterModel()),r("filter-changed",U)},xe=U=>U.getColId()&&U.getColId().includes("ag-Grid-AutoColumn"),te=U=>{console.log("rowGroupColumnFields.value",m.value),m.value=[...U.api.getRowGroupColumns()].map(ye=>ye.getColId()),r("column-row-group-changed",U)},Z=U=>{U.finished&&(A.value=U.api.getAllGridColumns()),r("column-moved",U)},De=U=>"allChildrenRowCount"in U&&U.allChildrenRowCount||0,Ft=U=>{const ye=document.querySelector(`[data-horizontal-filter-field="${U}"]`);if(ye){const $e=ye.querySelector("button");if($e)return $e.click(),!0}return!1},_t=me(BO),ct=me({loadingMessage:"One moment please..."}),Xt=me({headerName:"Grouped By",minWidth:300,suppressMovable:!0,pinned:"left",cellRendererParams:{suppressCount:!0,innerRenderer:$O,innerRendererParams:U=>({displayBaseAggregationsOnly:i.displayBaseAggregationsOnly,rowNode:U.node,api:b.value})}}),pr=U=>{if(U.node.group)return{backgroundColor:"#F7F8F8"}},cu={Median:U=>{const ye=U.values;if(U.rowNode.leafGroup){const Bt=JC(ye);return{values:ye,value:Bt}}const $e=U.values.flatMap(Bt=>Bt.values||[]),Dt=JC($e);return{values:$e,value:Dt}}};ka(()=>{const U=Array.isArray(i.rowData)&&i.rowData.length>0,ye=typeof i.serverSideRowHandler=="function",$e=typeof i.filterValuesSetHandler=="function";(U&&ye||U&&$e)&&console.warn("Only one of `rowData` or `serverSideRowHandler + hasFilterValuesSetHandler` params should be provided to PvDataTable, not both."),u.value=Dt=>{const Bt=["sortAscending","sortDescending","sortUnSort","rowUnGroup","valueAggSubMenu"],hu=Dt.column&&xe(Dt.column)?L.value:Dt.column;return hu&&hu.getColDef().filter&&Bt.splice(2,0,h),Bt.filter(C=>typeof C=="string"?Dt.defaultItems.includes(C):!0)}}),to(()=>{i.initialGridState&&(x.value=i.initialGridState.filter?.filterModel||null,m.value=i.initialGridState.rowGroup?.groupColIds||[],y.value=!1,setTimeout(()=>{R.value=i.initialGridState,y.value=!0}))});const uu=U=>{v.value=!0,console.log("gridInitializationComplete",w.value),r("first-data-rendered",U)};return(U,ye)=>(K(),J("div",{class:"pv-full-width",style:_o(n.value)},[q("div",LG,[q("div",kG,[Pe(vG,{"enable-vertical-panel":U.enableVerticalFilterPanel},null,8,["enable-vertical-panel"]),q("div",OG,[Pe(IG),Pe(OO)])])]),y.value?(K(),ot(Ae(wT),Kh({key:0,ref:"gridRef",style:{width:"100%",height:"90%"}},Ae(l)?{serverSideDatasource:Ae(l)}:{},{onColumnMoved:Z,onColumnRowGroupChanged:te,onFilterChanged:Ge,onFilterOpened:ye[0]||(ye[0]=$e=>r("filter-opened",$e)),onFirstDataRendered:uu,onGridReady:de,aggFuncs:cu,autoGroupColumnDef:Xt.value,columnDefs:g.value,debug:i.debugMode,defaultColDef:Ae(c),getChildCount:De,getMainMenuItems:u.value,getRowStyle:pr,groupDefaultExpanded:Ae(l)?void 0:1,groupDisplayType:"singleColumn",initialState:R.value,loadingCellRenderer:_t.value,loadingCellRendererParams:ct.value,maxConcurrentDatasourceRequests:Ae(l)?10:void 0,modules:s,rowData:U.rowData,rowModelType:Ae(l)?"serverSide":"clientSide",serverSideInitialRowCount:Ae(l)?1:void 0,showOpenedGroup:!0,suppressAggFuncInHeader:!0,suppressDragLeaveHidesColumns:!0,theme:U.theme}),null,16,["autoGroupColumnDef","columnDefs","debug","defaultColDef","getMainMenuItems","groupDefaultExpanded","initialState","loadingCellRenderer","loadingCellRendererParams","maxConcurrentDatasourceRequests","rowData","rowModelType","serverSideInitialRowCount","theme"])):at("",!0)],4))}}),[["styles",[".ag-header-cell-resize{border:none}.ag-custom-loading-cell{width:100%;height:40%;margin:15px;background-color:#ccc;border-radius:4px}.ag-group-value{width:100%}.ag-menu-option-text{font-family:Inter}"]]]),PvDropdown:Vn,PvIcon:It,PvPopover:qp,PvSegmentedControl:gS,PvTabList:vS},Symbol.toStringTag,{value:"Module"})),NG=["pit-viper-v2.css"];function iv(e,t){const s=document.querySelector('link[href*="'+t+'"]');if(s&&e.shadowRoot){const o=s.href;if(e.shadowRoot.querySelector(`link[href="${o}"]`))return;const i=document.createElement("link");return i.rel="stylesheet",i.href=o,e.shadowRoot.prepend(i),!0}else return console.warn(`${t} not found in the document.`),!1}function _G(e){NG.forEach(t=>{!iv(e,t)&&t==="pit-viper-v2.css"&&(console.log("Injecting pit-viper.css as a fallback"),iv(e,"pit-viper.css"))})}const BG={shadowRoot:!0};Object.entries(GG).forEach(([e,t])=>{const s=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=ib(t,BG);class i extends o{connectedCallback(){super.connectedCallback?.(),_G(this)}}customElements.define(s,i)})})();