@epam/ai-dial-ui-kit 0.4.0-rc.3 → 0.4.0-rc.5

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.
@@ -1,2 +1,62 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),w=require("classnames"),F=require("@floating-ui/react"),f=require("react"),L=require("@tabler/icons-react"),rn=require("react-dom");function nn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const O=nn(f),he=({errorText:e})=>e&&o.jsx("span",{className:"text-error dial-tiny mt-1",children:e}),W=({icon:e,className:t})=>e?o.jsx("span",{className:w("flex-shrink-0",t),children:e}):null,sn=7,on=2,ar=f.createContext(null),lr=()=>{const e=f.useContext(ar);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},an=({initialOpen:e=!1,placement:t="bottom",isTriggerClickable:r=!1,open:n,onOpenChange:s}={})=>{const[i,a]=f.useState(e),l=f.useRef(null),c=n??i,u=s??a,d=F.useFloating({placement:t,open:c,onOpenChange:u,whileElementsMounted:F.autoUpdate,middleware:[F.offset(sn+on),F.flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"start",padding:5}),F.shift({padding:5}),F.arrow({element:l})]}),g=F.useHover(d.context,{move:!1,enabled:n==null,mouseOnly:r,delay:{open:500,close:0}}),h=F.useFocus(d.context,{enabled:n==null}),p=F.useDismiss(d.context),x=F.useRole(d.context,{role:"tooltip"}),m=F.useInteractions([g,h,p,x]);return f.useMemo(()=>({open:c,setOpen:u,arrowRef:l,...m,...d}),[c,u,m,d])},cr=({children:e,...t})=>{const r=an(t);return o.jsx(ar.Provider,{value:r,children:e})},dr=f.forwardRef(function({style:t,...r},n){const s=lr(),i=F.useMergeRefs([s.refs.setFloating,n]);return s.open?o.jsx(F.FloatingPortal,{id:"tooltip-portal",children:o.jsxs("div",{ref:i,style:{...s.floatingStyles,...t},...s.getFloatingProps(r),className:w("z-[55] whitespace-pre-wrap break-words rounded border border-primary bg-blackout px-2 py-1 dial-tiny shadow max-w-[300px]",s.getFloatingProps(r).className),children:[r.children,o.jsx(F.FloatingArrow,{ref:s.arrowRef,context:s.context,fill:"currentColor",strokeWidth:1,className:"stroke-primary w-2 text-[var(--bg-layer-0,_#000000)]"})]})}):null}),ur=f.forwardRef(function({children:t,asChild:r=!1,...n},s){const i=lr(),l=t&&typeof t=="object"&&"ref"in t&&t.ref!==void 0?t.ref:void 0,c=F.useMergeRefs([i.refs.setReference,s,l]);return r&&f.isValidElement(t)?f.cloneElement(t,i.getReferenceProps({ref:c,...n,...t.props})):o.jsx("span",{ref:c,...i.getReferenceProps(n),className:n.className??"dial-tooltip-trigger text-left",children:t})}),me=({hideTooltip:e,tooltip:t,children:r,triggerClassName:n,contentClassName:s,...i})=>o.jsxs(cr,{...i,children:[o.jsx(ur,{className:w(n,"truncate"),children:r}),o.jsx(dr,{className:w("text-primary",s,"max-w-[300px]",(e||!t)&&"hidden"),children:t})]}),Dt="-",ln=e=>{const t=dn(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const l=a.split(Dt);return l[0]===""&&l.length!==1&&l.shift(),fr(l,t)||cn(a)},getConflictingClassGroupIds:(a,l)=>{const c=r[a]||[];return l&&n[a]?[...c,...n[a]]:c}}},fr=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?fr(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Dt);return t.validators.find(({validator:a})=>a(i))?.classGroupId},Mt=/^\[(.+)\]$/,cn=e=>{if(Mt.test(e)){const t=Mt.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},dn=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const s in r)gt(r[s],n,s,t);return n},gt=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Vt(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(un(s)){gt(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,a])=>{gt(a,Vt(t,i),r,n)})})},Vt=(e,t)=>{let r=e;return t.split(Dt).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},un=e=>e.isThemeGetter,fn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,a)=>{r.set(i,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let a=r.get(i);if(a!==void 0)return a;if((a=n.get(i))!==void 0)return s(i,a),a},set(i,a){r.has(i)?r.set(i,a):s(i,a)}}},ht="!",mt=":",pn=mt.length,gn=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let a=0,l=0,c=0,u;for(let x=0;x<s.length;x++){let m=s[x];if(a===0&&l===0){if(m===mt){i.push(s.slice(c,x)),c=x+pn;continue}if(m==="/"){u=x;continue}}m==="["?a++:m==="]"?a--:m==="("?l++:m===")"&&l--}const d=i.length===0?s:s.substring(c),g=hn(d),h=g!==d,p=u&&u>c?u-c:void 0;return{modifiers:i,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:p}};if(t){const s=t+mt,i=n;n=a=>a.startsWith(s)?i(a.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},hn=e=>e.endsWith(ht)?e.substring(0,e.length-1):e.startsWith(ht)?e.substring(1):e,mn=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const s=[];let i=[];return n.forEach(a=>{a[0]==="["||t[a]?(s.push(...i.sort(),a),i=[]):i.push(a)}),s.push(...i.sort()),s}},Cn=e=>({cache:fn(e.cacheSize),parseClassName:gn(e),sortModifiers:mn(e),...ln(e)}),xn=/\s+/,bn=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,a=[],l=e.trim().split(xn);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:g,modifiers:h,hasImportantModifier:p,baseClassName:x,maybePostfixModifierPosition:m}=r(d);if(g){c=d+(c.length>0?" "+c:c);continue}let D=!!m,v=n(D?x.substring(0,m):x);if(!v){if(!D){c=d+(c.length>0?" "+c:c);continue}if(v=n(x),!v){c=d+(c.length>0?" "+c:c);continue}D=!1}const b=i(h).join(":"),y=p?b+ht:b,E=y+v;if(a.includes(E))continue;a.push(E);const N=s(v,D);for(let P=0;P<N.length;++P){const G=N[P];a.push(y+G)}c=d+(c.length>0?" "+c:c)}return c};function vn(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=pr(t))&&(n&&(n+=" "),n+=r);return n}const pr=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=pr(e[n]))&&(r&&(r+=" "),r+=t);return r};function yn(e,...t){let r,n,s,i=a;function a(c){const u=t.reduce((d,g)=>g(d),e());return r=Cn(u),n=r.cache.get,s=r.cache.set,i=l,l(c)}function l(c){const u=n(c);if(u)return u;const d=bn(c,r);return s(c,d),d}return function(){return i(vn.apply(null,arguments))}}const q=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},gr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,hr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wn=/^\d+\/\d+$/,Dn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,In=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ln=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Se=e=>wn.test(e),R=e=>!!e&&!Number.isNaN(Number(e)),ge=e=>!!e&&Number.isInteger(Number(e)),ot=e=>e.endsWith("%")&&R(e.slice(0,-1)),ce=e=>Dn.test(e),Tn=()=>!0,En=e=>Sn.test(e)&&!In.test(e),mr=()=>!1,On=e=>Ln.test(e),kn=e=>jn.test(e),Nn=e=>!S(e)&&!I(e),Rn=e=>Te(e,br,mr),S=e=>gr.test(e),xe=e=>Te(e,vr,En),it=e=>Te(e,Hn,R),Ft=e=>Te(e,Cr,mr),Pn=e=>Te(e,xr,kn),Ge=e=>Te(e,yr,On),I=e=>hr.test(e),ke=e=>Ee(e,vr),Mn=e=>Ee(e,An),Ht=e=>Ee(e,Cr),Vn=e=>Ee(e,br),Fn=e=>Ee(e,xr),$e=e=>Ee(e,yr,!0),Te=(e,t,r)=>{const n=gr.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ee=(e,t,r=!1)=>{const n=hr.exec(e);return n?n[1]?t(n[1]):r:!1},Cr=e=>e==="position"||e==="percentage",xr=e=>e==="image"||e==="url",br=e=>e==="length"||e==="size"||e==="bg-size",vr=e=>e==="length",Hn=e=>e==="number",An=e=>e==="family-name",yr=e=>e==="shadow",_n=()=>{const e=q("color"),t=q("font"),r=q("text"),n=q("font-weight"),s=q("tracking"),i=q("leading"),a=q("breakpoint"),l=q("container"),c=q("spacing"),u=q("radius"),d=q("shadow"),g=q("inset-shadow"),h=q("text-shadow"),p=q("drop-shadow"),x=q("blur"),m=q("perspective"),D=q("aspect"),v=q("ease"),b=q("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...E(),I,S],P=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],j=()=>[I,S,c],$=()=>[Se,"full","auto",...j()],z=()=>[ge,"none","subgrid",I,S],M=()=>["auto",{span:["full",ge,I,S]},ge,I,S],V=()=>[ge,"auto",I,S],Q=()=>["auto","min","max","fr",I,S],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...j()],te=()=>[Se,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],T=()=>[e,I,S],le=()=>[...E(),Ht,Ft,{position:[I,S]}],fe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],pe=()=>["auto","cover","contain",Vn,Rn,{size:[I,S]}],ne=()=>[ot,ke,xe],U=()=>["","none","full",u,I,S],K=()=>["",R,ke,xe],C=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>[R,ot,Ht,Ft],ie=()=>["","none",x,I,S],Ce=()=>["none",R,I,S],ze=()=>["none",R,I,S],st=()=>[R,I,S],Be=()=>[Se,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ce],breakpoint:[ce],color:[Tn],container:[ce],"drop-shadow":[ce],ease:["in","out","in-out"],font:[Nn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ce],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ce],shadow:[ce],spacing:["px",R],text:[ce],"text-shadow":[ce],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Se,S,I,D]}],container:["container"],columns:[{columns:[R,S,I,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[ge,"auto",I,S]}],basis:[{basis:[Se,"full","auto",l,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[R,Se,"auto","initial","none",S]}],grow:[{grow:["",R,I,S]}],shrink:[{shrink:["",R,I,S]}],order:[{order:[ge,"first","last","none",I,S]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],w:[{w:[l,"screen",...te()]}],"min-w":[{"min-w":[l,"screen","none",...te()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",r,ke,xe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,I,it]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ot,S]}],"font-family":[{font:[Mn,S,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,I,S]}],"line-clamp":[{"line-clamp":[R,"none",I,it]}],leading:[{leading:[i,...j()]}],"list-image":[{"list-image":["none",I,S]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",I,S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...C(),"wavy"]}],"text-decoration-thickness":[{decoration:[R,"from-font","auto",I,xe]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[R,"auto",I,S]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",I,S]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",I,S]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:fe()}],"bg-size":[{bg:pe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ge,I,S],radial:["",I,S],conic:[ge,I,S]},Fn,Pn]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...C(),"hidden","none"]}],"divide-style":[{divide:[...C(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...C(),"none","hidden"]}],"outline-offset":[{"outline-offset":[R,I,S]}],"outline-w":[{outline:["",R,ke,xe]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",d,$e,Ge]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",g,$e,Ge]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[R,xe]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",h,$e,Ge]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[R,I,S]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[R]}],"mask-image-linear-from-pos":[{"mask-linear-from":_()}],"mask-image-linear-to-pos":[{"mask-linear-to":_()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":_()}],"mask-image-t-to-pos":[{"mask-t-to":_()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":_()}],"mask-image-r-to-pos":[{"mask-r-to":_()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":_()}],"mask-image-b-to-pos":[{"mask-b-to":_()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":_()}],"mask-image-l-to-pos":[{"mask-l-to":_()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":_()}],"mask-image-x-to-pos":[{"mask-x-to":_()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":_()}],"mask-image-y-to-pos":[{"mask-y-to":_()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[I,S]}],"mask-image-radial-from-pos":[{"mask-radial-from":_()}],"mask-image-radial-to-pos":[{"mask-radial-to":_()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[R]}],"mask-image-conic-from-pos":[{"mask-conic-from":_()}],"mask-image-conic-to-pos":[{"mask-conic-to":_()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:fe()}],"mask-size":[{mask:pe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",I,S]}],filter:[{filter:["","none",I,S]}],blur:[{blur:ie()}],brightness:[{brightness:[R,I,S]}],contrast:[{contrast:[R,I,S]}],"drop-shadow":[{"drop-shadow":["","none",p,$e,Ge]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",R,I,S]}],"hue-rotate":[{"hue-rotate":[R,I,S]}],invert:[{invert:["",R,I,S]}],saturate:[{saturate:[R,I,S]}],sepia:[{sepia:["",R,I,S]}],"backdrop-filter":[{"backdrop-filter":["","none",I,S]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[R,I,S]}],"backdrop-contrast":[{"backdrop-contrast":[R,I,S]}],"backdrop-grayscale":[{"backdrop-grayscale":["",R,I,S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[R,I,S]}],"backdrop-invert":[{"backdrop-invert":["",R,I,S]}],"backdrop-opacity":[{"backdrop-opacity":[R,I,S]}],"backdrop-saturate":[{"backdrop-saturate":[R,I,S]}],"backdrop-sepia":[{"backdrop-sepia":["",R,I,S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",I,S]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[R,"initial",I,S]}],ease:[{ease:["linear","initial",v,I,S]}],delay:[{delay:[R,I,S]}],animate:[{animate:["none",b,I,S]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,I,S]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:Ce()}],"rotate-x":[{"rotate-x":Ce()}],"rotate-y":[{"rotate-y":Ce()}],"rotate-z":[{"rotate-z":Ce()}],scale:[{scale:ze()}],"scale-x":[{"scale-x":ze()}],"scale-y":[{"scale-y":ze()}],"scale-z":[{"scale-z":ze()}],"scale-3d":["scale-3d"],skew:[{skew:st()}],"skew-x":[{"skew-x":st()}],"skew-y":[{"skew-y":st()}],transform:[{transform:[I,S,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",I,S]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",I,S]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[R,ke,xe,it]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},zn=yn(_n);function A(...e){return zn(w(e))}const De=({fieldTitle:e,htmlFor:t,optional:r,optionalText:n,cssClass:s,description:i})=>e?o.jsxs("label",{className:A("dial-tiny text-secondary flex gap-1",s,!s?.includes("mb")&&"mb-2"),htmlFor:t,children:[typeof e=="string"?o.jsx("span",{className:"min-h-4",children:e}):e,r&&o.jsx("span",{children:n??"(Optional)"}),i&&o.jsx(me,{tooltip:i,children:o.jsx(W,{icon:o.jsx(L.IconInfoCircle,{size:14,className:"text-secondary"})})})]}):null;var Z=(e=>(e.Primary="primary",e.Secondary="secondary",e.Tertiary="tertiary",e.Danger="danger",e))(Z||{});const Bn={[Z.Primary]:"dial-primary-button",[Z.Secondary]:"dial-secondary-button",[Z.Tertiary]:"dial-tertiary-button",[Z.Danger]:"dial-danger-button"},X=({title:e,variant:t,cssClass:r,textCssClass:n,ref:s,onClick:i,disable:a,iconAfter:l,iconBefore:c,hideTitleOnMobile:u,ariaLabel:d})=>{const g=w("dial-small-semi",l?"mr-2":"",c?"ml-2":"",u?"hidden sm:inline":"inline",n),h=w(t&&Bn[t],r,"focus-visible:outline outline-offset-0");return o.jsxs("button",{ref:s,type:"button",className:h,onClick:p=>i?.(p),disabled:a,"aria-label":e||d,children:[o.jsx(W,{icon:c}),e&&o.jsx("span",{className:g,children:e}),o.jsx(W,{icon:l})]})};var ve=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e))(ve||{});const Gn={info:o.jsx(L.IconInfoCircle,{size:24,stroke:2}),error:o.jsx(L.IconAlertCircle,{size:24,stroke:2}),warning:o.jsx(L.IconAlertTriangle,{size:24,stroke:2}),success:o.jsx(L.IconCircleCheck,{size:24,stroke:2})},$n={[ve.Info]:"bg-info border-info text-info",[ve.Success]:"bg-success border-success text-success",[ve.Warning]:"bg-warning border-warning text-warning",[ve.Error]:"bg-error border-error text-error"},Wn="items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex",Un=({variant:e=ve.Info,message:t,cssClass:r,closable:n=!1,onClose:s})=>o.jsxs("div",{role:"alert",className:w(Wn,$n[e],r),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(W,{icon:Gn[e]}),o.jsx("div",{className:"text-primary",children:t})]}),n&&o.jsx(X,{cssClass:"ml-2 text-secondary hover:text-primary",ariaLabel:"Close alert",iconBefore:o.jsx(L.IconX,{size:16}),onClick:i=>s?.(i)})]}),qn="flex items-center justify-center text-secondary",Zn="shrink-0 grow-0 basis-auto animate-spin-steps",Xn=e=>O.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),Ze=({size:e=18,cssClass:t,iconClass:r,fullWidth:n=!0,ariaLabel:s="Loading"})=>o.jsx("div",{role:"status",className:w({[qn]:!0,"w-full h-full":n,[t||""]:!!t}),children:o.jsx(W,{icon:o.jsx(Xn,{width:e,height:e,className:w(Zn,r),role:"img","aria-label":s})})}),Re=18,J={size:Re,stroke:2},Yn="text-primary",ue=({text:e,cssClass:t,contentClassName:r,hideTooltip:n,...s})=>{const i=f.useRef(null),[a,l]=f.useState(!1),[c,u]=f.useState(""),d=f.useRef(null),g=()=>{const m=i.current;if(!m)return;u(m.textContent??"");const D=m.clientWidth,v=m.scrollWidth,b=Math.ceil(m.getBoundingClientRect().width);l(v>D||v>b)},h=f.useCallback(()=>{d.current&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(g)},[]);f.useEffect(()=>{h();const m=()=>h();window.addEventListener("resize",m);let D=null;return"ResizeObserver"in window&&i.current&&(D=new ResizeObserver(()=>h()),D.observe(i.current)),()=>{window.removeEventListener("resize",m),D&&D.disconnect(),d.current&&cancelAnimationFrame(d.current)}},[e,h]);const p=f.useMemo(()=>typeof e=="string"?e:c,[c,e]),x=f.useMemo(()=>n?"":a?p:"",[p,n,a]);return o.jsxs(cr,{...s,children:[o.jsx(ur,{asChild:!0,ref:i,onMouseEnter:h,onFocusCapture:h,children:o.jsx("span",{className:A("block truncate flex-1 min-w-0 max-w-full text-left",t),"aria-label":a?p:void 0,onMouseEnter:h,onFocus:h,children:e})}),o.jsx(dr,{className:A(Yn,r,!x&&"hidden"),children:x})]})},Ct=({label:e,id:t,checked:r,indeterminate:n,disabled:s,ariaLabel:i,onChange:a,cssClass:l})=>{const c=f.useCallback(h=>{a?.(h.target.checked,t)},[a,t]),u=w("flex flex-row items-center cursor-pointer text-accent-primary small-medium flex-1 min-w-0",`${r||n?"":'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded before:mr-2'}`,s?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",l),d=w("mr-2 border rounded",s?"bg-layer-4 border-icon-secondary":""),g=()=>n?o.jsx(L.IconMinus,{className:d,...J}):r?o.jsx(L.IconCheck,{className:d,...J}):null;return o.jsxs("label",{className:u,htmlFor:t,children:[g(),e&&(typeof e=="string"?o.jsx(ue,{text:e,cssClass:"text-primary"}):e),o.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:c,id:t,checked:r,"aria-checked":n?"mixed":r,"aria-disabled":s||void 0,"aria-label":e?void 0:i,className:"invisible w-0 h-0"})]})};var re=(e=>(e.VALID="valid",e.ERROR="error",e))(re||{});const Kn=(e,t)=>{if(t===e.id)switch(e.status){case re.VALID:return"border-accent-secondary text-primary";case re.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case re.VALID:return"border-primary text-primary";case re.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},Jn=(e,t)=>{if(t===e.id)switch(e.status){case re.VALID:return"bg-accent-secondary";case re.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case re.VALID:return"bg-accent-secondary";case re.ERROR:return"bg-red-400";default:return"bg-layer-4"}},Qn=({step:e,index:t,currentStep:r,onChangeStep:n})=>{const s="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny border-t-2 cursor-pointer",i="w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full text-white",a=()=>r===e.id&&e.status===re.ERROR?o.jsx(L.IconExclamationCircle,{stroke:2,size:16}):r!==e.id&&e.status===re.VALID?o.jsx(L.IconCheck,{stroke:2,size:16}):t+1;return o.jsxs("button",{className:w(s,Kn(e,r)),onClick:()=>n(e.id),children:[o.jsx("span",{className:w(i,Jn(e,r)),children:a()}),o.jsx("span",{children:e.name})]})},es=({steps:e,currentStep:t,onChangeStep:r})=>{const n=s=>{const i=e.findIndex(l=>l.id===t),a=e.findIndex(l=>l.id===s);(s!==t&&e[i].status===re.VALID||a<i)&&r(s)};return o.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((s,i)=>o.jsx(Qn,{currentStep:t,onChangeStep:n,step:s,index:i},s.id))})},wr=({name:e,value:t,title:r,description:n,checked:s=!1,inputId:i,cssClass:a,labelCssClass:l,disabled:c,onChange:u,descriptionCssClass:d})=>{const g=`${i}-desc`,h=w("dial-small cursor-pointer",c?"text-secondary":"text-primary",l),p=w("cursor-pointer dial-input-radio",r&&"mr-2",a),x=w("flex flex-col",!!n&&"mb-2"),m=w("dial-tiny mt-2 ml-[26px] text-secondary",d),D=v=>{c||v.target.checked&&u?.(t)};return o.jsxs("div",{className:x,children:[o.jsxs("div",{className:"flex flex-row items-center",children:[o.jsx("input",{type:"radio",id:i,name:e,value:t,checked:s,disabled:c,"aria-describedby":s&&n?g:void 0,className:p,onChange:D}),r?o.jsx("label",{className:h,htmlFor:i,children:r}):null]}),s&&n&&o.jsx("div",{id:g,className:m,children:n})]})};var Ve=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(Ve||{});const ts="w-full flex",rs={[Ve.Vertical]:"flex-col",[Ve.Horizontal]:"flex-row items-end"},Xe=({elementId:e,label:t,optional:r,optionalText:n,description:s,error:i,orientation:a=Ve.Vertical,labelVisuallyHidden:l=!1,cssClass:c,labelCssClass:u,errorCssClass:d,childrenCssClass:g,captionDescription:h,readonly:p,value:x,defaultEmptyText:m,children:D})=>{const v=`${e}-label`,b=s?`${e}-desc`:void 0,y=i?`${e}-err`:void 0,E=`${e}-caption-desc`,N=[b,y].filter(Boolean).join(" ")||void 0,P=f.useCallback(()=>typeof i=="boolean"?null:typeof i=="string"||typeof i>"u"?i?o.jsx("div",{id:y,role:"alert","aria-live":"polite",className:d,children:o.jsx(he,{errorText:i})}):null:o.jsx("div",{id:y,role:"alert","aria-live":"polite",className:d,children:i}),[i,d,y]),G=f.useCallback(()=>x?typeof x=="string"||typeof x=="number"?o.jsx("span",{"aria-readonly":"true",children:x}):x:o.jsx("span",{"aria-readonly":"true",children:m??"None"}),[x,m]);return o.jsxs("div",{role:"group","aria-labelledby":t?v:void 0,"aria-describedby":N,className:A(ts,rs[a],c),children:[t&&o.jsx("div",{id:v,className:A(a==="horizontal"&&"shrink-0"),children:o.jsx(De,{htmlFor:e,fieldTitle:t,optional:r,optionalText:n,cssClass:A(l&&"sr-only",u),description:s})}),o.jsxs("div",{className:A("min-w-0 w-full",g),children:[p?o.jsx("div",{className:"dial-input px-3 py-2",children:G()}):D,h&&o.jsx("div",{id:E,className:A({"dial-tiny text-secondary mt-1":!0,"text-error":!!i}),children:h}),P()]})]})};var Fe=(e=>(e.Row="Row",e.Column="Column",e))(Fe||{});const ns="flex",ss="pb-1 mt-2",os={[Fe.Column]:"flex-col gap-y-3",[Fe.Row]:"flex-row gap-x-6"},Dr=({fieldTitle:e,radioCssClass:t,containerCssClass:r,selectedItemCssClass:n,selectedLabelCssClass:s,radioGroupCssClass:i,inputContainerCssClass:a,selectedInputContainerCssClass:l,groupLabelCssClass:c,formItemChildrenCssClass:u,labelCssClass:d,disabled:g,elementId:h,radioButtons:p,activeRadioButton:x,orientation:m,onChange:D})=>o.jsx(Xe,{elementId:h,label:e,labelCssClass:c||d,cssClass:r,childrenCssClass:u,children:o.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":g||void 0,className:A(ns,os[m],i),children:p.map(v=>o.jsxs("div",{className:A("flex flex-col",a,v.id===x&&l),children:[o.jsx(wr,{name:h,value:v.id,inputId:v.id,disabled:g,cssClass:t,labelCssClass:A(d,v.id===x&&s),title:v.name,checked:v.id===x,onChange:()=>D(v.id)}),v.id===x&&v.content?o.jsx("div",{className:A(ss,n),children:v.content}):null]},v.id))})}),Sr=({icon:e,title:t,description:r})=>o.jsxs("div",{className:"h-full w-full flex flex-col items-center justify-center text-secondary",children:[e||o.jsx(L.IconClipboardX,{width:60,height:60}),o.jsx("span",{className:"dial-small mt-2 text-primary",children:t}),r&&o.jsx("span",{className:"mt-1 text-primary",children:r})]}),is=60,as=({containerCssClass:e,children:t,width:r,title:n,iconSize:s=32,iconStroke:i=1.5,titleCssClass:a,additionalButtons:l})=>{const[c,u]=f.useState(r),[d,g]=f.useState(!0),h=w(["transform rotate-180 [writing-mode:tb-rl] p-4",d&&"hidden",a]),p=w(["flex flex-row gap-2 cursor-pointer text-secondary",d?"justify-end":"justify-center"]),x=()=>{u(d?is:r),g(!d)};return o.jsxs("div",{className:w(["rounded flex flex-col justify-between overflow-y-auto flex-shrink-0",e]),style:{width:`${c}px`},children:[o.jsx("div",{className:w(["flex-1 p-4 min-h-0 overflow-auto",!d&&"hidden"]),children:t}),o.jsx("div",{className:h,children:n}),o.jsxs("div",{className:A("border-t stroke-primary h-12",p),children:[d&&l,o.jsx(X,{cssClass:"hover:text-icon-accent-primary",onClick:x,iconBefore:d?o.jsx(L.IconChevronsLeft,{size:s,stroke:i}):o.jsx(L.IconChevronsRight,{size:s,stroke:i})})]})]})},ls=({label:e,text:t,children:r,postfix:n})=>o.jsxs("div",{className:w("flex flex-col",r?"":"max-w-[200px]"),children:[o.jsx("label",{className:"dial-tiny mb-2 text-secondary",children:e}),r||o.jsxs("div",{className:"flex flex-row items-center",children:[o.jsx(me,{triggerClassName:"text-primary",tooltip:t,children:t}),n||null]})]});var Ye=(e=>(e.Default="default",e))(Ye||{});const cs={[Ye.Default]:"border-icon-secondary bg-layer-3"},Ke=({tag:e,cssClass:t,remove:r,variant:n=Ye.Default,iconBefore:s,bordered:i=!0})=>{const a=cs[n],l=A("flex items-center gap-1 dial-tiny rounded p-1 h-[22px] text-primary",a,i?"border":"border-transparent",t);return o.jsxs("div",{className:l,children:[o.jsx(W,{icon:s}),o.jsx(ue,{text:e}),r&&o.jsx(X,{iconAfter:o.jsx(L.IconX,{size:16}),onClick:c=>r(c)})]},e)},Ir=f.createContext({dragDropManager:void 0});function se(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var At=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),_t=function(){return Math.random().toString(36).substring(7).split("").join(".")},zt={INIT:"@@redux/INIT"+_t(),REPLACE:"@@redux/REPLACE"+_t()};function ds(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function us(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(gs(e))return"date";if(ps(e))return"error";var r=fs(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function fs(e){return typeof e.constructor=="function"?e.constructor.name:null}function ps(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function gs(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Ie(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=us(e)),t}function Lr(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?se(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?se(1):"Expected the enhancer to be a function. Instead, received: '"+Ie(r)+"'");return r(Lr)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?se(2):"Expected the root reducer to be a function. Instead, received: '"+Ie(e)+"'");var s=e,i=t,a=[],l=a,c=!1;function u(){l===a&&(l=a.slice())}function d(){if(c)throw new Error(process.env.NODE_ENV==="production"?se(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function g(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?se(4):"Expected the listener to be a function. Instead, received: '"+Ie(m)+"'");if(c)throw new Error(process.env.NODE_ENV==="production"?se(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var D=!0;return u(),l.push(m),function(){if(D){if(c)throw new Error(process.env.NODE_ENV==="production"?se(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");D=!1,u();var b=l.indexOf(m);l.splice(b,1),a=null}}}function h(m){if(!ds(m))throw new Error(process.env.NODE_ENV==="production"?se(7):"Actions must be plain objects. Instead, the actual type was: '"+Ie(m)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof m.type>"u")throw new Error(process.env.NODE_ENV==="production"?se(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(c)throw new Error(process.env.NODE_ENV==="production"?se(9):"Reducers may not dispatch actions.");try{c=!0,i=s(i,m)}finally{c=!1}for(var D=a=l,v=0;v<D.length;v++){var b=D[v];b()}return m}function p(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?se(10):"Expected the nextReducer to be a function. Instead, received: '"+Ie(m));s=m,h({type:zt.REPLACE})}function x(){var m,D=g;return m={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?se(11):"Expected the observer to be an object. Instead, received: '"+Ie(b)+"'");function y(){b.next&&b.next(d())}y();var E=D(y);return{unsubscribe:E}}},m[At]=function(){return this},m}return h({type:zt.INIT}),n={dispatch:h,subscribe:g,getState:d,replaceReducer:p},n[At]=x,n}function k(e,t,...r){if(hs()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;n=new Error(t.replace(/%s/g,function(){return r[s++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function hs(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function ms(e,t,r){return t.split(".").reduce((n,s)=>n&&n[s]?n[s]:r||null,e)}function Cs(e,t){return e.filter(r=>r!==t)}function jr(e){return typeof e=="object"}function xs(e,t){const r=new Map,n=i=>{r.set(i,r.has(i)?r.get(i)+1:1)};e.forEach(n),t.forEach(n);const s=[];return r.forEach((i,a)=>{i===1&&s.push(a)}),s}function bs(e,t){return e.filter(r=>t.indexOf(r)>-1)}const St="dnd-core/INIT_COORDS",Je="dnd-core/BEGIN_DRAG",It="dnd-core/PUBLISH_DRAG_SOURCE",Qe="dnd-core/HOVER",et="dnd-core/DROP",tt="dnd-core/END_DRAG";function Bt(e,t){return{type:St,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const vs={type:St,payload:{clientOffset:null,sourceClientOffset:null}};function ys(e){return function(r=[],n={publishSource:!0}){const{publishSource:s=!0,clientOffset:i,getSourceClientOffset:a}=n,l=e.getMonitor(),c=e.getRegistry();e.dispatch(Bt(i)),ws(r,l,c);const u=Is(r,l);if(u==null){e.dispatch(vs);return}let d=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");Ds(a),d=a(u)}e.dispatch(Bt(i,d));const h=c.getSource(u).beginDrag(l,u);if(h==null)return;Ss(h),c.pinSource(u);const p=c.getSourceType(u);return{type:Je,payload:{itemType:p,item:h,sourceId:u,clientOffset:i||null,sourceClientOffset:d||null,isSourcePublic:!!s}}}}function ws(e,t,r){k(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){k(r.getSource(n),"Expected sourceIds to be registered.")})}function Ds(e){k(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Ss(e){k(jr(e),"Item must be an object.")}function Is(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Ls(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function js(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){Ls(e,s,r[s])})}return e}function Ts(e){return function(r={}){const n=e.getMonitor(),s=e.getRegistry();Es(n),Ns(n).forEach((a,l)=>{const c=Os(a,l,s,n),u={type:et,payload:{dropResult:js({},r,c)}};e.dispatch(u)})}}function Es(e){k(e.isDragging(),"Cannot call drop while not dragging."),k(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Os(e,t,r,n){const s=r.getTarget(e);let i=s?s.drop(n,e):void 0;return ks(i),typeof i>"u"&&(i=t===0?{}:n.getDropResult()),i}function ks(e){k(typeof e>"u"||jr(e),"Drop result must either be an object or undefined.")}function Ns(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Rs(e){return function(){const r=e.getMonitor(),n=e.getRegistry();Ps(r);const s=r.getSourceId();return s!=null&&(n.getSource(s,!0).endDrag(r,s),n.unpinSource()),{type:tt}}}function Ps(e){k(e.isDragging(),"Cannot call endDrag while not dragging.")}function xt(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function Ms(e){return function(r,{clientOffset:n}={}){Vs(r);const s=r.slice(0),i=e.getMonitor(),a=e.getRegistry(),l=i.getItemType();return Hs(s,a,l),Fs(s,i,a),As(s,i,a),{type:Qe,payload:{targetIds:s,clientOffset:n||null}}}}function Vs(e){k(Array.isArray(e),"Expected targetIds to be an array.")}function Fs(e,t,r){k(t.isDragging(),"Cannot call hover while not dragging."),k(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){const s=e[n];k(e.lastIndexOf(s)===n,"Expected targetIds to be unique in the passed array.");const i=r.getTarget(s);k(i,"Expected targetIds to be registered.")}}function Hs(e,t,r){for(let n=e.length-1;n>=0;n--){const s=e[n],i=t.getTargetType(s);xt(i,r)||e.splice(n,1)}}function As(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function _s(e){return function(){if(e.getMonitor().isDragging())return{type:It}}}function zs(e){return{beginDrag:ys(e),publishDragSource:_s(e),hover:Ms(e),drop:Ts(e),endDrag:Rs(e)}}class Bs{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:r}=this.store;function n(i){return(...a)=>{const l=i.apply(t,a);typeof l<"u"&&r(l)}}const s=zs(this);return Object.keys(s).reduce((i,a)=>{const l=s[a];return i[a]=n(l),i},{})}dispatch(t){this.store.dispatch(t)}constructor(t,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}}function Gs(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Tr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $s(e){const{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:Tr(Gs(t,n),r)}function Ws(e){const{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:Tr(t,r)}const Me=[],Lt=[];Me.__IS_NONE__=!0;Lt.__IS_ALL__=!0;function Us(e,t){return e===Me?!1:e===Lt||typeof t>"u"?!0:bs(t,e).length>0}class qs{subscribeToStateChange(t,r={}){const{handlerIds:n}=r;k(typeof t=="function","listener must be a function."),k(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const i=()=>{const a=this.store.getState(),l=a.stateId;try{l===s||l===s+1&&!Us(a.dirtyHandlerIds,n)||t()}finally{s=l}};return this.store.subscribe(i)}subscribeToOffsetChange(t){k(typeof t=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const s=this.store.getState().dragOffset;s!==r&&(r=s,t())};return this.store.subscribe(n)}canDragSource(t){if(!t)return!1;const r=this.registry.getSource(t);return k(r,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:r.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const r=this.registry.getTarget(t);if(k(r,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(t),s=this.getItemType();return xt(n,s)&&r.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const r=this.registry.getSource(t,!0);if(k(r,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(t),s=this.getItemType();return n!==s?!1:r.isDragging(this,t)}isOverTarget(t,r={shallow:!1}){if(!t)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const s=this.registry.getTargetType(t),i=this.getItemType();if(i&&!xt(s,i))return!1;const a=this.getTargetIds();if(!a.length)return!1;const l=a.indexOf(t);return n?l===a.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return $s(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Ws(this.store.getState().dragOffset)}constructor(t,r){this.store=t,this.registry=r}}const Gt=typeof global<"u"?global:self,Er=Gt.MutationObserver||Gt.WebKitMutationObserver;function Or(e){return function(){const r=setTimeout(s,0),n=setInterval(s,50);function s(){clearTimeout(r),clearInterval(n),e()}}}function Zs(e){let t=1;const r=new Er(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const Xs=typeof Er=="function"?Zs:Or;class Ys{enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const r=this.index;if(this.index++,t[r].call(),this.index>this.capacity){for(let n=0,s=t.length-this.index;n<s;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Xs(this.flush),this.requestErrorThrow=Or(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Ks{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class Js{create(t){const r=this.freeTasks,n=r.length?r.pop():new Ks(this.onError,s=>r[r.length]=s);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const kr=new Ys,Qs=new Js(kr.registerPendingError);function eo(e){kr.enqueueTask(Qs.create(e))}const jt="dnd-core/ADD_SOURCE",Tt="dnd-core/ADD_TARGET",Et="dnd-core/REMOVE_SOURCE",rt="dnd-core/REMOVE_TARGET";function to(e){return{type:jt,payload:{sourceId:e}}}function ro(e){return{type:Tt,payload:{targetId:e}}}function no(e){return{type:Et,payload:{sourceId:e}}}function so(e){return{type:rt,payload:{targetId:e}}}function oo(e){k(typeof e.canDrag=="function","Expected canDrag to be a function."),k(typeof e.beginDrag=="function","Expected beginDrag to be a function."),k(typeof e.endDrag=="function","Expected endDrag to be a function.")}function io(e){k(typeof e.canDrop=="function","Expected canDrop to be a function."),k(typeof e.hover=="function","Expected hover to be a function."),k(typeof e.drop=="function","Expected beginDrag to be a function.")}function bt(e,t){if(t&&Array.isArray(e)){e.forEach(r=>bt(r,!1));return}k(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var oe;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(oe||(oe={}));let ao=0;function lo(){return ao++}function co(e){const t=lo().toString();switch(e){case oe.SOURCE:return`S${t}`;case oe.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function $t(e){switch(e[0]){case"S":return oe.SOURCE;case"T":return oe.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Wt(e,t){const r=e.entries();let n=!1;do{const{done:s,value:[,i]}=r.next();if(i===t)return!0;n=!!s}while(!n);return!1}class uo{addSource(t,r){bt(t),oo(r);const n=this.addHandler(oe.SOURCE,t,r);return this.store.dispatch(to(n)),n}addTarget(t,r){bt(t,!0),io(r);const n=this.addHandler(oe.TARGET,t,r);return this.store.dispatch(ro(n)),n}containsHandler(t){return Wt(this.dragSources,t)||Wt(this.dropTargets,t)}getSource(t,r=!1){return k(this.isSourceId(t),"Expected a valid source ID."),r&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return k(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return k(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return k(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return $t(t)===oe.SOURCE}isTargetId(t){return $t(t)===oe.TARGET}removeSource(t){k(this.getSource(t),"Expected an existing source."),this.store.dispatch(no(t)),eo(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){k(this.getTarget(t),"Expected an existing target."),this.store.dispatch(so(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const r=this.getSource(t);k(r,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=r}unpinSource(){k(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,r,n){const s=co(t);return this.types.set(s,r),t===oe.SOURCE?this.dragSources.set(s,n):t===oe.TARGET&&this.dropTargets.set(s,n),s}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const fo=(e,t)=>e===t;function po(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function go(e,t,r=fo){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function ho(e=Me,t){switch(t.type){case Qe:break;case jt:case Tt:case rt:case Et:return Me;case Je:case It:case tt:case et:default:return Lt}const{targetIds:r=[],prevTargetIds:n=[]}=t.payload,s=xs(r,n);if(!(s.length>0||!go(r,n)))return Me;const a=n[n.length-1],l=r[r.length-1];return a!==l&&(a&&s.push(a),l&&s.push(l)),s}function mo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Co(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){mo(e,s,r[s])})}return e}const Ut={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function xo(e=Ut,t){const{payload:r}=t;switch(t.type){case St:case Je:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Qe:return po(e.clientOffset,r.clientOffset)?e:Co({},e,{clientOffset:r.clientOffset});case tt:case et:return Ut;default:return e}}function bo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){bo(e,s,r[s])})}return e}const vo={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function yo(e=vo,t){const{payload:r}=t;switch(t.type){case Je:return Le({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case It:return Le({},e,{isSourcePublic:!0});case Qe:return Le({},e,{targetIds:r.targetIds});case rt:return e.targetIds.indexOf(r.targetId)===-1?e:Le({},e,{targetIds:Cs(e.targetIds,r.targetId)});case et:return Le({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case tt:return Le({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function wo(e=0,t){switch(t.type){case jt:case Tt:return e+1;case Et:case rt:return e-1;default:return e}}function Do(e=0){return e+1}function So(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Io(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){So(e,s,r[s])})}return e}function Lo(e={},t){return{dirtyHandlerIds:ho(e.dirtyHandlerIds,{type:t.type,payload:Io({},t.payload,{prevTargetIds:ms(e,"dragOperation.targetIds",[])})}),dragOffset:xo(e.dragOffset,t),refCount:wo(e.refCount,t),dragOperation:yo(e.dragOperation,t),stateId:Do(e.stateId)}}function jo(e,t=void 0,r={},n=!1){const s=To(n),i=new qs(s,new uo(s)),a=new Bs(s,i),l=e(a,t,r);return a.receiveBackend(l),a}function To(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Lr(Lo,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function Eo(e,t){if(e==null)return{};var r=Oo(e,t),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)n=i[s],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Oo(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}let qt=0;const Ue=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var ko=f.memo(function(t){var{children:r}=t,n=Eo(t,["children"]);const[s,i]=No(n);return f.useEffect(()=>{if(i){const a=Nr();return++qt,()=>{--qt===0&&(a[Ue]=null)}}},[]),o.jsx(Ir.Provider,{value:s,children:r})});function No(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=Ro(e.backend,e.context,e.options,e.debugMode),r=!e.context;return[t,r]}function Ro(e,t=Nr(),r,n){const s=t;return s[Ue]||(s[Ue]={dragDropManager:jo(e,t,r,n)}),s[Ue]}function Nr(){return typeof global<"u"?global:window}function Po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var at,Zt;function Mo(){return Zt||(Zt=1,at=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),at}var Vo=Mo();const Fo=Po(Vo),we=typeof window<"u"?f.useLayoutEffect:f.useEffect;function Ho(e,t,r){const[n,s]=f.useState(()=>t(e)),i=f.useCallback(()=>{const a=t(e);Fo(n,a)||(s(a),r&&r())},[n,e,r]);return we(i),[n,i]}function Ao(e,t,r){const[n,s]=Ho(e,t,r);return we(function(){const a=e.getHandlerId();if(a!=null)return e.subscribeToStateChange(s,{handlerIds:[a]})},[e,s]),n}function Rr(e,t,r){return Ao(t,e||(()=>({})),()=>r.reconnect())}function Pr(e,t){const r=[...t||[]];return t==null&&typeof e!="function"&&r.push(e),f.useMemo(()=>typeof e=="function"?e():e,r)}function _o(e){return f.useMemo(()=>e.hooks.dragSource(),[e])}function zo(e){return f.useMemo(()=>e.hooks.dragPreview(),[e])}let lt=!1,ct=!1;class Bo{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){k(!lt,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return lt=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{lt=!1}}isDragging(){if(!this.sourceId)return!1;k(!ct,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ct=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{ct=!1}}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,r){return this.internalMonitor.isOverTarget(t,r)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let dt=!1;class Go{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}canDrop(){if(!this.targetId)return!1;k(!dt,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return dt=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{dt=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function $o(e,t,r){const n=r.getRegistry(),s=n.addTarget(e,t);return[s,()=>n.removeTarget(s)]}function Wo(e,t,r){const n=r.getRegistry(),s=n.addSource(e,t);return[s,()=>n.removeSource(s)]}function vt(e,t,r,n){let s;if(s!==void 0)return!!s;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let c=0;c<i.length;c++){const u=i[c];if(!l(u))return!1;const d=e[u],g=t[u];if(s=void 0,s===!1||s===void 0&&d!==g)return!1}return!0}function yt(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Uo(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function qo(e){return(t=null,r=null)=>{if(!f.isValidElement(t)){const i=t;return e(i,r),i}const n=t;return Uo(n),Zo(n,r?i=>e(i,r):e)}}function Mr(e){const t={};return Object.keys(e).forEach(r=>{const n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{const s=qo(n);t[r]=()=>s}}),t}function Xt(e,t){typeof e=="function"?e(t):e.current=t}function Zo(e,t){const r=e.ref;return k(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?f.cloneElement(e,{ref:n=>{Xt(r,n),Xt(t,n)}}):f.cloneElement(e,{ref:t})}class Xo{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return r&&this.disconnectDragSource(),this.handlerId?t?(r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),r):(this.lastConnectedDragSource=t,r):r}reconnectDragPreview(t=!1){const r=this.dragPreview,n=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!r){this.lastConnectedDragPreview=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=r,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,r,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!vt(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!vt(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=Mr({dragSource:(r,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,yt(r)?this.dragSourceRef=r:this.dragSourceNode=r,this.reconnectDragSource()},dragPreview:(r,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,yt(r)?this.dragPreviewRef=r:this.dragPreviewNode=r,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class Yo{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!vt(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=Mr({dropTarget:(r,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,yt(r)?this.dropTargetRef=r:this.dropTargetNode=r,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function Oe(){const{dragDropManager:e}=f.useContext(Ir);return k(e!=null,"Expected drag drop context"),e}function Ko(e,t){const r=Oe(),n=f.useMemo(()=>new Xo(r.getBackend()),[r]);return we(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),we(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function Jo(){const e=Oe();return f.useMemo(()=>new Bo(e),[e])}class Qo{beginDrag(){const t=this.spec,r=this.monitor;let n=null;return typeof t.item=="object"?n=t.item:typeof t.item=="function"?n=t.item(r):n={},n??null}canDrag(){const t=this.spec,r=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(r):!0}isDragging(t,r){const n=this.spec,s=this.monitor,{isDragging:i}=n;return i?i(s):r===t.getSourceId()}endDrag(){const t=this.spec,r=this.monitor,n=this.connector,{end:s}=t;s&&s(r.getItem(),r),n.reconnect()}constructor(t,r,n){this.spec=t,this.monitor=r,this.connector=n}}function ei(e,t,r){const n=f.useMemo(()=>new Qo(e,t,r),[t,r]);return f.useEffect(()=>{n.spec=e},[e]),n}function ti(e){return f.useMemo(()=>{const t=e.type;return k(t!=null,"spec.type must be defined"),t},[e])}function ri(e,t,r){const n=Oe(),s=ei(e,t,r),i=ti(e);we(function(){if(i!=null){const[l,c]=Wo(i,s,n);return t.receiveHandlerId(l),r.receiveHandlerId(l),c}},[n,t,r,s,i])}function ni(e,t){const r=Pr(e,t);k(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=Jo(),s=Ko(r.options,r.previewOptions);return ri(r,n,s),[Rr(r.collect,n,s),_o(s),zo(s)]}function si(e){return f.useMemo(()=>e.hooks.dropTarget(),[e])}function oi(e){const t=Oe(),r=f.useMemo(()=>new Yo(t.getBackend()),[t]);return we(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function ii(){const e=Oe();return f.useMemo(()=>new Go(e),[e])}function ai(e){const{accept:t}=e;return f.useMemo(()=>(k(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class li{canDrop(){const t=this.spec,r=this.monitor;return t.canDrop?t.canDrop(r.getItem(),r):!0}hover(){const t=this.spec,r=this.monitor;t.hover&&t.hover(r.getItem(),r)}drop(){const t=this.spec,r=this.monitor;if(t.drop)return t.drop(r.getItem(),r)}constructor(t,r){this.spec=t,this.monitor=r}}function ci(e,t){const r=f.useMemo(()=>new li(e,t),[t]);return f.useEffect(()=>{r.spec=e},[e]),r}function di(e,t,r){const n=Oe(),s=ci(e,t),i=ai(e);we(function(){const[l,c]=$o(i,s,n);return t.receiveHandlerId(l),r.receiveHandlerId(l),c},[n,t,s,r,i.map(a=>a.toString()).join("|")])}function Vr(e,t){const r=Pr(e,t),n=ii(),s=oi(r.options);return di(r,n,s),[Rr(r.collect,n,s),si(s)]}const Yt="column",ui="flex items-center",fi="mr-3 cursor-move text-secondary",pi=({id:e,children:t,cssClass:r,findItem:n,moveItem:s,handleAriaLabel:i="Drag item"})=>{const a=f.useRef(null),l=f.useRef(null),c=typeof n=="function"?n(e):-1,[{isDragging:u},d,g]=ni(()=>({type:Yt,item:{id:e,originalIndex:c},collect:p=>{const x=p.getItem();return{isDragging:p.isDragging()&&x?.id===e}},end:(p,x)=>{if(!p)return;!x.didDrop()&&typeof s=="function"&&p.originalIndex>-1&&s(p.id,p.originalIndex)}}),[e,c,s]),[,h]=Vr(()=>({accept:Yt,hover:p=>{if(!(!p||p.id===e)&&typeof n=="function"&&typeof s=="function"){const x=n(e);s(p.id,x)}}}),[n,s,e]);return g(h(l)),d(a),o.jsxs("div",{ref:l,className:A(ui,r),style:{opacity:u?0:1},"aria-roledescription":"Draggable item",children:[o.jsx("div",{ref:a,className:fi,"aria-label":i,children:o.jsx(L.IconGripVertical,{...J})}),t]})},gi=e=>O.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("path",{d:"M3.68628 10.3945C3.91003 10.408 4.10927 10.4422 4.2832 10.4978L4.28394 10.4971C4.5167 10.5698 4.71621 10.6662 4.87939 10.7871C4.9994 10.876 5.10332 10.974 5.18994 11.0815L5.27051 11.1929L5.27197 11.1943L5.34009 11.3079C5.38301 11.3838 5.42067 11.4597 5.45288 11.5356L5.49683 11.6492L5.49756 11.6514L5.53198 11.7649C5.56274 11.877 5.5838 11.9867 5.59497 12.0938C5.61194 12.23 5.62059 12.3501 5.62061 12.4534C5.62061 12.6166 5.57231 12.7639 5.47559 12.8906C5.41544 12.9694 5.325 13.0198 5.21997 13.0503C5.11455 13.0809 4.98537 13.0942 4.83691 13.0942C4.73711 13.0942 4.62608 13.0838 4.50439 13.0635C4.37577 13.0415 4.26002 12.9966 4.16089 12.9272L4.15869 12.9258C4.04118 12.8396 3.98657 12.7121 3.98657 12.5625C3.98655 12.2721 3.94576 12.0552 3.87231 11.9033L3.87158 11.9011C3.81572 11.7798 3.69406 11.7026 3.45337 11.7026C3.33114 11.7027 3.25307 11.7292 3.20435 11.7671C3.14221 11.8149 3.10061 11.864 3.07617 11.9128C3.04149 11.985 3.02355 12.0599 3.02124 12.1384V14.7905L3.02637 14.8652C3.03466 14.9384 3.05266 15.0073 3.07983 15.0725L3.10254 15.1201C3.12874 15.1672 3.16488 15.2124 3.21167 15.2556C3.2602 15.2978 3.33572 15.3259 3.45337 15.3259C3.56813 15.3259 3.65533 15.3041 3.71997 15.2673C3.78314 15.2313 3.83208 15.1772 3.86646 15.0996C3.94535 14.9186 3.98655 14.7002 3.98657 14.4412C3.98657 14.3004 4.04381 14.1839 4.1499 14.0991L4.19824 14.0647C4.33673 13.9762 4.55866 13.9431 4.83691 13.9431C5.09384 13.9431 5.30559 13.9858 5.43604 14.1013C5.55182 14.204 5.62061 14.3293 5.62061 14.4749C5.62057 14.7549 5.57953 15.0125 5.49536 15.2461L5.45654 15.3442C5.36294 15.5677 5.23261 15.7627 5.06543 15.928L4.99146 15.9968C4.58057 16.3629 4.03856 16.541 3.37793 16.541L3.12671 16.5278C3.00679 16.5188 2.87303 16.495 2.72607 16.4575C2.61505 16.4287 2.50136 16.3894 2.38696 16.3396L2.27197 16.2861C2.1155 16.2094 1.9705 16.0983 1.83691 15.9558L1.83618 15.9551C1.70598 15.8128 1.59909 15.6391 1.51392 15.4365L1.51318 15.4351C1.42797 15.2251 1.38722 14.9736 1.38721 14.6843V12.345C1.38721 12.1069 1.41644 11.892 1.47656 11.7026C1.52068 11.5616 1.57629 11.4337 1.64355 11.3196L1.7146 11.2097C1.81013 11.07 1.92167 10.9524 2.04932 10.8582C2.17206 10.7676 2.29884 10.6909 2.42871 10.6289L2.54297 10.5798C2.81231 10.4716 3.11394 10.4081 3.44678 10.3879L3.45337 10.3872L3.68628 10.3945Z",fill:"currentColor"}),O.createElement("path",{d:"M8.10791 11.7371C8.33261 11.7371 8.5218 11.8023 8.61255 11.9758C8.68772 12.1131 8.72383 12.2741 8.72388 12.4534V12.7522H9.03003C9.21461 12.7522 9.37781 12.7845 9.5127 12.8562C9.68704 12.9456 9.7463 13.149 9.74634 13.3843C9.74634 13.612 9.68105 13.8034 9.50537 13.894L9.5061 13.8948C9.36923 13.9665 9.20861 14.0002 9.03003 14.0002H8.72388V14.3064C8.72388 14.4941 8.68994 14.6588 8.61768 14.7942L8.61841 14.7949C8.5293 14.9647 8.334 15.0226 8.10791 15.0227C7.87257 15.0227 7.66761 14.9685 7.5769 14.8L7.57617 14.7993C7.50612 14.6659 7.47583 14.4988 7.47583 14.3064V14.0002H7.18579C6.99507 14.0002 6.82804 13.9669 6.69214 13.894C6.52182 13.8026 6.46069 13.6102 6.46069 13.3843C6.46073 13.1491 6.51509 12.944 6.68335 12.8533L6.68481 12.8525L6.79102 12.8079C6.90305 12.7697 7.03293 12.7522 7.177 12.7522H7.47583V12.4534C7.47587 12.2683 7.50712 12.1056 7.57617 11.9707L7.5769 11.9685L7.61646 11.9092C7.72038 11.7825 7.90134 11.7371 8.10791 11.7371Z",fill:"currentColor"}),O.createElement("path",{d:"M12.728 11.7371C12.9527 11.7371 13.1419 11.8023 13.2327 11.9758C13.3078 12.1131 13.3439 12.2741 13.344 12.4534V12.7522H13.6501C13.8347 12.7522 13.9979 12.7845 14.1328 12.8562C14.3072 12.9456 14.3664 13.149 14.3665 13.3843C14.3665 13.612 14.3012 13.8034 14.1255 13.894L14.1262 13.8948C13.9894 13.9665 13.8287 14.0002 13.6501 14.0002H13.344V14.3064C13.344 14.4941 13.3101 14.6588 13.2378 14.7942L13.2385 14.7949C13.1494 14.9647 12.9541 15.0226 12.728 15.0227C12.4927 15.0227 12.2877 14.9685 12.197 14.8L12.1963 14.7993C12.1262 14.6659 12.0959 14.4988 12.0959 14.3064V14.0002H11.8059C11.6152 14.0002 11.4482 13.9669 11.3123 13.894C11.1419 13.8026 11.0808 13.6102 11.0808 13.3843C11.0808 13.1491 11.1352 12.944 11.3035 12.8533L11.3049 12.8525L11.4111 12.8079C11.5232 12.7697 11.653 12.7522 11.7971 12.7522H12.0959V12.4534C12.096 12.2683 12.1272 12.1056 12.1963 11.9707L12.197 11.9685L12.2366 11.9092C12.3405 11.7825 12.5215 11.7371 12.728 11.7371Z",fill:"currentColor"}),O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),hi=e=>O.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("path",{d:"M4.29639 10.3945C4.50665 10.4083 4.69413 10.4433 4.85815 10.5L4.85889 10.4993C5.07789 10.5733 5.26574 10.6715 5.41919 10.7944C5.53204 10.8849 5.62958 10.9843 5.71069 11.0933L5.78613 11.2053L5.78687 11.2068L5.85059 11.3218C5.89058 11.3983 5.92606 11.4746 5.95605 11.551L5.99707 11.666L5.9978 11.6682L6.05566 11.8945C6.0708 11.9689 6.08168 12.0422 6.08862 12.1143C6.10449 12.252 6.11279 12.3734 6.11279 12.4775C6.11276 12.6403 6.06824 12.7876 5.97803 12.9155C5.92155 12.9956 5.83545 13.0472 5.73486 13.0789C5.63441 13.1104 5.51212 13.1243 5.37231 13.1243C5.32505 13.1243 5.27524 13.1215 5.2229 13.1162L5.05811 13.0928C4.93553 13.0701 4.82533 13.024 4.73145 12.9529L4.72998 12.9514C4.61882 12.8632 4.56958 12.7352 4.56958 12.5874C4.56955 12.2926 4.5312 12.0715 4.46191 11.9165L4.46045 11.9143C4.4319 11.8474 4.38931 11.8003 4.33154 11.7686C4.27185 11.7358 4.18944 11.7158 4.07812 11.7158C3.96626 11.7158 3.89622 11.7421 3.85254 11.7788C3.79519 11.8265 3.75637 11.8759 3.73315 11.926C3.70026 11.9999 3.68262 12.0771 3.68042 12.1582V14.8425L3.68555 14.9187C3.69337 14.9937 3.71038 15.0643 3.73608 15.1311L3.75732 15.1802C3.78176 15.2276 3.81496 15.2727 3.85767 15.3157L3.89575 15.3442C3.93843 15.3699 3.99697 15.386 4.07812 15.386C4.18296 15.386 4.26146 15.3647 4.31982 15.3289C4.37727 15.2935 4.4233 15.2389 4.45605 15.1589C4.53037 14.9746 4.56957 14.7522 4.56958 14.4888C4.56958 14.3307 4.63662 14.2007 4.7666 14.1116L4.82007 14.0801C4.95284 14.0119 5.14337 13.9856 5.37231 13.9856C5.61445 13.9856 5.81633 14.0298 5.94067 14.1489C6.04986 14.2536 6.11274 14.379 6.11279 14.5225C6.11279 14.8453 6.06245 15.1386 5.95972 15.3999C5.85998 15.6574 5.71501 15.8781 5.52466 16.0598L5.52393 16.0591C5.13817 16.4307 4.62871 16.6128 4.00708 16.6128C3.95774 16.6128 3.87811 16.6081 3.77124 16.5996C3.65793 16.5904 3.53127 16.5659 3.39331 16.5278C3.28866 16.4984 3.18149 16.4584 3.07397 16.4077L2.96631 16.3535C2.81858 16.2752 2.68196 16.1624 2.55688 16.0181L2.55615 16.0166C2.43435 15.8725 2.33453 15.6972 2.25513 15.4929L2.25439 15.4915C2.17508 15.28 2.13721 15.0267 2.13721 14.7349V12.3669C2.13721 12.1269 2.16476 11.9109 2.2207 11.7202L2.26538 11.5825C2.3136 11.4491 2.37234 11.3289 2.44263 11.2229C2.53187 11.0816 2.63607 10.9621 2.7561 10.8662C2.87117 10.7743 2.98996 10.6964 3.11206 10.6333L3.11353 10.6326L3.22046 10.5828C3.47384 10.4727 3.75793 10.4085 4.0708 10.3879L4.07812 10.3872L4.29639 10.3945Z",fill:"currentColor"}),O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H8.625C8.21079 16.5 7.875 16.1642 7.875 15.75C7.875 15.3358 8.21079 15 8.625 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),mi=e=>O.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("path",{d:"M3.62109 10.571C3.83849 10.5842 4.03206 10.618 4.20117 10.6721L4.2019 10.6714C4.42776 10.742 4.62121 10.8352 4.77979 10.9526C4.89663 11.0392 4.99793 11.135 5.08228 11.2397L5.16064 11.3474L5.16211 11.3489L5.22803 11.4595C5.26973 11.5332 5.30659 11.6069 5.33789 11.6807L5.38037 11.7905L5.3811 11.7935L5.44116 12.0117C5.45675 12.0826 5.46834 12.1524 5.47559 12.2212L5.49463 12.4087C5.49888 12.4674 5.50049 12.5222 5.50049 12.5728C5.50045 12.7317 5.45415 12.8755 5.35986 12.999C5.30088 13.0762 5.2117 13.1246 5.10938 13.1543C5.0067 13.1841 4.88146 13.1975 4.7373 13.1975C4.64029 13.1975 4.53244 13.1872 4.41431 13.1675C4.28898 13.1461 4.17557 13.1026 4.07886 13.0349L4.07739 13.0334C3.96236 12.9491 3.90894 12.8243 3.90894 12.6782C3.90893 12.3968 3.86925 12.187 3.79834 12.0403L3.79761 12.0381C3.74418 11.922 3.62816 11.847 3.39551 11.8469C3.27715 11.8469 3.20179 11.873 3.15527 11.9092C3.09597 11.9548 3.05572 12.0012 3.03223 12.0476L3.03296 12.0483C2.99919 12.1182 2.98102 12.1906 2.97876 12.2666V14.8396L2.98389 14.9114C2.99188 14.9821 3.00888 15.049 3.03516 15.1121L3.05786 15.1582C3.08304 15.2033 3.11768 15.2464 3.1626 15.2878C3.2089 15.3285 3.28115 15.356 3.39551 15.356C3.50633 15.3559 3.58982 15.3349 3.65186 15.2996C3.71249 15.2651 3.75936 15.2131 3.79248 15.1384L3.84302 15.0007C3.88665 14.8554 3.90893 14.6891 3.90894 14.5005C3.90894 14.363 3.96502 14.2494 4.0686 14.1665L4.11621 14.1328C4.25147 14.0465 4.46739 14.0134 4.7373 14.0134C4.98658 14.0134 5.19278 14.0552 5.32031 14.168C5.43323 14.268 5.5004 14.3903 5.50049 14.5327C5.50049 14.8049 5.46077 15.0556 5.37891 15.2827L5.34155 15.3779C5.23762 15.6261 5.08621 15.8373 4.88892 16.0115L4.88965 16.0122C4.49029 16.3681 3.96383 16.541 3.32227 16.541C3.27168 16.541 3.18935 16.5367 3.07837 16.5286C3.02014 16.5242 2.95789 16.5158 2.89307 16.5044L2.68799 16.4597C2.5801 16.4317 2.47025 16.3938 2.35913 16.3455L2.2478 16.2935C2.09553 16.2188 1.95433 16.1112 1.82446 15.9727L1.82373 15.9712C1.69712 15.8328 1.593 15.6642 1.51025 15.4673L1.50952 15.4658C1.42669 15.2616 1.38721 15.0172 1.38721 14.7363V12.4666C1.38723 12.2355 1.41597 12.0273 1.47437 11.8433C1.53119 11.6615 1.60684 11.502 1.70361 11.3665L1.77686 11.2676C1.85263 11.1732 1.9374 11.0913 2.03101 11.0222C2.15024 10.9342 2.27322 10.8598 2.39941 10.7996L2.40015 10.7988L2.51074 10.7512C2.77229 10.6462 3.0652 10.5848 3.38818 10.5652L3.39551 10.5645L3.62109 10.571Z",fill:"currentColor"}),O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.36914 11.28C9.50263 11.28 9.62352 11.3063 9.72583 11.3643L9.7251 11.365C9.85906 11.4379 9.90454 11.5838 9.90454 11.7429C9.9045 11.7567 9.90157 11.7778 9.89941 11.7935C9.89658 11.814 9.89242 11.8422 9.88696 11.8777C9.87611 11.9455 9.8639 12.0222 9.85034 12.1062C9.84553 12.136 9.84018 12.1643 9.83569 12.1912H10.0525C10.1919 12.1912 10.3171 12.2148 10.4216 12.2688L10.4209 12.2695C10.5686 12.3412 10.6128 12.5089 10.6128 12.6863C10.6128 12.8587 10.5617 13.0123 10.4194 13.0898L10.4187 13.0906C10.3122 13.1472 10.1885 13.1726 10.0525 13.1726H9.67529L9.55225 13.8589H9.75952C9.89706 13.8589 10.0206 13.8819 10.1243 13.9343C10.2748 14.005 10.3198 14.1752 10.3198 14.354C10.3198 14.5291 10.2702 14.6875 10.1243 14.7627L10.1235 14.7634C10.0176 14.8164 9.89461 14.8403 9.75952 14.8403H9.38452L9.33398 15.1677L9.33325 15.1714C9.30492 15.3271 9.26297 15.4669 9.20728 15.5903L9.20801 15.5911C9.17656 15.6626 9.13001 15.7228 9.06592 15.7646C9.00162 15.8065 8.92683 15.8247 8.84839 15.8247C8.72 15.8247 8.60307 15.8041 8.50122 15.7581L8.49976 15.7573C8.35755 15.6908 8.31299 15.5386 8.31299 15.3787C8.31299 15.3406 8.31787 15.2939 8.32617 15.241L8.35913 15.0242C8.36863 14.9624 8.37948 14.9012 8.38989 14.8403H7.92847L7.87793 15.1677L7.8772 15.1714C7.84887 15.3271 7.80691 15.4669 7.75122 15.5903L7.75195 15.5911C7.72046 15.6627 7.6734 15.7228 7.60913 15.7646C7.54487 15.8064 7.47071 15.8247 7.39233 15.8247C7.26394 15.8247 7.14702 15.8041 7.04517 15.7581L7.0437 15.7573C6.90149 15.6908 6.85693 15.5387 6.85693 15.3787C6.85694 15.3406 6.86181 15.2939 6.87012 15.241L6.90308 15.0242C6.91257 14.9624 6.92342 14.9012 6.93384 14.8403H6.6687C6.52906 14.8403 6.40313 14.8167 6.29663 14.7634L6.29297 14.762C6.15355 14.6853 6.10844 14.5261 6.1084 14.354C6.1084 14.1782 6.1487 14.0079 6.29297 13.9358C6.39784 13.882 6.52535 13.8589 6.6687 13.8589H7.09497L7.21802 13.1726H6.95361C6.81311 13.1726 6.68646 13.1475 6.57935 13.0906L6.57788 13.0898C6.43874 13.0135 6.39332 12.8568 6.39331 12.6863C6.39331 12.5105 6.43361 12.3402 6.57788 12.2681C6.68271 12.2144 6.81036 12.1912 6.95361 12.1912H7.38721L7.46045 11.7561C7.47174 11.6625 7.50842 11.5673 7.56372 11.4712C7.63824 11.3418 7.76255 11.2801 7.91309 11.28C8.04657 11.28 8.16746 11.3063 8.26978 11.3643L8.26904 11.365C8.403 11.4379 8.44849 11.5838 8.44849 11.7429C8.44844 11.7567 8.44552 11.7778 8.44336 11.7935C8.44053 11.814 8.43636 11.8422 8.43091 11.8777C8.42006 11.9455 8.40784 12.0222 8.39429 12.1062C8.38947 12.136 8.38413 12.1643 8.37964 12.1912H8.84326L8.9165 11.7561C8.92779 11.6625 8.96448 11.5673 9.01978 11.4712C9.0943 11.3418 9.21861 11.2801 9.36914 11.28ZM8.09619 13.8589H8.55103L8.67407 13.1726H8.21924L8.09619 13.8589Z",fill:"currentColor"})),Ci=e=>O.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("path",{d:"M4.43188 10.4409C4.65285 10.4409 4.85471 10.4869 4.99951 10.6152L4.99878 10.6159C5.13097 10.7305 5.21409 10.881 5.25146 11.0576C5.28474 11.2148 5.30052 11.3869 5.30054 11.5724V15.4323C5.30054 15.6193 5.28417 15.7927 5.25146 15.9516L5.2522 15.9523C5.21779 16.1313 5.13551 16.2842 4.99951 16.3976L4.99878 16.3969C4.85386 16.52 4.65269 16.5646 4.43188 16.5646C4.21337 16.5646 4.01411 16.5195 3.86792 16.3976L3.86353 16.394C3.73466 16.2798 3.65263 16.1299 3.6123 15.9553L3.61157 15.9516C3.57826 15.7941 3.5625 15.6205 3.5625 15.4323V11.5724C3.56252 11.3869 3.5783 11.2148 3.61157 11.0576C3.64882 10.8815 3.72996 10.7302 3.85986 10.6152L3.86133 10.6137C4.00804 10.4875 4.2103 10.4409 4.43188 10.4409Z",fill:"currentColor"}),O.createElement("path",{d:"M8.07129 10.4474C8.18434 10.4599 8.28945 10.4924 8.3811 10.55L8.38184 10.5493C8.45754 10.5942 8.52569 10.6451 8.58472 10.7016L8.64111 10.7602L8.64331 10.7631L8.69385 10.8298C8.72596 10.8768 8.75504 10.9284 8.78101 10.9836L8.81763 11.0685L8.81909 11.0729L9.85986 13.8928V11.2692C9.85986 11.0565 9.89522 10.8654 9.98291 10.7119L9.98364 10.7104L10.0349 10.6393C10.1656 10.4886 10.3781 10.4409 10.5974 10.4409C10.8635 10.4409 11.125 10.4947 11.2529 10.6965C11.3535 10.8508 11.3928 11.0487 11.3928 11.2692V15.4323C11.3928 15.6163 11.3809 15.7863 11.3577 15.9413L11.3584 15.9421C11.3349 16.1167 11.2678 16.2708 11.1467 16.3881C11.0102 16.5202 10.8106 16.5646 10.5974 16.5646H10.0554C9.86994 16.5646 9.69972 16.5199 9.56104 16.416C9.44129 16.3261 9.3452 16.215 9.27466 16.0842C9.21353 15.9706 9.16292 15.8593 9.12378 15.7509L8.14893 13.1091V15.7363C8.14893 15.9493 8.11322 16.1406 8.02661 16.2958L8.02588 16.2973C7.90706 16.5052 7.66112 16.5646 7.41138 16.5646C7.14233 16.5646 6.88122 16.5106 6.75 16.312C6.64812 16.1572 6.60791 15.9581 6.60791 15.7363V11.5724C6.60792 11.3882 6.61818 11.2193 6.63867 11.0671V11.0641L6.66724 10.9367C6.7042 10.8142 6.76699 10.706 6.85986 10.6188C6.9982 10.4862 7.19704 10.4409 7.41138 10.4409H7.95337L8.07129 10.4474Z",fill:"currentColor"}),O.createElement("path",{d:"M13.5688 10.4409C13.7898 10.4409 13.9917 10.4869 14.1365 10.6152L14.1357 10.6159C14.2679 10.7305 14.3511 10.881 14.3884 11.0576C14.4217 11.2148 14.4375 11.3869 14.4375 11.5724V15.4323C14.4375 15.6193 14.4211 15.7927 14.3884 15.9516L14.3892 15.9523C14.3548 16.1313 14.2725 16.2842 14.1365 16.3976L14.1357 16.3969C13.9908 16.52 13.7897 16.5646 13.5688 16.5646C13.3503 16.5646 13.1511 16.5195 13.0049 16.3976L13.0005 16.394C12.8716 16.2798 12.7896 16.1299 12.7493 15.9553L12.7485 15.9516C12.7152 15.7941 12.6995 15.6205 12.6995 15.4323V11.5724C12.6995 11.3869 12.7153 11.2148 12.7485 11.0576C12.7858 10.8815 12.8669 10.7302 12.9968 10.6152L12.9983 10.6137C13.145 10.4875 13.3473 10.4409 13.5688 10.4409Z",fill:"currentColor"}),O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50385C10.7457 1.52087 10.9072 1.59681 11.0303 1.71991L14.7803 5.46991C14.9208 5.61054 15 5.80136 15 6.00018V9.00018C14.9998 9.41423 14.6641 9.75018 14.25 9.75018C13.8359 9.75018 13.5002 9.41423 13.5 9.00018V6.75018H11.25C10.8523 6.75018 10.4707 6.59192 10.1895 6.31073C9.90824 6.02951 9.7501 5.64788 9.75 5.25018V3.00018H5.25C5.05109 3.00018 4.86038 3.07926 4.71973 3.21991C4.57919 3.36054 4.5 3.55136 4.5 3.75018V9.00018C4.4998 9.41423 4.16409 9.75018 3.75 9.75018C3.33591 9.75018 3.0002 9.41423 3 9.00018V3.75018C3 3.15353 3.23734 2.5813 3.65918 2.15936C4.08114 1.73741 4.65326 1.50018 5.25 1.50018H10.5L10.574 1.50385ZM11.25 5.25018H12.4395L11.25 4.06073V5.25018Z",fill:"currentColor"})),xi=e=>O.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("path",{d:"M6.76831 10.8267C6.93291 10.8267 7.08404 10.8408 7.22021 10.8691L7.35205 10.9021L7.35278 10.9028L7.46851 10.9431C7.57872 10.986 7.67614 11.038 7.75928 11.0991C7.84245 11.1591 7.91481 11.2265 7.97388 11.3005L8.02881 11.3767L8.02954 11.3774L8.11011 11.5254C8.13317 11.5747 8.15233 11.6249 8.16797 11.6755C8.19815 11.7711 8.21863 11.8631 8.22656 11.9502C8.23376 12.0294 8.23755 12.096 8.23755 12.1479C8.23753 12.318 8.17338 12.4626 8.04639 12.572C7.92503 12.676 7.77653 12.7265 7.60913 12.7266C7.4711 12.7266 7.34146 12.6749 7.22241 12.583C7.1027 12.4905 7.02328 12.3741 7.02319 12.2329C7.02319 12.0468 6.98759 11.9498 6.94775 11.907L6.94629 11.9055C6.90561 11.8606 6.83878 11.8294 6.72583 11.8293C6.58234 11.8293 6.48534 11.856 6.42334 11.896C6.4086 11.9056 6.38747 11.9281 6.37061 11.981C6.35372 12.0341 6.34351 12.1099 6.34351 12.2117C6.34581 12.2878 6.36799 12.3546 6.40869 12.4153C6.45761 12.4821 6.52298 12.549 6.60718 12.6138L6.73608 12.7053C6.78632 12.7386 6.84449 12.7751 6.9104 12.8145C7.04454 12.8945 7.16167 12.9644 7.2605 13.0232L7.44507 13.1426C7.50565 13.1844 7.56597 13.2284 7.62524 13.2744C7.74715 13.3666 7.8562 13.4715 7.95337 13.5886C8.05276 13.7085 8.13297 13.8432 8.1936 13.9922C8.25599 14.1456 8.28891 14.3172 8.29395 14.5049V14.5364C8.29395 14.7339 8.26896 14.9141 8.21777 15.0754V15.0776C8.11696 15.3776 7.94914 15.6082 7.7124 15.761L7.71313 15.7617C7.62701 15.8179 7.53944 15.8644 7.45166 15.9016L7.36304 15.936C7.30225 15.9571 7.24075 15.9753 7.1792 15.9902L6.99243 16.0261C6.87331 16.0431 6.75886 16.0529 6.65039 16.0554H6.61304C6.41017 16.0554 6.22414 16.0345 6.05786 15.9917C5.89914 15.9495 5.75823 15.8922 5.63892 15.8196L5.63745 15.8188C5.52025 15.7449 5.42093 15.6589 5.34155 15.561C5.26338 15.4674 5.20001 15.3681 5.15332 15.2644C5.10802 15.1659 5.07431 15.0659 5.05371 14.9656C5.03361 14.8676 5.02297 14.7738 5.02295 14.6851C5.02295 14.5014 5.0798 14.3447 5.20898 14.2375L5.20972 14.2368L5.30493 14.1731C5.40409 14.1186 5.51594 14.0918 5.63745 14.0918C5.79553 14.0919 5.94175 14.1407 6.07251 14.2354L6.12451 14.2764C6.2216 14.3622 6.27861 14.4745 6.2959 14.6067L6.30103 14.6741L6.31055 14.7847C6.32502 14.8796 6.35383 14.9312 6.38306 14.9568C6.43071 14.9963 6.50789 15.0238 6.63135 15.0242C6.76743 15.0198 6.85874 14.9863 6.91772 14.9355L6.91846 14.9341L6.95361 14.8938C6.98575 14.8434 7.00924 14.7604 7.00928 14.6287C7.00928 14.4903 6.96843 14.3706 6.8877 14.2661L6.88696 14.2646C6.80068 14.1504 6.68858 14.0439 6.55078 13.946L6.55005 13.9453C6.40626 13.841 6.25592 13.7396 6.10034 13.6421C5.93262 13.5343 5.77326 13.4207 5.62427 13.303L5.62354 13.3022C5.46846 13.1772 5.34021 13.0351 5.24121 12.8752C5.13746 12.7076 5.0852 12.514 5.08008 12.2988V12.2388L5.0874 12.0505C5.10126 11.869 5.13388 11.7086 5.18628 11.5708V11.5693L5.2478 11.4382C5.31532 11.3136 5.40255 11.2077 5.51074 11.1233L5.62207 11.0464C5.73813 10.9764 5.87099 10.9263 6.01831 10.894C6.21201 10.8494 6.43196 10.8267 6.67603 10.8267H6.76831Z",fill:"currentColor"}),O.createElement("path",{d:"M14.2266 10.8062C14.3565 10.8062 14.4736 10.8329 14.5693 10.8933L14.5701 10.8926L14.5715 10.894L14.5737 10.8948L14.573 10.8955C14.6342 10.9321 14.6895 10.9722 14.7363 11.0171L14.781 11.064L14.7825 11.0662L14.8235 11.1204C14.8363 11.1392 14.8492 11.159 14.8608 11.1797L14.9246 11.3159L14.9253 11.3181L15.9163 14.0024V11.4705C15.9163 11.2922 15.9461 11.1369 16.0159 11.0149L16.054 10.9607C16.1527 10.8467 16.3175 10.8062 16.5022 10.8062C16.7284 10.8062 16.9271 10.8532 17.0229 11.0017C17.1032 11.1237 17.1379 11.2847 17.1379 11.4705V15.0535C17.1379 15.21 17.1275 15.3541 17.1079 15.4849L17.1086 15.4856C17.0896 15.6273 17.0355 15.7491 16.9409 15.8408C16.837 15.9414 16.6806 15.9784 16.5022 15.9785H16.0356C15.8837 15.9785 15.7483 15.9422 15.6394 15.8606C15.5419 15.7874 15.4638 15.6974 15.4065 15.5911C15.3549 15.4953 15.3125 15.4018 15.2798 15.3113L14.3459 12.7815V15.3149C14.3459 15.4932 14.316 15.6489 14.2471 15.7727L14.2463 15.7734C14.158 15.9281 13.9711 15.9784 13.76 15.9785C13.53 15.9785 13.3292 15.9315 13.2312 15.783C13.151 15.6609 13.1169 15.5006 13.1169 15.3149V11.7319C13.117 11.575 13.126 11.4319 13.1433 11.3035V11.3013L13.166 11.1987C13.1955 11.1009 13.2454 11.0157 13.3176 10.9475L13.3594 10.9124C13.4627 10.8363 13.6027 10.8062 13.76 10.8062H14.2266Z",fill:"currentColor"}),O.createElement("path",{d:"M3.62183 10.73C3.8058 10.73 3.96571 10.7696 4.07959 10.8677C4.185 10.9586 4.25306 11.0796 4.28613 11.2229C4.31675 11.3557 4.33154 11.5018 4.33154 11.6602V14.3606C4.33154 14.617 4.29481 14.8413 4.21655 15.0293C4.15993 15.1652 4.09098 15.286 4.00928 15.3896L3.92285 15.4878C3.80762 15.6056 3.67869 15.6971 3.5376 15.7625L3.53833 15.7632C3.40115 15.8269 3.27011 15.872 3.14722 15.8979L3.14795 15.8987C3.09669 15.9112 3.04501 15.9213 2.99414 15.9294L2.8418 15.9478C2.74998 15.9548 2.68156 15.9587 2.64111 15.9587C2.3706 15.9587 2.13396 15.928 1.93506 15.8643C1.73937 15.8022 1.56914 15.7204 1.42749 15.6174C1.28776 15.5158 1.17335 15.3984 1.08691 15.2651L1.02686 15.1685C0.970789 15.0715 0.926873 14.9732 0.895752 14.874L0.896484 14.8733C0.852315 14.745 0.821564 14.6203 0.806396 14.499L0.805664 14.4968C0.793555 14.3806 0.786621 14.2779 0.786621 14.1899C0.786659 14.0481 0.829716 13.9196 0.914062 13.8091C0.968035 13.7386 1.04873 13.6949 1.13965 13.6685C1.231 13.642 1.34202 13.6297 1.46851 13.6296C1.55651 13.6297 1.65224 13.6393 1.75415 13.6567C1.8653 13.6758 1.96539 13.7157 2.05151 13.7783C2.15785 13.853 2.20677 13.9666 2.20679 14.0977C2.20679 14.3421 2.24112 14.5246 2.302 14.6528L2.32178 14.6865C2.37332 14.7613 2.46833 14.8095 2.64111 14.8096C2.74386 14.8095 2.80532 14.7883 2.8396 14.762L2.84106 14.7605L2.90552 14.7019C2.92253 14.6822 2.9356 14.6623 2.94507 14.6426L2.97803 14.5518C2.98565 14.5209 2.98953 14.4889 2.99048 14.4565V11.9641H2.17236C2.0293 11.9641 1.8922 11.9536 1.76221 11.9312L1.76001 11.9304C1.62252 11.9035 1.50268 11.8482 1.40698 11.7612L1.40625 11.7598C1.30008 11.6602 1.25688 11.5177 1.25684 11.3547C1.25684 11.1882 1.29936 11.0419 1.40625 10.9417C1.49986 10.8517 1.6187 10.7951 1.75635 10.7681L1.9585 10.7395C2.02775 10.7333 2.09935 10.73 2.17236 10.73H3.62183Z",fill:"currentColor"}),O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0061 10.8398C11.1058 10.8474 11.2146 10.8676 11.3313 10.8984L11.332 10.8977C11.4562 10.9275 11.5817 10.9747 11.7078 11.0376L11.803 11.0896C11.8653 11.1277 11.926 11.1727 11.9839 11.2244L12.0688 11.3071L12.0696 11.3079L12.1472 11.4001C12.2197 11.4965 12.2807 11.608 12.3303 11.7327L12.3772 11.8674C12.417 12.0081 12.4358 12.1667 12.4358 12.3406V14.4111C12.4358 14.649 12.4035 14.8579 12.3347 15.0337L12.334 15.0352C12.2654 15.204 12.1782 15.349 12.071 15.4666C11.9653 15.5823 11.8439 15.6747 11.7085 15.7412L11.7078 15.7405C11.5864 15.8034 11.4622 15.8534 11.335 15.8877C11.2172 15.9189 11.1066 15.9387 11.0061 15.9463C10.9136 15.9532 10.8413 15.9573 10.793 15.9573H10.675L10.4626 15.9463C10.362 15.9387 10.2518 15.919 10.1338 15.8877C10.0122 15.8554 9.8873 15.8055 9.75952 15.7405C9.62706 15.6742 9.50578 15.5832 9.39624 15.4688L9.39551 15.468C9.28579 15.3506 9.19561 15.2056 9.12451 15.0366L9.12378 15.0352C9.05226 14.8589 9.01835 14.6495 9.01831 14.4111V12.3406C9.01831 12.105 9.05259 11.8998 9.12451 11.7297C9.19368 11.5618 9.28389 11.4184 9.39697 11.3027C9.50677 11.1905 9.62826 11.1014 9.76099 11.0376C9.82393 11.0062 9.88688 10.9792 9.94849 10.957L9.94922 10.9563L10.1323 10.8992L10.1345 10.8984L10.3066 10.8604C10.3612 10.8506 10.4136 10.8436 10.4626 10.8398L10.675 10.8289H10.793C10.8413 10.8289 10.9136 10.8329 11.0061 10.8398ZM10.738 11.9473C10.6399 11.9473 10.5796 11.9688 10.5439 11.9963L10.5432 11.9971C10.4934 12.0354 10.4596 12.0746 10.4385 12.1135L10.4377 12.1143C10.4103 12.1641 10.3949 12.222 10.3931 12.2886V14.5393L10.4062 14.6309L10.4385 14.7151L10.4392 14.7158L10.481 14.7766C10.4976 14.7958 10.5181 14.8147 10.5417 14.833L10.5732 14.8521C10.6101 14.8689 10.6637 14.8806 10.738 14.8806C10.8345 14.8805 10.8925 14.8598 10.9255 14.8345C10.9743 14.7969 11.0075 14.7565 11.0288 14.7158C11.054 14.6605 11.0699 14.5993 11.0757 14.5327V12.2944L11.0588 12.197C11.051 12.167 11.0406 12.138 11.0281 12.1106C11.0069 12.0728 10.9738 12.0343 10.9255 11.9971L10.9233 11.9949C10.8905 11.9684 10.8335 11.9474 10.738 11.9473Z",fill:"currentColor"}),O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),bi=e=>O.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),O.createElement("path",{d:"M2.39355 10.5C2.53545 10.5 2.6592 10.5122 2.75757 10.5417C2.88987 10.5815 2.99161 10.6954 3.07251 10.8289L3.15747 10.9885L3.25195 11.2031L3.25269 11.2046L3.35229 11.4683C3.38786 11.5664 3.42601 11.6752 3.46655 11.7942L3.76318 12.6665L3.76392 12.6687L3.76904 12.6848L3.79907 12.5911L3.94849 12.1348C3.99515 11.9948 4.03674 11.8689 4.073 11.7576L4.07373 11.7561L4.1814 11.4434C4.21489 11.3495 4.24596 11.265 4.27515 11.1907L4.36084 10.9849C4.38855 10.9239 4.41584 10.8705 4.44214 10.8252C4.51581 10.6953 4.61188 10.5823 4.74243 10.5417H4.7439L4.82153 10.5227C4.90321 10.5069 4.99686 10.5 5.09985 10.5H5.67041C5.87137 10.5 6.05265 10.5425 6.17505 10.6619L6.17944 10.6655C6.29073 10.7714 6.35329 10.9108 6.375 11.072C6.39695 11.2133 6.40721 11.3701 6.40723 11.5415V15.5149C6.4072 15.7232 6.3696 15.9065 6.27686 16.0474C6.16065 16.2235 5.92578 16.2751 5.67041 16.2751C5.43573 16.2751 5.21924 16.2184 5.11157 16.0378L5.10938 16.0342C5.03005 15.8921 4.9966 15.7149 4.99658 15.5149V12.8335L4.4436 14.4456L4.44141 14.4521C4.39239 14.576 4.32667 14.6919 4.24658 14.8008L4.24731 14.8015C4.14341 14.9438 3.9882 15.008 3.80933 15.0081H3.73096C3.55351 15.008 3.40015 14.9437 3.29004 14.8081L3.28857 14.8066C3.20076 14.6954 3.13356 14.575 3.08862 14.4463L2.53564 12.8496V15.5149C2.53562 15.7149 2.50218 15.8921 2.42285 16.0342L2.42212 16.0356C2.31692 16.2193 2.09741 16.2751 1.86182 16.2751C1.60639 16.2751 1.37154 16.2236 1.25537 16.0474C1.16263 15.9065 1.12502 15.7232 1.125 15.5149V11.5415C1.12501 11.3697 1.13426 11.2129 1.15356 11.072L1.1543 11.0691L1.17993 10.9526C1.21308 10.8409 1.26884 10.7425 1.35059 10.6633L1.39966 10.6223C1.52082 10.5332 1.68333 10.5 1.86182 10.5H2.39355Z",fill:"currentColor"}),O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.1106 10.5C9.62746 10.5 10.0624 10.6251 10.4026 10.8875L10.5256 10.9944C10.6405 11.1071 10.7342 11.238 10.8062 11.3862C10.9039 11.5876 10.9497 11.8187 10.9497 12.074V14.4983C10.9497 14.7119 10.927 14.9051 10.8779 15.0754C10.8306 15.2398 10.7676 15.3875 10.689 15.5156L10.6875 15.5186C10.6079 15.6408 10.5165 15.7481 10.4143 15.8386C10.3155 15.9261 10.2132 15.9989 10.1074 16.0547L10.1067 16.054C9.86566 16.1854 9.58987 16.2585 9.28271 16.2751H7.97681C7.77408 16.2751 7.59145 16.2335 7.46704 16.1169C7.35471 16.0115 7.2898 15.8714 7.26489 15.7097C7.24266 15.5651 7.23194 15.4033 7.23193 15.2256V11.5415C7.23195 11.3663 7.2426 11.2069 7.26489 11.0647C7.28985 10.9032 7.35482 10.7635 7.46704 10.6582C7.59145 10.5416 7.77403 10.5 7.97681 10.5H9.1106ZM8.72095 15.0447H9.07544C9.15931 15.0426 9.23737 15.0225 9.31055 14.9839L9.31348 14.9817L9.35815 14.9553C9.40066 14.926 9.43743 14.8876 9.46802 14.8381L9.46875 14.8367L9.49438 14.7861C9.51748 14.7305 9.53172 14.6593 9.53174 14.5686V12.2615C9.53174 12.1256 9.50631 12.0248 9.46509 11.9517L9.46362 11.9495C9.42061 11.8696 9.36785 11.8162 9.30762 11.7825C9.25706 11.7542 9.19978 11.7342 9.1355 11.7231L9.06885 11.7151H8.72095V15.0447Z",fill:"currentColor"})),vi=e=>O.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.6416 10.3784C3.95675 10.4068 4.24355 10.4808 4.49927 10.6033L4.68896 10.7058C4.75102 10.7437 4.81209 10.7853 4.87207 10.8303C4.99897 10.9227 5.10899 11.0375 5.20459 11.1724C5.30765 11.311 5.38613 11.4733 5.44116 11.6558L5.47998 11.8008C5.51306 11.9504 5.52903 12.1125 5.52905 12.2856C5.52905 12.6011 5.47828 12.8867 5.37305 13.1382L5.37378 13.1389C5.28434 13.3557 5.15787 13.5441 4.99512 13.7014L4.92334 13.7666C4.52343 14.1103 3.97203 14.269 3.2959 14.269H2.95166V15.4292C2.95165 15.614 2.93964 15.7845 2.91577 15.9397C2.8883 16.1182 2.81511 16.2739 2.68652 16.3909L2.68579 16.3901C2.54556 16.5202 2.34254 16.5645 2.12329 16.5645C1.90696 16.5644 1.70685 16.5194 1.56738 16.3887L1.56519 16.3865C1.44288 16.2679 1.37145 16.1152 1.34399 15.9404L1.34326 15.936C1.32257 15.7822 1.31251 15.613 1.3125 15.4292V11.5042C1.31251 11.3204 1.3225 11.1524 1.34326 11.001L1.34399 10.9973L1.37256 10.8691C1.40991 10.7455 1.47366 10.6362 1.56738 10.5483C1.70673 10.4148 1.90677 10.3689 2.12329 10.3689H3.50464L3.6416 10.3784ZM2.95166 12.9053H3.31787C3.43267 12.8984 3.53116 12.8714 3.61597 12.8269C3.69435 12.7857 3.75967 12.7244 3.81226 12.6387L3.84448 12.5728C3.8728 12.5 3.88989 12.4058 3.88989 12.2856C3.88984 12.1374 3.85971 12.0411 3.81812 11.9795L3.81519 11.9744C3.76419 11.8937 3.70357 11.8366 3.63428 11.7979C3.56584 11.7635 3.47692 11.7377 3.36328 11.7253H2.95166V12.9053Z",fill:"currentColor"}),O.createElement("path",{d:"M9.85181 10.3689C9.96017 10.369 10.0701 10.3945 10.1792 10.4392L10.2876 10.4897L10.2935 10.4927L10.2993 10.4963C10.4209 10.5712 10.5226 10.6619 10.5879 10.7725C10.6503 10.8716 10.6882 10.9809 10.6882 11.0969C10.6882 11.1892 10.6526 11.2993 10.6077 11.4089L10.6069 11.4082C10.5828 11.4685 10.5524 11.5379 10.5154 11.6147C10.4774 11.6937 10.4326 11.7792 10.3813 11.8704L9.1582 14.0391V15.4373C9.1582 15.6164 9.14303 15.7853 9.11279 15.9426C9.07918 16.1138 9.00547 16.2635 8.88647 16.3799L8.88721 16.3806C8.75142 16.5164 8.5562 16.5644 8.34668 16.5645C8.13595 16.5644 7.94219 16.5154 7.80249 16.3843L7.80103 16.3828C7.68055 16.2661 7.60635 16.1157 7.57251 15.9434C7.54226 15.786 7.52783 15.6164 7.52783 15.4373V14.0398L6.12085 11.5283L6.11938 11.5261C6.0459 11.3891 6.00587 11.2453 6.00586 11.0969C6.00589 10.986 6.03681 10.8798 6.09155 10.7812L6.09302 10.7791L6.15015 10.6963C6.21492 10.6176 6.30071 10.5509 6.39771 10.4941L6.4043 10.4905L6.5127 10.4392C6.6213 10.3943 6.73162 10.369 6.84155 10.3689C7.06446 10.369 7.25232 10.4649 7.39307 10.6399L7.48096 10.752C7.5635 10.8656 7.6337 10.9873 7.69263 11.116L8.34668 12.4878L9.00073 11.116C9.07902 10.945 9.177 10.7867 9.29443 10.6421L9.29517 10.6414L9.35083 10.5791C9.48615 10.443 9.65571 10.3689 9.85181 10.3689Z",fill:"currentColor"}),O.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),B=(e,t)=>o.jsx(e,{size:t.size??J.size,stroke:t.stroke??J.stroke,className:t.className}),be=(e,t)=>o.jsx(e,{width:Number(t.size??J.size),height:Number(t.size??J.size),className:t.className}),Kt={".bmp":e=>B(L.IconFileTypeBmp,e),".cpp":e=>be(gi,e),".c":e=>be(hi,e),".cs":e=>be(mi,e),".css":e=>B(L.IconFileTypeCss,e),".csv":e=>B(L.IconFileTypeCsv,e),".doc":e=>B(L.IconFileTypeDoc,e),".docx":e=>B(L.IconFileTypeDocx,e),".html":e=>B(L.IconFileTypeHtml,e),".ini":e=>be(Ci,e),".jpg":e=>B(L.IconFileTypeJpg,e),".js":e=>B(L.IconFileTypeJs,e),".json":e=>be(xi,e),".jsx":e=>B(L.IconFileTypeJsx,e),".md":e=>be(bi,e),".pdf":e=>B(L.IconFileTypePdf,e),".php":e=>B(L.IconFileTypePhp,e),".png":e=>B(L.IconFileTypePng,e),".ppt":e=>B(L.IconFileTypePpt,e),".py":e=>be(vi,e),".rs":e=>B(L.IconFileTypeRs,e),".sql":e=>B(L.IconFileTypeSql,e),".svg":e=>B(L.IconFileTypeSvg,e),".ts":e=>B(L.IconFileTypeTs,e),".tsx":e=>B(L.IconFileTypeTsx,e),".txt":e=>B(L.IconFileTypeTxt,e),".vue":e=>B(L.IconFileTypeVue,e),".xls":e=>B(L.IconFileTypeXls,e),".xml":e=>B(L.IconFileTypeXml,e),".zip":e=>B(L.IconFileTypeZip,e),default:e=>B(L.IconFile,e)},Fr=({extension:e,size:t=J.size,stroke:r=J.stroke,cssClass:n,decorative:s=!1,label:i,indicator:a})=>{const l=(()=>{const g=e.trim().toLowerCase();return g.startsWith(".")?g:`.${g}`})(),u=(Kt[l]??Kt.default)({size:t,stroke:r}),d=i??`${l.slice(1).toUpperCase()} file icon`;return o.jsxs("span",{className:w("inline-flex relative",n),...s?{"aria-hidden":!0}:{role:"img","aria-label":d},children:[o.jsx(W,{icon:u,className:"inline-block align-middle"}),a&&o.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:a})]})},Ot=({label:e="Shared entity",size:t=10,cssClass:r,stroke:n=2})=>o.jsx(W,{className:A("text-accent-primary",r),label:"Shared entity indicator",icon:o.jsx(L.IconArrowUpRight,{size:t,stroke:n,"aria-label":e,className:"bg-layer-3",role:"img"})}),yi=({name:e,cssClass:t,shared:r=!1})=>{const n=e.includes(".")?e.split(".").pop():null;return o.jsxs("div",{className:A("flex items-center gap-2 w-full",t),children:[n&&o.jsx(Fr,{extension:n,cssClass:"text-secondary",indicator:r?o.jsx(Ot,{}):null,label:"File type icon"}),o.jsx(ue,{cssClass:"text-primary dial-small flex-1 min-w-0",text:e})]})},wi=({name:e,cssClass:t,shared:r=!1,loading:n=!1})=>{const s=()=>n?o.jsx(Ze,{}):o.jsx(W,{icon:o.jsx(L.IconFolder,{...J}),className:"inline-block align-middle"});return o.jsxs("div",{className:A("flex items-center gap-2 w-full",t),children:[o.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[s(),r&&o.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:o.jsx(Ot,{})})]}),o.jsx(ue,{cssClass:"text-primary dial-small flex-1 min-w-0",text:e})]})};var qe=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(qe||{});const Jt=()=>typeof window<"u"&&window.innerWidth<1024,Di=()=>{const[e,t]=f.useState(Jt());return f.useEffect(()=>{const r=()=>t(Jt());return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),e};var Hr=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(Hr||{}),ye=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(ye||{}),Ar=(e=>(e.Item="item",e.Divider="divider",e))(Ar||{});const Si=w("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),Ii=w("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none","w-max"),Li=w("flex w-full cursor-pointer items-center gap-3","focus-visible:border-none focus-visible:outline-none","hover:bg-accent-primary-alpha px-3","dial-small h-[34px] rounded text-primary"),ji="opacity-75 !cursor-not-allowed",Ti="text-error",Ei="my-1 border-t border-hover border-secondary",Ne=8,kt=({ariaLabel:e,cssClass:t,size:r=24,onClose:n})=>o.jsx(X,{ariaLabel:e,cssClass:A("text-secondary hover:text-accent-primary",t),onClick:n,iconBefore:o.jsx(L.IconX,{size:r})}),He=({children:e,menu:t,renderOverlay:r,trigger:n=[ye.Click],placement:s,disabled:i=!1,open:a,defaultOpen:l=!1,onOpenChange:c,closable:u=!1,onClose:d,cssClass:g,listClassName:h,outsidePressIgnoreRef:p,outsideClosable:x=!0,allowedPlacements:m,anchorToMouse:D=!1,matchReferenceWidth:v=!0})=>{const[b,y]=f.useState(l),E=a!==void 0,N=E?!!a:b,P=f.useCallback(C=>{E||y(C),c?.(C)},[E,c]),G=f.useId(),j=s===void 0,$=C=>"clientWidth"in C?C.clientWidth:C.getBoundingClientRect?.()?.width??0,{refs:z,floatingStyles:M,context:V}=F.useFloating({placement:s,open:N,onOpenChange:P,whileElementsMounted:F.autoUpdate,middleware:[F.offset({mainAxis:Ne,crossAxis:0}),j?F.autoPlacement({alignment:"start",crossAxis:!0,padding:Ne,allowedPlacements:m}):F.flip({padding:Ne}),F.shift({padding:Ne}),F.size({padding:Ne,apply({availableWidth:C,availableHeight:H,elements:_}){const ie=_.floating,Ce=$(_.reference);ie.style.setProperty("--fui-available-height",`${Math.floor(H)}px`),ie.style.setProperty("--reference-width",v?`${Math.round(Ce)}px`:"0px"),v?ie.style.minWidth=`${Math.round(Ce)}px`:ie.style.removeProperty("min-width"),ie.style.maxWidth=`${Math.floor(C)}px`,ie.style.maxHeight=`${Math.floor(H)}px`}})]}),Q=F.useClick(V,{enabled:n.includes(ye.Click)&&!i}),ae=F.useHover(V,{enabled:n.includes(ye.Hover)&&!i,move:!1,restMs:40,delay:{open:80,close:80}}),Y=F.useDismiss(V,{bubbles:!0,referencePress:!1,outsidePress:C=>{if(!x)return!1;const H=C.target;return!(p?.current&&H instanceof Node&&p.current.contains(H))}}),ee=F.useRole(V,{role:"menu"}),{getReferenceProps:te,getFloatingProps:T}=F.useInteractions([Q,ae,Y,ee]),le=f.useCallback((C,H)=>{z.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:C,y:H,top:H,left:C,right:C,bottom:H})})},[z]),fe=f.useCallback(C=>{!n.includes(ye.ContextMenu)||i||(C.preventDefault(),D&&le(C.clientX,C.clientY),P(!0))},[D,i,P,le,n]),pe=f.useCallback(C=>{!D||i||le(C.clientX,C.clientY)},[D,i,le]);f.useEffect(()=>{i&&N&&P(!1)},[i,N,P]);const ne=f.useCallback(C=>H=>{C.disabled||(C.onClick?.({key:C.key,domEvent:H}),t?.onClick?.({key:C.key,domEvent:H}),P(!1))},[t,P]),U=f.useMemo(()=>r?r():t?o.jsxs(o.Fragment,{children:[t.header&&o.jsx(o.Fragment,{children:typeof t.header=="function"?t.header():t.header}),o.jsx("div",{role:"none",className:"py-1",children:t.items.map(C=>C.type===Ar.Divider?o.jsx("div",{role:"separator",className:Ei},C.key):o.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!C.disabled,className:w(Li,C.disabled&&ji,C.danger&&Ti),disabled:C.disabled,onClick:ne(C),children:[C.icon&&o.jsx("span",{className:w(C.danger&&"text-error",C.disabled&&"text-secondary"),children:o.jsx(W,{icon:C.icon})}),o.jsx("span",{className:w("flex-1 truncate text-left",C.danger&&"text-error",C.disabled&&"text-secondary"),children:C.label})]},C.key))}),t.footer&&o.jsx(o.Fragment,{children:typeof t.footer=="function"?t.footer():t.footer})]}):null,[ne,t,r]),K=te({onContextMenu:fe,onMouseDown:pe});return o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:z.setReference,className:w(Si,i&&"!cursor-not-allowed opacity-75",g),"aria-haspopup":"menu","aria-expanded":N,"aria-controls":G,...K,children:e}),N&&o.jsx(F.FloatingPortal,{children:o.jsx(F.FloatingFocusManager,{context:V,modal:!1,initialFocus:-1,returnFocus:!0,children:o.jsxs("div",{id:G,ref:z.setFloating,style:M,className:w(Ii,!v&&"w-max",h),...T(),children:[u&&o.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:o.jsx(kt,{ariaLabel:"Close dropdown",onClose:C=>{d?.(C),P(!1)}})}),U]})})})]})},Pe=({tab:e,active:t,disabled:r,invalid:n,cssClass:s,horizontal:i,onClick:a})=>{const c=A("rounded px-3 pt-2 pb-[6px] items-center flex flex-row gap-2 h-[32px] cursor-pointer dial-small leading-4 hover:text-accent-primary",{"bg-layer-4":i,"bg-layer-1 text-secondary pointer-events-none":r,"bg-accent-primary-alpha text-primary":t&&!r,"text-primary":!t&&!r,"pb-1 border-b-2 border-b-accent-primary":t&&i&&!r,"border-l-2 border-l-accent-primary":t&&!i&&!r},s);return o.jsxs("button",{role:"tab",className:c,onClick:()=>a(e.id),disabled:r,children:[o.jsx(ue,{text:e.name,contentClassName:"max-w-[200px]",cssClass:"max-w-[200px]"}),(n||e.invalid)&&o.jsx("div",{className:"text-error",children:o.jsx(L.IconExclamationCircle,{...J})})]})},Qt=12,Oi=({tabs:e,activeTab:t,onClick:r,orientation:n=qe.Horizontal})=>{const[s,i]=f.useState(!1),[a,l]=f.useState(!1),[c,u]=f.useState(!1),d=Di(),g=n===qe.Horizontal,h=f.useRef(null),p=f.useRef(null),x=f.useRef(null),m=e.find(b=>b.id===t),D=f.useMemo(()=>w("flex gap-3",g?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[g]),v=f.useCallback(()=>{const b=p.current;b&&u(b.scrollWidth>b.clientWidth)},[]);return f.useEffect(()=>{v();const b=new ResizeObserver(()=>v()),y=p.current;return y&&b.observe(y),()=>b.disconnect()},[e,v]),f.useEffect(()=>{const b=x.current,y=p.current;if(!b||!y)return;const E=b.offsetLeft,N=E+b.offsetWidth,P=y.scrollLeft,G=P+y.clientWidth;E<P?y.scrollTo({left:E-Qt,behavior:"smooth"}):N>G&&y.scrollTo({left:N-y.clientWidth+Qt,behavior:"smooth"})},[t]),d?o.jsx("div",{className:"h-11 flex items-center bg-layer-3 px-4",children:o.jsx(He,{trigger:[ye.Click],open:s,onOpenChange:i,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(b=>o.jsx(Pe,{tab:b,active:b.id===t,onClick:y=>{r(y),i(!1)},cssClass:"w-full rounded-none h-11 items-center px-6"},b.id)),children:o.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[o.jsx(Pe,{tab:m,active:!0,onClick:r,cssClass:"rounded-none bg-transparent border-l-0 border-b-[2px] border-accent-primary h-full items-center px-0"},t),o.jsx(W,{icon:o.jsx(L.IconChevronDown,{size:16}),className:w("text-primary transition-transform",s&&"rotate-180")})]})})}):o.jsxs("div",{ref:h,className:"flex w-full items-start",children:[o.jsx("div",{ref:p,className:D,children:e.map(b=>o.jsx("div",{ref:t===b.id?x:void 0,className:"w-full",children:o.jsx(Pe,{tab:b,active:t===b.id,onClick:r,horizontal:g,cssClass:"w-full"})},b.id))}),c&&o.jsx("div",{className:"flex items-center ml-2",children:o.jsx(He,{trigger:[ye.Click],open:a,onOpenChange:l,placement:"bottom-end",renderOverlay:()=>e.map(b=>o.jsx(Pe,{tab:b,active:b.id===t,onClick:y=>{r(y),l(!1)},cssClass:"w-full rounded-none h-[32px] items-center px-3 py-2"},b.id)),children:o.jsx(X,{iconBefore:o.jsx(L.IconDotsVertical,{size:18}),cssClass:w("w-8 h-8 flex items-center justify-center rounded border",a?"bg-layer-4 border-transparent":"border-primary")})})})]})},ki="w-full overflow-x-auto",Ni="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",Ri="flex items-center gap-2 min-w-0 shrink-0 dial-small",er="inline-flex items-center gap-1 min-w-0 transition-colors",Pi="text-secondary hover:text-accent-primary",Mi="text-primary cursor-default",Vi="flex-none inline-flex items-center leading-none text-icon-secondary",_r=o.jsx(L.IconChevronRight,{size:16,"aria-hidden":"true"}),zr=({title:e,href:t,onClick:r,disabled:n,isLast:s,separator:i=_r,cssClass:a,iconBefore:l,titleCssClass:c})=>{const u=A(Ri,a),d=(!!t||!!r)&&!s&&!n,g=d?A(er,Pi,c):A(er,Mi,n?"pointer-events-none opacity-75":"",c),h=typeof e=="string"?o.jsx(ue,{cssClass:g,text:e}):e;return o.jsxs("li",{className:u,children:[d?o.jsxs("a",{href:t,onClick:r,className:g,children:[l,h]}):o.jsxs("span",{className:g,"aria-current":s?"page":void 0,"aria-disabled":n?"true":void 0,children:[l,h]}),!s&&o.jsx("span",{className:Vi,children:i})]})},Br=({pathItems:e,separator:t=_r,ariaLabel:r="Breadcrumb",cssClass:n,children:s,titleCssClass:i})=>{const a=e?.length?e.map((l,c)=>f.createElement(zr,{...l,key:`item-${c}`,isLast:c===e.length-1,separator:t,titleCssClass:i})):f.Children.toArray(s).map((l,c,u)=>{if(!f.isValidElement(l))return l;const d=c===u.length-1;return f.cloneElement(l,{isLast:d,separator:t})});return o.jsx("nav",{"aria-label":r,className:A(ki,n),children:o.jsx("ol",{className:Ni,children:a})})},Gr=({iconClass:e,...t})=>o.jsx(X,{iconBefore:o.jsx(L.IconTrashX,{...J,className:e||""}),...t}),$r=({value:e,textareaId:t,placeholder:r,cssClass:n="",containerCssClass:s="",disabled:i,invalid:a,readonly:l,disableTooltip:c,onChange:u})=>o.jsx(me,{tooltip:c?null:e,triggerClassName:A("flex",s),children:o.jsx("textarea",{id:t,placeholder:r,value:e||"",disabled:i,className:w("dial-textarea dial-input px-3 py-2",a?"dial-input-error":"",i&&"dial-input-disable",l&&"dial-input-readonly",n),onChange:d=>!l&&u?.(d.currentTarget.value)})}),Fi=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],Hi=(e,t,r,n)=>{if((t==="number"||r!==void 0||n!==void 0)&&!Fi.includes(e.key)&&!(e.ctrlKey||e.metaKey)&&!(e.key==="-"&&(e.currentTarget.selectionStart??0)===0&&!e.currentTarget.value.includes("-"))&&!(e.key==="."&&t==="number"&&!e.currentTarget.value.includes("."))){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(r!==void 0||n!==void 0){const i=e.currentTarget.value,a=e.currentTarget.selectionStart||0,l=i.slice(0,a)+e.key+i.slice(a),c=parseFloat(l);if(!isNaN(c)){if(r!==void 0&&c<r){e.preventDefault();return}if(n!==void 0&&c>n){e.preventDefault();return}}}}},je=({iconBefore:e,iconAfter:t,hideBorder:r,value:n,elementId:s,placeholder:i="",cssClass:a="",containerCssClass:l,tooltipTriggerClassName:c,type:u="text",disabled:d,readonly:g,invalid:h,onChange:p,min:x,max:m,prefix:D,suffix:v,textBeforeInput:b,textAfterInput:y,onBlur:E,defaultValue:N,tooltipText:P})=>{const G=M=>M.target.blur(),j=u==="number"||x!==void 0||m!==void 0,$=M=>{Hi(M,u,x,m)},z=M=>{const V=M.currentTarget.value;if(j&&V!==""){const Q=parseFloat(V);if(isNaN(Q)&&V!=="-"&&V!=="."||!isNaN(Q)&&(x!==void 0&&Q<x||m!==void 0&&Q>m))return}p?.(V||void 0)};return o.jsxs("div",{className:w("dial-input-field flex flex-row items-center justify-between py-2",r?"dial-input-no-border":"dial-input",h&&"dial-input-error",d&&"dial-input-disable",g&&"dial-input-readonly",!b&&"pl-3",!y&&"pr-3",l),children:[b&&o.jsx("div",{className:"mr-2",children:o.jsx(je,{hideBorder:!0,containerCssClass:"rounded-r-none border-r-0",cssClass:"overflow-hidden overflow-ellipsis dial-small",value:b,disabled:!0,elementId:b+"textBefore"})}),D&&o.jsxs("p",{className:"text-secondary dial-small mr-2",children:[" ",D]}),o.jsx(W,{icon:e,className:w(!!e&&"mr-2")}),o.jsx(me,{tooltip:P||n,triggerClassName:w(c,"flex-1"),children:o.jsx("input",{type:u,autoComplete:"off",id:s,placeholder:i,value:N?void 0:n??"",disabled:d,className:w("border-0 bg-transparent w-full truncate",a),onChange:M=>!g&&z?.(M),onKeyDown:$,onWheel:G,onBlur:E,min:x,max:m,defaultValue:N})}),o.jsx(W,{icon:t,className:w(!!t&&"ml-2")}),v&&o.jsxs("p",{className:"text-secondary dial-small ml-2",children:[" ",v]}),y&&o.jsx("div",{className:"ml-2",children:o.jsx(je,{hideBorder:!0,containerCssClass:"rounded-l-none border-l-0",value:y,disabled:!0,elementId:y+"textAfter"})})]})},Ai=/^0+\.(\d+)?$/,_i=/^0+/,Wr=({label:e,optional:t,optionalText:r,description:n,error:s,captionDescription:i,readonly:a,orientation:l,elementId:c,fieldTitle:u,errorText:d,elementCssClass:g,elementContainerCssClass:h,containerCssClass:p,defaultEmptyText:x,...m})=>o.jsx(Xe,{label:e??u,error:s??d,optionalText:r,optional:t,description:n,captionDescription:i,readonly:a,orientation:l,elementId:c,cssClass:p,defaultEmptyText:x,value:m.value,children:o.jsx(je,{elementId:c,cssClass:g,containerCssClass:h,invalid:d!=null,...m})}),zi=({onChange:e,...t})=>{const r=n=>n==="-"?n:String(n)?.match(Ai)?String(n)?.replace(_i,"0"):Number(n);return o.jsx(Wr,{type:"number",onChange:n=>e?.(r(n)),...t})},Bi=({onChange:e,...t})=>o.jsx(Wr,{type:"text",onChange:r=>e?.(r),...t}),Gi=({fieldTitle:e,optional:t,elementId:r,elementCssClass:n,containerCssClass:s,elementContainerCssClass:i,errorText:a,...l})=>o.jsxs("div",{className:A("flex flex-col",s),children:[o.jsx(De,{fieldTitle:e,optional:t,htmlFor:r}),o.jsx($r,{textareaId:r,cssClass:n,containerCssClass:i,...l}),o.jsx(he,{errorText:a})]}),$i=({title:e,switchId:t,isOn:r=!1,disabled:n,onChange:s})=>{const i=w("flex w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",r?"flex-row-reverse":"flex-row",n?"pointer-events-none":"",n?r?"bg-controls-disable":"bg-layer-4":r?"bg-accent-primary":"bg-layer-4"),a=f.useCallback(l=>{l.stopPropagation(),s?.(!r)},[s,r]);return o.jsxs("div",{className:"flex flex-row items-center",children:[o.jsx("input",{type:"checkbox",onChange:a,id:t,disabled:n,className:"invisible w-0 h-0",checked:r}),o.jsx("label",{htmlFor:t,className:i,children:o.jsx("span",{className:w("size-3 rounded-full",n?r?"bg-layer-4":"bg-controls-disable":"bg-controls-enable-primary")})}),e&&o.jsx("span",{className:"pl-2 dial-small text-primary",children:e})]})};var de=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(de||{});const Wi="z-[52] flex items-center justify-center bg-blackout md:p-4",Ui="divide-tertiary divide-y",qi="flex flex-row justify-between py-4 px-6 items-center",Zi={[de.Sm]:"dial-sm-popup",[de.Md]:"dial-md-popup",[de.Lg]:"dial-lg-popup"},nt=({open:e=!1,title:t,portalId:r,cssClass:n,overlayClass:s,headingClass:i,dividers:a=!0,children:l,footer:c,onClose:u,size:d=de.Md})=>{const{refs:g,context:h}=F.useFloating({open:e,onOpenChange:b=>{b||u?.(null)}}),p=F.useRole(h,{role:"dialog"}),x=F.useDismiss(h,{outsidePress:!0}),{getFloatingProps:m}=F.useInteractions([p,x]);if(!e)return null;const D=typeof t=="string"?"dial-popup-heading":void 0,v=b=>b?typeof b=="string"?o.jsx("h3",{id:D,className:w("flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",i),children:o.jsx(me,{tooltip:b,children:b})}):b:o.jsx("span",{});return o.jsx(F.FloatingPortal,{id:r,children:o.jsx(F.FloatingOverlay,{className:w(Wi,s),children:o.jsx(F.FloatingFocusManager,{context:h,children:o.jsxs("div",{ref:g.setFloating,...m(),role:"dialog","aria-modal":"true","aria-labelledby":D,className:w("dial-popup",Zi[d],a&&Ui,n),children:[o.jsxs("div",{className:qi,children:[v(t),o.jsx(kt,{ariaLabel:"Close dialog",onClose:b=>u?.(b)})]}),o.jsx("div",{className:"flex-grow overflow-auto",children:l}),c]})})})})};var Ae=(e=>(e.Info="info",e.Danger="danger",e))(Ae||{});const Xi="flex justify-end gap-2 px-6 py-4",Yi="text-secondary dial-small-150 px-6 py-4",Ki="Cancel",Ji="Ok",tr={[Ae.Info]:{confirmVariant:Z.Primary,cancelVariant:Z.Secondary},[Ae.Danger]:{container:"dial-danger-popup",confirmVariant:Z.Danger,cancelVariant:Z.Secondary}},Qi=({title:e,description:t,descriptionCssClass:r,open:n=!1,confirmLabel:s=Ji,cancelLabel:i=Ki,isLoading:a=!1,disableConfirmButton:l=!1,cssClass:c,confirmClassName:u,onClose:d,onConfirm:g,onCancel:h,children:p,dividers:x=!1,variant:m=Ae.Info,size:D=de.Sm,footer:v})=>{const b=a?null:o.jsxs("div",{className:Xi,children:[o.jsx(X,{variant:Z.Secondary,title:i,onClick:()=>h?h():d?.()}),o.jsx(X,{variant:tr[m].confirmVariant,cssClass:u,title:s,disable:l,onClick:()=>g()})]}),y=f.useCallback(()=>a?o.jsx("div",{className:"px-6 py-4 h-[120px]",children:o.jsx(Ze,{size:50})}):p??(t?o.jsx("div",{className:w(Yi,r),children:t}):null),[p,t,a,r]);return o.jsx(nt,{open:n,title:e,cssClass:w(tr[m].container,c),dividers:x,onClose:()=>d?.(),footer:v??b,size:D,children:y()})},Nt=({selectedItems:e,listCssClass:t,listElementCssClass:r})=>!!e?.length&&o.jsx("ul",{className:w("flex-row items-center truncate flex-wrap","flex gap-x-2 gap-y-1",t),children:e?.map(n=>o.jsx("li",{children:o.jsx(me,{tooltip:n,children:o.jsx(Ke,{tag:n,cssClass:w([r])})})},n))}),rr=e=>O.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},O.createElement("path",{d:"M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z",fill:"currentColor"})),Ur=({children:e,open:t,disabled:r=!1,selectedValue:n,valueCssClasses:s,inputCssClasses:i,onOpen:a,elementId:l,errorText:c,emptyValueText:u})=>{const d=Array.isArray(n)&&n.length>0,g=typeof n=="string"&&!!n.trim(),h=d||g?n:u,p=r?void 0:a,x=()=>o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",className:"w-full",onClick:p,"aria-label":"open-popup",id:l,children:o.jsxs("div",{className:w("dial-input px-3 py-2 dial-input-field flex flex-row items-center w-full justify-between",i,r&&"dial-input-disable",c&&"dial-input-error"),children:[o.jsx(me,{tooltip:String(h),children:o.jsx("span",{className:s,children:h})}),!r&&o.jsx("div",{className:"flex-shrink-0",children:o.jsx(W,{icon:o.jsx(rr,{role:"img",width:Re,height:Re})})})]})}),c&&o.jsx(he,{errorText:c})]}),m=()=>o.jsx("div",{className:"w-full",onClick:p,children:o.jsxs("div",{className:w("dial-input px-3 py-2 flex flex-row items-center w-full justify-between",r&&"dial-input-disable"),children:[o.jsx(Nt,{selectedItems:h}),!r&&o.jsx("div",{className:"ml-1",children:o.jsx(W,{icon:o.jsx(rr,{role:"img",width:Re,height:Re})})})]})});return o.jsxs(o.Fragment,{children:[d?m():x(),t&&rn.createPortal(e,document.body)]})},e1=({fieldTitle:e,htmlFor:t,disabled:r,selectedValue:n,radioButtons:s,customInputValue:i,valueCssClasses:a,inputCssClasses:l,emptyValueText:c,onClose:u,title:d,portalId:g,onApply:h,cancelButtonTitle:p="Cancel",applyButtonTitle:x="Apply",isValid:m,selectedRadioValue:D,onChangeRadioField:v,id:b,size:y=de.Md})=>{const[E,N]=f.useState(!1),P=f.useCallback(()=>{r||N(!0)},[r]),G=f.useCallback(()=>{N(!1),u?.()},[u]),j=f.useCallback(()=>{h(),G()},[h,G]);return o.jsxs("div",{className:"flex flex-col",children:[o.jsx(De,{fieldTitle:e,htmlFor:t}),o.jsx(Ur,{disabled:r,open:E,selectedValue:i??s.find($=>$.id===n)?.name,valueCssClasses:a,inputCssClasses:w(l,"py-2","px-3"),emptyValueText:c,onOpen:P,children:o.jsx(nt,{open:E,onClose:G,title:d,portalId:g,size:y,footer:o.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[o.jsx(X,{variant:Z.Secondary,title:p,onClick:G}),o.jsx(X,{variant:Z.Primary,title:x,onClick:j,disable:!m})]}),children:o.jsx("div",{className:"px-6 py-4",children:o.jsx(Dr,{radioButtons:s,labelCssClass:"dial-small",activeRadioButton:D,onChange:v,elementId:b,orientation:Fe.Column})})})})]})},t1="Create",r1="Cancel",n1="flex items-center justify-end gap-2 px-6 py-3",s1=({title:e,open:t=!1,submitLabel:r=t1,cancelLabel:n=r1,isLoading:s=!1,disableSubmitButton:i=!1,cssClass:a,submitClassName:l,onClose:c,onSubmit:u,onCancel:d,children:g,dividers:h=!0,size:p=de.Md,footer:x})=>{const m=s?null:o.jsxs("div",{className:n1,children:[o.jsx(X,{variant:Z.Secondary,title:n,onClick:()=>d?d():c?.()}),o.jsx(X,{variant:Z.Primary,cssClass:l,title:r,disable:i,onClick:()=>u()})]}),D=f.useCallback(()=>s?o.jsx("div",{className:"px-6 py-4 h-[120px]",children:o.jsx(Ze,{size:50})}):g??null,[g,s]);return o.jsx(nt,{open:t,title:e,cssClass:a,dividers:h,onClose:()=>c?.(),footer:x??m,size:p,children:D()})};var _e=(e=>(e.Small="small",e.Base="base",e))(_e||{});const o1={[_e.Small]:{textClass:"text-xs px-1",containerClass:"px-[6px] py-1 h-[22px]",iconSize:10,iconStroke:1},[_e.Base]:{textClass:"text-sm px-2",containerClass:"px-3 py-2 h-[38px]",iconSize:18,iconStroke:1.5}},Rt=({elementId:e,value:t,placeholder:r="Search...",disabled:n,readonly:s,invalid:i,cssClass:a,containerCssClass:l,onChange:c,size:u=_e.Base})=>{const[d,g]=f.useState(t||"");f.useEffect(()=>{g(t||"")},[t]);const h=f.useCallback(m=>{g(m),c?.(m)},[c]),p=o1[u],x=f.useCallback(()=>{h("")},[h]);return o.jsxs("div",{className:w("dial-input flex flex-row items-center justify-between",i&&"dial-input-error",n&&"dial-input-disable",s&&"dial-input-readonly",p.containerClass,l),children:[o.jsx(W,{className:w(n?"text-secondary":"text-primary"),icon:o.jsx(L.IconSearch,{size:p.iconSize,stroke:p.iconStroke})}),o.jsx("input",{id:e,type:"text",autoComplete:"off",placeholder:r,value:d??"",disabled:n,readOnly:s,className:w("border-0 bg-transparent w-full",a,p.textClass),onChange:m=>!s&&h(m.currentTarget.value)}),d&&!s&&!n&&o.jsx(W,{className:"text-primary cursor-pointer",icon:o.jsx(L.IconX,{size:p.iconSize,stroke:p.iconStroke,onClick:x,"aria-label":"Clear search",role:"button"})})]})},i1="w-full h-[12] flex items-center justify-between gap-4",a1="min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-3 px-3 flex items-center rounded",l1="w-[260px]",c1=({ariaLabel:e="Breadcrumb",titleCssClass:t,onItemClick:r,path:n,makeHref:s,cssClass:i,breadcrumbCssClass:a,searchable:l=!0,value:c,elementId:u="fm-search",disabled:d,readonly:g,invalid:h,onSearchChange:p,searchCssClass:x,searchContainerCssClass:m})=>{const D=f.useMemo(()=>{if(!n)return;const v=n.split("/").map(b=>b.trim()).filter(Boolean);return v.length?v.map((b,y)=>{const E=v.slice(0,y+1),N=typeof s=="function"?s(E,y):void 0;return{title:b,href:N,onClick:r?P=>{P.preventDefault(),r(N)}:void 0}}):[{title:"/"}]},[n,s,r]);return o.jsxs("div",{className:w(i1,i),children:[o.jsx("div",{className:a1,children:o.jsx(Br,{pathItems:D,ariaLabel:e,titleCssClass:t,cssClass:a})}),l&&o.jsx("div",{className:l1,role:"search","aria-label":"Search",children:o.jsx(Rt,{elementId:u,value:c??"",onChange:p,disabled:d,readonly:g,invalid:h,cssClass:x,containerCssClass:m})})]})},d1=({onClick:e})=>o.jsx(L.IconEyeOff,{...J,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),u1=({onClick:e})=>o.jsx(L.IconEye,{...J,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),qr=({...e})=>{const[t,r]=f.useState(!1),n=f.useCallback(s=>{r(s)},[]);return o.jsx(je,{type:t?"text":"password",...e,iconAfter:t?o.jsx(d1,{onClick:()=>n(!1)}):o.jsx(u1,{onClick:()=>n(!0)})})},f1=({fieldTitle:e,optional:t,elementCssClass:r,elementId:n,errorText:s,...i})=>o.jsxs("div",{className:"flex flex-col",children:[o.jsx(De,{fieldTitle:e,optional:t,htmlFor:n}),o.jsx(qr,{cssClass:r,elementId:n,invalid:!!s,...i}),o.jsx(he,{errorText:s})]}),p1=({placeholder:e="",selectedItems:t=[],updateSelected:r,listCssClass:n,listElementCssClass:s,containerCssClass:i,inputCssClass:a})=>{const[l,c]=f.useState(""),u=f.useCallback(g=>{g.key==="Enter"&&(r([...t,g.currentTarget.value]),c("")),(g.key==="Backspace"||g.key==="Delete")&&t.length&&!l&&r(t.slice(0,-1))},[t,r,l]),d=f.useCallback(g=>{c(g.target.value)},[c]);return o.jsxs("div",{className:w(["dial-input px-3 py-2 flex flex-row items-center flex-wrap w-fit gap-2",i]),children:[o.jsx(Nt,{selectedItems:t,listCssClass:n,listElementCssClass:s}),o.jsx("input",{type:"text",value:l,className:w(["border-0 bg-transparent p-0",a]),placeholder:t?.length?"":e,onKeyDown:u,onChange:d})]})},g1=({initialTags:e=[],fieldTitle:t,optional:r,elementId:n,placeholder:s,errorText:i,invalid:a,disabled:l,onChange:c})=>{const u=f.useRef(null),[d,g]=f.useState(e),[h,p]=f.useState(""),[x,m]=f.useState(!1),D=y=>{const E=y.trim().replace(/,$/,"");if(E&&!d.includes(E)){const N=[E,...d];g(N),c?.(N)}},v=y=>{(y.key===","||y.key==="Enter")&&(y.preventDefault(),D(h),p(""))},b=y=>{const E=d.filter((N,P)=>P!==y);g(E),c?.(E)};return f.useEffect(()=>{const y=new ResizeObserver(()=>{if(u.current){const E=u.current.scrollHeight>u.current.clientHeight+10;m(E)}});return u.current&&y.observe(u.current),()=>y.disconnect()},[d]),o.jsxs("div",{className:w("flex flex-col w-full"),children:[o.jsx(De,{fieldTitle:t,optional:r,htmlFor:n}),o.jsx("div",{className:w("dial-input min-h-[38px] p-[6px]",a&&"dial-input-error",l&&"dial-input-disable"),children:o.jsxs("div",{ref:u,className:w("flex flex-wrap gap-2 items-center",x?"flex-col-reverse":"flex-row"),children:[d.map((y,E)=>o.jsx(Ke,{tag:y,remove:l?void 0:()=>b(E)},y+E)),o.jsx("input",{type:"text",value:h,onChange:y=>p(y.target.value),onKeyDown:v,className:w("dial-input-no-border outline-none border-none w-full min-w-[100px] flex-1 p-1"),placeholder:s,disabled:l})]})}),o.jsx(he,{errorText:i})]})},h1="dial-input flex px-3 py-2 w-full items-center justify-between gap-2 dial-small min-h-[38px]",m1="w-full rounded",ut="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none",C1="bg-accent-primary-alpha",x1="bg-accent-primary-alpha border-l border-accent-primary border-1",nr="opacity-75",b1=o.jsx(L.IconChevronDown,{size:16}),Zr=({options:e,selectedValues:t,handleRemoveTag:r})=>o.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(n=>{const s=e.find(a=>a.value===n)?.label??n,i=e.find(a=>a.value===n)?.icon;return o.jsx(Ke,{tag:s,remove:a=>r?.(a,n),iconBefore:i?o.jsx(W,{icon:i}):null,cssClass:"max-w-full"},n)})}),Xr=({options:e,multiple:t=!1,value:r,defaultValue:n,placeholder:s="Select...",searchable:i=!1,searchPlaceholder:a,selectAll:l=!1,selectAllLabel:c="Select all",emptyStateTitle:u="No options available",emptyStateDescription:d,emptyStateIcon:g,disabled:h=!1,cssClass:p,closable:x=!1,onClose:m,onChange:D})=>{const[v,b]=f.useState(!1),[y,E]=f.useState(""),N=f.useId(),P=r!==void 0,[G,j]=f.useState(n),$=P?r:G,z=f.useMemo(()=>t?Array.isArray($)?$:[]:typeof $=="string"?[$]:[],[$,t]),M=f.useMemo(()=>{const C=y.trim().toLowerCase();return C?e.filter(H=>H.label.toLowerCase().includes(C)):e},[e,y]);f.useEffect(()=>{v||E("")},[v]);const V=f.useCallback(C=>{P||j(C),D?.(C)},[P,D]),Q=C=>{if(t){const H=new Set(z);H.has(C)?H.delete(C):H.add(C),V(Array.from(H))}else V(C),b(!1)},ae=f.useCallback((C,H)=>{if(C.stopPropagation(),!t){V("");return}const _=z.filter(ie=>ie!==H);V(_)},[t,z,V]),Y=f.useMemo(()=>M.filter(C=>!C.disabled),[M]),ee=f.useMemo(()=>Y.filter(C=>z.includes(C.value)).length,[Y,z]),te=Y.length>0&&ee===Y.length,T=ee>0&&!te,le=()=>{if(!(!t||Y.length===0))if(te){const C=new Set(Y.map(_=>_.value)),H=z.filter(_=>!C.has(_));V(H)}else{const C=new Set(z);Y.forEach(H=>C.add(H.value)),V(Array.from(C))}},fe=z.length>0,pe=!t&&fe?z[0]:void 0,ne=f.useMemo(()=>pe?e.find(C=>C.value===pe):void 0,[e,pe]),U=f.useCallback(()=>!t||z.length===0?null:o.jsx(Zr,{options:e,selectedValues:z,handleRemoveTag:ae}),[t,e,z,ae]),K=f.useCallback(()=>t?fe?U():o.jsx("span",{className:"text-secondary truncate",children:s}):ne?o.jsxs(o.Fragment,{children:[ne.icon&&o.jsx(W,{icon:ne.icon}),o.jsx(ue,{text:ne.label})]}):o.jsx("span",{className:"text-secondary truncate",children:s}),[fe,t,s,U,ne]);return o.jsx(He,{open:v,onOpenChange:b,disabled:h,closable:x,onClose:m,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>o.jsxs("div",{id:N,role:"listbox","aria-multiselectable":t||void 0,className:m1,children:[(i||x)&&o.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[i&&o.jsx(Rt,{placeholder:a,onChange:E,value:y,elementId:`search-${N}`}),x&&o.jsx(X,{ariaLabel:"Close select",cssClass:"shrink-0",iconBefore:o.jsx(L.IconX,{size:16}),onClick:C=>{m?.(C),b(!1)}})]}),t&&l&&Y.length>0&&o.jsx("div",{className:w(ut,"mt-2"),children:o.jsx(Ct,{id:`${N}-selectAll`,label:c,checked:te,indeterminate:T,onChange:le,ariaLabel:c})}),o.jsx("div",{className:"overflow-y-auto py-1",children:M.length===0?o.jsx("div",{className:"px-2 py-3",children:o.jsx(Sr,{icon:g??o.jsx(L.IconClipboardX,{size:24}),title:u,description:d})}):M.map(C=>{const H=z.includes(C.value);return t?o.jsx("div",{className:w(ut,H&&C1,C.disabled&&nr,"w-full"),children:o.jsx(Ct,{id:`${N}-${C.value}`,label:o.jsxs("span",{className:"flex w-full flex-1 min-w-0 items-center gap-2 text-primary",children:[C.icon&&o.jsx(W,{icon:C.icon}),o.jsx("span",{className:"truncate",children:C.label})]}),checked:H,disabled:C.disabled,onChange:()=>!C.disabled&&Q(C.value),ariaLabel:C.label})},C.value):o.jsx("button",{role:"option",type:"button","aria-selected":H,"aria-disabled":!!C.disabled,disabled:C.disabled,className:w(ut,H&&x1,C.disabled&&nr),onClick:()=>!C.disabled&&Q(C.value),children:o.jsxs("div",{className:"flex items-center gap-2 w-full",children:[C.icon&&o.jsx(W,{icon:C.icon}),o.jsx(ue,{text:C.label})]})},C.value)})})]}),children:o.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-expanded":v,"aria-controls":N,className:A(h1,h&&"opacity-75 !cursor-not-allowed",p),onClick:()=>!h&&b(C=>!C),children:[o.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary",children:K()}),o.jsx(W,{icon:b1,className:w("text-primary",v&&"rotate-180")})]})})},v1=({fieldTitle:e,optional:t,captionDescription:r,containerCssClass:n,selectCssClass:s,error:i,elementId:a,description:l,readonly:c,value:u,defaultEmptyText:d,...g})=>{const h=f.useCallback(()=>{if(!u||Array.isArray(u)&&u.length===0)return d??"None";if(Array.isArray(u))return o.jsx(Zr,{options:g.options,selectedValues:u});{const p=g.options?.find(x=>x.value===u);return o.jsx("span",{"aria-readonly":!0,className:"text-primary",children:p?.label||u})}},[u,g.options,d]);return o.jsx(Xe,{elementId:a,label:e,optional:t,description:l,error:i,captionDescription:r,cssClass:n,readonly:c,value:h(),defaultEmptyText:d,children:o.jsx(Xr,{cssClass:s,value:u,...g})})};function Yr(e){let t=null;return()=>(t==null&&(t=e()),t)}function y1(e,t){return e.filter(r=>r!==t)}function w1(e,t){const r=new Set,n=i=>r.add(i);e.forEach(n),t.forEach(n);const s=[];return r.forEach(i=>s.push(i)),s}class D1{enter(t){const r=this.entered.length,n=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(t));return this.entered=w1(this.entered.filter(n),[t]),r===0&&this.entered.length>0}leave(t){const r=this.entered.length;return this.entered=y1(this.entered.filter(this.isNodeInDocument),t),r>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class S1{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const r={};Object.keys(this.config.exposeProperties).forEach(n=>{const s=this.config.exposeProperties[n];s!=null&&(r[n]={value:s(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,r)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,r){return r===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Pt="__NATIVE_FILE__",Kr="__NATIVE_URL__",Jr="__NATIVE_TEXT__",Qr="__NATIVE_HTML__",sr=Object.freeze(Object.defineProperty({__proto__:null,FILE:Pt,HTML:Qr,TEXT:Jr,URL:Kr},Symbol.toStringTag,{value:"Module"}));function ft(e,t,r){const n=t.reduce((s,i)=>s||e.getData(i),"");return n??r}const wt={[Pt]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Qr]:{exposeProperties:{html:(e,t)=>ft(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Kr]:{exposeProperties:{urls:(e,t)=>ft(e,t,"").split(`
2
- `),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Jr]:{exposeProperties:{text:(e,t)=>ft(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function I1(e,t){const r=wt[e];if(!r)throw new Error(`native type ${e} has no configuration`);const n=new S1(r);return n.loadDataTransfer(t),n}function pt(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(wt).filter(r=>{const n=wt[r];return n?.matchesTypes?n.matchesTypes.some(s=>t.indexOf(s)>-1):!1})[0]||null}const L1=Yr(()=>/firefox/i.test(navigator.userAgent)),en=Yr(()=>!!window.safari);class or{interpolate(t){const{xs:r,ys:n,c1s:s,c2s:i,c3s:a}=this;let l=r.length-1;if(t===r[l])return n[l];let c=0,u=a.length-1,d;for(;c<=u;){d=Math.floor(.5*(c+u));const p=r[d];if(p<t)c=d+1;else if(p>t)u=d-1;else return n[d]}l=Math.max(0,u);const g=t-r[l],h=g*g;return n[l]+s[l]*g+i[l]*h+a[l]*g*h}constructor(t,r){const{length:n}=t,s=[];for(let p=0;p<n;p++)s.push(p);s.sort((p,x)=>t[p]<t[x]?-1:1);const i=[],a=[];let l,c;for(let p=0;p<n-1;p++)l=t[p+1]-t[p],c=r[p+1]-r[p],i.push(l),a.push(c/l);const u=[a[0]];for(let p=0;p<i.length-1;p++){const x=a[p],m=a[p+1];if(x*m<=0)u.push(0);else{l=i[p];const D=i[p+1],v=l+D;u.push(3*v/((v+D)/x+(v+l)/m))}}u.push(a[a.length-1]);const d=[],g=[];let h;for(let p=0;p<u.length-1;p++){h=a[p];const x=u[p],m=1/i[p],D=x+u[p+1]-h-h;d.push((h-x-D)*m),g.push(D*m*m)}this.xs=t,this.ys=r,this.c1s=u,this.c2s=d,this.c3s=g}}const j1=1;function tn(e){const t=e.nodeType===j1?e:e.parentElement;if(!t)return null;const{top:r,left:n}=t.getBoundingClientRect();return{x:n,y:r}}function We(e){return{x:e.clientX,y:e.clientY}}function T1(e){var t;return e.nodeName==="IMG"&&(L1()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function E1(e,t,r,n){let s=e?t.width:r,i=e?t.height:n;return en()&&e&&(i/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:i}}function O1(e,t,r,n,s){const i=T1(t),l=tn(i?e:t),c={x:r.x-l.x,y:r.y-l.y},{offsetWidth:u,offsetHeight:d}=e,{anchorX:g,anchorY:h}=n,{dragPreviewWidth:p,dragPreviewHeight:x}=E1(i,t,u,d),m=()=>{let P=new or([0,.5,1],[c.y,c.y/d*x,c.y+x-d]).interpolate(h);return en()&&i&&(P+=(window.devicePixelRatio-1)*x),P},D=()=>new or([0,.5,1],[c.x,c.x/u*p,c.x+p-u]).interpolate(g),{offsetX:v,offsetY:b}=s,y=v===0||v,E=b===0||b;return{x:y?v:D(),y:E?b:m()}}class k1{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,r){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=r}}function N1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){N1(e,s,r[s])})}return e}class R1{profile(){var t,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,r,n){return this.sourcePreviewNodeOptions.set(t,n),this.sourcePreviewNodes.set(t,r),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,r,n){this.sourceNodes.set(t,r),this.sourceNodeOptions.set(t,n);const s=a=>this.handleDragStart(a,t),i=a=>this.handleSelectStart(a);return r.setAttribute("draggable","true"),r.addEventListener("dragstart",s),r.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),r.removeEventListener("dragstart",s),r.removeEventListener("selectstart",i),r.setAttribute("draggable","false")}}connectDropTarget(t,r){const n=a=>this.handleDragEnter(a,t),s=a=>this.handleDragOver(a,t),i=a=>this.handleDrop(a,t);return r.addEventListener("dragenter",n),r.addEventListener("dragover",s),r.addEventListener("drop",i),()=>{r.removeEventListener("dragenter",n),r.removeEventListener("dragover",s),r.removeEventListener("drop",i)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(t);return ir({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(t);return ir({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(sr).some(r=>sr[r]===t)}beginDragNativeItem(t,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=I1(t,r),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const r=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},r)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,r){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}handleDragEnter(t,r){this.dragEnterTargetIds.unshift(r)}handleDragOver(t,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}handleDrop(t,r){this.dropTargetIds.unshift(r)}constructor(t,r,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const i=this.sourceNodes.get(s);return i&&tn(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const a=We(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:l}=s,c=pt(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const d=this.monitor.getSourceId(),g=this.sourceNodes.get(d),h=this.sourcePreviewNodes.get(d)||g;if(h){const{anchorX:p,anchorY:x,offsetX:m,offsetY:D}=this.getCurrentSourcePreviewNodeOptions(),y=O1(g,h,a,{anchorX:p,anchorY:x},{offsetX:m,offsetY:D});l.setDragImage(h,y.x,y.y)}}try{l?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(l&&!l.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:l}=s,c=pt(l);c&&this.beginDragNativeItem(c,l)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,i.length>0&&this.actions.hover(i,{clientOffset:We(s)}),i.some(l=>this.monitor.canDropOnTarget(l))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=We(s),this.scheduleHover(i),(i||[]).some(l=>this.monitor.canDropOnTarget(l))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;s.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}else pt(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:We(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const i=s.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(s.preventDefault(),i.dragDrop()))},this.options=new k1(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new D1(this.isNodeInDocument)}}const P1=function(t,r,n){return new R1(t,r,n)},M1=({onChange:e,emptyTextFirstLine:t,emptyTextSecondLine:r,emptyButtonLabel:n,acceptTypes:s,maxFilesCount:i,multiple:a,fileFormatError:l,fileCountError:c,getIsFileFormatError:u})=>{const d=f.useRef(null),g=f.useRef(null),[h,p]=f.useState([]),[x,m]=f.useState(!1),D=f.useCallback(M=>{const V=M.target.files;if(V&&V.length>0){const Q=Array.from(V);u?.(Q)?m(!0):e(Q)}},[u,e]),v=f.useCallback(M=>i&&M?.length>i,[i]),b=f.useMemo(()=>x||v(h),[x,h,v]),y=()=>{p([]),m(!1)};f.useEffect(()=>{y()},[s]);const[{isOver:E,canDrop:N},P]=Vr(()=>({accept:[Pt],drop(M){const V=M.files;!u?.(V)&&!v(V)&&e(V),y()},collect:M=>({isOver:M.isOver(),canDrop:M.canDrop()})}),[D]),G=M=>{(M.key==="Enter"||M.key==="Space")&&(M.preventDefault(),g.current?.click())},j=M=>{M?.preventDefault();const V=Array.from(M.dataTransfer?.items??[]);m(!!u?.(V)),p(V)},$=M=>{M.target===M.currentTarget&&y()},z=w("border border-dashed rounded w-full cursor-pointer relative h-full hover:border-hover",!N&&!b&&"border-primary",N&&(E?"border-accent-primary":"border-hover"),b&&"border-error");return P(d),o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:z,ref:d,onDragOver:j,onDragLeave:$,children:[o.jsxs("label",{htmlFor:"file",tabIndex:0,onKeyDown:G,className:"flex flex-col items-center cursor-pointer h-full w-full text-secondary dial-tiny justify-center",children:[t&&o.jsx("p",{className:"mb-1",children:t}),r&&o.jsx("p",{className:"mb-0.5",children:r}),n&&o.jsx(X,{variant:Z.Tertiary,title:n,onClick:()=>g.current?.click()})]}),o.jsx("input",{multiple:a,id:"file",type:"file",ref:g,hidden:!0,accept:s,onChange:D})]}),o.jsx(o.Fragment,{children:x?o.jsx(he,{errorText:l}):v(h)&&o.jsx(he,{errorText:c})})]})},V1=({iconBefore:e,cssClass:t,errorText:r,...n})=>{const s=n.invalid,i=()=>o.jsx("div",{className:"mr-2",children:s?o.jsx(L.IconExclamationCircle,{...J,className:"text-error"}):e});return o.jsx(je,{...n,iconBefore:i(),tooltipTriggerClassName:"flex-1 min-w-0",cssClass:w(s?"text-error":"",t),tooltipText:s&&r?r:void 0,hideBorder:!0})},F1=e=>{const{files:t,iconBeforeInput:r,dynamicIcon:n,onChange:s,isInvalid:i,errorText:a,removeButtonAriaLabel:l}=e,c=(g,h)=>{g.stopPropagation(),s(t?.filter(p=>p.name!==h)||[])},u=g=>o.jsx(Gr,{ariaLabel:l,onClick:h=>c(h,g)}),d=g=>{s(g)};return!t||t.length===0?o.jsx(ko,{backend:P1,children:o.jsx(M1,{...e,onChange:d})}):o.jsx("div",{className:"flex-1 min-h-0 border border-solid border-primary rounded",children:t&&t.length>0&&o.jsx("div",{className:"max-h-full overflow-y-auto",children:t.map((g,h)=>o.jsx(V1,{elementId:g.name,value:g.name,iconAfter:u(g.name),iconBefore:r||n?.(g.name),invalid:i?.(g),errorText:a},g.name+h))})})},H1=({onChange:e,fieldTitle:t,elementId:r,files:n,maxFilesCount:s,fileFormatError:i,fileCountError:a,multiple:l=!0,acceptTypes:c,deleteAllButtonLabel:u,addButtonLabel:d,...g})=>{const h=f.useRef(null),p=()=>h.current?.click(),x=()=>{e([])},m=f.useCallback(v=>v?.some(b=>b.type===""||!(c==="/"||c?.toLowerCase()?.includes(b?.type?.toLowerCase()))),[c]),D=f.useCallback(v=>{const b=v.target.files;if(b&&b.length>0){const y=Array.from(b);m(y)||e([...n||[],...y])}},[e,n,m]);return o.jsxs("div",{className:"h-full flex flex-col",children:[o.jsxs("div",{className:"flex justify-between items-center pb-1 min-h-[42px]",children:[o.jsx(De,{fieldTitle:`${t}: ${l?n?.length||0:""}`,htmlFor:r}),l&&!!n?.length&&o.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[o.jsx(X,{variant:Z.Tertiary,cssClass:"!text-error",iconBefore:o.jsx(L.IconTrashX,{...J}),title:u,onClick:x}),(s?s>n?.length:!0)&&o.jsx(X,{variant:Z.Tertiary,iconBefore:o.jsx(L.IconPlus,{...J}),title:d,onClick:p})]})]}),n&&n.length>0&&o.jsx("input",{id:"file",type:"file",multiple:l,ref:h,hidden:!0,accept:c,onChange:D}),o.jsx(F1,{files:n,onChange:e,acceptTypes:c,maxFilesCount:s,multiple:l,fileFormatError:i,fileCountError:a,getIsFileFormatError:m,...g})]})},A1=o.jsx(L.IconChevronDown,{size:16}),_1=o.jsx(L.IconChevronUp,{size:16}),z1=e=>{const[t,r]=f.useState(!1),n=f.useMemo(()=>t?_1:A1,[t]);return o.jsx("div",{children:o.jsx(He,{menu:{items:e.items},onOpenChange:s=>r(s),children:o.jsx(X,{...e,iconAfter:n})})})};exports.AlertVariant=ve;exports.ButtonVariant=Z;exports.ConfirmationPopupVariant=Ae;exports.DialAlert=Un;exports.DialAutocompleteInput=p1;exports.DialAutocompleteInputValue=Nt;exports.DialBreadcrumb=Br;exports.DialBreadcrumbItem=zr;exports.DialButton=X;exports.DialButtonDropdown=z1;exports.DialCheckbox=Ct;exports.DialCloseButton=kt;exports.DialCollapsibleSidebar=as;exports.DialConfirmationPopup=Qi;exports.DialDraggableItem=pi;exports.DialDropdown=He;exports.DialEllipsisTooltip=ue;exports.DialErrorText=he;exports.DialFieldLabel=De;exports.DialFileIcon=Fr;exports.DialFileManagerNavigationPanel=c1;exports.DialFileName=yi;exports.DialFolderName=wi;exports.DialFormItem=Xe;exports.DialFormPopup=s1;exports.DialIcon=W;exports.DialInput=je;exports.DialInputPopup=Ur;exports.DialLabelledText=ls;exports.DialLoadFileAreaField=H1;exports.DialLoader=Ze;exports.DialNoDataContent=Sr;exports.DialNumberInputField=zi;exports.DialPasswordInput=qr;exports.DialPasswordInputField=f1;exports.DialPopup=nt;exports.DialRadioButton=wr;exports.DialRadioGroup=Dr;exports.DialRadioGroupPopupField=e1;exports.DialRemoveButton=Gr;exports.DialSearch=Rt;exports.DialSelect=Xr;exports.DialSelectField=v1;exports.DialSharedEntityIndicator=Ot;exports.DialSteps=es;exports.DialSwitch=$i;exports.DialTab=Pe;exports.DialTabs=Oi;exports.DialTag=Ke;exports.DialTagInput=g1;exports.DialTextAreaField=Gi;exports.DialTextInputField=Bi;exports.DialTextarea=$r;exports.DialTooltip=me;exports.DropdownType=Hr;exports.FormItemOrientation=Ve;exports.PopupSize=de;exports.RadioGroupOrientation=Fe;exports.SearchSize=_e;exports.StepStatus=re;exports.TabOrientation=qe;exports.TagVariant=Ye;exports.mergeClasses=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),W=require("classnames"),le=require("@floating-ui/react"),p=require("react"),K=require("@tabler/icons-react"),Dn=require("react-dom");function sf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const oe=sf(p),rs=({errorText:e})=>e&&C.jsx("span",{className:"text-error dial-tiny mt-1",children:e}),we=({icon:e,className:t})=>e?C.jsx("span",{className:W("flex-shrink-0",t),children:e}):null,of=7,nf=2,Vd=p.createContext(null),Bd=()=>{const e=p.useContext(Vd);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},rf=({initialOpen:e=!1,placement:t="bottom",isTriggerClickable:s=!1,open:o,onOpenChange:i}={})=>{const[n,r]=p.useState(e),a=p.useRef(null),l=o??n,c=i??r,d=le.useFloating({placement:t,open:l,onOpenChange:c,whileElementsMounted:le.autoUpdate,middleware:[le.offset(of+nf),le.flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"start",padding:5}),le.shift({padding:5}),le.arrow({element:a})]}),u=le.useHover(d.context,{move:!1,enabled:o==null,mouseOnly:s,delay:{open:500,close:0}}),h=le.useFocus(d.context,{enabled:o==null}),g=le.useDismiss(d.context),f=le.useRole(d.context,{role:"tooltip"}),m=le.useInteractions([u,h,g,f]);return p.useMemo(()=>({open:l,setOpen:c,arrowRef:a,...m,...d}),[l,c,m,d])},zd=({children:e,...t})=>{const s=rf(t);return C.jsx(Vd.Provider,{value:s,children:e})},Wd=p.forwardRef(function({style:t,...s},o){const i=Bd(),n=le.useMergeRefs([i.refs.setFloating,o]);return i.open?C.jsx(le.FloatingPortal,{id:"tooltip-portal",children:C.jsxs("div",{ref:n,style:{...i.floatingStyles,...t},...i.getFloatingProps(s),className:W("z-[55] whitespace-pre-wrap break-words rounded border border-primary bg-blackout px-2 py-1 dial-tiny shadow max-w-[300px]",i.getFloatingProps(s).className),children:[s.children,C.jsx(le.FloatingArrow,{ref:i.arrowRef,context:i.context,fill:"currentColor",strokeWidth:1,className:"stroke-primary w-2 text-[var(--bg-layer-0,_#000000)]"})]})}):null}),_d=p.forwardRef(function({children:t,asChild:s=!1,...o},i){const n=Bd(),a=t&&typeof t=="object"&&"ref"in t&&t.ref!==void 0?t.ref:void 0,l=le.useMergeRefs([n.refs.setReference,i,a]);return s&&p.isValidElement(t)?p.cloneElement(t,n.getReferenceProps({ref:l,...o,...t.props})):C.jsx("span",{ref:l,...n.getReferenceProps(o),className:o.className??"dial-tooltip-trigger text-left",children:t})}),hs=({hideTooltip:e,tooltip:t,children:s,triggerClassName:o,contentClassName:i,...n})=>C.jsxs(zd,{...n,children:[C.jsx(_d,{className:W(o,"truncate"),children:s}),C.jsx(Wd,{className:W("text-primary",i,"max-w-[300px]",(e||!t)&&"hidden"),children:t})]}),Ia="-",af=e=>{const t=cf(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:r=>{const a=r.split(Ia);return a[0]===""&&a.length!==1&&a.shift(),Ud(a,t)||lf(r)},getConflictingClassGroupIds:(r,a)=>{const l=s[r]||[];return a&&o[r]?[...l,...o[r]]:l}}},Ud=(e,t)=>{if(e.length===0)return t.classGroupId;const s=e[0],o=t.nextPart.get(s),i=o?Ud(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const n=e.join(Ia);return t.validators.find(({validator:r})=>r(n))?.classGroupId},Bl=/^\[(.+)\]$/,lf=e=>{if(Bl.test(e)){const t=Bl.exec(e)[1],s=t?.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},cf=e=>{const{theme:t,classGroups:s}=e,o={nextPart:new Map,validators:[]};for(const i in s)zr(s[i],o,i,t);return o},zr=(e,t,s,o)=>{e.forEach(i=>{if(typeof i=="string"){const n=i===""?t:zl(t,i);n.classGroupId=s;return}if(typeof i=="function"){if(df(i)){zr(i(o),t,s,o);return}t.validators.push({validator:i,classGroupId:s});return}Object.entries(i).forEach(([n,r])=>{zr(r,zl(t,n),s,o)})})},zl=(e,t)=>{let s=e;return t.split(Ia).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},df=e=>e.isThemeGetter,uf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,o=new Map;const i=(n,r)=>{s.set(n,r),t++,t>e&&(t=0,o=s,s=new Map)};return{get(n){let r=s.get(n);if(r!==void 0)return r;if((r=o.get(n))!==void 0)return i(n,r),r},set(n,r){s.has(n)?s.set(n,r):i(n,r)}}},Wr="!",_r=":",hf=_r.length,gf=e=>{const{prefix:t,experimentalParseClassName:s}=e;let o=i=>{const n=[];let r=0,a=0,l=0,c;for(let f=0;f<i.length;f++){let m=i[f];if(r===0&&a===0){if(m===_r){n.push(i.slice(l,f)),l=f+hf;continue}if(m==="/"){c=f;continue}}m==="["?r++:m==="]"?r--:m==="("?a++:m===")"&&a--}const d=n.length===0?i:i.substring(l),u=pf(d),h=u!==d,g=c&&c>l?c-l:void 0;return{modifiers:n,hasImportantModifier:h,baseClassName:u,maybePostfixModifierPosition:g}};if(t){const i=t+_r,n=o;o=r=>r.startsWith(i)?n(r.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:r,maybePostfixModifierPosition:void 0}}if(s){const i=o;o=n=>s({className:n,parseClassName:i})}return o},pf=e=>e.endsWith(Wr)?e.substring(0,e.length-1):e.startsWith(Wr)?e.substring(1):e,ff=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const i=[];let n=[];return o.forEach(r=>{r[0]==="["||t[r]?(i.push(...n.sort(),r),n=[]):n.push(r)}),i.push(...n.sort()),i}},mf=e=>({cache:uf(e.cacheSize),parseClassName:gf(e),sortModifiers:ff(e),...af(e)}),Cf=/\s+/,vf=(e,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:n}=t,r=[],a=e.trim().split(Cf);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:u,modifiers:h,hasImportantModifier:g,baseClassName:f,maybePostfixModifierPosition:m}=s(d);if(u){l=d+(l.length>0?" "+l:l);continue}let v=!!m,w=o(v?f.substring(0,m):f);if(!w){if(!v){l=d+(l.length>0?" "+l:l);continue}if(w=o(f),!w){l=d+(l.length>0?" "+l:l);continue}v=!1}const b=n(h).join(":"),S=g?b+Wr:b,R=S+w;if(r.includes(R))continue;r.push(R);const y=i(w,v);for(let x=0;x<y.length;++x){const D=y[x];r.push(S+D)}l=d+(l.length>0?" "+l:l)}return l};function wf(){let e=0,t,s,o="";for(;e<arguments.length;)(t=arguments[e++])&&(s=jd(t))&&(o&&(o+=" "),o+=s);return o}const jd=e=>{if(typeof e=="string")return e;let t,s="";for(let o=0;o<e.length;o++)e[o]&&(t=jd(e[o]))&&(s&&(s+=" "),s+=t);return s};function bf(e,...t){let s,o,i,n=r;function r(l){const c=t.reduce((d,u)=>u(d),e());return s=mf(c),o=s.cache.get,i=s.cache.set,n=a,a(l)}function a(l){const c=o(l);if(c)return c;const d=vf(l,s);return i(l,d),d}return function(){return n(wf.apply(null,arguments))}}const Me=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},$d=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Kd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sf=/^\d+\/\d+$/,yf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rf=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ff=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ef=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$s=e=>Sf.test(e),ae=e=>!!e&&!Number.isNaN(Number(e)),Xt=e=>!!e&&Number.isInteger(Number(e)),Zn=e=>e.endsWith("%")&&ae(e.slice(0,-1)),At=e=>yf.test(e),Df=()=>!0,Pf=e=>Rf.test(e)&&!xf.test(e),qd=()=>!1,Tf=e=>Ff.test(e),Mf=e=>Ef.test(e),If=e=>!U(e)&&!j(e),kf=e=>yo(e,Qd,qd),U=e=>$d.test(e),Cs=e=>yo(e,Xd,Pf),Qn=e=>yo(e,Nf,ae),Wl=e=>yo(e,Yd,qd),Af=e=>yo(e,Zd,Mf),Ri=e=>yo(e,Jd,Tf),j=e=>Kd.test(e),To=e=>Ro(e,Xd),Lf=e=>Ro(e,Gf),_l=e=>Ro(e,Yd),Of=e=>Ro(e,Qd),Hf=e=>Ro(e,Zd),xi=e=>Ro(e,Jd,!0),yo=(e,t,s)=>{const o=$d.exec(e);return o?o[1]?t(o[1]):s(o[2]):!1},Ro=(e,t,s=!1)=>{const o=Kd.exec(e);return o?o[1]?t(o[1]):s:!1},Yd=e=>e==="position"||e==="percentage",Zd=e=>e==="image"||e==="url",Qd=e=>e==="length"||e==="size"||e==="bg-size",Xd=e=>e==="length",Nf=e=>e==="number",Gf=e=>e==="family-name",Jd=e=>e==="shadow",Vf=()=>{const e=Me("color"),t=Me("font"),s=Me("text"),o=Me("font-weight"),i=Me("tracking"),n=Me("leading"),r=Me("breakpoint"),a=Me("container"),l=Me("spacing"),c=Me("radius"),d=Me("shadow"),u=Me("inset-shadow"),h=Me("text-shadow"),g=Me("drop-shadow"),f=Me("blur"),m=Me("perspective"),v=Me("aspect"),w=Me("ease"),b=Me("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],y=()=>[...R(),j,U],x=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],M=()=>[j,U,l],L=()=>[$s,"full","auto",...M()],I=()=>[Xt,"none","subgrid",j,U],F=()=>["auto",{span:["full",Xt,j,U]},Xt,j,U],P=()=>[Xt,"auto",j,U],B=()=>["auto","min","max","fr",j,U],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],A=()=>["start","end","center","stretch","center-safe","end-safe"],te=()=>["auto",...M()],z=()=>[$s,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],k=()=>[e,j,U],Z=()=>[...R(),_l,Wl,{position:[j,U]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",Of,kf,{size:[j,U]}],$=()=>[Zn,To,Cs],_=()=>["","none","full",c,j,U],se=()=>["",ae,To,Cs],O=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[ae,Zn,_l,Wl],Oe=()=>["","none",f,j,U],Ze=()=>["none",ae,j,U],he=()=>["none",ae,j,U],ft=()=>[ae,j,U],Te=()=>[$s,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[At],breakpoint:[At],color:[Df],container:[At],"drop-shadow":[At],ease:["in","out","in-out"],font:[If],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[At],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[At],shadow:[At],spacing:["px",ae],text:[At],"text-shadow":[At],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$s,U,j,v]}],container:["container"],columns:[{columns:[ae,U,j,a]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:y()}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[Xt,"auto",j,U]}],basis:[{basis:[$s,"full","auto",a,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ae,$s,"auto","initial","none",U]}],grow:[{grow:["",ae,j,U]}],shrink:[{shrink:["",ae,j,U]}],order:[{order:[Xt,"first","last","none",j,U]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...A(),"normal"]}],"justify-self":[{"justify-self":["auto",...A()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...A(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...A(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...A(),"baseline"]}],"place-self":[{"place-self":["auto",...A()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:te()}],mx:[{mx:te()}],my:[{my:te()}],ms:[{ms:te()}],me:[{me:te()}],mt:[{mt:te()}],mr:[{mr:te()}],mb:[{mb:te()}],ml:[{ml:te()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[a,"screen",...z()]}],"min-w":[{"min-w":[a,"screen","none",...z()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",s,To,Cs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,j,Qn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zn,U]}],"font-family":[{font:[Lf,U,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,j,U]}],"line-clamp":[{"line-clamp":[ae,"none",j,Qn]}],leading:[{leading:[n,...M()]}],"list-image":[{"list-image":["none",j,U]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",j,U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:[ae,"from-font","auto",j,Cs]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[ae,"auto",j,U]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j,U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j,U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xt,j,U],radial:["",j,U],conic:[Xt,j,U]},Hf,Af]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:_()}],"rounded-s":[{"rounded-s":_()}],"rounded-e":[{"rounded-e":_()}],"rounded-t":[{"rounded-t":_()}],"rounded-r":[{"rounded-r":_()}],"rounded-b":[{"rounded-b":_()}],"rounded-l":[{"rounded-l":_()}],"rounded-ss":[{"rounded-ss":_()}],"rounded-se":[{"rounded-se":_()}],"rounded-ee":[{"rounded-ee":_()}],"rounded-es":[{"rounded-es":_()}],"rounded-tl":[{"rounded-tl":_()}],"rounded-tr":[{"rounded-tr":_()}],"rounded-br":[{"rounded-br":_()}],"rounded-bl":[{"rounded-bl":_()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ae,j,U]}],"outline-w":[{outline:["",ae,To,Cs]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",d,xi,Ri]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",u,xi,Ri]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[ae,Cs]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",h,xi,Ri]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[ae,j,U]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[j,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",j,U]}],filter:[{filter:["","none",j,U]}],blur:[{blur:Oe()}],brightness:[{brightness:[ae,j,U]}],contrast:[{contrast:[ae,j,U]}],"drop-shadow":[{"drop-shadow":["","none",g,xi,Ri]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",ae,j,U]}],"hue-rotate":[{"hue-rotate":[ae,j,U]}],invert:[{invert:["",ae,j,U]}],saturate:[{saturate:[ae,j,U]}],sepia:[{sepia:["",ae,j,U]}],"backdrop-filter":[{"backdrop-filter":["","none",j,U]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[ae,j,U]}],"backdrop-contrast":[{"backdrop-contrast":[ae,j,U]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ae,j,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ae,j,U]}],"backdrop-invert":[{"backdrop-invert":["",ae,j,U]}],"backdrop-opacity":[{"backdrop-opacity":[ae,j,U]}],"backdrop-saturate":[{"backdrop-saturate":[ae,j,U]}],"backdrop-sepia":[{"backdrop-sepia":["",ae,j,U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",j,U]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ae,"initial",j,U]}],ease:[{ease:["linear","initial",w,j,U]}],delay:[{delay:[ae,j,U]}],animate:[{animate:["none",b,j,U]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,j,U]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:Ze()}],"rotate-x":[{"rotate-x":Ze()}],"rotate-y":[{"rotate-y":Ze()}],"rotate-z":[{"rotate-z":Ze()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:ft()}],"skew-x":[{"skew-x":ft()}],"skew-y":[{"skew-y":ft()}],transform:[{transform:[j,U,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Te()}],"translate-x":[{"translate-x":Te()}],"translate-y":[{"translate-y":Te()}],"translate-z":[{"translate-z":Te()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",j,U]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",j,U]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[ae,To,Cs,Qn]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Bf=bf(Vf);function ue(...e){return Bf(W(e))}const Vs=({fieldTitle:e,htmlFor:t,optional:s,optionalText:o,cssClass:i,description:n})=>e?C.jsxs("label",{className:ue("dial-tiny text-secondary flex gap-1",i,!i?.includes("mb")&&"mb-2"),htmlFor:t,children:[typeof e=="string"?C.jsx("span",{className:"min-h-4",children:e}):e,s&&C.jsx("span",{children:o??"(Optional)"}),n&&C.jsx(hs,{tooltip:n,children:C.jsx(we,{icon:C.jsx(K.IconInfoCircle,{size:14,className:"text-secondary"})})})]}):null;var De=(e=>(e.Primary="primary",e.Secondary="secondary",e.Tertiary="tertiary",e.Danger="danger",e))(De||{});const zf={[De.Primary]:"dial-primary-button",[De.Secondary]:"dial-secondary-button",[De.Tertiary]:"dial-tertiary-button",[De.Danger]:"dial-danger-button"},Ie=({title:e,variant:t,cssClass:s,textCssClass:o,ref:i,onClick:n,disable:r,iconAfter:a,iconBefore:l,hideTitleOnMobile:c,ariaLabel:d})=>{const u=W("dial-small-semi",a?"mr-2":"",l?"ml-2":"",c?"hidden sm:inline":"inline",o),h=W(t&&zf[t],s,"focus-visible:outline outline-offset-0");return C.jsxs("button",{ref:i,type:"button",className:h,onClick:g=>n?.(g),disabled:r,"aria-label":e||d,children:[C.jsx(we,{icon:l}),e&&C.jsx("span",{className:u,children:e}),C.jsx(we,{icon:a})]})};var Ss=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e))(Ss||{});const Wf={info:C.jsx(K.IconInfoCircle,{size:24,stroke:2}),error:C.jsx(K.IconAlertCircle,{size:24,stroke:2}),warning:C.jsx(K.IconAlertTriangle,{size:24,stroke:2}),success:C.jsx(K.IconCircleCheck,{size:24,stroke:2})},_f={[Ss.Info]:"bg-info border-info text-info",[Ss.Success]:"bg-success border-success text-success",[Ss.Warning]:"bg-warning border-warning text-warning",[Ss.Error]:"bg-error border-error text-error"},Uf="items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex",jf=({variant:e=Ss.Info,message:t,cssClass:s,closable:o=!1,onClose:i})=>C.jsxs("div",{role:"alert",className:W(Uf,_f[e],s),children:[C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(we,{icon:Wf[e]}),C.jsx("div",{className:"text-primary",children:t})]}),o&&C.jsx(Ie,{cssClass:"ml-2 text-secondary hover:text-primary",ariaLabel:"Close alert",iconBefore:C.jsx(K.IconX,{size:16}),onClick:n=>i?.(n)})]}),$f="flex items-center justify-center text-secondary",Kf="shrink-0 grow-0 basis-auto animate-spin-steps",qf=e=>oe.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},oe.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),oe.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),oe.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),oe.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),oe.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),oe.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),oe.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),oe.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),Pn=({size:e=18,cssClass:t,iconClass:s,fullWidth:o=!0,ariaLabel:i="Loading"})=>C.jsx("div",{role:"status",className:W({[$f]:!0,"w-full h-full":o,[t||""]:!!t}),children:C.jsx(we,{icon:C.jsx(qf,{width:e,height:e,className:W(Kf,s),role:"img","aria-label":i})})}),Ho=18,ke={size:Ho,stroke:2},Yf="text-primary",Tt=({text:e,cssClass:t,contentClassName:s,hideTooltip:o,...i})=>{const n=p.useRef(null),[r,a]=p.useState(!1),[l,c]=p.useState(""),d=p.useRef(null),u=()=>{const m=n.current;if(!m)return;c(m.textContent??"");const v=m.clientWidth,w=m.scrollWidth,b=Math.ceil(m.getBoundingClientRect().width);a(w>v||w>b)},h=p.useCallback(()=>{d.current&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(u)},[]);p.useEffect(()=>{h();const m=()=>h();window.addEventListener("resize",m);let v=null;return"ResizeObserver"in window&&n.current&&(v=new ResizeObserver(()=>h()),v.observe(n.current)),()=>{window.removeEventListener("resize",m),v&&v.disconnect(),d.current&&cancelAnimationFrame(d.current)}},[e,h]);const g=p.useMemo(()=>typeof e=="string"?e:l,[l,e]),f=p.useMemo(()=>o?"":r?g:"",[g,o,r]);return C.jsxs(zd,{...i,children:[C.jsx(_d,{asChild:!0,ref:n,onMouseEnter:h,onFocusCapture:h,children:C.jsx("span",{className:ue("block truncate flex-1 min-w-0 max-w-full text-left",t),"aria-label":r?g:void 0,onMouseEnter:h,onFocus:h,children:e})}),C.jsx(Wd,{className:ue(Yf,s,!f&&"hidden"),children:f})]})},Qo=({label:e,id:t,checked:s,indeterminate:o,disabled:i,ariaLabel:n,onChange:r,cssClass:a})=>{const l=p.useCallback(h=>{r?.(h.target.checked,t)},[r,t]),c=W("flex flex-row items-center cursor-pointer text-accent-primary small-medium flex-1 min-w-0",`${s||o?"":'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded before:mr-2'}`,i?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",a),d=W("mr-2 border rounded",i?"bg-layer-4 border-icon-secondary":""),u=()=>o?C.jsx(K.IconMinus,{className:d,...ke}):s?C.jsx(K.IconCheck,{className:d,...ke}):null;return C.jsxs("label",{className:c,htmlFor:t,children:[u(),e&&(typeof e=="string"?C.jsx(Tt,{text:e,cssClass:"text-primary"}):e),C.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:l,id:t,checked:s,"aria-checked":o?"mixed":s,"aria-disabled":i||void 0,"aria-label":e?void 0:n,className:"invisible w-0 h-0"})]})};var tt=(e=>(e.VALID="valid",e.ERROR="error",e))(tt||{});const Zf=(e,t)=>{if(t===e.id)switch(e.status){case tt.VALID:return"border-accent-secondary text-primary";case tt.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case tt.VALID:return"border-primary text-primary";case tt.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},Qf=(e,t)=>{if(t===e.id)switch(e.status){case tt.VALID:return"bg-accent-secondary";case tt.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case tt.VALID:return"bg-accent-secondary";case tt.ERROR:return"bg-red-400";default:return"bg-layer-4"}},Xf=({step:e,index:t,currentStep:s,onChangeStep:o})=>{const i="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny border-t-2 cursor-pointer",n="w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full text-white",r=()=>s===e.id&&e.status===tt.ERROR?C.jsx(K.IconExclamationCircle,{stroke:2,size:16}):s!==e.id&&e.status===tt.VALID?C.jsx(K.IconCheck,{stroke:2,size:16}):t+1;return C.jsxs("button",{className:W(i,Zf(e,s)),onClick:()=>o(e.id),children:[C.jsx("span",{className:W(n,Qf(e,s)),children:r()}),C.jsx("span",{children:e.name})]})},Jf=({steps:e,currentStep:t,onChangeStep:s})=>{const o=i=>{const n=e.findIndex(a=>a.id===t),r=e.findIndex(a=>a.id===i);(i!==t&&e[n].status===tt.VALID||r<n)&&s(i)};return C.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((i,n)=>C.jsx(Xf,{currentStep:t,onChangeStep:o,step:i,index:n},i.id))})},eu=({name:e,value:t,title:s,description:o,checked:i=!1,inputId:n,cssClass:r,labelCssClass:a,disabled:l,onChange:c,descriptionCssClass:d})=>{const u=`${n}-desc`,h=W("dial-small cursor-pointer",l?"text-secondary":"text-primary",a),g=W("cursor-pointer dial-input-radio",s&&"mr-2",r),f=W("flex flex-col",!!o&&"mb-2"),m=W("dial-tiny mt-2 ml-[26px] text-secondary",d),v=w=>{l||w.target.checked&&c?.(t)};return C.jsxs("div",{className:f,children:[C.jsxs("div",{className:"flex flex-row items-center",children:[C.jsx("input",{type:"radio",id:n,name:e,value:t,checked:i,disabled:l,"aria-describedby":i&&o?u:void 0,className:g,onChange:v}),s?C.jsx("label",{className:h,htmlFor:n,children:s}):null]}),i&&o&&C.jsx("div",{id:u,className:m,children:o})]})};var Xo=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(Xo||{});const em="w-full flex",tm={[Xo.Vertical]:"flex-col",[Xo.Horizontal]:"flex-row items-end"},Tn=({elementId:e,label:t,optional:s,optionalText:o,description:i,error:n,orientation:r=Xo.Vertical,labelVisuallyHidden:a=!1,cssClass:l,labelCssClass:c,errorCssClass:d,childrenCssClass:u,captionDescription:h,readonly:g,value:f,defaultEmptyText:m,children:v})=>{const w=`${e}-label`,b=i?`${e}-desc`:void 0,S=n?`${e}-err`:void 0,R=`${e}-caption-desc`,y=[b,S].filter(Boolean).join(" ")||void 0,x=p.useCallback(()=>typeof n=="boolean"?null:typeof n=="string"||typeof n>"u"?n?C.jsx("div",{id:S,role:"alert","aria-live":"polite",className:d,children:C.jsx(rs,{errorText:n})}):null:C.jsx("div",{id:S,role:"alert","aria-live":"polite",className:d,children:n}),[n,d,S]),D=p.useCallback(()=>f?typeof f=="string"||typeof f=="number"?C.jsx("span",{"aria-readonly":"true",children:f}):f:C.jsx("span",{"aria-readonly":"true",children:m??"None"}),[f,m]);return C.jsxs("div",{role:"group","aria-labelledby":t?w:void 0,"aria-describedby":y,className:ue(em,tm[r],l),children:[t&&C.jsx("div",{id:w,className:ue(r==="horizontal"&&"shrink-0"),children:C.jsx(Vs,{htmlFor:e,fieldTitle:t,optional:s,optionalText:o,cssClass:ue(a&&"sr-only",c),description:i})}),C.jsxs("div",{className:ue("min-w-0 w-full",u),children:[g?C.jsx("div",{className:"dial-input px-3 py-2",children:D()}):v,h&&C.jsx("div",{id:R,className:ue({"dial-tiny text-secondary mt-1":!0,"text-error":!!n}),children:h}),x()]})]})};var Jo=(e=>(e.Row="Row",e.Column="Column",e))(Jo||{});const sm="flex",om="pb-1 mt-2",im={[Jo.Column]:"flex-col gap-y-3",[Jo.Row]:"flex-row gap-x-6"},tu=({fieldTitle:e,radioCssClass:t,containerCssClass:s,selectedItemCssClass:o,selectedLabelCssClass:i,radioGroupCssClass:n,inputContainerCssClass:r,selectedInputContainerCssClass:a,groupLabelCssClass:l,formItemChildrenCssClass:c,labelCssClass:d,disabled:u,elementId:h,radioButtons:g,activeRadioButton:f,orientation:m,onChange:v})=>C.jsx(Tn,{elementId:h,label:e,labelCssClass:l||d,cssClass:s,childrenCssClass:c,children:C.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":u||void 0,className:ue(sm,im[m],n),children:g.map(w=>C.jsxs("div",{className:ue("flex flex-col",r,w.id===f&&a),children:[C.jsx(eu,{name:h,value:w.id,inputId:w.id,disabled:u,cssClass:t,labelCssClass:ue(d,w.id===f&&i),title:w.name,checked:w.id===f,onChange:()=>v(w.id)}),w.id===f&&w.content?C.jsx("div",{className:ue(om,o),children:w.content}):null]},w.id))})}),ka=({icon:e,title:t,description:s})=>C.jsxs("div",{className:"h-full w-full flex flex-col items-center justify-center text-secondary",children:[e||C.jsx(K.IconClipboardX,{width:60,height:60}),C.jsx("span",{className:"dial-small mt-2 text-primary",children:t}),s&&C.jsx("span",{className:"mt-1 text-primary",children:s})]}),nm=60,su=({containerCssClass:e,children:t,width:s,title:o,iconSize:i=32,iconStroke:n=1.5,titleCssClass:r,additionalButtons:a})=>{const[l,c]=p.useState(s),[d,u]=p.useState(!0),h=W(["transform rotate-180 [writing-mode:tb-rl] p-4",d&&"hidden",r]),g=W(["flex flex-row gap-2 cursor-pointer text-secondary",d?"justify-end":"justify-center"]),f=()=>{c(d?nm:s),u(!d)};return C.jsxs("div",{className:W(["rounded flex flex-col justify-between overflow-y-auto flex-shrink-0",e]),style:{width:`${l}px`},children:[C.jsx("div",{className:W(["flex-1 p-4 min-h-0 overflow-auto",!d&&"hidden"]),children:t}),C.jsx("div",{className:h,children:o}),C.jsxs("div",{className:ue("border-t stroke-primary h-12",g),children:[d&&a,C.jsx(Ie,{cssClass:"hover:text-icon-accent-primary",onClick:f,iconBefore:d?C.jsx(K.IconChevronsLeft,{size:i,stroke:n}):C.jsx(K.IconChevronsRight,{size:i,stroke:n})})]})]})},rm=({label:e,text:t,children:s,postfix:o})=>C.jsxs("div",{className:W("flex flex-col",s?"":"max-w-[200px]"),children:[C.jsx("label",{className:"dial-tiny mb-2 text-secondary",children:e}),s||C.jsxs("div",{className:"flex flex-row items-center",children:[C.jsx(hs,{triggerClassName:"text-primary",tooltip:t,children:t}),o||null]})]});var Mn=(e=>(e.Default="default",e))(Mn||{});const am={[Mn.Default]:"border-icon-secondary bg-layer-3"},In=({tag:e,cssClass:t,remove:s,variant:o=Mn.Default,iconBefore:i,bordered:n=!0})=>{const r=am[o],a=ue("flex items-center gap-1 dial-tiny rounded p-1 h-[22px] text-primary",r,n?"border":"border-transparent",t);return C.jsxs("div",{className:a,children:[C.jsx(we,{icon:i}),C.jsx(Tt,{text:e}),s&&C.jsx(Ie,{iconAfter:C.jsx(K.IconX,{size:16}),onClick:l=>s(l)})]},e)},ou=p.createContext({dragDropManager:void 0});function at(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Ul=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),jl=function(){return Math.random().toString(36).substring(7).split("").join(".")},$l={INIT:"@@redux/INIT"+jl(),REPLACE:"@@redux/REPLACE"+jl()};function lm(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function cm(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(hm(e))return"date";if(um(e))return"error";var s=dm(e);switch(s){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return s}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function dm(e){return typeof e.constructor=="function"?e.constructor.name:null}function um(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function hm(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Ks(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=cm(e)),t}function iu(e,t,s){var o;if(typeof t=="function"&&typeof s=="function"||typeof s=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?at(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof s>"u"&&(s=t,t=void 0),typeof s<"u"){if(typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?at(1):"Expected the enhancer to be a function. Instead, received: '"+Ks(s)+"'");return s(iu)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?at(2):"Expected the root reducer to be a function. Instead, received: '"+Ks(e)+"'");var i=e,n=t,r=[],a=r,l=!1;function c(){a===r&&(a=r.slice())}function d(){if(l)throw new Error(process.env.NODE_ENV==="production"?at(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return n}function u(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?at(4):"Expected the listener to be a function. Instead, received: '"+Ks(m)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?at(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var v=!0;return c(),a.push(m),function(){if(v){if(l)throw new Error(process.env.NODE_ENV==="production"?at(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,c();var b=a.indexOf(m);a.splice(b,1),r=null}}}function h(m){if(!lm(m))throw new Error(process.env.NODE_ENV==="production"?at(7):"Actions must be plain objects. Instead, the actual type was: '"+Ks(m)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof m.type>"u")throw new Error(process.env.NODE_ENV==="production"?at(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error(process.env.NODE_ENV==="production"?at(9):"Reducers may not dispatch actions.");try{l=!0,n=i(n,m)}finally{l=!1}for(var v=r=a,w=0;w<v.length;w++){var b=v[w];b()}return m}function g(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?at(10):"Expected the nextReducer to be a function. Instead, received: '"+Ks(m));i=m,h({type:$l.REPLACE})}function f(){var m,v=u;return m={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?at(11):"Expected the observer to be an object. Instead, received: '"+Ks(b)+"'");function S(){b.next&&b.next(d())}S();var R=v(S);return{unsubscribe:R}}},m[Ul]=function(){return this},m}return h({type:$l.INIT}),o={dispatch:h,subscribe:u,getState:d,replaceReducer:g},o[Ul]=f,o}function ie(e,t,...s){if(gm()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let o;if(t===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;o=new Error(t.replace(/%s/g,function(){return s[i++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}function gm(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function pm(e,t,s){return t.split(".").reduce((o,i)=>o&&o[i]?o[i]:s||null,e)}function fm(e,t){return e.filter(s=>s!==t)}function nu(e){return typeof e=="object"}function mm(e,t){const s=new Map,o=n=>{s.set(n,s.has(n)?s.get(n)+1:1)};e.forEach(o),t.forEach(o);const i=[];return s.forEach((n,r)=>{n===1&&i.push(r)}),i}function Cm(e,t){return e.filter(s=>t.indexOf(s)>-1)}const Aa="dnd-core/INIT_COORDS",kn="dnd-core/BEGIN_DRAG",La="dnd-core/PUBLISH_DRAG_SOURCE",An="dnd-core/HOVER",Ln="dnd-core/DROP",On="dnd-core/END_DRAG";function Kl(e,t){return{type:Aa,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const vm={type:Aa,payload:{clientOffset:null,sourceClientOffset:null}};function wm(e){return function(s=[],o={publishSource:!0}){const{publishSource:i=!0,clientOffset:n,getSourceClientOffset:r}=o,a=e.getMonitor(),l=e.getRegistry();e.dispatch(Kl(n)),bm(s,a,l);const c=Rm(s,a);if(c==null){e.dispatch(vm);return}let d=null;if(n){if(!r)throw new Error("getSourceClientOffset must be defined");Sm(r),d=r(c)}e.dispatch(Kl(n,d));const h=l.getSource(c).beginDrag(a,c);if(h==null)return;ym(h),l.pinSource(c);const g=l.getSourceType(c);return{type:kn,payload:{itemType:g,item:h,sourceId:c,clientOffset:n||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}}function bm(e,t,s){ie(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(o){ie(s.getSource(o),"Expected sourceIds to be registered.")})}function Sm(e){ie(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function ym(e){ie(nu(e),"Item must be an object.")}function Rm(e,t){let s=null;for(let o=e.length-1;o>=0;o--)if(t.canDragSource(e[o])){s=e[o];break}return s}function xm(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Fm(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){xm(e,i,s[i])})}return e}function Em(e){return function(s={}){const o=e.getMonitor(),i=e.getRegistry();Dm(o),Mm(o).forEach((r,a)=>{const l=Pm(r,a,i,o),c={type:Ln,payload:{dropResult:Fm({},s,l)}};e.dispatch(c)})}}function Dm(e){ie(e.isDragging(),"Cannot call drop while not dragging."),ie(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Pm(e,t,s,o){const i=s.getTarget(e);let n=i?i.drop(o,e):void 0;return Tm(n),typeof n>"u"&&(n=t===0?{}:o.getDropResult()),n}function Tm(e){ie(typeof e>"u"||nu(e),"Drop result must either be an object or undefined.")}function Mm(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Im(e){return function(){const s=e.getMonitor(),o=e.getRegistry();km(s);const i=s.getSourceId();return i!=null&&(o.getSource(i,!0).endDrag(s,i),o.unpinSource()),{type:On}}}function km(e){ie(e.isDragging(),"Cannot call endDrag while not dragging.")}function Ur(e,t){return t===null?e===null:Array.isArray(e)?e.some(s=>s===t):e===t}function Am(e){return function(s,{clientOffset:o}={}){Lm(s);const i=s.slice(0),n=e.getMonitor(),r=e.getRegistry(),a=n.getItemType();return Hm(i,r,a),Om(i,n,r),Nm(i,n,r),{type:An,payload:{targetIds:i,clientOffset:o||null}}}}function Lm(e){ie(Array.isArray(e),"Expected targetIds to be an array.")}function Om(e,t,s){ie(t.isDragging(),"Cannot call hover while not dragging."),ie(!t.didDrop(),"Cannot call hover after drop.");for(let o=0;o<e.length;o++){const i=e[o];ie(e.lastIndexOf(i)===o,"Expected targetIds to be unique in the passed array.");const n=s.getTarget(i);ie(n,"Expected targetIds to be registered.")}}function Hm(e,t,s){for(let o=e.length-1;o>=0;o--){const i=e[o],n=t.getTargetType(i);Ur(n,s)||e.splice(o,1)}}function Nm(e,t,s){e.forEach(function(o){s.getTarget(o).hover(t,o)})}function Gm(e){return function(){if(e.getMonitor().isDragging())return{type:La}}}function Vm(e){return{beginDrag:wm(e),publishDragSource:Gm(e),hover:Am(e),drop:Em(e),endDrag:Im(e)}}class Bm{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:s}=this.store;function o(n){return(...r)=>{const a=n.apply(t,r);typeof a<"u"&&s(a)}}const i=Vm(this);return Object.keys(i).reduce((n,r)=>{const a=i[r];return n[r]=o(a),n},{})}dispatch(t){this.store.dispatch(t)}constructor(t,s){this.isSetUp=!1,this.handleRefCountChange=()=>{const o=this.store.getState().refCount>0;this.backend&&(o&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!o&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=s,t.subscribe(this.handleRefCountChange)}}function zm(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ru(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Wm(e){const{clientOffset:t,initialClientOffset:s,initialSourceClientOffset:o}=e;return!t||!s||!o?null:ru(zm(t,o),s)}function _m(e){const{clientOffset:t,initialClientOffset:s}=e;return!t||!s?null:ru(t,s)}const Bo=[],Oa=[];Bo.__IS_NONE__=!0;Oa.__IS_ALL__=!0;function Um(e,t){return e===Bo?!1:e===Oa||typeof t>"u"?!0:Cm(t,e).length>0}class jm{subscribeToStateChange(t,s={}){const{handlerIds:o}=s;ie(typeof t=="function","listener must be a function."),ie(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const n=()=>{const r=this.store.getState(),a=r.stateId;try{a===i||a===i+1&&!Um(r.dirtyHandlerIds,o)||t()}finally{i=a}};return this.store.subscribe(n)}subscribeToOffsetChange(t){ie(typeof t=="function","listener must be a function.");let s=this.store.getState().dragOffset;const o=()=>{const i=this.store.getState().dragOffset;i!==s&&(s=i,t())};return this.store.subscribe(o)}canDragSource(t){if(!t)return!1;const s=this.registry.getSource(t);return ie(s,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:s.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const s=this.registry.getTarget(t);if(ie(s,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const o=this.registry.getTargetType(t),i=this.getItemType();return Ur(o,i)&&s.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const s=this.registry.getSource(t,!0);if(ie(s,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const o=this.registry.getSourceType(t),i=this.getItemType();return o!==i?!1:s.isDragging(this,t)}isOverTarget(t,s={shallow:!1}){if(!t)return!1;const{shallow:o}=s;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),n=this.getItemType();if(n&&!Ur(i,n))return!1;const r=this.getTargetIds();if(!r.length)return!1;const a=r.indexOf(t);return o?a===r.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Wm(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return _m(this.store.getState().dragOffset)}constructor(t,s){this.store=t,this.registry=s}}const ql=typeof global<"u"?global:self,au=ql.MutationObserver||ql.WebKitMutationObserver;function lu(e){return function(){const s=setTimeout(i,0),o=setInterval(i,50);function i(){clearTimeout(s),clearInterval(o),e()}}}function $m(e){let t=1;const s=new au(e),o=document.createTextNode("");return s.observe(o,{characterData:!0}),function(){t=-t,o.data=t}}const Km=typeof au=="function"?$m:lu;class qm{enqueueTask(t){const{queue:s,requestFlush:o}=this;s.length||(o(),this.flushing=!0),s[s.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const s=this.index;if(this.index++,t[s].call(),this.index>this.capacity){for(let o=0,i=t.length-this.index;o<i;o++)t[o]=t[o+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Km(this.flush),this.requestErrorThrow=lu(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Ym{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,s){this.onError=t,this.release=s,this.task=null}}class Zm{create(t){const s=this.freeTasks,o=s.length?s.pop():new Ym(this.onError,i=>s[s.length]=i);return o.task=t,o}constructor(t){this.onError=t,this.freeTasks=[]}}const cu=new qm,Qm=new Zm(cu.registerPendingError);function Xm(e){cu.enqueueTask(Qm.create(e))}const Ha="dnd-core/ADD_SOURCE",Na="dnd-core/ADD_TARGET",Ga="dnd-core/REMOVE_SOURCE",Hn="dnd-core/REMOVE_TARGET";function Jm(e){return{type:Ha,payload:{sourceId:e}}}function eC(e){return{type:Na,payload:{targetId:e}}}function tC(e){return{type:Ga,payload:{sourceId:e}}}function sC(e){return{type:Hn,payload:{targetId:e}}}function oC(e){ie(typeof e.canDrag=="function","Expected canDrag to be a function."),ie(typeof e.beginDrag=="function","Expected beginDrag to be a function."),ie(typeof e.endDrag=="function","Expected endDrag to be a function.")}function iC(e){ie(typeof e.canDrop=="function","Expected canDrop to be a function."),ie(typeof e.hover=="function","Expected hover to be a function."),ie(typeof e.drop=="function","Expected beginDrag to be a function.")}function jr(e,t){if(t&&Array.isArray(e)){e.forEach(s=>jr(s,!1));return}ie(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var dt;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(dt||(dt={}));let nC=0;function rC(){return nC++}function aC(e){const t=rC().toString();switch(e){case dt.SOURCE:return`S${t}`;case dt.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function Yl(e){switch(e[0]){case"S":return dt.SOURCE;case"T":return dt.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Zl(e,t){const s=e.entries();let o=!1;do{const{done:i,value:[,n]}=s.next();if(n===t)return!0;o=!!i}while(!o);return!1}class lC{addSource(t,s){jr(t),oC(s);const o=this.addHandler(dt.SOURCE,t,s);return this.store.dispatch(Jm(o)),o}addTarget(t,s){jr(t,!0),iC(s);const o=this.addHandler(dt.TARGET,t,s);return this.store.dispatch(eC(o)),o}containsHandler(t){return Zl(this.dragSources,t)||Zl(this.dropTargets,t)}getSource(t,s=!1){return ie(this.isSourceId(t),"Expected a valid source ID."),s&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return ie(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return ie(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return ie(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return Yl(t)===dt.SOURCE}isTargetId(t){return Yl(t)===dt.TARGET}removeSource(t){ie(this.getSource(t),"Expected an existing source."),this.store.dispatch(tC(t)),Xm(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){ie(this.getTarget(t),"Expected an existing target."),this.store.dispatch(sC(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const s=this.getSource(t);ie(s,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=s}unpinSource(){ie(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,s,o){const i=aC(t);return this.types.set(i,s),t===dt.SOURCE?this.dragSources.set(i,o):t===dt.TARGET&&this.dropTargets.set(i,o),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const cC=(e,t)=>e===t;function dC(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function uC(e,t,s=cC){if(e.length!==t.length)return!1;for(let o=0;o<e.length;++o)if(!s(e[o],t[o]))return!1;return!0}function hC(e=Bo,t){switch(t.type){case An:break;case Ha:case Na:case Hn:case Ga:return Bo;case kn:case La:case On:case Ln:default:return Oa}const{targetIds:s=[],prevTargetIds:o=[]}=t.payload,i=mm(s,o);if(!(i.length>0||!uC(s,o)))return Bo;const r=o[o.length-1],a=s[s.length-1];return r!==a&&(r&&i.push(r),a&&i.push(a)),i}function gC(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function pC(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){gC(e,i,s[i])})}return e}const Ql={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function fC(e=Ql,t){const{payload:s}=t;switch(t.type){case Aa:case kn:return{initialSourceClientOffset:s.sourceClientOffset,initialClientOffset:s.clientOffset,clientOffset:s.clientOffset};case An:return dC(e.clientOffset,s.clientOffset)?e:pC({},e,{clientOffset:s.clientOffset});case On:case Ln:return Ql;default:return e}}function mC(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function qs(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){mC(e,i,s[i])})}return e}const CC={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function vC(e=CC,t){const{payload:s}=t;switch(t.type){case kn:return qs({},e,{itemType:s.itemType,item:s.item,sourceId:s.sourceId,isSourcePublic:s.isSourcePublic,dropResult:null,didDrop:!1});case La:return qs({},e,{isSourcePublic:!0});case An:return qs({},e,{targetIds:s.targetIds});case Hn:return e.targetIds.indexOf(s.targetId)===-1?e:qs({},e,{targetIds:fm(e.targetIds,s.targetId)});case Ln:return qs({},e,{dropResult:s.dropResult,didDrop:!0,targetIds:[]});case On:return qs({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function wC(e=0,t){switch(t.type){case Ha:case Na:return e+1;case Ga:case Hn:return e-1;default:return e}}function bC(e=0){return e+1}function SC(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function yC(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){SC(e,i,s[i])})}return e}function RC(e={},t){return{dirtyHandlerIds:hC(e.dirtyHandlerIds,{type:t.type,payload:yC({},t.payload,{prevTargetIds:pm(e,"dragOperation.targetIds",[])})}),dragOffset:fC(e.dragOffset,t),refCount:wC(e.refCount,t),dragOperation:vC(e.dragOperation,t),stateId:bC(e.stateId)}}function xC(e,t=void 0,s={},o=!1){const i=FC(o),n=new jm(i,new lC(i)),r=new Bm(i,n),a=e(r,t,s);return r.receiveBackend(a),r}function FC(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return iu(RC,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function EC(e,t){if(e==null)return{};var s=DC(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}function DC(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}let Xl=0;const Ni=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var PC=p.memo(function(t){var{children:s}=t,o=EC(t,["children"]);const[i,n]=TC(o);return p.useEffect(()=>{if(n){const r=du();return++Xl,()=>{--Xl===0&&(r[Ni]=null)}}},[]),C.jsx(ou.Provider,{value:i,children:s})});function TC(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=MC(e.backend,e.context,e.options,e.debugMode),s=!e.context;return[t,s]}function MC(e,t=du(),s,o){const i=t;return i[Ni]||(i[Ni]={dragDropManager:xC(e,t,s,o)}),i[Ni]}function du(){return typeof global<"u"?global:window}function IC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xn,Jl;function kC(){return Jl||(Jl=1,Xn=function e(t,s){if(t===s)return!0;if(t&&s&&typeof t=="object"&&typeof s=="object"){if(t.constructor!==s.constructor)return!1;var o,i,n;if(Array.isArray(t)){if(o=t.length,o!=s.length)return!1;for(i=o;i--!==0;)if(!e(t[i],s[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&&t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if(n=Object.keys(t),o=n.length,o!==Object.keys(s).length)return!1;for(i=o;i--!==0;)if(!Object.prototype.hasOwnProperty.call(s,n[i]))return!1;for(i=o;i--!==0;){var r=n[i];if(!e(t[r],s[r]))return!1}return!0}return t!==t&&s!==s}),Xn}var AC=kC();const LC=IC(AC),Is=typeof window<"u"?p.useLayoutEffect:p.useEffect;function OC(e,t,s){const[o,i]=p.useState(()=>t(e)),n=p.useCallback(()=>{const r=t(e);LC(o,r)||(i(r),s&&s())},[o,e,s]);return Is(n),[o,n]}function HC(e,t,s){const[o,i]=OC(e,t,s);return Is(function(){const r=e.getHandlerId();if(r!=null)return e.subscribeToStateChange(i,{handlerIds:[r]})},[e,i]),o}function uu(e,t,s){return HC(t,e||(()=>({})),()=>s.reconnect())}function hu(e,t){const s=[...t||[]];return t==null&&typeof e!="function"&&s.push(e),p.useMemo(()=>typeof e=="function"?e():e,s)}function NC(e){return p.useMemo(()=>e.hooks.dragSource(),[e])}function GC(e){return p.useMemo(()=>e.hooks.dragPreview(),[e])}let Jn=!1,er=!1;class VC{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){ie(!Jn,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Jn=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Jn=!1}}isDragging(){if(!this.sourceId)return!1;ie(!er,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return er=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{er=!1}}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,s){return this.internalMonitor.isOverTarget(t,s)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let tr=!1;class BC{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}canDrop(){if(!this.targetId)return!1;ie(!tr,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return tr=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{tr=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function zC(e,t,s){const o=s.getRegistry(),i=o.addTarget(e,t);return[i,()=>o.removeTarget(i)]}function WC(e,t,s){const o=s.getRegistry(),i=o.addSource(e,t);return[i,()=>o.removeSource(i)]}function $r(e,t,s,o){let i;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let l=0;l<n.length;l++){const c=n[l];if(!a(c))return!1;const d=e[c],u=t[c];if(i=void 0,i===!1||i===void 0&&d!==u)return!1}return!0}function Kr(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _C(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function UC(e){return(t=null,s=null)=>{if(!p.isValidElement(t)){const n=t;return e(n,s),n}const o=t;return _C(o),jC(o,s?n=>e(n,s):e)}}function gu(e){const t={};return Object.keys(e).forEach(s=>{const o=e[s];if(s.endsWith("Ref"))t[s]=e[s];else{const i=UC(o);t[s]=()=>i}}),t}function ec(e,t){typeof e=="function"?e(t):e.current=t}function jC(e,t){const s=e.ref;return ie(typeof s!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),s?p.cloneElement(e,{ref:o=>{ec(s,o),ec(t,o)}}):p.cloneElement(e,{ref:t})}class $C{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,s=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return s&&this.disconnectDragSource(),this.handlerId?t?(s&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),s):(this.lastConnectedDragSource=t,s):s}reconnectDragPreview(t=!1){const s=this.dragPreview,o=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(o&&this.disconnectDragPreview(),!!this.handlerId){if(!s){this.lastConnectedDragPreview=s;return}o&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=s,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,s,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!$r(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!$r(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=gu({dragSource:(s,o)=>{this.clearDragSource(),this.dragSourceOptions=o||null,Kr(s)?this.dragSourceRef=s:this.dragSourceNode=s,this.reconnectDragSource()},dragPreview:(s,o)=>{this.clearDragPreview(),this.dragPreviewOptions=o||null,Kr(s)?this.dragPreviewRef=s:this.dragPreviewNode=s,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class KC{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const s=this.dropTarget;if(this.handlerId){if(!s){this.lastConnectedDropTarget=s;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=s,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,s,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!$r(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=gu({dropTarget:(s,o)=>{this.clearDropTarget(),this.dropTargetOptions=o,Kr(s)?this.dropTargetRef=s:this.dropTargetNode=s,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function xo(){const{dragDropManager:e}=p.useContext(ou);return ie(e!=null,"Expected drag drop context"),e}function qC(e,t){const s=xo(),o=p.useMemo(()=>new $C(s.getBackend()),[s]);return Is(()=>(o.dragSourceOptions=e||null,o.reconnect(),()=>o.disconnectDragSource()),[o,e]),Is(()=>(o.dragPreviewOptions=t||null,o.reconnect(),()=>o.disconnectDragPreview()),[o,t]),o}function YC(){const e=xo();return p.useMemo(()=>new VC(e),[e])}class ZC{beginDrag(){const t=this.spec,s=this.monitor;let o=null;return typeof t.item=="object"?o=t.item:typeof t.item=="function"?o=t.item(s):o={},o??null}canDrag(){const t=this.spec,s=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(s):!0}isDragging(t,s){const o=this.spec,i=this.monitor,{isDragging:n}=o;return n?n(i):s===t.getSourceId()}endDrag(){const t=this.spec,s=this.monitor,o=this.connector,{end:i}=t;i&&i(s.getItem(),s),o.reconnect()}constructor(t,s,o){this.spec=t,this.monitor=s,this.connector=o}}function QC(e,t,s){const o=p.useMemo(()=>new ZC(e,t,s),[t,s]);return p.useEffect(()=>{o.spec=e},[e]),o}function XC(e){return p.useMemo(()=>{const t=e.type;return ie(t!=null,"spec.type must be defined"),t},[e])}function JC(e,t,s){const o=xo(),i=QC(e,t,s),n=XC(e);Is(function(){if(n!=null){const[a,l]=WC(n,i,o);return t.receiveHandlerId(a),s.receiveHandlerId(a),l}},[o,t,s,i,n])}function ev(e,t){const s=hu(e,t);ie(!s.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const o=YC(),i=qC(s.options,s.previewOptions);return JC(s,o,i),[uu(s.collect,o,i),NC(i),GC(i)]}function tv(e){return p.useMemo(()=>e.hooks.dropTarget(),[e])}function sv(e){const t=xo(),s=p.useMemo(()=>new KC(t.getBackend()),[t]);return Is(()=>(s.dropTargetOptions=e||null,s.reconnect(),()=>s.disconnectDropTarget()),[e]),s}function ov(){const e=xo();return p.useMemo(()=>new BC(e),[e])}function iv(e){const{accept:t}=e;return p.useMemo(()=>(ie(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class nv{canDrop(){const t=this.spec,s=this.monitor;return t.canDrop?t.canDrop(s.getItem(),s):!0}hover(){const t=this.spec,s=this.monitor;t.hover&&t.hover(s.getItem(),s)}drop(){const t=this.spec,s=this.monitor;if(t.drop)return t.drop(s.getItem(),s)}constructor(t,s){this.spec=t,this.monitor=s}}function rv(e,t){const s=p.useMemo(()=>new nv(e,t),[t]);return p.useEffect(()=>{s.spec=e},[e]),s}function av(e,t,s){const o=xo(),i=rv(e,t),n=iv(e);Is(function(){const[a,l]=zC(n,i,o);return t.receiveHandlerId(a),s.receiveHandlerId(a),l},[o,t,i,s,n.map(r=>r.toString()).join("|")])}function pu(e,t){const s=hu(e,t),o=ov(),i=sv(s.options);return av(s,o,i),[uu(s.collect,o,i),tv(i)]}const tc="column",lv="flex items-center",cv="mr-3 cursor-move text-secondary",dv=({id:e,children:t,cssClass:s,findItem:o,moveItem:i,handleAriaLabel:n="Drag item"})=>{const r=p.useRef(null),a=p.useRef(null),l=typeof o=="function"?o(e):-1,[{isDragging:c},d,u]=ev(()=>({type:tc,item:{id:e,originalIndex:l},collect:g=>{const f=g.getItem();return{isDragging:g.isDragging()&&f?.id===e}},end:(g,f)=>{if(!g)return;!f.didDrop()&&typeof i=="function"&&g.originalIndex>-1&&i(g.id,g.originalIndex)}}),[e,l,i]),[,h]=pu(()=>({accept:tc,hover:g=>{if(!(!g||g.id===e)&&typeof o=="function"&&typeof i=="function"){const f=o(e);i(g.id,f)}}}),[o,i,e]);return u(h(a)),d(r),C.jsxs("div",{ref:a,className:ue(lv,s),style:{opacity:c?0:1},"aria-roledescription":"Draggable item",children:[C.jsx("div",{ref:r,className:cv,"aria-label":n,children:C.jsx(K.IconGripVertical,{...ke})}),t]})},uv=e=>oe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},oe.createElement("path",{d:"M3.68628 10.3945C3.91003 10.408 4.10927 10.4422 4.2832 10.4978L4.28394 10.4971C4.5167 10.5698 4.71621 10.6662 4.87939 10.7871C4.9994 10.876 5.10332 10.974 5.18994 11.0815L5.27051 11.1929L5.27197 11.1943L5.34009 11.3079C5.38301 11.3838 5.42067 11.4597 5.45288 11.5356L5.49683 11.6492L5.49756 11.6514L5.53198 11.7649C5.56274 11.877 5.5838 11.9867 5.59497 12.0938C5.61194 12.23 5.62059 12.3501 5.62061 12.4534C5.62061 12.6166 5.57231 12.7639 5.47559 12.8906C5.41544 12.9694 5.325 13.0198 5.21997 13.0503C5.11455 13.0809 4.98537 13.0942 4.83691 13.0942C4.73711 13.0942 4.62608 13.0838 4.50439 13.0635C4.37577 13.0415 4.26002 12.9966 4.16089 12.9272L4.15869 12.9258C4.04118 12.8396 3.98657 12.7121 3.98657 12.5625C3.98655 12.2721 3.94576 12.0552 3.87231 11.9033L3.87158 11.9011C3.81572 11.7798 3.69406 11.7026 3.45337 11.7026C3.33114 11.7027 3.25307 11.7292 3.20435 11.7671C3.14221 11.8149 3.10061 11.864 3.07617 11.9128C3.04149 11.985 3.02355 12.0599 3.02124 12.1384V14.7905L3.02637 14.8652C3.03466 14.9384 3.05266 15.0073 3.07983 15.0725L3.10254 15.1201C3.12874 15.1672 3.16488 15.2124 3.21167 15.2556C3.2602 15.2978 3.33572 15.3259 3.45337 15.3259C3.56813 15.3259 3.65533 15.3041 3.71997 15.2673C3.78314 15.2313 3.83208 15.1772 3.86646 15.0996C3.94535 14.9186 3.98655 14.7002 3.98657 14.4412C3.98657 14.3004 4.04381 14.1839 4.1499 14.0991L4.19824 14.0647C4.33673 13.9762 4.55866 13.9431 4.83691 13.9431C5.09384 13.9431 5.30559 13.9858 5.43604 14.1013C5.55182 14.204 5.62061 14.3293 5.62061 14.4749C5.62057 14.7549 5.57953 15.0125 5.49536 15.2461L5.45654 15.3442C5.36294 15.5677 5.23261 15.7627 5.06543 15.928L4.99146 15.9968C4.58057 16.3629 4.03856 16.541 3.37793 16.541L3.12671 16.5278C3.00679 16.5188 2.87303 16.495 2.72607 16.4575C2.61505 16.4287 2.50136 16.3894 2.38696 16.3396L2.27197 16.2861C2.1155 16.2094 1.9705 16.0983 1.83691 15.9558L1.83618 15.9551C1.70598 15.8128 1.59909 15.6391 1.51392 15.4365L1.51318 15.4351C1.42797 15.2251 1.38722 14.9736 1.38721 14.6843V12.345C1.38721 12.1069 1.41644 11.892 1.47656 11.7026C1.52068 11.5616 1.57629 11.4337 1.64355 11.3196L1.7146 11.2097C1.81013 11.07 1.92167 10.9524 2.04932 10.8582C2.17206 10.7676 2.29884 10.6909 2.42871 10.6289L2.54297 10.5798C2.81231 10.4716 3.11394 10.4081 3.44678 10.3879L3.45337 10.3872L3.68628 10.3945Z",fill:"currentColor"}),oe.createElement("path",{d:"M8.10791 11.7371C8.33261 11.7371 8.5218 11.8023 8.61255 11.9758C8.68772 12.1131 8.72383 12.2741 8.72388 12.4534V12.7522H9.03003C9.21461 12.7522 9.37781 12.7845 9.5127 12.8562C9.68704 12.9456 9.7463 13.149 9.74634 13.3843C9.74634 13.612 9.68105 13.8034 9.50537 13.894L9.5061 13.8948C9.36923 13.9665 9.20861 14.0002 9.03003 14.0002H8.72388V14.3064C8.72388 14.4941 8.68994 14.6588 8.61768 14.7942L8.61841 14.7949C8.5293 14.9647 8.334 15.0226 8.10791 15.0227C7.87257 15.0227 7.66761 14.9685 7.5769 14.8L7.57617 14.7993C7.50612 14.6659 7.47583 14.4988 7.47583 14.3064V14.0002H7.18579C6.99507 14.0002 6.82804 13.9669 6.69214 13.894C6.52182 13.8026 6.46069 13.6102 6.46069 13.3843C6.46073 13.1491 6.51509 12.944 6.68335 12.8533L6.68481 12.8525L6.79102 12.8079C6.90305 12.7697 7.03293 12.7522 7.177 12.7522H7.47583V12.4534C7.47587 12.2683 7.50712 12.1056 7.57617 11.9707L7.5769 11.9685L7.61646 11.9092C7.72038 11.7825 7.90134 11.7371 8.10791 11.7371Z",fill:"currentColor"}),oe.createElement("path",{d:"M12.728 11.7371C12.9527 11.7371 13.1419 11.8023 13.2327 11.9758C13.3078 12.1131 13.3439 12.2741 13.344 12.4534V12.7522H13.6501C13.8347 12.7522 13.9979 12.7845 14.1328 12.8562C14.3072 12.9456 14.3664 13.149 14.3665 13.3843C14.3665 13.612 14.3012 13.8034 14.1255 13.894L14.1262 13.8948C13.9894 13.9665 13.8287 14.0002 13.6501 14.0002H13.344V14.3064C13.344 14.4941 13.3101 14.6588 13.2378 14.7942L13.2385 14.7949C13.1494 14.9647 12.9541 15.0226 12.728 15.0227C12.4927 15.0227 12.2877 14.9685 12.197 14.8L12.1963 14.7993C12.1262 14.6659 12.0959 14.4988 12.0959 14.3064V14.0002H11.8059C11.6152 14.0002 11.4482 13.9669 11.3123 13.894C11.1419 13.8026 11.0808 13.6102 11.0808 13.3843C11.0808 13.1491 11.1352 12.944 11.3035 12.8533L11.3049 12.8525L11.4111 12.8079C11.5232 12.7697 11.653 12.7522 11.7971 12.7522H12.0959V12.4534C12.096 12.2683 12.1272 12.1056 12.1963 11.9707L12.197 11.9685L12.2366 11.9092C12.3405 11.7825 12.5215 11.7371 12.728 11.7371Z",fill:"currentColor"}),oe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),hv=e=>oe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},oe.createElement("path",{d:"M4.29639 10.3945C4.50665 10.4083 4.69413 10.4433 4.85815 10.5L4.85889 10.4993C5.07789 10.5733 5.26574 10.6715 5.41919 10.7944C5.53204 10.8849 5.62958 10.9843 5.71069 11.0933L5.78613 11.2053L5.78687 11.2068L5.85059 11.3218C5.89058 11.3983 5.92606 11.4746 5.95605 11.551L5.99707 11.666L5.9978 11.6682L6.05566 11.8945C6.0708 11.9689 6.08168 12.0422 6.08862 12.1143C6.10449 12.252 6.11279 12.3734 6.11279 12.4775C6.11276 12.6403 6.06824 12.7876 5.97803 12.9155C5.92155 12.9956 5.83545 13.0472 5.73486 13.0789C5.63441 13.1104 5.51212 13.1243 5.37231 13.1243C5.32505 13.1243 5.27524 13.1215 5.2229 13.1162L5.05811 13.0928C4.93553 13.0701 4.82533 13.024 4.73145 12.9529L4.72998 12.9514C4.61882 12.8632 4.56958 12.7352 4.56958 12.5874C4.56955 12.2926 4.5312 12.0715 4.46191 11.9165L4.46045 11.9143C4.4319 11.8474 4.38931 11.8003 4.33154 11.7686C4.27185 11.7358 4.18944 11.7158 4.07812 11.7158C3.96626 11.7158 3.89622 11.7421 3.85254 11.7788C3.79519 11.8265 3.75637 11.8759 3.73315 11.926C3.70026 11.9999 3.68262 12.0771 3.68042 12.1582V14.8425L3.68555 14.9187C3.69337 14.9937 3.71038 15.0643 3.73608 15.1311L3.75732 15.1802C3.78176 15.2276 3.81496 15.2727 3.85767 15.3157L3.89575 15.3442C3.93843 15.3699 3.99697 15.386 4.07812 15.386C4.18296 15.386 4.26146 15.3647 4.31982 15.3289C4.37727 15.2935 4.4233 15.2389 4.45605 15.1589C4.53037 14.9746 4.56957 14.7522 4.56958 14.4888C4.56958 14.3307 4.63662 14.2007 4.7666 14.1116L4.82007 14.0801C4.95284 14.0119 5.14337 13.9856 5.37231 13.9856C5.61445 13.9856 5.81633 14.0298 5.94067 14.1489C6.04986 14.2536 6.11274 14.379 6.11279 14.5225C6.11279 14.8453 6.06245 15.1386 5.95972 15.3999C5.85998 15.6574 5.71501 15.8781 5.52466 16.0598L5.52393 16.0591C5.13817 16.4307 4.62871 16.6128 4.00708 16.6128C3.95774 16.6128 3.87811 16.6081 3.77124 16.5996C3.65793 16.5904 3.53127 16.5659 3.39331 16.5278C3.28866 16.4984 3.18149 16.4584 3.07397 16.4077L2.96631 16.3535C2.81858 16.2752 2.68196 16.1624 2.55688 16.0181L2.55615 16.0166C2.43435 15.8725 2.33453 15.6972 2.25513 15.4929L2.25439 15.4915C2.17508 15.28 2.13721 15.0267 2.13721 14.7349V12.3669C2.13721 12.1269 2.16476 11.9109 2.2207 11.7202L2.26538 11.5825C2.3136 11.4491 2.37234 11.3289 2.44263 11.2229C2.53187 11.0816 2.63607 10.9621 2.7561 10.8662C2.87117 10.7743 2.98996 10.6964 3.11206 10.6333L3.11353 10.6326L3.22046 10.5828C3.47384 10.4727 3.75793 10.4085 4.0708 10.3879L4.07812 10.3872L4.29639 10.3945Z",fill:"currentColor"}),oe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H8.625C8.21079 16.5 7.875 16.1642 7.875 15.75C7.875 15.3358 8.21079 15 8.625 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),gv=e=>oe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},oe.createElement("path",{d:"M3.62109 10.571C3.83849 10.5842 4.03206 10.618 4.20117 10.6721L4.2019 10.6714C4.42776 10.742 4.62121 10.8352 4.77979 10.9526C4.89663 11.0392 4.99793 11.135 5.08228 11.2397L5.16064 11.3474L5.16211 11.3489L5.22803 11.4595C5.26973 11.5332 5.30659 11.6069 5.33789 11.6807L5.38037 11.7905L5.3811 11.7935L5.44116 12.0117C5.45675 12.0826 5.46834 12.1524 5.47559 12.2212L5.49463 12.4087C5.49888 12.4674 5.50049 12.5222 5.50049 12.5728C5.50045 12.7317 5.45415 12.8755 5.35986 12.999C5.30088 13.0762 5.2117 13.1246 5.10938 13.1543C5.0067 13.1841 4.88146 13.1975 4.7373 13.1975C4.64029 13.1975 4.53244 13.1872 4.41431 13.1675C4.28898 13.1461 4.17557 13.1026 4.07886 13.0349L4.07739 13.0334C3.96236 12.9491 3.90894 12.8243 3.90894 12.6782C3.90893 12.3968 3.86925 12.187 3.79834 12.0403L3.79761 12.0381C3.74418 11.922 3.62816 11.847 3.39551 11.8469C3.27715 11.8469 3.20179 11.873 3.15527 11.9092C3.09597 11.9548 3.05572 12.0012 3.03223 12.0476L3.03296 12.0483C2.99919 12.1182 2.98102 12.1906 2.97876 12.2666V14.8396L2.98389 14.9114C2.99188 14.9821 3.00888 15.049 3.03516 15.1121L3.05786 15.1582C3.08304 15.2033 3.11768 15.2464 3.1626 15.2878C3.2089 15.3285 3.28115 15.356 3.39551 15.356C3.50633 15.3559 3.58982 15.3349 3.65186 15.2996C3.71249 15.2651 3.75936 15.2131 3.79248 15.1384L3.84302 15.0007C3.88665 14.8554 3.90893 14.6891 3.90894 14.5005C3.90894 14.363 3.96502 14.2494 4.0686 14.1665L4.11621 14.1328C4.25147 14.0465 4.46739 14.0134 4.7373 14.0134C4.98658 14.0134 5.19278 14.0552 5.32031 14.168C5.43323 14.268 5.5004 14.3903 5.50049 14.5327C5.50049 14.8049 5.46077 15.0556 5.37891 15.2827L5.34155 15.3779C5.23762 15.6261 5.08621 15.8373 4.88892 16.0115L4.88965 16.0122C4.49029 16.3681 3.96383 16.541 3.32227 16.541C3.27168 16.541 3.18935 16.5367 3.07837 16.5286C3.02014 16.5242 2.95789 16.5158 2.89307 16.5044L2.68799 16.4597C2.5801 16.4317 2.47025 16.3938 2.35913 16.3455L2.2478 16.2935C2.09553 16.2188 1.95433 16.1112 1.82446 15.9727L1.82373 15.9712C1.69712 15.8328 1.593 15.6642 1.51025 15.4673L1.50952 15.4658C1.42669 15.2616 1.38721 15.0172 1.38721 14.7363V12.4666C1.38723 12.2355 1.41597 12.0273 1.47437 11.8433C1.53119 11.6615 1.60684 11.502 1.70361 11.3665L1.77686 11.2676C1.85263 11.1732 1.9374 11.0913 2.03101 11.0222C2.15024 10.9342 2.27322 10.8598 2.39941 10.7996L2.40015 10.7988L2.51074 10.7512C2.77229 10.6462 3.0652 10.5848 3.38818 10.5652L3.39551 10.5645L3.62109 10.571Z",fill:"currentColor"}),oe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),oe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.36914 11.28C9.50263 11.28 9.62352 11.3063 9.72583 11.3643L9.7251 11.365C9.85906 11.4379 9.90454 11.5838 9.90454 11.7429C9.9045 11.7567 9.90157 11.7778 9.89941 11.7935C9.89658 11.814 9.89242 11.8422 9.88696 11.8777C9.87611 11.9455 9.8639 12.0222 9.85034 12.1062C9.84553 12.136 9.84018 12.1643 9.83569 12.1912H10.0525C10.1919 12.1912 10.3171 12.2148 10.4216 12.2688L10.4209 12.2695C10.5686 12.3412 10.6128 12.5089 10.6128 12.6863C10.6128 12.8587 10.5617 13.0123 10.4194 13.0898L10.4187 13.0906C10.3122 13.1472 10.1885 13.1726 10.0525 13.1726H9.67529L9.55225 13.8589H9.75952C9.89706 13.8589 10.0206 13.8819 10.1243 13.9343C10.2748 14.005 10.3198 14.1752 10.3198 14.354C10.3198 14.5291 10.2702 14.6875 10.1243 14.7627L10.1235 14.7634C10.0176 14.8164 9.89461 14.8403 9.75952 14.8403H9.38452L9.33398 15.1677L9.33325 15.1714C9.30492 15.3271 9.26297 15.4669 9.20728 15.5903L9.20801 15.5911C9.17656 15.6626 9.13001 15.7228 9.06592 15.7646C9.00162 15.8065 8.92683 15.8247 8.84839 15.8247C8.72 15.8247 8.60307 15.8041 8.50122 15.7581L8.49976 15.7573C8.35755 15.6908 8.31299 15.5386 8.31299 15.3787C8.31299 15.3406 8.31787 15.2939 8.32617 15.241L8.35913 15.0242C8.36863 14.9624 8.37948 14.9012 8.38989 14.8403H7.92847L7.87793 15.1677L7.8772 15.1714C7.84887 15.3271 7.80691 15.4669 7.75122 15.5903L7.75195 15.5911C7.72046 15.6627 7.6734 15.7228 7.60913 15.7646C7.54487 15.8064 7.47071 15.8247 7.39233 15.8247C7.26394 15.8247 7.14702 15.8041 7.04517 15.7581L7.0437 15.7573C6.90149 15.6908 6.85693 15.5387 6.85693 15.3787C6.85694 15.3406 6.86181 15.2939 6.87012 15.241L6.90308 15.0242C6.91257 14.9624 6.92342 14.9012 6.93384 14.8403H6.6687C6.52906 14.8403 6.40313 14.8167 6.29663 14.7634L6.29297 14.762C6.15355 14.6853 6.10844 14.5261 6.1084 14.354C6.1084 14.1782 6.1487 14.0079 6.29297 13.9358C6.39784 13.882 6.52535 13.8589 6.6687 13.8589H7.09497L7.21802 13.1726H6.95361C6.81311 13.1726 6.68646 13.1475 6.57935 13.0906L6.57788 13.0898C6.43874 13.0135 6.39332 12.8568 6.39331 12.6863C6.39331 12.5105 6.43361 12.3402 6.57788 12.2681C6.68271 12.2144 6.81036 12.1912 6.95361 12.1912H7.38721L7.46045 11.7561C7.47174 11.6625 7.50842 11.5673 7.56372 11.4712C7.63824 11.3418 7.76255 11.2801 7.91309 11.28C8.04657 11.28 8.16746 11.3063 8.26978 11.3643L8.26904 11.365C8.403 11.4379 8.44849 11.5838 8.44849 11.7429C8.44844 11.7567 8.44552 11.7778 8.44336 11.7935C8.44053 11.814 8.43636 11.8422 8.43091 11.8777C8.42006 11.9455 8.40784 12.0222 8.39429 12.1062C8.38947 12.136 8.38413 12.1643 8.37964 12.1912H8.84326L8.9165 11.7561C8.92779 11.6625 8.96448 11.5673 9.01978 11.4712C9.0943 11.3418 9.21861 11.2801 9.36914 11.28ZM8.09619 13.8589H8.55103L8.67407 13.1726H8.21924L8.09619 13.8589Z",fill:"currentColor"})),pv=e=>oe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},oe.createElement("path",{d:"M4.43188 10.4409C4.65285 10.4409 4.85471 10.4869 4.99951 10.6152L4.99878 10.6159C5.13097 10.7305 5.21409 10.881 5.25146 11.0576C5.28474 11.2148 5.30052 11.3869 5.30054 11.5724V15.4323C5.30054 15.6193 5.28417 15.7927 5.25146 15.9516L5.2522 15.9523C5.21779 16.1313 5.13551 16.2842 4.99951 16.3976L4.99878 16.3969C4.85386 16.52 4.65269 16.5646 4.43188 16.5646C4.21337 16.5646 4.01411 16.5195 3.86792 16.3976L3.86353 16.394C3.73466 16.2798 3.65263 16.1299 3.6123 15.9553L3.61157 15.9516C3.57826 15.7941 3.5625 15.6205 3.5625 15.4323V11.5724C3.56252 11.3869 3.5783 11.2148 3.61157 11.0576C3.64882 10.8815 3.72996 10.7302 3.85986 10.6152L3.86133 10.6137C4.00804 10.4875 4.2103 10.4409 4.43188 10.4409Z",fill:"currentColor"}),oe.createElement("path",{d:"M8.07129 10.4474C8.18434 10.4599 8.28945 10.4924 8.3811 10.55L8.38184 10.5493C8.45754 10.5942 8.52569 10.6451 8.58472 10.7016L8.64111 10.7602L8.64331 10.7631L8.69385 10.8298C8.72596 10.8768 8.75504 10.9284 8.78101 10.9836L8.81763 11.0685L8.81909 11.0729L9.85986 13.8928V11.2692C9.85986 11.0565 9.89522 10.8654 9.98291 10.7119L9.98364 10.7104L10.0349 10.6393C10.1656 10.4886 10.3781 10.4409 10.5974 10.4409C10.8635 10.4409 11.125 10.4947 11.2529 10.6965C11.3535 10.8508 11.3928 11.0487 11.3928 11.2692V15.4323C11.3928 15.6163 11.3809 15.7863 11.3577 15.9413L11.3584 15.9421C11.3349 16.1167 11.2678 16.2708 11.1467 16.3881C11.0102 16.5202 10.8106 16.5646 10.5974 16.5646H10.0554C9.86994 16.5646 9.69972 16.5199 9.56104 16.416C9.44129 16.3261 9.3452 16.215 9.27466 16.0842C9.21353 15.9706 9.16292 15.8593 9.12378 15.7509L8.14893 13.1091V15.7363C8.14893 15.9493 8.11322 16.1406 8.02661 16.2958L8.02588 16.2973C7.90706 16.5052 7.66112 16.5646 7.41138 16.5646C7.14233 16.5646 6.88122 16.5106 6.75 16.312C6.64812 16.1572 6.60791 15.9581 6.60791 15.7363V11.5724C6.60792 11.3882 6.61818 11.2193 6.63867 11.0671V11.0641L6.66724 10.9367C6.7042 10.8142 6.76699 10.706 6.85986 10.6188C6.9982 10.4862 7.19704 10.4409 7.41138 10.4409H7.95337L8.07129 10.4474Z",fill:"currentColor"}),oe.createElement("path",{d:"M13.5688 10.4409C13.7898 10.4409 13.9917 10.4869 14.1365 10.6152L14.1357 10.6159C14.2679 10.7305 14.3511 10.881 14.3884 11.0576C14.4217 11.2148 14.4375 11.3869 14.4375 11.5724V15.4323C14.4375 15.6193 14.4211 15.7927 14.3884 15.9516L14.3892 15.9523C14.3548 16.1313 14.2725 16.2842 14.1365 16.3976L14.1357 16.3969C13.9908 16.52 13.7897 16.5646 13.5688 16.5646C13.3503 16.5646 13.1511 16.5195 13.0049 16.3976L13.0005 16.394C12.8716 16.2798 12.7896 16.1299 12.7493 15.9553L12.7485 15.9516C12.7152 15.7941 12.6995 15.6205 12.6995 15.4323V11.5724C12.6995 11.3869 12.7153 11.2148 12.7485 11.0576C12.7858 10.8815 12.8669 10.7302 12.9968 10.6152L12.9983 10.6137C13.145 10.4875 13.3473 10.4409 13.5688 10.4409Z",fill:"currentColor"}),oe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50385C10.7457 1.52087 10.9072 1.59681 11.0303 1.71991L14.7803 5.46991C14.9208 5.61054 15 5.80136 15 6.00018V9.00018C14.9998 9.41423 14.6641 9.75018 14.25 9.75018C13.8359 9.75018 13.5002 9.41423 13.5 9.00018V6.75018H11.25C10.8523 6.75018 10.4707 6.59192 10.1895 6.31073C9.90824 6.02951 9.7501 5.64788 9.75 5.25018V3.00018H5.25C5.05109 3.00018 4.86038 3.07926 4.71973 3.21991C4.57919 3.36054 4.5 3.55136 4.5 3.75018V9.00018C4.4998 9.41423 4.16409 9.75018 3.75 9.75018C3.33591 9.75018 3.0002 9.41423 3 9.00018V3.75018C3 3.15353 3.23734 2.5813 3.65918 2.15936C4.08114 1.73741 4.65326 1.50018 5.25 1.50018H10.5L10.574 1.50385ZM11.25 5.25018H12.4395L11.25 4.06073V5.25018Z",fill:"currentColor"})),fv=e=>oe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},oe.createElement("path",{d:"M6.76831 10.8267C6.93291 10.8267 7.08404 10.8408 7.22021 10.8691L7.35205 10.9021L7.35278 10.9028L7.46851 10.9431C7.57872 10.986 7.67614 11.038 7.75928 11.0991C7.84245 11.1591 7.91481 11.2265 7.97388 11.3005L8.02881 11.3767L8.02954 11.3774L8.11011 11.5254C8.13317 11.5747 8.15233 11.6249 8.16797 11.6755C8.19815 11.7711 8.21863 11.8631 8.22656 11.9502C8.23376 12.0294 8.23755 12.096 8.23755 12.1479C8.23753 12.318 8.17338 12.4626 8.04639 12.572C7.92503 12.676 7.77653 12.7265 7.60913 12.7266C7.4711 12.7266 7.34146 12.6749 7.22241 12.583C7.1027 12.4905 7.02328 12.3741 7.02319 12.2329C7.02319 12.0468 6.98759 11.9498 6.94775 11.907L6.94629 11.9055C6.90561 11.8606 6.83878 11.8294 6.72583 11.8293C6.58234 11.8293 6.48534 11.856 6.42334 11.896C6.4086 11.9056 6.38747 11.9281 6.37061 11.981C6.35372 12.0341 6.34351 12.1099 6.34351 12.2117C6.34581 12.2878 6.36799 12.3546 6.40869 12.4153C6.45761 12.4821 6.52298 12.549 6.60718 12.6138L6.73608 12.7053C6.78632 12.7386 6.84449 12.7751 6.9104 12.8145C7.04454 12.8945 7.16167 12.9644 7.2605 13.0232L7.44507 13.1426C7.50565 13.1844 7.56597 13.2284 7.62524 13.2744C7.74715 13.3666 7.8562 13.4715 7.95337 13.5886C8.05276 13.7085 8.13297 13.8432 8.1936 13.9922C8.25599 14.1456 8.28891 14.3172 8.29395 14.5049V14.5364C8.29395 14.7339 8.26896 14.9141 8.21777 15.0754V15.0776C8.11696 15.3776 7.94914 15.6082 7.7124 15.761L7.71313 15.7617C7.62701 15.8179 7.53944 15.8644 7.45166 15.9016L7.36304 15.936C7.30225 15.9571 7.24075 15.9753 7.1792 15.9902L6.99243 16.0261C6.87331 16.0431 6.75886 16.0529 6.65039 16.0554H6.61304C6.41017 16.0554 6.22414 16.0345 6.05786 15.9917C5.89914 15.9495 5.75823 15.8922 5.63892 15.8196L5.63745 15.8188C5.52025 15.7449 5.42093 15.6589 5.34155 15.561C5.26338 15.4674 5.20001 15.3681 5.15332 15.2644C5.10802 15.1659 5.07431 15.0659 5.05371 14.9656C5.03361 14.8676 5.02297 14.7738 5.02295 14.6851C5.02295 14.5014 5.0798 14.3447 5.20898 14.2375L5.20972 14.2368L5.30493 14.1731C5.40409 14.1186 5.51594 14.0918 5.63745 14.0918C5.79553 14.0919 5.94175 14.1407 6.07251 14.2354L6.12451 14.2764C6.2216 14.3622 6.27861 14.4745 6.2959 14.6067L6.30103 14.6741L6.31055 14.7847C6.32502 14.8796 6.35383 14.9312 6.38306 14.9568C6.43071 14.9963 6.50789 15.0238 6.63135 15.0242C6.76743 15.0198 6.85874 14.9863 6.91772 14.9355L6.91846 14.9341L6.95361 14.8938C6.98575 14.8434 7.00924 14.7604 7.00928 14.6287C7.00928 14.4903 6.96843 14.3706 6.8877 14.2661L6.88696 14.2646C6.80068 14.1504 6.68858 14.0439 6.55078 13.946L6.55005 13.9453C6.40626 13.841 6.25592 13.7396 6.10034 13.6421C5.93262 13.5343 5.77326 13.4207 5.62427 13.303L5.62354 13.3022C5.46846 13.1772 5.34021 13.0351 5.24121 12.8752C5.13746 12.7076 5.0852 12.514 5.08008 12.2988V12.2388L5.0874 12.0505C5.10126 11.869 5.13388 11.7086 5.18628 11.5708V11.5693L5.2478 11.4382C5.31532 11.3136 5.40255 11.2077 5.51074 11.1233L5.62207 11.0464C5.73813 10.9764 5.87099 10.9263 6.01831 10.894C6.21201 10.8494 6.43196 10.8267 6.67603 10.8267H6.76831Z",fill:"currentColor"}),oe.createElement("path",{d:"M14.2266 10.8062C14.3565 10.8062 14.4736 10.8329 14.5693 10.8933L14.5701 10.8926L14.5715 10.894L14.5737 10.8948L14.573 10.8955C14.6342 10.9321 14.6895 10.9722 14.7363 11.0171L14.781 11.064L14.7825 11.0662L14.8235 11.1204C14.8363 11.1392 14.8492 11.159 14.8608 11.1797L14.9246 11.3159L14.9253 11.3181L15.9163 14.0024V11.4705C15.9163 11.2922 15.9461 11.1369 16.0159 11.0149L16.054 10.9607C16.1527 10.8467 16.3175 10.8062 16.5022 10.8062C16.7284 10.8062 16.9271 10.8532 17.0229 11.0017C17.1032 11.1237 17.1379 11.2847 17.1379 11.4705V15.0535C17.1379 15.21 17.1275 15.3541 17.1079 15.4849L17.1086 15.4856C17.0896 15.6273 17.0355 15.7491 16.9409 15.8408C16.837 15.9414 16.6806 15.9784 16.5022 15.9785H16.0356C15.8837 15.9785 15.7483 15.9422 15.6394 15.8606C15.5419 15.7874 15.4638 15.6974 15.4065 15.5911C15.3549 15.4953 15.3125 15.4018 15.2798 15.3113L14.3459 12.7815V15.3149C14.3459 15.4932 14.316 15.6489 14.2471 15.7727L14.2463 15.7734C14.158 15.9281 13.9711 15.9784 13.76 15.9785C13.53 15.9785 13.3292 15.9315 13.2312 15.783C13.151 15.6609 13.1169 15.5006 13.1169 15.3149V11.7319C13.117 11.575 13.126 11.4319 13.1433 11.3035V11.3013L13.166 11.1987C13.1955 11.1009 13.2454 11.0157 13.3176 10.9475L13.3594 10.9124C13.4627 10.8363 13.6027 10.8062 13.76 10.8062H14.2266Z",fill:"currentColor"}),oe.createElement("path",{d:"M3.62183 10.73C3.8058 10.73 3.96571 10.7696 4.07959 10.8677C4.185 10.9586 4.25306 11.0796 4.28613 11.2229C4.31675 11.3557 4.33154 11.5018 4.33154 11.6602V14.3606C4.33154 14.617 4.29481 14.8413 4.21655 15.0293C4.15993 15.1652 4.09098 15.286 4.00928 15.3896L3.92285 15.4878C3.80762 15.6056 3.67869 15.6971 3.5376 15.7625L3.53833 15.7632C3.40115 15.8269 3.27011 15.872 3.14722 15.8979L3.14795 15.8987C3.09669 15.9112 3.04501 15.9213 2.99414 15.9294L2.8418 15.9478C2.74998 15.9548 2.68156 15.9587 2.64111 15.9587C2.3706 15.9587 2.13396 15.928 1.93506 15.8643C1.73937 15.8022 1.56914 15.7204 1.42749 15.6174C1.28776 15.5158 1.17335 15.3984 1.08691 15.2651L1.02686 15.1685C0.970789 15.0715 0.926873 14.9732 0.895752 14.874L0.896484 14.8733C0.852315 14.745 0.821564 14.6203 0.806396 14.499L0.805664 14.4968C0.793555 14.3806 0.786621 14.2779 0.786621 14.1899C0.786659 14.0481 0.829716 13.9196 0.914062 13.8091C0.968035 13.7386 1.04873 13.6949 1.13965 13.6685C1.231 13.642 1.34202 13.6297 1.46851 13.6296C1.55651 13.6297 1.65224 13.6393 1.75415 13.6567C1.8653 13.6758 1.96539 13.7157 2.05151 13.7783C2.15785 13.853 2.20677 13.9666 2.20679 14.0977C2.20679 14.3421 2.24112 14.5246 2.302 14.6528L2.32178 14.6865C2.37332 14.7613 2.46833 14.8095 2.64111 14.8096C2.74386 14.8095 2.80532 14.7883 2.8396 14.762L2.84106 14.7605L2.90552 14.7019C2.92253 14.6822 2.9356 14.6623 2.94507 14.6426L2.97803 14.5518C2.98565 14.5209 2.98953 14.4889 2.99048 14.4565V11.9641H2.17236C2.0293 11.9641 1.8922 11.9536 1.76221 11.9312L1.76001 11.9304C1.62252 11.9035 1.50268 11.8482 1.40698 11.7612L1.40625 11.7598C1.30008 11.6602 1.25688 11.5177 1.25684 11.3547C1.25684 11.1882 1.29936 11.0419 1.40625 10.9417C1.49986 10.8517 1.6187 10.7951 1.75635 10.7681L1.9585 10.7395C2.02775 10.7333 2.09935 10.73 2.17236 10.73H3.62183Z",fill:"currentColor"}),oe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0061 10.8398C11.1058 10.8474 11.2146 10.8676 11.3313 10.8984L11.332 10.8977C11.4562 10.9275 11.5817 10.9747 11.7078 11.0376L11.803 11.0896C11.8653 11.1277 11.926 11.1727 11.9839 11.2244L12.0688 11.3071L12.0696 11.3079L12.1472 11.4001C12.2197 11.4965 12.2807 11.608 12.3303 11.7327L12.3772 11.8674C12.417 12.0081 12.4358 12.1667 12.4358 12.3406V14.4111C12.4358 14.649 12.4035 14.8579 12.3347 15.0337L12.334 15.0352C12.2654 15.204 12.1782 15.349 12.071 15.4666C11.9653 15.5823 11.8439 15.6747 11.7085 15.7412L11.7078 15.7405C11.5864 15.8034 11.4622 15.8534 11.335 15.8877C11.2172 15.9189 11.1066 15.9387 11.0061 15.9463C10.9136 15.9532 10.8413 15.9573 10.793 15.9573H10.675L10.4626 15.9463C10.362 15.9387 10.2518 15.919 10.1338 15.8877C10.0122 15.8554 9.8873 15.8055 9.75952 15.7405C9.62706 15.6742 9.50578 15.5832 9.39624 15.4688L9.39551 15.468C9.28579 15.3506 9.19561 15.2056 9.12451 15.0366L9.12378 15.0352C9.05226 14.8589 9.01835 14.6495 9.01831 14.4111V12.3406C9.01831 12.105 9.05259 11.8998 9.12451 11.7297C9.19368 11.5618 9.28389 11.4184 9.39697 11.3027C9.50677 11.1905 9.62826 11.1014 9.76099 11.0376C9.82393 11.0062 9.88688 10.9792 9.94849 10.957L9.94922 10.9563L10.1323 10.8992L10.1345 10.8984L10.3066 10.8604C10.3612 10.8506 10.4136 10.8436 10.4626 10.8398L10.675 10.8289H10.793C10.8413 10.8289 10.9136 10.8329 11.0061 10.8398ZM10.738 11.9473C10.6399 11.9473 10.5796 11.9688 10.5439 11.9963L10.5432 11.9971C10.4934 12.0354 10.4596 12.0746 10.4385 12.1135L10.4377 12.1143C10.4103 12.1641 10.3949 12.222 10.3931 12.2886V14.5393L10.4062 14.6309L10.4385 14.7151L10.4392 14.7158L10.481 14.7766C10.4976 14.7958 10.5181 14.8147 10.5417 14.833L10.5732 14.8521C10.6101 14.8689 10.6637 14.8806 10.738 14.8806C10.8345 14.8805 10.8925 14.8598 10.9255 14.8345C10.9743 14.7969 11.0075 14.7565 11.0288 14.7158C11.054 14.6605 11.0699 14.5993 11.0757 14.5327V12.2944L11.0588 12.197C11.051 12.167 11.0406 12.138 11.0281 12.1106C11.0069 12.0728 10.9738 12.0343 10.9255 11.9971L10.9233 11.9949C10.8905 11.9684 10.8335 11.9474 10.738 11.9473Z",fill:"currentColor"}),oe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),mv=e=>oe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},oe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),oe.createElement("path",{d:"M2.39355 10.5C2.53545 10.5 2.6592 10.5122 2.75757 10.5417C2.88987 10.5815 2.99161 10.6954 3.07251 10.8289L3.15747 10.9885L3.25195 11.2031L3.25269 11.2046L3.35229 11.4683C3.38786 11.5664 3.42601 11.6752 3.46655 11.7942L3.76318 12.6665L3.76392 12.6687L3.76904 12.6848L3.79907 12.5911L3.94849 12.1348C3.99515 11.9948 4.03674 11.8689 4.073 11.7576L4.07373 11.7561L4.1814 11.4434C4.21489 11.3495 4.24596 11.265 4.27515 11.1907L4.36084 10.9849C4.38855 10.9239 4.41584 10.8705 4.44214 10.8252C4.51581 10.6953 4.61188 10.5823 4.74243 10.5417H4.7439L4.82153 10.5227C4.90321 10.5069 4.99686 10.5 5.09985 10.5H5.67041C5.87137 10.5 6.05265 10.5425 6.17505 10.6619L6.17944 10.6655C6.29073 10.7714 6.35329 10.9108 6.375 11.072C6.39695 11.2133 6.40721 11.3701 6.40723 11.5415V15.5149C6.4072 15.7232 6.3696 15.9065 6.27686 16.0474C6.16065 16.2235 5.92578 16.2751 5.67041 16.2751C5.43573 16.2751 5.21924 16.2184 5.11157 16.0378L5.10938 16.0342C5.03005 15.8921 4.9966 15.7149 4.99658 15.5149V12.8335L4.4436 14.4456L4.44141 14.4521C4.39239 14.576 4.32667 14.6919 4.24658 14.8008L4.24731 14.8015C4.14341 14.9438 3.9882 15.008 3.80933 15.0081H3.73096C3.55351 15.008 3.40015 14.9437 3.29004 14.8081L3.28857 14.8066C3.20076 14.6954 3.13356 14.575 3.08862 14.4463L2.53564 12.8496V15.5149C2.53562 15.7149 2.50218 15.8921 2.42285 16.0342L2.42212 16.0356C2.31692 16.2193 2.09741 16.2751 1.86182 16.2751C1.60639 16.2751 1.37154 16.2236 1.25537 16.0474C1.16263 15.9065 1.12502 15.7232 1.125 15.5149V11.5415C1.12501 11.3697 1.13426 11.2129 1.15356 11.072L1.1543 11.0691L1.17993 10.9526C1.21308 10.8409 1.26884 10.7425 1.35059 10.6633L1.39966 10.6223C1.52082 10.5332 1.68333 10.5 1.86182 10.5H2.39355Z",fill:"currentColor"}),oe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.1106 10.5C9.62746 10.5 10.0624 10.6251 10.4026 10.8875L10.5256 10.9944C10.6405 11.1071 10.7342 11.238 10.8062 11.3862C10.9039 11.5876 10.9497 11.8187 10.9497 12.074V14.4983C10.9497 14.7119 10.927 14.9051 10.8779 15.0754C10.8306 15.2398 10.7676 15.3875 10.689 15.5156L10.6875 15.5186C10.6079 15.6408 10.5165 15.7481 10.4143 15.8386C10.3155 15.9261 10.2132 15.9989 10.1074 16.0547L10.1067 16.054C9.86566 16.1854 9.58987 16.2585 9.28271 16.2751H7.97681C7.77408 16.2751 7.59145 16.2335 7.46704 16.1169C7.35471 16.0115 7.2898 15.8714 7.26489 15.7097C7.24266 15.5651 7.23194 15.4033 7.23193 15.2256V11.5415C7.23195 11.3663 7.2426 11.2069 7.26489 11.0647C7.28985 10.9032 7.35482 10.7635 7.46704 10.6582C7.59145 10.5416 7.77403 10.5 7.97681 10.5H9.1106ZM8.72095 15.0447H9.07544C9.15931 15.0426 9.23737 15.0225 9.31055 14.9839L9.31348 14.9817L9.35815 14.9553C9.40066 14.926 9.43743 14.8876 9.46802 14.8381L9.46875 14.8367L9.49438 14.7861C9.51748 14.7305 9.53172 14.6593 9.53174 14.5686V12.2615C9.53174 12.1256 9.50631 12.0248 9.46509 11.9517L9.46362 11.9495C9.42061 11.8696 9.36785 11.8162 9.30762 11.7825C9.25706 11.7542 9.19978 11.7342 9.1355 11.7231L9.06885 11.7151H8.72095V15.0447Z",fill:"currentColor"})),Cv=e=>oe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},oe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.6416 10.3784C3.95675 10.4068 4.24355 10.4808 4.49927 10.6033L4.68896 10.7058C4.75102 10.7437 4.81209 10.7853 4.87207 10.8303C4.99897 10.9227 5.10899 11.0375 5.20459 11.1724C5.30765 11.311 5.38613 11.4733 5.44116 11.6558L5.47998 11.8008C5.51306 11.9504 5.52903 12.1125 5.52905 12.2856C5.52905 12.6011 5.47828 12.8867 5.37305 13.1382L5.37378 13.1389C5.28434 13.3557 5.15787 13.5441 4.99512 13.7014L4.92334 13.7666C4.52343 14.1103 3.97203 14.269 3.2959 14.269H2.95166V15.4292C2.95165 15.614 2.93964 15.7845 2.91577 15.9397C2.8883 16.1182 2.81511 16.2739 2.68652 16.3909L2.68579 16.3901C2.54556 16.5202 2.34254 16.5645 2.12329 16.5645C1.90696 16.5644 1.70685 16.5194 1.56738 16.3887L1.56519 16.3865C1.44288 16.2679 1.37145 16.1152 1.34399 15.9404L1.34326 15.936C1.32257 15.7822 1.31251 15.613 1.3125 15.4292V11.5042C1.31251 11.3204 1.3225 11.1524 1.34326 11.001L1.34399 10.9973L1.37256 10.8691C1.40991 10.7455 1.47366 10.6362 1.56738 10.5483C1.70673 10.4148 1.90677 10.3689 2.12329 10.3689H3.50464L3.6416 10.3784ZM2.95166 12.9053H3.31787C3.43267 12.8984 3.53116 12.8714 3.61597 12.8269C3.69435 12.7857 3.75967 12.7244 3.81226 12.6387L3.84448 12.5728C3.8728 12.5 3.88989 12.4058 3.88989 12.2856C3.88984 12.1374 3.85971 12.0411 3.81812 11.9795L3.81519 11.9744C3.76419 11.8937 3.70357 11.8366 3.63428 11.7979C3.56584 11.7635 3.47692 11.7377 3.36328 11.7253H2.95166V12.9053Z",fill:"currentColor"}),oe.createElement("path",{d:"M9.85181 10.3689C9.96017 10.369 10.0701 10.3945 10.1792 10.4392L10.2876 10.4897L10.2935 10.4927L10.2993 10.4963C10.4209 10.5712 10.5226 10.6619 10.5879 10.7725C10.6503 10.8716 10.6882 10.9809 10.6882 11.0969C10.6882 11.1892 10.6526 11.2993 10.6077 11.4089L10.6069 11.4082C10.5828 11.4685 10.5524 11.5379 10.5154 11.6147C10.4774 11.6937 10.4326 11.7792 10.3813 11.8704L9.1582 14.0391V15.4373C9.1582 15.6164 9.14303 15.7853 9.11279 15.9426C9.07918 16.1138 9.00547 16.2635 8.88647 16.3799L8.88721 16.3806C8.75142 16.5164 8.5562 16.5644 8.34668 16.5645C8.13595 16.5644 7.94219 16.5154 7.80249 16.3843L7.80103 16.3828C7.68055 16.2661 7.60635 16.1157 7.57251 15.9434C7.54226 15.786 7.52783 15.6164 7.52783 15.4373V14.0398L6.12085 11.5283L6.11938 11.5261C6.0459 11.3891 6.00587 11.2453 6.00586 11.0969C6.00589 10.986 6.03681 10.8798 6.09155 10.7812L6.09302 10.7791L6.15015 10.6963C6.21492 10.6176 6.30071 10.5509 6.39771 10.4941L6.4043 10.4905L6.5127 10.4392C6.6213 10.3943 6.73162 10.369 6.84155 10.3689C7.06446 10.369 7.25232 10.4649 7.39307 10.6399L7.48096 10.752C7.5635 10.8656 7.6337 10.9873 7.69263 11.116L8.34668 12.4878L9.00073 11.116C9.07902 10.945 9.177 10.7867 9.29443 10.6421L9.29517 10.6414L9.35083 10.5791C9.48615 10.443 9.65571 10.3689 9.85181 10.3689Z",fill:"currentColor"}),oe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),Ce=(e,t)=>C.jsx(e,{size:t.size??ke.size,stroke:t.stroke??ke.stroke,className:t.className}),vs=(e,t)=>C.jsx(e,{width:Number(t.size??ke.size),height:Number(t.size??ke.size),className:t.className}),sc={".bmp":e=>Ce(K.IconFileTypeBmp,e),".cpp":e=>vs(uv,e),".c":e=>vs(hv,e),".cs":e=>vs(gv,e),".css":e=>Ce(K.IconFileTypeCss,e),".csv":e=>Ce(K.IconFileTypeCsv,e),".doc":e=>Ce(K.IconFileTypeDoc,e),".docx":e=>Ce(K.IconFileTypeDocx,e),".html":e=>Ce(K.IconFileTypeHtml,e),".ini":e=>vs(pv,e),".jpg":e=>Ce(K.IconFileTypeJpg,e),".js":e=>Ce(K.IconFileTypeJs,e),".json":e=>vs(fv,e),".jsx":e=>Ce(K.IconFileTypeJsx,e),".md":e=>vs(mv,e),".pdf":e=>Ce(K.IconFileTypePdf,e),".php":e=>Ce(K.IconFileTypePhp,e),".png":e=>Ce(K.IconFileTypePng,e),".ppt":e=>Ce(K.IconFileTypePpt,e),".py":e=>vs(Cv,e),".rs":e=>Ce(K.IconFileTypeRs,e),".sql":e=>Ce(K.IconFileTypeSql,e),".svg":e=>Ce(K.IconFileTypeSvg,e),".ts":e=>Ce(K.IconFileTypeTs,e),".tsx":e=>Ce(K.IconFileTypeTsx,e),".txt":e=>Ce(K.IconFileTypeTxt,e),".vue":e=>Ce(K.IconFileTypeVue,e),".xls":e=>Ce(K.IconFileTypeXls,e),".xml":e=>Ce(K.IconFileTypeXml,e),".zip":e=>Ce(K.IconFileTypeZip,e),default:e=>Ce(K.IconFile,e)},fu=({extension:e,size:t=ke.size,stroke:s=ke.stroke,cssClass:o,decorative:i=!1,label:n,indicator:r})=>{const a=(()=>{const u=e.trim().toLowerCase();return u.startsWith(".")?u:`.${u}`})(),c=(sc[a]??sc.default)({size:t,stroke:s}),d=n??`${a.slice(1).toUpperCase()} file icon`;return C.jsxs("span",{className:W("inline-flex relative",o),...i?{"aria-hidden":!0}:{role:"img","aria-label":d},children:[C.jsx(we,{icon:c,className:"inline-block align-middle"}),r&&C.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:r})]})},Va=({label:e="Shared entity",size:t=10,cssClass:s,stroke:o=2})=>C.jsx(we,{className:ue("text-accent-primary",s),label:"Shared entity indicator",icon:C.jsx(K.IconArrowUpRight,{size:t,stroke:o,"aria-label":e,className:"bg-layer-3",role:"img"})}),Ba=({name:e,cssClass:t,shared:s=!1})=>{const o=e.includes(".")?e.split(".").pop():null;return C.jsxs("div",{className:ue("flex items-center gap-2 w-full",t),children:[o&&C.jsx(fu,{extension:o,cssClass:"text-secondary",indicator:s?C.jsx(Va,{}):null,label:"File type icon"}),C.jsx(Tt,{cssClass:"text-primary dial-small flex-1 min-w-0",text:e})]})},za=({name:e,cssClass:t,shared:s=!1,loading:o=!1})=>{const i=()=>o?C.jsx(Pn,{}):C.jsx(we,{icon:C.jsx(K.IconFolder,{...ke}),className:"inline-block align-middle"});return C.jsxs("div",{className:ue("flex items-center gap-2 w-full",t),children:[C.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[i(),s&&C.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:C.jsx(Va,{})})]}),C.jsx(Tt,{cssClass:"text-primary dial-small flex-1 min-w-0",text:e})]})};var en=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(en||{});const oc=()=>typeof window<"u"&&window.innerWidth<1024,vv=()=>{const[e,t]=p.useState(oc());return p.useEffect(()=>{const s=()=>t(oc());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e};var mu=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(mu||{}),Ft=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(Ft||{}),Cu=(e=>(e.Item="item",e.Divider="divider",e))(Cu||{});const wv=W("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),bv=W("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none","w-max"),Sv=W("flex w-full cursor-pointer items-center gap-3","focus-visible:border-none focus-visible:outline-none","hover:bg-accent-primary-alpha px-3","dial-small h-[34px] rounded text-primary"),yv="opacity-75 !cursor-not-allowed",Rv="text-error",xv="my-1 border-t border-hover border-secondary",Mo=8,Wa=({ariaLabel:e,cssClass:t,size:s=24,onClose:o})=>C.jsx(Ie,{ariaLabel:e,cssClass:ue("text-secondary hover:text-accent-primary",t),onClick:o,iconBefore:C.jsx(K.IconX,{size:s})}),Ut=({children:e,menu:t,renderOverlay:s,trigger:o=[Ft.Click],placement:i,disabled:n=!1,open:r,defaultOpen:a=!1,onOpenChange:l,closable:c=!1,onClose:d,cssClass:u,listClassName:h,outsidePressIgnoreRef:g,outsideClosable:f=!0,allowedPlacements:m,anchorToMouse:v=!1,matchReferenceWidth:w=!0})=>{const[b,S]=p.useState(a),R=r!==void 0,y=R?!!r:b,x=p.useCallback(O=>{R||S(O),l?.(O)},[R,l]),D=p.useId(),M=i===void 0,L=O=>"clientWidth"in O?O.clientWidth:O.getBoundingClientRect?.()?.width??0,{refs:I,floatingStyles:F,context:P}=le.useFloating({placement:i,open:y,onOpenChange:x,whileElementsMounted:le.autoUpdate,middleware:[le.offset({mainAxis:Mo,crossAxis:0}),M?le.autoPlacement({alignment:"start",crossAxis:!0,padding:Mo,allowedPlacements:m}):le.flip({padding:Mo}),le.shift({padding:Mo}),le.size({padding:Mo,apply({availableWidth:O,availableHeight:ee,elements:ce}){const Oe=ce.floating,Ze=L(ce.reference);Oe.style.setProperty("--fui-available-height",`${Math.floor(ee)}px`),Oe.style.setProperty("--reference-width",w?`${Math.round(Ze)}px`:"0px"),w?Oe.style.minWidth=`${Math.round(Ze)}px`:Oe.style.removeProperty("min-width"),Oe.style.maxWidth=`${Math.floor(O)}px`,Oe.style.maxHeight=`${Math.floor(ee)}px`}})]}),B=le.useClick(P,{enabled:o.includes(Ft.Click)&&!n}),Q=le.useHover(P,{enabled:o.includes(Ft.Hover)&&!n,move:!1,restMs:40,delay:{open:80,close:80}}),A=le.useDismiss(P,{bubbles:!0,referencePress:!1,outsidePress:O=>{if(!f)return!1;const ee=O.target;return!(g?.current&&ee instanceof Node&&g.current.contains(ee))}}),te=le.useRole(P,{role:"menu"}),{getReferenceProps:z,getFloatingProps:k}=le.useInteractions([B,Q,A,te]),Z=p.useCallback((O,ee)=>{I.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:O,y:ee,top:ee,left:O,right:O,bottom:ee})})},[I]),N=p.useCallback(O=>{!o.includes(Ft.ContextMenu)||n||(O.preventDefault(),v&&Z(O.clientX,O.clientY),x(!0))},[v,n,x,Z,o]),X=p.useCallback(O=>{!v||n||Z(O.clientX,O.clientY)},[v,n,Z]);p.useEffect(()=>{n&&y&&x(!1)},[n,y,x]);const $=p.useCallback(O=>ee=>{O.disabled||(O.onClick?.({key:O.key,domEvent:ee}),t?.onClick?.({key:O.key,domEvent:ee}),x(!1))},[t,x]),_=p.useMemo(()=>s?s():t?C.jsxs(C.Fragment,{children:[t.header&&C.jsx(C.Fragment,{children:typeof t.header=="function"?t.header():t.header}),C.jsx("div",{role:"none",className:"py-1",children:t.items.map(O=>O.type===Cu.Divider?C.jsx("div",{role:"separator",className:xv},O.key):C.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!O.disabled,className:W(Sv,O.disabled&&yv,O.danger&&Rv),disabled:O.disabled,onClick:$(O),children:[O.icon&&C.jsx("span",{className:W(O.danger&&"text-error",O.disabled&&"text-secondary"),children:C.jsx(we,{icon:O.icon})}),C.jsx("span",{className:W("flex-1 truncate text-left",O.danger&&"text-error",O.disabled&&"text-secondary"),children:O.label})]},O.key))}),t.footer&&C.jsx(C.Fragment,{children:typeof t.footer=="function"?t.footer():t.footer})]}):null,[$,t,s]),se=z({onContextMenu:N,onMouseDown:X});return C.jsxs(C.Fragment,{children:[C.jsx("span",{ref:I.setReference,className:W(wv,n&&"!cursor-not-allowed opacity-75",u),"aria-haspopup":"menu","aria-expanded":y,"aria-controls":D,...se,children:e}),y&&C.jsx(le.FloatingPortal,{children:C.jsx(le.FloatingFocusManager,{context:P,modal:!1,initialFocus:-1,returnFocus:!0,children:C.jsxs("div",{id:D,ref:I.setFloating,style:F,className:W(bv,!w&&"w-max",h),...k(),children:[c&&C.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:C.jsx(Wa,{ariaLabel:"Close dropdown",onClose:O=>{d?.(O),x(!1)}})}),_]})})})]})},No=({tab:e,active:t,disabled:s,invalid:o,cssClass:i,horizontal:n,onClick:r})=>{const l=ue("rounded px-3 pt-2 pb-[6px] items-center flex flex-row gap-2 h-[32px] cursor-pointer dial-small leading-4 hover:text-accent-primary",{"bg-layer-4":n,"bg-layer-1 text-secondary pointer-events-none":s,"bg-accent-primary-alpha text-primary":t&&!s,"text-primary":!t&&!s,"pb-1 border-b-2 border-b-accent-primary":t&&n&&!s,"border-l-2 border-l-accent-primary":t&&!n&&!s},i);return C.jsxs("button",{role:"tab",className:l,onClick:()=>r(e.id),disabled:s,children:[C.jsx(Tt,{text:e.name,contentClassName:"max-w-[200px]",cssClass:"max-w-[200px]"}),(o||e.invalid)&&C.jsx("div",{className:"text-error",children:C.jsx(K.IconExclamationCircle,{...ke})})]})},ic=12,vu=({tabs:e,activeTab:t,onClick:s,orientation:o=en.Horizontal})=>{const[i,n]=p.useState(!1),[r,a]=p.useState(!1),[l,c]=p.useState(!1),d=vv(),u=o===en.Horizontal,h=p.useRef(null),g=p.useRef(null),f=p.useRef(null),m=e.find(b=>b.id===t),v=p.useMemo(()=>W("flex gap-3",u?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[u]),w=p.useCallback(()=>{const b=g.current;b&&c(b.scrollWidth>b.clientWidth)},[]);return p.useEffect(()=>{w();const b=new ResizeObserver(()=>w()),S=g.current;return S&&b.observe(S),()=>b.disconnect()},[e,w]),p.useEffect(()=>{const b=f.current,S=g.current;if(!b||!S)return;const R=b.offsetLeft,y=R+b.offsetWidth,x=S.scrollLeft,D=x+S.clientWidth;R<x?S.scrollTo({left:R-ic,behavior:"smooth"}):y>D&&S.scrollTo({left:y-S.clientWidth+ic,behavior:"smooth"})},[t]),d?C.jsx("div",{className:"h-11 flex items-center bg-layer-3 px-4",children:C.jsx(Ut,{trigger:[Ft.Click],open:i,onOpenChange:n,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(b=>C.jsx(No,{tab:b,active:b.id===t,onClick:S=>{s(S),n(!1)},cssClass:"w-full rounded-none h-11 items-center px-6"},b.id)),children:C.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[C.jsx(No,{tab:m,active:!0,onClick:s,cssClass:"rounded-none bg-transparent border-l-0 border-b-[2px] border-accent-primary h-full items-center px-0"},t),C.jsx(we,{icon:C.jsx(K.IconChevronDown,{size:16}),className:W("text-primary transition-transform",i&&"rotate-180")})]})})}):C.jsxs("div",{ref:h,className:"flex w-full items-start",children:[C.jsx("div",{ref:g,className:v,children:e.map(b=>C.jsx("div",{ref:t===b.id?f:void 0,className:"w-full",children:C.jsx(No,{tab:b,active:t===b.id,onClick:s,horizontal:u,cssClass:"w-full"})},b.id))}),l&&C.jsx("div",{className:"flex items-center ml-2",children:C.jsx(Ut,{trigger:[Ft.Click],open:r,onOpenChange:a,placement:"bottom-end",renderOverlay:()=>e.map(b=>C.jsx(No,{tab:b,active:b.id===t,onClick:S=>{s(S),a(!1)},cssClass:"w-full rounded-none h-[32px] items-center px-3 py-2"},b.id)),children:C.jsx(Ie,{iconBefore:C.jsx(K.IconDotsVertical,{size:18}),cssClass:W("w-8 h-8 flex items-center justify-center rounded border",r?"bg-layer-4 border-transparent":"border-primary")})})})]})},Fv="w-full overflow-x-auto",Ev="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",Dv="flex items-center gap-2 min-w-0 shrink-0 dial-small",nc="inline-flex items-center gap-1 min-w-0 transition-colors",Pv="text-secondary hover:text-accent-primary",Tv="text-primary cursor-default",Mv="flex-none inline-flex items-center leading-none text-icon-secondary",wu=C.jsx(K.IconChevronRight,{size:16,"aria-hidden":"true"}),bu=({title:e,href:t,onClick:s,disabled:o,isLast:i,separator:n=wu,cssClass:r,iconBefore:a,titleCssClass:l})=>{const c=ue(Dv,r),d=(!!t||!!s)&&!i&&!o,u=d?ue(nc,Pv,l):ue(nc,Tv,o?"pointer-events-none opacity-75":"",l),h=typeof e=="string"?C.jsx(Tt,{cssClass:u,text:e}):e;return C.jsxs("li",{className:c,children:[d?C.jsxs("a",{href:t,onClick:s,className:u,children:[a,h]}):C.jsxs("span",{className:u,"aria-current":i?"page":void 0,"aria-disabled":o?"true":void 0,children:[a,h]}),!i&&C.jsx("span",{className:Mv,children:n})]})},Su=({pathItems:e,separator:t=wu,ariaLabel:s="Breadcrumb",cssClass:o,children:i,titleCssClass:n})=>{const r=e?.length?e.map((a,l)=>p.createElement(bu,{...a,key:`item-${l}`,isLast:l===e.length-1,separator:t,titleCssClass:n})):p.Children.toArray(i).map((a,l,c)=>{if(!p.isValidElement(a))return a;const d=l===c.length-1;return p.cloneElement(a,{isLast:d,separator:t})});return C.jsx("nav",{"aria-label":s,className:ue(Fv,o),children:C.jsx("ol",{className:Ev,children:r})})},yu=({iconClass:e,...t})=>C.jsx(Ie,{iconBefore:C.jsx(K.IconTrashX,{...ke,className:e||""}),...t}),Ru=({value:e,textareaId:t,placeholder:s,cssClass:o="",containerCssClass:i="",disabled:n,invalid:r,readonly:a,disableTooltip:l,onChange:c})=>C.jsx(hs,{tooltip:l?null:e,triggerClassName:ue("flex",i),children:C.jsx("textarea",{id:t,placeholder:s,value:e||"",disabled:n,className:W("dial-textarea dial-input px-3 py-2",r?"dial-input-error":"",n&&"dial-input-disable",a&&"dial-input-readonly",o),onChange:d=>!a&&c?.(d.currentTarget.value)})}),Iv=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],kv=(e,t,s,o)=>{if((t==="number"||s!==void 0||o!==void 0)&&!Iv.includes(e.key)&&!(e.ctrlKey||e.metaKey)&&!(e.key==="-"&&(e.currentTarget.selectionStart??0)===0&&!e.currentTarget.value.includes("-"))&&!(e.key==="."&&t==="number"&&!e.currentTarget.value.includes("."))){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(s!==void 0||o!==void 0){const n=e.currentTarget.value,r=e.currentTarget.selectionStart||0,a=n.slice(0,r)+e.key+n.slice(r),l=parseFloat(a);if(!isNaN(l)){if(s!==void 0&&l<s){e.preventDefault();return}if(o!==void 0&&l>o){e.preventDefault();return}}}}},fo=({iconBefore:e,iconAfter:t,hideBorder:s,value:o,elementId:i,placeholder:n="",cssClass:r="",containerCssClass:a,tooltipTriggerClassName:l,type:c="text",disabled:d,readonly:u,invalid:h,onChange:g,min:f,max:m,prefix:v,suffix:w,textBeforeInput:b,textAfterInput:S,onBlur:R,defaultValue:y,tooltipText:x})=>{const D=F=>F.target.blur(),M=c==="number"||f!==void 0||m!==void 0,L=F=>{kv(F,c,f,m)},I=F=>{const P=F.currentTarget.value;if(M&&P!==""){const B=parseFloat(P);if(isNaN(B)&&P!=="-"&&P!=="."||!isNaN(B)&&(f!==void 0&&B<f||m!==void 0&&B>m))return}g?.(P||void 0)};return C.jsxs("div",{className:W("dial-input-field flex flex-row items-center justify-between py-2",s?"dial-input-no-border":"dial-input",h&&"dial-input-error",d&&"dial-input-disable",u&&"dial-input-readonly",!b&&"pl-3",!S&&"pr-3",a),children:[b&&C.jsx("div",{className:"mr-2",children:C.jsx(fo,{hideBorder:!0,containerCssClass:"rounded-r-none border-r-0",cssClass:"overflow-hidden overflow-ellipsis dial-small",value:b,disabled:!0,elementId:b+"textBefore"})}),v&&C.jsxs("p",{className:"text-secondary dial-small mr-2",children:[" ",v]}),C.jsx(we,{icon:e,className:W(!!e&&"mr-2")}),C.jsx(hs,{tooltip:x||o,triggerClassName:W(l,"flex-1"),children:C.jsx("input",{type:c,autoComplete:"off",id:i,placeholder:n,value:y?void 0:o??"",disabled:d,className:W("border-0 bg-transparent w-full truncate",r),onChange:F=>!u&&I?.(F),onKeyDown:L,onWheel:D,onBlur:R,min:f,max:m,defaultValue:y})}),C.jsx(we,{icon:t,className:W(!!t&&"ml-2")}),w&&C.jsxs("p",{className:"text-secondary dial-small ml-2",children:[" ",w]}),S&&C.jsx("div",{className:"ml-2",children:C.jsx(fo,{hideBorder:!0,containerCssClass:"rounded-l-none border-l-0",value:S,disabled:!0,elementId:S+"textAfter"})})]})},Av=/^0+\.(\d+)?$/,Lv=/^0+/,xu=({label:e,optional:t,optionalText:s,description:o,error:i,captionDescription:n,readonly:r,orientation:a,elementId:l,fieldTitle:c,errorText:d,elementCssClass:u,elementContainerCssClass:h,containerCssClass:g,defaultEmptyText:f,...m})=>C.jsx(Tn,{label:e??c,error:i??d,optionalText:s,optional:t,description:o,captionDescription:n,readonly:r,orientation:a,elementId:l,cssClass:g,defaultEmptyText:f,value:m.value,children:C.jsx(fo,{elementId:l,cssClass:u,containerCssClass:h,invalid:d!=null,...m})}),Ov=({onChange:e,...t})=>{const s=o=>o==="-"?o:String(o)?.match(Av)?String(o)?.replace(Lv,"0"):Number(o);return C.jsx(xu,{type:"number",onChange:o=>e?.(s(o)),...t})},Hv=({onChange:e,...t})=>C.jsx(xu,{type:"text",onChange:s=>e?.(s),...t}),Nv=({fieldTitle:e,optional:t,elementId:s,elementCssClass:o,containerCssClass:i,elementContainerCssClass:n,errorText:r,...a})=>C.jsxs("div",{className:ue("flex flex-col",i),children:[C.jsx(Vs,{fieldTitle:e,optional:t,htmlFor:s}),C.jsx(Ru,{textareaId:s,cssClass:o,containerCssClass:n,...a}),C.jsx(rs,{errorText:r})]}),Fu=({title:e,switchId:t,isOn:s=!1,disabled:o,onChange:i})=>{const n=W("flex w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",s?"flex-row-reverse":"flex-row",o?"pointer-events-none":"",o?s?"bg-controls-disable":"bg-layer-4":s?"bg-accent-primary":"bg-layer-4"),r=p.useCallback(a=>{a.stopPropagation(),i?.(!s)},[i,s]);return C.jsxs("div",{className:"flex flex-row items-center",children:[C.jsx("input",{type:"checkbox",onChange:r,id:t,disabled:o,className:"invisible w-0 h-0",checked:s}),C.jsx("label",{htmlFor:t,className:n,children:C.jsx("span",{className:W("size-3 rounded-full",o?s?"bg-layer-4":"bg-controls-disable":"bg-controls-enable-primary")})}),e&&C.jsx("span",{className:"pl-2 dial-small text-primary",children:e})]})};var Vt=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(Vt||{});const Gv="z-[52] flex items-center justify-center bg-blackout md:p-4",Vv="divide-tertiary divide-y",Bv="flex flex-row justify-between py-4 px-6 items-center",zv={[Vt.Sm]:"dial-sm-popup",[Vt.Md]:"dial-md-popup",[Vt.Lg]:"dial-lg-popup"},Nn=({open:e=!1,title:t,portalId:s,cssClass:o,overlayClass:i,headingClass:n,dividers:r=!0,children:a,footer:l,onClose:c,size:d=Vt.Md})=>{const{refs:u,context:h}=le.useFloating({open:e,onOpenChange:b=>{b||c?.(null)}}),g=le.useRole(h,{role:"dialog"}),f=le.useDismiss(h,{outsidePress:!0}),{getFloatingProps:m}=le.useInteractions([g,f]);if(!e)return null;const v=typeof t=="string"?"dial-popup-heading":void 0,w=b=>b?typeof b=="string"?C.jsx("h3",{id:v,className:W("flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",n),children:C.jsx(hs,{tooltip:b,children:b})}):b:C.jsx("span",{});return C.jsx(le.FloatingPortal,{id:s,children:C.jsx(le.FloatingOverlay,{className:W(Gv,i),children:C.jsx(le.FloatingFocusManager,{context:h,children:C.jsxs("div",{ref:u.setFloating,...m(),role:"dialog","aria-modal":"true","aria-labelledby":v,className:W("dial-popup",zv[d],r&&Vv,o),children:[C.jsxs("div",{className:Bv,children:[w(t),C.jsx(Wa,{ariaLabel:"Close dialog",onClose:b=>c?.(b)})]}),C.jsx("div",{className:"flex-grow overflow-auto",children:a}),l]})})})})};var ei=(e=>(e.Info="info",e.Danger="danger",e))(ei||{});const Wv="flex justify-end gap-2 px-6 py-4",_v="text-secondary dial-small-150 px-6 py-4",Uv="Cancel",jv="Ok",rc={[ei.Info]:{confirmVariant:De.Primary,cancelVariant:De.Secondary},[ei.Danger]:{container:"dial-danger-popup",confirmVariant:De.Danger,cancelVariant:De.Secondary}},$v=({title:e,description:t,descriptionCssClass:s,open:o=!1,confirmLabel:i=jv,cancelLabel:n=Uv,isLoading:r=!1,disableConfirmButton:a=!1,cssClass:l,confirmClassName:c,onClose:d,onConfirm:u,onCancel:h,children:g,dividers:f=!1,variant:m=ei.Info,size:v=Vt.Sm,footer:w})=>{const b=r?null:C.jsxs("div",{className:Wv,children:[C.jsx(Ie,{variant:De.Secondary,title:n,onClick:()=>h?h():d?.()}),C.jsx(Ie,{variant:rc[m].confirmVariant,cssClass:c,title:i,disable:a,onClick:()=>u()})]}),S=p.useCallback(()=>r?C.jsx("div",{className:"px-6 py-4 h-[120px]",children:C.jsx(Pn,{size:50})}):g??(t?C.jsx("div",{className:W(_v,s),children:t}):null),[g,t,r,s]);return C.jsx(Nn,{open:o,title:e,cssClass:W(rc[m].container,l),dividers:f,onClose:()=>d?.(),footer:w??b,size:v,children:S()})},_a=({selectedItems:e,listCssClass:t,listElementCssClass:s})=>!!e?.length&&C.jsx("ul",{className:W("flex-row items-center truncate flex-wrap","flex gap-x-2 gap-y-1",t),children:e?.map(o=>C.jsx("li",{children:C.jsx(hs,{tooltip:o,children:C.jsx(In,{tag:o,cssClass:W([s])})})},o))}),ac=e=>oe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},oe.createElement("path",{d:"M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z",fill:"currentColor"})),Eu=({children:e,open:t,disabled:s=!1,selectedValue:o,valueCssClasses:i,inputCssClasses:n,onOpen:r,elementId:a,errorText:l,emptyValueText:c})=>{const d=Array.isArray(o)&&o.length>0,u=typeof o=="string"&&!!o.trim(),h=d||u?o:c,g=s?void 0:r,f=()=>C.jsxs(C.Fragment,{children:[C.jsx("button",{type:"button",className:"w-full",onClick:g,"aria-label":"open-popup",id:a,children:C.jsxs("div",{className:W("dial-input px-3 py-2 dial-input-field flex flex-row items-center w-full justify-between",n,s&&"dial-input-disable",l&&"dial-input-error"),children:[C.jsx(hs,{tooltip:String(h),children:C.jsx("span",{className:i,children:h})}),!s&&C.jsx("div",{className:"flex-shrink-0",children:C.jsx(we,{icon:C.jsx(ac,{role:"img",width:Ho,height:Ho})})})]})}),l&&C.jsx(rs,{errorText:l})]}),m=()=>C.jsx("div",{className:"w-full",onClick:g,children:C.jsxs("div",{className:W("dial-input px-3 py-2 flex flex-row items-center w-full justify-between",s&&"dial-input-disable"),children:[C.jsx(_a,{selectedItems:h}),!s&&C.jsx("div",{className:"ml-1",children:C.jsx(we,{icon:C.jsx(ac,{role:"img",width:Ho,height:Ho})})})]})});return C.jsxs(C.Fragment,{children:[d?m():f(),t&&Dn.createPortal(e,document.body)]})},Kv=({fieldTitle:e,htmlFor:t,disabled:s,selectedValue:o,radioButtons:i,customInputValue:n,valueCssClasses:r,inputCssClasses:a,emptyValueText:l,onClose:c,title:d,portalId:u,onApply:h,cancelButtonTitle:g="Cancel",applyButtonTitle:f="Apply",isValid:m,selectedRadioValue:v,onChangeRadioField:w,id:b,size:S=Vt.Md})=>{const[R,y]=p.useState(!1),x=p.useCallback(()=>{s||y(!0)},[s]),D=p.useCallback(()=>{y(!1),c?.()},[c]),M=p.useCallback(()=>{h(),D()},[h,D]);return C.jsxs("div",{className:"flex flex-col",children:[C.jsx(Vs,{fieldTitle:e,htmlFor:t}),C.jsx(Eu,{disabled:s,open:R,selectedValue:n??i.find(L=>L.id===o)?.name,valueCssClasses:r,inputCssClasses:W(a,"py-2","px-3"),emptyValueText:l,onOpen:x,children:C.jsx(Nn,{open:R,onClose:D,title:d,portalId:u,size:S,footer:C.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[C.jsx(Ie,{variant:De.Secondary,title:g,onClick:D}),C.jsx(Ie,{variant:De.Primary,title:f,onClick:M,disable:!m})]}),children:C.jsx("div",{className:"px-6 py-4",children:C.jsx(tu,{radioButtons:i,labelCssClass:"dial-small",activeRadioButton:v,onChange:w,elementId:b,orientation:Jo.Column})})})})]})},qv="Create",Yv="Cancel",Zv="flex items-center justify-end gap-2 px-6 py-3",Qv=({title:e,open:t=!1,submitLabel:s=qv,cancelLabel:o=Yv,isLoading:i=!1,disableSubmitButton:n=!1,cssClass:r,submitClassName:a,onClose:l,onSubmit:c,onCancel:d,children:u,dividers:h=!0,size:g=Vt.Md,footer:f})=>{const m=i?null:C.jsxs("div",{className:Zv,children:[C.jsx(Ie,{variant:De.Secondary,title:o,onClick:()=>d?d():l?.()}),C.jsx(Ie,{variant:De.Primary,cssClass:a,title:s,disable:n,onClick:()=>c()})]}),v=p.useCallback(()=>i?C.jsx("div",{className:"px-6 py-4 h-[120px]",children:C.jsx(Pn,{size:50})}):u??null,[u,i]);return C.jsx(Nn,{open:t,title:e,cssClass:r,dividers:h,onClose:()=>l?.(),footer:f??m,size:g,children:v()})};var ti=(e=>(e.Small="small",e.Base="base",e))(ti||{});const Xv={[ti.Small]:{textClass:"text-xs px-1",containerClass:"px-[6px] py-1 h-[22px]",iconSize:10,iconStroke:1},[ti.Base]:{textClass:"text-sm px-2",containerClass:"px-3 py-2 h-[38px]",iconSize:18,iconStroke:1.5}},Ua=({elementId:e,value:t,placeholder:s="Search...",disabled:o,readonly:i,invalid:n,cssClass:r,containerCssClass:a,onChange:l,size:c=ti.Base})=>{const[d,u]=p.useState(t||"");p.useEffect(()=>{u(t||"")},[t]);const h=p.useCallback(m=>{u(m),l?.(m)},[l]),g=Xv[c],f=p.useCallback(()=>{h("")},[h]);return C.jsxs("div",{className:W("dial-input flex flex-row items-center justify-between",n&&"dial-input-error",o&&"dial-input-disable",i&&"dial-input-readonly",g.containerClass,a),children:[C.jsx(we,{className:W(o?"text-secondary":"text-primary"),icon:C.jsx(K.IconSearch,{size:g.iconSize,stroke:g.iconStroke})}),C.jsx("input",{id:e,type:"text",autoComplete:"off",placeholder:s,value:d??"",disabled:o,readOnly:i,className:W("border-0 bg-transparent w-full",r,g.textClass),onChange:m=>!i&&h(m.currentTarget.value)}),d&&!i&&!o&&C.jsx(we,{className:"text-primary cursor-pointer",icon:C.jsx(K.IconX,{size:g.iconSize,stroke:g.iconStroke,onClick:f,"aria-label":"Clear search",role:"button"})})]})},Jv="w-full h-[12] flex items-center justify-between gap-4",ew="min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-3 px-3 flex items-center rounded",tw="w-[260px]",Du=({ariaLabel:e="Breadcrumb",titleCssClass:t,onItemClick:s,path:o,makeHref:i,cssClass:n,breadcrumbCssClass:r,searchable:a=!0,value:l,elementId:c="fm-search",disabled:d,readonly:u,invalid:h,onSearchChange:g,searchCssClass:f,searchContainerCssClass:m})=>{const v=p.useMemo(()=>{if(!o)return;const w=o.split("/").map(b=>b.trim()).filter(Boolean);return w.length?w.map((b,S)=>{const R=w.slice(0,S+1),y=typeof i=="function"?i(R,S):void 0;return{title:b,href:y,onClick:s?x=>{x.preventDefault(),s(y)}:void 0}}):[{title:"/"}]},[o,i,s]);return C.jsxs("div",{className:W(Jv,n),children:[C.jsx("div",{className:ew,children:C.jsx(Su,{pathItems:v,ariaLabel:e,titleCssClass:t,cssClass:r})}),a&&C.jsx("div",{className:tw,role:"search","aria-label":"Search",children:C.jsx(Ua,{elementId:c,value:l??"",onChange:g,disabled:d,readonly:u,invalid:h,cssClass:f,containerCssClass:m})})]})},sw="w-full h-full grid grid-rows-[auto_1fr] gap-5 p-6 overflow-hidden min-w-0 bg-layer-2",ow="w-full text-secondary flex items-center gap-2",iw="flex min-h-0 min-w-0 h-full gap-4 overflow-hidden",nw="flex flex-col flex-1 min-h-0 min-w-0 h-full gap-4",rw="w-full h-full rounded bg-layer-3 text-secondary overflow-auto min-w-0",aw="flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0",lw=360,cw="Files";var ns=(e=>(e.ITEM="item",e.FOLDER="folder",e))(ns||{});const dw={size:10,stroke:2},uw=26,hw=({items:e,showFiles:t=!1,expandedPaths:s=new Set,loadingPaths:o=new Set,selectedPath:i,emptyStateTitle:n="No Folders",emptyStateDescription:r,emptyStateIcon:a,onItemClick:l,getContextMenuItems:c})=>{const[d,u]=p.useState(s),h=f=>{l?.(f),d.has(f.path)?u(m=>{const v=new Set(m);return v.delete(f.path),v}):u(m=>{const v=new Set(m);return v.add(f.path),v})},g=(f,m)=>f.map(v=>{const{path:w,nodeType:b,name:S,items:R}=v,y=b===ns.FOLDER;if(!y&&!t)return;const x=Array.isArray(R)&&R.length>0&&R.some(P=>P.nodeType===ns.FOLDER||t),D=d.has(w),M=i===w,L=o.has(w),I=M?"bg-accent-primary-alpha border-l-2 border-l-accent-primary rounded":"border-l-2 border-l-transparent",F=c?.(v)??[];return C.jsx("div",{className:"cursor-pointer text-secondary",children:C.jsxs("div",{className:"flex flex-col",children:[C.jsxs("div",{style:{paddingLeft:`${m*uw}px`},className:ue("py-[6px] pr-[6px] gap-[2px] dial-small flex justify-between hover:bg-accent-primary-alpha rounded group w-full mb-[2px]",I),children:[C.jsx("div",{onClick:()=>h(v),className:"w-full",children:C.jsx(Ut,{trigger:[Ft.ContextMenu],cssClass:"w-full",anchorToMouse:!0,menu:{items:F},children:C.jsx("div",{className:"flex-1 flex flex-row truncate items-center",children:y?C.jsxs(C.Fragment,{children:[C.jsx(K.IconCaretRightFilled,{...dw,className:W("flex-shrink-0",D&&"rotate-90 transition-all",!x&&"text-transparent")}),C.jsx(za,{name:S,loading:L})]}):C.jsx(Ba,{name:S})})})}),F.length>0&&C.jsx(Ut,{placement:"bottom-start",allowedPlacements:["top-start","top-end"],menu:{items:F},children:C.jsx(we,{className:"invisible group-hover:visible text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary",icon:C.jsx(K.IconDotsVertical,{...ke})})})]}),D&&R&&g(R,m+1)]})},`${w}-children`)});return C.jsx("div",{className:"flex-1 w-full h-full overflow-y-auto",children:e.length>0?g(e,0):C.jsx(ka,{title:n,description:r,icon:a})})};var ks=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){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const s=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:o}=this,i=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},n=this.getListeners(s,t,!1);if((n?.size??0)>0){const a=new Set(n);for(const l of a)n?.has(l)&&i(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)i(()=>l(s,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function Bt(e){return e==null||e===""?null:e}function V(e){return e!=null&&e!==""}function be(e){return!V(e)}function qr(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function si(e,t){const s=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return s===o}function gw(e,t,s=!1){const o=e==null,i=t==null;if(e?.toNumber&&(e=e.toNumber()),t?.toNumber&&(t=t.toNumber()),o&&i)return 0;if(o)return-1;if(i)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!s)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var pw=/[&<>"']/g,fw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Fo(e){return e?.toString().toString()??null}function zo(e){return Fo(e)?.replace(pw,t=>fw[t])??null}function St(e){return e.eRootDiv.getRootNode()}function ye(e){return St(e).activeElement}function Le(e){const{gos:t,eRootDiv:s}=e;let o=null;const i=t.get("getDocument");return i&&V(i)?o=i():s&&(o=s.ownerDocument),o&&V(o)?o:document}function Pu(e){const t=ye(e);return t===null||t===Le(e).body}function Tu(e){return Le(e).defaultView||window}function ja(e){let t=null,s=null;try{t=Le(e).fullscreenElement}catch{}finally{t||(t=St(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 mw(e){return ja(e)?.clientWidth??(window.innerWidth||-1)}function Cw(e){return ja(e)?.clientHeight??(window.innerHeight||-1)}function vt(e,t,s){s==null||typeof s=="string"&&s==""?Mu(e,t):wt(e,t,s)}function wt(e,t,s){e.setAttribute(Iu(t),s.toString())}function Mu(e,t){e.removeAttribute(Iu(t))}function Iu(e){return`aria-${e}`}function As(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function vw(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function ww(e){return e.getAttribute("aria-label")}function mo(e,t){vt(e,"label",t)}function oi(e,t){vt(e,"labelledby",t)}function ku(e,t){vt(e,"live",t)}function bw(e,t){vt(e,"atomic",t)}function Sw(e,t){vt(e,"relevant",t)}function yw(e,t){vt(e,"invalid",t)}function Rw(e,t){vt(e,"disabled",t)}function Au(e,t){vt(e,"hidden",t)}function Yr(e,t){wt(e,"expanded",t)}function xw(e,t){wt(e,"setsize",t)}function Fw(e,t){wt(e,"posinset",t)}function Ew(e,t){wt(e,"rowcount",t)}function Lu(e,t){wt(e,"rowindex",t)}function Dw(e,t){wt(e,"rowspan",t)}function Pw(e,t){wt(e,"colcount",t)}function Ou(e,t){wt(e,"colindex",t)}function Tw(e,t){wt(e,"colspan",t)}function Mw(e,t){wt(e,"sort",t)}function Iw(e){Mu(e,"sort")}function Hu(e,t){vt(e,"selected",t)}function kw(e,t){vt(e,"controls",t)}function Aw(e,t){kw(e,t.id),oi(t,e.id)}function lc(e,t){vt(e,"owns",t)}function Gn(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Lw="[tabindex], input, select, button, textarea, [href]",Nu="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Wo(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(Nu)?!1:$t(e)}function Se(e,t,s={}){const{skipAriaHidden:o}=s;e.classList.toggle("ag-hidden",!t),o||Au(e,!t)}function Ow(e,t,s={}){const{skipAriaHidden:o}=s;e.classList.toggle("ag-invisible",!t),o||Au(e,!t)}function ii(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 xs(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 Bs(e){const{height:t,width:s,borderTopWidth:o,borderRightWidth:i,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:g,marginLeft:f,boxSizing:m}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(s||"0"),borderTopWidth:v(o||"0"),borderRightWidth:v(i||"0"),borderBottomWidth:v(n||"0"),borderLeftWidth:v(r||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(c||"0"),paddingLeft:v(d||"0"),marginTop:v(u||"0"),marginRight:v(h||"0"),marginBottom:v(g||"0"),marginLeft:v(f||"0"),boxSizing:m}}function $a(e){const t=Bs(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function ni(e){const t=Bs(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function Gu(e){const{height:t,marginBottom:s,marginTop:o}=Bs(e);return Math.floor(t+s+o)}function tn(e){const{width:t,marginLeft:s,marginRight:o}=Bs(e);return Math.floor(t+s+o)}function Vu(e){const t=e.getBoundingClientRect(),{borderTopWidth:s,borderLeftWidth:o,borderRightWidth:i,borderBottomWidth:n}=Bs(e);return{top:t.top+(s||0),left:t.left+(o||0),right:t.right+(i||0),bottom:t.bottom+(n||0)}}function sn(e,t){let s=e.scrollLeft;return t&&(s=Math.abs(s)),s}function on(e,t,s){s&&(t*=-1),e.scrollLeft=t}function Xe(e){for(;e?.firstChild;)e.firstChild.remove()}function as(e){e?.parentNode&&e.remove()}function Bu(e){return!!e.offsetParent}function $t(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!Bu(e)||window.getComputedStyle(e).visibility!=="visible")}function Ka(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Gi(e){return()=>{const t=e();return t?qa(t)||zu(t):!0}}function qa(e){return e.clientWidth<e.scrollWidth}function zu(e){return e.clientHeight<e.scrollHeight}function nn(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Dt(e,t)}function Dt(e,t){t=Ya(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function _o(e,t){t=Ya(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Ya(e){return typeof e=="number"?`${e}px`:e}function Za(e){return e instanceof Node||e instanceof HTMLElement}function st(e,t,s){s==null||s===""?e.removeAttribute(t):e.setAttribute(t,s.toString())}function Kt(e,t,s){const i=Tu(e).ResizeObserver,n=i?new i(s):null;return n?.observe(t),()=>n?.disconnect()}function qt(e,t){const s=Tu(e);s.requestAnimationFrame?s.requestAnimationFrame(t):s.webkitRequestAnimationFrame?s.webkitRequestAnimationFrame(t):s.setTimeout(t,0)}var Wu="data-ref",sr;function cc(){return sr??(sr=document.createTextNode(" ")),sr.cloneNode()}function fi(e){const{attrs:t,children:s,cls:o,ref:i,role:n,tag:r}=e,a=document.createElement(r);if(o&&(a.className=o),i&&a.setAttribute(Wu,i),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(s)if(typeof s=="string")a.textContent=s;else{let l=!0;for(const c of s)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(cc()),l=!1),a.append(fi(c)),a.appendChild(cc())))}return a}var Hw=["touchstart","touchend","touchmove","touchcancel","scroll"],Nw=["wheel"],or={},_u=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return s=>{if(typeof or[s]=="boolean")return or[s];const o=document.createElement(e[s]||"div");return s="on"+s,or[s]=s in o}})();function Gw(e,t){return!t||!e?!1:Bw(t).indexOf(e)>=0}function Vw(e){const t=[];let s=e.target;for(;s;)t.push(s),s=s.parentElement;return t}function Bw(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Vw(t)}function zw(e,t,s){const o=Ww(t);let i;o!=null&&(i={passive:o}),e.addEventListener(t,s,i)}var Ww=e=>{const t=Hw.includes(e),s=Nw.includes(e);if(t)return!0;if(s)return!1};function Uu(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 Uo=(e,t)=>{const s=e.identifier;for(let o=0,i=t.length;o<i;++o){const n=t[o];if(n.identifier===s)return n}return null};function ri(e,t){return e.gos.isElementInThisInstance(t.target)}function _w(e,t,s){const i=e.getBoundingClientRect().height,n=mw(s)-2,r=Cw(s)-2;if(!e.offsetParent)return;const l=Vu(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-i/2,h=d-l.left-10;const g=Le(s),f=g.defaultView||window,m=f.pageYOffset||g.documentElement.scrollTop,v=f.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+v&&(h=n+v-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+m&&(u=r+m-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}var Vi=(e,...t)=>{for(const s of t){const[o,i,n,r]=s;o.addEventListener(i,n,r),e.push(s)}},Qa=e=>{if(e){for(const[t,s,o,i]of e)t.removeEventListener(s,o,i);e.length=0}},ss=e=>{e.cancelable&&e.preventDefault()};function Uw(e,t){return t}function ju(e){return e?.getLocaleTextFunc()??Uw}function jw(e,t,s,o){const i=t[s];return e.getLocaleTextFunc()(s,typeof i=="function"?i(o):i,o)}function $w(e){return(t,s,o)=>e({key:t,defaultValue:s,variableValues:o})}function Kw(e){return(t,s,o)=>{let i=e?.[t];if(i&&o?.length){let n=0;for(;!(n>=o.length||i.indexOf("${variable}")===-1);)i=i.replace("${variable}",o[n++])}return i??s}}var It=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 ks),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;if(qw(e))e.__addEventListener(t,s),o=()=>(e.__removeEventListener(t,s),null);else{const i=Yw(e);e instanceof HTMLElement?zw(e,t,s):i?e.addListener(t,s):e.addEventListener(t,s),o=i?()=>(e.removeListener(t,s),null):()=>(e.removeEventListener(t,s),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==o),null)}setupPropertyListener(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.setupPropertyListener(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:"propertyChanged",changeSet:i.changeSet,source:i.source};t(n)};for(const i of e)this.setupPropertyListener(i,o)}getLocaleTextFunc(){return ju(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 qw(e){return e.__addEventListener!==void 0}function Yw(e){return e.eventServiceType==="global"}var T=class extends It{},dc={};function Xa(e,t){dc[t]||(e(),dc[t]=!0)}var Zw={pending:!1,funcs:[]},Qw={pending:!1,funcs:[]};function Zr(e,t="setTimeout",s){const o=t==="raf"?Qw:Zw;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;for(const r of n)r()};t==="raf"?qt(s,i):window.setTimeout(i,0)}function Ve(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 uc(e,t){let s=0;return function(...o){const i=this,n=Date.now();n-s<t||(s=n,e.apply(i,o))}}function Xw(e,t,s,o=100){const i=Date.now();let n=null,r=!1;const a=()=>{n!=null&&(window.clearInterval(n),n=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-i>o;(t()||c)&&(s(),r=!0,a())};l(),r||(n=window.setInterval(l,10))}var $u=new Set(["__proto__","constructor","prototype"]);function Jw(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).filter(o=>!$u.has(o)))t(s,e[s])}}function Ke(e,t,s=!0,o=!1){V(t)&&Jw(t,(i,n)=>{let r=e[i];r!==n&&(o&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[i]=r),hc(n)&&hc(r)&&!Array.isArray(r)?Ke(r,n,s,o):(s||n!==void 0)&&(e[i]=n))})}function hc(e){return typeof e=="object"&&e!==null}var Ja=class Ot{static applyGlobalGridOptions(t){if(!Ot.gridOptions)return{...t};let s={};return Ke(s,Ot.gridOptions,!0,!0),Ot.mergeStrategy==="deep"?Ke(s,t,!0,!0):s={...s,...t},Ot.gridOptions.context&&(s.context=Ot.gridOptions.context),t.context&&(Ot.mergeStrategy==="deep"&&s.context&&Ke(t.context,s.context,!0,!0),s.context=t.context),s}static applyGlobalGridOption(t,s){if(Ot.mergeStrategy==="deep"){const o=Ku(t);if(o&&typeof o=="object"&&typeof s=="object")return Ot.applyGlobalGridOptions({[t]:s})[t]}return s}};Ja.gridOptions=void 0;Ja.mergeStrategy="shallow";var el=Ja;function Ku(e){return el.gridOptions?.[e]}var qu={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},Yu="https://www.ag-grid.com";function Ls(e,t,...s){e.get("debug")&&console.log("AG Grid: "+t,...s)}function jo(e,...t){Xa(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function oo(e,...t){Xa(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var Zu=new Set,rn={},Fs={},Bi,Qu=!1,Xu=!1,e1=!1;function t1(e){const[t,s]=e.version.split(".")||[],[o,i]=Bi.split(".")||[];return t===o&&s===i}function s1(e){Bi||(Bi=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;e.version?t1(e)||oo(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Bi}.`)):oo(t(`'${e.moduleName}' is incompatible.`));const s=e.validate?.();s&&!s.isValid&&oo(`${s.message}`)}function ai(e,t,s=!1){s||(Qu=!0),s1(e);const o=e.rowModels??["all"];Zu.add(e);let i;t!==void 0?(Xu=!0,Fs[t]===void 0&&(Fs[t]={}),i=Fs[t]):i=rn;for(const n of o)i[n]===void 0&&(i[n]={}),i[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)ai(n,t,s)}function o1(e){delete Fs[e]}function Qr(e,t,s){const o=i=>!!rn[i]?.[e]||!!Fs[t]?.[i]?.[e];return o(s)||o("all")}function tl(){return Xu}function i1(e,t){const s=Fs[e]??{};return[...Object.values(rn.all??{}),...Object.values(s.all??{}),...Object.values(rn[t]??{}),...Object.values(s[t]??{})]}function n1(){return new Set(Zu)}function r1(e,t){const s=Fs[e]??{};return[...Object.values(s.all??{}),...Object.values(s[t]??{})]}function a1(){return Qu}function l1(){return e1}var c1=class{static register(e){ai(e,void 0)}static registerModules(e){for(const t of e)ai(t,void 0)}},G="34.3.0",gc=2e3,pc=100,Ju="_version_",eh=null,io=`${Yu}/javascript-data-grid`;function d1(e){eh=e}function u1(e){io=e}function th(e,t,s){return eh?.(e,t)??[f1(e,t,s)]}function sl(e,t,s,o,i){e(`${o?"warning":"error"} #${t}`,...th(t,s,i))}function h1(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 g1(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=h1(e)),t}function an(e){return e===void 0?"undefined":e===null?"null":e}function Xr(e,t){return`${e}?${t.toString()}`}function p1(e,t,s){const o=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let i=Xr(e,t);for(const[n,r]of o){if(n===Ju)continue;const a=i.length-s;if(a<=0)break;const l="...",c=a+l.length,d=r.length-c>pc?r.slice(0,r.length-c)+l:r.slice(0,pc)+l;t.set(n,d),i=Xr(e,t)}return i}function sh(e,t){const s=new URLSearchParams;if(s.append(Ju,G),t)for(const n of Object.keys(t))s.append(n,g1(t[n]));const o=`${io}/errors/${e}`,i=Xr(o,s);return i.length<=gc?i:p1(o,s,gc)}var f1=(e,t,s)=>{const o=sh(e,t);return`${`${s?s+`
2
+ `:""}Visit ${o}`}${s?"":`
3
+ Alternatively register the ValidationModule to see the full message in the console.`}`};function H(...e){sl(jo,e[0],e[1],!0)}function pe(...e){sl(oo,e[0],e[1],!1)}function Go(e,t,s){sl(oo,e,t,!1,s)}function m1(e,t){const s=t[0];return`error #${s} `+th(s,t[1],e).join(" ")}function Pt(...e){return m1(void 0,e)}function oh(e,t){return e.get("rowModelType")===t}function Fe(e,t){return oh(e,"clientSide")}function zs(e,t){return oh(e,"serverSide")}function Be(e,t){return e.get("domLayout")===t}function Es(e){return cn(e)!==void 0}function ih(e){return typeof e.get("getRowHeight")=="function"}function C1(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function ls(e,t,s=!1,o){const{gos:i,environment:n}=e;if(o==null&&(o=n.getDefaultRowHeight()),ih(i)){if(s)return{height:o,estimated:!0};const l={node:t,data:t.data},c=i.getCallback("getRowHeight")(l);if(Jr(c))return c===0&&H(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&i.get("masterDetail"))return v1(i);const r=i.get("rowHeight");return{height:r&&Jr(r)?r:o,estimated:!1}}function v1(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Jr(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function Ds(e){const{environment:t,gos:s}=e,o=s.get("rowHeight");if(!o||be(o))return t.getDefaultRowHeight();const i=t.refreshRowHeightVariable();return i!==-1?i:(H(24),t.getDefaultRowHeight())}function Jr(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function nh(e,t,s){const o=t[e.getDomDataKey()];return o?o[s]:void 0}function Os(e,t,s,o){const i=e.getDomDataKey();let n=t[i];be(n)&&(n={},t[i]=n),n[s]=o}function no(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function rh(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Be(e,"print"))}function Rt(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function ea(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function ah(e){return e.get("grandTotalRow")}function lh(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function ch(e,t,s){return!!t.group&&!t.footer&&lh(e,s)}function Co(e){const t=e.getCallback("getRowId");return t===void 0?t:s=>{let o=t(s);return typeof o!="string"&&(Xa(()=>H(25,{id:o}),"getRowIdString"),o=String(o)),o}}function w1(e,t){const s=e.get("groupHideParentOfSingleChild");return!!(s===!0||s==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function b1(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function ro(e){return e?.checkboxes??!0}function zi(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function ln(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function ir(e){return e?.hideDisabledCheckboxes??!1}function S1(e){return typeof e.get("rowSelection")!="string"}function cs(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function dh(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 y1(e){const t=dh(e);return t===!0||t==="enableSelection"}function R1(e){const t=dh(e);return t===!0||t==="enableDeselection"}function ta(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function cn(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 dn(e){return cn(e)==="multiRow"}function x1(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function un(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 uh(e,t=!0){const s=e.get("rowSelection");return typeof s!="object"?t?"all":void 0:s.mode==="multiRow"?s.selectAll:"all"}function F1(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function li(e){const t=un(e);return t==="descendants"||t==="filteredDescendants"}function fc(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function E1(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function ot(e){return e.get("columnMenu")==="legacy"}function D1(e){return!ot(e)}function P1(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function T1(e,t,s){typeof e!="object"&&(e={});const o={...e};for(const i of s){const n=t[i];typeof n<"u"&&(o[i]=n)}return o}function M1(e,t){if(!e)return;const s={};let o=!1;for(const r of Object.keys(e))s[r]=e[r],o=!0;if(!o)return;const i={type:"gridOptionsChanged",options:s};t.dispatchEvent(i);const n={type:"componentStateChanged",...s};t.dispatchEvent(n)}function Y(e,t){return e.addCommon(t)}function Wi(e,t){return e[t]??e.gridOptions?.[t]??Ku(t)??qu[t]}function mc({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var I1={resizable:!0,sortable:!0},k1=0;function hh(){return k1++}function ds(e){return e instanceof Ws}var Ws=class extends T{constructor(e,t,s,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=s,this.primary=o,this.isColumn=!0,this.instanceId=hh(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new ks,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=zo(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(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:s}}=this,o=e.get("suppressFieldDotNotation");this.fieldContainsDots=V(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=V(s)&&s.includes(".")&&!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)}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:s=>{const o=e.recreateColDef(this.colDef);this.setColDef(o,o,s.source)}})}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(e,t)??t;this.colEventSvc.addEventListener(e,s)}removeEventListener(e,t){const s=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,s)}createColumnFunctionCallbackParams(e){return Y(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({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){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]??I1[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 Y(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 be(this.sort)}isSorting(){return V(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 H(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}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!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 Y(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(be(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.colSpan(t);return Math.max(s,1)}getRowSpan(e){if(be(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&&Ke(o,s),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function _e(e){return e instanceof _i}var _i=class extends T{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=hh(),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}forEachLeafColumn(e){if(this.children)for(const t of this.children)ds(t)?e(t):_e(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)ds(t)?e.push(t):_e(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,s=!1;const o=this.findChildrenRemovingPadding();for(let n=0,r=o.length;n<r;n++){const a=o[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,s=!0):l==="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=>{for(const o of s)_e(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},A1={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Cc(e,t,s){const o={},i=e.gos;return Object.assign(o,i.get("defaultColGroupDef")),Object.assign(o,t),i.validateColDef(o,s),o}var L1=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=qr(e);let s=0;for(;;){let o=e??t;if(o?s!==0&&(o+="_"+s):o=s,!this.existingKeys[o]){const i=String(o);return e&&s>0&&H(273,{providedId:e,usedId:i}),this.existingKeys[i]=!0,i}s++}}};function fe(e){if(e?.length)return e[e.length-1]}function gs(e,t,s){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i++)if(e[i]!==t[i]&&!s?.(e[i],t[i]))return!1;return!0}function Io(e,t){if(e)for(const s of e)t(s)}function Ct(e,t){const s=e.indexOf(t);s>=0&&e.splice(s,1)}function vc(e,t,s){for(let o=0;o<t.length;o++)Ct(e,t[o]);for(let o=t.length-1;o>=0;o--)e.splice(s,0,t[o])}var Vn="ag-Grid-AutoColumn",gh="ag-Grid-SelectionColumn",ph="ag-Grid-RowNumbersColumn";function fh(e){const t=[],s=o=>{for(let i=0;i<o.length;i++){const n=o[i];ds(n)?t.push(n):_e(n)&&s(n.getChildren())}};return s(e),t}function Ht(e){return e.reduce((t,s)=>t+s.getActualWidth(),0)}function hn(e,t,s){const o={};if(!t)return;Wt(null,t,n=>{o[n.getInstanceId()]=n}),s&&Wt(null,s,n=>{o[n.getInstanceId()]=null});const i=Object.values(o).filter(n=>n!=null);e.context.destroyBeans(i)}function ol(e){return e.getId().startsWith(Vn)}function Yt(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(gh)??!1}function zt(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(ph)??!1}function O1(e){return Yt(e)||zt(e)}function gn(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function H1(e,t){return gs(e,t,(s,o)=>s.getColId()===o.getColId())}function N1(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function ao(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function $o(e,t){const s=e===t,o=e.getColDef()===t,i=e.getColId()==t;return s||o||i}var G1=(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),V(o)&&e[o]!==void 0&&(i.value2=e[o],n=!0)),!n&&t&&(t[s]!==void 0&&(i.value1=t[s]),V(o)&&t[o]!==void 0&&(i.value2=t[o])),i},V1=(e,t)=>{_e(e)&&e.setupExpandable(),e.originalParent=t};function B1(e,t=null,s,o,i){const n=new L1,{existingCols:r,existingGroups:a,existingColKeys:l}=z1(o);n.addExistingKeys(l);const c=mh(e,t,0,s,r,n,a,i),{colGroupSvc:d}=e,u=d?.findMaxDepth(c,0)??0,h=d?d.balanceColumnTree(c,0,u,n):c;return Wt(null,h,V1),{columnTree:h,treeDepth:u}}function z1(e){const t=[],s=[],o=[];return e&&Wt(null,e,i=>{if(_e(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 mh(e,t,s,o,i,n,r,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let d=0;d<c.length;d++){const u=t[d];l&&K1(u)?c[d]=l.createProvidedColumnGroup(o,u,s,i,n,r,a):c[d]=W1(e,o,u,i,n,a)}return c}function W1(e,t,s,o,i,n){const r=U1(s,o);r&&o?.splice(r.idx,1);let a=r?.column;if(a){const l=sa(e,s,a.getColId());a.setColDef(l,s,n),_1(e,a,l,n)}else{const l=i.getUniqueKey(s.colId,s.field),c=sa(e,s,l);a=new Ws(c,s,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function Ch(e,t,s,o,i,n,r,a){const{sortSvc:l,pinnedCols:c,colFlex:d}=e;s!==void 0&&t.setVisible(!s,a),l&&(l.updateColSort(t,o,a),i!==void 0&&l.setColSortIndex(t,i)),n!==void 0&&c?.setColPinned(t,n),r!==void 0&&d?.setColFlex(t,r)}function _1(e,t,s,o){Ch(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 U1(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 sa(e,t,s,o){const{gos:i,dataTypeSvc:n}=e,r={},a=i.get("defaultColDef");Ke(r,a,!1,!0);const l=j1(e,r,t,s);l&&$1(e,l,r);const c=r.cellDataType;Ke(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const d=i.get("autoGroupColumnDef"),u=Rt(i);return t.rowGroup&&d&&u&&Ke(r,{sort:d.sort,initialSort:d.initialSort},!1,!0),n&&(n.postProcess(r),n.validateColDef(r)),i.validateColDef(r,s,o),r}function j1(e,t,s,o){const i=e.dataTypeSvc?.updateColDefAndGetColumnType(t,s,o),n=s.type??i??t.type;return t.type=n,n?gn(n):void 0}function $1(e,t,s){if(!t.length)return;const o=Object.assign({},A1),i=e.gos.get("columnTypes")||{};for(const n of Object.keys(i)){const r=i[n];n in o?H(34,{key:n}):(r.type&&H(35),o[n]=r)}for(const n of t){const r=o[n.trim()];r?Ke(s,r,!1,!0):H(36,{t:n})}}function K1(e){return e.children!==void 0}function Wt(e,t,s){if(t)for(let o=0;o<t.length;o++){const i=t[o];_e(i)&&Wt(i,i.getChildren(),s),s(i,e)}}function vh(e,t){const s=[],o=[],i=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?i.push(r):a==="left"||a===!0?s.push(r):o.push(r)}),t.get("enableRtl")?[...i,...o,...s]:[...s,...o,...i]}function wh(e,t){let s=!0;return Wt(null,t,o=>{if(!_e(o))return;const i=o;if(!i.getColGroupDef()?.marryChildren)return;const a=[];for(const h of i.getLeafColumns()){const g=e.indexOf(h);a.push(g)}const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),d=l-c,u=i.getLeafColumns().length-1;d>u&&(s=!1)}),s}function bh(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 Sh(e,t,s){if(!t.length)return;const o=t.length===1?t[0]:null,i=bh(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:i??null,columns:t,column:o,source:s})}function q1(e,t,s){if(!t.length)return;const o=t.length===1?t[0]:null,i=bh(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:i,columns:t,column:o,source:s})}function Y1(e,t,s,o){e.dispatchEvent({type:t,columns:s,column:s&&s.length==1?s[0]:null,source:o})}function vo(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 mt(e,t,s){const{colModel:o,rowGroupColsSvc:i,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:u,valueColsSvc:h,eventSvc:g,gos:f}=e,m=o.getColDefCols()??[],v=a?.getColumns();if(!m.length&&!v?.length)return!1;if(t?.state&&!t.state.forEach)return H(32),!1;const w=(y,x,D,M,L)=>{if(!y)return;const I=G1(x,t.defaultState),F=I("flex").value1;if(Ch(e,y,I("hide").value1,I("sort").value1,I("sortIndex").value1,I("pinned").value1,F,s),F==null){const P=I("width").value1;if(P!=null){const B=y.getColDef().minWidth??u.getDefaultColumnMinWidth();B!=null&&P>=B&&y.setActualWidth(P,s)}}L||!y.isPrimary()||(h?.syncColumnWithState(y,s,I),i?.syncColumnWithState(y,s,I,D),n?.syncColumnWithState(y,s,I,M))},b=(y,x,D)=>{const M=yh(e,s),L=x.slice(),I={},F={},P=[],B=[],Q=[];let A=0;const te=i?.columns.slice()??[],z=n?.columns.slice()??[];for(const N of y){const X=N.colId;if(X.startsWith(Vn)){P.push(N),Q.push(N);continue}if(Yt(X)){B.push(N),Q.push(N);continue}const _=D(X);_?(w(_,N,I,F,!1),Ct(L,_)):(Q.push(N),A+=1)}const k=N=>w(N,null,I,F,!1);L.forEach(k),i?.sortColumns(wc.bind(i,I,te)),n?.sortColumns(wc.bind(n,F,z)),o.refreshCols(!1,s);const Z=(N,X,$=[])=>{for(const _ of X){const se=N(_.colId);Ct($,se),w(se,_,null,null,!0)}$.forEach(k)};return Z(N=>r?.getColumn(N)??null,P,r?.getColumns()?.slice()),Z(N=>a?.getColumn(N)??null,B,a?.getColumns()?.slice()),Q1(t,o,f),c.refresh(s),g.dispatchEvent({type:"columnEverythingChanged",source:s}),M(),{unmatchedAndAutoStates:Q,unmatchedCount:A}};l?.start();let{unmatchedAndAutoStates:S,unmatchedCount:R}=b(t.state||[],m,y=>o.getColDefCol(y));if(S.length>0||V(t.defaultState)){const y=d?.getPivotResultCols()?.list??[];R=b(S,y,x=>d?.getPivotResultCol(x)??null).unmatchedCount}return l?.finish(),R===0}function Z1(e,t){const{colModel:s,autoColSvc:o,selectionColSvc:i,eventSvc:n,gos:r}=e,a=s.getColDefCols();if(!a?.length)return;const l=s.getColDefColTree(),c=fh(l),d=[];let u=1e3,h=1e3;const g=b=>{const S=Rh(b);be(S.rowGroupIndex)&&S.rowGroup&&(S.rowGroupIndex=u++),be(S.pivotIndex)&&S.pivot&&(S.pivotIndex=h++),d.push(S)};o?.getColumns()?.forEach(g),i?.getColumns()?.forEach(g),c?.forEach(g),mt(e,{state:d},t);const f=o?.getColumns()??[],w=[...i?.getColumns()??[],...f,...a].map(b=>({colId:b.colId}));mt(e,{state:w,applyOrder:!0},t),n.dispatchEvent(Y(r,{type:"columnsReset",source:t}))}function yh(e,t){const{rowGroupColsSvc:s,pivotColsSvc:o,valueColsSvc:i,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:s?.columns.slice()??[],pivotColumns:o?.columns.slice()??[],valueColumns:i?.columns.slice()??[]},c=pn(e),d={};for(const u of c)d[u.colId]=u;return()=>{const u=(x,D,M,L)=>{const I=D.map(L),F=M.map(L);if(gs(I,F))return;const B=new Set(D);for(const A of M)B.delete(A)||B.add(A);const Q=[...B];a.dispatchEvent({type:x,columns:Q,column:Q.length===1?Q[0]:null,source:t})},h=x=>{const D=[];return n.forAllCols(M=>{const L=d[M.getColId()];L&&x(L,M)&&D.push(M)}),D},g=x=>x.getColId();u("columnRowGroupChanged",l.rowGroupColumns,s?.columns??[],g),u("columnPivotChanged",l.pivotColumns,o?.columns??[],g);const m=h((x,D)=>{const M=x.aggFunc!=null,L=M!=D.isValueActive(),I=M&&x.aggFunc!=D.getAggFunc();return L||I});m.length>0&&Y1(a,"columnValueChanged",m,t),vo(a,h((x,D)=>x.width!=D.getActualWidth()),!0,t),Sh(a,h((x,D)=>x.pinned!=D.getPinned()),t),q1(a,h((x,D)=>x.hide==D.isVisible()),t);const R=h((x,D)=>x.sort!=D.getSort()||x.sortIndex!=D.getSortIndex());R.length>0&&r?.dispatchSortChangedEvents(t,R);const y=pn(e);J1(c,y,t,n,a)}}function pn(e){const{colModel:t,rowGroupColsSvc:s,pivotColsSvc:o}=e,i=t.getColDefCols();if(be(i)||!t.isAlive())return[];const n=s?.columns,r=o?.columns,a=[],l=d=>{const u=d.isRowGroupActive()&&n?n.indexOf(d):null,h=d.isPivotActive()&&r?r.indexOf(d):null,g=d.isValueActive()?d.getAggFunc():null,f=d.getSort()!=null?d.getSort():null,m=d.getSortIndex()!=null?d.getSortIndex():null;a.push({colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:f,sortIndex:m,aggFunc:g,rowGroup:d.isRowGroupActive(),rowGroupIndex:u,pivot:d.isPivotActive(),pivotIndex:h,flex:d.getFlex()??null})};t.forAllCols(d=>l(d));const c=new Map(t.getCols().map((d,u)=>[d.getColId(),u]));return a.sort((d,u)=>{const h=c.has(d.colId)?c.get(d.colId):-1,g=c.has(u.colId)?c.get(u.colId):-1;return h-g}),a}function Rh(e){const t=(f,m)=>f??m??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),a=t(s.width,s.initialWidth),l=t(s.flex,s.initialFlex);let c=t(s.rowGroupIndex,s.initialRowGroupIndex),d=t(s.rowGroup,s.initialRowGroup);c==null&&!d&&(c=null,d=null);let u=t(s.pivotIndex,s.initialPivotIndex),h=t(s.pivot,s.initialPivot);u==null&&!h&&(u=null,h=null);const g=t(s.aggFunc,s.initialAggFunc);return{colId:e.getColId(),sort:o,sortIndex:i,hide:n,pinned:r,width:a,flex:l,rowGroup:d,rowGroupIndex:c,pivot:h,pivotIndex:u,aggFunc:g}}function Q1(e,t,s){if(!e.applyOrder||!e.state)return;const o=[];for(const i of e.state)i.colId!=null&&o.push(i.colId);X1(t.cols,o,t,s)}function X1(e,t,s,o){if(e==null)return;let i=[];const n={};for(const a of t){if(n[a])continue;const l=e.map[a];l&&(i.push(l),n[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(n[l]!=null)continue;l.startsWith(Vn)?i.splice(r++,0,a):i.push(a)}if(i=vh(i,o),!wh(i,s.getColTree())){H(39);return}e.list=i}function J1(e,t,s,o,i){const n={};for(const d of t)n[d.colId]=d;const r={};for(const d of e)n[d.colId]&&(r[d.colId]=!0);const a=e.filter(d=>r[d.colId]),l=t.filter(d=>r[d.colId]),c=[];l.forEach((d,u)=>{const h=a?.[u];if(h&&h.colId!==d.colId){const g=o.getCol(h.colId);g&&c.push(g)}}),c.length&&i.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:s})}var wc=(e,t,s,o)=>{const i=e[s.getId()],n=e[o.getId()],r=i!=null,a=n!=null;if(r&&a)return i-n;if(r)return-1;if(a)return 1;const l=t.indexOf(s),c=t.indexOf(o),d=l>=0,u=c>=0;return d&&u?l-c:d?-1:1},eb=class extends T{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(ao(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),ao(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:s,colAutosize:o,rowGroupColsSvc:i,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?yh(t,e):void 0;s?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=B1(t,this.colDefs,!0,h,e);hn(t,this.colDefCols?.tree,g.columnTree);const f=g.columnTree,m=g.treeDepth,v=fh(f),w={};for(const b of v)w[b.getId()]=b;this.colDefCols={tree:f,treeDepth:m,list:v,map:w},this.createColumnsForService([c],this.colDefCols,e),i?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&o?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const s=this.cols?.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:i,rowNumbersSvc:n,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:d,colViewport:u,eventSvc:h}=this.beans,g=this.selectCols(a,this.colDefCols);this.createColumnsForService([o,i,n],g,t);const f=C1(this.gos,this.showingPivotResult);(!e||f)&&this.restoreColOrder(g),this.positionLockedCols(g),l?.refresh(),r?.refreshCols(),this.setColSpanActive(),c?.setAutoHeightActive(g),d.clear(),u.clear(),!gs(s,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,s){for(const o of e)o&&(o.createColumns(t,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(this.lastPivotOrder)},s),o.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(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:s}=this.beans,o=this.isPivotMode()&&!this.showingPivotResult,i=t?.isSelectionColumnEnabled(),n=s.get("rowNumbers"),r=e?.columns;return this.cols.list.filter(l=>{const c=ol(l);if(o){const d=r?.includes(l);return c||d||i&&Yt(l)||n&&zt(l)}else return c||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,s){mt(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=t.filter(u=>e.map[u.getId()]!=null);if(s.length===0)return;if(s.length===e.list.length){e.list=s;return}const o=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:o(h):!1};if(!s.some(u=>o(u))){const u=new Set(s);for(const h of e.list)u.has(h)||s.push(h);e.list=s;return}const i=new Map;for(let u=0;u<s.length;u++){const h=s[u];i.set(h,u)}const n=e.list.filter(u=>!i.has(u));if(n.length===0){e.list=s;return}const r=(u,h)=>{const g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let f=null,m=null;for(const v of g.getChildren())if(!(v===h||v===u)){if(v instanceof Ws){const w=i.get(v);if(w==null)continue;(f==null||f<w)&&(f=w,m=v);continue}v.forEachLeafColumn(w=>{const b=i.get(w);b!=null&&(f==null||f<b)&&(f=b,m=w)})}return m??r(u,g)},a=[],l=new Map;for(const u of n){const h=r(u,null);if(h==null){a.push(u);continue}const g=l.get(h);g===void 0?l.set(h,u):Array.isArray(g)?g.push(u):l.set(h,[g,u])}const c=new Array(e.list.length);let d=c.length-1;for(let u=a.length-1;u>=0;u--)c[d--]=a[u];for(let u=s.length-1;u>=0;u--){const h=s[u],g=l.get(h);if(g)if(Array.isArray(g))for(let f=g.length-1;f>=0;f--){const m=g[f];c[d--]=m}else c[d--]=g;c[d--]=h}e.list=c}positionLockedCols(e){e.list=vh(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}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,t);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=ao(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){hn(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,groupHierarchyColSvc:i}=this.beans;Io(this.colDefCols?.list,e),Io(s?.columns?.list,e),Io(o?.columns?.list,e),Io(i?.columns?.list,e),Io(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)}getColById(e){return this.cols?.map[e]??null}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 a=0;a<o.length;a++)if($o(o[a],e))return o[a];const{autoColSvc:i,selectionColSvc:n,groupHierarchyColSvc:r}=this.beans;return i?.getColumn(e)??n?.getColumn(e)??r?.getColumn(e)??null}},xh=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}},Eo=class extends T{};function mi(e,t,s){return s&&e.addDestroyFunc(()=>t.destroyBean(s)),s??e}var q=null;function bc(e){return typeof e?.getGui=="function"}var Ci=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.indexOf(" ")>=0){const o=(e||"").split(" ");if(o.length>1){for(const i of o)this.toggleCss(i,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},tb=0,vi=class extends It{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=tb++,this.cssManager=new Ci(()=>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;for(const t of this.css??[])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(Wu):null}applyElementsToComponent(e,t,s,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const i=this[t];if(i===q)this[t]=o??e;else{const n=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);for(const o of s){if(!(o instanceof HTMLElement))continue;const i=this.createComponentFromElement(o,n=>{const r=n.getGui();if(r)for(const a of o.attributes??[])r.setAttribute(a.name,a.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 a=null;if(r){const l=s&&i?s[i]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(e,i,s,a),a}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());for(const s of e)s.setAttribute("tabindex",t.toString())}setTemplate(e,t,s){let o;typeof e=="string"||e==null?o=Ka(e):o=fi(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),Za(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;Ow(this.eGui,e,{skipAriaHidden:s})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:s}=t;Se(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))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},Re=class extends vi{};function Fh(e){return typeof e=="object"&&!!e.component}function sb(e,t){return new de(s=>{s(window.setInterval(e,t))})}var de=class Vo{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 Vo(s=>{let o=t.length;const i=new Array(o);t.forEach((n,r)=>{n.then(a=>{i[r]=a,o--,o===0&&s(i)})})}):Vo.resolve()}static resolve(t=null){return new Vo(s=>s(t))}then(t){return new Vo(s=>{this.status===1?s(t(this.resolution)):this.waiters.push(o=>s(t(o)))})}onDone(t){this.status=1,this.resolution=t;for(const s of this.waiters)s(t)}onReject(t){}};function ob(e){return e?e.prototype&&"getGui"in e.prototype:!1}function Eh(e,t,s,o){const{name:i}=s;let n,r,a,l,c,d;if(t){const u=t,h=u[i+"Selector"],g=h?h(o):null,f=m=>{typeof m=="string"?n=m:m!=null&&m!==!0&&(e.isFrameworkComponent(m)?a=m:r=m)};g?(f(g.component),l=g.params,c=g.popup,d=g.popupPosition):f(u[i])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var ib=class extends T{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:a,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:u,popupPositionFromSelector:h}=Eh(this.beans.frameworkOverrides,e,t,o),g,f;const m=S=>{const R=this.registry.getUserComponent(n,S);R&&(l=R.componentFromFramework?void 0:R.component,c=R.componentFromFramework?R.component:void 0,g=R.params,f=R.processParams)};if(a!=null&&m(a),l==null&&c==null&&s!=null&&m(s),l&&r&&!ob(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!c){const{validation:S}=this.beans;i&&(a!==s||!s)?a?S?.isProvidedUserComp(a)||pe(50,{compName:a}):s?S||pe(260,{...this.gos.getModuleErrorParams(),propName:n,compName:s}):pe(216,{name:n}):s&&!S&&pe(146,{comp:s});return}const v=this.mergeParams(e,t,o,d,g,f),w=l==null,b=l??c;return{componentFromFramework:w,componentClass:b,params:v,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(b,w,v,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?de.resolve(n):r.then(()=>n)}mergeParams(e,t,s,o=null,i,n){const r={...s,...i},l=e?.[t.name+"Params"];if(typeof l=="function"){const c=l(s);Ke(r,c)}else typeof l=="object"&&Ke(r,l);return Ke(r,o),n?n(r):r}},nb={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},rb={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},ab={name:"headerComponent",optionalMethods:["refresh"]},lb={name:"innerHeaderComponent"},cb={name:"innerHeaderGroupComponent"},db={name:"headerGroupComponent"},ub={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},hb={name:"loadingCellRenderer",cellRenderer:!0},gb={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},pb={name:"loadingOverlayComponent",optionalMethods:["refresh"]},fb={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},mb={name:"tooltipComponent"},il={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Cb={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},vb={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},wb={name:"loadingCellRenderer",cellRenderer:!0},bb={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Sb={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function yb(e,t){return e.getCompDetailsFromGridOptions(rb,"agDragAndDropImage",t,!0)}function Rb(e,t,s){return e.getCompDetails(t,ab,"agColumnHeader",s)}function xb(e,t,s){return e.getCompDetails(t,lb,void 0,s)}function Fb(e,t){const s=t.columnGroup.getColGroupDef();return e.getCompDetails(s,db,"agColumnGroupHeader",t)}function Eb(e,t,s){return e.getCompDetails(t,cb,void 0,s)}function Db(e,t){return e.getCompDetailsFromGridOptions(vb,void 0,t,!0)}function Pb(e,t){return e.getCompDetailsFromGridOptions(wb,"agLoadingCellRenderer",t,!0)}function Tb(e,t){return e.getCompDetailsFromGridOptions(bb,"agGroupRowRenderer",t,!0)}function Mb(e,t){return e.getCompDetailsFromGridOptions(Sb,"agDetailCellRenderer",t,!0)}function Sc(e,t,s){return e.getCompDetails(t,ub,void 0,s)}function yc(e,t,s){return e.getCompDetails(t,hb,"agSkeletonCellRenderer",s,!0)}function Dh(e,t,s){return e.getCompDetails(t,gb,"agCellEditor",s,!0)}function Ib(e,t,s,o){const i=t.filter;return Fh(i)&&(t={filter:i.component,filterParams:t.filterParams}),e.getCompDetails(t,il,o,s,!0)}function kb(e,t,s){return e.getCompDetails(t,nb,"agDateInput",s,!0)}function Ab(e,t){return e.getCompDetailsFromGridOptions(pb,"agLoadingOverlay",t,!0)}function Lb(e,t){return e.getCompDetailsFromGridOptions(fb,"agNoRowsOverlay",t,!0)}function Ob(e,t){return e.getCompDetails(t.colDef,mb,"agTooltipComponent",t,!0)}function Hb(e,t,s,o){return e.getCompDetails(t,Cb,o,s)}function Ph(e,t){return Eh(e,t,il)}function nr(e,t,s){return e.mergeParams(t,il,s)}function ci(e){const t=e;return t?.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}function Nb(e){return typeof e=="object"&&!!e.getComp}var E={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"},nl=class extends vi{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e?.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},rr,ar,lr,cr,oa,ia,dr;function ps(){return rr===void 0&&(rr=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),rr}function Th(){return ar===void 0&&(ar=/(firefox)/i.test(navigator.userAgent)),ar}function Mh(){return lr===void 0&&(lr=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),lr}function Ps(){return cr===void 0&&(cr=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),cr}function na(e){if(!e)return null;const t=e.tabIndex,s=e.getAttribute("tabIndex");return t===-1&&(s===null||s===""&&!Th())?null:t.toString()}function Gb(){if(dr!==void 0)return dr;if(!document.body)return-1;let e=1e6;const t=Th()?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 s.remove(),dr=e,e}function Vb(){return ia==null&&Ih(),ia}function Ih(){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.remove(),s!=null&&(ia=s,oa=s===0)}function kh(){return oa==null&&Ih(),oa}var rl="T",Bb=new RegExp(`[${rl} ]`),zb=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${rl}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function xt(e,t){return e.toString().padStart(t,"0")}function it(e,t=!0,s=rl){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(i=>xt(i,2)).join("-");return t&&(o+=s+[e.getHours(),e.getMinutes(),e.getSeconds()].map(i=>xt(i,2)).join(":")),o}function Fi(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),xt(e.getDate(),2),xt(e.getHours(),2),`:${xt(e.getMinutes(),2)}`,`:${xt(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,xt(e.getDate(),2)].map(String):null}var ur=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},Rc=["January","February","March","April","May","June","July","August","September","October","November","December"],hr=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function ra(e,t){if(t==null)return it(e,!1);const s=xt(e.getFullYear(),4),o={YYYY:()=>s.slice(s.length-4,s.length),YY:()=>s.slice(s.length-2,s.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>Rc[e.getMonth()],MMM:()=>Rc[e.getMonth()].slice(0,3),MM:()=>xt(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${ur(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${ur(e.getDate())}`,DD:()=>xt(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>hr[e.getDay()],ddd:()=>hr[e.getDay()].slice(0,3),dd:()=>hr[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${ur(e.getDay())}`,d:()=>`${e.getDay()}`},i=new RegExp(Object.keys(o).join("|"),"g");return t.replace(i,n=>n in o?o[n]():n)}function Ui(e,t=!1){return!!Je(e,t)}function Wb(e){return Ui(e,!0)}function Je(e,t=!1,s){if(!e||!s&&!zb.test(e))return null;const[o,i]=e.split(Bb);if(!o)return null;const n=o.split("-").map(g=>Number.parseInt(g,10));if(n.filter(g=>!isNaN(g)).length!==3)return null;const[r,a,l]=n,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!i&&t)return null;if(!i||i==="00:00:00")return c;const[d,u,h]=i.split(":").map(g=>Number.parseInt(g,10));if(d>=0&&d<24)c.setHours(d);else if(t)return null;if(u>=0&&u<60)c.setMinutes(u);else if(t)return null;if(h>=0&&h<60)c.setSeconds(h);else if(t)return null;return c}function aa(e){const{inputValue:t,allSuggestions:s,hideIrrelevant:o,filterByPercentageOfBestMatch:i}=e;let n=(s??[]).map((l,c)=>({value:l,relevance:_b(t,l),idx:c}));if(n.sort((l,c)=>l.relevance-c.relevance),o&&(n=n.filter(l=>l.relevance<Math.max(l.value.length,t.length))),n.length>0&&i&&i>0){const c=n[0].relevance*i;n=n.filter(d=>c-d.relevance<0)}const r=[],a=[];for(const l of n)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function _b(e,t){e.length<t.length&&([e,t]=[t,e]);let s=[],o=[];const i=e.length,n=t.length;for(let a=0;a<=n;a++)s[a]=a;let r=0;for(let a=1;a<=i;a++){o[0]=a;for(let l=1;l<=n;l++){const c=e[a-1],d=t[l-1];if(c.toLocaleLowerCase()===d.toLocaleLowerCase())++r,c===d&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<i/2-10&&++r,o[l]=s[l-1];else{const u=o[l-1],h=s[l],g=s[l-1];o[l]=1+Math.min(u,h,g)}}[s,o]=[o,s]}return s[n]/(r+1)}function Ah(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}var la=!1,fn=0;function Ub(e){fn>0||(e.addEventListener("keydown",mn),e.addEventListener("mousedown",mn))}function jb(e){fn>0||(e.removeEventListener("keydown",mn),e.removeEventListener("mousedown",mn))}function mn(e){const t=la,s=e.type==="keydown";s&&(e.ctrlKey||e.metaKey||e.altKey)||t!==s&&(la=s)}function $b(e){const t=Le(e);return Ub(t),fn++,()=>{fn--,jb(t)}}function Kb(){return la}function lo(e,t,s=!1){const o=Lw;let i=Nu;t&&(i+=", "+t),s&&(i+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(l=>$t(l)),r=Array.prototype.slice.apply(e.querySelectorAll(i));return r.length?((l,c)=>l.filter(d=>c.indexOf(d)===-1))(n,r):n}function Hs(e,t=!1,s=!1,o=!1){const i=lo(e,o?".ag-tab-guard":null,s),n=t?fe(i):i[0];return n?(n.focus({preventScroll:!0}),!0):!1}function _s(e,t,s,o){const i=lo(t,s?':not([tabindex="-1"])':null),n=ye(e);let r;s?r=i.findIndex(l=>l.contains(n)):r=i.indexOf(n);const a=r+(o?-1:1);return a<0||a>=i.length?null:i[a]}function Lh(e,t=5){let s=0;for(;e&&na(e)===null&&++s<=t;)e=e.parentElement;return na(e)===null?null:e}var qb=".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)}",Yb=class extends vi{constructor(e,t,s){super(t,s),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(qb)}postConstruct(){this.addCss("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;Xe(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Se(t,!1),As(t,"presentation")):(Se(t,!0),As(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:(nn(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return ii(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},Oh=class extends Yb{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.addCss(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==""||ww(e)!==null?oi(e,""):oi(e,t??"")}setAriaLabel(e){return mo(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 Dt(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 Zb(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 ys=class extends Oh{constructor(e,t,s="text",o="input"){super(e,e?.template??Zb(o),[],t),this.inputType=s,this.displayFieldTag=o,this.eLabel=q,this.eWrapper=q,this.eInput=q}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);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.addCss("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(e){this.displayFieldTag==="input"&&(this.inputType=e,st(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return nn(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 st(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return mo(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return ii(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)st(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";st(this.eInput,"autocomplete",t)}return this}},al=class extends ys{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)}},ll={selector:"AG-CHECKBOX",component:al},Qb=class extends al{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},Us=class extends ys{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=V(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=s=>{Ah(s)&&s.key&&!e.test(s.key)&&s.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:s=>{s.clipboardData?.getData("text")?.split("").some(i=>!e.test(i))&&s.preventDefault()}})}},Bn={selector:"AG-INPUT-TEXT-FIELD",component:Us},Xb=class extends ys{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const s=super.setValue(e,t);return this.eInput.value=e,s}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},Jb={selector:"AG-INPUT-TEXT-AREA",component:Xb},cl=class extends Us{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=Number.parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:s,max:o,step:i}=this.config;typeof t=="number"&&this.setPrecision(t),typeof s=="number"&&this.setMin(s),typeof o=="number"&&this.setMax(o),typeof i=="number"&&this.setStep(i)}onWheel(e){ye(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const s=this.precision;if(s==null)return e;if(t){const i=Number.parseFloat(e).toFixed(s);return Number.parseFloat(i).toString()}const o=String(e).split(".");if(o.length>1){if(o[1].length<=s)return e;if(s>0)return`${o[0]}.${o[1].slice(0,s)}`}return o[0]}setMin(e){return this.min===e?this:(this.min=e,st(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,st(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,st(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(s=>super.setValue(s,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,s){if(V(s)){let o=this.isScientificNotation(s);if(o&&this.eInput.validity.valid)return e(s);if(!o){s=this.adjustPrecision(s);const i=this.normalizeValue(s);o=s!=i}if(o)return t(s)}return e(s)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},e0={selector:"AG-INPUT-NUMBER-FIELD",component:cl},t0=class extends Us{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=ps();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){ye(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?it(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,st(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?it(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,st(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,st(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return Je(this.getValue())??void 0}setDate(e,t){this.setValue(it(e??null,this.includeTime),t)}},Hh={selector:"AG-INPUT-DATE-FIELD",component:t0},s0=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",o0="ag-active-item",i0=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),n0=class extends vi{constructor(e,t,s){super(i0(e,t)),this.label=t,this.value=s,this.eText=q}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(o0,e),Hu(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const s=this.getGui();Fw(s,e),xw(s,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>qa(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},r0=class extends vi{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(s0)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case E.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const s=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(s)}break;case E.DOWN:case E.UP:e.preventDefault(),this.navigate(t);break;case E.PAGE_DOWN:case E.PAGE_UP:case E.PAGE_HOME:case E.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:s}=e,o=s??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();Xe(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const s=this.options.findIndex(o=>o.value===e);if(s!==-1){const o=this.options[s];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.listItems[s]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!$t(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const s=this.getGui(),{scrollTop:o,clientHeight:i}=s,{offsetTop:n,offsetHeight:r}=t;(n+r>o+i||n<o)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const s=new n0(this.cssIdentifier,t,e);s.setParentComponent(this);const o=this.createManagedBean(s);this.listItems.push(o),this.getGui().appendChild(o.getGui())}navigate(e){const t=e===E.DOWN;let s;const{listItems:o,highlightedItem:i}=this;if(!i)s=t?o[0]:fe(o);else{let r=o.indexOf(i)+(t?1:-1);r=Math.min(Math.max(r,0),o.length-1),s=o[r]}this.highlightItem(s)}navigateToPage(e){const{listItems:t,highlightedItem:s}=this;if(!s||t.length===0)return;const o=t.indexOf(s),i=this.options.length-1,n=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/n);let a=-1;e===E.PAGE_HOME?a=0:e===E.PAGE_END?a=i:e===E.PAGE_DOWN?a=Math.min(o+r,i):e===E.PAGE_UP&&(a=Math.max(o-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){As(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((s,o)=>{s.setIndex(o+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},a0=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",l0={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},c0=class extends Oh{constructor(e){if(super(e,e?.template||l0,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=q,this.eWrapper=q,this.eDisplayField=q,this.eIcon=q,this.registerCSS(a0),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:s,variableWidth:o,minPickerWidth:i,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,s!=null&&this.setPickerMaxHeight(s),i!=null&&this.setPickerMinWidth(i),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:s,inputWidth:o}=this.config;if(s){const i=this.beans.iconSvc.createIconNoSpan(s);i&&this.eIcon.appendChild(i)}o!=null&&this.setInputWidth(o)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Yr(e,!1),this.ariaRole&&As(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case E.UP:case E.DOWN:case E.ENTER:case E.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case E.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:s,pickerAriaLabelValue:o,modalPicker:i=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:d}=this,u={modal:i,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=Pu(c);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(s,o),anchorToElement:d};e.style.position="absolute";const h=c.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=Ya(tn(d)),a&&(e.style.maxWidth=a)):nn(e,a??tn(d));const f=n??`${$a(h.getPopupParent())}px`;return e.style.setProperty("max-height",f),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:s,gos:o},eWrapper:i,pickerComponent:n}=this,r=o.get("enableRtl")?"right":"left";s.positionPopupByComponent({type:t,eventSource:i,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();Yr(t,e);const s=this.eWrapper.classList;s.toggle("ag-picker-expanded",e),s.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return nn(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},d0=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}",dl=class extends c0{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(d0)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Gi(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:s}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),s&&t==null&&(this.eDisplayField.textContent=s),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new r0("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),s=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",s),Aw(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:o=>{o?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch(t===E.TAB&&this.hidePicker(),t){case E.ENTER:case E.UP:case E.DOWN:case E.PAGE_UP:case E.PAGE_DOWN:case E.PAGE_HOME:case E.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case E.ESCAPE:super.onKeyDown(e);break;case E.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,s){const{listComponent:o,config:{placeholder:i},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!o)return this;if(s||o.setValue(e,!0),o.getValue()===this.getValue())return this;let l=o.getDisplayValue();return l==null&&i&&(l=i),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},u0={selector:"AG-SELECT",component:dl},h0=':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',ul=typeof window!="object"||!window?.document?.fonts?.forEach,wo=(e,t,s,o,i,n)=>{if(ul)return;o&&(e=`@layer ${CSS.escape(o)} { ${e} }`);let r=co.map.get(t);if(r||(r=[],co.map.set(t,r)),r.some(d=>d.css===e))return;const a=document.createElement("style");n&&a.setAttribute("nonce",n),a.dataset.agGlobalCss=s,a.textContent=e;const l={css:e,el:a,priority:i};let c;for(const d of r){if(d.priority>i)break;c=d}if(c){c.el.insertAdjacentElement("afterend",a);const d=r.indexOf(c);r.splice(d+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},Nh=(e,t,s,o)=>{wo(h0,e,"shared",t,0,s),o?.forEach((i,n)=>i.forEach(r=>wo(r,e,n,t,0,s)))},g0=e=>{co.grids.add(e)},p0=e=>{if(co.grids.delete(e),co.grids.size===0){co.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},xc,co=(xc=typeof window=="object"?window:{}).agStyleInjectionState??(xc.agStyleInjectionState={map:new WeakMap,grids:new Set}),qe=e=>new Gh(e),os="$default",f0=0,Gh=class{constructor({feature:e,params:t,modeParams:s={},css:o,cssImports:i}){this.feature=e,this.css=o,this.cssImports=i,this.modeParams={[os]:{...s[os]??{},...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"}-${++f0}`;typeof i=="function"&&(i=i()),i=`:where(.${n}) {
4
+ ${i}
5
+ }
6
+ `;for(const r of this.cssImports??[])i=`@import url(${JSON.stringify(r)});
7
+ ${i}`;o={css:i,class:n}}else o=!1;this._inject=o}return o&&e&&wo(o.css,e,o.class,t,1,s),o?o.class:!1}},m0=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),Vh=e=>`--ag-${m0(e)}`,Mt=e=>`var(${Vh(e)})`,C0=(e,t,s)=>Math.max(t,Math.min(s,e)),v0=e=>{const t=new Map;return s=>{const o=s;return t.has(o)||t.set(o,e(s)),t.get(o)}},yt=e=>({ref:"accentColor",mix:e}),$e=e=>({ref:"foregroundColor",mix:e}),Ge=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),w0=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),Pe={ref:"backgroundColor"},Nt={ref:"foregroundColor"},ut={ref:"accentColor"},Cn={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:$e(.15),chromeBackgroundColor:Ge(.02),browserColorScheme:"light"},b0={...Cn,textColor:Nt,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,focusShadow:{spread:3,color:yt(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:Pe,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:ut,toggleButtonOffBackgroundColor:Ge(.3),toggleButtonSwitchBackgroundColor:Pe,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}}},S0=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],y0=v0(e=>(e=e.toLowerCase(),S0.find(t=>e.endsWith(t.toLowerCase()))??"length")),zn=e=>typeof e=="object"&&e?.ref?Mt(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,hl=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){const t=Mt(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?Mt(e.onto):"transparent"}, ${t} ${C0(e.mix*100,0,100)}%)`}return!1},R0=zn,eo=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:" "+Mt(s)+" ")})`:e&&"ref"in e?Mt(e.ref):!1,x0=zn,ca=(e,t)=>typeof e=="string"?e:e===!0?ca({},t):e===!1?t==="columnBorder"?ca({color:"transparent"},t):"none":e&&"ref"in e?Mt(e.ref):Bh(e.style??"solid")+" "+eo(e.width??{ref:"borderWidth"})+" "+hl(e.color??{ref:"borderColor"}),F0=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?Mt(e.ref):[eo(e.offsetX??0),eo(e.offsetY??0),eo(e.radius??0),eo(e.spread??0),hl(e.color??{ref:"foregroundColor"})].join(" "),Bh=zn,zh=e=>typeof e=="string"?e.includes(",")?e:Fc(e):e&&"googleFont"in e?zh(e.googleFont):e&&"ref"in e?Mt(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),Fc(t))).join(", "):!1,Fc=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),E0=zn,Wh=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?Wh({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?Mt(e.ref):!1,D0=(e,t,s)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&s.warn(104,{value:e,param:t}),`${e}s`):e&&"ref"in e?Mt(e.ref):!1,P0={color:hl,colorScheme:R0,length:eo,scale:x0,border:ca,borderStyle:Bh,shadow:F0,image:Wh,fontFamily:zh,fontWeight:E0,duration:D0},T0=(e,t,s)=>{const o=y0(e);return P0[o](t,e,s)},M0=e=>new _h(e),_h=class Uh{constructor(t,s=[]){this.themeLogger=t,this.parts=s}withPart(t){return typeof t=="function"&&(t=t()),t instanceof Gh?new Uh(this.themeLogger,[...this.parts,t]):(this.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(qe({feature:t}))}withParams(t,s=os){return this.withPart(qe({modeParams:{[s]:t}}))}_startUse({styleContainer:t,cssLayer:s,nonce:o,loadThemeGoogleFonts:i,moduleCss:n}){if(ul)return;k0(),Nh(t,s,o,n);const r=I0(this);if(r.length>0)for(const a of r)i&&A0(a,o);for(const a of this.parts)a.use(t,s,o)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=Ec(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const s={[os]:{...b0}};for(const o of Ec(this.parts))for(const i of Object.keys(o.modeParams)){const n=o.modeParams[i];if(n){const r=s[i]??(s[i]={}),a=new Set;for(const l of Object.keys(n)){const c=n[l];c!==void 0&&(r[l]=c,a.add(l))}if(i===os)for(const l of Object.keys(s)){const c=s[l];if(l!==os)for(const d of a)delete c[d]}}}this._paramsCache=t=s}return t}_getPerInstanceCss(t){const s="##SELECTOR##";let o=this._paramsCssCache;if(!o){let i="",n="";const r=this._getModeParams();for(const l of Object.keys(r)){const c=r[l];if(l!==os){const u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(l):l}"]) & {
8
+ `;i+=u,n+=u}for(const d of Object.keys(c).sort()){const u=c[d],h=T0(d,u,this.themeLogger);if(h===!1)this.themeLogger.error(107,{key:d,value:u});else{const g=Vh(d),f=g.replace("--ag-","--ag-inherited-");i+=` ${g}: var(${f}, ${h});
9
+ `,n+=` ${f}: var(${g});
10
+ `}}l!==os&&(i+=`}
11
+ `,n+=`}
12
+ `)}let a=`${s} {
13
+ ${i}}
14
+ `;a+=`:has(> ${s}):not(${s}) {
15
+ ${n}}
16
+ `,this._paramsCssCache=o=a}return o.replaceAll(s,`:where(.${t})`)}},Ec=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},I0=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()},Dc=!1,k0=()=>{if(!Dc){Dc=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},A0=async(e,t)=>{const s=`@import url('https://${L0}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
17
+ `;wo(s,document.head,`googleFont:${e}`,void 0,0,t)},L0="fonts.googleapis.com",O0=1,H0=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=O0++,e?.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(const t of e.beanClasses){const s=new t;s.beanName?this.beans[s.beanName]=s:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(s)}for(const t of e.derivedBeans??[]){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){return this.initBeans([e],t),e}initBeans(e,t){const s=this.beans;for(const o of e)o.preWireBeans?.(s),o.wireBeans?.(s);for(const o of e)o.preConstruct?.();t&&e.forEach(t);for(const o of e)o.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}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=[],this.destroyCallback?.()}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}},N0=0,G0=class extends It{constructor(){super(...arguments),this.beanName="environment",this.paramsClass=`ag-theme-params-${++N0}`,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){const{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t),this.eStyleContainer=e.get("themeStyleContainer")??(t.getRootNode()===document?document.head:t),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.initVariables(),this.addDestroyFunc(()=>p0(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){const{theme:s}=this;let o;s?o=`${this.paramsClass} ${s._getCssClass()}`:o=this.applyLegacyThemeClasses();for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&e.classList.remove(i);if(o){const i=e.className;e.className=`${i}${i?" ":""}${o}${t?.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let s=!1;for(const o of Array.from(t.classList))o.startsWith("ag-theme-")&&(s=!0,e=e?`${e} ${o}`:o);s&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?wo(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}handleThemeChange(){const{gos:e,theme:t}=this,s=e.get("theme");let o;if(s==="legacy")o=void 0;else{const i=s??this.getDefaultTheme();i instanceof _h?o=i:this.themeError(i)}o!==t&&this.handleNewTheme(o),this.postProcessThemeChange(o,s)}handleNewTheme(e){const{gos:t,eRootDiv:s,globalCSS:o}=this,i=this.getAdditionalCss();if(e){g0(this),Nh(this.eStyleContainer,this.cssLayer,this.styleNonce,i);for(const[r,a]of o)wo(r,this.eStyleContainer,a,this.cssLayer,0,this.styleNonce);o.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:i});let n=this.eParamsStyle;if(!n){n=this.eParamsStyle=fi({tag:"style"});const r=t.get("styleNonce");r&&n.setAttribute("nonce",r),s.appendChild(n)}ul||(n.textContent=e?._getPerInstanceCss(this.paramsClass)||""),this.applyThemeClasses(s),this.fireStylesChangedEvent("themeChanged")}},V0=class extends It{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e){this.dynamicBeans??(this.dynamicBeans={});for(const t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...s){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));const o=this.dynamicBeans[e];if(o==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new o(...s)}},B0=class extends It{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new ks}addListener(e,t,s){this.globalSvc.addEventListener(e,t,s)}removeListener(e,t,s){this.globalSvc.removeEventListener(e,t,s)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},jh=class extends It{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const s="title",o=this.ctrl.getGui();o&&(e!=null&&(e!=""||t)?o.setAttribute(s,e):o.removeAttribute(s))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},z0=1e3,W0=1e3,Pc=100,Tc,Ei=!1,_0=class extends It{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return e==="show"?this.tooltipCtrl.getTooltipShowDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipCtrl.getTooltipHideDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Ps()&&(Ei?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},Pc):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,s=this.tooltipCtrl.getGui(),o=this.tooltipComp?.getGui();this.isInteractingWithTooltip||s.contains(t)||this.interactionEnabled&&o?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Ei)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-Tc<z0}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!V(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const s=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(s,o)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Tc=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const o=t.getGui();this.tooltipComp=t,o.classList.contains("ag-tooltip")||o.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&o.classList.add("ag-tooltip-animate"),this.interactionEnabled&&o.classList.add("ag-tooltip-interactive");const i=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:o,ariaLabel:i("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:r}),this.setEventHandlers(r)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(o,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Le(this.beans),{keydown:r=>{o.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(o,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:o,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=ye(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,s=this.tooltipTrigger===0?W0:0;window.setTimeout(()=>{e(),this.destroyBean(t)},s),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Ei=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Pc)}unlockService(){Ei=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}},U0=class extends jh{constructor(e,t,s){super(e,s),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},Di=0,j0=200,$0=class extends It{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX: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,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:i,eventSource:n,alignSide:r="left",position:a="over",type:l}=e,c=n.getBoundingClientRect(),d=this.getParentRect();this.setAlignedTo(n,t);const u=()=>{let h=c.left-d.left;r==="right"&&(h-=t.offsetWidth-c.width);let g;return a==="over"?(g=c.top-d.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,c,d,e.nudgeY||0)==="under"?g=c.top-d.top+c.height:g=c.top-t.offsetHeight-(o||0)*2-d.top),{x:h,y:g}};this.positionPopup({ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:i,updatePosition:u,postProcessCallback:()=>this.callPostProcessPopup(e,l,t,n,null)})}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;if(!i)return;const n=["right","left","over","above","under"];for(const r of n)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}}positionPopup(e){const{ePopup:t,keepWithinBounds:s,nudgeX:o,nudgeY:i,skipObserver:n,updatePosition:r}=e,a={width:0,height:0},l=(c=!1)=>{let{x:d,y:u}=r();c&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,o&&(d+=o),i&&(u+=i),s&&(d=this.keepXYWithinBounds(t,d,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${d}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!n){const c=Kt(this.beans,t,()=>l(!0));setTimeout(()=>c(),j0)}}getParentRect(){const e=Le(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Vu(t)}keepXYWithinBounds(e,t,s){const o=s===0,i=o?"clientHeight":"clientWidth",n=o?"top":"left",r=o?"height":"width",a=o?"scrollTop":"scrollLeft",l=Le(this.beans),c=l.documentElement,d=this.getPopupParent(),u=e.getBoundingClientRect(),h=d.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),f=d===l.body,m=Math.ceil(u[r]);let w=f?(o?Gu:tn)(c)+c[a]:d[i];f&&(w-=Math.abs(g[n]-h[n]));const b=w-m;return Math.min(Math.max(t,0),Math.max(b,0))}addPopup(e){const{eChild:t,ariaLabel:s,ariaOwns:o,alwaysOnTop:i,positionCallback:n,anchorToElement:r}=e,a=this.getPopupIndex(t);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!i,s,o),c=this.addEventListenersToPopup({...e,wrapperEl:l});return n&&n(),this.addPopupToPopupList(t,l,c,r),{hideFunc:c}}initialisePopupPosition(e){const s=this.getPopupParent().getBoundingClientRect();V(e.style.top)||(e.style.top=`${s.top*-1}px`),V(e.style.left)||(e.style.left=`${s.left*-1}px`)}createPopupWrapper(e,t,s,o){const i=this.getPopupParent(),{environment:n,gos:r}=this.beans,a=fi({tag:"div"});return n.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||As(e,"dialog"),s?mo(e,s):o&&(e.id||(e.id=`popup-component-${Di}`),lc(o,e.id)),a.appendChild(e),i.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,s=Le(t),{wrapperEl:o,eChild:i,closedCallback:n,afterGuiAttached:r,closeOnEsc:a,modal:l,ariaOwns:c}=e;let d=!1;const u=m=>{if(!o.contains(ye(t)))return;m.key===E.ESCAPE&&!this.isStopPropagation(m)&&f({keyboardEvent:m})},h=m=>f({mouseEvent:m}),g=m=>f({touchEvent:m}),f=(m={})=>{const{mouseEvent:v,touchEvent:w,keyboardEvent:b,forceHide:S}=m;!S&&(this.isEventFromCurrentPopup({mouseEvent:v,touchEvent:w},i)||d)||(d=!0,o.remove(),s.removeEventListener("keydown",u),s.removeEventListener("mousedown",h),s.removeEventListener("touchstart",g),s.removeEventListener("contextmenu",h),this.eventSvc.removeListener("dragStarted",h),n&&n(v||w||b),this.removePopupFromPopupList(i,c))};return r&&r({hidePopup:f}),window.setTimeout(()=>{a&&s.addEventListener("keydown",u),l&&(s.addEventListener("mousedown",h),this.eventSvc.addListener("dragStarted",h),s.addEventListener("touchstart",g),s.addEventListener("contextmenu",h))},0),f}addPopupToPopupList(e,t,s,o){this.popupList.push({element:e,wrapper:t,hideFunc:s,instanceId:Di,isAnchored:!!o}),o&&this.setPopupPositionRelatedToElement(e,o),Di=Di+1}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,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&lc(t,null),this.popupList=this.popupList.filter(s=>s.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),s=t.getBoundingClientRect(),{element:o,ePopup:i}=e,n=o.getBoundingClientRect(),r=u=>Number.parseInt(u.substring(0,u.length-1),10),a=(u,h)=>{const g=s[u]-n[u],f=r(i.style[u]);return{initialDiff:g,lastDiff:g,initial:f,last:f,direction:h}},l=a("top",0),c=a("left",1),d=this.beans.frameworkOverrides;return new de(u=>{d.wrapIncoming(()=>{sb(()=>{const h=t.getBoundingClientRect(),g=o.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const m=(v,w)=>{const b=r(i.style[w]);v.last!==b&&(v.initial=b,v.last=b);const S=h[w]-g[w];if(S!=v.lastDiff){const R=this.keepXYWithinBounds(i,v.initial+v.initialDiff-S,v.direction);i.style[w]=`${R}px`,v.last=R}v.lastDiff=S};m(l,"top"),m(c,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}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 a=this.popupList[r];if(Gw(a.element,i))return!0}return this.isElementWithinCustomPopup(i.target)}isElementWithinCustomPopup(e){const t=Le(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 a=[],l=r.length,u=i.classList.contains("ag-always-on-top")||!l?[...n,...r,i]:[...n,i,...r];for(let h=0;h<=o;h++){const g=u[h];if(s[h]===u[h]||g===i)continue;const f=g.querySelectorAll("div");for(const m of f)m.scrollTop!==0&&a.push([m,m.scrollTop]);h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}},K0=class extends nl{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,s=this.getGui();s.textContent=Fo(t);const o=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();s.classList.add(`ag-${o}-tooltip`)}},$h=(e,t)=>{if(t!=null&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},q0=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const s=t.pointerId;if(!$h(e,s))return null;const o={eElement:e,pointerId:s,onLost(i){Z0(o,i)}};return e.addEventListener("lostpointercapture",o.onLost),o},Y0=e=>{if(!e)return;Kh(e);const{eElement:t,pointerId:s}=e;if(t){try{t.releasePointerCapture(s)}catch{}e.eElement=null}},Kh=e=>{const{eElement:t,onLost:s}=e;t&&s&&(t.removeEventListener("lostpointercapture",s),e.onLost=null)},Z0=(e,t)=>{Kh(e);const{eElement:s,pointerId:o}=e;s&&t.pointerId===o&&$h(s,o)},Ys,to,Lt=e=>{if(!to)to=new WeakSet;else if(to.has(e))return!1;return to.add(e),!0},Q0=class extends It{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!Ys?.has(St(this.beans))}hasPointerCapture(){const e=this.drag?.pointerCapture;return!!(e&&this.beans.eRootDiv.hasPointerCapture?.(e.pointerId))}destroy(){this.drag&&this.cancelDrag();const e=this.dragSources;for(const t of e)Mc(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let s=0,o=t.length;s<o;++s){const i=t[s];if(i.params===e){t.splice(s,1),Mc(i);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:s}=e,o=[];let i;if(s){const c=t.style;c&&(i=c.touchAction,c.touchAction="none")}const n={handlers:o,params:e,oldTouchAction:i};this.dragSources.push(n),Vi(o,[t,"pointerdown",c=>this.onPointerDown(e,c),{passive:!1}],[t,"mousedown",c=>this.onMouseDown(e,c)]);const l=this.gos.get("suppressTouch");s&&!l&&Vi(o,[t,"touchstart",d=>this.onTouchStart(e,d),{passive:!1}])}cancelDrag(e){const t=this.drag;e??(e=t?.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){const t=e.type;return(t==="mousemove"||t==="pointermove")&&e.cancelable&&ri(this.beans,e)&&!Wo(pr(e))}initDrag(e,...t){this.drag=e;const s=this.beans,o=a=>this.onScroll(a),i=a=>this.onKeyDown(a),n=St(s),r=Le(s);Vi(e.handlers,[n,"contextmenu",ss],[n,"keydown",i],[r,"scroll",o,{capture:!0}],[r.defaultView||window,"scroll",o],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;Ys?.get(t)===e&&Ys?.delete(t),this.drag=null,Y0(e.pointerCapture),Qa(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const s=this.beans;if(to?.has(t))return;const o=t.pointerType;if(o==="touch"&&(s.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),Wo(pr(t))))||!t.isPrimary||o==="mouse"&&t.button!==0)return;this.destroyDrag();const i=St(s),n=e.eElement,r=t.pointerId,a=new gr(i,e,t,r);Ys??(Ys=new WeakMap),Ys.set(i,a);const l=u=>{u.pointerId===r&&this.onMouseOrPointerMove(u)},c=u=>{u.pointerId===r&&this.onMouseOrPointerUp(u)},d=u=>{u.pointerId===r&&Lt(u)&&this.cancelDrag()};this.initDrag(a,[i,"pointerup",c],[i,"pointercancel",d],[i,"pointermove",l,{passive:!1}],[i,"touchmove",ss,{passive:!1}],[n,"mousemove",ss,{passive:!1}]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Lt(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!Lt(t)||Wo(pr(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){ss(t);return}this.destroyDrag();const o=this.beans,i=St(o),n=new gr(i,e,t.touches[0]),r=c=>this.onTouchMove(c),a=c=>this.onTouchUp(c),l=t.target??e.eElement;this.initDrag(n,[St(o),"touchmove",ss,{passive:!1}],[l,"touchmove",r,{passive:!0}],[l,"touchend",a,{passive:!0}],[l,"touchcancel",a,{passive:!0}]),e.dragStartPixels===0&&this.onMove(n.start)}onMouseDown(e,t){if(t.button!==0||to?.has(t)||this.isPointer())return;const s=this.beans;this.destroyDrag();const o=new gr(St(s),e,t),i=a=>this.onMouseOrPointerMove(a),n=a=>this.onMouseOrPointerUp(a),r=St(s);this.initDrag(o,[r,"mousemove",i],[r,"mouseup",n]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Lt(t)}onScroll(e){if(!Lt(e))return;const t=this.drag,s=t?.lastDrag;s&&this.dragging&&t.params?.onDragging(s)}onMouseOrPointerMove(e){Lt(e)&&(ps()&&Le(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&ss(e),this.onMove(e))}onTouchMove(e){const t=this.drag;if(!t||!Lt(e))return;const s=Uo(t.start,e.touches);s&&(e.preventDefault(),this.onMove(s))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const s=t.params;if(!this.dragging){const o=t.start,n=s.dragStartPixels??4;if(Uu(e,o,n)||(this.dragging=!0,s.capturePointer&&(t.pointerCapture=q0(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:s.eElement}),s.onDragStart(o),this.drag!==t)||(s.onDragging(o),this.drag!==t))return}s.onDragging(e)}onTouchUp(e){const t=this.drag;t&&Lt(e)&&this.onUp(Uo(t.start,e.changedTouches))}onMouseOrPointerUp(e){Lt(e)&&this.onUp(e)}onUp(e){const t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,t.params.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===E.ESCAPE&&this.cancelDrag()}},Mc=e=>{Qa(e.handlers);const t=e.oldTouchAction;if(t!=null){const s=e.params.eElement.style;s&&(s.touchAction=t)}},gr=class{constructor(e,t,s,o=null){this.rootEl=e,this.params=t,this.start=s,this.pointerId=o,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},pr=e=>{const t=e.target;return t instanceof Element?t:null},X0=class extends It{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageParent=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.lastDropTarget=null}addDragSource(e,t=!1){const s={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:o=>this.onDragStart(e,o),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(s),this.beans.dragSvc.addDragSource(s)}setDragImageCompIcon(e,t=!1){const s=this.dragImageComp;s&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,s.setIcon(e,t))}removeDragSource(e){const{dragSourceAndParamsList:t,beans:s}=this,o=t.find(i=>i.dragSource===e);o&&(s.dragSvc?.removeDragSource(o),Ct(t,o))}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:s}=this,o=s.dragSvc;for(const i of e)o?.removeDragSource(i);e.length=0,t.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();const s=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-s.left,this.dragInitialSourcePointerOffsetY=t.clientY-s.top,e.onDragStarted?.(),this.createAndUpdateDragImageComp(e)}onDragStop(e){const{dragSource:t,lastDropTarget:s}=this;if(t?.onDragStopped?.(),s){const o=this.dropTargetEvent(s,e,!1);s.onDragStop?.(o)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:s}=this;if(e?.onDragCancelled?.(),t&&s){const o=this.dropTargetEvent(t,s,!1);t.onDragCancel?.(o)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const s=this.findCurrentDropTarget(e),{lastDropTarget:o,dragSource:i,dragItem:n}=this;let r=!1;if(s!==o){if(r=!0,o){const a=this.dropTargetEvent(o,e,t);o.onDragLeave?.(a)}if(o!==null&&!s?this.handleExit(i,n):o===null&&s&&this.handleEnter(i,n),s){const a=this.dropTargetEvent(s,e,t);s.onDragEnter?.(a)}this.lastDropTarget=s}else if(s){const a=this.dropTargetEvent(s,e,t);s.onDragging?.(a),a?.changed&&(r=!0)}this.lastMouseEvent=e,r&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageParent=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,s=[[e.getContainer()]];return t?s.concat(t):s}isMouseOnDropTarget(e,t){const s=this.getAllContainersFromDropTarget(t);let o=!1;const i=(a,l)=>{for(const c of l){const{width:d,height:u,left:h,right:g,top:f,bottom:m}=c.getBoundingClientRect();if(d===0||u===0)return!1;const v=a.clientX>=h&&a.clientX<g,w=a.clientY>=f&&a.clientY<m;if(!v||!w)return!1}return!0};for(const a of s)if(i(e,a)){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){const t=this.dropTargets.filter(n=>this.isMouseOnDropTarget(e,n)),s=t.length;if(s===0)return null;if(s===1)return t[0];const i=St(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of i)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(l=>l).indexOf(n)!==-1)return r;return null}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.find(t=>t.external&&t.getContainer()===e)||null}dropTargetEvent(e,t,s){const{dragSource:o,dragItem:i,lastDraggingEvent:n,lastMouseEvent:r,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,c=e.getContainer(),d=c.getBoundingClientRect(),{clientX:u,clientY:h}=t,g=u-(r?.clientX||0),f=h-(r?.clientY||0),m=this.createEvent({event:t,x:u-d.left,y:h-d.top,vDirection:f>0?"down":f<0?"up":null,hDirection:g<0?"left":g>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:o,fromNudge:s,dragItem:i,dropZoneTarget:c,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=m,m}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&_w(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){const t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then(s=>{if(t!==this.dragImageCompPromise||!this.lastMouseEvent||!this.isAlive()){this.destroyBean(s);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const o=this.dragImageComp;o!==s&&(this.dragImageComp=s,this.removeDragImageComp(o)),s&&(this.appendDragImageComp(s),this.updateDragImageComp())})}appendDragImageComp(e){const t=e.getGui(),s=t.style;s.position="absolute",s.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(s.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),s.top="20px",s.left="20px";const o=ja(this.beans);this.dragImageParent=o,o?o.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:s,lastDraggingEvent:o,dragImageLastLabel:i}=this;if(!e)return;this.setDragImageCompIcon(s?.getIconName?.(o)??null);let n=t?.dragItemName;typeof n=="function"&&(n=n(o)),n||(n=""),i!==n&&(this.dragImageLastLabel=n,e.setLabel(n))}},J0=class extends X0{createEvent(e){return Y(this.gos,e)}createDragImageComp(e){const{gos:t,beans:s}=this;return yb(s.userCompFactory,Y(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){H(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const s={getContainer:e,isInterestedIn:o=>o===1||o===0,getIconName:()=>"notAllowed"};this.addDropTarget(s),t.addDestroyFunc(()=>this.removeDropTarget(s))}};function qh(e,t){return e+"_"+t}function Ee(e){return e instanceof di}var di=class extends T{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,this.colIdSanitised=zo(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return qh(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){for(const e of this.displayedChildren)Ee(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=fe(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;for(const t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(const t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(const t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){for(const t of this.displayedChildren??[])ds(t)?e.push(t):Ee(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])ds(t)?e.push(t):Ee(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?.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e?.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(const s of this.children??[]){if(Ee(s)&&!s.displayedChildren?.length)continue;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"})}},da="row-group-",gl="t-",pl="b-",eS=0,us=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=eS++,this.alreadyRendered=!1,this.hovered=!1,this.__selected=!1,this.beans=e}get allLeafChildren(){const e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:s,eventSvc:o}=this.beans,i=this.data;this.data=e,s?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,i,t);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=e;const a=this.sibling.createDataChangedEvent(e,i,t);this.sibling.__localEventService?.dispatchEvent(a)}o.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,i,t)),o.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,s){return{type:"dataChanged",node:this,oldData:t,newData:e,update:s}}getRowIndexString(){return this.rowIndex==null?(pe(13),null):this.rowPinned==="top"?gl+this.rowIndex:this.rowPinned==="bottom"?pl+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=Co(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(da)&&pe(14,{groupPrefix:da})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=e!==null;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,s){this.beans.expansionSvc?.setExpanded(this,e,t,s)}setDataValue(e,t,s){const{colModel:o,valueSvc:i,gos:n,editSvc:r}=this.beans,a=typeof e!="string"?e:o.getCol(e)??o.getColDefCol(e);if(!a)return!1;const l=i.getValueForDisplay(a,this,void 0,void 0,"api").value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:d},data:u,rowIndex:h,rowPinned:g}=this;return d.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:g,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:s}),!1}if(r&&!r.committing){const d=r.setDataValue({rowNode:this,column:a},t,s);if(d!=null)return d}const c=i.setValue(this,a,t,s);return this.dispatchCellChangedEvent(a,t,l),c&&this.pinnedSibling?.dispatchCellChangedEvent(a,t,l),c}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,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(){if(this.footer)return this.sibling.isSelected();const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let s=0,o=t.length;s<o;++s)t[s].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 ks)).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e);const s=this.__localEventService??(this.__localEventService=new ks);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,s);const o=this.frameworkEventListenerService?.wrap(e,t)??t;s.addEventListener(e,o)}removeEventListener(e,t){const s=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,s)}removeLocalListener(e,t){const s=this.__localEventService;s&&(s.removeEventListener(e,t),s.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(H(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?.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){const e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}};function tS(e,t,s){return Y(t,{type:s,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var sS=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_leafs","childStore","oldRowTop","sticky","treeNodeFlags","treeParent"]),oS=(e,t)=>{const s=new us(t);for(const o of Object.keys(e))sS.has(o)||(s[o]=e[o]);return s.oldRowTop=null,s},Yh=e=>{for(;e?.length;){const t=e[0];if(t.data)return t;e=t.childrenAfterGroup}},Zh={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},iS=new Set(Object.values(Zh));function Jt(e,t){const s=e.filterUi;if(!s)return null;if(s.created)return s.promise;if(t)return null;const o=s.create(s.refreshed),i=s;return i.created=!0,i.promise=o,o}function nS(e,t,s,o,i,n,r){return t.refresh?.({...s,model:o,source:n,additionalEventAttributes:r}),e().then(a=>{if(a){const{filter:l,filterParams:c}=a;Qh(l,c,o,i,n,r)}})}function Qh(e,t,s,o,i,n){e?.refresh?.({...t,model:s,state:o,source:i,additionalEventAttributes:n})}function Xh(e,t,s){const o=e();o?.created&&o.promise.then(i=>{const n=t();Qh(i,o.filterParams,n,s()??{model:n},"ui")})}function Ic(e,t,s,o,i,n,r){let a,l=!1,c;switch(e){case"apply":{const d=o();c=d?.model??null,r&&(c=r(c)),a={state:d?.state,model:c},l=!0;break}case"clear":{a={model:null};break}case"reset":{a={model:null},l=!0,c=null;break}case"cancel":{a={model:s()};break}}i(a),l?n(c):Xh(t,s,o)}function Ae(e,t){return e[t]??null}function Ye(e){return fi(e)}function rS(e){return{tag:"div",cls:e}}var aS=class extends Re{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(rS(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const s=this.buttons;if(this.buttons=e,s===e)return;const o=this.getGui();Xe(o);let i;this.destroyListeners();const n=document.createDocumentFragment(),r=this.className,a=({type:c,label:d})=>{const u=w=>{this.dispatchLocalEvent({type:c,event:w})};["apply","clear","reset","cancel"].includes(c)||H(75);const h=c==="apply",f=Ye({tag:"button",attrs:{type:h&&t?"submit":"button"},ref:`${c}FilterButton`,cls:`ag-button ag-standard-button ${r}-button${h?" "+r+"-apply-button":""}`,children:d});this.activateTabIndex([f]),h&&(i=f);const m=w=>{w.key===E.ENTER&&(w.preventDefault(),u(w))},v=this.listeners;f.addEventListener("click",u),v.push(()=>f.removeEventListener("click",u)),f.addEventListener("keydown",m),v.push(()=>f.removeEventListener("keydown",m)),n.append(f)};for(const c of e)a(c);this.eApply=i;const l=this.validationTooltipFeature;i&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!i&&l&&(this.validationTooltipFeature=this.destroyBean(l)),o.append(n)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const s=this.eApply;s&&(ii(s,e===!1),this.validationMessage=t??null,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},lS={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`};function is(e,t,s){return jw(e,lS,t,s)}function fl(e,t){const{debounceMs:s}=e;return Wn(e)?(s!=null&&H(71),0):s??t}function Wn(e){return(e.buttons?.indexOf("apply")??-1)>=0}var cS=class extends Re{constructor(e,t,s,o,i,n){super(),this.column=e,this.wrapper=t,this.eventParent=s,this.updateModel=o,this.isGlobalButtons=i,this.enableGlobalButtonCheck=n,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,s=t,o=s.useForm,i=o?"form":"div";this.setTemplate({tag:i,cls:"ag-filter-wrapper"}),o&&this.addManagedElementListeners(this.getGui(),{submit:n=>{n?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=s,this.resetButtonsPanel(s),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:n,params:r})=>{n===this.column&&this.resetButtonsPanel(r,this.params)},filterStateChanged:({column:n,state:r})=>{n===this.column&&this.eButtons?.updateValidity(r.valid!==!1)},filterAction:({column:n,action:r,event:a})=>{n===this.column&&this.afterAction(r,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:n})=>{if(n!==this.isGlobalButtons){this.isGlobalButtons=n;const r=this.params;this.resetButtonsPanel(r,r,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,s){const{buttons:o,readOnly:i}=t??{},{buttons:n,readOnly:r,useForm:a}=e;if(!s&&i===r&&si(o,n))return;const l=n&&n.length>0&&!e.readOnly&&!this.isGlobalButtons;let c=this.eButtons;if(l){const d=n.map(u=>{const h=`${u}Filter`;return{type:u,label:is(this,h)}});if(this.applyActive=Wn(this.params),!c){c=this.createBean(new aS),this.appendChild(c.getGui());const u=this.column,h=g=>({event:f})=>{this.updateModel(u,g,{fromButtons:!0}),this.afterAction(g,f)};c?.addManagedListeners(c,{apply:h("apply"),clear:h("clear"),reset:h("reset"),cancel:h("cancel")}),this.eButtons=c}c.updateButtons(d,a)}else this.applyActive=!1,c&&(as(c.getGui()),this.eButtons=this.destroyBean(c))}close(e){const t=this.hidePopup;if(!t)return;const s=e,o=s?.key;let i;(o===E.ENTER||o===E.SPACE)&&(i={keyboardEvent:s}),t(i),this.hidePopup=null}afterAction(e,t){const{params:s,applyActive:o}=this,i=s?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),i&&o&&this.close(t);break}case"reset":{i&&o&&this.close();break}case"cancel":{i&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===E.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},dS={tag:"div",cls:"ag-filter"},uS=class extends Re{constructor(e,t,s){super(dS),this.column=e,this.source=t,this.enableGlobalButtonCheck=s,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??de.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:s,beans:{colFilter:o}}=this,i=o.getFilterUiForDisplay(t)??null;this.wrapper=i,i?.then(n=>{if(!n)return;const{isHandler:r,comp:a}=n;let l;if(r){const c=!!this.enableGlobalButtonCheck,d=this.createBean(new cS(t,n,o,o.updateModel.bind(o),c&&o.isGlobalButtons,c));this.comp=d,l=d.getGui()}else l=a.getGui(),V(l)||H(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:s,eGui:this.getGui()}):a.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:s}=e;(t==="api"||t==="paramsUpdated")&&s.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(Xe(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},kc={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Ac=["january","february","march","april","may","june","july","august","september","october","november","december"];function hS(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function Lc(e){return e instanceof Date&&!isNaN(e.getTime())}var ua={number:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:Lc}),dateString:({dataTypeDefinition:e})=>({comparator:(t,s)=>{const o=e.dateParser(s);return s==null||o<t?-1:o>t?1:0},isValidDate:t=>typeof t=="string"&&Lc(e.dateParser(t))}),dateTime:e=>ua.date(e),dateTimeString:e=>ua.dateString(e),object:()=>{},text:()=>{}},ha={number:()=>({comparator:hS}),boolean:({t:e})=>({valueFormatter:t=>V(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:s=>{const o=e(s);return V(o)?o:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(s,o)=>{if(s==="NaN")return t("invalidDate","Invalid Date");if(o===1&&s!=null){const i=Ac[Number(s)-1];return t(i,kc[i])}return s??t("blanks","(Blanks)")},treeListPathGetter:s=>Fi(s,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:s})=>({valueFormatter:o=>{const i=e(o);return V(i)?i:s("blanks","(Blanks)")},treeList:!0,treeListPathGetter:o=>Fi(t.dateParser(o??void 0),!1),treeListFormatter:(o,i)=>{if(i===1&&o!=null){const n=Ac[Number(o)-1];return s(n,kc[n])}return o??s("blanks","(Blanks)")}}),dateTime:e=>{const t=ha.date(e);return t.treeListPathGetter=Fi,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,s=ha.dateString(e);return s.treeListPathGetter=o=>Fi(t(o??void 0)),s},object:({formatValue:e,t})=>({valueFormatter:s=>{const o=e(s);return V(o)?o:t("blanks","(Blanks)")}}),text:()=>{}};function gS(e,t,s,o,i,n,r){let a=t,l=s;const c=e==="agSetColumnFilter";!l&&o.baseDataType==="object"&&!c&&(l=({column:g,node:f})=>i({column:g,node:f,value:n.valueSvc.getValue(g,f)}));const u=(c?ha:ua)[o.baseDataType],h=u({dataTypeDefinition:o,formatValue:i,t:r});return a=typeof t=="object"?{...h,...t}:h,{filterParams:a,filterValueGetter:l}}var pS={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},fS={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function mS(e,t=!1){return(t?fS:pS)[e??"text"]}var Jh="ag-resizer-wrapper",es=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),CS={tag:"div",cls:Jh,children:[es("eTopLeft","topLeft"),es("eTop","top"),es("eTopRight","topRight"),es("eRight","right"),es("eBottomRight","bottomRight"),es("eBottom","bottom"),es("eBottomLeft","bottomLeft"),es("eLeft","left")]},vS=class extends T{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:s}=this.offsetParent,o=s/2-this.getWidth()/2,i=t/2-this.getHeight()/2;this.offsetElement(o,i,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:s,minWidth:o,width:i,minHeight:n,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,d=0;const u=$t(this.element);if(u){const h=this.findBoundaryElement(),g=window.getComputedStyle(h);if(g.minWidth!=null){const f=h.offsetWidth-this.element.offsetWidth;d=Number.parseInt(g.minWidth,10)-f}if(g.minHeight!=null){const f=h.offsetHeight-this.element.offsetHeight;c=Number.parseInt(g.minHeight,10)-f}}if(this.minHeight=n||c,this.minWidth=o||d,i&&this.setWidth(i),r&&this.setHeight(r),(!i||!r)&&this.refreshSize(),t)this.center(e);else if(a||l)this.offsetElement(a,l,e);else if(u&&s){let h=this.boundaryEl,g=!0;if(h||(h=this.findBoundaryElement(),g=!1),h){const f=Number.parseFloat(h.style.top),m=Number.parseFloat(h.style.left);g?this.offsetElement(isNaN(m)?0:m,isNaN(f)?0:f,e):this.setPosition(m,f)}}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.includes("%"))_o(s,e),e=Gu(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?_o(s,e):(s.style.height=`${e}px`,s.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:Number.parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight: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 a=0;if(t){const c=this.element.parentElement;if(c){const{bottom:d}=c.getBoundingClientRect();a=d-o.bottom}}return s+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:s}=this.config;let o=!1;if(typeof e=="string"&&e.includes("%"))Dt(t,e),e=tn(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?Dt(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,s){const{forcePopupParentAsOffsetParent:o}=this.config,i=o?this.boundaryEl:this.element;i&&(this.popupSvc?.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:s}),this.setPosition(Number.parseFloat(i.style.left),Number.parseFloat(i.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?.(),this.resizeObserverSubscriber=Kt(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,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!s,!!i,r)?0:r,c=this.shouldSkipY(t,!!o,n,a)?0:a;return{movementX:l,movementY:c}}shouldSkipX(e,t,s,o){const i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:i.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return l?!0:(t?l=o<0&&e.clientX>a+n.left||o>0&&e.clientX<a+n.left:s?l=o<0&&e.clientX>r.right||o>0&&e.clientX<a+n.left:l=o<0&&e.clientX>r.right||o>0&&e.clientX<r.right,l)}shouldSkipY(e,t,s=0,o){const i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:i.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return l?!0:(t?l=o<0&&e.clientY>a+n.top+s||o>0&&e.clientY<a+n.top:l=o<0&&e.clientY>r.bottom||o>0&&e.clientY<r.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(Ye(CS)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${Jh}`)?.remove(),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup: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,a=this.minWidth||0;if(n){const l=window.getComputedStyle(i);l.minHeight&&(r=Number.parseInt(l.minHeight,10)),l.minWidth&&(a=Number.parseInt(l.minWidth,10))}else r=i.offsetHeight,a=i.offsetWidth;t+=r,s+=a}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,a=i||r,l=n||o,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:r,isTop:o}),u=this.position.x,h=this.position.y;let g=0,f=0;if(a&&c){const m=r?-1:1,v=this.getWidth(),w=v+c*m;let b=!1;r&&(g=v-w,(u+g<=0||w<=this.minWidth)&&(b=!0,g=0)),b||this.setWidth(w)}if(l&&d){const m=o?-1:1,v=this.getHeight(),w=v+d*m;let b=!1;o?(f=v-w,(h+f<=0||w<=this.minHeight)&&(b=!0,f=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&v<w&&this.getMinSizeOfSiblings().height+w>this.element.parentElement.offsetHeight&&(b=!0),b||this.setHeight(w)}this.updateDragStartPosition(e.clientX,e.clientY),((t||s)&&g||f)&&this.offsetElement(u+g,h+f)}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()}},eg="__ag_Grid_Stop_Propagation";function Ns(e){e[eg]=!0}function _t(e){return e[eg]===!0}var wS="ag-focus-managed",Do=class extends T{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:s=>{if(s.defaultPrevented)return;const o=_s(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(wS),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||_t(t))return;const{callbacks:s}=this;if(s.shouldStopEventPropagation(t)){Ns(t);return}t.key===E.TAB?s.onTabKeyDown(t):s.handleKeyDown&&s.handleKeyDown(t)}})}},bS=class extends Re{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new Do(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new vS(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}refresh(e){const t=e,s=this.params;this.params=t,t.source==="colDef"&&this.updateParams(t,s);const i=t.state,n=this.state;return this.state=i,(i.model!==n.model||i.state!==n.state)&&this.setModelIntoUi(i.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=Wn(e),this.setupApplyDebounced()}doesFilterPass(e){H(283);const{getHandler:t,model:s,column:o}=this.params;return t().doesFilterPass({...e,model:s,handlerParams:this.beans.colFilter.getHandlerParams(o)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return H(284),this.params.model!=null}setupApplyDebounced(){const e=fl(this.params,this.defaultDebounceMs),t=Ve(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return H(285),this.params.model}setModel(e){H(286);const{beans:t,params:s}=this;return t.colFilter.setModelForColumnLegacy(s.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:s}=this,o=!this.areModelsEqual(t.model,s.model);return o&&t.onAction("apply",e),o}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const s=this.getModelFromUi(),o={model:s,state:this.getState(),valid:this.canApply(s)};this.state=o;const i=this.params;i.onStateChange(o),i.onUiChange(this.getUiChangeEventParams()),this.gos.get("enableFilterHandlers")||this.eventSvc.dispatchEvent({type:"filterModified",column:i.column,filterInstance:this}),e??(e=this.applyActive?void 0:"debounce"),e==="immediately"?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e==="debounce"&&this.applyDebounced()}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:s}=this;if(!t)return;const o=e==="floatingFilter"||e==="columnFilter";o?(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(o)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e){return is(this,e)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}};function tg(e){return!!e.operator}function SS(e,t,s){if(t==null)return null;let o=null;const{compName:i,jsComp:n,fwComp:r}=Ph(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 ji={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},ml=class extends T{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?ji.AUTO_HEIGHT:t.print?ji.PRINT:ji.NORMAL;this.view.updateLayoutClasses(s,t)}},ts="Viewport",Oc="fakeVScrollComp",fr=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],Hc=100,mr=150,yS=class extends T{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=Ve(this,()=>this.lastScrollSource[1]=null,mr),this.resetLastVScrollDebounced=Ve(this,()=>this.lastScrollSource[0]=null,mr)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,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,ts)});for(const e of fr){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?Ve(this,this.onVScroll.bind(this,ts),Hc):this.onVScroll.bind(this,ts),o=t?Ve(this,this.onVScroll.bind(this,Oc),Hc):this.onVScroll.bind(this,Oc);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[...fr,ts]){if(this.lastScrollSource[1]===t)continue;const s=this.getViewportForSource(t);on(s,e,this.enableRtl)}}getViewportForSource(e){return e===ts?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=sn(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(o),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===ts?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===ts?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))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},mr)}shouldBlockScrollUpdate(e,t,s=!1){return s&&!Ps()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=$a(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(){const e=this.scrollLeft;let t=!1;for(const s of fr)if(this.getViewportForSource(s).scrollLeft!==e){t=!0;break}t&&this.onHScroll(ts)}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)),on(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,s=0){if(Be(this.gos,"print"))return;const{rowModel:o}=this.beans,i=o.getRowCount();if(typeof e!="number"||e<0||e>=i){H(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:a,rowRenderer:l}=this.beans;n.wrapIncoming(()=>{const c=this.ctrlsSvc.getGridBodyCtrl(),d=o.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:f,stickyBottomHeight:m}=c,v=d.rowTop,w=d.rowHeight,b=r.getPixelOffset(),S=d.rowTop-b,R=S+d.rowHeight,y=this.getVScrollPosition(),x=a.divStretchOffset,D=y.top+x,M=y.bottom+x,L=M-D,I=a.getScrollPositionForPixel(S),F=a.getScrollPositionForPixel(R-L),P=Math.min((I+F)/2,S),B=D+f>S,Q=M-m<R;let A=null;t==="top"?A=I-f:t==="bottom"?A=F+m:t==="middle"?A=P:B?A=I-f:Q&&(F-I>L?A=I-f:A=F+m),A!==null&&(this.setVerticalScrollPosition(A),l.redraw({afterScroll:!0})),u=v!==d.rowTop||w!==d.rowHeight,h=f!==c.stickyTopHeight||m!==c.stickyBottomHeight,g++}while((u||h)&&g<10);if(this.animationFrameSvc?.flushAllFrames(),s<10&&(d?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const f=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const m=this.getVScrollPosition().top;f!==m&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=o.getRowCount())&&this.ensureIndexVisible(e,t,s+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}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 a=(r?s:o)||i,l=r?o:s;t!=="auto"&&(a=t==="start",l=t==="end");const c=t==="middle";if(a||l||c){const{colLeft:d,colMiddle:u,colRight:h}=this.getColumnBounds(e);return c?u-n/2:a?r?h:d:r?d-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,a=n?s<o:t>o;return{columnBeforeStart:r,columnAfterEnd:a}}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,a=r+o*n,l=r+o/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),s=t,o=e+t;return{start:s,end:o,width:e}}},Cl=class extends T{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=Be(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)}},RS=class extends T{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=()=>{qt(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=$a(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function $i(e,t,s,o){const i=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return sg(e,t,s,o,i)}function xS(e,t,s,o){const i=t?.suppressMouseEventHandling;return sg(e,void 0,s,o,i)}function sg(e,t,s,o,i){return i?i(Y(e,{column:t,node:s,event:o})):!1}function og(e,t,s){let o=t;for(;o;){const i=nh(e,o,s);if(i)return i;o=o.parentElement}return null}var vn="cellCtrl";function vl(e,t){return og(e,t,vn)}var wn="renderedRow";function FS(e,t){return og(e,t,wn)}function ga(e,t,s,o,i){const n=o?o.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=Y(e,{event:t,editing:i,column:o,node:s,data:s.data,colDef:o.getColDef()});return!!(n&&n(r))}function ES(e){const{pinnedRowModel:t,rowModel:s}=e,[o,i]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],n=o?null:"top";let r,a;i?(r=null,a=s.getRowCount()-1):(r="bottom",a=t?.getPinnedBottomRowCount()??-1);const{visibleCols:l,rangeSvc:c}=e,d=l.allCols;!c||!d?.length||c.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:r})}var DS=65,PS=67,TS=86,MS=68,IS=90,kS=89;function AS(e){const{keyCode:t}=e;let s;switch(t){case DS:s=E.A;break;case PS:s=E.C;break;case TS:s=E.V;break;case MS:s=E.D;break;case IS:s=E.Z;break;case kS:s=E.Y;break;default:s=e.code}return s}var LS=class extends T{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){const t=["dblclick","contextmenu","mouseover","mouseout","click",_u("touchstart")?"touchstart":"mousedown"];for(const s of t){const o=this.processMouseEvent.bind(this,s);this.addManagedElementListeners(this.element,{[s]:o})}}processMouseEvent(e,t){if(!ri(this.beans,t)||_t(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:vl(t,e),rowCtrl:FS(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:s,rowCtrl:o}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(s?this.processCellKeyboardEvent(s,e,t):o?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(o,e,t))}processCellKeyboardEvent(e,t,s){const o=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!ga(this.gos,s,e.rowNode,e.column,o)&&t==="keydown"&&(!o&&this.beans.navigation?.handlePageScrollingKey(s)||e.onKeyDown(s),this.doGridOperations(s,o),Ah(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,a=i.getFocusedCell()?.column;if(!ga(this.gos,s,o,a,!1)){const c=s.key;if(t==="keydown")switch(c){case E.PAGE_HOME:case E.PAGE_END:case E.PAGE_UP:case E.PAGE_DOWN:n?.handlePageScrollingKey(s,!0);break;case E.LEFT:case E.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case E.UP:case E.DOWN:e.onKeyboardNavigate(s);break;case E.TAB:e.onTabKeyDown(s);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",s))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!ri(this.beans,e))return;const s=AS(e),{clipboardSvc:o,undoRedo:i}=this.beans;if(s===E.A)return this.onCtrlAndA(e);if(s===E.C)return this.onCtrlAndC(o,e);if(s===E.D)return this.onCtrlAndD(o,e);if(s===E.V)return this.onCtrlAndV(o,e);if(s===E.X)return this.onCtrlAndX(o,e);if(s===E.Y)return this.onCtrlAndY(i);if(s===E.Z)return this.onCtrlAndZ(i,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:s,selectionSvc:o},gos:i}=this;s&&cs(i)&&!F1(i)&&t.isRowsToRender()?ES(this.beans):o&&o.selectAllRowNodes({source:"keyboardSelectAll",selectAll:uh(i)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:s}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(s,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:s}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(s,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:s}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(s,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},ig=class extends T{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)}},Pi=e=>e.topRowCtrls,Ti=e=>e.getStickyTopRowCtrls(),Mi=e=>e.getStickyBottomRowCtrls(),Ii=e=>e.bottomRowCtrls,ki=e=>e.allRowCtrls,Cr=e=>e.getCtrls("top"),vr=e=>e.getCtrls("center"),wr=e=>e.getCtrls("bottom"),OS={center:{type:"center",name:"center-cols",getRowCtrls:ki,getSpannedRowCtrls:vr},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:ki,getSpannedRowCtrls:vr},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:ki,getSpannedRowCtrls:vr},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:ki},topCenter:{type:"center",name:"floating-top",getRowCtrls:Pi,getSpannedRowCtrls:Cr},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Pi,getSpannedRowCtrls:Cr},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Pi,getSpannedRowCtrls:Cr},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:Pi},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Ti},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Ti},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Ti},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Ti},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:Mi},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:Mi},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:Mi},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:Mi},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Ii,getSpannedRowCtrls:wr},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Ii,getSpannedRowCtrls:wr},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Ii,getSpannedRowCtrls:wr},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Ii}};function ng(e){return`ag-${wi(e).name}-viewport`}function Ki(e){const t=wi(e);return t.container??`ag-${t.name}-container`}function HS(e){return`ag-${wi(e).name}-spanned-cells-container`}function wi(e){return OS[e]}var NS=["topCenter","topLeft","topRight"],GS=["bottomCenter","bottomLeft","bottomRight"],VS=["center","left","right"],BS=["center","left","right","fullWidth"],zS=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],WS=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],_S=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],rg=["stickyTopCenter","stickyTopLeft","stickyTopRight"],ag=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],US=[...rg,"stickyTopFullWidth",...ag,"stickyBottomFullWidth"],jS=[...NS,...GS,...VS,...rg,...ag],$S=class extends T{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=wi(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new RS(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 LS(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:i,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(WS,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(_S,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(BS,()=>this.createManagedBean(new ig(this.eContainer,this.name==="center"?o:void 0))),n&&this.forContainers(jS,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(zS,()=>this.createManagedBean(new Cl(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,s=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:s,displayedColumnsWidthChanged:s,displayedRowsChanged:o=>this.onDisplayedRowsChanged(o.afterScroll)}),s(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const o=this.options.getSpannedRowCtrls(e);o&&this.comp.setSpannedRowCtrls(o,!1)}})}listenOnDomOrder(){if(US.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const s=this.gos.get("ensureDomOrder"),o=Be(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 ni(this.eViewport)}getCenterViewportScrollLeft(){return sn(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=Kt(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return Bu(this.eViewport)}getViewportScrollLeft(){return sn(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||qa(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){on(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=Be(this.gos,"print"),i=this.gos.get("embedFullWidthRows")||s,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!i&&a:i||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},KS="ag-force-vertical-scroll",qS="ag-selectable",YS="ag-column-moving",ZS=class extends T{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(`.${ng("center")}`),this.eFullWidthContainer=s.querySelector(`.${Ki("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${Ki("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${Ki("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new ml(this.comp)),this.scrollFeature=this.createManagedBean(new yS(s)),this.beans.rowDragSvc?.setupRowDrag(s,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),s=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:s,rowResizeEnded:s}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const s=t&&e.getScrollbarWidth()||0,o=kh()?16:0,i=`calc(100% + ${s+o}px)`;qt(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){for(const t of e)this.addManagedElementListeners(t,{focusin:s=>{const{target:o}=s,i=xs(o,"ag-root",t);t.classList.toggle("ag-has-focus",!i)},focusout:s=>{const{target:o,relatedTarget:i}=s,n=t.contains(i),r=xs(i,"ag-root",t);xs(o,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(YS,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(qS,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?KS:null,s=Be(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||s&&zu(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let s=t.sizesMeasured;const o=()=>{const i=s&&no(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{eBodyViewport:e,eStickyTop:t,eStickyBottom:s,eTop:o,eBottom:i,beans:{popupSvc:n,touchSvc:r}}=this,a=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:a}),r?.mockBodyContextMenu(this,a),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const l=this.onStickyWheel.bind(this);for(const d of[t,s,o,i])this.addManagedElementListeners(d,{wheel:l});const c=this.onHorizontalWheel.bind(this);for(const d of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(d).eContainer,{wheel:c});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))&&ri(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:s,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(s))&&this.scrollGridBodyToMatchEvent(e)}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,beans:{environment:t}}=this,s=e?.getPinnedTopTotalHeight(),o=e?.getPinnedBottomTotalHeight(),i=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=i-n,a=s?r+s:0,l=o?r+o:0;this.comp.setTopHeight(a),this.comp.setBottomHeight(l),this.comp.setTopInvisible(a<=0),this.comp.setBottomInvisible(l<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){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`)}};function QS(e,t){return vl(e,t.target)?.getFocusedCellPosition()??null}function Nc(e,t){const s=Be(e.gos,"normal"),o=t;let i,n;o.clientX!=null||o.clientY!=null?(i=o.clientX,n=o.clientY):(i=o.x,n=o.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(n+=r,s){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition(),c=a.getHScrollPosition();i+=c.left,n+=l.top}return{x:i,y:n}}var lg=class extends Re{constructor(e,t){super(),this.direction=t,this.eViewport=q,this.eContainer=q,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",Mh()||Ps())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=kh(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),s=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:s,touchend:s})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),qt(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;Xw(this,()=>$t(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},XS={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"}]},JS=class extends lg{constructor(){super(XS,"horizontal"),this.eLeftSpacer=q,this.eRightSpacer=q,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 Cl(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),Dt(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=o);let i=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(i+=o),Dt(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.toggleCss("ag-scrollbar-invisible",t),_o(this.getGui(),n),_o(this.eViewport,n),_o(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 sn(this.eViewport,this.enableRtl)}setScrollPosition(e){$t(this.eViewport)||this.attemptSettingScrollPosition(e),on(this.eViewport,e,this.enableRtl)}},ey={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"}]}]},ty=class extends lg{constructor(){super(ey,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new ig(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.toggleCss("ag-scrollbar-invisible",s),Dt(this.getGui(),i),Dt(this.eViewport,i),Dt(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&&!$t(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},sy="ag-column-first",oy="ag-column-last";function cg(e,t,s,o){return be(e)?[]:ny(e.headerClass,e,t,s,o)}function dg(e,t,s){e.toggleCss(sy,s.isColAtEdge(t,"first")),e.toggleCss(oy,s.isColAtEdge(t,"last"))}function iy(e,t,s,o){return Y(t,{colDef:e,column:s,columnGroup:o})}function ny(e,t,s,o,i){if(be(e))return[];let n;if(typeof e=="function"){const r=iy(t,s,o,i);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}function ry(e,t,s){t.addManagedElementListeners(s,{keydown:o=>{if(!o.defaultPrevented&&o.key===E.TAB){const i=o.shiftKey;_s(e,s,!1,i)||bo(e,i)&&o.preventDefault()}}})}function ay(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function Ts(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function _n(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function bo(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 Et(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function wl(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),a=t[n];if(r){const l=ly(e,r);(a==null||l>a)&&(t[n]=l)}}}return t}function ly(e,t){let o=e.colModel.isPivotMode()?dy(e):hg(e);const i=t.getHeaderCellCtrls();for(const n of i){const{column:r}=n,a=r.getAutoHeaderHeight();a!=null&&a>o&&r.isAutoHeaderHeight()&&(o=a)}return o}function bl(e){let s=e.colModel.isPivotMode()?cy(e):bi(e);return e.colModel.forAllCols(o=>{const i=o.getAutoHeaderHeight();i!=null&&i>s&&o.isAutoHeaderHeight()&&(s=i)}),s}function bi(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function ug(e){return e.gos.get("floatingFiltersHeight")??bi(e)}function hg(e){return e.gos.get("groupHeaderHeight")??bi(e)}function cy(e){return e.gos.get("pivotHeaderHeight")??bi(e)}function dy(e){return e.gos.get("pivotGroupHeaderHeight")??hg(e)}function uy(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}var hy=class extends T{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 Do(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 a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),n?.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>qt(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const s=wl(e).reduce((n,r)=>n+r,0),o=bl(e);if(e.filterManager?.hasFloatingFilters()&&(t+=ug(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.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const s=e.visibleCols.allCols.some(o=>o.isSpanHeaderHeight());this.comp.toggleCss("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)||bo(i,s,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:s}=this.beans;switch(e.key){case E.LEFT:t="LEFT";case E.RIGHT:{V(t)||(t="RIGHT"),s.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case E.UP:t="UP";case E.DOWN:{V(t)||(t="DOWN"),s.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:s,beans:o}=this;!t&&s.contains(ye(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)}},Sl=class extends T{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?fe(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=V(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(!Be(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(V(e)&&(this.eCell.style.left=`${e}px`),Ee(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&Tw(this.ariaEl,t.length)}}},gy=0,gg="headerCtrl",yl=class extends T{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+gy++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,s,o,i){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,s,o,i),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:s}=this.beans.focusSvc.focusedHeader,o=s.getDefinition(),i=o?.suppressHeaderKeyboardEvent;if(!V(i))return!1;const n=Y(this.gos,{colDef:o,column:s,headerRowIndex:t,event:e});return!!i(n)}getWrapperHasFocus(){return ye(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:g,borderBottomWidth:f,borderTopWidth:m}=Bs(this.eGui),v=h+g+f+m,b=t.offsetHeight+v;if(u<5){const R=!Le(i)?.contains(t),y=b==0;if(R||y){Zr(()=>n(u+1),"raf",i);return}}this.setColHeaderHeight(this.column,b)};let r=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&c(),!u&&r&&d()},c=()=>{r=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),n(0),a=Kt(this.beans,t,()=>n(0))},d=()=>{r=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),o.addDestroyFunc(()=>d()),o.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),o.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),s&&s(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:s,eGui:o}=this;!e||!t||!o||(dg(e,t,s.visibleCols),Ou(o,s.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=Ts(this.beans);this.eGui&&st(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=ye(this.beans),s=e.key===E.LEFT||e.key===E.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===E.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===E.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 E.PAGE_DOWN:case E.PAGE_UP:case E.PAGE_HOME:case E.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=gg,{eGui:s,gos:o}=this;Os(o,s,t,this),e.addDestroyFunc(()=>Os(o,s,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(t.focus(),this.lastFocusEvent=e||null):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){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}},py=class extends yl{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,s,o,i){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:c,colHover:d,rangeSvc:u}=a,h=mi(this,c,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:f=>this.setRefreshFunction("measuring",f),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(n.pinned,r,s,e,this)):Se(s,!1),d?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new Sl(r,t,a)),h.createManagedBean(new Do(t,{shouldStopEventPropagation:f=>this.shouldStopEventPropagation(f),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 g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,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 Y(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 Rb(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:s,gos:o}=this.beans;return Y(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||ot(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.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{const s=t.createSelectAllFeature(this.column);s&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(s),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!s&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===E.SPACE&&this.selectAllFeature?.onSpaceKeyDown(e),e.key===E.ENTER&&this.onEnterKeyDown(e),e.key===E.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();Gc(s)&&s.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),Kb()&&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=cg(t,this.gos,this.column,null),o=this.userHeaderClasses;this.userHeaderClasses=new Set(s);for(const i of s)o.has(i)?o.delete(i):this.comp.toggleCss(i,!0);for(const i of o)this.comp.toggleCss(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();for(const e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const s=this.column.getActualWidth();this.comp.setWidth(`${s}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const s=this.column.isFilterActive();this.comp.toggleCss("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.toggleCss("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.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("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=wl(this.beans),n=i.reduce((h,g)=>h+g,0)===0;if(s.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),s.toggleCss("ag-header-span-height",!1),s.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();s.toggleCss("ag-header-span-height",r>0);const l=bl(o);if(r===0){s.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}s.toggleCss("ag-header-span-total",a);const c=(this.column.getFirstRealParent()?.getLevel()??-1)+1,d=i.length-c;let u=0;for(let h=0;h<d;h++)u+=i[i.length-1-h];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){if(this.sortable){const e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(vw(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&&!ot(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(ye(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.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return Gc(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Gc(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var fy=0,br=class extends T{constructor(e,t,s){super(),this.rowIndex=e,this.pinned=t,this.type=s,this.instanceId=fy++,this.comp=null,this.allCtrls=[];let o="ag-header-row-column";s==="group"?o="ag-header-row-group":s==="filter"&&(o="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${o}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=Be(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=mi(this,this.beans.context,t),s&&(this.setRowIndex(this.rowIndex),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=Be(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=wl(this.beans);for(let i=0;i<t.length;i++){if(i===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[i]};e+=t[i]}const s=bl(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:s};e+=s;const o=ug(this.beans);return{topOffset:e,rowHeight:o}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;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 py(e,this));break}t.set(o,i)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const 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,this.comp=null,super.destroy()}},my=class extends T{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}=this.beans;this.setupCenterWidth(),s?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const a=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;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,filterManager:s,visibleCols:o}=this.beans;let i=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=o.headerGroupRowCount;i=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let g=u;g<h;g++)this.destroyBean(this.groupsRowCtrls[g]);this.groupsRowCtrls.length=u;return}for(let g=h;g<u;g++){const f=this.createBean(new br(g,this.pinned,"group"));this.groupsRowCtrls.push(f)}}},a=()=>{const u=i++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new br(u,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},l=()=>{this.includeFloatingFilter=!!s?.hasFloatingFilters()&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}e||u();const h=i++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new br(h,this.pinned,"filter"))},c=this.getAllCtrls();r(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,n),c.length!==d.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=s=>s?.getHeaderCellCtrls().find(o=>o.column===e);if(ds(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,scroll:!1})}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new Cl(e=>this.comp.setCenterWidth(`${e}px`),!0))}},Cy=class extends T{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(Bc(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,s){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,s)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){Bc(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(ot(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&ds(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Ps()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!ot(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!ot(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 ot(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:a}=t;e?.showMenuAfterButtonClick(r,a,s,n,o)}else if(i==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,s,n,o)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),qt(a,()=>{const c=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);c&&e?.showMenuAfterButtonClick(r,c.getAnchorElementForMenu(o),s,n,o)})}}};function Vc(e,t,s){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",s))}function Bc(e){const{enterpriseMenuFactory:t,filterMenuFactory:s,gos:o}=e;return t&&ot(o)?t:s}var Un=class extends nl{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.errorMessages=null}},pg=class extends Re{constructor(){super()}},vy={tag:"span",cls:"ag-overlay-loading-center"},wy=class extends pg{init(){const e=Bt(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??vy),!e){const s=this.getLocaleTextFunc()("loadingOoo","Loading...");this.getGui().textContent=s,this.beans.ariaAnnounce.announceValue(s,"overlay")}}},by={tag:"span",cls:"ag-overlay-no-rows-center"},Sy=class extends pg{init(){const e=Bt(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??by),!e){const s=this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=s,this.beans.ariaAnnounce.announceValue(s,"overlay")}}};function yy(e,t,s){const o=ht(e,t,s);if(o){const{className:n}=o;if(typeof n=="string"&&n.includes("ag-icon")||typeof n=="object"&&n["ag-icon"])return o}const i=Ye({tag:"span"});return i.appendChild(o),i}function ht(e,t,s){let o=null;e==="smallDown"?H(262):e==="smallLeft"?H(263):e==="smallRight"&&H(264);const i=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{H(38,{iconName:e});return}if(typeof n=="string")return Ka(n);if(Za(n))return n;H(133,{iconName:e});return}else{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),Ye({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var Ry=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}",xy={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"}]}]},Fy=class extends Re{constructor(){super(),this.dragSource=null,this.eIcon=q,this.eLabel=q,this.eGhost=q,this.registerCSS(Ry)}postConstruct(){const e=t=>yy(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(xy),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:s,eIcon:o,dragSource:i,dropIconMap:n,gos:r}=this;Xe(o);let a=null;e||(e=i?.getDefaultIconName?i.getDefaultIconName():"notAllowed"),a=n[e],s.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),o.classList.toggle("ag-shake-left-to-right",t),!(a===n.hide&&r.get("suppressDragLeaveHidesColumns"))&&a&&o.appendChild(a)}setLabel(e){this.eLabel.textContent=e}},Ey=".ag-checkbox-cell{height:100%}",Dy={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Py=class extends Re{constructor(){super(Dy,[ll]),this.eCheckbox=q,this.registerCSS(Ey)}init(e){this.refresh(e);const{eCheckbox:t,beans:s}=this,o=t.getInputElement();o.setAttribute("tabindex","-1"),ku(o,"polite"),this.addManagedListeners(o,{click:i=>{if(Ns(i),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:i=>{Ns(i)}}),this.addManagedElementListeners(e.eGridCell,{keydown:i=>{if(i.key===E.SPACE&&!t.isDisabled()){e.eGridCell===ye(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(Vn)?t=o==null||o===""?void 0:o==="true":n.aggData&&n.aggData[u]!==void 0||n.sourceRowIndex>=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 a=e.disabled??!i?.isCellEditable(n);r.setDisabled(a);const l=this.getLocaleTextFunc(),c=Gn(l,t),d=a?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;r.setInputAriaLabel(d)}onCheckboxChanged(e){const{params:t}=this,{column:s,node:o,value:i}=t;this.beans?.editSvc?.setEditingCells([{column:s,colId:s.getColId(),rowIndex:o.rowIndex,rowPinned:o.rowPinned,state:"changed",oldValue:i,newValue:i}],{update:!0,forceRefreshOfEditCellsOnly:!0});const n=o.setDataValue(s,e,"renderer");this.beans.editSvc?.stopEditing({rowNode:o,column:s},{source:this.beans.editSvc?.isBatchEditing()?"ui":"api"}),n||this.updateCheckbox(t)}},zc=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:s,order:o}=this;t.has(e)||(t.add(e),s.add(e),o.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),Ct(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:s,queued:o}=this;e.clear(),o.clear(),t.clear(),s.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:s}=this.beans,o=e?.getSortOptions()??[],i=Iy(this.order);if(this.order.sort((r,a)=>(r.pinnedSibling?.rowIndex??0)-(a.pinnedSibling?.rowIndex??0)),this.order=t?.doFullSort(this.order,o)??this.order,!i)return;const n=ah(s);n==="bottom"||n==="pinnedBottom"?this.order.push(i):this.order.unshift(i)}hide(e){const{all:t,visible:s}=this;t.forEach(o=>e(o)?s.delete(o):s.add(o)),this.order=Array.from(s),this.sort()}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function fg(e){if(e.level===-1)return!0;const t=e.parent;return t?.childrenAfterSort?.some(s=>s==e)?fg(t):!1}function Sr(e,t){const{gos:s,rowModel:o,filterManager:i}=e;return zs(s)?!o.getRowNode(t.id):i?.isAnyFilterPresent()?!fg(t):s.get("pivotMode")?!t.group:!1}function Ty(e){return!!e.footer&&e.level===-1}function My(e){return!!e.pinnedSibling&&Ty(e.pinnedSibling)}function Iy(e){const t=e.findIndex(My);if(t>-1)return e.splice(t,1)?.[0]}var Wc=class extends T{postConstruct(){const{gos:e,beans:t}=this;this.top=new zc(t,"top"),this.bottom=new zc(t,"bottom");const s=i=>Sr(t,i.pinnedSibling),o=()=>{const i=e.get("isRowPinned");i&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,i(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:i})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow(),this.forContainers(r=>r.hide(s));const n=this.refreshRowPositions();(!i||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(Ay),this.refreshRowPositions()},rowNodeDataChanged:({node:i})=>{(e.get("isRowPinnable")?.(i)??!0)||this.pinRow(i,null)},firstDataRendered:o}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(i=>i.hide(s)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:i})=>{this._grandTotalPinned=i==="pinnedBottom"?"bottom":i==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",o)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const s=[];t.forEach(o=>s.push(o)),s.forEach(o=>this.pinRow(o,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,s){if(e.footer&&e.level>-1)return;if(e.footer&&e.level===-1){this._grandTotalPinned=t,Oy(this.beans);return}const o=e.rowPinned??e.pinnedSibling?.rowPinned;if(o!=null&&t!=null&&t!=o){const r=e.rowPinned?e:e.pinnedSibling,a=e.rowPinned?e.pinnedSibling:e;this.pinRow(r,null,s),this.pinRow(a,t,s);return}const n=s&&Ly(this.beans,e,s);if(n){n.forEach(r=>this.pinRow(r,t));return}if(t==null){const r=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(r);if(!a)return;a.delete(r);const l=r.pinnedSibling;yr(r),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(l)}else{const r=_c(this.beans,e,t),a=this.getContainer(t);a.add(r),Sr(this.beans,e)&&a.hide(l=>Sr(this.beans,l.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const s=o=>{if(o.rowHeightEstimated){const i=ls(this.beans,o);o.setRowTop(t),o.setRowHeight(i.height),t+=i.height,e=!0}};return this.bottom.forEach(s),t=0,this.top.forEach(s),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return Uc(this.top)}getPinnedBottomTotalHeight(){return Uc(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const s=[];return this.forEachPinnedRow(t,o=>s.push(o.pinnedSibling.id)),s};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,s)=>{for(const o of e[s]){const i=this.beans.rowModel.getRowNode(o);i?this.pinRow(i,s):t.queue(o)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const s=new Set;e.forEachQueued(o=>{const i=this.beans.rowModel.getRowNode(o);i&&s.add(i)});for(const o of s)e.unqueue(o.id),this.pinRow(o,t)})}pinGrandTotalRow(){const{gos:e,beans:t,_grandTotalPinned:s}=this,o=t.rowModel;if(!Fe(e))return;const i=o.rootNode?.sibling;if(!i)return;const n=i.pinnedSibling,r=n&&this.findPinnedRowNode(n);if(s){if(r&&r.floating!==s&&(r.delete(n),yr(n)),!r||r.floating!==s){const a=_c(t,i,s);this.getContainer(s).add(a)}}else{if(!r)return;r.delete(n),yr(n)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(s=>s.setRowHeight(s.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){const t=o=>ky(this.beans,o);if(e)return t(this.getContainer(e));let s=!1;return this.forContainers(o=>{const i=t(o);s||(s=i)}),s}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function ky(e,t){let s=0,o=!1;return t.forEach((i,n)=>{if(o||(o=i.rowTop!==s),i.setRowTop(s),i.rowHeightEstimated||i.rowHeight==null){const r=ls(e,i).height;o||(o=i.rowHeight!==r),i.setRowHeight(r)}i.setRowIndex(n),s+=i.rowHeight}),o}function _c(e,t,s){if(t.pinnedSibling)return t.pinnedSibling;const o=oS(t,e);o.setRowTop(null),o.setRowIndex(null),o.rowPinned=s;const i=s==="top"?gl:pl;return o.id=`${i}${s}-${t.id}`,o.pinnedSibling=t,t.pinnedSibling=o,o}function yr(e){if(!e.pinnedSibling)return;e.rowPinned=null,e.setRowTop(null),e.setRowIndex(null);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function Ay(e){const t=new Set;e.forEach(s=>{s.group&&t.add(s)}),t.forEach(s=>e.delete(s))}function Ly(e,t,s){const{rowSpanSvc:o}=e,i=(s&&o?.isCellSpanning(s,t))??!1;if(s&&i)return o?.getCellSpan(s,t)?.spannedNodes}function Uc(e){const t=e.size();if(t===0)return 0;const s=e.getByIndex(t-1);return s===void 0?0:s.rowTop+s.rowHeight}function Oy({gos:e,rowModel:t}){Fe(e)&&t.refreshModel({step:"map"})}var jc=class extends T{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=s=>{s.setRowHeight(s.rowHeight,!0)};ko(this.pinnedBottomRows,t),ko(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const s=o=>{if(o.rowHeightEstimated){const i=ls(this.beans,o);o.setRowTop(t),o.setRowHeight(i.height),t+=i.height,e=!0}};return ko(this.pinnedBottomRows,s),t=0,ko(this.pinnedTopRows,s),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const s=this.getCache(t);if(e===void 0){s.order.length=0,s.cache={};return}const o=Co(this.gos),i=t==="top"?gl:pl,n=new Set(s.order),r=[],a=new Set;let l=0,c=-1;for(const d of e){const u=o?.({data:d,level:0,rowPinned:t})??i+this.nextId++;if(a.has(u)){H(96,{id:u,data:d});continue}c++,a.add(u),r.push(u);const h=Ko(s,u);if(h!==void 0)h.data!==d&&h.updateData(d),l+=this.setRowTopAndRowIndex(h,l,c),n.delete(u);else{const g=new us(this.beans);g.id=u,g.data=d,g.rowPinned=t,l+=this.setRowTopAndRowIndex(g,l,c),s.cache[u]=g,s.order.push(u)}}for(const d of n)Ko(s,d)?.clearRowTopAndRowIndex(),delete s.cache[d];s.order=r}setRowTopAndRowIndex(e,t,s){return e.setRowTop(t),e.setRowHeight(ls(this.beans,e).height),e.setRowIndex(s),e.rowHeight}getPinnedTopTotalHeight(){return $c(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return $c(this.pinnedBottomRows)}getPinnedTopRowCount(){return fa(this.pinnedTopRows)}getPinnedBottomRowCount(){return fa(this.pinnedBottomRows)}getPinnedTopRow(e){return pa(this.pinnedTopRows,e)}getPinnedBottomRow(e){return pa(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return Ko(this.getCache(t),e)}forEachPinnedRow(e,t){return ko(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function $c(e){const t=fa(e);if(t===0)return 0;const s=pa(e,t-1);return s===void 0?0:s.rowTop+s.rowHeight}function Ko(e,t){return e.cache[t]}function pa(e,t){return Ko(e,e.order[t])}function ko(e,t){e.order.forEach((s,o)=>{const i=Ko(e,s);i&&t(i,o)})}function fa(e){return e.order.length}var Hy=class extends T{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const s=e.get("enableRowPinning"),o=ah(e),n=!!s||(o==="pinnedBottom"||o==="pinnedTop"),r=n?this.inner instanceof jc:this.inner instanceof Wc;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new Wc:new jc))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,s){return this.inner.pinRow(e,t,s)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}};function Si(e){return!!(e.rowPinned&&e.pinnedSibling)}function lt(e,t,s,o){const i=t==="top";if(!s)return lt(e,t,i?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),o);if(!o){const l=i?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return lt(e,t,s,i?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let n=!1,r=!1;const a=[];return e.forEachPinnedRow(t,l=>{if(l===s&&!n){n=!0,a.push(l);return}if(n&&l===o){r=!0,a.push(l);return}n&&!r&&a.push(l)}),a}var Ny={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Gy=class extends Re{constructor(){super(Ny,[ll]),this.eCheckbox=q}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:s}=this,o=t.isSelected(),i=Gn(e,o),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(n,r);s.setValue(o,!0),s.setInputAriaLabel(`${a} (${i})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:Ns,click:o=>{Ns(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"?ir(o):void 0,r=typeof i=="object"?ir(i):void 0;n!==r&&this.onSelectableChanged()}),ta(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,i=t.selectable,n=this.getIsVisible();let r;if(typeof n=="function"){const u=s?.callbackParams;if(!e)r=n({...u,node:t,data:t.data});else{const h=e.createColumnFunctionCallbackParams(t);r=n({...u,...h})}}else r=n??!1;const a=i&&!r||!i&&r,l=i||r,c=o.get("rowSelection"),d=c&&typeof c!="string"?!ir(c):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(l&&(a?d:!0)),this.setDisplayed(l&&(a?d:!0)),l&&this.eCheckbox.setDisabled(a),s?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?ro(t):this.column?.getColDef()?.checkboxSelection}},Vy=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:s,pinnedRowModel:o}=this;return t??(t=s.getRowNode(e)),o?.isManual()&&(t??(t=o.getPinnedRowById(e,"top")),t??(t=o.getPinnedRowById(e,"bottom"))),t}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.getNodesInRange(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}}}getNodesInRange(e,t){const{pinnedRowModel:s,rowModel:o}=this;if(!s?.isManual())return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return lt(s,"top",e,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const i=lt(s,"bottom",void 0,e),n=o.getRowCount(),r=o.getRow(n-1);return(o.getNodesInRangeForSelection(t,r)??[]).concat(i)}if(!e.rowPinned&&!t.rowPinned)return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return lt(s,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const i=lt(s,"top",t,void 0),n=lt(s,"bottom",void 0,e),r=o.getRow(0),a=o.getRow(o.getRowCount()-1);return i.concat(o.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(!e.rowPinned&&t.rowPinned==="top")return lt(s,"top",t,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const i=lt(s,"top",e,void 0),n=lt(s,"bottom",void 0,t),r=o.getRow(0),a=o.getRow(o.getRowCount()-1);return i.concat(o.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return lt(s,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const i=lt(s,"bottom",void 0,t),n=o.getRow(o.getRowCount());return(o.getNodesInRangeForSelection(e,n)??[]).concat(i)}return null}},By=class extends T{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(ye(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new al);this.cbSelectAll=t,t.addCss("ag-header-select-all"),As(t.getGui(),"presentation"),this.showOrHideSelectAll();const s=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:s,paginationChanged:s,modelUpdated:s}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:i})=>{const n=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;n(o)!==n(i)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,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,n=o.getValue(),r=Gn(t,n),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",i?`${a} (${r})`:null),o.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||s.announceAriaDescription()}checkSelectionType(e){return dn(this.gos)?!0:(H(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:s}=this.beans;return Fe(t)||zs(t)?!0:(H(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,n=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return mg(s,e)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const e=uh(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:s}=this.column.getColDef();return t?"currentPage":s?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function mg({gos:e,selectionColSvc:t},s){const o=e.get("rowSelection"),i=s.getColDef(),{headerCheckboxSelection:n}=i;let r=!1;if(typeof o=="object"){const l=Yt(s),c=ol(s);(ln(o)==="autoGroupColumn"&&c||l&&t?.isSelectionColumnEnabled())&&(r=zi(o))}else typeof n=="function"?r=n(Y(e,{column:s,colDef:i})):r=!!n;return r}var zy=class extends T{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new Vy(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=ta(e);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=ta(e),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new Gy}createSelectAllFeature(e){if(mg(this.beans,e))return new By(e)}isMultiSelect(){return dn(this.gos)}onRowCtrlSelected(e,t,s){const o=!!e.rowNode.isSelected();e.forEachGui(s,i=>{i.rowComp.toggleCss("ag-row-selected",o);const n=i.element;Hu(n,o),n.contains(ye(this.beans))&&t(i)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),s=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||s)return;const i=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(i,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!Si(e)||!Es(this.gos)}updateRowSelectable(e,t){const s=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable: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(li(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;r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...tS(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=Yt(e)&&ro(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(),a=li(i),l=y1(i),c=R1(i),d=this.isMultiSelect(),u=o==="rowClicked";if(u&&!(l||c))return null;if(t&&s&&d){const h=n.getRoot();if(h)if(h.isSelected()){const g=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:g.discard,select:g.keep,reset:!1}}else{const g=n.extend(e,a);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&d){const h=n.selectAll?this.beans.rowModel.getRow(0):void 0,g=n.getRoot(h),f=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:f.keep,deselect:f.discard,reset:n.selectAll||!!(g&&!g.isSelected())}}else if(s){if(u){const h=!r;return h&&!l||!h&&!c?null:(n.setRoot(e),{node:e,newValue:h,clearSelection:!1})}return n.setRoot(e),{node:e,newValue:!r,clearSelection:!d}}else{n.setRoot(e);const h=x1(i),g=un(i)==="filteredDescendants",f=u&&(!h||!l);if(g&&r===void 0&&Fe(i))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!d||f};if(u){const m=r?!h:l;return m===r&&!f||m&&!l||!m&&!c?null:{node:e,newValue:m,clearSelection:!d||f,keepDescendants:e.group&&a}}return{node:e,newValue:!r,clearSelection:!d||f}}}},uo={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Cg=class extends T{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:a,onFocusIn:l,onFocusOut:c,shouldStopEventPropagation:d,onTabKeyDown:u,handleKeyDown:h,isEmpty:g,eFocusableElement:f}=e;this.comp=t,this.eTopGuard=s,this.eBottomGuard=o,this.providedFocusInnerElement=a,this.eFocusableElement=f,this.focusTrapActive=!!i,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=l,this.providedFocusOut=c,this.providedShouldStopEventPropagation=d,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new Do(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards();for(const e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():lo(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=Le(this.beans),s=lo(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),a=this.gos.get("tabIndex");r.sort((l,c)=>{const d=Number.parseInt(l.getAttribute("tabindex")||"0"),u=Number.parseInt(c.getAttribute("tabindex")||"0");return u===a?1:d===a?-1:d===0?1:u===0?-1:d-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=lo(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 _s(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}},Wy=class extends T{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:v=>{for(const w of i)v!=null?w.setAttribute("tabindex",v):w.removeAttribute("tabindex")}};this.addTabGuards(t,s);const{focusTrapActive:r=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:d,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}=e;this.tabGuardCtrl=this.createManagedBean(new Cg({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:s,eFocusableElement:o,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:d,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Le(this.beans).createElement("div"),s=e==="top"?uo.TAB_GUARD_TOP:uo.TAB_GUARD_BOTTOM;return t.classList.add(uo.TAB_GUARD,s),As(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];Xe(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,s){Za(t)||(t=t.getGui());const{eBottomGuard:o}=this;o?o.insertAdjacentElement("beforebegin",t):e(t,s)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;as(e),as(t),super.destroy()}},_y=class extends Re{initialiseTabGuard(t){this.tabGuardFeature=this.createManagedBean(new Wy(this)),this.tabGuardFeature.initialiseTabGuard(t)}forceFocusOutOfContainer(t=!1){this.tabGuardFeature.forceFocusOutOfContainer(t)}appendChild(t,s){this.tabGuardFeature.appendChild(super.appendChild.bind(this),t,s)}},Uy=500,jy=550,Ai,$y=e=>{if(!Ai)Ai=new WeakSet;else if(Ai.has(e))return!1;return Ai.add(e),!0},ws=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let s=this.eventSvc;if(!s){if(s===null)return;this.eventSvc=s=new ks;const o=this.onTouchStart.bind(this);this.startListener=o,this.eElement.addEventListener("touchstart",o,{passive:!0})}s.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!$y(e))return;const t=e.touches[0];this.touchStart=t;const s=this.handlers;if(!s.length){const o=this.eElement,i=o.ownerDocument,n=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};Vi(s,[o,"touchmove",n,l],[i,"touchcancel",a,l],[i,"touchend",r,c],[i,"contextmenu",ss,c])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},jy)}onTouchMove(e){const{moved:t,touchStart:s}=this;if(!t&&s){const o=Uo(s,e.touches);o&&!Uu(o,s,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!Uo(t,e.changedTouches)||(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&ss(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!Uo(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const s=this.lastTapTime;s&&t-s>Uy&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),Qa(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}},Ky=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return this.tickingInterval!==null}check(e,t=!1){const 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)}},vg=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${Yu}/${this.frameworkName}-data-grid`,u1(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}};function qy(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var Yy=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],Kc=Object.fromEntries(Yy.map((e,t)=>[e,t]));function Zy(e,t){const s=(e.beanName?Kc[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,o=(t.beanName?Kc[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return s-o}function Qy(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}var Xy=class extends T{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.getId());const{dragAndDrop:o,ctrlsSvc:i}=this.beans;o?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new ml(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=Kt(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),i.register("gridCtrl",this)}isDetailGrid(){return Lh(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){const{view:t}=this;if(e===!1)t.setCursor(null);else{const s=e===1?"ew-resize":"ns-resize";t.setCursor(s)}}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,a=fe(r);if(n.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[o],e)}focusInnerElement(e){if(this.gos.getCallback("focusGridInnerElement")?.({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(fe(s),e);const r=fe(n);if(o.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||Ts(this.beans)){if(o.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<s.length;r++)if(Hs(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!_n(e)||!Ts(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const s=ye(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=Hs(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),s}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},J=(e,t)=>{for(const s of Object.keys(t))t[s]=e;return t},qc={dispatchEvent:"CommunityCore",...J("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...J("GridState",{getState:0,setState:0}),...J("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...J("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...J("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...J("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...J("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...J("ValueCache",{expireValueCache:0}),...J("CellApi",{getCellValue:0}),...J("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...J("Sort",{onSortChanged:0}),...J("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...J("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...J("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...J("HighlightChanges",{flashCells:0}),...J("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...J("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}),...J("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...J("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...J("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...J("ColumnResize",{setColumnWidths:0}),...J("ColumnHover",{isColumnHovered:0}),...J("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...J("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...J("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...J("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...J("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...J("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...J("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...J("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...J("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0}),...J("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...J("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...J("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...J("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...J("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...J("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...J("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...J("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...J("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...J("ContextMenu",{showContextMenu:0}),...J("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...J("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...J("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...J("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...J("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}),...J("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...J("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...J("StatusBar",{getStatusPanel:0}),...J("AiToolkit",{getStructuredSchema:0})},Rr={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},Jy=(e,t)=>e.eventSvc.dispatchEvent(t),wg=class{};Reflect.defineProperty(wg,"name",{value:"GridApi"});var eR=class extends T{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new wg,this.fns={...Rr,dispatchEvent:Jy},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(qc))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!==Rr&&(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)H(26,{fnName:e,preDestroyLink:o});else{const i=qc[e];s.assertModuleRegistered(i,`api.${e}`)&&H(27,{fnName:e,module:i})}}destroy(){super.destroy(),this.fns=Rr,this.beans=null}};function tR(e){return e.context.getId()}function sR(e){e.gridDestroySvc.destroy()}function oR(e){return e.gridDestroySvc.destroyCalled}function iR(e,t){return e.gos.get(t)}function nR(e,t,s){bg(e,{[t]:s})}function bg(e,t){e.gos.updateGridOptions({options:t})}function rR(e,t){const s=t.replace(/Module$/,"");return e.gos.isModuleRegistered(s)}var aR={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},lR=class extends Re{constructor(e,t,s){super(aR),this.rowNode=e,this.column=t,this.eCell=s}postConstruct(){this.getGui().appendChild(ht("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:s,eCell:o,gos:i}=this,n=s.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(o,0,0),n){const a=Y(i,{rowNode:t,dragEvent:e});n(a)}else try{const a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};function cR(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function dR(e,t){const s=e.dragAndDrop?.findExternalZone(t.getContainer());s&&e.dragAndDrop?.removeDropTarget(s)}function uR(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function hR(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function gR(e,t){const s=e.rowDropHighlightSvc;if(!s)return;const o=t?.row;let i=t?.dropIndicatorPosition;i!=="above"&&i!=="below"&&i!=="inside"&&(i="none");const n=o?.rowIndex;n==null||i==="none"?s.clear():s.set(o,i)}var pR=class extends Q0{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},fR=class extends T{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(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},mR={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},CR=class extends Re{constructor(e,t,s,o,i,n=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=s,this.customGui=o,this.dragStartPixels=i,this.alwaysVisible=n,this.dragSource=null}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(mR),this.getGui().appendChild(ht("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,gos:t,rowNode:s}=this,o=this.refreshVisibility.bind(this);this.addManagedPropertyListener("suppressRowDrag",o),this.addManagedListeners(s,{dataChanged:o,cellChanged:o}),this.addManagedListeners(e.eventSvc,t.get("rowDragManaged")?{sortChanged:o,filterChanged:o,columnRowGroupChanged:o,newColumnsLoaded:o}:{newColumnsLoaded:o})}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const e={skipAriaHidden:!0};if(this.isNeverDisplayed()){this.setDisplayed(!1,e);return}const t=this.column;let s=typeof t?.getColDef().rowDrag=="function",o=!t||this.isCustomGui()||t.isRowDrag(this.rowNode);o&&this.rowNode.footer&&this.gos.get("rowDragManaged")&&(o=!1,s=!0),this.setDisplayed(s||o,e),this.setVisible(o,e)}isNeverDisplayed(){const{gos:e,beans:t}=this;return!!(e.get("suppressRowDrag")||e.get("rowDragManaged")&&t.rowDragSvc.rowDragFeature?.shouldPreventRowMove()&&!t.dragAndDrop?.hasExternalDropZones())}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const s=this.beans.selectionSvc?.getSelectedNodes()??[];return s.indexOf(e)!==-1?s:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:o=>{o?.preventDefault()}})[0]);const s=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:o=>{const i=o?.dragItem||this.getDragItem(),n=(o?.dropTarget?.rows.length??i.rowNodes?.length)||1,r=this.getRowDragText(this.column);return r?r(i,n):n===1?this.cellValueFn():`${n} ${s("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},qi=class{constructor(){this.reordered=!1,this.removals=new Set,this.updates=new Set,this.adds=new Set}};function vR(e){const{rowIndex:t,rowPinned:s,column:o}=e;return`${t}.${s??"null"}.${o.getId()}`}function Sg(e,t){const s=e.column===t.column,o=e.rowPinned===t.rowPinned,i=e.rowIndex===t.rowIndex;return s&&o&&i}function wR(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(V(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function bR(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function SR(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 yR(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()?t=i.getLastRow():r&&(s="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:s}}function jt(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 so(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 RR(e,t,s){const{rowModel:o,pinnedRowModel:i}=e;let n;return n??(n=o?.getRowNode(t)),s?n??(n=i?.getPinnedRowById(t,s)):(n??(n=i?.getPinnedRowById(t,"top")),n??(n=i?.getPinnedRowById(t,"bottom"))),n}function bn(e,t,s=!1){const{rowIndex:o,rowPinned:i}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(o===0)return i==="top"?null:i==="bottom"&&a.isRowsToRender()?{rowIndex:n.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(s){const l=i?void 0:a.getRow(o);return yg(e,l,!0)??{rowIndex:o-1,rowPinned:i}}return{rowIndex:o-1,rowPinned:i}}function Yc(e,t,s=!1){const{rowIndex:o,rowPinned:i}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(xR(e,t))return i==="bottom"?null:i==="top"&&a.isRowsToRender()?{rowIndex:n.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(s){const l=i?void 0:a.getRow(o);return yg(e,l)??{rowIndex:o+1,rowPinned:i}}return{rowIndex:o+1,rowPinned:i}}function yg(e,t,s=!1){const{gos:o,rowRenderer:i}=e;if(!t?.sticky||!rh(o))return;const n=i.getStickyTopRowCtrls(),r=i.getStickyBottomRowCtrls(),a=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),l=a?n:r,c=(s?-1:1)*(a?-1:1);let d;for(let u=0;u<l.length;u++)if(l[u].rowNode.rowIndex===t.rowIndex){d=l[u+c];break}return d?{rowIndex:d.rowNode.rowIndex,rowPinned:null}:void 0}function xR(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}var ui=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]={});for(const o of t)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()])}},FR=class{constructor(e,t){this.beans=e,this.groupThrottled=!1,this.scrollChanged=!1,this.scrollChanging=!1,this.oldVScroll=null,this.groupTimer=null,this.groupTarget=null,this.onGroupThrottle=()=>{this.groupTimer=null,this.groupThrottled=!0,this.beans.dragAndDrop?.nudge()};const s=()=>t.scrollFeature.getVScrollPosition().top;this.autoScroll=new Ky({scrollContainer:t.eBodyViewport,scrollAxis:"y",getVerticalPosition:s,setVerticalPosition:o=>t.scrollFeature.setVerticalScrollPosition(o),onScrollCallback:()=>{const o=s();if(this.oldVScroll!==o){this.oldVScroll=o,this.scrollChanging=!0;return}const i=this.scrollChanging;this.scrollChanged=i,this.scrollChanging=!1,i&&(this.beans.dragAndDrop?.nudge(),this.scrollChanged=!1)}})}updateGroup(e,t){this.groupTarget&&this.groupTarget!==e&&this.clearGroup(),e&&(t&&this.groupThrottled&&!e.expanded&&e.childrenAfterSort?.length&&e.isExpandable()&&e.setExpanded(!0,void 0,!0),e.expanded&&e.childrenAfterSort?.length&&(this.groupThrottled=!0,this.groupTarget=e))}startGroup(e){this.groupTarget=e,this.groupTimer===null&&(this.groupTimer=window.setTimeout(this.onGroupThrottle,this.beans.gos.get("rowDragInsertDelay")))}clearGroup(){this.groupThrottled=!1,this.groupTarget=null;const e=this.groupTimer;e!==null&&(this.groupTimer=null,window.clearTimeout(e))}clear(){this.clearGroup(),this.autoScroll.ensureCleared(),this.oldVScroll=null,this.scrollChanged=!1,this.scrollChanging=!1}},ER=class extends T{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.nudger=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{this.nudger=new FR(e,t.gridBodyCtrl)})}destroy(){super.destroy(),this.nudger?.clear(),this.nudger=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){const{rowGroupColsSvc:e,filterManager:t,sortSvc:s}=this.beans;return!!((e?.columns??[]).length||t?.isAnyFilterPresent()||s?.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const s=this.beans.selectionSvc?.getSelectedNodes();if(s&&s.indexOf(t)>=0)return s.slice().sort(TR)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:s,beans:o}=this;if(t){const r=this.getRowNodes(e);e.dragItem.rowNodes=r,Xc(r,!0)}this.lastDraggingEvent=e;const i=e.fromNudge,n=this.makeRowsDrop(s,e,i,!1);o.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e),n?.rowDragManaged&&n.moved&&n.allowed&&n.sameGrid&&!n.suppressMoveWhenRowDragging&&(!i&&!this.nudger?.autoScroll.scrolling||this.nudger?.scrollChanged)&&this.dropRows(n),this.nudger?.autoScroll.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,s,o){const{beans:i,gos:n}=this,r=this.newRowsDrop(t,o),a=i.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:l,rootNode:c,source:d,target:u,rows:h}=r;u??(u=a.getRow(a.getRowCount()-1)??null);const g=!!this.beans.groupStage?.treeData&&l;let f=null;if(u?.footer){const S=Yi(a,-1,u)??Yi(a,1,u);f=u.sibling??c,u=S??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=d!==u);let m=.5;if(u&&(l&&r.moved&&(f||!g)?m=d.rowIndex>u.rowIndex?-.5:.5:m=(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&l&&u&&r.moved&&Fe(n)){const S=MR(a,r);S&&(m=d.rowIndex>S.rowIndex?-.5:.5,u=S,r.moved&&(r.moved=d!==u))}const v=this.nudger;v?.updateGroup(u,s),g&&!f&&v&&(!u||m>=.5&&u.rowIndex===i.pageBounds.getLastRow()?f=c:r.moved&&this.targetShouldBeParent(u,m,h)&&(v.groupThrottled&&(f=u),!s&&(!f||u&&!u.expanded&&u.childrenAfterSort?.length)&&v.startGroup(u)),f??(f=u?.parent??c));let w=!1;if(f){if(f===u&&f!==c){const S=f.expanded?Yi(a,1,u):null;S?.parent===f?(u=S,m=-.5):w=!0}if(u&&!w){let S=u;for(;S&&S!==c&&S!==f;)u=S,S=S.parent}}r.target=u,r.newParent=f,r.moved&&(r.moved=d!==u);const b=m<0?"above":"below";return r.position=r.moved?w?"inside":b:"none",this.validateRowsDrop(r,g,b,o),t.changed||(t.changed=PR(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:s,gos:o}=this,i=s.rowModel.rootNode,n=Fe(o)?o.get("rowDragManaged"):!1,r=o.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!i)return null;const d=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;n&&(!c.length||this.shouldPreventRowMove()||(r||!a)&&!d)&&(u=!1);const h=Nc(s,e).y,g=this.getOverNode(h);return{api:s.gridApi,context:s.gridOptions.context,draggingEvent:e,rowDragManaged:n,suppressMoveWhenRowDragging:r,sameGrid:a,withinGrid:d,rootNode:i,moved:l!==g,y:h,overNode:g,overIndex:g?.rowIndex??-1,position:"none",source:l,target:g??null,newParent:null,rows:c,allowed:u,highlight:!t&&n&&r&&(d||!a)}}validateRowsDrop(e,t,s,o){const{rowDragManaged:i,suppressMoveWhenRowDragging:n}=e;t||(e.newParent=null),n&&!e.moved&&(e.allowed=!1);const r=(!i||e.allowed)&&this.gos.get("isRowValidDropPosition");if(r){t&&e.newParent&&Zc(e.rows,e.newParent)&&(e.newParent=null);const a=r(e);if(!a)e.allowed=!1;else if(typeof a=="object"){a.rows!==void 0&&(e.rows=a.rows??[]),t&&a.newParent!==void 0&&(e.newParent=a.newParent),a.target!==void 0&&(e.target=a.target),a.position&&(e.position=a.position),a.allowed!==void 0?e.allowed=a.allowed:i||(e.allowed=!0);const l=e.draggingEvent;a.changed&&l&&(l.changed=!0),!o&&a.highlight!==void 0&&(e.highlight=a.highlight)}}i&&(e.rows=this.filterRows(e)),t&&e.newParent&&Zc(e.rows,e.newParent)&&(e.newParent=null),n&&(!e.rows.length||e.position==="none")&&(e.allowed=!1),(!e.allowed||!e.newParent)&&e.position==="inside"&&(e.position=s)}targetShouldBeParent(e,t,s){const o=e.rowIndex,i=.25;if(t<-.5+i)return!1;if(t<.5-i)return!0;let n,r=o+1;const a=this.beans.rowModel;do n=a.getRow(r++);while(n?.footer);const l=e.childrenAfterGroup;if(n&&n.parent===e&&l?.length){const c=new Set(s);for(const d of l)if(d.rowIndex!==null&&!c.has(d))return!0}return!1}addRowDropZone(e){if(!e.getContainer()){H(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){H(56);return}const s=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(i=>e.onDragEnter(this.rowDragEvent("rowDragEnter",i))),onDragLeave:e.onDragLeave&&(i=>e.onDragLeave(this.rowDragEvent("rowDragLeave",i))),onDragging:e.onDragging&&(i=>e.onDragging(this.rowDragEvent("rowDragMove",i))),onDragStop:e.onDragStop&&(i=>e.onDragStop(this.rowDragEvent("rowDragEnd",i))),onDragCancel:e.onDragCancel&&(i=>e.onDragCancel(this.rowDragEvent("rowDragCancel",i)))},o={isInterestedIn:i=>i===2,getIconName:()=>"move",external:!0,...s};t.addDropTarget(o),this.addDestroyFunc(()=>t.removeDropTarget(o))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:s=>{this.onDragEnter(s),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",s))},onDragLeave:s=>{this.onDragLeave(s),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",s))},onDragging:s=>{this.onDragging(s),e?.onDragging?.(this.rowDragEvent("rowDragMove",s))},onDragStop:s=>{this.onDragStop(s),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",s))},onDragCancel:s=>{this.onDragCancel(s),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",s))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:s}=this.beans,i=e>t.getCurrentPagePixelRange().pageLastPixel?-1:s.getRowIndexAtPixel(e);return i>=0?s.getRow(i):void 0}rowDragEvent(e,t){const s=this.beans,{dragItem:o,dropTarget:i,event:n,vDirection:r}=t,a=i?.rootNode===s.rowModel.rootNode,l=a?i.y:Nc(s,t).y,c=a?i.overNode:this.getOverNode(l),d=a?i.overIndex:c?.rowIndex??-1;return{api:s.gridApi,context:s.gridOptions.context,type:e,event:n,node:o.rowNode,nodes:o.rowNodes,overIndex:d,overNode:c,y:l,vDirection:r,rowsDrop:i}}dispatchGridEvent(e,t){const s=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(s)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e)}onDragStop(e){const t=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),t?.allowed&&t.rowDragManaged&&(t.suppressMoveWhenRowDragging||!t.sameGrid||this.nudger?.autoScroll.scrolling)&&this.dropRows(t),this.stopDragging(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e)}stopDragging(e){this.nudger?.clear(),this.beans.rowDropHighlightSvc?.fromDrag(null),Xc(e.dragItem.rowNodes,!1)}dropRows(e){return e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:s}){const o=Co(this.gos),i=this.beans.rowModel,n=s.filter(({data:a,rowPinned:l})=>!i.getRowNode(o?.({data:a,level:0,rowPinned:l})??a.id)).map(({data:a})=>a);if(n.length===0)return!1;const r=t?Qc(t)+(e==="above"?0:1):void 0;return i.updateRowData({add:n,addIndex:r}),!0}filterRows({newParent:e,rows:t}){let s;for(let o=0,i=t.length;o<i;++o){let n=!0;const r=t[o];(!r||r.footer||r.rowTop===null&&r!==this.beans.rowModel.getRowNode(r.id)||e&&r.parent!==e&&DR(r,e)||!ma(r))&&(n=!1),n?s?.push(r):s??(s=t.slice(0,o))}return s??t}csrmMoveRows({position:e,target:t,rows:s,newParent:o,rootNode:i}){let n=!1;const r=new Set;for(const h of s){o&&h.parent!==o&&(h.treeParent=o,n=!0);const g=ma(h);g&&r.add(g)}if(!n&&r.size===0)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),c=l&&so(this.beans,l);if(r.size&&this.reorderLeafChildren(r,...this.getMoveRowsBounds(r,t,e==="above"))&&(n=!0),!n)return!1;const d=this.beans.rowModel,u=new qi;return u.reordered=!0,d.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedPath:new ui(!1,i),changedRowNodes:u}),c?c.focusCell():a.clearFocusedCell(),!0}getMoveRowsBounds(e,t,s){const o=this.beans.rowModel.rootNode?._leafs?.length??0;let i=t?Qc(t):-1;i<0||i>=o?i=o:s||++i;let n=i,r=Math.min(i,o-1);for(const a of e){const l=a.sourceRowIndex;l<n&&(n=l),l>r&&(r=l)}return[n,i,r]}reorderLeafChildren(e,t,s,o){let i=!1;const n=this.beans.rowModel.rootNode?._leafs;if(!e.size||!n)return!1;let r=t;for(let l=t;l<s;++l){const c=n[l];e.has(c)||(c.sourceRowIndex!==r&&(c.sourceRowIndex=r,n[r]=c,i=!0),++r)}let a=o;for(let l=o;l>=s;--l){const c=n[l];e.has(c)||(c.sourceRowIndex!==a&&(c.sourceRowIndex=a,n[a]=c,i=!0),--a)}for(const l of e)l.sourceRowIndex!==r&&(l.sourceRowIndex=r,n[r]=l,i=!0),++r;return i}},Yi=(e,t,s)=>{if(s){const o=e.getRowCount();let i=s.rowIndex+t;for(;i>=0&&i<o;){const n=e.getRow(i);if(!n||!n.footer&&!n.detail)return n;i+=t}}},DR=(e,t)=>{let s=t;for(;s;){if(s===e)return!0;s=s.parent}return!1},Zc=(e,t)=>{for(let s=0,o=e.length;s<o;++s)if(e[s].parent!==t)return!1;return!0},Qc=e=>{const t=ma(e);return t!==void 0?t.sourceRowIndex:-1},ma=e=>e.data?e:Yh(e.childrenAfterGroup),PR=(e,t)=>e!==t&&(!e||e.sameGrid!==t.sameGrid||e.allowed!==t.allowed||e.position!==t.position||e.target!==t.target||e.source!==t.source||e.newParent!==t.newParent||!gs(e.rows,t.rows)),TR=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,Xc=(e,t)=>{for(let s=0,o=e?.length||0;s<o;++s){const i=e[s];i.dragging!==t&&(i.dragging=t,i.dispatchRowEvent("draggingChanged"))}},MR=(e,t)=>{let s=null,o=t.target;if(o&&t.rows.indexOf(o)<0)return null;const i=t.source;if(!o||!i)return null;let n=o.rowIndex-i.rowIndex;const r=n<0?-1:1;n=t.suppressMoveWhenRowDragging?Math.abs(n):1;const a=new Set(t.rows);do{const l=Yi(e,r,o);if(!l)break;a.has(l)||(s=l,--n),o=l}while(n>0);return s},IR=class extends T{constructor(){super(...arguments),this.beanName="rowDragSvc"}setupRowDrag(e,t){const s=t.createManagedBean(new ER(e)),o=this.beans.dragAndDrop;o.addDropTarget(s),t.addDestroyFunc(()=>o.removeDropTarget(s)),this.rowDragFeature=s}createRowDragComp(e,t,s,o,i,n){return new CR(e,t,s,o,i,n)}createRowDragCompForRow(e,t){if(cs(this.gos))return;const s=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${s("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,s,o,i,n){const r=this.gos;return r.get("rowDragManaged")&&(!Fe(r)||r.get("pagination"))?void 0:this.createRowDragComp(s,e,t,o,i,n)}},kR=class extends T{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;!e||e?.rowIndex===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const s=e!==this.row,o=e.uiLevel,i=t!==this.position,n=o!==this.uiLevel;this.dragging=!1,(s||i||n)&&(s&&this.clear(),this.uiLevel=o,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:s,target:o,position:i}=t;if(s&&o&&i!=="none"){this.set(o,i),this.dragging=!0;return}}this.dragging&&this.clear()}},Rg={moduleName:"Drag",version:G,beans:[pR]},AR={moduleName:"DragAndDrop",version:G,dynamicBeans:{dndSourceComp:lR},icons:{rowDrag:"grip"}},xg={moduleName:"SharedDragAndDrop",version:G,beans:[J0],dependsOn:[Rg],userComponents:{agDragAndDropImage:Fy},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},LR={moduleName:"RowDrag",version:G,beans:[kR,IR],apiFunctions:{addRowDropZone:cR,removeRowDropZone:dR,getRowDropZoneParams:uR,getRowDropPositionIndicator:hR,setRowDropPositionIndicator:gR},dependsOn:[xg]},OR={moduleName:"HorizontalResize",version:G,beans:[fR],dependsOn:[Rg]},HR=":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}}",NR=class extends T{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 GR(e,t,s){e.colMoves?.moveColumnByIndex(t,s,"api")}function VR(e,t,s){e.colMoves?.moveColumns(t,s,"api")}var BR=class extends T{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const s of t)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 zR(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 WR(e){const t=[...e];for(const s of e){let o=null,i=s.getParent();for(;i!=null&&i.getDisplayedLeafColumns().length===1;)o=i,i=i.getParent();if(o!=null){const r=!!o.getColGroupDef()?.marryChildren?o.getProvidedColumnGroup().getLeafColumns():o.getLeafColumns();for(const a of r)t.includes(a)||t.push(a)}}return t}function _R(e,t,s,o){const i=o.allCols;let n=null,r=null;for(let a=0;a<e.length;a++){const l=e[a],c=s.getProposedColumnOrder(t,l);if(!s.doesOrderPassRules(c))continue;const d=c.filter(h=>i.includes(h));if(r===null)r=d;else if(!gs(d,r))break;const u=jR(c);(n===null||u<n.fragCount)&&(n={move:l,fragCount:u})}return n}function Fg(e){const{isFromHeader:t,fromLeft:s,xPosition:o,fromEnter:i,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:c,visibleCols:d}=e;let{allMovingColumns:u}=e;t&&(u=WR(u));const h=u.slice();zR(l.getCols(),h);const g=KR({movingCols:h,draggingRight:s,xPosition:o,pinned:r,gos:a,colModel:l,visibleCols:d}),f=UR(h,l);if(g.length===0)return;const m=g[0];if(f!==null&&(t||!i)&&!n&&(!s&&m>=f||s&&m<=f))return;const w=_R(g,h,c,d);if(!w)return;const b=w.move;if(!(b>l.getCols().length-h.length))return{columns:h,toIndex:b}}function Eg(e){const{columns:t,toIndex:s}=Fg(e)||{},{finished:o,colMoves:i}=e;return!t||s==null?null:(i.moveColumns(t,s,"uiColumnMoved",o),o?null:{columns:t,toIndex:s})}function UR(e,t){const s=t.getCols(),o=e.map(l=>s.indexOf(l)).sort((l,c)=>l-c),i=o[0];return fe(o)-i!==o.length-1?null:i}function jR(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];for(const r of i)n.indexOf(r)===-1&&s++}return s}function $R(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function KR(e){const{movingCols:t,draggingRight:s,xPosition:o,pinned:i,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(S=>S.getColDef().suppressMovable))return[];const c=$R(a,i),d=r.getCols(),u=c.filter(S=>t.includes(S)),h=c.filter(S=>!t.includes(S)),g=d.filter(S=>!t.includes(S));let f=0,m=o;if(s){let S=0;for(const R of u)S+=R.getActualWidth();m-=S}if(m>0){for(let S=0;S<h.length;S++){const R=h[S];if(m-=R.getActualWidth(),m<0)break;f++}s&&f++}let v;if(f>0){const S=h[f-1];v=g.indexOf(S)+1}else v=g.indexOf(h[0]),v===-1&&(v=0);const w=[v],b=(S,R)=>S-R;if(s){let S=v+1;const R=d.length-1;for(;S<=R;)w.push(S),S++;w.sort(b)}else{let S=v;const R=d.length-1;let y=d[S];for(;S<=R&&c.indexOf(y)<0;)S++,w.push(S),y=d[S];S=v-1;const x=0;for(;S>=x;)w.push(S),S--;w.sort(b).reverse()}return w}function Ca(e){const{pinned:t,fromKeyboard:s,gos:o,ctrlsSvc:i,useHeaderRow:n,skipScrollPadding:r}=e;let a=i.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(s&&(l-=a.getBoundingClientRect().left),o.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=i.get("center").getCenterViewportScrollLeft()),l):0}function xr(e,t){for(const s of e)s.moving=t,s.dispatchColEvent("movingChanged","uiColumnMoved")}var Jc=7,va=100,Li=va/2,qR=5,YR=100,ZR=class extends T{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!V(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:s}=t||{},o=s?.columns??[];for(const i of o){const n=i.getPinned();if(i.getColDef().lockPinned){if(n==e)return"move";continue}const r=s?.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==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()]&&!r.isVisible());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&&be(e.hDirection))return;const a=Ca({x:e.x,pinned:this.pinned,gos:i,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,s,a,o):this.handleColumnDragWhileAllowingMovement(e,t,s,a,o)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,s){if(!e?.length)return;const o=e.filter(i=>!i.getColDef().lockVisible);o.length&&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)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}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:a,xPosition:l}=this.getNormalisedXPositionInfo(n,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:s,fromLeft:a})}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",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:o,fromLeft:r,fromEnter:t,fakeEvent:s}),c=Eg({...l,finished:i});c&&(this.lastMovedInfo=c)}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:a,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:s,fromLeft:i,xPosition:o,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){const{gos:s,colModel:o}=this.beans,i=s.get("enableRtl"),n=o.getCols().filter(d=>d.isVisible()&&d.getPinned()===this.pinned);let r=null,a=null,l=null;for(const d of n){if(a=d.getActualWidth(),r=this.getNormalisedColumnLeft(d,0,i),r!=null){const u=r+a;if(r<=t&&u>=t){l=d;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let d=n.length-1;d>=0;d--){const u=n[d],h=n[d].getParent();if(!h){l=u;break}const g=h?.getDisplayedLeafColumns();if(g.length){l=fe(g);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,i),a=l.getActualWidth()}if(this.lastHighlightedColumn?.column!==l&&this.clearHighlighted(),l==null||r==null||a==null)return;let c;t-r<a/2!==i?c=0:c=1,ed(l,c),this.lastHighlightedColumn={column:l,position:c}}getNormalisedXPositionInfo(e,t){const{gos:s,visibleCols:o}=this.beans,i=s.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,i);if(!n||!r||a==null)return;const l=o.allCols,c=l.indexOf(n),d=l.indexOf(r),u=a===0!==i,h=c<d||c===d&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),d+g===c)return;const f=l[d+g];if(!f)return;const m=this.getNormalisedColumnLeft(f,20,i);return{fromLeft:h,xPosition:m}}getColumnMoveAndTargetInfo(e,t,s){const o=this.lastHighlightedColumn||{},{firstMovingCol:i,lastMovingCol:n}=QR(e);if(!i||!n||o.column||!t)return{firstMovingCol:i,...o};const a=this.getPinDirection()==="left";return{firstMovingCol:i,position:a?1:0,column:a!==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 Ca({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>Jc;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:a,toIndex:l}=Fg(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(ed(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+Li,n=e>o-Li):(n=e<s+Li,i=e>o-Li),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),YR),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*qR,e>va&&(e=va);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<=Jc+1||!o)return;if(i.setDragImageCompIcon("pinned"),!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 ed(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function QR(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 XR=class extends T{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 ZR(s)),this.bodyDropPivotTarget=this.createManagedBean(new BR(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()}},JR=class extends T{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:a}=this.beans,l=i.getCols();if(!l)return;if(t>l.length-e.length){H(30,{toIndex:t});return}n?.start();const c=i.getColsForKeys(e);this.doesMovePassRules(c,t)&&(vc(i.getCols(),c,t),r.refresh(s),a.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[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!(!wh(e,t.getColTree())||!(i=>{const n=c=>c?c==="left"||c===!0?-1:1:0,r=s.get("enableRtl");let a=r?1:-1,l=!0;for(const c of i){const d=n(c.getColDef().lockPosition);r?d>a&&(l=!1):d<a&&(l=!1),a=d}return l})(e))}getProposedColumnOrder(e,t){const o=this.beans.colModel.getCols().slice();return vc(o,e,t),o}createBodyDropTarget(e,t){return new XR(e,t)}moveHeader(e,t,s,o,i){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:c}=this.beans,d=t.getBoundingClientRect(),u=d.left,h=Ee(s),g=h?d.width:s.getActualWidth(),f=e==="left"!==r.get("enableRtl"),m=Ca({x:f?u-20:u+g+20,pinned:o,fromKeyboard:!0,gos:r,ctrlsSvc:n}),v=c.focusedHeader;Eg({allMovingColumns:h?s.getLeafColumns():[s],isFromHeader:!0,fromLeft:e==="right",xPosition:m,pinned:o,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let w;if(h){const b=s.getDisplayedLeafColumns();w=f?b[0]:fe(b)}else w=s;if(n.getScrollFeature().ensureColumnVisible(w,"auto"),(!i.isAlive()||r.get("ensureDomOrder"))&&v){let b;if(h){const S=s.getGroupId(),R=s.getLeafColumns();if(!R.length)return;const y=R[0].getParent();if(!y)return;b=ex(y,S)}else b=s;b&&c.focusHeaderPosition({headerPosition:{...v,column:b}})}}setDragSourceForHeader(e,t,s){const{gos:o,colModel:i,dragAndDrop:n,visibleCols:r}=this.beans;let a=!o.get("suppressDragLeaveHidesColumns");const l=Ee(t),c=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>sx(t,r.allCols):()=>tx(t),dragItemName:s,onDragStarted:()=>{a=!o.get("suppressDragLeaveHidesColumns"),xr(c,!0)},onDragStopped:()=>xr(c,!1),onDragCancelled:()=>xr(c,!1),onGridEnter:h=>{if(a){const{columns:g=[],visibleState:f}=h??{},m=l?w=>!f||f[w.getColId()]:()=>!0,v=g.filter(w=>!w.getColDef().lockVisible&&m(w));i.setColsVisible(v,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const g=h?.columns?.filter(f=>!f.getColDef().lockVisible)||[];i.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function ex(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function tx(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function sx(e,t){const s=e.getProvidedColumnGroup().getLeafColumns(),o={};for(const a of s)o[a.getId()]=a.isVisible();const i=[];for(const a of t)s.indexOf(a)>=0&&(i.push(a),Ct(s,a));for(const a of s)i.push(a);const n=[],r=e.getLeafColumns();for(const a of i)r.indexOf(a)!==-1&&n.push(a);return{columns:i,columnsInSplit:n,visibleState:o,containerType:n[0]?.pinned}}var ox={moduleName:"ColumnMove",version:G,beans:[JR,NR],apiFunctions:{moveColumnByIndex:GR,moveColumns:VR},dependsOn:[xg],css:[HR]},ix=class extends T{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;for(const n of e)this.cloneItemIntoDummy(n,s);o.appendChild(s);const i=s.offsetWidth;return s.remove(),t=t??this.gos.get("autoSizePadding"),i+t}getHeaderCellForColumn(e){let t=null;for(const s of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const o=s.getHtmlElementForColumnHeader(e);o!=null&&(t=o)}return 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(a=>s.classList.contains(a))?(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(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){const c=r.classList[l];c!="ag-row-position-absolute"&&i.add(c)}break}r=r.parentElement}o.appendChild(s),t.appendChild(o)}},Dg={moduleName:"AutoWidth",version:G,beans:[ix]};function nx(e,t,s=!0,o="api"){e.colResize?.setColumnWidths(t,!1,s,o)}var rx=class extends T{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=l=>l.reduce((c,d)=>c+d.getActualWidth(),0),s=(l,c)=>l.map(d=>d.getActualWidth()/c),o=this.getColumnsToResize(),i=t(o),n=s(o,i),r={columnsToResize:o,resizeStartWidth:i,resizeRatios:n};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),c=r.groupAfterColumns=l.filter(u=>u.isResizable()),d=r.groupAfterStartWidth=t(c);r.groupAfterRatios=s(c,d)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),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:a,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];if(d.push({columns:i,ratios:r,width:t}),a){const u=t-n;d.push({columns:a,ratios:c,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:d,finished:o,source:s}),o&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},ax=class extends T{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(Se(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),s&&a&&e.push(a.addColumnAutosizeListeners(this.eResize,this.column))},i=()=>{for(const r of e)r();e.length=0},n=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==s)&&(t=r,s=a,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),a=i+r,l=[{key:s,newWidth:a}],{pinnedCols:c,ctrlsSvc:d,colResize:u}=n;if(this.column.getPinned()){const h=c?.leftWidth??0,g=c?.rightWidth??0,f=ni(d.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-o)>f)return}this.lastResizeAmount=r,u?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const s=this.pinned!=="left",o=this.pinned==="right";return this.gos.get("enableRtl")?s&&(t*=-1):o&&(t*=-1),t}},lx=class extends T{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,s,o){const i=[],{colModel:n,gos:r,visibleCols:a}=this.beans;for(const l of e){const c=n.getColDefCol(l.key)||n.getCol(l.key);if(!c)continue;if(i.push({width:l.newWidth,ratios:[1],columns:[c]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(c);if(!u)continue;const h=c.getActualWidth()-l.newWidth,g=u.getActualWidth()+h;i.push({width:g,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(d=>cx(d)))){if(s){const d=t&&t.length>0?t[0].columns:null;vo(this.eventSvc,d,s,o)}return}const n=[],r=[];for(const d of t){const{width:u,columns:h,ratios:g}=d,f={},m={};for(const b of h)r.push(b);let v=!0,w=0;for(;v;){if(w++,w>1e3){pe(31);break}v=!1;const b=[];let S=0,R=u;h.forEach((x,D)=>{if(m[x.getId()])R-=f[x.getId()];else{b.push(x);const L=g[D];S+=L}});const y=1/S;b.forEach((x,D)=>{const M=D===b.length-1;let L;M?L=R:(L=Math.round(g[D]*u*y),R-=L);const I=x.getMinWidth(),F=x.getMaxWidth();L<I?(L=I,m[x.getId()]=!0,v=!0):F>0&&L>F&&(L=F,m[x.getId()]=!0,v=!0),f[x.getId()]=L})}for(const b of h){const S=f[b.getId()];b.getActualWidth()!==S&&(b.setActualWidth(S,o),n.push(b))}}const a=n.length>0;let l=[];if(a){const{colFlex:d,visibleCols:u,colViewport:h}=this.beans;l=d?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(o),u.updateBodyWidths(),h.checkViewportColumns()}const c=r.concat(l);(a||s)&&vo(this.eventSvc,c,s,o,l)}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 ax(e,t,s,o,i)}createGroupResizeFeature(e,t,s,o){return new rx(e,t,s,o)}};function cx(e){const{columns:t,width:s}=e;let o=0,i=0,n=!0;for(const l of t){const c=l.getMinWidth();o+=c||0;const d=l.getMaxWidth();d>0?i+=d:n=!1}const r=s>=o,a=!n||s<=i;return r&&a}var dx={moduleName:"ColumnResize",version:G,beans:[lx],apiFunctions:{setColumnWidths:nx},dependsOn:[OR,Dg]},ux=class extends T{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);for(const t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})}removeListenersOnChildrenColumns(){for(const e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},hx=class extends yl{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,s,o,i){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:c,rangeSvc:d,colResize:u}=r;this.comp=e,i=mi(this,a,i),this.setGui(t,i),this.displayName=l.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,g=n.getProvidedColumnGroup().getLeafColumns();c?.createHoverFeature(i,g,t),d?.createRangeHighlightFeature(i,n,e),i.createManagedBean(new Sl(n,t,r)),i.createManagedBean(new ux(e,n)),u?this.resizeFeature=i.createManagedBean(u.createGroupResizeFeature(e,s,h,n)):e.setResizableDisplayed(!1),i.createManagedBean(new Do(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(i,g),i.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(i),i.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.getDefinition();return Y(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=fe(t)===e;if(!s&&!o)return;const i=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let r=!1,a=!1;if(n){const l=this.beans.gos.get("enableRtl"),c=i===1,d=i===0;s&&(l?a=c:r=d),o&&(l?r=d:a=c)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",a)}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,enterpriseMenuFactory:o}=this.beans,i=this.column,n=i.getProvidedColumnGroup(),r=Y(s,{displayName:this.displayName,columnGroup:i,setExpanded:l=>{e.setColumnGroupOpened(n,l,"gridInitializing")},setTooltip:(l,c)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>o?.showMenuAfterButtonClick(n,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>o?.showMenuAfterMouseEvent(n,l,"columnMenu",c),eGridHeader:this.eGui}),a=Fb(t,r);a&&this.comp.setUserCompDetails(a)}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=cg(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"));for(const o of s)this.comp.toggleCss(o,!0)}setupMovingCss(e){const{column:t}=this,o=t.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const n of o)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===E.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 gx(e,t,s){e.colGroupSvc?.setColumnGroupOpened(t,s,"api")}function px(e,t,s){return e.colGroupSvc?.getColumnGroup(t,s)??null}function fx(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function mx(e,t,s){return e.colNames.getDisplayNameForColumnGroup(t,s)||""}function Cx(e){return e.colGroupSvc?.getColumnGroupState()??[]}function vx(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function wx(e){e.colGroupSvc?.resetColumnGroupState("api")}function bx(e){return e.visibleCols.treeLeft}function Sx(e){return e.visibleCols.treeCenter}function yx(e){return e.visibleCols.treeRight}function Rx(e){return e.visibleCols.getAllTrees()}function xx(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 Fx=class extends T{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:s,colModel:o,colGroupSvc:i,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(o,i),i?.updateOpenClosedVisibility(),this.leftCols=Fr(this.treeLeft),this.centerCols=Fr(this.treeCenter),this.rightCols=Fr(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(o),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),s?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(o,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let s=t.getParent();for(;s;){if(!s.isPadding()){const o=s.getProvidedColumnGroup().getLevel()+1;o>e&&(e=o);break}s=s.getParent()}}return e}updateBodyWidths(){const e=Ht(this.centerCols),t=Ht(this.leftCols),s=Ht(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?fe(s):null):(i=t?fe(t):null,n=s?s[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===i,o),r.setFirstRightPinned(r===n,o)}buildTrees(e,t){const s=e.getColsToShow(),o=s.filter(l=>l.getPinned()=="left"),i=s.filter(l=>l.getPinned()=="right"),n=s.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new xh,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:o,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:i,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({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 Ee(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(const e of[this.treeLeft,this.treeRight,this.treeCenter])for(const t of e)Ee(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");for(const n of[this.leftCols,this.rightCols,this.centerCols]){if(i){let r=Ht(n);for(const a of n)r-=a.getActualWidth(),a.setLeft(r,e)}else{let r=0;for(const a of n)a.setLeft(r,e),r+=a.getActualWidth()}xx(o,n)}for(const n of o)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 a=t[r],l=t.length-r,c=Math.min(a.getColSpan(e),l),d=[a];if(c>1){const h=c-1;for(let g=1;g<=h;g++)d.push(t[r+g]);r+=h}let u;if(s){u=!1;for(const h of d)s(h)&&(u=!0)}else u=!0;u&&(i.length===0&&n&&(o&&o(a))&&i.push(n),i.push(a)),n=a}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};Ms(this.treeCenter,!1,e),Ms(this.treeLeft,!1,e),Ms(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?fe(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 Ht(this.leftCols)}getDisplayedColumnsRightWidth(){return Ht(this.rightCols)}isColAtEdge(e,t){const s=this.allCols;if(!s.length)return!1;const o=t==="first";let i;if(Ee(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;i=o?n[0]:fe(n)}else i=e;return(o?s[0]:fe(s))===i}};function Ms(e,t,s){if(e)for(let o=0;o<e.length;o++){const i=e[o];if(Ee(i)){const n=t?i.getDisplayedChildren():i.getChildren();Ms(n,t,s)}s(i)}}function Fr(e){const t=[];return Ms(e,!0,s=>{ds(s)&&t.push(s)}),t}var Ex=class extends T{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Wt(null,t,s=>{_e(s)&&e.push({groupId:s.getGroupId(),open:s.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const s=[];Wt(null,t,o=>{if(_e(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 a=[];for(const l of e){const c=l.groupId,d=l.open,u=this.getProvidedColGroup(c);u&&u.isExpanded()!==d&&(u.setExpanded(d),a.push(u))}i.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),o?.finish()}setColumnGroupOpened(e,t,s){let o;_e(e)?o=e.getId():o=e||"",this.setColumnGroupState([{groupId:o,open:t}],s)}getProvidedColGroup(e){let t=null;return Wt(null,this.beans.colModel.getColTree(),s=>{_e(s)&&s.getId()===e&&(t=s)}),t}getGroupAtDirection(e,t){const s=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),o=e.getDisplayedLeafColumns(),i=t==="After"?fe(o):o[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](i);if(!r)return null;const a=this.getColGroupAtLevel(r,s);if(a!==e)return a}}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();Ms(e,!1,t=>{Ee(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Ee(e))return e;const s=this.beans.visibleCols.getAllTrees(),o=typeof t=="number";let i=null;return Ms(s,!1,n=>{if(Ee(n)){const r=n;let a;o?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(i=r)}}),i}createColumnGroups(e){const{columns:t,idCreator:s,pinned:o,oldDisplayedGroups:i,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(i),a=[];let l=t;for(;l.length;){const c=l;l=[];let d=0;const u=h=>{const g=d;d=h;const f=c[g],v=(Ee(f)?f.getProvidedColumnGroup():f).getOriginalParent();if(v==null){for(let b=g;b<h;b++)a.push(c[b]);return}const w=this.createColumnGroup(v,s,r,o,n);for(let b=g;b<h;b++)w.addChild(c[b]);l.push(w)};for(let h=1;h<c.length;h++){const g=c[h],m=(Ee(g)?g.getProvidedColumnGroup():g).getOriginalParent(),v=c[d],b=(Ee(v)?v.getProvidedColumnGroup():v).getOriginalParent();m!==b&&u(h)}d<c.length&&u(c.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,s,o,i,n,r){const a=i.getUniqueKey(t.groupId||null,null),l=Cc(this.beans,t,a),c=new _i(l,a,!1,s);this.createBean(c);const d=this.findExistingGroup(t,n);d&&n.splice(d.idx,1);const u=d?.group;u&&c.setExpanded(u.isExpanded());const h=mh(this.beans,l.children,s+1,e,o,i,n,r);return c.setChildren(h),c}balanceColumnTree(e,t,s,o){const i=[];for(let n=0;n<e.length;n++){const r=e[n];if(_e(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,s,o);a.setChildren(l),i.push(a)}else{let a,l;for(let c=t;c<s;c++){const d=o.getUniqueKey(null,null),u=Cc(this.beans,null,d),h=new _i(u,d,!0,c);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(i.push(a),e.some(d=>_e(d))){l.setChildren([r]);continue}else{l.setChildren(e);break}i.push(r)}}return i}findDepth(e){let t=0,s=e;for(;s?.[0]&&_e(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(_e(i)){const n=i,r=this.findMaxDepth(n.getChildren(),t+1);s<r&&(s=r)}}return s}balanceTreeForAutoCols(e,t){const s=[];for(const o of e){let i=o;for(let n=t-1;n>=0;n--){const r=new _i(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)}return 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),a=qh(n,r);let l=s[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),V(l)?l.reset():(l=new di(e,n,r,o),i||this.createBean(l)),l}mapOldGroupsById(e){const t={},s=o=>{for(const i of o)if(Ee(i)){const n=i;t[i.getUniqueId()]=n,s(n.getChildren())}};return e&&s(e),t}setupParentsIntoCols(e,t){for(const s of e??[])if(s.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),s.parent=t,Ee(s)){const o=s;this.setupParentsIntoCols(o.getChildren(),o)}}},Dx={moduleName:"ColumnGroup",version:G,dynamicBeans:{headerGroupCellCtrl:hx},beans:[Ex],apiFunctions:{getAllDisplayedColumnGroups:Rx,getCenterDisplayedColumnGroups:Sx,getColumnGroup:px,getColumnGroupState:Cx,getDisplayNameForColumnGroup:mx,getLeftDisplayedColumnGroups:bx,getProvidedColumnGroup:fx,getRightDisplayedColumnGroups:yx,resetColumnGroupState:wx,setColumnGroupOpened:gx,setColumnGroupState:vx}},Px={tag:"div",cls:"ag-skeleton-container"},Tx=class extends Re{constructor(){super(Px)}init(t){const s=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",s),this.addDestroyFunc(()=>oi(t.eParentOfValue)),oi(t.eParentOfValue,s),t.deferRender?this.setupLoading(t):t.node.failedLoad?this.setupFailed():this.setupLoading(t)}setupFailed(){const t=this.getLocaleTextFunc();this.getGui().textContent=t("loadingError","ERR");const s=t("ariaSkeletonCellLoadingFailed","Row failed to load");mo(this.getGui(),s)}setupLoading(t){const s=Ye({tag:"div",cls:"ag-skeleton-effect"}),o=t.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 i=this.getLocaleTextFunc(),n=t.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");mo(this.getGui(),n)}refresh(t){return!1}},Mx={moduleName:"CheckboxCellRenderer",version:G,userComponents:{agCheckboxCellRenderer:Py}},Ix={moduleName:"SkeletonCellRenderer",version:G,userComponents:{agSkeletonCellRenderer:Tx}};function kx(e,t){const s=e.colModel.getColDefCol(t);return s?s.getColDef():null}function Ax(e){return e.colModel.getColumnDefs(!0)}function Lx(e,t,s){return e.colNames.getDisplayNameForColumn(t,s)||""}function Ox(e,t){return e.colModel.getColDefCol(t)}function Hx(e){return e.colModel.getColDefCols()}function Nx(e,t){return mt(e,t,"api")}function Gx(e){return pn(e)}function Vx(e){Z1(e,"api")}function Bx(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function zx(e){return e.visibleCols.isPinningLeft()}function Wx(e){return e.visibleCols.isPinningRight()}function _x(e,t){return e.visibleCols.getColAfter(t)}function Ux(e,t){return e.visibleCols.getColBefore(t)}function jx(e,t,s){e.colModel.setColsVisible(t,s,"api")}function $x(e,t,s){e.pinnedCols?.setColsPinned(t,s,"api")}function Kx(e){return e.colModel.getCols()}function qx(e){return e.visibleCols.leftCols}function Yx(e){return e.visibleCols.centerCols}function Zx(e){return e.visibleCols.rightCols}function Qx(e){return e.visibleCols.allCols}function Xx(e){return e.colViewport.getViewportColumns()}function wa(e,t){if(!e)return;const s=e,o={};for(const i of Object.keys(s)){if(t&&t.indexOf(i)>=0||$u.has(i))continue;const n=s[i];typeof n=="object"&&n!==null&&n.constructor===Object?o[i]=wa(n):o[i]=n}return o}var Jx=class extends T{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,s,o,i=!1){const n=e.slice();t?n.sort((l,c)=>s.indexOf(l)-s.indexOf(c)):(s||i)&&n.sort((l,c)=>o.indexOf(l)-o.indexOf(c));const r=this.rowGroupColsSvc?.columns,a=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,r,a)}buildColumnDefs(e,t=[],s=[]){const o=[],i={};for(const n of e){const r=this.createDefFromColumn(n,t,s);let a=!0,l=r,c=n.getOriginalParent(),d=null;for(;c;){let u=null;if(c.isPadding()){c=c.getOriginalParent();continue}const h=i[c.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(c),u&&(u.children=[l],i[u.groupId]=u,l=u,c=c.getOriginalParent()),c!=null&&d===c){a=!1;break}d=c}a&&o.push(l)}return o}createDefFromGroup(e){const t=wa(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,s){const o=wa(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}},e2=class extends T{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const s=this.flexViewportWidth,{visibleCols:o,colDelayRenderSvc:i}=this.beans,n=o.centerCols;let r=-1;if(e.resizingCols){const m=new Set(e.resizingCols);for(let v=n.length-1;v>=0;v--)if(m.has(n[v])){r=v;break}}let a=!1;const l=n.map((m,v)=>{const w=m.getFlex(),b=w!=null&&w>0&&v>r;return a||(a=b),{col:m,isFlex:b,flex:Math.max(0,w??0),initialSize:m.getActualWidth(),min:m.getMinWidth(),max:m.getMaxWidth(),targetSize:0}});if(a?(i?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(i),!s||!a)return[];let c=l.length,d=l.reduce((m,v)=>m+v.flex,0),u=s;const h=(m,v)=>{m.frozenSize=v,m.col.setActualWidth(v,t),u-=v,d-=m.flex,c-=1},g=m=>m.frozenSize!=null;for(const m of l)m.isFlex||h(m,m.initialSize);for(;c>0;){const m=Math.round(d<1?u*d:u);let v,w=0,b=0;for(const y of l){if(g(y))continue;v=y,b+=m*(y.flex/d);const x=b-w,D=Math.round(x);y.targetSize=D,w+=D}v&&(v.targetSize+=m-w);let S=0;for(const y of l){if(g(y))continue;const x=y.targetSize,D=Math.min(Math.max(x,y.min),y.max);S+=D-x,y.violationType=D===x?void 0:D<x?"max":"min",y.targetSize=D}const R=S===0?"all":S>0?"min":"max";for(const y of l)g(y)||(R==="all"||y.violationType===R)&&h(y,y.targetSize)}e.skipSetLeft||o.setLeftValues(t),e.updateBodyWidths&&o.updateBodyWidths();const f=l.filter(m=>m.isFlex&&!m.violationType).map(m=>m.col);if(e.fireResizedEvent){const m=l.filter(w=>w.initialSize!==w.frozenSize).map(w=>w.col),v=l.filter(w=>w.flex).map(w=>w.col);vo(this.eventSvc,m,!0,t,v)}return this.revealColumns(i),f}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}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")}};function qo(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}var t2=["dateTimeString","dateString","text","number","boolean","date"],s2=class extends T{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:e=>!!e.colDef.editable&&e.event.key===E.SPACE}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:s}){return{cellEditorParams:{useFormatter:!0},comparator:(o,i)=>{const n=t.getColDefCol(s),r=n?.getColDef();if(!n||!r)return 0;const a=o==null?"":e({column:n,node:null,value:o}),l=i==null?"":e({column:n,node:null,value:i});return a===l?0:a>l?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},s={},o=d=>u=>{const{column:h,node:g,value:f}=u;let m=h.getColDef().valueFormatter;return m===d.groupSafeValueFormatter&&(m=d.valueFormatter),this.beans.valueSvc.formatValue(h,g,f,m)};for(const d of Object.keys(e)){const u=e[d],h={...u,groupSafeValueFormatter:od(u,this.gos)};t[d]=h,s[d]=o(h)}const i=this.gos.get("dataTypeDefinitions")??{},n={};for(const d of Object.keys(i)){const u=i[d],h=this.processDataTypeDefinition(u,i,[d],e);h&&(t[d]=h,u.dataTypeMatcher&&(n[d]=u.dataTypeMatcher),s[d]=o(h))}const{valueParser:r,valueFormatter:a}=e.object,{valueParser:l,valueFormatter:c}=t.object;this.hasObjectValueParser=l!==r,this.hasObjectValueFormatter=c!==a,this.formatValueFuncs=s,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const s={...e};for(const o of t2)delete s[o],s[o]=e[o]??t[o].dataTypeMatcher;return s}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 a=t[n];if(r&&a&&(r=a),!sd(e,r,n))return;i=td(r,e)}else{if(s.includes(n)){H(44);return}const r=t[n];if(!sd(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...s,n],o);if(!a)return;i=td(a,e)}return{...i,groupSafeValueFormatter:od(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){H(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(!Fe(s))return!1;const o={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Er(t,o))return!1;const i=t.type===null?e.type:t.type;if(i){const n=s.get("columnTypes")??{};if(gn(i).some(a=>{const l=n[a.trim()];return l&&Er(l,o)}))return!1}return!Er(e,o)}inferCellDataType(e,t){if(!e)return;let s;const o=this.getInitialData();if(o){const n=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");s=qo(o,e,n)}else this.initWaitForRowData(t);return s==null?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](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?._leafs;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],a=this.colModel.getCol(n);if(!a)return;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const c=a.getColDef();if(t&&c.type&&c.type!==l.type){const d=i2(a,r);d.rowGroup&&d.rowGroupIndex==null&&(o[n]=d),d.pivot&&d.pivotIndex==null&&(i[n]=d),s.push(d)}}t&&s.push(...this.generateColumnStateForRowGroupAndPivotIndexes(o,i)),s.length&&mt(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=sa(this.beans,s,e.getColId());return e.setColDef(o,s,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){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=>H(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")}}postProcess(e){const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:s,beans:o,formatValueFuncs:i}=this,n=s[t];n&&o.colFilter?.setColDefPropsForDataType(e,n,i[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,s,o){const i=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[s.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:s,colId:o,formatValue:i});Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),s=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:o=>Je(o.newValue&&String(o.newValue)),valueFormatter:o=>o.value==null?"":!(o.value instanceof Date)||isNaN(o.value.getTime())?t("invalidDate","Invalid Date"):it(o.value,s)??"",dataTypeMatcher:o=>o instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:s=>Je(s)??void 0,dateFormatter:s=>it(s??null,t)??void 0,valueParser:s=>Ui(String(s.newValue))?s.newValue:null,valueFormatter:s=>Ui(String(s.value))?String(s.value):"",dataTypeMatcher:s=>typeof s=="string"&&Ui(s)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>t.newValue?.trim?.()===""?null:Number(t.newValue),valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:qr(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>t.newValue==null?t.newValue:t.newValue?.trim?.()===""?null:String(t.newValue).toLowerCase()==="true",valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&Wb(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>qr(t.value)??""}}}destroyColumnStateUpdateListeners(){for(const e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function td(e,t){const s={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(s.columnTypes=[...gn(e.columnTypes),...gn(t.columnTypes)]),s}function sd(e,t,s){return t?t.baseDataType!==e.baseDataType?(H(46),!1):!0:(H(45,{parentCellDataType:s}),!1)}function od(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}}else if(t.get("groupHideOpenParents")&&s.column.isRowGroupActive()&&typeof s.value=="string"&&!e.dataTypeMatcher?.(s.value))return;return e.valueFormatter(s)}}function o2(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 Er(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([s,o])=>o2(e,t,s,o))}function i2(e,t){const s=Rh(e);for(const o of t)delete s[o],o==="rowGroup"?delete s.rowGroupIndex:o==="pivot"&&delete s.pivotIndex;return s}var n2={moduleName:"DataType",version:G,beans:[s2],dependsOn:[Mx]},r2={moduleName:"ColumnFlex",version:G,beans:[e2]},Pg={moduleName:"ColumnApi",version:G,beans:[Jx],apiFunctions:{getColumnDef:kx,getDisplayNameForColumn:Lx,getColumn:Ox,getColumns:Hx,applyColumnState:Nx,getColumnState:Gx,resetColumnState:Vx,isPinning:Bx,isPinningLeft:zx,isPinningRight:Wx,getDisplayedColAfter:_x,getDisplayedColBefore:Ux,setColumnsVisible:jx,setColumnsPinned:$x,getAllGridColumns:Kx,getDisplayedLeftColumns:qx,getDisplayedCenterColumns:Yx,getDisplayedRightColumns:Zx,getAllDisplayedColumns:Qx,getAllDisplayedVirtualColumns:Xx,getColumnDefs:Ax}};function a2(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 l2=class extends T{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=Y(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 a2(e.field)}return""}},c2=class extends T{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,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)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}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(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||d2(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 V(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(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const s=o=>{const i=new Set,n={};for(const r of o){let a=r.getParent();const l=r.isSpanHeaderHeight();for(;a&&!i.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const d=a.getProvidedColumnGroup().getLevel();n[d]??(n[d]=[]),n[d].push(a),i.add(a),a=a.getParent()}}return n};this.rowsOfHeadersToRenderLeft=s(e),this.rowsOfHeadersToRenderRight=s(t),this.rowsOfHeadersToRenderCenter=s(this.headerColsWithinViewport)}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 d2(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var u2=class extends T{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=Ka("<span>"+n+"</span>");return}if(n==null){this.eGui=Ye({tag:"span"});return}this.eGui=n}}return s}},h2={moduleName:"CellRendererFunction",version:G,beans:[u2]},g2=class extends V0{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:s,dynamicBeans:o,selectors:i}=e;if(s){const n=(r,a,l,c)=>{this.agGridDefaults[r]=a,(l||c)&&(this.agGridDefaultOverrides[r]={params:l,processParams:c})};for(const r of Object.keys(s)){let a=s[r];if(Nb(a)&&(a=a.getComp(this.beans)),typeof a=="object"){const{classImp:l,params:c,processParams:d}=a;n(r,l,c,d)}else n(r,a)}}this.registerDynamicBeans(o);for(const n of i??[])this.selectors[n.selector]=n;if(t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const s=(a,l,c,d)=>({componentFromFramework:l,component:a,params:c,processParams: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 a=o.isFrameworkComponent(n);return s(n,a)}const r=this.agGridDefaults[t];if(r){const a=this.agGridDefaultOverrides[t];return s(r,!1,a?.params,a?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?Pt(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??Pt(256)}},p2=23,f2=class extends T{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(const e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===p2&&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}},m2='.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-virtual-list-item{height:var(--ag-list-item-height);position:absolute;width:100%}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',C2={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:Pe,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:ut,rangeSelectionBackgroundColor:yt(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:yt(.5),rangeHeaderHighlightColor:w0(.08),rowNumbersSelectedColor:yt(.5),rowHoverColor:yt(.08),columnHoverColor:yt(.05),selectedRowBackgroundColor:yt(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:Pe,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:$e(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:$e(.1),iconButtonActiveColor:ut,iconButtonActiveBackgroundColor:yt(.28),iconButtonActiveIndicatorColor:ut,menuBorder:{color:$e(.2)},menuBackgroundColor:Ge(.03),menuTextColor:Ge(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:$e(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:ut},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},dialogBorder:{color:$e(.2)},panelBackgroundColor:Pe,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:$e(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:$e(.13)},selectCellBackgroundColor:$e(.07),selectCellBorder:{color:$e(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:Pe,filterPanelApplyButtonBackgroundColor:ut,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:Nt,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:Nt,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:$e(.15),statusBarLabelColor:Nt,statusBarLabelFontWeight:500,statusBarValueColor:Nt,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"}},v2=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",Tg={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},w2={...Tg,cellBatchEditTextColor:"#f3d0b3"},b2=()=>qe({feature:"batchEditStyle",params:Tg,css:v2}),S2=b2(),Mg=":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)}}",Ig={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"}},y2=()=>qe({feature:"buttonStyle",params:{...Ig,buttonBackgroundColor:Pe,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:ut}},css:Mg}),R2=y2(),x2=()=>qe({feature:"buttonStyle",params:{...Ig,buttonBorder:{color:Nt,width:2,style:"outset"},buttonActiveBorder:{color:Nt,width:2,style:"inset"},buttonBackgroundColor:Ge(.07),buttonHoverBackgroundColor:Pe,buttonVerticalPadding:{calc:"spacing * 0.5"}},css:Mg}),F2=x2(),E2=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",D2=".ag-column-drop-vertical-empty-message{color:var(--ag-subtle-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600;padding-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-empty-message{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing));padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-empty-message{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing))}",P2=()=>qe({feature:"columnDropStyle",css:E2}),kg=P2(),T2=()=>qe({feature:"columnDropStyle",css:D2}),M2=T2(),I2={warn:(...e)=>{H(e[0],e[1])},error:(...e)=>{pe(e[0],e[1])},preInitErr:(...e)=>{Go(e[0],e[2],e[1])}},Ag=()=>M0(I2).withParams(C2).withPart(R2).withPart(kg).withPart(S2),k2='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',A2=()=>qe({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:Pe,checkboxUncheckedBorderColor:Ge(.3),checkboxCheckedBackgroundColor:ut,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:Pe,checkboxIndeterminateBackgroundColor:Ge(.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:Pe,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:k2}),Lg=A2(),Rl=()=>({...Cn,...w2,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Ge(.05),rowHoverColor:yt(.15),selectedRowBackgroundColor:yt(.2),menuBackgroundColor:Ge(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:Nt,findMatchColor:Pe,findActiveMatchColor:Pe,checkboxUncheckedBorderColor:Ge(.4),toggleButtonOffBackgroundColor:Ge(.4),rowBatchEditBackgroundColor:Ge(.1)}),L2=()=>qe({feature:"colorScheme",params:Rl()}),O2=L2(),H2=()=>({...Rl(),backgroundColor:"#1f2836"}),N2=()=>qe({feature:"colorScheme",params:Cn,modeParams:{light:Cn,dark:Rl(),"dark-blue":H2()}}),Og=N2(),G2=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M22 12h-2v-2h-8v.092c.056 1.352 3.426 2.598 4.472 4.404.682 1.174.438 2.754-.572 3.72C14.29 19.618 12 20.924 12 22h8v-2h2v4H10c0-1.586-.098-3.304 1.016-4.314 1.904-1.632 4.89-3.108 3.54-4.42-1.918-1.68-4.464-2.936-4.554-5.12L10 8h12z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='m6.414 17 2.294 2.292-1.416 1.416L2.586 16l4.706-4.708 1.416 1.416L6.414 15H15V6.414l-2.292 2.294-1.416-1.416L16 2.586l4.708 4.706-1.416 1.416L17 6.414V15h8.586l-2.294-2.292 1.416-1.416L29.414 16l-4.706 4.708-1.416-1.416L25.586 17H17v8.586l2.292-2.294 1.416 1.416L16 29.414l-4.708-4.706 1.416-1.416L15 25.586V17z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 4C9.378 4 4 9.378 4 16s5.378 12 12 12 12-5.378 12-12S22.622 4 16 4m0 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S6 21.52 6 16 10.48 6 16 6m0 8.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M14 25h-2V7h2zm6 0h-2V7h2zm6 0h-2V7h2zM8 25H6V7h2z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M21.929 27.999h-7.828a5.09 5.09 0 0 1-5.086-5.086v-9.812a5.087 5.087 0 0 1 5.086-5.086h7.828a5.09 5.09 0 0 1 5.086 5.086v9.812a5.087 5.087 0 0 1-5.086 5.086m.16-17.984h-8.088a2.94 2.94 0 0 0-2.938 2.938v10.132a2.94 2.94 0 0 0 2.938 2.938h8.088a2.94 2.94 0 0 0 2.936-2.938V12.953a2.94 2.94 0 0 0-2.936-2.938M7.041 26.013h-2.05a4 4 0 0 1-.006-.228V9.065a5.07 5.07 0 0 1 5.064-5.064h12.812q.069 0 .134.002v2.012H9.915a2.876 2.876 0 0 0-2.874 2.874z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 24 24'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m16 14.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14.703 15.096 6.215 4.719a1 1 0 1 1 1.548-1.267l13.058 15.965A5.001 5.001 0 0 1 28 23.916a5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 4.98 4.98 0 0 1 1.23-3.283l-3.238-3.958-3.272 4.001a4.98 4.98 0 0 1 1.265 3.323 5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 5 5 0 0 1 7.13-4.522zM8.991 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M23 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1m-5.723-8.852 1.292 1.579 7.205-8.808a1 1 0 0 0-1.548-1.267z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M9.304 7.89a15.2 15.2 0 0 1 6.404-1.638c.294-.002.292-.002.584 0 5.956.174 11.328 4.088 13.62 9.748 0 0-1.318 3.178-3.224 5.174a13.6 13.6 0 0 1-2.226 1.874L26.414 25 25 26.414l-2.336-2.336C17.866 26.396 11.776 26.15 7.36 22.96a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.218 2.002-3.718a14.6 14.6 0 0 1 3.442-3.334L5.586 7 7 5.586zm-.3 2.528c-2.038 1.344-3.708 3.246-4.724 5.508L4.248 16c2.46 5.762 9.622 9.064 15.63 7.15q.688-.219 1.342-.516l-.912-.912a6.96 6.96 0 0 1-4.19 1.394c-3.862 0-7-3.136-7-7 0-1.57.52-3.022 1.394-4.19zm14.032 11.204a13.25 13.25 0 0 0 4.684-5.548l.032-.074c-1.984-4.646-6.834-7.798-12.006-7.748-1.712.05-3.386.458-4.922 1.158l1.102 1.102a6.97 6.97 0 0 1 4.192-1.396 7.003 7.003 0 0 1 5.606 11.192zm-11.09-8.262a5.003 5.003 0 0 0 6.928 6.928zm8.342 5.514a5.002 5.002 0 0 0-6.928-6.928z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16.292 6.32c5.956.174 11.328 4.086 13.62 9.746 0 0-1.318 3.18-3.224 5.176-4.862 5.088-13.534 5.97-19.328 1.784a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.216 2.002-3.716 2.678-3.64 7.03-5.896 11.618-6.03.294-.004.292-.004.584 0m-.546 2c-4.896.142-9.458 3.202-11.466 7.672l-.032.074c2.46 5.762 9.622 9.066 15.63 7.152 3.458-1.102 6.342-3.738 7.842-7.076l.032-.076C25.768 11.42 20.918 8.27 15.746 8.32m.254.946c3.754 0 6.8 3.048 6.8 6.8 0 3.754-3.046 6.8-6.8 6.8s-6.8-3.046-6.8-6.8c0-3.752 3.046-6.8 6.8-6.8m5 6.768V16c0-2.76-2.24-5-5-5s-5 2.24-5 5v.066c0 2.76 2.24 5 5 5s5-2.24 5-5z'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M26 8.184c-.066 2.658-4.058 5.154-6.742 7.974a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h20zM8 8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.066-2.658 4.058-5.154 6.742-7.974.198-.23.258-.538.258-.842z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.354 8.708 17.06 16l7.294 7.292-1.416 1.416L14.232 16l8.706-8.708zM9.646 8v16h-2V8z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M14 21h-4v-2h4zm12 0H16v-2h10zm-12-4h-4v-2h4zm12 0H16v-2h10zm-16-4H6v-2h4zm16 0H12v-2h14z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m17.768 16-8.706 8.708-1.416-1.416L14.94 16 7.646 8.708l1.416-1.416zm6.586 8h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='m17.621 11-2 2h12.586v6H15.621l2 2-4.414 4.414L3.793 16l9.414-9.414zm-11 5 6.586 6.586L14.793 21l-4-4h15.414v-2H10.793l4-4-1.586-1.586z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M17.138 13.418a1.03 1.03 0 0 0-.298.658s.125.096.226.178c1.372 1.114 2.033 3.039 1.582 4.796a4.7 4.7 0 0 1-1.205 2.123c-1.145 1.151-2.296 2.294-3.445 3.441-1.241 1.232-3.185 1.691-4.864 1.105-1.546-.54-2.756-1.938-3.048-3.572-.267-1.496.246-3.108 1.319-4.186l.578-.578-.03-.092a10.5 10.5 0 0 1-.452-2.3v-.005c-.776.775-1.621 1.489-2.275 2.396-1.817 2.522-1.643 6.323.706 8.669 1.813 1.811 4.708 2.462 7.171 1.517a6.75 6.75 0 0 0 2.336-1.518l3.427-3.424c1.939-1.954 2.533-5.126 1.294-7.674a6.8 6.8 0 0 0-2.071-2.481l-.003-.002zM21.265 4a6.8 6.8 0 0 0-4.734 1.964l-3.427 3.424c-1.961 1.977-2.52 5.092-1.32 7.619a6.8 6.8 0 0 0 2.098 2.537l.003.002c.32-.32.643-.637.96-.96.167-.172.27-.401.286-.64l-.204-.167c-1.603-1.287-2.215-3.68-1.316-5.616a4.7 4.7 0 0 1 .918-1.32c1.145-1.151 2.296-2.294 3.445-3.441 1.239-1.23 3.178-1.694 4.864-1.105 1.83.639 3.16 2.498 3.12 4.493a4.8 4.8 0 0 1-1.391 3.265l-.578.578.03.092c.235.743.387 1.519.452 2.3v.005c.732-.731 1.521-1.406 2.162-2.244 1.192-1.559 1.643-3.651 1.204-5.575a6.8 6.8 0 0 0-3.98-4.703 6.8 6.8 0 0 0-2.529-.506h-.061z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='m7.54 17.4.1 6.98 6.96.1-2.24-2.24L16 18.6 13.4 16l-3.64 3.64zm16.92-2.8-.1-6.98-6.96-.1 2.24 2.24L16 13.4l2.6 2.6 3.64-3.64z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M26 23H6v-2h20zm0-6H6v-2h20zm0-6H6V9h20z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath fill='%23000' d='M16 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='m14.8 24.26-.1-6.96-6.96-.1 2.24 2.24-3.64 3.64 2.6 2.6 3.64-3.64zm2.4-16.52.1 6.96 6.96.1-2.24-2.24 3.64-3.64-2.6-2.6-3.64 3.64z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142m-1.414 6.07h16.97v2.002H7.515z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='m10.044 21.258 4.478-4.198L16 18.444 9 25l-7-6.556 1.478-1.384 4.478 4.198V7h2.088zm14 3.742h-2.088V10.742l-4.478 4.198L16 13.556 23 7q3.5 3.28 7 6.556l-1.478 1.384-4.478-4.198z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16.186 3.646c8.188.154 14.898 9.796 11.17 17.78-3.298 7.066-13.932 9.374-19.848 3.87-3.9-3.632-5.076-9.896-2.684-14.708 2.082-4.19 6.588-6.974 11.362-6.942m-.298 1.998c-6.922.132-12.578 8.308-9.33 15.052 3.342 6.934 15.246 7.646 18.932 0 3.076-6.386-1.988-15.1-9.602-15.052m7.596 6.422c2.864 5.33-1.744 13.186-8.306 12.536a8.6 8.6 0 0 1-3.232-.998l-1.266-.706L22.778 10.8q.351.633.706 1.266m-9.422 10.276c3.296 1.028 7.246-1.006 8.216-4.418a6.6 6.6 0 0 0-.056-3.742zm2.104-14.696a8.8 8.8 0 0 1 3.936 1.038l1.266.706L9.27 21.488c-3.018-5.41-.99-13.37 6.318-13.834q.289-.01.578-.008m-.31 2c-4.06.154-7.23 4.614-6.03 8.46l8.16-8.16a6.8 6.8 0 0 0-2.13-.3'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M20 6.5c0-1-1-3-4-3s-4 2-4 3H8c-2.21 0-4 1.79-4 4v14c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-14c0-2.21-1.79-4-4-4zm-4 .546c.734 0 1.334.572 1.334 1.272S16.734 9.59 16 9.59s-1.334-.572-1.334-1.272.6-1.272 1.334-1.272M24 26.5H8a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h2v4h12v-4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008c-1.358-.022-2.714-.026-4.07-.022v4.034h4.07z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142M15 15l-.001-7.485h2.002L17 15l7.485-.001v2.002L17 17l.001 7.485h-2.002L15 17l-7.485.001v-2.002z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m28.207 16-9.414 9.414L14.379 21l2-2H3.793v-6h12.586l-2-2 4.414-4.414zm-11-5 4 4H5.793v2h15.414l-4 4 1.586 1.586L25.379 16l-6.586-6.586z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='m24.708 19.645-1.416 1.416L16 13.767l-7.292 7.294-1.416-1.416L16 10.939z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='M24.708 10.855 13 22.561l-5.708-5.706 1.416-1.416L13 19.733 23.292 9.439z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6 15h20v2H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M5.35 3.999a.2.2 0 0 0-.14.058c-.388.38-.768.768-1.152 1.152a.21.21 0 0 0-.002.288c7.459 7.506 14.965 14.965 22.447 22.447a.21.21 0 0 0 .288.002q.576-.574 1.151-1.151a.21.21 0 0 0 .002-.288C20.484 19.002 12.979 11.542 5.497 4.06a.2.2 0 0 0-.146-.061zm.611 12.548c-1.933 1.939-2.538 5.119-1.289 7.688a6.79 6.79 0 0 0 4.891 3.672 6.82 6.82 0 0 0 5.893-1.866l1.984-1.984-1.438-1.438-1.986 1.986c-1.486 1.476-3.993 1.81-5.834.629a4.73 4.73 0 0 1-2.024-2.853 4.76 4.76 0 0 1 1.241-4.393l1.986-1.986-1.438-1.438-1.984 1.984zM21.273 3.999a6.78 6.78 0 0 0-4.727 1.963l-1.984 1.984L16 9.384l1.985-1.985a4.74 4.74 0 0 1 2.776-1.338c1.974-.224 4.045.926 4.845 2.834.712 1.699.329 3.778-1.004 5.12L22.616 16l1.439 1.438q1-1 2-2c2.012-2.031 2.557-5.368 1.112-7.982-1.144-2.07-3.432-3.441-5.834-3.459h-.061z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M23.182 5a3.82 3.82 0 0 1 2.83 6.383l-.131.137-2.09 2.088a1 1 0 0 1-.084.099 1 1 0 0 1-.098.084L12.533 24.869a3 3 0 0 1-1.245.746l-4.353 1.32-.003.002a1.5 1.5 0 0 1-1.87-1.867l.003-.004 1.32-4.352v-.003l.06-.174c.13-.344.321-.661.565-.936l.126-.135L18.209 8.39a1 1 0 0 1 .18-.181l2.092-2.09.137-.132A3.82 3.82 0 0 1 23.182 5M8.548 20.883a1 1 0 0 0-.25.415l-1.049 3.451 3.457-1.048.114-.042q.17-.076.301-.206l10.458-10.46-2.572-2.572zM23.182 7c-.482 0-.946.19-1.287.531v.001l-1.474 1.475 2.572 2.572 1.474-1.474.121-.133A1.82 1.82 0 0 0 23.182 7'/%3E%3C/svg%3E")}`,V2=qe({feature:"iconSet",css:G2}),Hg={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"/>'},Ng={"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>'},B2=(e={})=>{let t="";for(const s of[...Object.keys(Hg),...Object.keys(Ng)]){const o=z2(s,e.strokeWidth);t+=`.ag-icon-${s}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(o)}'); }
18
+ `}return t},z2=(e,t=1.5)=>{const s=Ng[e];if(s)return s;const o=Hg[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>"},W2=(e={})=>qe({feature:"iconSet",css:()=>B2(e)}),_2=W2(),U2=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',j2=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",$2={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},K2=()=>qe({feature:"inputStyle",params:{...$2,inputBackgroundColor:Pe,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:ut},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Ge(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>U2+j2}),Gg=K2(),Vg='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}',q2=".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}",Bg={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},Y2=()=>qe({feature:"tabStyle",params:{...Bg,tabBarBorder:!0,tabBarBackgroundColor:$e(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:Pe},css:Vg}),Z2=Y2(),Q2=()=>qe({feature:"tabStyle",params:{...Bg,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:Pe},css:()=>Vg+q2}),X2=Q2(),J2=()=>Ag().withPart(Lg).withPart(Og).withPart(_2).withPart(Z2).withPart(Gg).withPart(kg).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),eF=J2(),tF=()=>Ag().withPart(F2).withPart(Lg).withPart(Og).withPart(V2).withPart(X2).withPart(Gg).withPart(M2).withParams({accentColor:"#0091ea",borderColor:$e(.2),spacing:4,widgetVerticalSpacing:{calc:"max(8px, spacing)"},borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},checkboxBorderRadius:2,checkboxBorderWidth:1,checkboxUncheckedBackgroundColor:Pe,checkboxUncheckedBorderColor:Ge(.5),checkboxCheckedBackgroundColor:Pe,checkboxCheckedBorderColor:ut,checkboxCheckedShapeColor:ut,checkboxIndeterminateBackgroundColor:Pe,checkboxIndeterminateBorderColor:Ge(.5),checkboxIndeterminateShapeColor:Ge(.5),focusShadow:{radius:2,spread:1,color:ut},headerTextColor:$e(.6),iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",fontSize:12,tabSelectedBackgroundColor:Pe,headerFontWeight:"bold",toggleButtonWidth:32,toggleButtonHeight:16,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:Ge(.5),sideButtonBorder:!0,sideButtonBarTopPadding:{calc:"spacing * 4"},popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)",statusBarLabelColor:$e(.54),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,panelTitleBarIconColor:Nt,colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),sF=tF(),oF={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},iF={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},nF={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},id={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},nd={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},rd={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},Dr={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},ad={cssName:"--ag-pinned-row-border",changeKey:"pinnedRowBorderWidthChanged",defaultValue:1,border:!0};function rF(e,t){for(const s of t.sort((o,i)=>o.moduleName.localeCompare(i.moduleName))){const o=s.css;o&&e.set(`module-${s.moduleName}`,o)}}var aF=class extends G0{constructor(){super(...arguments),this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1}initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(id),this.getSizeEl(nd),this.getSizeEl(rd),this.getSizeEl(Dr),this.getSizeEl(ad),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(ad)}getRowBorderWidth(){return this.getCSSVariablePixelValue(Dr)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(id)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(nd)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(oF)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(iF),s=this.getCSSVariablePixelValue(nF);return e-1+s*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(rd)}refreshRowHeightVariable(){const{eRootDiv: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!=""?Number.parseFloat(t):-1}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===Pr?"no-styles":(this.sizesMeasured=!0,s)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Ye({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const s=this.getMeasurementContainer();t=Ye({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 ${Pr}px)`)):t.style.width=`var(${e.cssName}, ${Pr}px)`,s.appendChild(t),this.sizeEls.set(e,t);let n=this.measureSizeEl(e);n==="no-styles"&&!i&&H(9,{variable:e});const r=Kt(this.beans,t,()=>{const a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==n&&(n=a,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(Dr);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&pe(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",[m2]),rF(e,Array.from(n1())),e}getDefaultTheme(){return eF}themeError(e){pe(240,{theme:e})}},Pr=15538,lF=class extends B0{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function zg(e,t,s){const o=e.visibleCols.headerGroupRowCount;if(s>=o)return{column:t,headerRowIndex:s};let i=t.getParent();for(;i&&i.getProvidedColumnGroup().getLevel()>s;)i=i.getParent();const n=t.isSpanHeaderHeight();return!i||n&&i.isPadding()?{column:t,headerRowIndex:o}:{column:i,headerRowIndex:i.getProvidedColumnGroup().getLevel()}}var cF=class extends T{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=Le(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 a=n.getHeaderRowContainerCtrl()?.getAllCtrls(),l=fe(a||[]).type==="filter",c=Et(this.beans)-1;let d=-1,u=s;for(;u;)d++,u=u.getParent();let h=d;return t&&l&&h===c-1&&h++,h===-1?null:{headerRowIndex:h,column:s}}navigateVertically(e,t){const{focusSvc:s,visibleCols:o}=this.beans,{focusedHeader:i}=s;if(!i)return!1;const{headerRowIndex:n}=i,r=i.column,a=Et(this.beans),l=this.getHeaderRowType(n),c=o.headerGroupRowCount;let{headerRowIndex:d,column:u,headerRowIndexWithoutSpan:h}=e==="UP"?dF(l,r,n):uF(r,n,c),g=!1;return d<0&&(d=0,u=r,g=!0),d>=a?(d=-1,this.currentHeaderRowWithoutSpan=-1):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!g&&!u?!1:s.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,s){const{focusSvc:o,gos:i}=this.beans,n={...o.focusedHeader};let r,a;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==i.get("enableRtl")?(a="Before",r=this.findHeader(n,a)):(a="After",r=this.findHeader(n,a));const l=i.getCallback("tabToNextHeader");if(t&&l){const c=o.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(c){const{headerRowIndex:d}=o.focusedHeader||{};d!=null&&d!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=d)}return c}return r||!t?o.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:s}):this.focusNextHeaderRow(n,a,s)}focusNextHeaderRow(e,t,s){const o=this.beans,i=e.headerRowIndex;let n=null,r;const a=Et(o),l=this.beans.visibleCols.allCols;if(t==="Before"){if(i<=0)return!1;n=fe(l),r=i-1,this.currentHeaderRowWithoutSpan-=1}else n=l[0],r=i+1,this.currentHeaderRowWithoutSpan<a?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:c,headerRowIndex:d}=zg(this.beans,n,r);return d>=a&&(d=-1),o.focusSvc.focusHeaderPosition({headerPosition:{column:c,headerRowIndex:d},direction:t,fromTab:!0,allowUserOverride:!0,event:s})}scrollToColumn(e,t="After"){if(e.getPinned())return;let s;if(Ee(e)){const o=e.getDisplayedLeafColumns();s=t==="Before"?fe(o):o[0]}else s=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(s)}findHeader(e,t){const{colGroupSvc:s,visibleCols:o}=this.beans;let i=e.column;if(i instanceof di){const l=i.getDisplayedLeafColumns();i=t==="Before"?l[0]:l[l.length-1]}const n=t==="Before"?o.getColBefore(i):o.getColAfter(i);if(!n)return;const r=o.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:n};const a=s?.getColGroupAtLevel(n,e.headerRowIndex);return a?a.isPadding()&&n.isSpanHeaderHeight()?{headerRowIndex:o.headerGroupRowCount,column:n}:{headerRowIndex:e.headerRowIndex,column:a??n}:{headerRowIndex:n instanceof Ws&&n.isSpanHeaderHeight()?o.headerGroupRowCount:e.headerRowIndex,column:n}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function dF(e,t,s){const o=s-1;if(e!=="filter"){const i=t instanceof Ws&&t.isSpanHeaderHeight();let n=t.getParent();for(;n&&(n.getProvidedColumnGroup().getLevel()>o||i&&n.isPadding());)n=n.getParent();if(n)return i?{column:n,headerRowIndex:n.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:o}:{column:n,headerRowIndex:o,headerRowIndexWithoutSpan:o}}return{column:t,headerRowIndex:o,headerRowIndexWithoutSpan:o}}function uF(e,t,s){const o=t+1,i={column:e,headerRowIndex:o,headerRowIndexWithoutSpan:o};if(e instanceof di){if(o>=s)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:s,headerRowIndexWithoutSpan:o};let r=e.getDisplayedChildren()[0];if(r instanceof di&&r.isPadding()){const l=r.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(r=l)}i.column=r,r instanceof Ws&&r.isSpanHeaderHeight()&&(i.headerRowIndex=s,i.headerRowIndexWithoutSpan=o)}return i}var hF=class extends T{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($b(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(ye(this.beans),gg)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=ye(this.beans);return this.isDomDataPresentInHierarchy(e,vn)?!0:this.isDomDataPresentInHierarchy(e,wn)}isDomDataPresentInHierarchy(e,t){let s=e;for(;s;){if(nh(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,sourceEvent:r}=e,a=this.colModel.getCol(t);if(!a){this.focusedCell=null;return}this.focusedCell={rowIndex:s,rowPinned:Bt(o),column:a};const l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:i,preventScrollOnBrowserFocus:n,sourceEvent:r}),this.previousCellFocusParams=l}isCellFocused(e){return this.focusedCell==null?!1:Sg(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(),Ts(this.beans))return!1;const{direction:t,fromTab:s,allowUserOverride:o,event:i,fromCell:n,rowWithoutSpanValue:r,scroll:a=!0}=e;let{headerPosition:l}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(l);if(o){const c=this.focusedHeader,d=Et(this.beans);if(s){const u=this.gos.getCallback("tabToNextHeader");u&&(l=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:c,headerPosition:l,headerRowCount:d}))}else{const u=this.gos.getCallback("navigateToNextHeader");if(u&&i){const h={key:i.key,previousHeaderPosition:c,nextHeaderPosition:l,headerRowCount:d,event:i};l=u(h)}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:i,fromCell:n,rowWithoutSpanValue:r,scroll:a}):!1}focusHeaderPositionFromUserFunc(e){if(Ts(this.beans))return!1;const{userFunc:t,headerPosition:s,direction:o,event:i}=e,n=this.focusedHeader,r=Et(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:o,currentPosition:n,headerPosition:s,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:o,event:i})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:s,currentPosition:o,headerPosition:i,headerRowCount:n}=e,a=t({backwards:s==="Before",previousHeaderPosition:o,nextHeaderPosition:i,headerRowCount:n});return a===!0?o:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:s,fromCell:o,rowWithoutSpanValue:i,event:n,scroll:r=!0}=e,{column:a,headerRowIndex:l}=t,{filterManager:c,ctrlsSvc:d,headerNavigation:u}=this.beans;if(this.focusedHeader&&uy(e.headerPosition,this.focusedHeader))return!1;if(l===-1)return c?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:a,event:n});r&&u?.scrollToColumn(a,s);const g=d.getHeaderRowContainerCtrl(a.getPinned())?.focusHeader(t.headerRowIndex,a,n)||!1;return u&&g&&(i!=null||o)&&(u.currentHeaderRowWithoutSpan=i??-1),g}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=zg(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const t=Et(this.beans)-1,s=fe(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===Bt(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&Hs(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:s=!0,event:o}=e;if(this.overlays?.isExclusive())return s&&this.focusOverlay(t);if(_n(this.beans))return t&&!Ts(this.beans)?this.focusLastHeader():s&&this.focusOverlay(t)?!0:t?!1:bo(this.beans,t);const i=t?yR(this.beans):SR(this.beans);if(i){const n=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:a}=i,l=jt(this.beans,i);if(!n||!l||r==null)return!1;if(n.isSuppressNavigable(l)){const c=this.gos.get("enableRtl");let d;return!o||o.key===E.TAB?d=c?E.LEFT:E.RIGHT:d=o.key,this.beans.navigation?.navigateToNextCell(null,d,{rowIndex:r,column:n,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:r,column:n,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(i)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(i,t)||(this.setFocusedCell({rowIndex:r,column:n,rowPinned:Bt(a),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:a,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:Et(this.beans)-1}}):this.focusGridView({column:s})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},gF=class extends T{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.horizontalScrollShowing=this.gos.get("alwaysShowHorizontalScroll")===!0,this.verticalScrollShowing=this.gos.get("alwaysShowVerticalScroll")===!0,this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e?.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:Vb();s!=null&&(this.scrollbarWidth=s,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},pF=class extends T{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()}},Zi=new Set(["gridPreDestroyed","fillStart","pasteStart"]),fF=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"],xl=fF.reduce((e,t)=>(e[t]=P1(t),e),{}),Ao=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),mF={tag:"span",cls:"ag-sort-indicator-container",children:[Ao("Order","order"),Ao("Asc","ascending-icon"),Ao("Desc","descending-icon"),Ao("Mixed","mixed-icon"),Ao("None","none-icon")]},Fl=class extends Re{constructor(e){super(),this.eSortOrder=q,this.eSortAsc=q,this.eSortDesc=q,this.eSortMixed=q,this.eSortNone=q,e||this.setTemplate(mF)}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=ht(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&&Se(e,r==="asc",{skipAriaHidden:!0}),t&&Se(t,r==="desc",{skipAriaHidden:!0}),s){const a=!o.getColDef().unSortIcon&&!i.get("unSortIcon"),l=r==null;Se(s,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:s}=this;this.addInIcon("sortUnSort",e,t);const o=t.getColDef().showRowGroup;Rt(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";Se(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(a=>s.getDisplaySortIndexForColumn(a)??!1),r=i>=0&&n;Se(e,r,{skipAriaHidden:!0}),i>=0?e.textContent=(i+1).toString():Xe(e)}},CF={selector:"AG-SORT-INDICATOR",component:Fl},hi=["asc","desc",null],vF=class extends T{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=Rt(i);let a=[e];if(r&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(a=[e,...u])}for(const d of a)this.setColSort(d,t,o);const l=(s||i.get("alwaysMultiSort"))&&!i.get("suppressMultiSort"),c=[];if(!l){const d=this.clearSortBarTheseColumns(a,o);c.push(...d)}this.updateSortIndex(e),c.push(...a),this.dispatchSortChangedEvents(o,c)}updateSortIndex(e){const{gos:t,colModel:s,showRowGroupCols:o}=this.beans,i=Rt(t),n=o?.getShowRowGroupCol(e.getId()),r=i&&n||e,a=this.getColumnsWithSortingOrdered();s.forAllCols(d=>this.setColSortIndex(d,null));const l=a.filter(d=>i&&d.getColDef().showRowGroup?!1:d!==r);(r.getSort()?[...l,r]:l).forEach((d,u)=>this.setColSortIndex(d,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")??hi,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(c=>{c.getSort()&&i.push(c)}),t.isPivotMode()){const c=Rt(e);i=i.filter(d=>{const u=!!d.getAggFunc(),h=!d.isPrimary(),g=c?s?.getShowRowGroupCol(d.getId()):d.getColDef().showRowGroup;return u||h||g})}const n=o?.columns.filter(c=>!!c.getSort())??[],r={};i.forEach((c,d)=>r[c.getId()]=d),i.sort((c,d)=>{const u=c.getSortIndex(),h=d.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){const g=r[c.getId()],f=r[d.getId()];return g>f?1:-1}else return h==null?-1:1});const a=Rt(e)&&!!n.length;a&&(i=[...new Set(i.map(c=>s?.getShowRowGroupCol(c.getId())??c))]);const l=new Map;if(i.forEach((c,d)=>l.set(c,d)),a)for(const c of n){const d=s.getShowRowGroupCol(c.getId());l.set(c,l.get(d))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=Rt(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(),l=Date.now()-o<50;r||l||this.progressSortFromEvent(t,n)}});const i=()=>{const n=t.getSort();if(e.toggleCss("ag-header-cell-sorted-asc",n==="asc"),e.toggleCss("ag-header-cell-sorted-desc",n==="desc"),e.toggleCss("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(c=>t.getSort()==c.getSort());e.toggleCss("ag-header-cell-sorted-mixed",l)}};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 Fl(e)}getSortIndicatorSelector(){return CF}},ho={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function ld(e){return`"${e}"`}var wF=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}}),bF={aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t})=>t?typeof e=="string"?ho[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:ho[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?ho[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(s=>t.includes(s))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},SF=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:s})=>s?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,s)=>s.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:s})=>s==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:s})=>s==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:s})=>s==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const s=t.headerValueGetter;return typeof s=="function"||typeof s=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Pt(262);if(t.smallLeft)return Pt(263);if(t.smallRight)return Pt(264)}return null}},sortingOrder:{validate:t=>{const s=t.sortingOrder;if(Array.isArray(s)&&s.length>0){const o=s.filter(i=>!hi.includes(i));if(o.length>0)return`sortingOrder must be an array with elements from [${hi.map(an).join()}], currently it includes [${o.map(an).join()}]`}else if(!Array.isArray(s)||s.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${s}`;return null}},type:{validate:t=>{const s=t.type;return s instanceof Array?s.some(i=>typeof i!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof s=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:s})=>s?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:s,cellSelection:o,suppressRowTransform:i,enableCellSpan:n,rowDragEntireRow:r,enableCellTextSelection:a})=>typeof s=="object"&&s?.mode==="singleRow"&&s?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":o?"colDef.spanRows is not supported with cellSelection.":i?"colDef.spanRows is not supported with suppressRowTransform.":n?r?"colDef.spanRows is not supported with rowDragEntireRow.":a?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:s={}},o){const i=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),n=[];for(const r of t.groupHierarchy??[]){if(typeof r=="object"){o.validation?.validateColDef(r);continue}!i.has(r)&&!(r in s)&&n.push(ld(r))}if(n.length>0){const r=`The following parts of colDef.groupHierarchy are not recognised: ${n.join(", ")}.`,a=`Choose one of ${[...i].map(ld).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${r}
19
+ ${a}`}return null}}}),yF={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0},RF=()=>Object.keys(yF),xF=()=>({objectName:"colDef",allProperties:RF(),docsUrl:"column-properties/",deprecations:wF(),validations:SF()}),FF=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],EF=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],DF=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],Wg=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],PF=["theme","rowSelection"],TF=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],_g=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows"],MF=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],IF=()=>[...DF,...EF,...FF,...Wg,...MF,..._g,...TF,...PF],kF=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}});function bt(e,t,s){return typeof t=="number"||t==null?t==null||t>=s?null:`${e}: value should be greater than or equal to ${s}`:`${e}: value should be a number`}var AF={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},LF=()=>{const e={autoSizePadding:{validate({autoSizePadding:s}){return bt("autoSizePadding",s,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:s}){return bt("cacheBlockSize",s,1)}},cacheOverflowSize:{validate({cacheOverflowSize:s}){return bt("cacheOverflowSize",s,1)}},datasource:{supportedRowModels:["infinite"]},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}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:s,pinnedTopRowData:o,pinnedBottomRowData:i}){return s&&(o||i)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:s,isRowPinnable:o,pinnedTopRowData:i,pinnedBottomRowData:n}){return o&&(i||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!s&&o?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:s,isRowPinned:o,pinnedTopRowData:i,pinnedBottomRowData:n}){return o&&(i||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!s&&o?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:s={}},o,i){for(const n of Object.keys(s))i.validation?.validateColDef(s[n]);return null}},icons:{validate:({icons:s})=>{if(s){if(s.smallDown)return Pt(262);if(s.smallLeft)return Pt(263);if(s.smallRight)return Pt(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:s}){return bt("infiniteInitialRowCount",s,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:s=>{if(typeof s.ssrmExpandAllAffectsAllRows=="boolean"){if(s.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(s.ssrmExpandAllAffectsAllRows&&typeof s.getRowId!="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:s}){return bt("keepDetailRowsCount",s,1)}},paginationPageSize:{validate({paginationPageSize:s}){return bt("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.
20
+ If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:s}){return bt("rowBuffer",s,0)}},rowClass:{validate:s=>typeof s.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection: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}},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}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:s}){return bt("serverSideInitialRowCount",s,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:s=>{const o=s.sortingOrder;if(Array.isArray(o)&&o.length>0){const i=o.filter(n=>!hi.includes(n));if(i.length>0)return`sortingOrder must be an array with elements from [${hi.map(an).join()}], currently it includes [${i.map(an).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}},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"],validate:s=>{const o=s.rowModelType??"clientSide";switch(o){case"clientSide":{const{treeDataChildrenField:i,treeDataParentIdField:n,getDataPath:r,getRowId:a}=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(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const i=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${o} row model.`;return s.isServerSideGroup&&s.getServerSideGroupKey?null:i}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:s}){return bt("viewportRowModelBufferSize",s,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:s}){return bt("viewportRowModelPageSize",s,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},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}},renderingMode:{validate:s=>{const o=s.renderingMode,i=["default","legacy"];return o&&!i.includes(o)?`renderingMode must be one of [${i.join()}], currently it's ${o}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:s})=>{if(!s)return null;const o=["fitCellContents","fitGridWidth","fitProvidedWidth"],i=s.type;return i!=="fitCellContents"&&i!=="fitGridWidth"&&i!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${o.map(n=>'"'+n+'"').join(", ")}, currently it's ${i}`:i==="fitProvidedWidth"&&typeof s.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${s.width}`:null}}},t={};for(const s of _g)t[s]={expectedType:"boolean"};for(const s of Wg)t[s]={expectedType:"number"};return Ke(t,e),t},OF=()=>({objectName:"gridOptions",allProperties:[...IF(),...Object.values(xl)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:kF(),validations:LF()}),HF=0,NF=0,cd="__ag_grid_instance",GF=class extends T{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=NF++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new ks,this.globalEventHandlerFactory=e=>(t,s)=>{if(!this.isAlive())return;const o=Zi.has(t);if(o&&!e||!o&&e||!VF(t))return;const i=(n,r)=>{const a=xl[n],l=this.gridOptions[a];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(r))};if(this.gridReadyFired)i(t,s);else if(t==="gridReady"){i(t,s),this.gridReadyFired=!0;for(const n of this.queueEvents)i(n.eventName,n.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:s})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??qu[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return V(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(s=>e(this.addCommon(s)))}updateGridOptions({options:e,force:t,source:s="api"}){const o={id:HF++,properties:[]},i=[],{gridOptions:n,validation:r}=this;for(const a of Object.keys(e)){const l=el.applyGlobalGridOption(a,e[a]);r?.warnOnInitialPropertyUpdate(s,a);const c=t||typeof l=="object"&&s==="api",d=n[a];if(c||d!==l){n[a]=l;const u={type:a,currentValue:l,previousValue:d,changeSet:o,source:s};i.push(u)}}this.validateGridOptions(this.gridOptions),o.properties=i.map(a=>a.type);for(const a of i)Ls(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const s of Object.keys(e)){const o=e[s];if(o==null||o===!1)continue;let i=t[s];typeof i=="function"&&(i=i(e,this.gridOptions,this.beans)),i&&this.assertModuleRegistered(i,s)}}validateGridOptions(e){this.validateOptions(e,AF),this.validation?.processGridOptions(e)}validateColDef(e,t,s){(s||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,bF),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const s=Array.isArray(e)?e.some(o=>this.isModuleRegistered(o)):this.isModuleRegistered(e);return s||pe(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),s}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:tl(),rowModelType:this.get("rowModelType"),isUmd:l1()}}isModuleRegistered(e){return Qr(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[cd]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const s=t[cd];if(V(s))return s===this.instanceId;t=t.parentElement}return!1}};function VF(e){return!!xl[e]}function Ug(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 BF=Ug(!0),zF=Ug(!1),WF=class extends Re{constructor(){super(...arguments),this.eFilter=q,this.eFilterButton=q,this.eSortIndicator=q,this.eMenu=q,this.eLabel=q,this.eText=q,this.eSortOrder=q,this.eSortAsc=q,this.eSortDesc=q,this.eSortMixed=q,this.eSortNone=q,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};Ke(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?BF:zF}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=xb(e,t,t);s&&(this.isLoadingInnerComponent=!0,s.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderComponent=o,this.eText&&this.eText.appendChild(o.getGui())):this.destroyBean(o))}))}setDisplayName(e){const{displayName:t}=e,s=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||s===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=Fo(t))}addInIcon(e,t,s){const o=ht(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){as(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:s}=this,o=ot(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,a=ot(s);if(e&&!a){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:a,eSortNone:l}=this;o.attachCustomElements(i,n,r,a,l)}this.eSortIndicator.setupSort(s),this.currentSort&&e.setupHeader(this,s,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const s=()=>{const o=t.column.isFilterActive();Se(e,o,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,s,"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 as(t),!1;const i=this.params.column;return this.addInIcon(o,t,i),this.addManagedListeners(i,{filterChanged:s}),s(),!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)}},_F={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"}]},UF=class extends Re{constructor(){super(_F),this.agOpened=q,this.agClosed=q,this.agLabel=q,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:s}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),s?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&H(89)}workOutInnerHeaderGroupComponent(e,t){const s=Eb(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=l=>{if(_t(l))return;const c=!s.isExpanded();o.colGroupSvc.setColumnGroupOpened(s.getProvidedColumnGroup(),c,"uiColumnExpanded")};this.addTouchAndClickListeners(o,t,i),this.addTouchAndClickListeners(o,e,i);const n=l=>{Ns(l)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:i}),this.updateIconVisibility();const r=s.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,s){e.touchSvc?.setupForHeaderGroupElement(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();Se(e,o),Se(t,!o)}else Se(e,!1),Se(t,!1)}addInIcon(e,t){const s=ht(e,this.beans,null);s&&t.appendChild(s)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:s}=this;Se(t,!1),Se(s,!1)}}setupLabel(e){const{displayName:t,columnGroup:s}=e,o=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;V(t)&&!o&&(this.agLabel.textContent=Fo(t)),this.toggleCss("ag-sticky-label",!s.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},jF={moduleName:"ColumnHeaderComp",version:G,userComponents:{agColumnHeader:WF},icons:{menu:"menu",menuAlt:"menu-alt"}},$F={moduleName:"ColumnGroupHeaderComp",version:G,userComponents:{agColumnGroupHeader:UF},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},KF=class extends T{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&&H(92)}createTask(e,t,s,o,i=!1){this.verify();let n=s;o&&this.batchFrameworkComps&&(n="f1");const r={task:e,index:t,createOrder:++this.taskCount,deferred:i};this.addTaskToList(this[n],r),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((s,o)=>s.deferred!==o.deferred?s.deferred?-1:1: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:a}=n,l=t.list,c=s.list,d=o.list,u=Date.now();let h=0;const g=e<=0,f=r.getScrollFeature();for(;g||h<e;){if(!f.scrollGridIfNeeded()){let v;if(l.length)this.sortTaskList(t),v=l.pop().task;else if(c.length)this.sortTaskList(s),v=c.pop().task;else if(d.length)a.wrapOutgoing(()=>{for(;(g||h<e)&&!f.scrollGridIfNeeded();){if(d.length)this.sortTaskList(o),v=d.pop().task,v();else break;h=Date.now()-u}}),v=()=>{};else if(i.length)v=i.pop();else break;v()}h=Date.now()-u}l.length||c.length||d.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);qt(this.beans,e)}isQueueEmpty(){return!this.ticking}},qF={moduleName:"AnimationFrame",version:G,beans:[KF]},YF=class extends T{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return ht(e,this.beans,t?.column)}},ZF=class extends T{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(!Ps())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(!Ps()||_u("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,menuSvc:o}=this.beans;if(t.get("suppressTouch"))return;const{params:i,eMenu:n,eFilterButton:r}=e,a=new ws(e.getGui(),!0);e.addDestroyFunc(()=>a.destroy());const l=e.shouldSuppressMenuHide(),c=l&&V(n)&&i.enableMenu;let d=a;if(c&&(d=new ws(n,!0),e.addDestroyFunc(()=>d.destroy())),i.enableMenu||o?.isHeaderContextMenuEnabled(i.column)){const u=c?"tap":"longTap",h=g=>i.showColumnMenuAfterMouseClick(g.touchStart);e.addManagedListeners(d,{[u]:h}),e.addManagedListeners(a,{longTap:h})}if(i.enableSorting){const u=h=>{const g=h.touchStart.target;l&&(n?.contains(g)||r?.contains(g))||s?.progressSort(i.column,!1,"uiColumnSorted")};e.addManagedListeners(a,{tap:u})}if(i.enableFilterButton&&r){const u=new ws(r,!0);e.addManagedListeners(u,{tap:()=>i.showFilter(r)}),e.addDestroyFunc(()=>u.destroy())}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const s=new ws(t.eGridHeader,!0),o=i=>t.showColumnMenuAfterMouseClick(i.touchStart);e.addManagedListeners(s,{longTap:o}),e.addDestroyFunc(()=>s.destroy())}}setupForHeaderGroupElement(e,t,s){const o=new ws(t,!0);e.addManagedListeners(o,{tap:s}),e.addDestroyFunc(()=>o.destroy())}mockContextMenu(e,t,s){if(!Ps())return;const o=new ws(t),i=n=>{ri(this.beans,n.touchEvent)&&s(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(o,{longTap:i}),e.addDestroyFunc(()=>o.destroy())}},QF={moduleName:"Touch",version:G,beans:[ZF]},XF=class extends T{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===E.UP,o=e===E.DOWN,i=e===E.LEFT;let n,r;const{pageBounds:a,gos:l,visibleCols:c,pinnedRowModel:d}=this.beans,{rowPinned:u}=t;if(s||o)u&&d?s?r=0:r=u==="top"?d.getPinnedTopRowCount()-1:d.getPinnedBottomRowCount()-1:r=s?a.getFirstRow():a.getLastRow(),n=t.column;else{const h=l.get("enableRtl");r=t.rowIndex,n=(i!==h?c.allCols:[...c.allCols].reverse()).find(f=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:f}))}return n?{rowIndex:r,rowPinned:u,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let s=t,o=!1;for(;!o;){switch(e){case E.UP:s=this.getCellAbove(s);break;case E.DOWN:s=this.getCellBelow(s);break;case E.RIGHT:s=this.gos.get("enableRtl")?this.getCellToLeft(s):this.getCellToRight(s);break;case E.LEFT:s=this.gos.get("enableRtl")?this.getCellToRight(s):this.getCellToLeft(s);break;default:s=null,H(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=Yc(this.beans,t,!0);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=bn(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);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 a=Yc(this.beans,e,!0);if(be(a)||!a.rowPinned&&!(s?.isRowInPage(a.rowIndex)??!0))return null;i=a?a.rowIndex:null,n=a?a.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,a=s.getColBefore(e.column);if(!a){a=fe(i);const l=bn(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(be(l)||!l.rowPinned&&!(o?.isRowInPage(l.rowIndex)??!0))return null;n=l?l.rowIndex:null,r=l?l.rowPinned:null}return{rowIndex:n,column:a,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 JF(e){return e.focusSvc.getFocusedCell()}function eE(e){return e.focusSvc.clearFocusedCell()}function tE(e,t,s,o){e.focusSvc.setFocusedCell({rowIndex:t,column:s,rowPinned:o,forceBrowserFocus:!0})}function sE(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function oE(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function iE(e,t,s=!1){const o=e.headerNavigation?.getHeaderPositionForColumn(t,s);o&&e.focusSvc.focusHeaderPosition({headerPosition:o})}var nE=class extends T{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new jg,this.rowValidations=new $g,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const s=this.getEditRow(e);t?s.delete(t):s.clear(),s.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const s=e&&this.edits.get(e);if(s)return s;if(t.checkSiblings){const o=e.pinnedSibling;if(o)return this.getEditRow(o)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;const s=this.getEditRow(e),o=e.pinnedSibling,i=t&&o&&this.getEditRow(o);if(!s&&!i)return;const n=Object.assign({},e.data),r=(a,l)=>a.forEach(({pendingValue:c},d)=>{c!==pt&&(l[d.getColId()]=c)});return s&&r(s,n),i&&r(i,n),n}getEdit(e,t){const s=this._getEdit(e);return t&&s?{...s}:s}_getEdit(e){if(!this.suspendEdits&&this.edits.size!==0)return e.rowNode&&e.column&&this.getEditRow(e.rowNode)?.get(e.column)}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((s,o)=>{const i=new Map;s.forEach(({editorState:n,...r},a)=>i.set(a,{...r})),t.set(o,i)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,s)=>{const o=new Map;t.forEach((i,n)=>o.set(n,{...i})),this.edits.set(s,o)})}setEdit(e,t){(this.edits.size===0||!this.edits.has(e.rowNode))&&this.edits.set(e.rowNode,new Map);const s=this._getEdit(e),o=Object.assign({editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...s,...t});return this.getEditRow(e.rowNode).set(e.column,o),o}clearEditValue(e){const{rowNode:t,column:s}=e;if(t)if(s){const o=this._getEdit(e);o&&(o.editorValue=void 0,o.pendingValue=o.sourceValue,o.state="changed")}else this.getEditRow(t)?.forEach(o=>{o.editorValue=void 0,o.pendingValue=o.sourceValue,o.state="changed"})}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((s,o)=>{for(const i of s.keys()){const{editorState:n,...r}=s.get(i);t.push({rowNode:o,column:i,...r})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:s,column:o}=e,{withOpenEditor:i}=t;if(s){const n=this.getEditRow(s,t);return n?o?i?this.getEdit(e)?.state==="editing":n.has(o)??!1:n.size!==0?i?Array.from(n.values()).some(({state:r})=>r==="editing"):!0:!1:!1}return i?this.getEditPositions().some(({state:n})=>n==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:s,column:o}=e;o&&!t.has(o)&&t.set(o,{editorValue:void 0,pendingValue:pt,sourceValue:this.beans.valueSvc.getValue(o,s,!1,"api"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(s,t)}stop(e){this.hasEdits(e)&&(e?this.removeEdits(e):this.clear())}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},jg=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:s}=e||{};return this.cellValidations?.get(t)?.get(s)}hasCellValidation(e){return!e?.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:s,column:o}=e;this.cellValidations.has(s)||this.cellValidations.set(s,new Map),this.cellValidations.get(s).set(o,t)}clearCellValidation(e){const{rowNode:t,column:s}=e;this.cellValidations.get(t)?.delete(s)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},$g=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function El(e,t={}){const{rowIndex:s,rowId:o,rowCtrl:i,rowPinned:n}=t;if(i)return i;const{rowModel:r,rowRenderer:a}=e;let{rowNode:l}=t;return l||(o?l=RR(e,o,n):s!=null&&(l=r.getRow(s))),a.getRowCtrls(l?[l]:[])?.[0]}function ve(e,t={}){const{cellCtrl:s,colId:o,columnId:i,column:n}=t;if(s)return s;const r=e.colModel.getCol(o??i??ba(n)),a=t.rowCtrl??El(e,t),l=a?.getCellCtrl(r)??void 0;if(l)return l;const c=t.rowNode??a?.rowNode;if(c)return e.rowRenderer.getCellCtrls([c],[r])?.[0]}function dd(e){const{editSvc:t}=e;t?.isBatchEditing()?go(e):t?.stopEditing(void 0,{source:"api"})}function rE(e,t,s){const{gos:o,popupSvc:i}=t;if(!o.get("stopEditingWhenCellsLoseFocus"))return;const n=r=>{const a=r.relatedTarget;if(na(a)===null){dd(t);return}let l=s.some(c=>c.contains(a))&&o.isElementInThisInstance(a);l||(l=!!i&&(i.getActivePopups().some(c=>c.contains(a))||i.isElementWithinCustomPopup(a))),l||dd(t)};for(const r of s)e.addManagedElementListeners(r,{focusout:n})}function ba(e){if(e)return typeof e=="string"?e:e.getColId()}var pt=Symbol("unedited");function Kg(e,t={}){const s=[],o=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns);for(const i of o){const n=i.comp?.getCellEditor();n&&s.push({ctrl:i,editor:ci(n)})}return s}var aE=(e,t={})=>Kg(e,t).map(s=>s.editor);function lE(e,t,s,o,i,n){t.length===0&&s?.rowNode&&s?.column&&So(e,s,{key:o,event:i,cellStartedEdit:n});const{valueSvc:r,editSvc:a,editModelSvc:l}=e,{rowNode:c,column:d}=s??{};for(const u of t){const{rowNode:h,column:g}=u,f=ve(e,u);if(!f){if(h&&g){const v=r.getValue(g,h,void 0,"api"),S=(s?.rowNode===h&&s?.column===g&&o||void 0)??a?.getCellDataValue(u,!1)??r.getValueForDisplay(g,h)?.value??v??pt;l?.setEdit(u,{pendingValue:S,sourceValue:v,state:"editing"})}continue}const m=n&&c===f.rowNode&&f.column===d;So(e,{rowNode:c,column:f.column},{key:m?o:null,event:m?i:null,cellStartedEdit:m&&n})}}function Gt({pendingValue:e,sourceValue:t}){return e===pt&&(e=t),e!==t}function So(e,t,s){const o=e.gos.get("enableGroupEdit"),{key:i,event:n,cellStartedEdit:r,silent:a}=s??{},l=ve(e,t),c=l?.comp?.getCellEditor(),d=Yg(e,t,i,r&&!a),u=e.editModelSvc?.getEdit(t);let h=d.value;if(h===void 0&&(h=u?.sourceValue),e.editModelSvc?.setEdit(t,{editorValue:h,state:"editing"}),c){c.refresh?.(d);return}const g=t.column.getColDef(),f=Dh(e.userCompFactory,g,d),m=f?.popupFromSelector!=null?f.popupFromSelector:!!g.cellEditorPopup,v=f?.popupPositionFromSelector!=null?f.popupPositionFromSelector:g.cellEditorPopupPosition;if(Zg(f.params,n),l){l.editCompDetails=f,l.onEditorAttachedFuncs.push(()=>l.rangeFeature?.unsetComp()),l.comp?.setEditDetails(f,m,v,e.gos.get("reactiveCustomComponents")),l?.rowCtrl?.refreshRow({suppressFlash:!0});const w=e.editModelSvc?.getEdit(t,!0);!a&&!w?.editorState?.cellStartedEditing&&(e.editSvc?.dispatchCellEvent(t,n,"cellEditingStarted",o?{value:h}:{}),e.editModelSvc?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}}function qg(e,t,s){const o={editorValueExists:!1};if(Dl(e)&&(t.getValidationErrors?.()?.length??0)>0||s?.isCancelling)return o;if(s?.isStopping){const n=t?.isCancelAfterEnd?.();if(n)return{...o,isCancelAfterEnd:n}}return{editorValue:t.getValue(),editorValueExists:!0}}function Yg(e,t,s,o){const{valueSvc:i,gos:n,editSvc:r}=e,a=e.gos.get("enableGroupEdit"),l=ve(e,t),c=t.rowNode?.rowIndex??void 0,d=r?.isBatchEditing(),u=e.colModel.getCol(t.column.getId()),{rowNode:h,column:g}=t,f=l.comp?.getCellEditor(),m=r?.getCellDataValue(t,!1)??(f?qg(e,f)?.editorValue:void 0),v=m===pt?i.getValueForDisplay(u,h)?.value:m;return Y(n,{value:a?m:v,eventKey:s??null,column:g,colDef:g.getColDef(),rowIndex:c,node:h,data:h.data,cellStartedEdit:o??!1,onKeyDown:l?.onKeyDown.bind(l),stopEditing:w=>{r.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:w}),Sn(e,t)},eGridCell:l?.eGui,parseValue:w=>i.parseValue(u,h,w,l?.value),formatValue:l?.formatValue.bind(l),validate:()=>{r?.validateEdit()}})}function Sa(e,t){const{editModelSvc:s}=e;s?.getEditMap().forEach((o,i)=>{o.forEach((n,r)=>{!t&&(n.state==="editing"||n.pendingValue===pt)||!Gt(n)&&(n.state!=="editing"||t)&&s?.removeEdits({rowNode:i,column:r})})})}function cE(e,t){const s=t.comp?.getCellEditor();if(!s?.refresh)return;const{eventKey:o,cellStartedEdit:i}=t.editCompDetails.params,{column:n}=t,r=Yg(e,t,o,i),a=n.getColDef(),l=Dh(e.userCompFactory,a,r);s.refresh(Zg(l.params,o))}function Zg(e,t){return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function Rs(e,t){for(const s of e.editModelSvc?.getEditPositions()??[]){const o=ve(e,s);if(!o)continue;const i=o.comp?.getCellEditor();if(!i)continue;const{editorValue:n,editorValueExists:r,isCancelAfterEnd:a}=qg(e,i,t);a&&e.editModelSvc?.setEdit(s,{editorState:{isCancelAfterEnd:a}}),Qi(e,s,n,void 0,!r,t)}}function Qi(e,t,s,o,i,n){const{editModelSvc:r,valueSvc:a}=e;if(!r)return;const{rowNode:l,column:c}=t;if(!(l&&c))return;let d=r.getEdit(t,!0);d?.sourceValue||(d=r.setEdit(t,{sourceValue:a.getValue(c,l,void 0,"api"),pendingValue:d?d.editorValue:pt})),r.setEdit(t,{editorValue:i?d.sourceValue:s}),n?.persist&&dE(e,t)}function dE(e,t){const{editModelSvc:s}=e,o=s?.getEdit(t,!0);s?.setEdit(t,{pendingValue:o?.editorValue})}function go(e,t,s){t||(t=e.editModelSvc?.getEditPositions());for(const o of t??[])Sn(e,o,s)}function Sn(e,t,s){const o=e.gos.get("enableGroupEdit"),{editModelSvc:i}=e,n=ve(e,t),r=i?.getEdit(t,!0);if(!n){r&&i?.setEdit(t,{state:"changed"});return}const{comp:a}=n;if(a&&!a.getCellEditor()){if(n?.refreshCell(),r){i?.setEdit(t,{state:"changed"});const c=o?ud(s,r):{valueChanged:!1,newValue:void 0,oldValue:r.sourceValue};hd(e,t,c,s)}return}if(Dl(e)){const c=a?.getCellEditor()?.getValidationErrors?.(),d=i?.getCellValidationModel();c?.length?d?.setCellValidation(t,{errorMessages:c}):d?.clearCellValidation(t)}i?.setEdit(t,{state:"changed"}),a?.setEditDetails(),a?.refreshEditStyles(!1,!1),n?.refreshCell({force:!0,suppressFlash:!0});const l=i?.getEdit(t);if(l&&l.state==="changed"){const c=o?ud(s,l):{valueChanged:Gt(l)&&!s?.cancel,newValue:s?.cancel||l.editorState.isCancelAfterEnd?void 0:l?.editorValue??r?.pendingValue,oldValue:l?.sourceValue};hd(e,t,c,s)}}function ud(e,t){return e?.cancel?{valueChanged:!1,oldValue:t.sourceValue,newValue:void 0,value:t.sourceValue}:{valueChanged:!1,oldValue:t.sourceValue,newValue:t.pendingValue,value:t.sourceValue}}function hd(e,t,s,{silent:o,event:i}={}){const{editSvc:n,editModelSvc:r}=e,a=r?.getEdit(t),{editorState:l}=a||{},{isCancelBeforeStart:c}=l||{};!o&&!c&&(n?.dispatchCellEvent(t,i,"cellEditingStopped",s),r?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function Dl(e){const{gos:t,colModel:s}=e,o=!!t.get("getFullRowEditValidationErrors"),i=s.getColumnDefs()?.filter(r=>r.editable).some(({cellEditorParams:r})=>{const{minLength:a,maxLength:l,getValidationErrors:c,min:d,max:u}=r||{};return a!==void 0||l!==void 0||c!==void 0||d!==void 0||u!==void 0}),n=e.gridApi.getCellEditorInstances().some(r=>r.getValidationElement||r.getValidationErrors);return i||o||n}function Gs(e,t){if(!(t||Dl(e)))return;const s=Kg(e),o=new jg,{ariaAnnounce:i,localeSvc:n,editModelSvc:r,gos:a}=e,l=a.get("editType")==="fullRow",d=ju(n)("ariaValidationErrorPrefix","Cell Editor Validation");for(const h of s){const{ctrl:g,editor:f}=h,{rowNode:m,column:v}=g,w=f.getValidationErrors?.()??[],b=f.getValidationElement?.(!1)||!f.isPopup?.()&&g.eGui;if(b){const S=w!=null&&w.length>0,R=S?w.join(". "):"";yw(b,S),S&&i.announceValue(`${d} ${w}`,"editorValidation"),b instanceof HTMLInputElement?b.setCustomValidity(R):b.classList.toggle("invalid",S)}w?.length>0&&o.setCellValidation({rowNode:m,column:v},{errorMessages:w})}Rs(e,{persist:!1}),r?.setCellValidationModel(o);const u=new Set;for(const{ctrl:h}of s)u.add(h.rowCtrl);if(l){const h=uE(e);r?.setRowValidationModel(h)}for(const h of u.values()){h.rowEditStyleFeature?.applyRowStyles();for(const g of h.getAllCellCtrls())g.tooltipFeature?.refreshTooltip(!0),g.editorTooltipFeature?.refreshTooltip(!0),g.editStyleFeature?.applyCellStyles?.()}}var uE=e=>{const t=new $g,s=e.gos.get("getFullRowEditValidationErrors"),o=e.editModelSvc?.getEditMap();if(!o)return t;for(const i of o.keys()){const n=o.get(i);if(!n)continue;const r=[],{rowIndex:a,rowPinned:l}=i;for(const d of n.keys()){const u=n.get(d);if(!u)continue;const{editorValue:h,pendingValue:g,sourceValue:f}=u,m=h??(g===pt?void 0:g)??f;r.push({column:d,colId:d.getColId(),rowIndex:a,rowPinned:l,oldValue:f,newValue:m})}const c=s?.({editorsState:r})??[];c.length>0&&t.setRowValidation({rowNode:i},{errorMessages:c})}return t};function hE(e){Gs(e,!0);const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const s=[];return t.forEach((o,i)=>{o.forEach(({errorMessages:n},r)=>{s.push({column:r,rowIndex:i.rowIndex,rowPinned:i.rowPinned,messages:n??null})})}),s}function gE(e,t,s,{rowNode:o,column:i},n){return Y(e.gos,{type:s,node:o,data:o.data,value:n,column:i,colDef:i.getColDef(),rowPinned:o.rowPinned,event:t,rowIndex:o.rowIndex})}function pE(e,t=!1){return e===E.DELETE?!0:!t&&e===E.BACKSPACE?Mh():!1}var fE=class extends T{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 E.ENTER:this.onEnterKeyDown(e);break;case E.F2:this.onF2KeyDown(e);break;case E.ESCAPE:this.onEscapeKeyDown(e);break;case E.TAB:this.onTabKeyDown(e);break;case E.BACKSPACE:case E.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case E.DOWN:case E.UP:case E.RIGHT:case E.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){const{cellCtrl:s,beans:o}=this;if(!o.editSvc?.isEditing(s,{withOpenEditor:!0})){if(e.shiftKey&&s.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const i=s.getFocusedCellPosition();o.navigation?.navigateToNextCell(e,t,i,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:s}=this.beans;if(!t)return;const o=t.extendLatestRangeInDirection(e);o&&(e.key===E.LEFT||e.key===E.RIGHT?s?.ensureColumnVisible(o.column):s?.ensureRowVisible(o.rowIndex))}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:a,editSvc:l}=o;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),pE(e,n.get("enableCellEditingOnBackspace"))&&!l?.isEditing(s,{withOpenEditor:!0})){if(r&&cs(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(s.isCellEditable()){const{column:c}=s,d=this.beans.valueSvc.getDeleteValue(c,i);i.setDataValue(c,d,"cellClear")}}else l?.isEditing(s,{withOpenEditor:!0})||o.editSvc?.startEditing(s,{startedEdit:!0,event:t});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){const{cellCtrl:t,beans:s}=this,{editSvc:o,navigation:i}=s,n=o?.isEditing(t,{withOpenEditor:!0}),r=t.rowNode,a=o?.isRowEditing(r,{withOpenEditor:!0}),l=c=>{o?.startEditing(c,{startedEdit:!0,event:e,source:"edit"})&&e.preventDefault()};if(n||a){if(this.isCtrlEnter(e)){o?.applyBulkEdit(t,s?.rangeSvc?.getCellRanges()||[]);return}if(Gs(s),o?.checkNavWithValidation(void 0,e)==="block-stop")return;o?.isEditing(t,{withOpenEditor:!0})?o?.stopEditing(t,{event:e,source:"edit"}):a&&!t.isCellEditable()?o?.stopEditing({rowNode:r},{event:e,source:"edit"}):l(t)}else if(s.gos.get("enterNavigatesVertically")){const c=e.shiftKey?E.UP:E.DOWN;i?.navigateToNextCell(null,c,t.cellPosition,!1)}else{if(o?.hasValidationErrors())return;o?.hasValidationErrors(t)&&o.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===E.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:s}}=this;s?.isEditing()&&(Gs(this.beans),s?.checkNavWithValidation(void 0,e)==="block-stop")||s?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:s}}=this;s?.checkNavWithValidation(t,e)==="block-stop"&&s.revertSingleCellEdit(t),s?.stopEditing(t,{event:e,cancel:!0})}processCharacter(e){const s=e.target!==this.eGui,{beans:{editSvc:o},cellCtrl:i}=this;if(s||o?.isEditing(i,{withOpenEditor:!0}))return;if(e.key===E.SPACE)this.onSpaceKeyDown(e);else if(o?.isCellEditable(i,"ui")){if(o?.hasValidationErrors()&&!o?.hasValidationErrors(i))return;o?.startEditing(i,{startedEdit:!0,event:e,source:"api"}),!i.editCompDetails?.params?.suppressPreventDefault&&e.preventDefault()}}onSpaceKeyDown(e){const{gos:t,editSvc:s}=this.beans,{rowNode:o}=this.cellCtrl;!s?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&Es(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,o,"spaceKey"),e.preventDefault()}},mE=class extends T{constructor(e,t,s){super(),this.cellCtrl=e,this.column=s,this.beans=t}onMouseEvent(e,t){if(!_t(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,editSvc:o,editModelSvc:i,frameworkOverrides:n,gos:r}=this.beans,a=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:c,cellPosition:d,rowNode:u}=l,h=$i(r,c,u,e);s&&a&&!h&&s.getCellRangeCount(d)>1&&s.intersectLastRange(!0);const g=l.createEvent(e,"cellClicked");g.isEventHandlingSuppressed=h,t.dispatchEvent(g);const f=c.getColDef();if(f.onCellClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{f.onCellClicked(g)})},0),!h&&i?.getState(l)!=="editing"){const m=o?.isEditing(),v=i?.getCellValidationModel().getCellValidationMap().size??0,w=i?.getRowValidationModel().getRowValidationMap().size??0;if(m&&(v>0||w>0))return;o?.shouldStartEditing(l,e)?o?.startEditing(l,{event:e}):o?.shouldStopEditing(l,e)&&(this.beans.gos.get("editType")==="fullRow"?o?.stopEditing(l,{event:e,source:"edit"}):o?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:s,cellCtrl:o}=this,{eventSvc:i,frameworkOverrides:n,editSvc:r,editModelSvc:a,gos:l}=s,c=$i(l,o.column,o.rowNode,e),d=t.getColDef(),u=o.createEvent(e,"cellDoubleClicked");if(u.isEventHandlingSuppressed=c,i.dispatchEvent(u),typeof d.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{d.onCellDoubleClicked(u)})},0),!c&&r?.shouldStartEditing(o,e)&&a?.getState(o)!=="editing"){const h=r?.isEditing(),g=a?.getCellValidationModel().getCellValidationMap().size??0,f=a?.getRowValidationModel().getRowValidationMap().size??0;if(h&&(g>0||f>0))return;r?.startEditing(o,{event:e})}}onMouseDown(e){const{ctrlKey:t,metaKey:s,shiftKey:o}=e,i=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:c,focusSvc:d,gos:u,editSvc:h}=r,{column:g,rowNode:f,cellPosition:m}=n,v=$i(u,g,f,e),w=()=>{const y=n.createEvent(e,"cellMouseDown");y.isEventHandlingSuppressed=v,a.dispatchEvent(y)};if(v){w();return}if(this.isRightClickInExistingRange(e))return;const b=l&&!l.isEmpty(),S=this.containsWidget(i),R=zt(g);if(c&&R&&!c.handleMouseDownOnCell(m,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!o||!b){const y=h?.isEditing(n),D=u.get("enableCellTextSelection")&&e.defaultPrevented,M=(ps()||D)&&!y&&!Wo(i)&&!S;n.focusCell(M,e)}if(o&&b&&!d.isCellFocused(m)){e.preventDefault();const y=d.getFocusedCell();if(y){const{column:x,rowIndex:D,rowPinned:M}=y;h?.isEditing(y)&&h?.stopEditing(y),d.setFocusedCell({column:x,rowIndex:D,rowPinned:M,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}if(!S){if(l){R&&e.preventDefault();const y=mc(r,e)&&R;if(o)l.extendLatestRangeToCell(m);else if(!y){const x=t||s;l.setRangeToCell(m,x)}}w()}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const s=t.isCellInAnyRange(this.cellCtrl.cellPosition),o=mc(this.beans,e);if(s&&o)return!0}return!1}containsWidget(e){return xs(e,"ag-selection-checkbox",3)||xs(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}},CE=class extends T{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();gs(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||be(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=fe(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=Ds(this.beans)*this.rowSpan;this.eContent.style.height=`${s}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},vE="ag-cell",wE="ag-cell-auto-height",bE="ag-cell-normal-height",SE="ag-cell-focus",yE="ag-cell-first-right-pinned",RE="ag-cell-last-left-pinned",xE="ag-cell-not-inline-editing",FE="ag-cell-wrap-text",EE=0,po=class extends T{constructor(e,t,s,o){super(),this.column=e,this.rowNode=t,this.rowCtrl=o,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=s,this.gos=s.gos,this.editSvc=s.editSvc,this.hasEdit=!!s.editSvc;const{colId:i}=e;this.instanceId=i+"-"+EE++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new CE(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this,e),this.mouseListener=new mE(this,e,this.column),this.keyboardListener=new fE(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&cs(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this)),zt(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),Gs(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,s,o,i,n,r){if(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.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer(),n&&this.isCellEditable()||this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0})?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const a of this.onCompAttachedFuncs)a();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}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:s,ctrlsSvc:o,eventSvc:i}=e,n=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const a=yc(s,n,r);if(o.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let l;const c=new de(u=>{l=u}),[d]=this.addManagedListeners(i,{bodyScrollEnd:()=>{l(),d()}});return{loadingComp:a,onReady:c}}return{loadingComp:a,onReady:de.resolve()}}showValue(e,t){const{beans:s,column:o,rowNode:i,rangeFeature:n}=this,{userCompFactory:r}=s;let a=this.getValueToDisplay(),l;const c=i.stub&&i.groupData?.[o.getId()]==null,d=o.getColDef();if(c||this.isCellRenderer()){const u=this.createCellRendererParams();!c||zt(o)?l=Sc(r,d,u):l=yc(r,d,u)}if(!l&&!c&&s.findSvc?.isMatch(i,o)){const u=this.createCellRendererParams();l=Sc(r,{...o.getColDef(),cellRenderer:"agFindCellRenderer"},u)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(i,{checkSiblings:!0})){const u=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});u&&(u.compDetails?l=u.compDetails:u.valueToDisplay&&(a=u.valueToDisplay))}this.comp.setRenderDetails(l,a,e),this.customRowDragComp?.refreshVisibility(),!t&&n&&qt(s,()=>n?.refreshHandle()),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){const e="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer";let s="";return t&&(s=" ag-allow-overflow"),`${e}${s}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&Si(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:s}=this.beans.gridOptions,o=ln(t),i=Yt(this.column);return s==="custom"&&o!=="selectionColumn"&&i?!1:e.checkboxSelection||i&&typeof t=="object"&&ro(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),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(){const{editSvc:e}=this.beans;e?.isEditing(this,{withOpenEditor:!0})&&e?.stopEditing(this,{source:e?.isBatchEditing()?"ui":"api"})}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:s,rowNode:o,comp:i,eGui:n,beans:{valueSvc:r,gos:a,editSvc:l}}=this;return Y(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(s,o).value,setValue:d=>l?.setDataValue({rowNode:o,column:s},d)||o.setDataValue(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,u,h,g)=>this.registerRowDragger(d,u,g),setTooltip:(d,u)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,u),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:t,comp:s}=this;!s?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell({force:e,suppressFlash:t,newData:s}={}){const{editStyleFeature:o,customStyleFeature:i,rowCtrl:{rowEditStyleFeature:n},beans:{cellFlashSvc:r,filterManager:a},column:l,comp:c,suppressRefreshCell:d,tooltipFeature:u}=this;if(d)return;const{field:h,valueGetter:g,showRowGroup:f,enableCellChangeFlash:m}=l.getColDef(),v=h==null&&g==null&&f==null,w=e||v||s,b=!!c,S=this.updateAndFormatValue(b),R=w||S;if(b){if(R){this.showValue(!!s,!1);const y=a?.isSuppressFlashingCellsBecauseFiltering();!t&&!y&&m&&r?.flashCell(this),o?.applyCellStyles?.(),i?.applyUserStyles(),i?.applyClassesFromColDef(),n?.applyRowStyles()}u?.refreshTooltip(),i?.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,{value:o,valueFormatted:i}=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode,!0);return this.value=o,this.valueFormatted=i,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;Os(this.beans.gos,t,vn,this),e.addDestroyFunc(()=>Os(this.beans.gos,t,vn,null))}createEvent(e,t){const{rowNode:s,column:o,value:i,beans:n}=this;return gE(n,e,t,{rowNode:s,column:o},i)}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;dg(e,t,s.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);Ou(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,t){const s=this.editSvc?.allowedFocusTargetOnValidation(this);s&&s!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:s},comp:o}=this;if(!o||t?.isEditing(this)||!this.isCellFocused()||!s.shouldTakeFocus())return;const i=()=>{if(!this.isAlive())return;const n=o.getFocusableElement();this.isCellFocused()&&n.focus({preventScroll:!0})};if(e){setTimeout(i,0);return}i()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(zt(this.column)&&(e=!0),st(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(yE,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(RE,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(_n(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const s=this.isCellFocused(),o=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(SE,s),s&&e?.forceBrowserFocus){let i=this.comp.getFocusableElement();if(o){const n=lo(i,null,!0);n.length&&(i=n[0])}i.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}s&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:Bt(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(vE,!0),e.toggleCss(xE,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(wE,t),e.toggleCss(bE,!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.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(FE,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(ye(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}),o.refreshVisibility())}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(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}};function Pl(e,t,s,o,i,n){if(s==null&&t==null)return;const r={},a={},l=(c,d)=>{for(const u of c.split(" "))u.trim()!=""&&d(u)};if(s){const c=Object.keys(s);for(let d=0;d<c.length;d++){const u=c[d],h=s[u];let g;typeof h=="string"?g=e?e.evaluate(h,o):!0:typeof h=="function"&&(g=h(o)),l(u,f=>{g?r[f]=!0:a[f]=!0})}}if(t&&n)for(const c of Object.keys(t))l(c,d=>{r[d]||(a[d]=!0)});n&&Object.keys(a).forEach(n),Object.keys(r).forEach(i)}function gd(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var DE=class extends T{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const s=this.gos,o=r=>{if(typeof r=="string")e.push(r);else if(Array.isArray(r))for(const a of r)e.push(a)},i=s.get("rowClass");i&&o(i);const n=s.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},a=n(r);o(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,s=>{e.push(s)},()=>{})}processRowClassRules(e,t,s){const{gos:o,expressionSvc:i}=this.beans,n=Y(o,{data:e.data,node:e,rowIndex:e.rowIndex});Pl(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)}},PE=0,yn=class extends T{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+"-"+PE++,this.rowId=zo(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=gd(this.rowNode),this.setRowType(),this.setAnimateFlags(s),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this,t),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=zo(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=mi(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 a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,c=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!c&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const d=this.fullWidthGui?.element;d&&!this.beans.editSvc?.isEditing(this)&&n.isRowFocused(a.rowIndex,a.rowPinned)&&n.shouldTakeFocus()&&setTimeout(()=>d.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";for(const s of this.allRowGuis)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),Es(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const s=e.rowComp,o=this.getInitialRowClasses(e.containerType);for(const i of o)s.toggleCss(i,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&Yr(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),Os(t,e.element,wn,this),e.compBean.addDestroyFunc(()=>Os(t,e.element,wn,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=zo(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(Zr(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(Zr(()=>{e.rowComp.toggleCss("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.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),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(),i=ch(this.gos,this.rowNode,o);e?this.rowType="FullWidthLoading":s?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":i?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 po(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=(c,d,u)=>{u!=null?o.list.splice(u,0,d):o.list.push(d),o.map[c]=d},n=[];for(const c of t){const d=c.getInstanceId();let u=e.map[d];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(c)),u&&i(d,u)}for(const c of e.list){const d=c.column.getInstanceId();if(o.map[d]!=null)continue;!this.isCellEligibleToBeRemoved(c,s)?n.push([d,c]):c.destroy()}if(n.length)for(const[c,d]of n){const u=o.list.findIndex(g=>g.column.getLeft()>d.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);i(c,d,h)}const{focusSvc:r,visibleCols:a}=this.beans,l=r.getFocusedCell();if(l&&l.column.getPinned()==s){const c=l.column.getInstanceId();if(!o.map[c]&&a.allCols.includes(l.column)){const u=this.createFocusedCellCtrl();if(u){const h=o.list.findIndex(f=>f.column.getLeft()>u.column.getLeft()),g=h===-1?void 0:Math.max(h-1,0);i(c,u,g)}}}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){for(const t of this.allRowGuis){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{visibleCols:n,editSvc:r}=this.beans,a=r?.isEditing(e),l=e.isCellFocused();return a||l?!(n.allCols.indexOf(i)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||Be(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=V(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,a)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).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(){const{beans:e,gos:t,rowNode:s}=this,{expansionSvc:o,eventSvc:i,context:n,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...o?.getRowExpandedListeners(this)??{}}),s.detail&&this.addManagedListeners(s.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(s,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(i,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:a})=>{a&&!s.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(const l of this.allRowGuis)this.addRowDraggerToRow(l);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,n)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(const s of this.getAllCellCtrls())s.refreshCell(e);for(const s of this.allRowGuis)this.setRowCompRowId(s.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(s.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",s=t==="above",o=t==="inside",i=t==="below",r=this.gos.get("treeData")&&(i||s),a=this.rowNode.uiLevel.toString();for(const l of this.allRowGuis){const c=l.rowComp;c.toggleCss("ag-row-highlight-above",s),c.toggleCss("ag-row-highlight-inside",o),c.toggleCss("ag-row-highlight-below",i),c.toggleCss("ag-row-highlight-indent",r),r?l.element.style.setProperty("--ag-row-highlight-level",a):l.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Bt(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:a,navigation:l}=this.beans,c=a.getFocusedCell(),d={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:c?.column??o};l?.navigateToNextCell(e,e.key,d,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||_t(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),s=t?t.element:null,o=s===e.target,i=ye(this.beans);let n=!1;s&&i&&(n=s.contains(i)&&i.classList.contains("ag-cell"));let r=null;!o&&!n&&(r=_s(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=>$t(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const s of this.allRowGuis)st(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:{}};for(const o of e.list)o!==t&&(s.list.push(o),s.map[o.column.getInstanceId()]=o);return 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 Y(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){if(_t(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),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=xs(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:s}=this.beans;t?.removeAllCellRanges();const o=this.findFullWidthInfoForEvent(e);if(!o)return;const{rowGui:i,column:n}=o,r=i.element,a=e.target,l=this.rowNode;let c=e.defaultPrevented||ps();r&&r.contains(a)&&Wo(a)&&(c=!1),s.setFocusedCell({rowIndex:l.rowIndex,column:n,rowPinned:l.rowPinned,forceBrowserFocus:c})}isSuppressMouseEvent(e){const{gos:t,rowNode:s}=this;if(this.isFullWidth()){const i=this.findFullWidthRowGui(e.target);return xS(t,i?.rowComp.getFullWidthCellRendererParams(),s,e)}const o=vl(t,e.target);return o!=null&&$i(t,o.column,s,e)}onRowClick(e){if(_t(e)||this.lastMouseDownOnDragger)return;const s=this.isSuppressMouseEvent(e),{eventSvc:o,selectionSvc:i}=this.beans,n=this.createRowEventWithSource("rowClicked",e);n.isEventHandlingSuppressed=s,o.dispatchEvent(n),!s&&i?.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=Y(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,a,l,c)=>this.addFullWidthRowDragging(r,a,l,c),setTooltip:(r,a)=>{s.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(r,a)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return Mb(n,i);case"FullWidthGroup":{const{value:r,valueFormatted:a}=this.beans.valueSvc.getValueForDisplay(void 0,this.rowNode,!0);return i.value=r,i.valueFormatted=a,Tb(n,i)}case"FullWidthLoading":return Pb(n,i);default:return Db(n,i)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(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=gd(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,s="ag-row-level-"+this.rowLevel;for(const o of this.allRowGuis)o.rowComp.toggleCss(t,!0),o.rowComp.toggleCss(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();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const s of this.allRowGuis)s.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const s of this.allRowGuis)s.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(const t of e)for(const s of this.allRowGuis)s.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(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"),i.pinnedRowModel?.isManual()&&n.push("ag-row-pinned-manual")),!o.isRowPinned()&&o.pinnedSibling&&n.push("ag-row-pinned-source"),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,{pointerenter:r=>{r.pointerType==="mouse"&&o.dispatchRowEvent("mouseEnter")},pointerleave:r=>{r.pointerType==="mouse"&&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){if(e)t(e);else for(const s of this.allRowGuis)t(s)}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=ih(this.gos)?ls(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&&no(this.gos)&&!t.sticky)if(t.rowTop!=null){const i=this.roundRowTopToBounds(t.rowTop);this.setRowTop(i)}else for(const i of this.allRowGuis)i.rowComp.toggleCss("ag-opacity-zero",!0);this.fullWidthGui?.element.contains(ye(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;const e=t=>{for(const s of t.list)s.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){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&&V(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){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let s=null;for(const o of this.getAllCellCtrls())o.column==e&&(s=o);if(s!=null||t)return s;for(const o of this.getAllCellCtrls())o?.getColSpanningList().indexOf(e)>=0&&(s=o);return 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.toggleCss("ag-row-even",o),n.rowComp.toggleCss("ag-row-odd",!o),Lu(n.element,i)})}},TE=class extends T{constructor(){super(),this.beanName="navigation",this.onPageDown=uc(this.onPageDown,100),this.onPageUp=uc(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=QS(this.gos,e);let a=!1;switch(s){case E.PAGE_HOME:case E.PAGE_END:!i&&!o&&(this.onHomeOrEndKey(s),a=!0);break;case E.LEFT:case E.RIGHT:case E.UP:case E.DOWN:if(!r)return!1;i&&!o&&!n&&(this.onCtrlUpDownLeftRight(s,r),a=!0);break;case E.PAGE_DOWN:case E.PAGE_UP:!i&&!o&&(a=this.handlePageUpDown(s,r,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,s){return s&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===E.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:s,focusIndex:o,focusColumn:i,isAsync:n,rowPinned:r}){const{scrollFeature:a}=this.gridBodyCon;V(s)&&!s.isPinned()&&a.ensureColumnVisible(s),V(e)&&a.ensureIndexVisible(e,t),n||a.ensureIndexVisible(o);const{focusSvc:l,rangeSvc:c}=this.beans;l.setFocusedCell({rowIndex:o,column:i,rowPinned:r,forceBrowserFocus:!0}),c?.setRangeToCell({rowIndex:o,rowPinned:r,column:i})}onPageDown(e){const t=this.beans,s=Tr(t),o=this.getViewportHeight(),{pageBounds:i,rowModel:n,rowAutoHeight:r}=t,a=i.getPixelOffset(),l=s.top+o,c=n.getRowIndexAtPixel(l+a);r?.active?this.navigateToNextPageWithAutoHeight(e,c):this.navigateToNextPage(e,c)}onPageUp(e){const t=this.beans,s=Tr(t),{pageBounds:o,rowModel:i,rowAutoHeight:n}=t,r=o.getPixelOffset(),a=s.top,l=i.getRowIndexAtPixel(a+r);n?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,s=!1){const{pageBounds:o,rowModel:i}=this.beans,n=this.getViewportHeight(),r=o.getFirstRow(),a=o.getLastRow(),l=o.getPixelOffset(),c=i.getRow(e.rowIndex),d=s?c?.rowHeight-n-l:n-l,u=c?.rowTop+d;let h=i.getRowIndexAtPixel(u+l);if(h===e.rowIndex){const f=s?-1:1;t=h=e.rowIndex+f}let g;s?(g="bottom",h<r&&(h=r),t<r&&(t=r)):(g="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(i.getRow(h))&&(t=h,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,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 a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const c=n.getRow(l);if(c){const d=c.rowHeight??0;if(a+d>o)break;a+=d}l+=s}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=Tr(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),o=this.getNormalisedPosition(s),{rowIndex:i,rowPinned:n,column:r}=o??s,a=r;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:a,focusIndex:i,focusColumn:a,rowPinned:n})}onHomeOrEndKey(e){const t=e===E.PAGE_HOME,{visibleCols:s,pageBounds:o,rowModel:i}=this.beans,n=s.allCols,r=t?o.getFirstRow():o.getLastRow(),a=i.getRow(r);if(!a)return;const l=(t?n:[...n].reverse()).find(c=>!c.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){const s=t.shiftKey,o=this.tabToNextCellCommon(e,s,t),i=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:a,gos:l}=i;if(o!==!1){o?t.preventDefault():o===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(s);return}if(s){const{rowIndex:c,rowPinned:d}=e.getRowPosition();(d?c===0:c===r.getFirstRow())&&(l.get("headerHeight")===0||Ts(i)?bo(i,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof po&&e.focusCell(!0),(a.focusOverlay(!1)||bo(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=so(s,n);return!r&&(r=i.getRowByPosition(n),!r?.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t,"api")}tabToNextCellCommon(e,t,s,o="ui"){const{editSvc:i,focusSvc:n}=this.beans;let r;const a=e instanceof po?e:e.getAllCellCtrls()?.[0];return i?.isEditing()?r=i?.moveToNextCell(a,t,s,o):r=this.moveToNextCellNotEditing(e,t,s),r===null?r:r||!!n.focusedHeader}moveToNextCellNotEditing(e,t,s){const o=this.beans.visibleCols.allCols;let i;if(e instanceof yn){if(i={...e.getRowPosition(),column:t?o[0]:fe(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,{backwards:t,startEditing:!1});if(n===!1)return null;if(n instanceof po)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return V(n)}findNextCellToFocusOn(e,{backwards:t,startEditing:s,skipToNextEditableCell:o}){let i=e;const n=this.beans,{cellNavigation:r,gos:a,focusSvc:l,rowRenderer:c,rangeSvc:d}=n;for(;;){e!==i&&(e=i),t||(i=this.getLastCellOfColSpan(i)),i=r.getNextTabbedCell(i,t);const u=a.getCallback("tabToNextCell");if(V(u)){const m=u({backwards:t,editing:s,previousCellPosition:e,nextCellPosition:i||null});if(m===!0)i=e;else{if(m===!1)return!1;i={rowIndex:m.rowIndex,column:m.column,rowPinned:m.rowPinned}}}if(!i)return null;if(i.rowIndex<0){const f=Et(n);return l.focusHeaderPosition({headerPosition:{headerRowIndex:f+i.rowIndex,column:i.column},fromCell:!0}),null}const h=a.get("editType")==="fullRow";if(s&&(!h||o)&&!this.isCellEditable(i))continue;this.ensureCellVisible(i);const g=so(n,i);if(!g){const f=c.getRowByPosition(i);if(!f||!f.isFullWidth()||s)continue;return{...f.getRowPosition(),column:i?.column}}if(!r.isSuppressNavigable(g.column,g.rowNode))return g.setFocusedCellPosition(i),d?.setRangeToCell(i),g}}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:a,focusSvc:l,gos:c}=r;for(;i&&(i===s||!this.isValidNavigateCell(i));)c.get("enableRtl")?t===E.LEFT&&(i=this.getLastCellOfColSpan(i)):t===E.RIGHT&&(i=this.getLastCellOfColSpan(i)),i=a.getNextCellToFocus(t,i),n=be(i);if(n&&e&&e.key===E.UP&&(i={rowIndex:-1,rowPinned:null,column:s.column}),o){const u=c.getCallback("navigateToNextCell");if(V(u)){const g=u({key:t,previousCellPosition:s,nextCellPosition:i||null,event:e});V(g)?i={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:i=null}}if(!i)return;if(i.rowIndex<0){const u=Et(r);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+i.rowIndex,column:s.column},event:e||void 0,fromCell:!0});return}const d=this.getNormalisedPosition(i);d?this.focusPosition(d):this.tryToFocusFullWidthRow(i)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const s=so(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;if(!o.getRowByPosition(e)?.isFullWidth())return!1;const l=i.getFocusedCell(),c={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?fe(r):r[0])};this.focusPosition(c);const d=t??(l!=null&&wR(c,l));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:c.rowIndex,rowPinned:c.rowPinned,column:c.column,isFullWidthCell:!0,fromBelow:d}),!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!!jt(this.beans,e)}getLastCellOfColSpan(e){const t=so(this.beans,e);if(!t)return e;const s=t.getColSpanningList();return s.length===1?e:{rowIndex:e.rowIndex,column:fe(s),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=rh(this.gos),s=this.beans.rowModel.getRow(e.rowIndex),o=t&&s?.sticky,{scrollFeature:i}=this.gridBodyCon;!o&&be(e.rowPinned)&&i.ensureIndexVisible(e.rowIndex),e.column.isPinned()||i.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function Tr(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var ME={moduleName:"KeyboardNavigation",version:G,beans:[TE,XF,cF],apiFunctions:{getFocusedCell:JF,clearFocusedCell:eE,setFocusedCell:tE,setFocusedHeader:iE,tabToNextCell:sE,tabToPreviousCell:oE}},IE=class extends T{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)}},kE=class extends T{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"}))}},AE=".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}",LE=class extends T{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&&(Se(s,t),Dt(s,e))}},OE=class extends T{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=Be(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=ni(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?.length&&(r=r.filter(a=>!zt(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new LE(e,t)}setColsPinned(e,t,s){const{colModel:o,colAnimation:i,visibleCols:n,gos:r}=this.beans;if(!o.cols||!e?.length)return;if(Be(r,"print")){H(37);return}i?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];for(const c of e){if(!c)continue;const d=o.getCol(c);d&&d.getPinned()!==a&&(this.setColPinned(d,a),l.push(d))}l.length&&(n.refresh(s),Sh(this.eventSvc,l,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,a=e.hidden!==r,l=this.gos.get("enableRtl"),c=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(l&&s||!l&&o)?n+c:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),a&&(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=ni(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],a=[...n.rightCols];let l=0,c=0;const d=0,u=[];let h=o-d-e;for(;(c<r.length||l<a.length)&&h>0;){if(l<a.length){const g=a[l++];if(g.colDef.lockPinned){i=!0;continue}h-=g.getActualWidth(),u.push(g)}if(c<r.length&&h>0){const g=r[c++];if(g.colDef.lockPinned){i=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:i}}},HE={moduleName:"PinnedColumn",version:G,beans:[OE],css:[AE]},NE=class extends T{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=Ve(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=Le(e),s=this.descriptionContainer=t.createElement("div");s.classList.add("ag-aria-description-container"),ku(s,"polite"),Sw(s,"additions text"),bw(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(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}​`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(Xe(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},GE={moduleName:"Aria",version:G,beans:[NE]},VE=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",pd="ag-delay-render",BE=class extends T{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(pd)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;const{renderStatus:t,ctrlsSvc:s}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}s.getGridBodyCtrl().eGridBody.classList.remove(pd),this.alreadyRevealed=!0}},zE={moduleName:"ColumnDelayRender",version:G,beans:[BE],css:[VE]};function WE(e){e.overlays?.showLoadingOverlay()}function _E(e){e.overlays?.showNoRowsOverlay()}function UE(e){e.overlays?.hideOverlay()}var jE=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",$E={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"}]}]},Qg=class extends Re{constructor(){super($E),this.eOverlayWrapper=q,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(jE)}handleKeyDown(e){if(e.key!==E.TAB||e.defaultPrevented||_t(e))return;const t=this.beans;if(_s(t,this.eOverlayWrapper,!1,e.shiftKey))return;let o=!1;e.shiftKey?o=t.focusSvc.focusGridView({column:fe(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):o=bo(t,!1),o&&e.preventDefault()}updateLayoutClasses(e,t){const s=this.eOverlayWrapper.classList,{AUTO_HEIGHT:o,NORMAL:i,PRINT:n}=ji;s.toggle(o,t.autoHeight),s.toggle(i,t.normal),s.toggle(n,t.print)}postConstruct(){this.createManagedBean(new ml(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=ye(this.beans);i&&!Pu(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?.(Y(this.gos,{...r??{}}))})}s&&this.isGridFocused()&&Hs(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),Xe(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=ye(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},KE={selector:"AG-OVERLAY-WRAPPER",component:Qg},qE=class extends T{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=Fe(this.gos),this.isServerSide=!this.isClientSide&&zs(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")){H(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return KE}getOverlayWrapperCompClass(){return Qg}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(Ab(this.beans.userCompFactory,Y(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(Lb(this.beans.userCompFactory,Y(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!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},YE={moduleName:"Overlay",version:G,userComponents:{agLoadingOverlay:wy,agNoRowsOverlay:Sy},apiFunctions:{showLoadingOverlay:WE,showNoRowsOverlay:_E,hideOverlay:UE},beans:[qE]},ZE=class extends T{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=Gb(),Ls(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;Ls(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}},QE=400,XE=class extends T{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{for(const n of this.getAllCellCtrls())n.onCellSelectionChanged()},t=()=>{for(const n of this.getAllCellCtrls())n.updateRangeBordersIfRangeCount()},s=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},o=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>o()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{cs(this.gos)?s():o()}),cs(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,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",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=Be(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 JE(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){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(e?.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const s of this.getAllCellCtrls())t.onFlashCells(s,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const s=l=>{for(const c of this.getAllCellCtrls())c.column===t&&l(c)},o=()=>{s(l=>l.onLeftChanged())},i=()=>{s(l=>l.onWidthChanged())},n=()=>{s(l=>l.onFirstRightPinnedChanged())},r=()=>{s(l=>l.onLastLeftPinnedChanged())},a=()=>{s(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",o),t.__addEventListener("widthChanged",i),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",o),t.__removeEventListener("widthChanged",i),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})}}onDomLayoutChanged(){const e=Be(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=[];for(const s of this.getAllRowCtrls()){const o=s.getCellCtrl(e,!0)?.eGui;o&&t.push(o)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,s){const{pinnedRowModel:o,beans:i,printLayout:n}=this,r=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));o?.forEachPinnedRow(t,(l,c)=>{const d=e[c];d&&o.getPinnedRowById(d.rowNode.id,t)===void 0&&(d.destroyFirstPass(),d.destroySecondPass()),l.id in r&&s?(e[c]=r[l.id],delete r[l.id]):e[c]=new yn(l,i,!1,!1,n)});const a=(t==="top"?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}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){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(const o of e??[])this.redrawRow(o,!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&&no(this.gos),i=s?this.getRowsToRecycle():null;s||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n,gos:r}=this;if(n){n.checkStickyRows();const a=n.extraTopHeight+n.extraBottomHeight;a&&this.updateContainerHeights(a)}this.recycleRows(i,o),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?s:void 0),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(Pt(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:Et(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(Y(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=bn(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=bn(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({rowNodes:e,columns:t,force:s,suppressFlash:o}={}){const i={force:s,newData:!1,suppressFlash:o};for(const n of this.getCellCtrls(e,t))n.refreshOrDestroyCell(i);this.refreshFullWidth(e)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const 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=ya(e),s=this.getAllRowCtrls();return!e||!t?s:s.filter(o=>{const i=o.rowNode;return Ra(i,t)})}getCellCtrls(e,t){let s;V(t)&&(s={},t.forEach(i=>{const n=this.colModel.getCol(i);V(n)&&(s[n.getId()]=!0)}));const o=[];for(const i of this.getRowCtrls(e))for(const n of i.getAllCellCtrls()){const r=n.column.getId();s&&!s[r]||o.push(n)}return 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){for(const s of e){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,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(n){l=n.checkStickyRows();const d=n.extraTopHeight+n.extraBottomHeight;d&&this.updateContainerHeights(d)}const c=this.firstRenderedRow!==r||this.lastRenderedRow!==a;if(!(o&&!l&&!c)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,o),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(o&&!l),i!=null)){const d=t?.getFocusCellToUseAfterRefresh();i!=null&&d==null&&(s?.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){const s={};for(const n of e)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))&&o<this.rowModel.getRowCount()&&t.push(o);const i=r=>{const a=r.rowNode.rowIndex;a==null||a===o||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(a)};for(const r of Object.values(this.rowCtrlsByRowIndex))i(r);if(e)for(const r of Object.values(e))i(r);t.sort((r,a)=>r-a);const n=[];for(let r=0;r<t.length;r++){const a=t[r],l=this.rowModel.getRow(a);l&&!l.sticky&&n.push(a)}return n}recycleRows(e,t=!1,s=!1){const o=this.calculateIndexesToDraw(e);(this.printLayout||s)&&(t=!1),this.removeRowCompsNotToDraw(o,!t);for(const i of o)this.createOrUpdateRowCtrl(i,e,t,s);if(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=[];for(const t of this.getFullWidthRowCtrls()){const s=t.rowNode.rowIndex;e.push(s.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=ya(e);return this.getAllRowCtrls().filter(s=>{if(!s.isFullWidth())return!1;const o=s.rowNode;return!(t!=null&&!Ra(o,t))})}createOrUpdateRowCtrl(e,t,s,o){let i,n=this.rowCtrlsByRowIndex[e];if(n||(i=this.rowModel.getRow(e),V(i)&&V(t)&&t[i.id]&&i.alreadyRendered&&(n=t[i.id],t[i.id]=null)),!n)if(i||(i=this.rowModel.getRow(e)),V(i))n=this.createRowCon(i,s,o);else return;i&&(i.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=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.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const o of s)o()},QE))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=Ds(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 d=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let g=!1,f,m;do{const R=t.getPixelOffset(),{pageFirstPixel:y,pageLastPixel:x}=t.getCurrentPagePixelRange(),D=e.divStretchOffset,M=u.getVScrollPosition(),L=M.top,I=M.bottom;h?(f=y+D,m=x+D):(f=Math.max(L+R-d,y)+D,m=Math.min(I+R+d,x)+D),this.firstVisibleVPixel=Math.max(L+R,y)+D,this.lastVisibleVPixel=Math.min(I+R,x)+D,g=this.ensureAllRowsInRangeHaveHeightsCalculated(f,m)}while(g);let v=s.getRowIndexAtPixel(f),w=s.getRowIndexAtPixel(m);const b=t.getFirstRow(),S=t.getLastRow();v<b&&(v=b),w>S&&(w=S),o=v,i=w}const n=Be(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!r&&i-o>a&&(i=o+a);const l=o!==this.firstRenderedRow,c=i!==this.lastRenderedRow;(l||c)&&(this.firstRenderedRow=o,this.lastRenderedRow=i,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:o,lastRow:i}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,qt(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=this.editSvc?.isEditing(e),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 yn(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}},JE=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?.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],Ct(this.entriesList,s)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],Ct(this.entriesList,e)}getEntries(){return this.entriesList}};function ya(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const s of e){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}}return t}function Ra(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 e3=class extends T{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=Rt(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=Rt(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 a=e[n],l=a.sort==="desc",c=this.getValue(o,a.column),d=this.getValue(i,a.column);let u;const h=this.getComparator(a,o);if(h?u=h(c,d,o,i,l):u=gw(c,d,this.isAccentedSort),!isNaN(u)&&u!==0)return a.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(lh(n,o.isPivotActive())){const c=e.data?e:Yh(e.childrenAfterGroup);return c&&s.getValue(t,c,!1)}const l=i?.getShowRowGroupCol(t.getId());return l?e.groupData?.[l.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return s.getValue(t,e,!1)}};function t3(e){e.sortSvc?.onSortChanged("api")}var Xg={moduleName:"Sort",version:G,beans:[vF,e3],apiFunctions:{onSortChanged:t3},userComponents:{agSortIndicator:Fl},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},s3=class extends T{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"}),Ls(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,ao(e.source))}}};function o3(e){e.valueCache?.expire()}function i3(e,t){const{colKey:s,rowNode:o,useFormatter:i}=t,n=e.colModel.getColDefCol(s)??e.colModel.getCol(s);if(be(n))return null;const r=e.valueSvc.getValueForDisplay(n,o,i);return i?r.valueFormatted??Fo(r.value):r.value}var n3="paste",r3=class extends T{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;Fe(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:s}=this.beans;if(e.source===n3||t.get("suppressChangeDetection"))return;const o=e.node,i=[o],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!o.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new ui(a,r);l.addParentNode(o.parent,[e.column]),n.doAggregate(l),l.forEachChangedNodeDepthFirst(c=>{i.push(c),c.sibling&&i.push(c.sibling)})}s.refreshCells({rowNodes:i})}},a3=class extends T{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);pe(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 pe(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.includes("return")?e:"return "+e+";"}},l3=class extends T{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,s){if(this.active){const o=this.cacheVersion;e.__cacheVersion!==o&&(e.__cacheVersion=o,e.__cacheData={}),e.__cacheData[t]=s}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},c3={moduleName:"ValueCache",version:G,beans:[l3],apiFunctions:{expireValueCache:o3}},d3={moduleName:"Expression",version:G,beans:[a3]},u3={moduleName:"ChangeDetection",version:G,beans:[r3]},h3={moduleName:"CellApi",version:G,apiFunctions:{getCellValue:i3}},g3=class extends T{constructor(){super(...arguments),this.beanName="valueSvc",this.hasEditSvc=!1,this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.hasEditSvc=!!e.editSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=zs(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t,s=!1,o=!1,i="ui"){const{showRowGroupColValueSvc:n}=this.beans,r=!e&&t.group,a=e?.colDef.showRowGroup,l=!this.isTreeData||t.footer;if(n&&l&&(r||a)){const m=n.getGroupValue(t,e);if(m==null)return{value:null,valueFormatted:null};if(!s)return{value:m.value,valueFormatted:null};const v=n.formatAndPrefixGroupColValue(m,e,o);return{value:m.value,valueFormatted:v}}if(!e)return{value:t.key,valueFormatted:null};const c=t.leafGroup&&this.colModel.isPivotMode(),d=t.group&&t.expanded&&!t.footer&&!c,u=this.gos.get("groupSuppressBlankHeader")||!t.sibling,h=d&&!u,g=this.getValue(e,t,h,i),f=s&&!(o&&e.colDef.useValueFormatterForExport===!1);return{value:g,valueFormatted:f?this.formatValue(e,t,g):null}}getValue(e,t,s=!1,o="ui"){if(this.initialised||this.init(),!t)return;const i=e.getColDef(),n=i.field,r=e.getColId(),a=t.data;if(this.hasEditSvc&&o==="ui"){const m=this.editSvc;if(m.isEditing()){const v=m.getCellDataValue({rowNode:t,column:e},!0);if(v!==void 0)return v}}let l;const c=i.showRowGroup;if(typeof c=="string"&&(this.beans.rowGroupColsSvc?.getColumnIndex(c)??-1)>t.level)return null;const d=typeof c!="string"||!t.group,u=t.groupData&&r in t.groupData,h=!s&&t.aggData&&t.aggData[r]!==void 0,g=this.isSsrm&&s&&!!i.aggFunc,f=this.isSsrm&&t.footer&&t.field&&(i.showRowGroup===!0||i.showRowGroup===t.field);if(this.isTreeData&&h)l=t.aggData[r];else if(this.isTreeData&&i.valueGetter)l=this.executeValueGetter(i.valueGetter,a,e,t);else if(this.isTreeData&&n&&a)l=qo(a,n,e.isFieldContainsDots());else if(u)l=t.groupData[r];else if(h)l=t.aggData[r];else if(i.valueGetter&&!g){if(!d)return l;l=this.executeValueGetter(i.valueGetter,a,e,t)}else if(f)l=qo(a,t.field,e.isFieldContainsDots());else if(n&&a&&!g){if(!d)return l;l=qo(a,n,e.isFieldContainsDots())}if(this.cellExpressions&&typeof l=="string"&&l.indexOf("=")===0){const m=l.substring(1);l=this.executeValueGetter(m,a,e,t)}return l}parseValue(e,t,s,o){const i=e.getColDef(),n=i.valueParser;if(V(n)){const r=Y(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 V(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t).value)??null:null}formatValue(e,t,s,o,i=!0){const{expressionSvc:n}=this.beans;let r=null,a;const l=e.getColDef();if(o?a=o:i&&(a=l.valueFormatter),a){const c=t?t.data:null,d=Y(this.gos,{value:s,node:t,data:c,colDef:l,column:e});typeof a=="function"?r=a(d):r=n?n.evaluate(a,d):null}else if(l.refData)return l.refData[s]||"";return r==null&&Array.isArray(s)&&(r=s.join(", ")),r}setValue(e,t,s,o){const i=this.colModel.getColDefCol(t);if(!e||!i)return!1;be(e.data)&&(e.data={});const{field:n,valueSetter:r}=i.getColDef();if(be(n)&&be(r))return H(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(i,s))return H(135),!1;const a=Y(this.gos,{node:e,data:e.data,oldValue:this.getValue(i,e,void 0,o),newValue:s,colDef:i.getColDef(),column:i});a.newValue=s;let l;if(V(r)?typeof r=="function"?l=r(a):l=this.expressionSvc?.evaluate(r,a):l=this.setValueUsingField(e.data,n,s,i.isFieldContainsDots()),l===void 0&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const c=this.getValue(i,e);return this.dispatchCellValueChangedEvent(e,a,c,o),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,a,c,o),!0}dispatchCellValueChangedEvent(e,t,s,o){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:s,value:s,source:o})}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 a=n.shift();n.length===0?(i=r[a]===s,i||(r[a]=s)):r=r[a]}}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=Y(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=Y(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]"&&H(121)),i}},p3={moduleName:"CommunityCore",version:G,beans:[pF,eR,g2,ib,ZE,Fx,lF,GF,eb,kE,IE,XE,g3,hF,aF,gF,f2,s3,l2,c2,YF],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:tR,destroy:sR,isDestroyed:oR,getGridOption:iR,setGridOption:nR,updateGridOptions:bg,isModuleRegistered:rR},dependsOn:[n2,ox,dx,Xg,jF,Dx,$F,YE,u3,qF,ME,HE,GE,QF,h2,r2,d3,Ix,zE]},Jg={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},Mr=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],f3={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:Mr,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...Mr,"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:[...Mr,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},m3={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function C3(e,t){const s=[];for(const o of Array.isArray(e)?e:[e]){const i=f3[o];if(i)for(const n of i){const r=m3[n];(!r||r===t)&&s.push(n)}else s.push(o)}return s}var ep=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
21
+
22
+ import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
23
+
24
+ ModuleRegistry.registerModules([ AllCommunityModule ]);
25
+ `,v3=e=>{const t=e.map(o=>`import { ${Yo(o)} } from '${Jg[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';
26
+ ${t.join(`
27
+ `)}
28
+
29
+ ModuleRegistry.registerModules([ ${e.map(o=>Yo(o,!0)).join(", ")} ]);
30
+
31
+ For more info see: ${io}/modules/`};function Yo(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function w3(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.
32
+ `:t.some(n=>Jg[n])&&(o=o+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
33
+ `),o}function tp({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var fd=({reasonOrId:e,moduleName:t,gridScoped:s,gridId:o,rowModelType:i,additionalText:n,isUmd:r})=>{const a=C3(t,i),l=typeof e=="string"?e:R3[e];if(r)return w3(l,a);const c=a.filter(h=>h==="IntegratedCharts"||h==="Sparklines"),d=c.length>0?`${c.map(h=>Yo(h)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(h=>Yo(h)).join(", "):Yo(a[0])} is not registered${s?" for gridId: "+o:""}. ${d} Check if you have registered the module:
34
+ `}
35
+ ${v3(a)}`+(n?`
36
+
37
+ ${n}`:"")},md=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
38
+
39
+ import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
40
+ import { ModuleRegistry } from 'ag-grid-community';
41
+ import { ${e} } from 'ag-grid-enterprise';
42
+
43
+ ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
44
+ `,b3=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.`,S3={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:
45
+ "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.
46
+ Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
47
+ 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}
48
+ ${b3(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.",101:({propertyName:e,componentName:t,agGridDefaults:s,jsComps:o})=>{const i=[],n=[...Object.keys(s??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(o??[]).filter(a=>!!o[a])],r=aa({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.
49
+ `),r.length>0&&i.push(` Did you mean: [${r.slice(0,3)}]?
50
+ `),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: ${io}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{const s=aa({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,s.length>0?` Did you mean: [${s.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join(`
51
+ `)},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.
52
+ 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:e=>`getRowId callback must be provided for Server Side Row Model ${e?.feature||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:fd,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 ${io}/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.
53
+ 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.
54
+ Your code probably called a grid API method while the grid was in the render stage.
55
+ To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
56
+ 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:()=>md("IntegratedChartsModule"),258:()=>md("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})=>fd({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:ho[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 ${io}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>ep(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:tp,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`};function y3(e,t){const s=S3[e];if(!s)return[`Missing error text for error id ${e}!`];const o=s(t),n=`
57
+ See ${sh(e,t)}`;return Array.isArray(o)?o.concat(n):[o,n]}var R3={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},Cd=new WeakMap,vd=new WeakMap,x3=1,F3=class{create(e,t,s,o,i,n){const r=el.applyGlobalGridOptions(t),a=r.gridId??String(x3++),l=this.getRegisteredModules(i,a,r.rowModelType),c=this.createBeansList(r.rowModelType,l,a),d=this.createProvidedBeans(e,r,i);if(!c)return;const h={providedBeanInstances:d,beanClasses:c,id:a,beanInitComparator:Zy,beanDestroyComparator:Qy,derivedBeans:[qy],destroyCallback:()=>{vd.delete(f),Cd.delete(e),o1(a),n?.()}},g=new H0(h);this.registerModuleFeatures(g,l),s(g),g.getBean("syncSvc").start(),o?.(g);const f=g.getBean("gridApi");return Cd.set(e,f),vd.set(f,e),f}getRegisteredModules(e,t,s){return ai(p3,void 0,!0),e?.modules?.forEach(o=>ai(o,t)),i1(t,wd(s))}registerModuleFeatures(e,t){const s=e.getBean("registry"),o=e.getBean("apiFunctionSvc");for(const i of t){s.registerModule(i);const n=i.apiFunctions;if(n){const r=Object.keys(n);for(const a of r)o?.addFunction(a,n[a])}}}createProvidedBeans(e,t,s){let o=s?s.frameworkOverrides:null;be(o)&&(o=new vg);const i={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:s?s.globalListener:null,globalSyncListener:s?s.globalSyncListener:null,frameworkOverrides:o};return s?.providedBeanInstances&&Object.assign(i,s.providedBeanInstances),i}createBeansList(e,t,s){const o={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},i=wd(e),n=o[i];if(!n){Go(201,{rowModelType:i},`Unknown rowModelType ${i}.`);return}if(!a1()){Go(272,void 0,ep());return}if(!e){const a=Object.entries(o).filter(([l,c])=>Qr(c,s,l));if(a.length==1){const[l,c]=a[0];if(l!==i){const d={moduleName:c,rowModelType:l};Go(275,d,tp(d));return}}}if(!Qr(n,s,i)){Go(200,{reasonOrId:`rowModelType = '${i}'`,moduleName:n,gridScoped:tl(),gridId:s,rowModelType:i},`Missing module ${n}Module for rowModelType ${i}.`);return}const r=new Set;for(const a of t)for(const l of a.beans??[])r.add(l);return Array.from(r)}};function wd(e){return e??"clientSide"}function fs(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function jn(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function E3(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var D3=class extends T{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?$w(t):Kw(e.get("localeText"))}};function P3(e,t=!1){const s=[],o=[],i=[],n=[],r=[],a=[],l=[],c=[],d=[];let u=0;for(let h=0;h<e.length;h++){const{colId:g,sort:f,sortIndex:m,rowGroup:v,rowGroupIndex:w,aggFunc:b,pivot:S,pivotIndex:R,pinned:y,hide:x,width:D,flex:M}=e[h];d.push(g),f&&(s[m??u++]={colId:g,sort:f}),v&&(o[w??0]=g),typeof b=="string"&&i.push({colId:g,aggFunc:b}),S&&(n[R??0]=g),y&&(y==="right"?a:r).push(g),x&&l.push(g),(M!=null||D)&&c.push({colId:g,flex:M??void 0,width:D})}return{sort:s.length?{sortModel:Ir(s)}:void 0,rowGroup:o.length?{groupColIds:Ir(o)}:void 0,aggregation:i.length?{aggregationModel:i}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:Ir(n)}:void 0,columnPinning:r.length||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:c.length?{columnSizingModel:c}:void 0,columnOrder:d.length?{orderedColIds:d}:void 0}}function Ir(e){return e.filter(t=>t!=null)}function T3(e){const t=[];for(const{groupId:s,open:o}of e)o&&t.push(s);return t.length?{openColumnGroupIds:t}:void 0}var M3=class{wrap(e,t,s,o){const i=this.createWrapper(e,o);for(const n of t??[])this.createMethod(i,n,!0);for(const n of s??[])this.createMethod(i,n,!1);return 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&&H(49,{methodName:t}),null)}}};function kr(e){return e.get("tooltipShowMode")==="whenTruncated"}function I3(e,t){if(typeof e!="number")return"";const s=t(),o=s("thousandSeparator",","),i=s("decimalSeparator",".");return e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${o}`)}var k3=class extends T{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},A3=class{constructor(e){const{colModel:t,rowGroupColsSvc:s,colNames:o,valueSvc:i,gos:n,processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c}=e;this.colModel=t,this.rowGroupColsSvc=s,this.colNames=o,this.valueSvc=i,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=c}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,s,o,i){const n=t===0&&ch(this.gos,i,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||i.group)&&(e.isRowGroupDisplayed(i.rowGroupColumn?.getColId()??"")||n))return{value:this.processRowGroupCallback(Y(this.gos,{column:e,node:i}))??""};if(this.processCellCallback)return{value:this.processCellCallback(Y(this.gos,{accumulatedRowIndex:s,column:e,node:i,value:this.valueSvc.getValueForDisplay(e,i,void 0,void 0).value,type:o,parseValue:h=>this.valueSvc.parseValue(e,i,h,this.valueSvc.getValue(e,i,void 0)),formatValue:h=>this.valueSvc.formatValue(e,i,h)??h}))??""};const r=this.gos.get("treeData"),a=this.valueSvc,l=i.level===-1&&i.footer,c=e.colDef.showRowGroup===!0&&(i.group||r);if(!l&&(n||c)){let h="",g=i;for(;g&&g.level!==-1;){const{value:f,valueFormatted:m}=a.getValueForDisplay(n?void 0:e,g,!0,!0);h=` -> ${m??f??""}${h}`,g=g.parent}return{value:h,valueFormatted:h}}const{value:d,valueFormatted:u}=a.getValueForDisplay(e,i,!0,!0);return{value:d??"",valueFormatted:u}}getHeaderName(e,t){return e?e(Y(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}};function L3(e,t){const s=document.defaultView||window;if(!s){H(52);return}const o=document.createElement("a"),i=s.URL.createObjectURL(t);o.setAttribute("href",i),o.setAttribute("download",e),o.style.display="none",document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:s})),o.remove(),s.setTimeout(()=>{s.URL.revokeObjectURL(i)},0)}var O3={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},Qe="clientSide",We="serverSide",Zs="infinite",H3={onGroupExpandedOrCollapsed:[Qe],refreshClientSideRowModel:[Qe],isRowDataEmpty:[Qe],forEachLeafNode:[Qe],forEachNodeAfterFilter:[Qe],forEachNodeAfterFilterAndSort:[Qe],resetRowHeights:[Qe,We],applyTransaction:[Qe],applyTransactionAsync:[Qe],flushAsyncTransactions:[Qe],getBestCostNodeSelection:[Qe],getServerSideSelectionState:[We],setServerSideSelectionState:[We],applyServerSideTransaction:[We],applyServerSideTransactionAsync:[We],applyServerSideRowData:[We],retryServerSideLoads:[We],flushServerSideAsyncTransactions:[We],refreshServerSide:[We],getServerSideGroupLevelState:[We],refreshInfiniteCache:[Zs],purgeInfiniteCache:[Zs],getInfiniteRowCount:[Zs],isLastRowIndexKnown:[Zs,We],expandAll:[Qe,We],collapseAll:[Qe,We],onRowHeightChanged:[Qe,We],setRowCount:[Zs,We],getCacheBlockState:[Zs,We]},N3={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 G3(e,t,s){const o=N3[e];if(o){const{version:n,new:r,old:a,message:l}=o,c=a??e;return(...d)=>{const u=r?`Please use ${r} instead. `:"";return jo(`Since ${n} api.${c} is deprecated. ${u}${l??""}`),t.apply(t,d)}}const i=H3[e];return i?(...n)=>{const r=s.rowModel.getType();if(!i.includes(r)){oo(`api.${e} can only be called when gridOptions.rowModelType is ${i.join(" or ")}`);return}return t.apply(t,n)}:t}var V3={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},B3={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},z3={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},W3=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),_3=class extends T{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,d1(y3)}warnOnInitialPropertyUpdate(e,t){e==="api"&&O3[t]&&H(22,{key:t})}processGridOptions(e){this.processOptions(e,OF())}validateApiFunction(e,t){return G3(e,t,this.beans)}missingUserComponent(e,t,s,o){const i=ho[t];i?this.gos.assertModuleRegistered(i,`AG Grid '${e}' component: ${t}`):H(101,{propertyName:e,componentName:t,agGridDefaults:s,jsComps:o})}missingDynamicBean(e){const t=V3[e];return t?Pt(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){j3.has(e)&&H(10,{eventType:e})}validateIcon(e){if(W3.has(e)&&H(43,{iconName:e}),B3[e])return;const t=z3[e];if(t){pe(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:tl(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}H(134,{iconName:e})}isProvidedUserComp(e){return!!ho[e]}validateColDef(e){this.processOptions(e,xF())}processOptions(e,t){const{validations:s,deprecations:o,allProperties:i,propertyExceptions:n,objectName:r,docsUrl:a}=t;i&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(o)],i,r,a);const l=new Set;if(Object.keys(e).forEach(d=>{const u=o[d];if(u){const{message:b,version:S}=u;l.add(`As of v${S}, ${String(d)} is deprecated. ${b??""}`)}const h=e[d];if(h==null||h===!1)return;const g=s[d];if(!g)return;const{dependencies:f,validate:m,supportedRowModels:v,expectedType:w}=g;if(w){const b=typeof h;if(b!==w){l.add(`${String(d)} should be of type '${w}' but received '${b}' (${h}).`);return}}if(v){const b=this.gridOptions.rowModelType??"clientSide";if(!v.includes(b)){l.add(`${String(d)} is not supported with the '${b}' row model. It is only valid with: ${v.join(", ")}.`);return}}if(f){const b=this.checkForRequiredDependencies(d,f,e);if(b){l.add(b);return}}if(m){const b=m(e,this.gridOptions,this.beans);if(b){l.add(b);return}}}),l.size>0)for(const d of l)jo(d)}checkForRequiredDependencies(e,t,s){const i=Object.entries(t).filter(([n,r])=>{const a=s[n];return!r.required.includes(a)});return i.length===0?null:i.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
58
+ `)}checkProperties(e,t,s,o,i){const n=["__ob__","__v_skip","__metadata__"],r=U3(Object.getOwnPropertyNames(e),[...n,...t,...s],s),a=Object.keys(r);for(const l of a){const c=r[l];let d=`invalid ${o} property '${l}' did you mean any of these: ${c.slice(0,8).join(", ")}.`;s.includes("context")&&(d+=`
59
+ If you are trying to annotate ${o} with application data, use the '${o}.context' property instead.`),jo(d)}if(a.length>0&&i){const l=this.beans.frameworkOverrides.getDocLink(i);jo(`to see all the valid ${o} properties please check: ${l}`)}}};function U3(e,t,s){const o={},i=e.filter(n=>!t.some(r=>r===n));if(i.length>0)for(const n of i)o[n]=aa({inputValue:n,allSuggestions:s}).values;return o}var j3=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),$3={moduleName:"Validation",version:G,beans:[_3]};function sp(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var K3=class extends T{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){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,a=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return r||a}):o.childrenAfterFilter=o.childrenAfterGroup,sp(o)};if(this.doingTreeDataFiltering()){const o=(n,r)=>{if(n.childrenAfterGroup)for(let a=0;a<n.childrenAfterGroup.length;a++){const l=n.childrenAfterGroup[a],c=r||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?o(n.childrenAfterGroup[a],c):s(l,c)}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")}},q3=class extends yl{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,s,o,i){this.comp=e;const n=mi(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);const r=()=>this.onColDefChanged(n);n.addManagedListeners(this.column,{colDefChanged:r}),n.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&r()}}),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 Y(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=ht("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Do(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();mo(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(ye(t)===this.eGui)return;const i=_s(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 E.UP:case E.DOWN:case E.LEFT:case E.RIGHT:if(t)return;Ns(e);case E.ENTER:t&&Hs(this.eGui)&&e.preventDefault();break;case E.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&&xs(e.relatedTarget,"ag-floating-filter");if(s&&o&&e.target===this.eGui){const i=this.lastFocusEvent,n=!!(i&&i.key===E.TAB);if(i&&n){const r=i.shiftKey;Hs(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new Sl(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!ot(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.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{beans:{colFilter:t},column:s,gos:o}=this,i=n=>{if(n?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const r=this.comp.getFloatingFilterComp();r&&r.then(a=>{if(a){if(o.get("enableFilterHandlers")){const d=n;let u="filter";d?.afterFloatingFilter?u="ui":d?.afterDataChange?u="dataChanged":n?.source==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}const l=t?.getCurrentFloatingFilterParentModel(s),c=n?{...n,columns:n.columns??[],source:n.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,c)}})};[this.destroySyncListener]=e.addManagedListeners(s,{filterChanged:i}),t?.isFilterActive(s)&&i(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.beans.colFilter,i=this.active?o?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,n=this.comp.getFloatingFilterComp();!n||!i?this.updateCompDetails(e,i,s):n.then(r=>{!r||o?.areFilterCompsDifferent(this.userCompDetails??null,i)?this.updateCompDetails(e,i,s):this.updateFloatingFilterParams(i,"colDef")})}updateCompDetails(e,t,s){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),s&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let s=e.params;this.comp.getFloatingFilterComp()?.then(o=>{typeof o?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(s={...s,model:Ae(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),o.refresh(s))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function Y3(e,t){const s=e.colModel.getCol(t);if(!s){pe(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:s,positionBy:"auto"})}function Z3(e){e.menuSvc?.hidePopupMenu()}var Q3={moduleName:"SharedMenu",version:G,beans:[Cy],apiFunctions:{showColumnMenu:Y3,hidePopupMenu:Z3}},X3=class extends $0{postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getDefaultPopupParent(){return this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:s,event:o}=e,i=t.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(t,s);let r=!1;const a=()=>{const l=this.keepXYWithinBounds(s,i.top-n.top,0),c=s.clientWidth>0?s.clientWidth:200;r||(s.style.minWidth=`${c}px`,r=!0);const u=n.right-n.left-c;let h;return this.gos.get("enableRtl")?(h=f(),h<0&&(h=g(),this.setAlignedStyles(s,"left")),h>u&&(h=0,this.setAlignedStyles(s,"right"))):(h=g(),h>u&&(h=f(),this.setAlignedStyles(s,"right")),h<0&&(h=0,this.setAlignedStyles(s,"left"))),{x:h,y:l};function g(){return i.right-n.left-2}function f(){return i.left-n.left-c}};this.positionPopup({ePopup:s,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e,"subMenu",s,t,o instanceof MouseEvent?o:void 0)})}callPostProcessPopup(e,t,s,o,i){const n=this.gos.getCallback("postProcessPopup");if(n){const{column:r,rowNode:a}=e;n({column:r,rowNode:a,ePopup:s,type:t,eventSource:o,mouseEvent:i})}}getActivePopups(){return this.popupList.map(e=>e.element)}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const s of this.popupList)t.applyThemeClasses(s.wrapper)}}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return _t(e)}},$n={moduleName:"Popup",version:G,beans:[X3]},J3=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function eD(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function tD(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function sD(e,t){const s=e.colModel.getColDefCol(t);if(s)return e.colFilter?.destroyFilter(s,"api")}function oD(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function iD(e){return e.filterManager?.getFilterModel()??{}}function nD(e,t,s){const{gos:o,colModel:i,colFilter:n}=e;s&&!o.get("enableFilterHandlers")&&(H(288),s=!1);const r=i.getColDefCol(t);return r?n?.getModelForColumn(r,s)??null:null}function rD(e,t,s){return e.filterManager?.setColumnFilterModel(t,s)??Promise.resolve()}function aD(e,t){const s=e.colModel.getCol(t);if(!s){pe(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:s,containerType:"columnFilter",positionBy:"auto"})}function lD(e){e.menuSvc?.hideFilterMenu()}function cD(e,t){const s=e.colModel.getCol(t);if(!s){pe(12,{colKey:t});return}return e.colFilter?.getHandler(s,!0)}function dD(e,t){const{colModel:s,colFilter:o,gos:i}=e;if(!i.get("enableFilterHandlers")){H(287);return}const{colId:n,action:r}=t;if(n){const a=s.getColById(n);a&&o?.updateModel(a,r)}else o?.updateAllModels(r)}var uD={filterHandler:()=>({doesFilterPass:()=>!0})},hD=class extends T{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...Zh},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",s){const{colModel:o,dataTypeSvc:i,filterManager:n}=this.beans;if(i?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const r=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((c,d)=>{const u=e[d];r.push(this.setModelOnFilterWrapper(c,u)),l.delete(d)}),l.forEach(c=>{const d=o.getColDefCol(c)||o.getCol(c);if(!d){H(62,{colId:c});return}if(!d.isFilterAllowed()){H(63,{colId:c});return}const u=this.getOrCreateFilterWrapper(d,!0);if(!u){H(64,{colId:c});return}r.push(this.setModelOnFilterWrapper(u,e[c],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{r.push(this.setModelOnFilterWrapper(l,null))});de.all(r).then(()=>{const l=this.getModel(!0),c=[];this.allColumnFilters.forEach((d,u)=>{const h=a?a[u]:null,g=l?l[u]:null;si(h,g)||c.push(d.column)}),c.length>0?n?.onFilterChanged({columns:c,source:t}):s&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:s,initialModel:o,beans:{colModel:i}}=this;if(s.forEach((n,r)=>{const a=this.getModelFromFilterWrapper(n);V(a)&&(t[r]=a)}),!e)for(const n of Object.keys(o)){const r=o[n];V(r)&&!s.has(n)&&i.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}setState(e,t,s="api"){if(this.state.clear(),t)for(const o of Object.keys(t)){const i=t[o];this.state.set(o,{model:Ae(this.model,o),state:i})}this.setModel(e,s,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let s=!1;return e.forEach((o,i)=>{const n=o.state;n!=null&&(s=!0,t[i]=n)}),s?t:void 0}getModelFromFilterWrapper(e){const s=e.column.getColId();if(e.isHandler)return Ae(this.model,s);const o=e.filter;return o?typeof o.getModel!="function"?(H(66),null):o.getModel():Ae(this.initialModel,s)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=c=>c?c.isFilterActive?c.isFilterActive():(H(67),!1):!1,{colModel:t,gos:s}=this.beans,o=!!ea(s),i=c=>{if(!c.isPrimary())return!0;const u=!t.isPivotActive();return!c.isValueActive()||!u?!1:t.isPivotMode()?!0:o},n=[],r=[],a=(c,d,u)=>{d&&(i(c)?n.push(u):r.push(u))},l=[];return this.allColumnFilters.forEach(c=>{const d=c.column,u=d.getColId();if(c.isHandler)l.push(de.resolve().then(()=>{a(d,this.isHandlerActive(d),{colId:u,isHandler:!0,handler:c.handler,handlerParams:c.handlerParams})}));else{const h=Jt(c);h&&l.push(h.then(g=>{a(d,e(g),{colId:u,isHandler:!1,comp:g})}))}}),de.all(l).then(()=>{this.activeAggregateFilters=n,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){const s=[];return this.allColumnFilters.forEach(o=>{const i=o.column;if(o.isHandler)s.push(de.resolve().then(()=>{this.setColFilterActive(i,this.isHandlerActive(i),e,t)}));else{const n=Jt(o);n&&s.push(n.then(r=>{this.setColFilterActive(i,r.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),de.all(s)}doFiltersPass(e,t,s){const{data:o,aggData:i}=e,n=s?this.activeAggregateFilters:this.activeColumnFilters,r=s?i:o,a=this.model;for(let l=0;l<n.length;l++){const c=n[l],{colId:d,isHandler:u}=c;if(d!==t)if(u){const{handler:h,handlerParams:g}=c;if(!h.doesFilterPass({node:e,data:r,model:Ae(a,d),handlerParams:g}))return!1}else{const h=c.comp;if(typeof h.doesFilterPass!="function"){pe(91);continue}if(!h.doesFilterPass({node:e,data:r}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 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{column:t,additionalEventAttributes:s}=e,o=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",s).then(()=>{this.allColumnFilters.forEach(i=>{const{column:n,isHandler:r}=i;o!==n.getColId()&&(r&&i.handler.onAnyFilterChanged?.(),Jt(i,r)?.then(a=>{typeof a?.onAnyFilterChanged=="function"&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(s=>{const o=s.isHandler;o&&s.handler.onNewRowsLoaded?.();const i=Jt(s,o);i&&t.push(i.then(n=>{n.onNewRowsLoaded?.()}))}),de.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:s,colModel:o}=this.beans;return(i,n)=>{const r=n?o.getCol(n):e;return r?s.getValue(r,i,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const s=t?.filter;return s?s.isFilterActive():Ae(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=V(Ae(this.model,e.getColId()));if(t)return t;const s=this.beans.groupFilter;return s?.isGroupFilter(e)?s.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?Jt(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const s=Jt(t);return s?s.then(o=>({comp:o,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const s=this.getOrCreateFilterWrapper(e,t);return s?.isHandler?s.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let s=this.cachedFilter(e);return!s&&t&&(s=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,s)),s}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return E1(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":mS(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,s,o,i,n){const r=()=>{const c=this.createFilterCompParams(e,i,n),d=o(c,i);return Ib(this.beans.userCompFactory,t,d,s)},a=r();return a?{compDetails:a,createFilterUi:c=>(c?r():a).newAgStackInstance()}:null}createFilterInstance(e,t,s,o){const i=this.beans.selectableFilter;i?.isSelectable(t)&&(t=i.getFilterDef(e,t));const{handler:n,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,s)??{},l=this.createFilterComp(e,t,s,o,!!n,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:n,handlerGenerator:a,handlerParams:r};const{compDetails:c,createFilterUi:d}=l;return this.isGlobalButtons&&(c.params?.buttons?.length||H(281,{colId:e.getColId()})),{compDetails:c,handler:n,handlerGenerator:a,handlerParams:r,createFilterUi:d}}createBaseFilterParams(e,t){const{filterManager:s,rowModel:o}=this.beans;return Y(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:i=>s?.doesRowPassOtherFilters(e.getColId(),i)??!0,rowModel:o})}createFilterCompParams(e,t,s,o){const i=this.filterChangedCallbackFactory(e),n=this.createBaseFilterParams(e,o);if(n.filterChangedCallback=i,n.filterModifiedCallback=o?()=>{}:r=>this.filterModified(e,r),t){const r=n,a=e.getColId(),l=Ae(this.model,a);r.model=l,r.state=this.state.get(a)??{model:l},r.onModelChange=(c,d)=>{this.updateStoredModel(a,c),this.refreshHandlerAndUi(e,c,"ui",!1,d).then(()=>{i({...d,source:"columnFilter"})})},r.onStateChange=c=>{this.updateState(e,c),this.updateOrRefreshFilterUi(e)},r.onAction=(c,d,u)=>{this.updateModel(e,c,d),this.dispatchLocalEvent({type:"filterAction",column:e,action:c,event:u})},r.getHandler=()=>this.getHandler(e,!0),r.onUiChange=c=>this.filterUiChanged(e,c),r.source=s}return n}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,s){const o=t(),i={created:!0,create:t,filterParams:e.params,compDetails:e,promise:o};return o.then(s),i}createFilterWrapper(e){const{compDetails:t,handler:s,handlerGenerator:o,handlerParams:i,createFilterUi:n}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),r=e.getColId();if(s)return delete this.initialModel[r],s.init?.({...i,source:"init",model:Ae(this.model,r)}),{column:e,isHandler:!0,handler:s,handlerGenerator:o,handlerParams:i,filterUi:this.createFilterUiForHandler(t,n)};if(n){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,n,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,s){const{gos:o,frameworkOverrides:i,registry:n}=this.beans;let r;const a=g=>{const f=g.filter;if(Fh(f)){const m=f.handler;return m||(r=f.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof f=="string"?f:void 0},l=o.get("enableFilterHandlers"),c=l?a(t):void 0,d=g=>()=>this.createBean(n.createDynamicBean(g,!0));let u,h;if(typeof c=="string"){const g=o.get("filterHandlers")?.[c];g!=null?u=g:iS.has(c)&&(u=d(c),h=c)}else u=c;if(!u){let g;const{compName:f,jsComp:m,fwComp:v}=Ph(i,t);f?g=f:m==null&&v==null&&t.filter===!0&&(g=s),h=this.handlerMap[g],h&&(u=d(h))}return u?{filterHandler:u,handlerNameOrCallback:r??h}:l?(Fe(o)&&H(277,{colId:e.getColId()}),uD):void 0}createHandler(e,t,s){const o=this.createHandlerFunc(e,t,s);if(!o)return;const i=nr(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:n,filterHandler:r}=o,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,i);return{handler:a,handlerParams:l,handlerGenerator:n??r}}createHandlerFromFunc(e,t,s){const o=e.getColDef(),i=t(Y(this.gos,{column:e,colDef:o})),n=this.createHandlerParams(e,s);return{handler:i,handlerParams:n}}createHandlerParams(e,t){const s=e.getColDef(),o=e.getColId(),i=this.filterChangedCallbackFactory(e);return Y(this.gos,{colDef:s,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:n=>this.beans.filterManager?.doesRowPassOtherFilters(o,n)??!0,onModelChange:(n,r)=>{this.updateStoredModel(o,n),this.refreshHandlerAndUi(e,n,"handler",!1,r).then(()=>{i({...r,source:"columnFilter"})})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:s,groupFilter:o}=this.beans;this.allColumnFilters.forEach((n,r)=>{let a;n.column.isPrimary()?a=t.getColDefCol(r):a=t.getCol(r),!(a&&a===n.column)&&(e.push(n.column),this.disposeFilterWrapper(n,"columnChanged"),this.disposeColumnListener(r))});const i=o&&e.every(n=>o.isGroupFilter(n));e.length>0&&!i&&s?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const s=this.beans.groupFilter;return s?.isGroupFilter(e)?s.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:s,frameworkOverrides:o,selectableFilter:i}=this.beans,n=h=>{const g=this.getOrCreateFilterUi(e);g?.then(f=>{h(ci(f))})},r=e.getColDef(),a=i?.isSelectable(r)?i.getFilterDef(e,r):r,l=SS(o,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",c=this.gos.get("enableFilterHandlers"),d=nr(s,a,this.createFilterCompParams(e,c,"init",!0)),u=Y(this.gos,{column:e,filterParams:d,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:n,showParentFilter:t});if(c){const h=u,g=e.getColId(),f=this.filterChangedCallbackFactory(e);h.onUiChange=m=>this.floatingFilterUiChanged(e,m),h.model=Ae(this.model,g),h.onModelChange=(m,v)=>{this.updateStoredModel(g,m),this.refreshHandlerAndUi(e,m,"floating",!0,v).then(()=>{f({...v,source:"columnFilter"})})},h.getHandler=()=>this.getHandler(e,!0),h.source="init"}return Hb(s,r,u,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,s,o){const i="paramsUpdated";if(e.isHandler){const n=t.getColId();delete this.initialModel[n],this.state.delete(n);const r=e.filterUi,a=this.createFilterUiForHandler(s,o);e.filterUi=a;const l=this.eventSvc;r?.created?r.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:i,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:i,column:t})}else this.destroyFilter(t,i)}destroyFilter(e,t="api"){const s=e.getColId(),o=this.allColumnFilters.get(s);this.disposeColumnListener(s),delete this.initialModel[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){let s=!1;const{column:o,isHandler:i,filterUi:n}=e,r=o.getColId();i&&(s=this.isHandlerActive(o),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const a=()=>{this.setColFilterActive(o,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:o})};if(n){if(n.created)return n.promise.then(l=>(s=i?s:!!l?.isFilterActive(),this.destroyBean(l),a(),s));a()}return de.resolve(s)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const s=this.allColumnFilters.get(e);if(!s)return;const o=this.beans,i=s.column,n=i.getColDef(),r=i.isFilterAllowed(),a=this.getDefaultFilter(i),l=o.selectableFilter,c=l?.isSelectable(n)?l.getFilterDef(i,n):n,d=r?this.createHandlerFunc(i,c,this.getDefaultFilter(i)):void 0,u=!!d,h=s.isHandler;if(h!=u){this.destroyFilter(i,"paramsUpdated");return}const{compDetails:g,createFilterUi:f}=(r?this.createFilterComp(i,c,a,v=>v,u,"colDef"):null)??{compDetails:null,createFilterUi:null},m=g?.params??nr(o.userCompFactory,c,this.createFilterCompParams(i,u,"colDef"));if(h){const v=d?.handlerNameOrCallback??d?.filterHandler,w=Ae(this.model,e);if(s.handlerGenerator!=v){const b=s.handler,{handler:S,handlerParams:R}=this.createHandlerFromFunc(i,d.filterHandler,m);s.handler=S,s.handlerParams=R,s.handlerGenerator=v,delete this.model[e],S.init?.({...R,source:"init",model:null}),this.destroyBean(b),w!=null&&this.beans.filterManager?.onFilterChanged({columns:[i],source:t})}else{const b=this.createHandlerParams(i,g?.params);s.handlerParams=b,s.handler.refresh?.({...b,source:"colDef",model:w})}}if(this.areFilterCompsDifferent(s.filterUi?.compDetails??null,g)||!s.filterUi||!g){this.destroyFilterUi(s,i,g,f);return}s.filterUi.filterParams=m,Jt(s,h)?.then(v=>{(v?.refresh?v.refresh(m):!0)===!1?this.destroyFilterUi(s,i,g,f):this.dispatchLocalEvent({type:"filterParamsChanged",column:i,params:m})})}refreshHandlerAndUi(e,t,s,o,i){const n=this.cachedFilter(e);if(!n)return o&&this.getOrCreateFilterWrapper(e,!0),de.resolve();if(!n.isHandler)return de.resolve();const{filterUi:r,handler:a,handlerParams:l}=n;return nS(()=>{if(r){const{created:c,filterParams:d}=r;if(c)return r.promise.then(u=>u?{filter:u,filterParams:d}:void 0);r.refreshed=!0}return de.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},s,i)}setColumnFilterWrapper(e,t){const s=e.getColId();this.allColumnFilters.set(s,t),this.allColumnListeners.set(s,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(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)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const s=this.getOrCreateFilterUi(t);return s?new Promise(o=>{s.then(i=>{o(ci(i))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:s})=>{this.setModelForColumn(e,t).then(()=>s())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:o,model:i}=this,n=e.getColId(),r=o.get(n);return r?r.model??null:Ae(i,n)}const s=this.cachedFilter(e);return s?this.getModelFromFilterWrapper(s):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let s=()=>{};const o=new Promise(i=>{s=i});return this.columnModelUpdates.push({key:e,model:t,resolve:s}),o}return new Promise(s=>{this.setModelForColumnLegacy(e,t).then(o=>s(o))})}getStateForColumn(e){return this.state.get(e)??{model:Ae(this.model,e)}}setModelForColumnLegacy(e,t){const s=this.beans.colModel.getColDefCol(e),o=s?this.getOrCreateFilterWrapper(s,!0):null;return o?this.setModelOnFilterWrapper(o,t):de.resolve()}setColDefPropsForDataType(e,t,s){const o=e.filter,i=o===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):o;if(typeof i!="string")return;let n,r;const a=this.beans,{filterParams:l,filterValueGetter:c}=e;i==="agMultiColumnFilter"?{filterParams:n,filterValueGetter:r}=a.multiFilter?.getParamsForDataType(l,c,t,s)??{}:{filterParams:n,filterValueGetter:r}=gS(i,l,c,t,s,a,this.getLocaleTextFunc()),e.filterParams=n,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,s,o){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",s)),e.dispatchColEvent("filterChanged",s,o)}setModelOnFilterWrapper(e,t,s){return new de(o=>{if(e.isHandler){const n=e.column,r=n.getColId(),a=this.model[r];if(this.updateStoredModel(r,t),s&&t===a){o();return}this.refreshHandlerAndUi(n,t,"api").then(()=>o());return}const i=Jt(e);if(i){i.then(n=>{if(typeof n?.setModel!="function"){H(65),o();return}(n.setModel(t)||de.resolve()).then(()=>o())});return}o()})}updateStoredModel(e,t){V(t)?this.model[e]=t:delete this.model[e];const s=this.state.get(e),o={model:t,state:s?.state};this.state.set(e,o)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(s=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:s,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,s){const o=e.getColId(),i=this.cachedFilter(e),n=()=>i?.filterUi;Ic(t,n,()=>Ae(this.model,o),()=>this.state.get(o),r=>this.updateState(e,r),r=>n()?.filterParams?.onModelChange(r,s),i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0)}updateAllModels(e,t){const s=[];this.allColumnFilters.forEach((o,i)=>{const n=this.beans.colModel.getColDefCol(i);n&&Ic(e,()=>o.filterUi,()=>Ae(this.model,i),()=>this.state.get(i),r=>this.updateState(n,r),r=>{this.updateStoredModel(i,r),this.dispatchLocalEvent({type:"filterAction",column:n,action:e}),s.push(this.refreshHandlerAndUi(n,r,"ui"))},o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0)}),s.length&&de.all(s).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();Xh(()=>this.cachedFilter(e)?.filterUi,()=>Ae(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:s}=this;for(const i of s)if(i.source==="COLUMN_MENU")return!1;let o=!1;for(const i of e.keys()){const n=e.get(i);if(n.valid===!1)return!1;(n.model??null)!==Ae(t,i)&&(o=!0)}return o}hasUnappliedModel(e){const{model:t,state:s}=this;return(s.get(e)?.model??null)!==Ae(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const s=this.beans.filterPanelSvc;return s?.isActive?!!s.getState(e.getColId()):!1}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function gD(e){return!!e.filterManager?.isAnyFilterPresent()}function pD(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var fD=class extends T{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)}setFilterState(e,t,s="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,s)}setFilterModel(e,t="api",s){if(this.isAdvFilterEnabled()){s||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&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(){ea(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:s,columns:o=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):de.resolve()).then(()=>{const i={source:t,type:"filterChanged",columns:o};s&&Ke(i,s),this.eventSvc.dispatchEvent(i),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!ea(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}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.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}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?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){H(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}},mD=class extends T{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,s,o){e&&!e.isColumn||this.showPopup(e,i=>{this.popupSvc?.positionPopupUnderMouseEvent({column:e,type:s,mouseEvent:t,ePopup:i})},s,t.target,ot(this.gos),o)}showMenuAfterButtonClick(e,t,s,o){if(e&&!e.isColumn)return;let i=-1,n="left";const r=ot(this.gos);!r&&this.gos.get("enableRtl")&&(i=1,n="right");const a=r?void 0:4*i,l=r?void 0:4;this.showPopup(e,c=>{this.popupSvc?.positionPopupByComponent({type:s,eventSource:t,ePopup:c,nudgeX:a,nudgeY:l,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 uS(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){pe(57);return}const a=Ye({tag:"div",cls:`ag-menu${i?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:m=>this.trapFocusWithin(m,a)}),a.appendChild(r?.getGui());let l;const c=()=>r?.afterGuiDetached(),d=D1(this.gos)?o??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=m=>{Vc(e,!1,"contextMenu");const v=m instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),v&&o&&$t(o)&&Lh(o)?.focus({preventScroll:!0}),c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,s,e),n?.()},h=this.getLocaleTextFunc(),g=i&&s!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),f=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(a),anchorToElement:d,ariaLabel:g});f&&(this.hidePopup=l=f.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:s,hidePopup:l})}),Vc(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,s,e)}trapFocusWithin(e,t){e.key!==E.TAB||e.defaultPrevented||_s(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Hs(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()}},CD=class extends T{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,s){if(!t)return;const o=e.getColDef(),{selectableFilter:i,valueSvc:n}=this.beans,r=s??i?.getFilterValueGetter(e.getColId())??o.filterValueGetter;return r?this.executeFilterValueGetter(r,t.data,e,t,o):n.getValue(e,t)}executeFilterValueGetter(e,t,s,o,i){const{expressionSvc:n,valueSvc:r}=this.beans,a=Y(this.gos,{data:t,node:o,column:s,colDef:i,getValue:r.getValueCallback.bind(r,o)});return typeof e=="function"?e(a):n?.evaluate(e,a)}},vD={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},wD=class extends Re{constructor(){super(vD,[Bn]),this.eFloatingFilterText=q}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const s=e,o=s.getHandler();if(o.getModelAsString){const i=o.getModelAsString(s.model);this.eFloatingFilterText.setValue(i)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const s=t.getModelAsString(e);this.eFloatingFilterText.setValue(s)}})}refresh(e){this.init(e)}},Tl=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const s=e.filterOptions??t;this.filterOptions!==s&&(this.filterOptions=s,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const s=[["displayKey"],["displayName"],["predicate","test"]],o=i=>i.some(n=>t[n]!=null)?!0:(H(72,{keys:i}),!1);if(!s.every(o)){this.filterOptions=e.filter(i=>i===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const s=t[0];if(typeof s=="string")return s;if(s.displayKey)return s.displayKey;H(73)}else H(74)}getCustomOption(e){return this.customFilterOptions[e]}};function Zo(e,t,s){return s==null?e.splice(t):e.splice(t,s)}function Rn(e){return e==null||typeof e=="string"&&e.trim().length===0}function bD(e){return e==="AND"||e==="OR"?e:"AND"}function SD(e,t,s){if(e==null)return;const{predicate:o}=e;if(o!=null&&!t.some(i=>i==null))return o(t,s)}function yD(e,t){let s=e.length;return s>t&&(e.splice(t),H(78),s=t),s}function gi(e,t){const s=t.getCustomOption(e);if(s){const{numberOfInputs:i}=s;return i??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}var Ml=class extends bS{constructor(e,t,s){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=s,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new Tl;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=bD(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions();const t=this.getGui();this.isReadOnly()?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,s)=>{const o=s===0?e:this.optionsFactory.defaultOption;t.setValue(o,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const s=!e.operator,o=!t.operator;if(!s&&o||s&&!o)return!1;let n;if(s){const r=e,a=t;n=this.areSimpleModelsEqual(r,a)}else{const r=e,a=t;n=r.operator===a.operator&&gs(r.conditions,a.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return n}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),de.resolve();if(e.operator){const o=e;let i=o.conditions;i==null&&(i=[],H(77));const n=yD(i,this.maxNumConditions),r=this.getNumConditions();if(n<r)this.removeConditionsAndOperators(n);else if(n>r)for(let l=r;l<n;l++)this.createJoinOperatorPanel(),this.createOption();const a=o.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),i.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{const o=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(o.type,!0),this.setConditionIntoUi(o,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),de.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(H(79),t=1),this.maxNumConditions=t;let s=e.numAlwaysVisibleConditions??1;s<1&&(H(80),s=1),s>t&&(H(81),s=t),this.numAlwaysVisibleConditions=s}createOption(){const e=this.getGui(),t=this.createManagedBean(new dl);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const s=this.createEValue();this.eConditionBodies.push(s),e.appendChild(s),this.putOptionsIntoDropdown(t),this.resetType(t);const o=this.getNumConditions()-1;this.forEachPositionInput(o,i=>this.resetInput(i)),this.addChangedListeners(t,o)}createJoinOperatorPanel(){const e=Ye({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),s=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const o=this.eJoinPanels.length-1,i=this.joinOperatorId++;this.resetJoinOperatorAnd(t,o,i),this.resetJoinOperatorOr(s,o,i),this.isReadOnly()||(t.onValueChange(this.listener),s.onValueChange(this.listener))}createJoinOperator(e,t,s){const o=this.createManagedBean(new Qb);e.push(o);const i="ag-filter-condition-operator";return o.addCss(i),o.addCss(`${i}-${s}`),t.appendChild(o.getGui()),o}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const s of t)e.addOption(s);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,s=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:s?this.getLocaleTextFunc()(s.displayKey,s.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let s=0;s<this.getNumConditions();s++)this.isConditionUiComplete(s)?e=s:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const s=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<s){this.removeConditionsAndOperators(s+1);const o=e+1,i=s-o;i>0&&this.removeConditionsAndOperators(o,i),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((o,i)=>{const n=this.isConditionDisabled(i,e);o.setDisabled(n||this.filterListOptions.length<=1),i===1&&(ii(this.eJoinPanels[0],n),this.eJoinAnds[0].setDisabled(n),this.eJoinOrs[0].setDisabled(n))}),this.eConditionBodies.forEach((o,i)=>{Se(o,this.isConditionBodyVisible(i))});const s=(t??this.getJoinOperator())==="OR";for(const o of this.eJoinAnds)o.setValue(!s,!0);for(const o of this.eJoinOrs)o.setValue(s,!0);this.forEachInput((o,i,n,r)=>{this.setElementDisplayed(o,i<r),this.setElementDisabled(o,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:s,eConditionBodies:o,eJoinPanels:i,eJoinAnds:n,eJoinOrs:r}=this;this.removeComponents(s,e,t),this.removeElements(o,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(i,a,t),this.removeComponents(n,a,t),this.removeComponents(r,a,t)}removeElements(e,t,s){const o=Zo(e,t,s);for(const i of o)as(i)}removeComponents(e,t,s){const o=Zo(e,t,s);for(const i of o)as(i.getGui()),this.destroyBean(i)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const s=this.getInputs(0)[0];s instanceof ys&&this.isConditionBodyVisible(0)?t=s.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column))return;e.onStateChange({model:e.model});let t=-1,s=-1,o=!1;const i=this.getJoinOperator();for(let r=this.getNumConditions()-1;r>=0;r--)if(this.isConditionUiComplete(r))t===-1&&(t=r,s=r);else{const a=r>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(r-1),l=r<t;(a||l)&&(this.removeConditionsAndOperators(r,1),o=!0,l&&s--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(s===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(s,i),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=s}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}getPlaceholderText(e,t){let s=this.translate(e);if(typeof this.filterPlaceholder=="function"){const o=this.eTypes[t].getValue(),i=this.translate(o);s=this.filterPlaceholder({filterOptionKey:o,filterOption:i,placeholder:s})}else typeof this.filterPlaceholder=="string"&&(s=this.filterPlaceholder);return s}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,s,o,i)=>{if(!(t instanceof ys))return;const n=s===0&&i>1?"inRangeStart":s===0?"filterOoo":"inRangeEnd",r=s===0&&i>1?e("ariaFilterFromValue","Filter from value"):s===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(n,o)),t.setInputAriaLabel(r)})}setElementValue(e,t,s){e instanceof ys&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){bc(e)&&Se(e.getGui(),t)}setElementDisabled(e,t){bc(e)&&ii(e.getGui(),t)}attachElementOnChange(e,t){e instanceof ys&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,s)=>{this.forEachPositionTypeInput(s,t,e)})}forEachPositionInput(e,t){const s=this.getConditionType(e);this.forEachPositionTypeInput(e,s,t)}forEachPositionTypeInput(e,t,s){const o=gi(t,this.optionsFactory),i=this.getInputs(e);for(let n=0;n<i.length;n++){const r=i[n];r!=null&&s(r,n,e,o)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return gi(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(s=>s==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,s)=>this.resetJoinOperatorAnd(t,s,this.joinOperatorId+s)),this.eJoinOrs.forEach((t,s)=>this.resetJoinOperatorOr(t,s,this.joinOperatorId+s)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const s=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(s).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,s){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),s)}resetJoinOperatorOr(e,t,s){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),s)}resetJoinOperator(e,t,s,o,i){this.updateJoinOperatorDisabled(e.setValue(s,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${i}`).setLabel(o),t)}updateJoinOperatorsDisabled(){const e=(t,s)=>this.updateJoinOperatorDisabled(t,s);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const s=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((o,i,n)=>{n===t&&this.setElementValue(o,s[i]!=null?s[i]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,s,o)=>{this.setElementValue(t,s===0&&o===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,s=>{this.attachElementOnChange(s,this.listener)}))}hasInvalidInputs(){return!1}isReadOnly(){return!!this.params.readOnly}},op=class{constructor(e,t,s,o,i,n){this.alive=!0,this.context=e,this.eParent=i;const r=kb(t,s,o);r&&r.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;i.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:c}=this;l&&a.setDate(l),c!=null&&a.setDisabled?.(c),n?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){Se(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}},Il=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function ip(e,t){const{dateFrom:s,dateTo:o,type:i}=e||{};return[s&&Je(s,void 0,!0)||null,o&&Je(o,void 0,!0)||null].slice(0,gi(i,t))}var bd=1e3,Sd=1/0,RD=class extends Ml{constructor(){super("dateFilter",ip,Il),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=bd,this.maxValidYear=Sd,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,c)=>{const d=e[l];if(d!=null)if(isNaN(d))H(82,{param:l});else return d==null?c:Number(d);return c},s=t("minValidYear",bd),o=t("maxValidYear",Sd);this.minValidYear=s,this.maxValidYear=o,s>o&&H(83);const{minValidDate:i,maxValidDate:n}=e,r=i instanceof Date?i:Je(i);this.minValidDate=r;const a=n instanceof Date?n:Je(n);this.maxValidDate=a,r&&a&&r>a&&H(84)}createDateCompWrapper(e){const{beans:{userCompFactory:t,context:s,gos:o},params:i}=this,n=new op(s,t,i.colDef,Y(o,{onDateChanged:()=>this.onUiChanged(),filterParams:i,location:"filter"}),e);return this.addDestroyFunc(()=>n.destroy()),n}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=Ye({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,s,o){const i=Ye({tag:"div",cls:`ag-filter-${o} ag-filter-date-${o}`});t.push(i),e.appendChild(i),s.push(this.createDateCompWrapper(i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),Zo(this.eConditionPanelsFrom,e,t),Zo(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,s){const o=Zo(e,t,s);for(const i of o)i.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:s,minValidYear:o,maxValidYear:i}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<o)return!1;if(s){if(e>s)return!1}else if(e.getUTCFullYear()>i)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((s,o,i,n)=>{i!==e||!t||o>=n||(t=t&&this.isValidDateValue(s.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),s={},o=this.getValues(e),i=this.params.useIsoSeparator?"T":" ";return o.length>0&&(s.dateFrom=it(o[0],!0,i)),o.length>1&&(s.dateTo=it(o[1],!0,i)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...s}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),s=e("ariaFilterValue","Filter Value");this.forEachInput(o=>{o.setInputPlaceholder(t),o.setInputAriaLabel(s)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(s,o,i,n)=>{o<n&&t.push(s.getDate())}),t}translate(e){return e==="lessThan"?super.translate("before"):e==="greaterThan"?super.translate("after"):super.translate(e)}},np=class extends T{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,s=new Tl;this.optionsFactory=s,s.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(s,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,s=this.optionsFactory;s.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:s,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:s}=t,o=[];if(s){const r=t;o.push(...r.conditions??[])}else o.push(t);const i=s&&s==="OR"?"some":"every",n=this.params.getValue(e.node);return o[i](r=>this.individualConditionPasses(e,r,n))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:s,maxNumConditions:o}}=e;if(t==null)return;let n=tg(t)?t.conditions:[t];const r=s?.map(d=>typeof d=="string"?d:d.displayKey)??this.defaultOptions;if(!(!n||n.every(d=>r.find(u=>u===d.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const c=this.filterType;if((n&&!n.every(d=>d.filterType===c)||t.filterType!==c)&&(n=n.map(d=>({...d,filterType:c})),l=!0),typeof o=="number"&&n&&n.length>o&&(n=n.slice(0,o),l=!0),l){const d=n.length>1?{...t,filterType:c,conditions:n}:{...n[0],filterType:c};this.params={...e,model:d},e.onModelChange(d)}}individualConditionPasses(e,t,s){const o=this.optionsFactory,i=this.mapValuesFromModel(t,o),n=o.getCustomOption(t.type),r=SD(n,i,s);return r??(s==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(i,s,t,e))}},rp=class extends np{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:s,includeBlanksInGreaterThan:o,includeBlanksInLessThan:i,includeBlanksInRange:n}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(s)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(o)return!0;break;case"lessThan":case"lessThanOrEqual":if(i)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,s){const o=s.type;if(!this.isValid(t))return o==="notEqual"||o==="notBlank";const i=this.comparator(),n=e[0]!=null?i(e[0],t):0;switch(o){case"equals":return n===0;case"notEqual":return n!==0;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const r=i(e[1],t);return this.params.filterParams.inRangeInclusive?n>=0&&r<=0:n>0&&r<0}case"blank":return Rn(t);case"notBlank":return!Rn(t);default:return H(76,{filterModelType:o}),!0}}},ap={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},xD={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},kl=class extends T{constructor(e,t,s){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=s}getModelAsString(e,t){const s=this.getLocaleTextFunc(),o=t==="filterToolPanel";if(!e)return o?is(this,"filterSummaryInactive"):null;if(e.operator!=null){const n=e,a=(n.conditions??[]).map(c=>this.getModelAsString(c,t)),l=n.operator==="AND"?"andCondition":"orCondition";return a.join(` ${is(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return o?is(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):s(e.type,e.type);{const n=e,r=this.optionsFactory.getCustomOption(n.type),{displayKey:a,displayName:l,numberOfInputs:c}=r||{};return a&&l&&c===0?s(a,l):this.conditionToString(n,o,n.type==="inRange"||c===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:s}=e;this.optionsFactory=t,this.filterParams=s}conditionForToolPanel(e,t,s,o,i,n){let r;const a=this.getTypeKey(e);return a&&(r=is(this,a)),i&&n&&(r=this.getLocaleTextFunc()(i,n)),r!=null?t?`${r} ${is(this,"filterSummaryInRangeValues",[s(),o()])}`:`${r} ${s()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},lp=class extends kl{constructor(e,t){super(e,t,s=>{const{dataTypeSvc:o,valueSvc:i}=this.beans,n=t.column,r=o?.getDateFormatterFunction(n),a=r?r(s??void 0):s;return i.formatValue(n,null,a)}),this.filterTypeKeys=ap}conditionToString(e,t,s,o,i){const{type:n}=e,r=Je(e.dateFrom),a=Je(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):h=>ra(h,l),d=()=>r!==null?c(r):"null",u=()=>a!==null?c(a):"null";if(t){const h=this.conditionForToolPanel(n,s,d,u,o,i);if(h!=null)return h}return s?`${d()}-${u()}`:r!=null?c(r):`${n}`}};function FD(e,t){const s=t;return s<e?-1:s>e?1:0}var ED=class extends rp{constructor(){super(ip,Il),this.filterType="date",this.FilterModelFormatterClass=lp}comparator(){return this.params.filterParams.comparator??FD}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}},cp=class extends Re{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let s;t?s=e.conditions[0]:s=e,this.lastType=s.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const s=e;return this.isTypeEditable(s.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const s=e;this.onModelUpdated(s.model)}}setParams(e){const t=new Tl;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const s=this.optionsFactory.defaultOption;t||(this.lastType=s),this.readOnly=!!e.filterParams.readOnly;const o=this.isTypeEditable(s);this.setEditable(o)}refresh(e){this.params=e;const t=e,s=this.reactive;if((!s||t.source==="colDef")&&this.updateParams(e),s){const{source:o,model:i}=t;if(o==="dataChanged"||o==="ui")return;this.onModelUpdated(i)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}hasSingleInput(e){const t=this.optionsFactory.getCustomOption(e)?.numberOfInputs;return t==null||t==1}isTypeEditable(e){const t=["inRange","empty","blank","notBlank"];return!!e&&!this.readOnly&&this.hasSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},DD={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},PD=class extends cp{constructor(){super(DD,[Bn]),this.eReadOnlyText=q,this.eDateWrapper=q,this.FilterModelFormatterClass=lp,this.filterType="date",this.defaultOptions=Il}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const s=e?Je(e.dateFrom):null;this.dateComp.setDate(s),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){Se(this.eDateWrapper,e),Se(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const s=t.model,o=it(e),i=o==null?null:{...s??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:o};t.onModelChange(i,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=fl(e,this.defaultDebounceMs);return Y(this.gos,{onDateChanged:Ve(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:s,params:o}=this;this.dateComp=new op(e,t,o.column.getColDef(),this.getDateComponentParams(),s,i=>{i.setInputAriaLabel(this.getAriaLabel(o))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},TD={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},MD=class extends Re{constructor(){super(TD,[Bn]),this.eDateInput=q,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){const t=this.eDateInput.getInputElement(),s=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=s&&ps();const{minValidYear:o,maxValidYear:i,minValidDate:n,maxValidDate:r,buttons:a,includeTime:l,colDef:c}=e.filterParams||{},d=this.beans.dataTypeSvc,u=l??d?.getDateIncludesTimeFlag?.(c.cellDataType)??!1;if(s?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text",n&&o&&H(85),r&&i&&H(86),n&&r){const[h,g]=[n,r].map(f=>f instanceof Date?f:Je(f));h&&g&&h.getTime()>g.getTime()&&H(87)}n?n instanceof Date?t.min=ra(n):t.min=n:o&&(t.min=`${o}-01-01`),r?r instanceof Date?t.max=ra(r):t.max=r:i&&(t.max=`${i}-12-31`),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return Je(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,s=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(it(e,s))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}},Al=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function xa(e){const{allowedCharPattern:t}=e??{};return t??null}function Fa(e){return e==null||isNaN(e)?null:e}function dp(e,t){const{filter:s,filterTo:o,type:i}=e||{};return[Fa(s),Fa(o)].slice(0,gi(i,t))}var ID=class extends Ml{constructor(){super("numberFilter",dp,Al),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}setElementValue(e,t,s){const{numberFormatter:o}=this.params,i=!s&&o?o(t??null):t;super.setElementValue(e,i)}createEValue(){const e=xa(this.params),t=Ye({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,s,o){const i=this.createManagedBean(o?new Us({allowedCharPattern:o}):new cl);i.addCss(`ag-filter-${s}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeEValues(e,t){const s=o=>this.removeComponents(o,e,t);s(this.eValuesFrom),s(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(s,o,i,n)=>{o<n&&t.push(Fa(this.stringToFloat(s.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}stringToFloat(e){if(typeof e=="number")return e;let t=Bt(e);t!=null&&t.trim()===""&&(t=null);const s=this.params.numberParser;return s?s(t):t==null||t.trim()==="-"?null:Number.parseFloat(t)}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(s.filter=o[0]),o.length>1&&(s.filterTo=o[1]),s}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}},up=class extends kl{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=ap}conditionToString(e,t,s,o,i){const{filter:n,filterTo:r,type:a}=e,l=this.formatValue.bind(this);if(t){const c=this.conditionForToolPanel(a,s,()=>l(n),()=>l(r),o,i);if(c!=null)return c}return s?`${l(n)}-${l(r)}`:n!=null?l(n):`${a}`}},kD=class extends rp{constructor(){super(dp,Al),this.filterType="number",this.FilterModelFormatterClass=up}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},hp=class extends T{constructor(e){super(),this.params=e,this.eInput=q,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new Us(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const s=o=>this.onValueChanged(o);this.addManagedListeners(t,{input:s,keydown:s})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:s}=this;s.setInputAriaLabel(e),t!==void 0&&s.setAutoComplete(t)}};function Ea(e){const t=e?.trim();return t===""?e:t}function gp(e,t){const{filter:s,filterTo:o,type:i}=e||{};return[s||null,o||null].slice(0,gi(i,t))}var AD={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},pp=class extends cp{constructor(){super(...arguments),this.eFloatingFilterInputContainer=q,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(AD)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const t=e.browserAutoComplete??!1,{inputSvc:s,defaultDebounceMs:o,readOnly:i}=this;if(s.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=Wn(e.filterParams),!i){const n=fl(e.filterParams,o),r=Ve(this,this.syncUpWithParentFilter.bind(this),n);s.setValueChangedListener(r)}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,s=t.getValue();Xe(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(s,!0)}syncUpWithParentFilter(e){const t=e.key===E.ENTER,s=this.reactive;if(s&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:o,params:i,lastType:n}=this;let r=o.getValue();if(i.filterParams.trimInput&&(r=Ea(r),o.setValue(r,!0)),s){const a=i,l=a.model,c=this.convertValue(r),d=c==null?null:{...l??{filterType:this.filterType,type:n??this.optionsFactory.defaultOption},filter:c};a.onModelChange(d,{afterFloatingFilter:!0})}else i.parentFilterInstance(a=>{a?.onFloatingFilterChanged(n||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},LD=class extends T{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new cl),this.eTextInput=this.createManagedBean(new Us),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),s=this.eTextInput.getGui();e.appendChild(t),e.appendChild(s),this.setupListeners(t,o=>this.onValueChanged(o)),this.setupListeners(s,o=>this.onValueChanged(o))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},OD=class extends pp{constructor(){super(...arguments),this.FilterModelFormatterClass=up,this.filterType="number",this.defaultOptions=Al}updateParams(e){xa(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=xa(e.filterParams),this.allowedCharPattern?this.createManagedBean(new hp({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new LD)}convertValue(e){return e?Number(e):null}},Ll=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],HD=class extends Ml{constructor(){super("textFilter",gp,Ll),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(s.filter=o[0]),o.length>1&&(s.filterTo=o[1]),s}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(s,o,i,n)=>{o<n&&t.push(Bt(s.getValue()))}),t}createEValue(){const e=Ye({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:s}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,s,"to"),e}createFromToElement(e,t,s){const o=this.createManagedBean(new Us);o.addCss(`ag-filter-${s}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){const s=n=>this.removeComponents(n,e,t),{eValuesFrom:o,eValuesTo:i}=this;s(o),s(i)}},fp=class extends kl{constructor(){super(...arguments),this.filterTypeKeys=xD}conditionToString(e,t,s,o,i){const{filter:n,filterTo:r,type:a}=e;if(t){const l=d=>()=>is(this,"filterSummaryTextQuote",[d]),c=this.conditionForToolPanel(a,s,l(n),l(r),o,i);if(c!=null)return c}return s?`${n}-${r}`:n!=null?`${n}`:`${a}`}},ND=({filterOption:e,value:t,filterText:s})=>{if(s==null)return!1;switch(e){case"contains":return t.includes(s);case"notContains":return!t.includes(s);case"equals":return t===s;case"notEqual":return t!=s;case"startsWith":return t.indexOf(s)===0;case"endsWith":{const o=t.lastIndexOf(s);return o>=0&&o===t.length-s.length}default:return!1}},GD=e=>e,VD=e=>e==null?null:e.toString().toLowerCase(),BD=class extends np{constructor(){super(gp,Ll),this.filterType="text",this.FilterModelFormatterClass=fp}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??ND,this.formatter=t.textFormatter??(t.caseSensitive?GD:VD)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,s,o){const i=e.map(h=>this.formatter(h))||[],n=this.formatter(t),{api:r,colDef:a,column:l,context:c,filterParams:{textFormatter:d}}=this.params;if(s.type==="blank")return Rn(t);if(s.type==="notBlank")return!Rn(t);const u={api:r,colDef:a,column:l,context:c,node:o.node,data:o.data,filterOption:s.type,value:n,textFormatter:d};return i.some(h=>this.matcher({...u,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=s=>{const o={...s},{filter:i,filterTo:n}=s;return i&&(o.filter=Ea(i)??null),n&&(o.filterTo=Ea(n)??null),o};return tg(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},zD=class extends pp{constructor(){super(...arguments),this.FilterModelFormatterClass=fp,this.filterType="text",this.defaultOptions=Ll}createFloatingFilterInputService(){return this.createManagedBean(new hp)}};function WD(e){return!!e.quickFilter?.isFilterPresent()}function _D(e){return e.quickFilter?.getText()}function UD(e){e.quickFilter?.resetCache()}var jD=class extends T{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",s=>this.setFilter(s.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:s,pivotResultCols:o}=this.beans,i=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols();let a=(i&&!s.get("applyQuickFilterBeforePivotOrAgg")?o?.getPivotResultCols()?.list:r)??[];n&&(a=a.concat(n)),this.colsToUse=s.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(s=>t?this.doesRowPassCache(e,s):this.doesRowPassNoCache(e,s))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return V(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){H(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),s=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,s&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(s=>{const o=this.getTextForColumn(s,e);return V(o)&&o.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let s;e?(this.checkGenerateAggText(t),s=t.quickFilterAggregateText):s=this.getAggText(t);const{quickFilterParts:o,matcher:i}=this;return i(o,s)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let s=this.beans.filterValueSvc.getValue(e,t);const o=e.getColDef();if(o.getQuickFilterText){const i=Y(this.gos,{value:s,node:t,data:t.data,column:e,colDef:o});s=o.getQuickFilterText(i)}return V(s)?s.toString().toUpperCase():null}getAggText(e){const t=[];for(const s of this.colsToUse){const o=this.getTextForColumn(s,e);V(o)&&t.push(o)}return t.join(`
60
+ `)}},$D={moduleName:"ClientSideRowModelFilter",version:G,rowModels:["clientSide"],beans:[K3]},Ol={moduleName:"FilterCore",version:G,beans:[fD],apiFunctions:{isAnyFilterPresent:gD,onFilterChanged:pD},css:[J3],dependsOn:[$D]},mp={moduleName:"FilterValue",version:G,beans:[CD]},Kn={moduleName:"ColumnFilter",version:G,beans:[hD,mD],dynamicBeans:{headerFilterCellCtrl:q3},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:eD,getColumnFilterInstance:tD,destroyFilter:sD,setFilterModel:oD,getFilterModel:iD,getColumnFilterModel:nD,setColumnFilterModel:rD,showColumnFilter:aD,hideColumnFilter:lD,getColumnFilterHandler:cD,doFilterAction:dD},dependsOn:[Ol,$n,mp,Q3]},KD={moduleName:"CustomFilter",version:G,userComponents:{agReadOnlyFloatingFilter:wD},dependsOn:[Kn]},qD={moduleName:"TextFilter",version:G,dependsOn:[Kn],userComponents:{agTextColumnFilter:{classImp:HD,params:{useForm:!0}},agTextColumnFloatingFilter:zD},dynamicBeans:{agTextColumnFilterHandler:BD}},YD={moduleName:"NumberFilter",version:G,dependsOn:[Kn],userComponents:{agNumberColumnFilter:{classImp:ID,params:{useForm:!0}},agNumberColumnFloatingFilter:OD},dynamicBeans:{agNumberColumnFilterHandler:kD}},ZD={moduleName:"DateFilter",version:G,dependsOn:[Kn],userComponents:{agDateColumnFilter:{classImp:RD,params:{useForm:!0}},agDateInput:MD,agDateColumnFloatingFilter:PD},dynamicBeans:{agDateColumnFilterHandler:ED}},QD={moduleName:"QuickFilterCore",version:G,rowModels:["clientSide"],beans:[jD],dependsOn:[Ol,mp]},XD={moduleName:"QuickFilter",version:G,apiFunctions:{isQuickFilterPresent:WD,getQuickFilter:_D,resetQuickFilter:UD},dependsOn:[QD]},JD={moduleName:"ExternalFilter",version:G,dependsOn:[Ol]},eP=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",Ar=(e,t,s)=>{const{editModelSvc:o}=e,i=o?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,n=o?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=i||n;return r?.length?r.join(s("tooltipValidationErrorSeparator",". ")):void 0},tP=class extends T{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,s,o){e&&t.destroyBean(e);const i=this.gos,n=kr(i),{column:r,eGui:a}=t,l=r.getColDef();!o&&n&&!l.headerComponent&&(o=Gi(()=>a.querySelector(".ag-header-cell-text")));const c="header",u=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),h=s??u,g={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>s??l?.headerTooltipValueGetter?.(Y(i,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let f=this.createTooltipFeature(g);return f&&(f=t.createBean(f),t.setRefreshFunction("tooltip",()=>f.refreshTooltip())),f}setupHeaderGroupTooltip(e,t,s,o){e&&t.destroyBean(e);const i=this.gos,n=kr(i),{column:r,eGui:a}=t,l=r.getColGroupDef();!o&&n&&!l?.headerGroupComponent&&(o=Gi(()=>a.querySelector(".ag-header-group-text")));const c="headerGroup",u=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),h=s??u,g={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>s??l?.headerTooltipValueGetter?.(Y(i,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>{const m={column:r};return l&&(m.colDef=l),m}},f=this.createTooltipFeature(g);return f&&t.createBean(f)}enableCellTooltipFeature(e,t,s){const{beans:o}=this,{gos:i,editSvc:n}=o,{column:r,rowNode:a}=e;let l="cell";const c=()=>{const g=!!!n?.isEditing(e)&&Ar(o,e,this.getLocaleTextFunc());if(g)return l="cellEditor",g;l="cell";const f=r.getColDef(),m=a.data;if(f.tooltipField&&V(m))return qo(m,f.tooltipField,r.isTooltipFieldContainsDots());const v=f.tooltipValueGetter;return v?v(Y(i,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},d=kr(i);s||(d&&!e.isCellRenderer()?s=()=>{const h=!!n?.isEditing(e);if(!h&&Ar(o,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const m=Gi(()=>{const v=e.eGui;return v.children.length===0?v:v.querySelector(".ag-cell-value")});return!h&&m()}:s=()=>!n?.isEditing(e));const u={getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:t!=null?()=>t:c,shouldDisplayTooltip:s,getAdditionalParams:()=>({column:r,colDef:r.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(u,o)}setupFullWidthRowTooltip(e,t,s,o){const i={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>s,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:o},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(i,n);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){const{beans:s}=this,{context:o}=s,i=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!i)return;const n={getGui:()=>i,getTooltipValue:()=>Ar(s,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=s,l=a?.getRowValidationModel()?.getRowValidationMap(),c=a?.getCellValidationModel()?.getCellValidationMap(),d=!!l&&l.size>0,u=!!c&&c.size>0;return d||u}},r=this.createTooltipFeature(n,s);if(r)return e.createBean(r,o)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=V(t.tooltipField)||V(t.tooltipValueGetter)||V(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},sP=class extends _0{createTooltipComp(e,t){Ob(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},Cp={moduleName:"Tooltip",version:G,beans:[tP],dynamicBeans:{tooltipFeature:jh,highlightTooltipFeature:U0,tooltipStateManager:sP},userComponents:{agTooltipComponent:K0},dependsOn:[$n],css:[eP]},Js=class{constructor(e){this.cellValueChanges=e}},Lr=class extends Js{constructor(e,t,s,o){super(e),this.initialRange=t,this.finalRange=s,this.ranges=o}},oP=10,yd=class{constructor(e){this.actionStack=[],this.maxStackSize=e||oP,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},iP=class extends T{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},s=this.activeCellEdit!==null&&Sg(this.activeCellEdit,t),o=this.activeRowEdit!==null&&bR(this.activeRowEdit,t);if(!(s||o||this.isPasting||this.isRangeInAction))return;const{rowPinned:n,rowIndex:r,column:a,oldValue:l,value:c}=e,d={rowPinned:n,rowIndex:r,columnId:a.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const s=e.get("undoRedoCellEditingLimit");if(s<=0)return;this.undoStack=new yd(s),this.redoStack=new yd(s),this.addListeners();const o=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:i=>{i.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:o,newColumnsLoaded:o,columnGroupOpened:o,columnRowGroupChanged:o,columnMoved:o,columnPinned:o,columnVisible:o,rowDragEnd:o}),t.whenReady(this,i=>{this.gridBodyCtrl=i.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:s,redoStack:o}=this;t.dispatchEvent({type:"undoStarted",source:e});const i=this.undoRedo(s,o,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:i})}redo(e){const{eventSvc:t,undoStack:s,redoStack:o}=this;t.dispatchEvent({type:"redoStarted",source:e});const i=this.undoRedo(o,s,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:i})}undoRedo(e,t,s,o,i){if(!e)return!1;const n=e.pop();return n?.cellValueChanges?(this.processAction(n,r=>r[o],i),n instanceof Lr?this.processRange(n.ranges||[n[s]]):this.processCell(n.cellValueChanges),t.push(n),!0):!1}processAction(e,t,s){for(const o of e.cellValueChanges){const{rowIndex:i,rowPinned:n,columnId:r}=o,a={rowIndex:i,rowPinned:n},l=jt(this.beans,a);l.displayed&&l.setDataValue(r,t(o),s)}}processRange(e){let t;const s=this.beans.rangeSvc;s.removeAllCellRanges(!0),e.forEach((o,i)=>{if(!o)return;const n=o.startRow,r=o.endRow;i===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:o.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:o.startColumn,columns:o.columns};s.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:s,rowPinned:o}=t,i={rowIndex:s,rowPinned:o},n=jt(this.beans,i),r={rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:s,rowPinned:o}=e,{colModel:i,focusSvc:n,rangeSvc:r}=this.beans,a=i.getCol(s);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const c={rowIndex:t,column:a,rowPinned:o};n.setFocusedCell({...c,forceBrowserFocus:!0}),r?.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new Js(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const s=new Js(this.cellValueChanges);this.pushActionsToUndoStack(s)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new Js(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new Lr(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:s}=this.beans;t&&cs(s)?e=new Lr(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new Js(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const s=new Js(t??[]);this.pushActionsToUndoStack(s),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},nP=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",rP={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},aP=class extends Un{constructor(){super(rP,[ll]),this.eEditor=q}initialiseEditor(e){const t=e.value??void 0,s=this.eEditor;s.setValue(t),s.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(s,{fieldValueChanged:i=>this.setAriaLabel(i.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),s=Gn(t,e),o=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${o} (${s})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,s=this.getValue();return t?t({value:s,internalErrors:null,cellEditorParams:e}):null}},qn=class extends Un{constructor(e){super(),this.cellEditorInput=e,this.eEditor=q}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:s}=this,{cellStartedEdit:o,eventKey:i,suppressPreventDefault:n}=e;s.getInputElement().setAttribute("title",""),t.init(s,e);let r,a=!0;o?(this.focusAfterAttached=!0,i===E.BACKSPACE||i===E.DELETE?r="":i&&i.length===1?n?a=!1:r=i:(r=t.getStartValue(),i!==E.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&r!=null&&s.setStartValue(r),this.addGuiEventListener("keydown",l=>{const{key:c}=l;(c===E.PAGE_UP||c===E.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;ps()||t.getFocusableElement().focus();const s=t.getInputElement();this.highlightAllOnFocus?s.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),s=e.getInputElement();t.focus(),s.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},lP={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},cP=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return lP}getAgComponents(){return[Hh]}init(e,t){this.eEditor=e,this.params=t;const{min:s,max:o,step:i,colDef:n}=t;s!=null&&e.setMin(s),o!=null&&e.setMax(o),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:s}=this,{min:o,max:i,getValidationErrors:n}=s;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(o){const l=o instanceof Date?o:new Date(o);if(t<l){const c=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${c}`,[c]))}}if(i){const l=i instanceof Date?i:new Date(i);if(t>l){const c=l.toLocaleDateString();r.push(a("maxDateValidation",`Date must be before ${c}`,[c]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:s,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,s=e.getDate();return!V(s)&&!V(t.value)?t.value:s??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return it(e,this.includeTime??!1)}},dP=class extends qn{constructor(){super(new cP(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},uP={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},hP=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return uP}getAgComponents(){return[Hh]}init(e,t){this.eEditor=e,this.params=t;const{min:s,max:o,step:i,colDef:n}=t;s!=null&&e.setMin(s),o!=null&&e.setMax(o),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,s=e.getInputElement().value,o=this.formatDate(this.parseDate(s??void 0)),{min:i,max:n,getValidationErrors:r}=t;let a=[];if(o){const l=new Date(o),c=this.getLocaleTextFunc();if(i){const d=new Date(i);if(l<d){const u=d.toLocaleDateString();a.push(c("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const d=new Date(n);if(l>d){const u=d.toLocaleDateString();a.push(c("maxDateValidation",`Date must be before ${u}`,[u]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,s=this.formatDate(t.getDate());return!V(s)&&!V(e.value)?e.value:e.parseValue(s??"")}getStartValue(){return it(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):Je(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):it(e??null,this.includeTime??!1)??void 0}},gP=class extends qn{constructor(){super(new hP(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},pP={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},fP=class extends Un{constructor(){super(pP,[Jb]),this.eEditor=q}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:s,eventKey:o,maxLength:i,cols:n,rows:r}=e;this.focusAfterAttached=s,t.getInputElement().setAttribute("title",""),t.setMaxLength(i||200).setCols(n||60).setRows(r||10);let a;s?(this.focusAfterAttached=!0,o===E.BACKSPACE||o===E.DELETE?a="":o&&o.length===1?a=o:(a=this.getStartValue(e),o!==E.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}onKeyDown(e){const t=e.key;(t===E.LEFT||t===E.UP||t===E.RIGHT||t===E.DOWN||e.shiftKey&&t===E.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:s}=this,o=this.getLocaleTextFunc();e.setInputAriaLabel(o("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),s&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:s}=t,o=e.getValue();return!V(o)&&!V(s)?s:t.parseValue(o)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:s}=e,o=this.getLocaleTextFunc(),i=this.getValue();let n=[];return typeof i=="string"&&t!=null&&i.length>t&&n.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),s?s({value:i,internalErrors:n,cellEditorParams:e}):n}},mP={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},CP=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return mP}getAgComponents(){return[e0]}init(e,t){this.eEditor=e,this.params=t;const{max:s,min:o,precision:i,step:n}=t;s!=null&&e.setMax(s),o!=null&&e.setMin(o),i!=null&&e.setPrecision(i),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:s,getValidationErrors:o}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let a=[];return typeof n=="number"&&(t!=null&&n<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),s!=null&&n>s&&a.push(r("maxValueValidation",`Must be less than or equal to ${s}.`,[String(s)]))),a.length||(a=null),o?o({value:n,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===E.UP||e.key===E.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,s=e.getValue();if(!V(s)&&!V(t.value))return t.value;let o=t.parseValue(s);if(o==null)return o;if(typeof o=="string"){if(o==="")return null;o=Number(o)}return isNaN(o)?null:o}getStartValue(){return this.params.value}setCaret(){ps()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},vP=class extends qn{constructor(){super(new CP(()=>this.getLocaleTextFunc()))}},wP={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},bP=class extends Un{constructor(){super(wP,[u0]),this.eEditor=q,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:s,gos:o}=this,{values:i,value:n,eventKey:r}=e;if(be(i)){H(58);return}this.startedByEnter=r!=null?r===E.ENTER:!1;let a=!1;i.forEach(u=>{const h={value:u},g=s.formatValue(e.column,null,u),f=g!=null;h.text=f?g:u,t.addOption(h),a=a||n===u}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:d}=e;l!=null&&t.setPickerGap(l),d!=null&&t.setPickerMaxHeight(d),c!=null&&t.setPickerMaxWidth(c),o.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:s}=e,o=this.getValue();let i=[];if(t&&!t.includes(o)){const n=this.getLocaleTextFunc();i.push(n("invalidSelectionValidation","Invalid selection."))}else i=null;return s?s({value:o,internalErrors:i,cellEditorParams:e}):i}},SP={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},yP=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return SP}getAgComponents(){return[Bn]}init(e,t){this.eEditor=e,this.params=t;const s=t.maxLength;s!=null&&e.setMaxLength(s)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:s}=e,o=this.getValue(),i=this.getLocaleTextFunc();let n=[];return t!=null&&typeof o=="string"&&o.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),s?s({value:o,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,s=e.getValue();return!V(s)&&!V(t.value)?t.value:t.parseValue(s)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){ps()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),s=V(t)&&t.length||0;s&&e.getInputElement().setSelectionRange(s,s)}},Rd=class extends qn{constructor(){super(new yP(()=>this.getLocaleTextFunc()))}};function RP(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function xP(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function vp(e,t,s="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,s),"ensureVisible")}function wp(e,t,s){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,s),"ensureVisible")}function FP(e,t,s=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,s),"ensureVisible")}function EP(e){e.undoRedo?.undo("api")}function DP(e){e.undoRedo?.redo("api")}function PP(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function TP(e){const t=e.editModelSvc?.getEditMap(),s=[];return t?.forEach((o,i)=>{const{rowIndex:n,rowPinned:r}=i;o.forEach((a,l)=>{const{editorValue:c,pendingValue:d,sourceValue:u,state:h}=a,g=Gt(a);let f=c??d;f===pt&&(f=void 0);const m={newValue:f,oldValue:u,state:h,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:n,rowPinned:r};(h==="editing"||h==="changed"&&g)&&s.push(m)})}),s}function MP(e,t=!1){const{editSvc:s}=e;if(s?.isBatchEditing()){if(t)for(const o of e.editModelSvc?.getEditPositions()??[])o.state==="editing"&&s.revertSingleCellEdit(o);else Rs(e,{persist:!0});go(e,void 0,{cancel:t})}else s?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function IP(e,t){const s=ve(e,t);return e.editSvc?.isEditing(s)??!1}function kP(e,t){const{key:s,colKey:o,rowIndex:i,rowPinned:n}=t,{editSvc:r,colModel:a}=e,l=a.getCol(o);if(!l){H(12,{colKey:o});return}const d=jt(e,{rowIndex:i,rowPinned:n||null});if(!d){H(290,{rowIndex:i,rowPinned:n});return}if(!l.isCellEditable(d))return;n==null&&wp(e,i),vp(e,o),r?.startEditing({rowNode:d,column:l},{event:s?new KeyboardEvent("keydown",{key:s}):void 0,source:"api"})}function AP(e){return e.editSvc?.validateEdit()||null}function LP(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function OP(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var HP={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},NP=class extends nl{constructor(e){super(HP),this.params=e}postConstruct(){Os(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,s=o=>{ga(this.gos,o,t.node,t.column,!0)||t.onKeyDown(o)};this.addManagedElementListeners(e,{keydown:s})}};function GP(e,{column:t},s,o,i="ui"){if(s instanceof KeyboardEvent&&(s.key===E.TAB||s.key===E.ENTER||s.key===E.F2||s.key===E.BACKSPACE&&o))return!0;if(s?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const r=t?.getColDef(),a=VP(e.gos,r),l=s?.type;return l==="click"&&s?.detail===1&&a===1||l==="dblclick"&&s?.detail===2&&a===2?!0:i==="api"?o??!1:!1}function VP(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function Da(e,{rowNode:t,column:s},o="ui"){const i=s.getColDef().editable,n=e.editModelSvc;return s.isColumnFunc(t,i)||!!n&&n.hasEdits({rowNode:t,column:s},{withOpenEditor:!0})}function BP(e,t,s="ui"){const o=Da(e,t,s);return o===!0||s==="ui"?o:e.colModel.getCols().some(n=>Da(e,{rowNode:t.rowNode,column:n},s))}var xn=(e,t=!1)=>{if(e!==void 0)return Gt(e)||t&&e.state==="editing"};function bp(e,t,s=!1){return xn(e.editModelSvc?.getEdit(t),s)}var Sp=(e,t,s)=>{if(e)for(let o=0,i=e.length;o<i;++o){const n=e[o];if(n.data&&(xn(t?.getEdit({rowNode:n,column:s}))||xn(t?.getEdit({rowNode:n.pinnedSibling,column:s})))||Sp(n.childrenAfterGroup,t,s))return!0}};function yp(e,t){const{column:s,rowNode:o}=t;return e.gos.get("groupTotalRow")&&!o?.footer?!1:Sp(o?.childrenAfterGroup,e.editModelSvc,s)}function Rp(e,{rowNode:t,column:s}){if(t=t.pinnedSibling,!!t)return xn(e.editModelSvc?.getEdit({rowNode:t,column:s}))}var zP=class extends T{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){const{cellCtrl:e,editSvc:t,beans:s}=this;if(t?.isBatchEditing()&&t.isEditing()){const i=bp(s,e)||yp(s,e)||Rp(s,e);this.applyBatchingStyle(i)}else this.applyBatchingStyle(!1);const o=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",o)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},WP=class extends T{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){const{rowCtrl:e,editModelSvc:t,beans:s}=this;let o=e.rowNode,i=t?.getEditRow(o);const n=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:o});if(!i&&o.pinnedSibling&&(o=o.pinnedSibling,i=t?.getEditRow(o)),i){const r=Array.from(i.keys()).some(a=>{const l={rowNode:o,column:a};return bp(s,l,!0)||yp(s,l)||Rp(s,l)});this.applyStyle(n,r);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){const s=this.editSvc?.isBatchEditing()??!1,o=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:i})=>{i.toggleCss("ag-row-editing",o&&t),i.toggleCss("ag-row-batch-edit",o&&t&&s),i.toggleCss("ag-row-inline-editing",t),i.toggleCss("ag-row-not-inline-editing",!t),i.toggleCss("ag-row-editing-invalid",o&&t&&e)})}},_P=({rowModel:e,pinnedRowModel:t,editModelSvc:s},o)=>{const i=new Set;e.forEachNode(n=>o.has(n)&&i.add(n)),t?.forEachPinnedRow("top",n=>o.has(n)&&i.add(n)),t?.forEachPinnedRow("bottom",n=>o.has(n)&&i.add(n));for(const n of o)i.has(n)||s.removeEdits({rowNode:n});return i},UP=({editModelSvc:e},t,s)=>{for(const o of t)e?.getEditRow(o)?.forEach((i,n)=>!s.has(n)&&e.removeEdits({rowNode:o,column:n}))},jP=e=>()=>{const t=new Set(e.colModel.getCols()),s=e.editModelSvc.getEditMap(!0),o=new Set(s.keys());UP(e,_P(e,o),t)},$P=new Set(["undo","redo","paste","bulk","rangeSvc"]),KP=new Set(["ui","api"]),xp={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},qP=new Set(Object.keys(xp)),YP=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Oi={cancel:!0,source:"api"},ZP={cancel:!1,source:"api"},Qs={checkSiblings:!0},Lo={force:!0,suppressFlash:!0},QP=class extends T{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:o})=>{this.stopEditing(void 0,Oi),this.createStrategy(o)});const t=jP(e),s=()=>{const o=this.model.getCellValidationModel().getCellValidationMap().size>0,i=this.model.getRowValidationModel().getRowValidationMap().size>0;return o||i?this.stopEditing(void 0,Oi):this.isEditing()&&(this.isBatchEditing()?go(e,this.model.getEditPositions()):this.stopEditing(void 0,ZP)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:s,filterChanged:s,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,Oi)):(this.stopEditing(void 0,Oi),this.batch=!1)}createStrategy(e){const{beans:t,gos:s,strategy:o}=this,i=xd(s,e);if(o){if(o.beanName===i)return o;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(i,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,s,o="ui"){const i=GP(this.beans,e,t,s,o);return i&&(this.strategy??(this.strategy=this.createStrategy())),i}shouldStopEditing(e,t,s="ui"){return this.strategy?.shouldStop(e,t,s)??null}shouldCancelEditing(e,t,s="ui"){return this.strategy?.shouldCancel(e,t,s)??null}validateEdit(){return hE(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??Qs)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){const{startedEdit:s=!0,event:o=null,source:i="ui",ignoreEventKey:n=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const a=ve(this.beans,e);if(a&&!a.comp){a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=this.shouldStartEditing(e,o,s,i);if(l===!1&&i!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,i)&&!t.continueEditing&&this.stopEditing(void 0,{source:i}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start({position:e,event:o,source:i,ignoreEventKey:n,startedEdit:s,silent:r})}stopEditing(e,t){const{event:s,cancel:o,source:i="ui",forceCancel:n,forceStop:r}=t||{},{beans:a,model:l}=this;if(qP.has(i)&&this.isBatchEditing())return this.bulkRefresh(e),!1;const c=this.committing?xp[i]:i;if(!(this.committing||this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,Qs))||!this.strategy||this.stopping)return!1;this.stopping=!0;const u=ve(a,e);u&&(u.onEditorAttachedFuncs=[]);let h=l.getEditMap(!0),g=!1;const f=!o&&(!!this.shouldStopEditing(e,s,c)||this.committing&&!this.batch)||(r??!1),m=o&&!!this.shouldCancelEditing(e,s,c)||(n??!1);if(f||m){Rs(a,{persist:!0,isCancelling:m||o,isStopping:f});const v=l.getEditMap(),w=this.processEdits(v,o,i);this.strategy?.stop(o,s);for(const b of w)l.clearEditValue(b);this.bulkRefresh(void 0,h);for(const b of l.getEditPositions(v)){const S=ve(a,b),R=Gt(b);S?.refreshCell({force:!0,suppressFlash:!R})}h=v,g||(g=f)}else if(s instanceof KeyboardEvent&&this.batch&&this.strategy?.midBatchInputsAllowed(e)&&this.isEditing(e,{withOpenEditor:!0})){const{key:v}=s,w=v===E.ENTER,b=v===E.ESCAPE,S=v===E.TAB;(w||S||b)&&(w||S?Rs(a,{persist:!0}):b&&this.revertSingleCellEdit(u),this.isBatchEditing()?this.strategy?.cleanupEditors():go(a,l.getEditPositions(),{event:s,cancel:b}),s.preventDefault(),this.bulkRefresh(e,h,{suppressFlash:!0}),h=l.getEditMap())}else Rs(a,{persist:!0}),h=l.getEditMap();return g&&e&&this.model.removeEdits(e),this.navigateAfterEdit(t,u?.cellPosition),Sa(a),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),m&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(h.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),g&&f&&this.dispatchBatchEvent("batchEditingStopped",h)),this.stopping=!1,g}navigateAfterEdit(e,t){if(!e||!t)return;const{event:s,suppressNavigateAfterEdit:o}=e;if(!(s instanceof KeyboardEvent)||o)return;const{key:n,shiftKey:r}=s,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(n!==E.ENTER||!a)return;const l=r?E.UP:E.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t=!1,s){const o=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const r of o){const a=e.get(r);for(const l of a.keys()){const c=a.get(l),d={rowNode:r,column:l},u=Gt(c);!t&&u&&!i&&(this.setNodeDataValue(r,l,c.pendingValue,void 0,s)||n.push(d))}}return n}setNodeDataValue(e,t,s,o,i="edit"){const{beans:n}=this,r=ve(n,{rowNode:e,column:t}),a=KP.has(i)?"edit":i;r&&(r.suppressRefreshCell=!0),this.commitNextEdit();const l=e.setDataValue(t,s,a);return r&&(r.suppressRefreshCell=!1),o&&r?.refreshCell(Lo),l}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefresh();let s=Lo;t?.forceRefreshOfEditCellsOnly&&(s={...XP(e),...Lo}),this.beans.rowRenderer.refreshCells(s)}dispatchEditValuesChanged({rowNode:e,column:t},s={}){if(!e||!t||!s)return;const{pendingValue:o,sourceValue:i}=s,{rowIndex:n,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:a,newValue:o,oldValue:i,value:o,colDef:t.getColDef()})}bulkRefresh(e={},t,s={}){const{beans:o,gos:i}=this,{editModelSvc:n,rowModel:r}=o;Fe(i)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),s):t&&n?.getEditMap(!1)?.forEach((a,l)=>{for(const c of a.keys())this.refCell({rowNode:l,column:c},a.get(c),s)}))}refCell({rowNode:e,column:t},s,o={}){const{beans:i,gos:n}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const c=e.sibling;c&&a.add(c);let d=e.parent;for(;d;)d.sibling?.footer&&n.get("groupTotalRow")||!d.parent&&d.sibling&&n.get("grandTotalRow")?a.add(d.sibling):a.add(d),d=d.parent;for(const u of r)this.dispatchEditValuesChanged({rowNode:u,column:t},s);for(const u of r)ve(i,{rowNode:u,column:t})?.refreshCell(o);for(const u of a)ve(i,{rowNode:u,column:t})?.refreshCell(o)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{rowNode:s}=e,{gos:o,beans:i}=this;if(s.group){if(o.get("treeData")){if(!s.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1}const n=xd(o)==="fullRow"?BP(i,e,t):Da(i,e,t);return n&&(this.strategy??(this.strategy=this.createStrategy())),n}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,s=!0){if(this.hasValidationErrors(e)){const o=ve(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),s&&(!o?.hasBrowserFocus()&&o?.focusCell(),o?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(o&&this.revertSingleCellEdit(o),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const s=ve(this.beans,e);s?.comp?.getCellEditor()&&(go(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),So(this.beans,e,{silent:!0}),Gs(this.beans),s?.refreshCell(Lo),t&&(s?.focusCell(),s?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){Gs(this.beans);const t=ve(this.beans,e);t&&(t.refreshCell(Lo),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let s=!1;return e?.rowNode?(s||(s=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(s||(s=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(s||(s=this.model.getCellValidationModel().getCellValidationMap().size>0),s||(s=this.model.getRowValidationModel().getRowValidationMap().size>0)),s}moveToNextCell(e,t,s,o="ui"){let i;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,s)==="block-stop";return e instanceof po&&n&&(i=this.strategy?.moveToNextEditingCell(e,t,s,o,r)),i===null||(i=i||!!this.beans.focusSvc.focusedHeader,i===!1&&!r&&this.stopEditing()),i}getCellDataValue({rowNode:e,column:t},s=!0){if(!e||!t)return;let o=this.model.getEdit({rowNode:e,column:t});const i=e.pinnedSibling;if(i){const r=this.model.getEdit({rowNode:i,column:t});r&&(o=r)}const n=s?o?.editorValue??o?.pendingValue:o?.pendingValue;return n===pt||!o?o?.sourceValue??this.valueSvc.getValue(t,e,!1,"api"):n}addStopEditingWhenGridLosesFocus(e){rE(this,this.beans,e)}createPopupEditorWrapper(e){return new NP(e)}commitNextEdit(){this.committing=!0}setDataValue(e,t,s){try{if((!this.isEditing()||this.committing)&&!YP.has(s))return;const{beans:o}=this;this.strategy??(this.strategy=this.createStrategy());const i=this.isBatchEditing()?"ui":this.committing?s??"api":"api";if(!s||$P.has(s))return Qi(o,e,t,s,void 0,{persist:!0}),this.setNodeDataValue(e.rowNode,e.column,t,!0,s);const n=this.model.getEdit(e);if(n){if(n.pendingValue===t)return!1;if(n.sourceValue!==t)return Qi(o,e,t,s,void 0,{persist:!0}),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===t)return o.editModelSvc?.removeEdits(e),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0}return Qi(o,e,t,s,void 0,{persist:!0}),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){cE(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,Qs))return;const{rowNode:o,column:i}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:l}=n;return l.data=this.model.getEditRowDataValue(o,Qs),{compDetails:n}}const a=this.model.getEditRow(e.rowNode,Qs);if(r!==void 0&&a?.has(i))return{valueToDisplay:this.valueSvc.getValue(i,o)}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,s,o){this.strategy?.dispatchCellEvent(e,t,s,o)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return Y(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},s){if(!s||s.length===0)return;const{beans:o,rangeSvc:i,valueSvc:n}=this;Rs(o,{persist:!0});const r=this.model.getEditMap(!0),a=r.get(e)?.get(t)?.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),s.forEach(c=>{if(i?.forEachRowInRange(c,d=>{const u=jt(o,d);if(u===void 0)return;const h=r.get(u)??new Map;for(const g of c.columns)if(g&&this.isCellEditable({rowNode:u,column:g},"api")){const f=n.getValue(g,u,!0,"api");let m=n.parseValue(g,u??null,a,f);Number.isNaN(m)&&(m=null),h.set(g,{editorValue:void 0,pendingValue:m,sourceValue:f,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}h.size>0&&r.set(u,h)}),this.setEditMap(r),this.batch){this.cleanupEditors(),Sa(o),this.bulkRefresh();return}this.commitNextEdit(),this.stopEditing(void 0,{source:"bulk"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const l=ve(o,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new zP(e,t)}createRowStyleFeature(e,t){return new WP(e,t)}setEditingCells(e,t){const{beans:s}=this,{colModel:o,valueSvc:i}=s,n=new Map;for(let{colId:r,column:a,colKey:l,rowIndex:c,rowPinned:d,newValue:u,state:h}of e){const g=r?o.getCol(r):l?o.getCol(l):a;if(!g)continue;const f=jt(s,{rowIndex:c,rowPinned:d});if(!f)continue;const m=i.getValue(g,f,!0,"api");if(!t?.forceRefreshOfEditCellsOnly&&!Gt({pendingValue:u,sourceValue:m})&&h!=="editing")continue;let v=n.get(f);v||(v=new Map,n.set(f,v)),u===void 0&&(u=pt),v.set(g,{editorValue:void 0,pendingValue:u,sourceValue:m,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(n,t)}onCellFocused(e){const t=ve(this.beans,e);if(!t||!this.isEditing(t,Qs))return;const s=this.model.getEdit(t);if(!s||!Gt(s))return;const i=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(i,"pendingChange")}allowedFocusTargetOnValidation(e){return ve(this.beans,e)}};function XP(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function xd(e,t){return t??e.get("editType")??"singleCell"}var Fp=class extends T{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const s=e.previousParams,{editSvc:o,beans:i}=this,n=e.type==="cellFocused"?e.sourceEvent:null;s&&(t=ve(i,s));const{gos:r,editModelSvc:a}=i,l=e.type==="cellFocusCleared";if(o.isEditing(void 0,{withOpenEditor:!0})){const{column:c,rowIndex:d,rowPinned:u}=e,h={column:c,rowNode:jt(i,{rowIndex:d,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const f=!g,m=!!a?.getCellValidationModel().hasCellValidation(h),v=f&&m;(s||l?o.stopEditing(void 0,{cancel:v,source:l&&f?"api":void 0,event:n}):!0)||(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stop(e,t){const s=this.model.getEditPositions(),o={all:[],pass:[],fail:[]};for(const i of s){if(o.all.push(i),(this.model.getCellValidationModel().getCellValidation(i)?.errorMessages?.length??0)>0){o.fail.push(i);continue}o.pass.push(i)}if(e)for(const i of s)Sn(this.beans,i,{cancel:e}),this.model.stop(i);else{const i=this.processValidationResults(o);if(i.destroy.length>0)for(const n of i.destroy)Sn(this.beans,n,{event:t,cancel:e}),this.model.stop(n);if(i.keep.length>0)for(const n of i.keep){const r=ve(this.beans,n);this.editSvc?.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}}return!0}cleanupEditors({rowNode:e}={},t){Rs(this.beans,{persist:!1});const s=this.model.getEditPositions(),o=[];if(e)for(const i of s)i.rowNode!==e&&o.push(i);else for(const i of s)o.push(i);go(this.beans,o),Sa(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,s=t?.getCellEditor();if(s?.focusIn)s.focusIn();else{const o=this.beans.gos.get("editType")==="fullRow";e.focusCell(o),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:s=!1,startedEdit:o,position:i,cells:n=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!s&&t.key||void 0;lE(this.beans,n,i,r,t,o)}dispatchCellEvent(e,t,s,o){const i=ve(this.beans,e);i&&this.eventSvc.dispatchEvent({...i.createEvent(t??null,s),...o})}dispatchRowEvent(e,t,s){if(s)return;const o=El(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStop(e,t,s="ui"){const o=this.editSvc.isBatchEditing();return o&&s==="api"?!0:o&&(s==="ui"||s==="edit")?!1:s==="api"?!0:t instanceof KeyboardEvent&&!o?t.key===E.ENTER:null}shouldCancel(e,t,s="ui"){const o=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!o&&t.key===E.ESCAPE||o&&s==="api"||s==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const s=[];if(e.forEach((o,i)=>{o.forEach((n,r)=>{n.state==="editing"&&s.push({...n,rowNode:i,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),s.length>0){const o=s.at(-1),i=o.pendingValue===pt?void 0:o.pendingValue;this.start({position:o,event:new KeyboardEvent("keydown",{key:i}),source:"api"});const n=ve(this.beans,o);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},JP=class extends Fp{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,s="ui"){const{rowNode:o}=e||{};if(!El(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,s);return n!==null?n:this.rowNode?o!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:s,startedEdit:o,event:i,ignoreEventKey:n}=e,{rowNode:r}=t;this.rowNode!==r&&super.cleanupEditors(t),this.dispatchRowEvent({rowNode:r},"rowEditingStarted",s),this.startedRows.push(r);const a=this.beans.visibleCols.allCols,l=[];for(const c of a){if(!c.isCellEditable(r))continue;const d={rowNode:r,column:c};l.push(d),this.model.hasEdits(d)||this.model.start(d)}this.rowNode=r,this.setupEditors({cells:l,position:t,startedEdit:o,event:i,ignoreEventKey:n})}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){const{rowNode:s}=this;if(s&&!this.model.hasRowEdits(s))return!1;const o=[];if(e||this.model.getEditMap().forEach((i,n)=>{if(!(!i||i.size===0)){for(const r of i.values())if(Gt(r)){o.push(n);break}}}),Gs(this.beans),!e&&this.editSvc?.checkNavWithValidation({rowNode:s})==="block-stop")return!1;super.stop(e,t);for(const i of o)this.dispatchRowEvent({rowNode:i},"rowValueChanged");return this.cleanupEditors({rowNode:s},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,s=e.previousParams;if(s?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const o=ve(this.beans,s);this.gos.get("invalidEditValueMode")==="block"&&o&&(this.model.getCellValidationModel().getCellValidation(o)||this.model.getRowValidationModel().getRowValidation(o))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const s of this.startedRows)this.dispatchRowEvent({rowNode:s},"rowEditingStopped");this.startedRows.length=0}moveToNextEditingCell(e,t,s,o="ui",i=!1){const n=e.cellPosition;let r;this.model.suspend(!0);try{r=this.beans.navigation?.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,l=e.isCellEditable(),c=r.isCellEditable(),d=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return c&&!i?u?r.focusCell(!0,s):(r.comp?.getCellEditor()||So(this.beans,r,{event:s,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,s)):(c&&i&&this.setFocusInOnEditor(r),r.focusCell(!0,s)),!d&&!i&&(this.editSvc?.stopEditing({rowNode:e.rowNode},{event:s}),this.cleanupEditors(r,!0),u?r.focusCell(!0,s):this.editSvc.startEditing(r,{startedEdit:!0,event:s,source:o,ignoreEventKey:!0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:s},o)=>{if(s!=="editing")return;const i=ve(this.beans,{rowNode:t,column:o});i&&!i.comp?.getCellEditor()&&So(this.beans,i,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},e5=class extends Fp{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,s="ui"){const o=super.shouldStop(e,t,s);if(o!==null)return o;const{rowNode:i,column:n}=e||{};return(!this.rowNode||!this.column)&&i&&n?null:this.rowNode!==i||this.column!==n}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:s,event:o,ignoreEventKey:i}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:s,event:o,ignoreEventKey:i})}dispatchRowEvent(e,t,s){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:s}=this.beans,{rowIndex:o,column:i,rowPinned:n}=e,r=jt(this.beans,{rowIndex:o,rowPinned:n}),a=ba(i),l=t.getCol(a),c=e.previousParams;if(c){const d=ba(c.column);if(c?.rowIndex===o&&d===a&&c?.rowPinned===n)return}s?.isEditing({rowNode:r,column:l},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,s,o="ui",i=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(e=so(this.beans,n)??e);const r=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),i||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:s}));try{a=this.beans.navigation?.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const c=a.cellPosition,d=e.isCellEditable(),u=a.isCellEditable(),h=c&&r.rowIndex===c.rowIndex&&r.rowPinned===c.rowPinned;d&&!i&&this.setFocusOutOnEditor(e);const g=this.gos.get("suppressStartEditOnTab");if(!h&&!i&&(super.cleanupEditors(a,!0),g?a.focusCell(!0,s):this.editSvc.startEditing(a,{startedEdit:!0,event:s,source:o,ignoreEventKey:!0})),u&&!i){if(a.focusCell(!1,s),g)a.focusCell(!0,s);else if(!a.comp?.getCellEditor()){const f=this.editSvc?.isEditing(a,{withOpenEditor:!0});So(this.beans,a,{event:s,cellStartedEdit:!0,silent:f}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else u&&i&&this.setFocusInOnEditor(a),a.focusCell(!0,s);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},ms={moduleName:"EditCore",version:G,beans:[nE,QP],apiFunctions:{getEditingCells:TP,getEditRowValues:PP,getCellEditorInstances:aE,startEditingCell:kP,stopEditing:MP,isEditing:IP,validateEdit:AP},dynamicBeans:{singleCell:e5,fullRow:JP},dependsOn:[$n,Cp],css:[nP]},t5={moduleName:"UndoRedoEdit",version:G,beans:[iP],apiFunctions:{undoCellEditing:EP,redoCellEditing:DP,getCurrentUndoSize:LP,getCurrentRedoSize:OP},dependsOn:[ms]},s5={moduleName:"TextEditor",version:G,userComponents:{agCellEditor:Rd,agTextCellEditor:Rd},dependsOn:[ms]},o5={moduleName:"NumberEditor",version:G,userComponents:{agNumberCellEditor:{classImp:vP}},dependsOn:[ms]},i5={moduleName:"DateEditor",version:G,userComponents:{agDateCellEditor:dP,agDateStringCellEditor:gP},dependsOn:[ms]},n5={moduleName:"CheckboxEditor",version:G,userComponents:{agCheckboxCellEditor:aP},dependsOn:[ms]},r5={moduleName:"SelectEditor",version:G,userComponents:{agSelectCellEditor:bP},dependsOn:[ms]},a5={moduleName:"LargeTextEditor",version:G,userComponents:{agLargeTextCellEditor:fP},dependsOn:[ms]},l5={moduleName:"CustomEditor",version:G,dependsOn:[ms]},c5=class extends T{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,ao(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),N1(e))}createColumns(e,t){const s=()=>{hn(this.beans,this.columns?.tree),this.columns=null},o=e.treeDepth,n=(this.columns?.treeDepth??-1)==o,r=this.generateSelectionCols();if(H1(r,this.columns?.list??[])&&n)return;s();const{colGroupSvc:l}=this.beans,c=l?.findDepth(e.tree)??0,d=l?.balanceTreeForAutoCols(r,c)??[];this.columns={list:r,tree:d,treeDepth:c,map:{}},t(h=>{if(!h)return null;const g=h.filter(f=>!Yt(f));return[...r,...g]})}updateColumns(e){const t=ao(e.source);for(const s of this.columns?.list??[]){const o=this.createSelectionColDef(e.currentValue);s.setColDef(o,null,t),mt(this.beans,{state:[{...o,colId:s.getColId()}]},t)}}getColumn(e){return this.columns?.list.find(t=>$o(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,s=e.get("rowSelection");if(typeof s!="object"||!Es(e))return!1;const o=(t.autoColSvc?.getColumns()?.length??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&o)return!1;const i=!!ro(s),n=zi(s);return i||n}createSelectionColDef(e){const{gos:t}=this,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(a,l,c,d){const u=c.isSelected(),h=d.isSelected();return u===h?0:u?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...r,colId:gh,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const s=new Ws(e,null,t,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(e,t,s){const o=t&&typeof t!="string"?ro(t):void 0,i=e&&typeof e!="string"?ro(e):void 0,n=o!==i,r=t&&typeof t!="string"?zi(t):void 0,a=e&&typeof e!="string"?zi(e):void 0,l=r!==a,c=ln(e),d=ln(t);(n||l||c!==d)&&this.beans.colModel.refreshAll(s)}destroy(){hn(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,s){if(!this.columns?.list.length)return;const o=e.length+t.length+s.length;if(o===0)return;const i=this.columns.list[0];if(!i.isVisible())return;const n=()=>{let l;switch(i.pinned){case"left":case!0:l=e;break;case"right":l=s;break;default:l=t}l&&Ct(l,i)};(this.beans.rowNumbersSvc?.getColumn(ph)?2:1)===o&&n()}};function d5(e,t){if(!t.nodes.every(r=>r.rowPinned&&!Si(r)?(H(59),!1):r.id===void 0?(H(60),!1):!0))return;const{nodes:o,source:i,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:o,source:i??"api",newValue:n})}function u5(e,t,s="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:s,selectAll:t})}function h5(e,t,s="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:s,selectAll:t})}function g5(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function p5(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function f5(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function m5(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function C5(e){return e.selectionSvc?.getSelectedNodes()??[]}function v5(e){return e.selectionSvc?.getSelectedRows()??[]}var w5=class extends zy{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=cn(e),this.groupSelectsDescendants=li(e),this.groupSelectsFiltered=un(e)==="filteredDescendants",this.masterSelectsDetail=fc(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=li(e),s=cn(e),o=un(e)==="filteredDescendants";this.masterSelectsDetail=fc(e)==="detail",(t!==this.groupSelectsDescendants||o!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=o,this.mode=s)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,s){if(this.isRowSelectionBlocked(t))return 0;const o=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,s);if(o==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in o)return o.reset?this.resetNodes():this.selectRange(o.deselect,!1,s),this.selectRange(o.select,!0,s);{const i=o.checkFilteredNodes?Dp(o.node):o.newValue;return this.setNodesSelected({nodes:[o.node],newValue:i,clearSelection:o.clearSelection,keepDescendants:o.keepDescendants,event:e,source:s})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:s,nodes:o,event:i,source:n,keepDescendants:r=!1}){if(o.length===0)return 0;const{gos:a}=this;if(!Es(a)&&e)return H(132),0;if(o.length>1&&!this.isMultiSelect())return H(130),0;let l=0;for(let c=0;c<o.length;c++){const d=o[c],u=Xs(d);if(u.rowPinned&&!Si(u)){H(59);continue}if(u.id===void 0){H(60);continue}this.groupSelectsFiltered&&u.group&&!a.get("treeData")||this.selectRowNode(u,e,i,n)&&(this.detailSelection.delete(u.id),l++),this.groupSelectsDescendants&&u.childrenAfterGroup?.length&&(l+=this.selectChildren(u,e,n))}return s||(o.length===1&&n==="api"&&this.selectionCtx.setRoot(Xs(o[0])),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(Xs(o[0]),r,n)),l>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),l}selectRange(e,t,s){let o=0;return e.forEach(i=>{const n=Xs(i);if(n.group&&this.groupSelectsDescendants)return;this.selectRowNode(n,t,void 0,s)&&o++}),o>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),o}selectChildren(e,t,s){const o=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return o?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:o}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((s,o)=>{e(s)&&t.set(o,s)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:o}=this.beans;if(!Fe(s))return!1;const i=o.rootNode;if(!i)return!1;t||(t=new ui(!0,i),t.active=!1);let n=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==i){const a=this.calculateSelectedFromChildren(r);n=this.selectRowNode(r,a===null?!1:a,void 0,e)||n}}),n}clearOtherNodes(e,t,s){const o=new Map;let i=0;return this.selectedNodes.forEach(n=>{const r=n.id==e.id;if((t?!S5(e,n):!0)&&!r){const l=this.selectedNodes.get(n.id);i+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&n.parent&&o.set(n.parent.id,n.parent)}}),o.forEach(n=>{const r=this.calculateSelectedFromChildren(n);this.selectRowNode(n,r===null?!1:r,void 0,s)}),i}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new us(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!Fe(e))return;const s=t.getTopLevelNodes();if(s===null)return;const o=[];function i(n){for(let r=0,a=n.length;r<a;r++){const l=n[r];l.isSelected()?o.push(l):l.group&&l.childrenAfterGroup&&i(l.childrenAfterGroup)}}return i(s),o}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const s=Fe(this.gos);let o=!1;const i=n=>{const r=this.selectRowNode(Xs(n),!1,void 0,e);o||(o=r)};if(t==="currentPage"||t==="filtered"){if(!s){pe(102);return}this.getNodesToSelect(t).forEach(i)}else this.selectedNodes.forEach(i),this.reset(e);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const n=this.updateGroupsFromChildrenSelections(e);o||(o=n)}o&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,s=0;return this.getNodesToSelect(e).forEach(o=>{this.groupSelectsDescendants&&o.group||(o.isSelected()?t++:o.selectable&&s++)}),{selectedCount:t,notSelectedCount:s}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:s}=this.getSelectedCounts(e);return Ep(t,s)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],s=i=>t.push(i);if(e==="currentPage")return this.forEachNodeOnPage(i=>{if(!i.group){s(i);return}if(!i.expanded&&!i.footer){const n=r=>{s(r),r.childrenAfterFilter?.forEach(n)};n(i);return}this.groupSelectsDescendants||s(i)}),t;const o=this.beans.rowModel;return e==="filtered"?(o.forEachNodeAfterFilter(s),t):(o.forEachNode(s),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:s}=this.beans,o=t.getFirstRow(),i=t.getLastRow();for(let n=o;n<=i;n++){const r=s.getRow(n);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:s}=this;if(!Es(t)){H(132);return}if(S1(t)&&!dn(t)){H(130);return}if(!this.canSelectAll())return;const{source:o,selectAll:i}=e;let n=!1;if(this.getNodesToSelect(i).forEach(r=>{const a=this.selectRowNode(Xs(r),!0,void 0,o);n||(n=a)}),s.selectAll=!0,Fe(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(o);n||(n=r)}n&&this.dispatchSelectionChanged(o)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,s){if(e||(e=[]),!Array.isArray(e)){pe(103);return}const o=new Set(e),i=[];this.beans.rowModel.forEachNode(n=>{o.has(n.id)&&i.push(n)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:i,source:t})}canSelectAll(){return Fe(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:s}=this.beans;if(!Es(t))return;const o="selectableChanged",i=e!==void 0,n=Fe(t)&&this.groupSelectsDescendants,r=[],a=l=>{if(i&&!l.group)return;if(n&&l.group){const d=l.childrenAfterGroup?.some(u=>u.selectable)??!1;this.setRowSelectable(l,d,!0);return}!this.updateRowSelectable(l,!0)&&l.isSelected()&&r.push(l)};if(n){if(e===void 0){const l=s.rootNode;e=l?new ui(!1,l):void 0}e?.forEachChangedNodeDepthFirst(a,!i,!i)}else s.forEachNode(a);r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:o}),!i&&n&&this.updateGroupsFromChildrenSelections?.(o)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const s=e.detailNode?.detailGridInfo?.api;if(!s)return;const o=b5(s);if(e.isSelected()!==o&&this.selectRowNode(e,o,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!o){const n=this.detailSelection.get(e.id)??new Set;for(const r of s.getSelectedNodes())n.add(r.id);this.detailSelection.set(e.id,n)}}setDetailSelectionState(e,t,s){if(this.masterSelectsDetail){if(!dn(t)){H(269);return}switch(e.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const o=this.detailSelection.get(e.id);if(o){const i=[];for(const n of o){const r=s.getRowNode(n);r&&i.push(r)}s.setNodesSelected({nodes:i,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function Xs(e){return Si(e)?e.pinnedSibling:e.footer?e.sibling:e}function b5(e){let t=0,s=0;return e.forEachNode(o=>{o.isSelected()?t++:o.selectable&&s++}),Ep(t,s)}function Ep(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function S5(e,t){let s=t.parent;for(;s;){if(s===e)return!0;s=s.parent}return!1}function Dp(e){const t=e.isSelected()===!1,s=e.childrenAfterFilter?.some(Dp)??!1;return t||s}var y5={moduleName:"SharedRowSelection",version:G,beans:[c5],apiFunctions:{setNodesSelected:d5,selectAll:u5,deselectAll:h5,selectAllFiltered:g5,deselectAllFiltered:p5,selectAllOnCurrentPage:f5,deselectAllOnCurrentPage:m5,getSelectedNodes:C5,getSelectedRows:v5}},R5={moduleName:"RowSelection",version:G,rowModels:["clientSide","infinite","viewport"],beans:[w5],dependsOn:[y5]};function x5(e){e.expansionSvc?.expandAll(!0)}function F5(e){e.expansionSvc?.expandAll(!1)}function Pp(e){e.rowModel?.onRowHeightChanged()}function Tp(e){if(e.rowAutoHeight?.active){H(3);return}e.rowModel?.resetRowHeights()}function E5(e,t,s){const o=E3(e);if(o){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){pe(238);return}o.setRowCount(t,s);return}pe(28);return}jn(e)?.setRowCount(t,s)}function D5(e){return zs(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function P5(e){return e.rowModel.isLastRowIndexKnown()}var T5={moduleName:"CsrmSsrmSharedApi",version:G,apiFunctions:{expandAll:x5,collapseAll:F5}},M5={moduleName:"RowModelSharedApi",version:G,apiFunctions:{onRowHeightChanged:Pp,resetRowHeights:Tp}},I5={moduleName:"SsrmInfiniteSharedApi",version:G,apiFunctions:{setRowCount:E5,getCacheBlockState:D5,isLastRowIndexKnown:P5}},k5=class extends T{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(o=>{if(!o){pe(18),t||pe(20);return}if(this.isGridApi(o))return o;const i=o;return"current"in i?i.current?.api:(i.api||pe(19),i.api)}).filter(o=>!!o&&!o.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const s=[];return e.columns?e.columns.forEach(o=>{s.push(t(o))}):e.column&&s.push(t(e.column)),s}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":H(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const s of e.columnGroups){let o=null;s&&(o=t.getProvidedColGroup(s.getGroupId())),!(s&&!o)&&t.setColumnGroupOpened(o,s.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let s=null;const o=this.beans,{colResize:i,ctrlsSvc:n,colModel:r}=o;if(t&&(s=r.getColDefCol(t.getColId())),t&&!s)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const u=e.api.getColumnState().map(h=>({colId:h.colId}));mt(o,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const u=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));mt(o,{state:u},"alignedGridChanged")}break;case"columnPinned":{const u=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));mt(o,{state:u},"alignedGridChanged")}break;case"columnResized":{const d=e,u={};for(const h of a)u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of d.flexColumns??[])u[h.getId()]&&delete u[h.getId()];i?.setColumnWidths(Object.values(u),!1,d.finished,"alignedGridChanged");break}}const c=n.getGridBodyCtrl().isVerticalScrollShowing();for(const d of this.getAlignedGridApis())d.setGridOption("alwaysShowVerticalScroll",c)}},A5={moduleName:"AlignedGrids",version:G,beans:[k5],dependsOn:[Pg]},L5=class extends T{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},Fd(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){const{selectionSvc:t,pinnedRowModel:s,groupStage:o}=this.beans;t?.reset("rowDataChanged"),s?.isManual()&&s.reset(),this.dispatchRowDataUpdateStarted(e),this.allNodesMap=Object.create(null),this.nextId=0;const i=Fd(this.rootNode),n=new Array(e.length);i._leafs=n;let r=0;const a=o?.getNestedDataGetter(),l=a?new Set:null,c=(d,u)=>{const h=d.level+1;for(let g=0,f=u.length;g<f;++g){const m=u[g];if(!m)continue;const v=this.createRowNode(m,h);if(v.sourceRowIndex=r,n[r++]=v,l&&!l.has(m)){l.add(m),v.treeParent=d;const w=a(m);w&&c(v,w)}}};c(i,e),n.length=r}setImmutableRowData(e,t){const{rootNode:s,gos:o}=this;this.dispatchRowDataUpdateStarted(t);const i=Co(o),n=e.changedRowNodes,{adds:r,updates:a}=n,l=new Set,c=[],d=this.beans.groupStage?.getNestedDataGetter();let u=o.get("suppressMaintainUnsortedOrder")?void 0:!1,h=-1,g=!1;const f=(w,b)=>{if(!u&&u!==void 0){const S=w.sourceRowIndex;u=S<=h,h=S}w.data!==b&&(w.updateData(b),r.has(w)||a.add(w),!w.selectable&&w.isSelected()&&c.push(w))},m=(w,b,S)=>{for(let R=0,y=b.length;R<y;++R){const x=b[R];if(!x)continue;let D=this.getRowNode(i({data:x,level:S}));if(D?(f(D,x),g||(g=!!d&&D.treeParent!==w)):(D=this.createRowNode(x,S),r.add(D)),!d||l.has(D)){l.add(D);continue}l.add(D),D.treeParent=w;const M=d(x);M&&m(D,M,S+1)}};m(s,t,0);const v=this.deleteUnusedNodes(l,n,c)||u||r.size>0;if(v){const w=s._leafs??(s._leafs=[]);u===void 0?V5(w,l,n):G5(w,l)&&(n.reordered=!0)}(v||g||a.size)&&(e.rowDataUpdated=!0,this.deselect(c))}deleteUnusedNodes(e,{removals:t},s){const o=this.rootNode._leafs;for(let i=0,n=o.length;i<n;i++){const r=o[i];e.has(r)||(t.add(r),r.isSelected()&&s.push(r),this.deleteNode(r))}return t.size>0}updateRowData(e,t){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return H(268),{remove:[],update:[],add:[]};const s=[],o=Co(this.gos),i=this.executeRemove(o,e,t,s),n=this.executeUpdate(o,e,t,s),r=this.executeAdd(e,t);return this.deselect(s),{remove:i,update:n,add:r}}executeRemove(e,{remove:t},{adds:s,updates:o,removals:i},n){const r=this.rootNode._leafs,a=r?.length,l=t?.length;if(!l||!a)return[];let c=0,d=a,u=0,h;const g=new Array(l);for(let f=0;f<l;++f){const m=this.lookupNode(e,t[f]);if(!m)continue;const v=m.sourceRowIndex;v<d&&(d=v),v>u&&(u=v),m.isSelected()&&n.push(m),this.deleteNode(m),s.delete(m)?(h??(h=new Set),h.add(m)):(o.delete(m),i.add(m)),g[c++]=m}return g.length=c,c&&N5(r,d,u,i,h),g}executeUpdate(e,{update:t},{adds:s,updates:o},i){const n=t?.length;if(!n)return[];const r=new Array(n);let a=0;for(let l=0;l<n;l++){const c=t[l],d=this.lookupNode(e,c);d&&(d.updateData(c),!d.selectable&&d.isSelected()&&i.push(d),r[a++]=d,s.has(d)||o.add(d))}return r.length=a,r}executeAdd(e,t){var s;const o=(s=this.rootNode)._leafs??(s._leafs=[]),i=o.length,n=e.add,r=n?.length;if(!r)return[];const a=i+r;let l=this.sanitizeAddIndex(o,e.addIndex);if(l<i){for(let u=i-1,h=a-1;u>=l;--u){const g=o[u];g.sourceRowIndex=h,o[h--]=g}t.reordered=!0}o.length=a;const c=new Array(r),d=t.adds;for(let u=0;u<r;u++){const h=this.createRowNode(n[u],0);d.add(h),h.sourceRowIndex=l,o[l]=h,c[u]=h,l++}return c}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",s=this.beans.selectionSvc;e.length&&s?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),s?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:s?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t){const s=new us(this.beans);s.parent=this.rootNode,s.level=t,s.group=!1,s.expanded=!1,s.setDataAndId(e,String(this.nextId++));const o=s.id,i=this.allNodesMap;return i[o]&&H(2,{nodeId:o}),i[o]=s,s}deleteNode(e){e.clearRowTopAndRowIndex();const t=e.id,s=this.allNodesMap;s[t]===e&&delete s[t];const o=e.pinnedSibling;o&&this.beans.pinnedRowModel?.pinRow(o,null)}lookupNode(e,t){if(!e)return H5(this.rootNode._leafs,t);const s=e({data:t,level:0}),o=this.allNodesMap[s];return o||(pe(4,{id:s}),null)}sanitizeAddIndex(e,t){const s=e.length;if(typeof t!="number"||t<0||t>=s||Number.isNaN(t))return s;t=Math.ceil(t);const o=this.gos;return t>0&&o.get("treeData")&&o.get("getDataPath")&&(t=O5(e,t)),t}},O5=(e,t)=>{for(let s=0,o=e.length;s<o;s++)if(e[s]?.rowIndex==t-1)return s+1;return t},Fd=e=>{e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",e._leafs?.length!==0&&(e._leafs=[]);const t=[],s=[],o=[],i=[];e.childrenAfterGroup=t,e.childrenAfterSort=s,e.childrenAfterAggFilter=o,e.childrenAfterFilter=i;const n=e.sibling;return n&&(n.childrenAfterGroup=t,n.childrenAfterSort=s,n.childrenAfterAggFilter=o,n.childrenAfterFilter=i,n.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},H5=(e,t)=>{if(e)for(let s=0,o=e.length;s<o;s++){const i=e[s];if(i.data===t)return i}return pe(5,{data:t}),null},N5=(e,t,s,o,i)=>{t=Math.max(0,t);for(let n=t,r=e.length;n<r;++n){const a=e[n];n<=s&&(o.has(a)||i?.has(a))||(a.sourceRowIndex=t,e[t++]=a)}e.length=t},G5=(e,t)=>{const s=t.size;e.length=s;let o=0,i=!1,n=!1;for(const r of t){const a=r.sourceRowIndex;a===o?n||(n=i):(a>=0?n=!0:i=!0,r.sourceRowIndex=o,e[o]=r),++o}return n},V5=(e,t,{removals:s,adds:o})=>{const i=e.length;e.length=t.size;let n=0;for(let r=0;r<i;++r){const a=e[r];s.has(a)||(n!==r&&(a.sourceRowIndex=n,e[n]=a),++n)}for(const r of o)r.sourceRowIndex<0&&(r.sourceRowIndex=n,e[n++]=r);e.length=n},Mp=e=>{const t=e.childrenAfterSort,s=e.sibling;if(s&&(s.childrenAfterSort=t),!!t)for(let o=0,i=t.length-1;o<=i;o++){const n=t[o],r=o===0,a=o===i;n.firstChild!==r&&(n.firstChild=r,n.dispatchRowEvent("firstChildChanged")),n.lastChild!==a&&(n.lastChild=a,n.dispatchRowEvent("lastChildChanged")),n.childIndex!==o&&(n.childIndex=o,n.dispatchRowEvent("childIndexChanged"))}},B5=class extends T{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e){const t=this.beans.sortSvc.getSortOptions(),s=t.length>0&&!!e.changedRowNodes&&this.gos.get("deltaSort");this.sort(t,s,e.changedRowNodes,e.changedPath)}sort(e,t,s,o){const{gos:i,colModel:n,rowGroupColsSvc:r,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:c}=this.beans,d=i.get("groupMaintainOrder"),u=n.getCols().some(b=>b.isRowGroupActive()),h=r?.columns,g=n.isPivotMode(),f=i.getCallback("postSortRows");let m=!1,v;const w=b=>{const S=g&&b.leafGroup;let R=d&&u&&!b.leafGroup;R&&(v??(v=this.shouldSortContainsGroupCols(e)),R&&(R=!v));let y=null;if(R){let x=!1;if(h){const D=b.level+1;D<h.length&&(x=h[D].getSort()===null)}x||(y=_5(b))}else!e.length||S||(t&&s?y=z5(a,b,s,o,e):y=a.doFullSort(b.childrenAfterAggFilter,e));if(y||(y=b.childrenAfterAggFilter?.slice(0)??[]),m||(m=b.childrenAfterSort?.[0]!==y[0]),b.childrenAfterSort=y,Mp(b),f){const x={nodes:b.childrenAfterSort};f(x)}};if(o?.forEachChangedNodeDepthFirst(w),m&&i.get("groupHideOpenParents")){const b=c?.getShowRowGroupCols();b?.length&&l.refreshCells({columns:b,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(Rt(this.gos)){for(let s=0;s<t;++s){const o=e[s].column;if(o.isPrimary()&&o.isRowGroupActive())return!0}return!1}for(let s=0;s<t;++s)if(e[s].column.getColDef().showRowGroup)return!0;return!1}},z5=(e,t,s,o,i)=>{const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,i);const a=new Set,l=[],{updates:c,adds:d}=s;for(let h=0,g=n.length;h<g;++h){const f=n[h];c.has(f)||d.has(f)||o&&!o.canSkip(f)?l.push({currentPos:l.length,rowNode:f}):a.add(f)}const u=r.filter(h=>a.has(h)).map((h,g)=>({currentPos:g,rowNode:h}));return l.sort((h,g)=>e.compareRowNodes(i,h,g)),W5(e,i,l,u)},W5=(e,t,s,o)=>{let i=0,n=0;const r=s.length,a=o.length,l=new Array(r+a);let c=0;for(;i<r&&n<a;){const d=s[i],u=o[n];e.compareRowNodes(t,d,u)<0?(l[c++]=d.rowNode,++i):(l[c++]=u.rowNode,++n)}for(;i<r;)l[c++]=s[i++].rowNode;for(;n<a;)l[c++]=o[n++].rowNode;return l},_5=e=>{const t=e.childrenAfterSort,s=e.childrenAfterAggFilter,o=t?.length,i=s?.length;if(!o||!i)return null;const n=new Array(i),r=new Set;for(let l=0;l<i;++l)r.add(s[l]);let a=0;for(let l=0;l<o;++l){const c=t[l];r.delete(c)&&(n[a++]=c)}if(r.size===0&&a===o)return t;for(const l of r)n[a++]=l;return n.length=a,n},U5=class extends T{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=[],this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=Ve(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new us(e);this.rootNode=t,this.nodeManager=this.createBean(new L5(t));const s=this.refreshModel.bind(this,{step:"group"}),o=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:s,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:s,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,s=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(o=>!!o);this.stages=s;for(let o=s.length-1;o>=0;--o)for(const i of s[o].refreshProps)t.set(i,o);this.addManagedPropertyListeners([...t.keys()],o=>{const i=o.changeSet?.properties;i&&this.onPropChange(i)}),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),a=this.getRowIndexAtPixel(t),l=Math.max(r,s),c=Math.min(a,o);for(let d=l;d<=c;d++){const u=this.getRow(d);if(u.rowHeightEstimated){const h=ls(this.beans,u);u.setRowHeight(h.height),i=!0,n=!0}}i&&this.setRowTopAndRowIndex()}while(i);return n}onPropChange(e){const{nodeManager:t,gos:s,beans:o}=this,i=o.groupStage;if(!t)return;const n=new Set(e),r=i?.onPropChange(n);let a;n.has("rowData")?a=s.get("rowData"):r&&(a=i?.extractData()),a&&!Array.isArray(a)&&(a=null,H(1));const l={step:"nothing",changedProps:n};a&&(!r&&!this.isEmpty()&&a.length>0&&s.exists("getRowId")&&!s.get("resetRowDataOnUpdate")?(l.keepRenderedRows=!0,l.animate=!s.get("suppressAnimationFrame"),l.changedRowNodes=new qi,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0));const c=l.rowDataUpdated?"group":this.getRefreshedStage(e);c&&(l.step=c,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:s}=this,o=t.length;let i=o;for(let n=0,r=e.length;n<r&&i;++n)i=Math.min(i,s.get(e[n])??i);return i<o?t[i].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:s}=this,o=t.environment.getDefaultRowHeight();let i=0;const n=Be(this.gos,"normal");for(let r=0,a=s.length;r<a;++r){const l=s[r],c=l.id;if(c!=null&&e?.add(c),l.rowHeight==null){const d=ls(t,l,n,o);l.setRowHeight(d.height,d.estimated)}l.setRowTop(i),l.setRowIndex(r),i+=l.rowHeight}}clearRowTopAndRowIndex(e,t){const s=e.active,o=r=>{r?.id!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},i=r=>{o(r),o(r.detailNode),o(r.sibling);const a=r.childrenAfterGroup;if(!r.hasChildren()||!a)return;const l=r.level==-1;if(!(s&&!l&&!r.expanded))for(let d=0,u=a.length;d<u;++d)i(a[d])},n=this.rootNode;n&&i(n)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const o=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+o}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:s,rowsToDisplay:o}=this;if(!s||!o.length||o[0]===s)return e;const n=s.childrenAfterSort,r=l=>{let c=n[l];if(this.gos.get("groupHideOpenParents"))for(;c.expanded&&c.childrenAfterSort&&c.childrenAfterSort.length>0;)c=c.childrenAfterSort[0];return c.rowIndex},a=t.footerSvc;return a?a?.getTopDisplayIndex(o,e,n,r):r(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:s}=this;if(!t||!s.length||s[0]===t)return e;let i=this.getRow(e);i.footer&&(i=i.sibling);let n=i.parent;for(;n&&n!==t;)i=n,n=i.parent;const r=t.childrenAfterSort?.indexOf(i)??-1;return r>=0?r:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:no(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const o=t.length===0||t.some(i=>i.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:o,keepRenderedRows:!0,animate:no(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:no(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new ui(!1,this.rootNode);return t.active=e,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){const{nodeManager:t,beans:s,eventSvc:o,started:i,refreshingModel:n}=this;if(!t)return;const r=!!e.rowDataUpdated,a=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&r));if(i&&r&&o.dispatchEvent({type:"rowDataUpdated"}),!i||n||s.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)){this.rowDataUpdatedPending||(this.rowDataUpdatedPending=r);return}switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.refreshingModel=!0,s.masterDetailSvc?.refreshModel(e),r&&e.step!=="group"&&s.colFilter?.refreshModel(),e.step){case"group":this.doGrouping(e);case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(e.changedRowNodes,a);case"map":this.doRowsToDisplay()}const l=new Set;this.setRowTopAndRowIndex(l),this.clearRowTopAndRowIndex(a,l),this.refreshingModel=!1,o.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let s=!1,o=!1;const i=[],n=li(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(o)return;if(s&&(r===t||r===e)&&(o=!0,n&&r.group)){Ip(i,r);return}if(!s){if(r!==t&&r!==e)return;s=!0,t===e&&(o=!0)}(!r.group||!n)&&i.push(r)}),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,s=t.length;if(this.isEmpty()||s===0)return-1;let o=0,i=s-1;if(e<=0)return 0;if(t[i].rowTop<=e)return i;let r=-1,a=-1;for(;;){const l=Math.floor((o+i)/2),c=t[l];if(this.isRowInPixel(c,e)||(c.rowTop<e?o=l+1:c.rowTop>e&&(i=l-1),r===o&&a===i))return l;r=o,a=i}}isRowInPixel(e,t){const s=e.rowTop,o=s+e.rowHeight;return s<=t&&o>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let s=0,o=t.length;s<o;++s)e(t[s],s)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let s=0,o=t.length;s<o;++s)e(t[s],s)}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,s){const{colModel:o,rowGroupColsSvc:i}=this.beans;if(!o.isPivotMode())return;if(!i?.columns.length){e(this.rootNode,0);return}const n=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[n])}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;if(r||e(o,n++),o.hasChildren()&&!o.footer){const a=s(o);if(a){const l=this.beans.footerSvc;n=l?.addTotalRows(n,o,e,t,r,"top")??n;for(const c of a)n=this.depthFirstSearchRowNodes(e,t,s,c,n);return l?.addTotalRows(n,o,e,t,r,"bottom")??n}}return n}doAggregate(e){const t=this.rootNode;t&&this.beans.aggStage?.execute({rowNode:t,changedPath:e})}doFilterAggregates(e){const t=this.rootNode,s=this.beans.filterAggStage;if(s){s.execute({rowNode:t,changedPath:e});return}t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const s=this.beans.sortStage;if(s){s.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t});return}t.forEachChangedNodeDepthFirst(o=>{o.childrenAfterSort=o.childrenAfterAggFilter.slice(0),Mp(o)})}doGrouping(e){const t=this.rootNode,o=this.beans.groupStage?.execute({rowNode:t,changedRowNodes:e.changedRowNodes,changedPath:e.changedPath,afterColumnsChanged:!!e.afterColumnsChanged});if(o===void 0){const i=t._leafs;t.childrenAfterGroup=i,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=i)}(o||e.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute({rowNode:this.rootNode,changedPath:e});return}e.forEachChangedNodeDepthFirst(s=>{s.childrenAfterFilter=s.childrenAfterGroup,sp(s)},!0)}doPivot(e){this.beans.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return typeof t=="object"?t:typeof e=="string"&&e.indexOf(da)===0?this.beans.groupStage?.getNode(e):void 0}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const s=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),s)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:s,asyncTransactions:o}=this;if(!e)return;t.valueCache?.onDataChanged();const i=[],n=[],r=new qi;for(const{rowDataTransaction:a,callback:l}of o??[]){this.rowNodesCountReady=!0;const c=e.updateRowData(a,r);i.push(c),l&&n.push(l.bind(null,c))}this.commitTransactions(r),n.length>0&&setTimeout(()=>{for(let a=0,l=n.length;a<l;a++)n[a]()},0),i.length>0&&s.dispatchEvent({type:"asyncTransactionsFlushed",results:i}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const s=new qi,o=t.updateRowData(e,s);return this.commitTransactions(s),o}commitTransactions(e){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{beans:e,rootNode:t}=this,s=e.flattenStage;if(s){this.rowsToDisplay=s.execute({rowNode:t});return}const o=this.rootNode.childrenAfterSort??[];for(const i of o)i.setUiLevel(0);this.rowsToDisplay=o}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const s=e.sibling;s?.setRowHeight(s.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const s=t.detailNode;s?.setRowHeight(s.rowHeight,!0);const o=t.sibling;o?.setRowHeight(o.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},Ip=(e,t)=>{const s=t.childrenAfterGroup;if(s)for(let o=0,i=s.length;o<i;++o){const n=s[o];n.data&&e.push(n),n.group&&Ip(e,n)}};function j5(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function $5(e,t){const s=fs(e);s&&((!t||t==="everything")&&(t="group"),s.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function K5(e){return fs(e)?.isEmpty()??!0}function q5(e,t){fs(e)?.forEachLeafNode(t)}function Y5(e,t){fs(e)?.forEachNodeAfterFilter(t)}function Z5(e,t){fs(e)?.forEachNodeAfterFilterAndSort(t)}function Q5(e,t){return e.frameworkOverrides.wrapIncoming(()=>fs(e)?.updateRowData(t))}function X5(e,t,s){e.frameworkOverrides.wrapIncoming(()=>fs(e)?.batchUpdateRowData(t,s))}function J5(e){e.frameworkOverrides.wrapIncoming(()=>fs(e)?.flushAsyncTransactions())}function e4(e){return e.selectionSvc?.getBestCostNodeSelection()}var t4={moduleName:"ClientSideRowModel",version:G,rowModels:["clientSide"],beans:[U5,B5],dependsOn:[Xg]},s4={moduleName:"ClientSideRowModelApi",version:G,apiFunctions:{onGroupExpandedOrCollapsed:j5,refreshClientSideRowModel:$5,isRowDataEmpty:K5,forEachLeafNode:q5,forEachNodeAfterFilter:Y5,forEachNodeAfterFilterAndSort:Z5,applyTransaction:Q5,applyTransactionAsync:X5,flushAsyncTransactions:J5,getBestCostNodeSelection:e4,resetRowHeights:Tp,onRowHeightChanged:Pp},dependsOn:[T5,M5]},o4=class extends T{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:s,columnKeys:o,skipRowGroups:i,exportRowNumbers:n}=t,r=this.getColumnsToExport({allColumns:s,skipRowGroups:i,columnKeys:o,exportRowNumbers:n});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,s,o){const i=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.isPivotMode()?o.leafGroup:!o.group,c=!!o.footer,d=o.allChildrenCount===1&&o.childrenAfterGroup?.length===1&&w1(this.gos,o);if(!l&&!c&&(t.skipRowGroups||d||a)||t.onlySelected&&!o.isSelected()||t.skipPinnedTop&&o.rowPinned==="top"||t.skipPinnedBottom&&o.rowPinned==="bottom"||o.stub||o.level===-1&&!l&&!c||i(Y(this.gos,{node:o})))return;const g=e.onNewBodyRow(o);if(s.forEach((f,m)=>{g.onColumn(f,m,o)}),t.getCustomContentBelowRow){const f=t.getCustomContentBelowRow(Y(this.gos,{node:o}));f&&e.addCustomContent(f)}}appendContent(e){return t=>{const s=e.appendContent;return s&&t.addCustomContent(s),t}}prependContent(e){return t=>{const s=e.prependContent;return s&&t.addCustomContent(s),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return s=>{if(!e.skipColumnGroupHeaders){const o=new xh,{colGroupSvc:i}=this.beans,n=i?i.createColumnGroups({columns:t,idCreator:o,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,s,e.processGroupHeaderCallback)}return s}}exportHeaders(e,t){return s=>{if(!e.skipColumnHeaders){const o=s.onNewHeaderRow();t.forEach((i,n)=>{o.onColumn(i,n,void 0)})}return s}}processPinnedTopRows(e,t){return s=>{const o=this.processRow.bind(this,s,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="top").sort((i,n)=>i.rowIndex-n.rowIndex).map(i=>this.pinnedRowModel?.getPinnedTopRow(i.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",o),s}}processRows(e,t){return s=>{const o=this.rowModel,i=Fe(this.gos),n=zs(this.gos),r=!i&&e.onlySelected,a=this.processRow.bind(this,s,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(c=>c.rowPinned==null).sort((c,d)=>c.rowIndex-d.rowIndex).map(c=>o.getRow(c.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())i?o.forEachPivotNode(a,!0,l==="filteredAndSorted"):n?o.forEachNodeAfterFilterAndSort(a,!0):o.forEachNode(a);else if(e.onlySelectedAllPages||r){const c=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(c),c.forEach(a)}else l==="all"?o.forEachNode(a):i||n?o.forEachNodeAfterFilterAndSort(a,!0):o.forEachNode(a);return s}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:s}=this.beans;if(!t||!s)return;const o=t.getSortOptions(),i=(n,r)=>n.rowIndex!=null&&r.rowIndex!=null?n.rowIndex-r.rowIndex:n.level===r.level?n.parent?.id===r.parent?.id?s.compareRowNodes(o,{rowNode:n,currentPos:n.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):i(n.parent,r.parent):n.level>r.level?i(n.parent,r):i(n,r.parent);e.sort(i)}processPinnedBottomRows(e,t){return s=>{const o=this.processRow.bind(this,s,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="bottom").sort((i,n)=>i.rowIndex-n.rowIndex).map(i=>this.pinnedRowModel?.getPinnedBottomRow(i.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",o),s}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:s=!1,exportRowNumbers:o=!1,columnKeys:i}=e,{colModel:n,gos:r,visibleCols:a}=this,l=n.isPivotMode(),c=h=>Yt(h)?!1:!zt(h)||o;if(i?.length)return n.getColsForKeys(i).filter(c);const d=r.get("treeData");let u=[];return t&&!l?u=n.getCols():u=a.allCols,u=u.filter(h=>c(h)&&(s&&!d?!ol(h):!0)),u}recursivelyAddHeaderGroups(e,t,s){const o=[];for(const i of e){const n=i;if(n.getChildren)for(const r of n.getChildren()??[])o.push(r)}e.length>0&&Ee(e[0])&&this.doAddHeaderHeader(t,e,s),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,t,s)}doAddHeaderHeader(e,t,s){const o=e.onNewHeaderGroupingRow();let i=0;for(const n of t){const r=n;let a;s?a=s(Y(this.gos,{columnGroup:r})):a=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const c=(r.isExpandable()?r.getLeafColumns():[]).reduce((d,u,h,g)=>{let f=fe(d);return u.getColumnGroupShow()==="open"?(!f||f[1]!=null)&&(f=[h],d.push(f)):f&&f[1]==null&&(f[1]=h-1),h===g.length-1&&f&&f[1]==null&&(f[1]=h),d},[]);o.onColumn(r,a||"",i++,r.getLeafColumns().length-1,c)}}},i4={moduleName:"SharedExport",version:G,beans:[o4]},Ed=`\r
61
+ `,n4=class extends A3{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:s}=e;this.suppressQuotes=t,this.columnSeparator=s}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,Ed),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((s,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(s.data.value||""),s.mergeAcross&&this.appendEmptyCells(s.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,s,o){s!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,s){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",s);this.result+=this.putInQuotes(o.valueFormatted??o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(H(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Ed),this.isFirstLine=!1}},r4=class extends k3{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){H(51);return}const t=this.getMergedParams(e),s=this.getData(t),o=new Blob(["\uFEFF",s],{type:"text/plain"}),i=typeof t.fileName=="function"?t.fileName(Y(this.gos,{})):t.fileName;L3(this.getFileName(i),o)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const s=t?Object.assign({},e):this.getMergedParams(e);return this.getData(s)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:s,rowGroupColsSvc:o,valueSvc:i,gos:n}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u}=e;return new n4({colModel:t,colNames:s,valueSvc:i,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||",",rowGroupColsSvc:o})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function a4(e,t){return e.csvCreator?.getDataAsCsv(t)}function l4(e,t){e.csvCreator?.exportDataAsCsv(t)}var c4={moduleName:"CsvExport",version:G,beans:[r4],apiFunctions:{getDataAsCsv:a4,exportDataAsCsv:l4},dependsOn:[i4]},d4=class extends T{constructor(e,t,s){super(),this.id=e,this.parentCache=t,this.params=s,this.state="needsLoading",this.version=0,this.startRow=e*s.blockSize,this.endRow=this.startRow+s.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,s){this.successCommon(e,{rowData:t,rowCount:s})}isRequestMostRecentAndLive(e){const t=e===this.version,s=this.isAlive();return t&&s}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:s,beans:o,rowNodes:i}=this;for(let n=0;n<e;n++){const r=s+n,a=new us(o);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),i.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:s,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:s,pageStatus:o}}}setDataAndId(e,t,s){V(t)?e.setDataAndId(t,s.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(be(this.params.datasource.getRows)){H(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:s,params:{sortModel:o,filterModel:i},gos:n}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,s),failCallback:this.pageLoadFailed.bind(this,s),sortModel:o,filterModel:i,context:Y(n,{}).context}}forEachNode(e,t,s){this.rowNodes.forEach((o,i)=>{this.startRow+i<s&&e(o,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const s=e-this.startRow;return this.rowNodes[s]}processServerResult(e){const{rowNodes:t,beans:s}=this;t.forEach((i,n)=>{const r=e.rowData?e.rowData[n]:void 0;!i.id&&i.alreadyRendered&&r&&(t[n]=new us(s),t[n].setRowIndex(i.rowIndex),t[n].setRowTop(i.rowTop),t[n].setRowHeight(i.rowHeight),i.clearRowTopAndRowIndex()),this.setDataAndId(t[n],r,this.startRow+n)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},u4=2,h4=class extends T{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const s=Math.floor(e/this.params.blockSize);let o=this.blocks[s];if(!o){if(t)return;o=this.createBlock(s)}return o.getRow(e)}createBlock(e){const t=this.params,s=this.createBean(new d4(e,this,t));return this.blocks[s.id]=s,this.blockCount++,this.purgeBlocksIfNeeded(s),t.rowNodeBlockLoader.addBlock(s),s}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Ls(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),s=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(s);const o=this.params.maxBlocksInCache>0,i=o?this.params.maxBlocksInCache-1:null,n=u4-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=n,c=o?a>=i:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:s,endRow:o}=e;return t.rowIndex>=s&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:s}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,s-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:s,overflowSize:o}=this.params,n=(e.id+1)*s+o;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,V(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const s of this.getBlocksInOrder())s.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(s,o)=>s.id-o.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const s=[];let o=-1,i=!1;const n={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(i&&o+1!==l.id){r=!0;continue}o=l.id,l.forEachNode(c=>{const d=c===e||c===t;(i||d)&&s.push(c),d&&(i=!i)},n,this.rowCount)}return r||i?[]:s}},g4=class extends T{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new us(e);this.rootNode=t,t.level=-1,this.rowHeight=Ds(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=Ds(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!si(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;Co(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:s,rowNodeBlockLoader:o,eventSvc:i,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:s?.getSortModel()??[],rowNodeBlockLoader:o,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:Ds(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new h4(this.cacheParams)),i.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(s=>{s.id===e&&(t=s)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),s=this.getRowCount()-1;return t>s?s:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function p4(e){jn(e)?.refreshCache()}function f4(e){jn(e)?.purgeCache()}function m4(e){return jn(e)?.getRowCount()}var C4=class extends T{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=b1(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Ve(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Ct(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Ls(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(s=>s.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const s of t)s.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:s,state:o}=t.getBlockStateJson();e[s]=o}),e}printCacheStatus(){Ls(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},v4={moduleName:"InfiniteRowModelCore",version:G,rowModels:["infinite"],beans:[g4,C4]},w4={moduleName:"InfiniteRowModel",version:G,apiFunctions:{refreshInfiniteCache:p4,purgeInfiniteCache:f4,getInfiniteRowCount:m4},dependsOn:[v4,I5]},b4="↑",S4="↓",y4={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},R4=class extends Re{constructor(){super(y4),this.eValue=q,this.eDelta=q,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const s=Math.abs(t),o=e.formatValue(s),i=V(o)?o:s,n=t>=0,r=this.eDelta;n?r.textContent=b4+i:r.textContent=S4+i,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),Xe(this.eDelta)}refresh(e,t=!1){const{value:s,valueFormatted:o}=e,{eValue:i,lastValue:n,beans:r}=this;if(s===n||(V(o)?i.textContent=o:V(s)?i.textContent=s:Xe(i),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=s&&typeof s=="object"&&"toNumber"in s?s.toNumber():s,l=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return n&&i.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=s,!0}},x4=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",F4={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},E4=class extends Re{constructor(){super(F4),this.eCurrent=q,this.refreshCount=0,this.registerCSS(x4)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:s}=this,o=Ye({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=s.textContent,this.getGui().insertBefore(o,s),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let s=e.value;if(be(s)&&(s=""),s===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=s;const o=this.eCurrent;return V(e.valueFormatted)?o.textContent=e.valueFormatted:V(e.value)?o.textContent=s:Xe(o),!0}},D4=class extends T{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,s=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const i=this.animations[t];i.delete(e);const n=Date.now(),r=n+s,a=n+s+o,l={phase:"flash",flashEndTime:r,fadeEndTime:a};i.set(e,l);const c=`ag-cell-${t}`,d=`${c}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(c,!0),u.toggleCss(d,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),s)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const s of Object.keys(this.animations)){const o=this.animations[s],i=`ag-cell-${s}`,n=`${i}-animation`;for(const[r,a]of o){if(!r.isAlive()||!r.comp){o.delete(r);continue}const{phase:l,flashEndTime:c,fadeEndTime:d}=a,u=l==="flash"?c:d;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:f}}=r;switch(l){case"flash":g.toggleCss(i,!1),g.toggleCss(n,!0),f.transition=`background-color ${d-c}ms`,f.transitionDelay=`${c-e}ms`,t=Math.min(d,t??1/0),a.phase="fade";break;case"fade":g.toggleCss(i,!1),g.toggleCss(n,!1),f.removeProperty("transition"),f.removeProperty("transition-delay"),o.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const s=vR(e.cellPosition);t.cells[s]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function P4(e,t={}){const{cellFlashSvc:s}=e;s&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))s.flashCell(o,t)})}var T4={moduleName:"HighlightChanges",version:G,beans:[D4],userComponents:{agAnimateShowChangeCellRenderer:R4,agAnimateSlideCellRenderer:E4},apiFunctions:{flashCells:P4}};function M4(e){return e.stateSvc?.getState()??{}}function I4(e,t,s){return e.stateSvc?.setState(t,s)}function Dd(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=k4(e)),e.version=G,e}function k4(e){return e.cellSelection=A4(e,"rangeSelection"),e}function A4(e,t){if(e&&typeof e=="object")return e[t]}var L4=class extends T{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Ve(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Ve(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=Ve(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:s}=this.beans;this.isClientSideRowModel=Fe(e);const o=Dd(e.get("initialState")??{}),i=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&s?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{c==="gridInitializing"&&(r(),n(()=>{this.setupStateOnColumnsInitialised(o,!!i),s?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),n(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{l?.(),n(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const s=Dd(e);delete s.partialColumnState,this.cachedState=s,this.startSuppressEvents();const o="api",i=t?new Set(t):void 0;this.setGridReadyState(s,o,i),this.setColumnsInitialisedState(s,o,!!i,i),this.setRowCountState(s,o,i),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(s,o,i),this.stopSuppressEvents(o)})}setGridReadyState(e,t,s){t==="api"&&!s?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,s,o){this.setColumnState(e,t,s,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const s=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:s("aggregation"),columnMoved:s("columnOrder"),columnPinned:s("columnPinning"),columnResized:s("columnSizing"),columnVisible:s("columnVisibility"),columnPivotChanged:s("pivot"),columnPivotModeChanged:s("pivot"),columnRowGroupChanged:s("rowGroup"),sortChanged:s("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,s){const{filter:o,rowGroupExpansion:i,ssrmRowGroupExpansion:n,rowSelection:r,pagination:a}=e,l=(d,u)=>!s?.has(d)&&(u||t==="api");l("filter",o)&&this.setFilterState(o),l("rowGroupExpansion",i)&&this.setRowGroupExpansionState(n,i,t),l("rowSelection",r)&&this.setRowSelectionState(r,t),l("pagination",a)&&this.setPaginationState(a,t);const c=this.updateCachedState.bind(this);c("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(c("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),c("rowGroupExpansion",void 0)):(c("rowGroupExpansion",this.getRowGroupExpansionState()),c("ssrmRowGroupExpansion",void 0)),c("rowSelection",this.getRowSelectionState()),c("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},o=()=>t("filter",this.getFilterState()),{gos:i,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:s,columnRowGroupChanged:s,rowDataUpdated:()=>{(i.get("groupDefaultExpanded")!==0||i.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(s)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:o})}setFirstDataRenderedState(e,t,s){const{scroll:o,cellSelection:i,focusedCell:n,columnOrder:r,rowPinning:a}=e,l=(u,h)=>!s?.has(u)&&(h||t==="api");l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",i)&&this.setCellSelectionState(i),l("scroll",o)&&this.setScrollState(o),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!r?.orderedColIds,t);const c=this.updateCachedState.bind(this);c("sideBar",this.getSideBarState()),c("focusedCell",this.getFocusedCellState());const d=this.getRangeSelectionState();c("rangeSelection",d),c("cellSelection",d),c("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:s,cellFocusCleared:s,cellSelectionChanged:o=>{if(o.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return P3(pn(e),e.colModel.isPivotMode())}setColumnState(e,t,s,o){const{sort:i,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:u}=e;let h=!1;const g=(F,P)=>{const B=!o?.has(F)&&!!(P||t==="api");return h||(h=B),B},f={},m=F=>{let P=f[F];return P||(P={colId:F},f[F]=P,P)},v={},w=g("sort",i);w&&i?.sortModel.forEach(({colId:F,sort:P},B)=>{const Q=m(F);Q.sort=P,Q.sortIndex=B}),(w||!s)&&(v.sort=null,v.sortIndex=null);const b=g("rowGroup",n);b&&n?.groupColIds.forEach((F,P)=>{const B=m(F);B.rowGroup=!0,B.rowGroupIndex=P}),(b||!s)&&(v.rowGroup=null,v.rowGroupIndex=null);const S=g("aggregation",r);S&&r?.aggregationModel.forEach(({colId:F,aggFunc:P})=>{m(F).aggFunc=P}),(S||!s)&&(v.aggFunc=null);const R=g("pivot",a);R&&(a?.pivotColIds.forEach((F,P)=>{const B=m(F);B.pivot=!0,B.pivotIndex=P}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(R||!s)&&(v.pivot=null,v.pivotIndex=null);const y=g("columnPinning",l);if(y){for(const F of l?.leftColIds??[])m(F).pinned="left";for(const F of l?.rightColIds??[])m(F).pinned="right"}(y||!s)&&(v.pinned=null);const x=g("columnVisibility",c);if(x)for(const F of c?.hiddenColIds??[])m(F).hide=!0;(x||!s)&&(v.hide=null);const D=g("columnSizing",d);if(D)for(const{colId:F,flex:P,width:B}of d?.columnSizingModel??[]){const Q=m(F);Q.flex=P??null,Q.width=B}(D||!s)&&(v.flex=null);const M=u?.orderedColIds,L=!!M?.length&&!o?.has("columnOrder"),I=L?M.map(F=>m(F)):Object.values(f);(I.length||h)&&(this.columnStates=I,mt(this.beans,{state:I,applyOrder:L,defaultState:v},t))}setColumnPivotState(e,t){const s=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const i=this.beans,{pivotResultCols:n,colGroupSvc:r}=i;if(n?.isPivotResultColsPresent()){if(s){const a=[];for(const l of s)n.getPivotResultCol(l.colId)&&a.push(l);mt(i,{state:a,applyOrder:e},t)}o&&r?.setColumnGroupState(o,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return T3(t)}setColumnGroupState(e,t,s){const o=this.beans.colGroupSvc;if(!o||s?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const i=new Set(e.columnGroup?.openColumnGroupIds),r=o.getColumnGroupState().map(({groupId:a})=>{const l=i.has(a);return l&&i.delete(a),{groupId:a,open:l}});for(const a of i)r.push({groupId:a,open:!0});r.length&&(this.columnGroupStates=r),o.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e?.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const s=e?.getFilterState(),o=e?.getAdvFilterModel()??void 0;return t||o||s?{filterModel:t,columnFilterState:s,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:s,columnFilterState:o,advancedFilterModel:i}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(s!==void 0||o!==void 0)&&t?.setFilterState(s??null,o??null,"columnFilter"),i!==void 0&&t?.setAdvFilterModel(i??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:s,type:o,startRow:i,endRow:n,columns:r,startColumn:a}=t;return{id:s,type:o,startRow:i,endRow:n,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:s,colModel:o,visibleCols:i}=this.beans;if(!cs(t)||!s)return;const n=[];for(const r of e?.cellRanges??[]){const a=[];for(const c of r.colIds){const d=o.getCol(c);d&&a.push(d)}if(!a.length)continue;let l=o.getCol(r.startColId);if(!l){const c=i.allCols,d=new Set(a);l=c.find(u=>d.has(u))}n.push({...r,columns:a,startColumn:l})}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??{top:0,left:0},{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{focusSvc:t,colModel:s}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:i,rowPinned:n}=e;t.setFocusedCell({column:s.getCol(o),rowIndex:i,rowPinned:n,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,t){const{pagination:s,gos:o}=this.beans;if(!s)return;const{pageSize:i,page:n}=e??{page:0,pageSize:o.get("paginationPageSize")},r=t==="gridInitializing";i&&!o.get("paginationAutoPageSize")&&s.setPageSize(i,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?s.setPage(n):s.goToPage(n))}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,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,s){const o=this.beans.expansionSvc;if(!o)return;const i=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};o.setExpansionState(i,s)}updateColumnState(e){const t=this.getColumnState();let s=!1;const o=this.cachedState;for(const i of Object.keys(t)){const n=t[i];si(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),si(t,s)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},O4={moduleName:"GridState",version:G,beans:[L4],apiFunctions:{getState:M4,setState:I4}};function H4(e){return e.rowModel.isLastRowIndexKnown()}function N4(e){return e.pagination?.getPageSize()??100}function G4(e){return e.pagination?.getCurrentPage()??0}function V4(e){return e.pagination?.getTotalPages()??1}function B4(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function z4(e){e.pagination?.goToNextPage()}function W4(e){e.pagination?.goToPreviousPage()}function _4(e){e.pagination?.goToFirstPage()}function U4(e){e.pagination?.goToLastPage()}function j4(e,t){e.pagination?.goToPage(t)}var $4=class extends T{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,s=()=>{const o=Math.max(Ds(t),1),i=Math.floor(e/o);t.pagination.setPageSize(i,"autoCalculated")};this.isBodyRendered?Ve(this,s,50)():(s(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},Oo="paginationPageSizeSelector",K4={tag:"span",cls:"ag-paging-page-size"},q4=class extends Re{constructor(){super(K4),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(Oo,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){Xe(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(Oo)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),s=!t||!e.includes(t);if(s){const i=this.gos.exists("paginationPageSize"),n=this.gos.get(Oo)!==!0;H(94,{pageSizeSet:i,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||H(95,{paginationPageSizeOption:t,paginationPageSizeSelector:Oo}),e.unshift("")}const o=String(s?"":t);this.selectPageSizeComp?(gs(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=s}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const s=this.getLocaleTextFunc(),o=s("pageSizeSelectorLabel","Page Size:"),i=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new dl).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(i).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(Oo);return!Array.isArray(t)||!t?.length?e:[...t].sort((s,o)=>s-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},Y4={selector:"AG-PAGE-SIZE-SELECTOR",component:q4},Z4=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",Q4=class extends _y{constructor(){super(),this.btFirst=q,this.btPrevious=q,this.btNext=q,this.btLast=q,this.lbRecordCount=q,this.lbFirstRowOnPage=q,this.lbLastRowOnPage=q,this.lbCurrent=q,this.lbTotal=q,this.pageSizeComp=q,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(Z4)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[Y4]);const{btFirst:t,btPrevious:s,btNext:o,btLast:i}=this;this.activateTabIndex([t,s,o,i]),t.insertAdjacentElement("afterbegin",ht(e?"last":"first",this.beans)),s.insertAdjacentElement("afterbegin",ht(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",ht(e?"previous":"next",this.beans)),i.insertAdjacentElement("afterbegin",ht(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):ay(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:s}=e;this.addManagedListeners(t,{click:s,keydown:o=>{(o.key===E.ENTER||o.key===E.SPACE)&&(o.preventDefault(),s())}})}ry(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):I3(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),s=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=this.isZeroPagesToDisplay(),i=e===s-1;this.nextButtonDisabled=i||o,this.lastButtonDisabled=!t||o||e===s-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Rw(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),s=this.pagination.getMasterRowCount(),o=e?s:null,i=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*i+1,a=r+n-1,e&&a>o&&(a=o));const l=r+n-1,c=!e&&s<l,d=this.formatNumber(r);this.lbFirstRowOnPage.textContent=d;let u;const h=this.getLocaleTextFunc();c?u=h("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const f=t>0?i+1:0,m=this.formatNumber(f);this.lbCurrent.textContent=m;let v,w;if(e)v=this.formatNumber(t),w=this.formatNumber(o);else{const b=h("more","more");v=b,w=b}this.lbTotal.textContent=v,this.lbRecordCount.textContent=w,this.announceAriaStatus(d,u,w,m,v)}announceAriaStatus(e,t,s,o,i){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),c=`${e} ${a} ${t} ${l} ${s}`,d=`${r} ${o} ${l} ${i}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnounce?.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnounce?.announceValue(d,"paginationPage"))}},X4={selector:"AG-PAGINATION",component:Q4},J4=class extends T{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return X4}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:s}=this.beans;s?.isEditing()&&(s.isBatchEditing()?s.cleanupEditors():s.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return V(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:V(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:V(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:V(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const s=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}s!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const s=this.pageSize,o=t-1;this.totalPages=Math.floor(o/s)+1,this.adjustCurrentPageIfInvalid();const i=this.currentPage,n=s*i;let r=s*(i+1)-1;if(r>o&&(r=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:s}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*s,this.bottomDisplayedRowIndex=t*(s+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:s=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:s,newPageSize:o,keepRenderedRows:t})}},eT={moduleName:"Pagination",version:G,beans:[J4,$4],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:H4,paginationGetPageSize:N4,paginationGetCurrentPage:G4,paginationGetTotalPages:V4,paginationGetRowCount:B4,paginationGoToNextPage:z4,paginationGoToPreviousPage:W4,paginationGoToFirstPage:_4,paginationGoToLastPage:U4,paginationGoToPage:j4},dependsOn:[$n]};function tT(e,t={}){const s=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(s))}function kp(e,t,s,o,i){t&&(o&&t.parent&&t.parent.level!==-1&&kp(e,t.parent,s,o,i),t.setExpanded(s,void 0,i))}function sT(e,t){return e.rowModel.getRowNode(t)}function oT(e,t,s,o){e.rowRenderer.addRenderedRowListener(t,s,o)}function iT(e){return e.rowRenderer.getRenderedNodes()}function nT(e,t,s){e.rowModel.forEachNode(t,s)}function rT(e){return e.rowRenderer.firstRenderedRow}function aT(e){return e.rowRenderer.lastRenderedRow}function lT(e,t){return e.rowModel.getRow(t)}function cT(e){return e.rowModel.getRowCount()}var dT={moduleName:"RowApi",version:G,apiFunctions:{redrawRows:tT,setRowNodeExpanded:kp,getRowNode:sT,addRenderedRowListener:oT,getRenderedNodes:iT,forEachNode:nT,getFirstDisplayedRowIndex:rT,getLastDisplayedRowIndex:aT,getDisplayedRowAtIndex:lT,getDisplayedRowCount:cT}},uT={moduleName:"ScrollApi",version:G,apiFunctions:{getVerticalPixelRange:RP,getHorizontalPixelRange:xP,ensureColumnVisible:vp,ensureIndexVisible:wp,ensureNodeVisible:FP}};function hT(e,t,s){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,i=`aria-${t}`;s===null?o.removeAttribute(i):o.setAttribute(i,s)}function gT(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function pT(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function fT(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function mT(e){e.animationFrameSvc?.flushAllFrames()}function CT(e){return{rowHeight:Ds(e),headerHeight:bi(e)}}function vT(e,t={}){const s=[];for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=n.getCellRenderer();r!=null&&s.push(ci(r))}if(t.columns?.length)return s;const o=[],i=ya(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(i&&!Ra(n.rowNode,i)||!n.isFullWidth())continue;const r=n.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];l!=null&&o.push(ci(l))}}return[...o,...s]}var wT={moduleName:"RenderApi",version:G,apiFunctions:{setGridAriaProperty:hT,refreshCells:gT,refreshHeader:pT,isAnimationFrameQueueEmpty:fT,flushAllAnimationFrames:mT,getSizesForCurrentTheme:CT,getCellRendererInstances:vT}};function bT(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function Ap({colAutosize:e,visibleCols:t},s,o){Array.isArray(s)?e?.autoSizeCols({colKeys:s,skipHeader:o,source:"api"}):e?.autoSizeCols({...s,colKeys:s.colIds??t.allCols,source:"api"})}function ST(e,t){t&&typeof t=="object"?Ap(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var yT=class extends T{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let s=!1;const o=t.type;if(o==="fitGridWidth"||o==="fitProvidedWidth")s=!0;else if(o==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const i=e.get("rowData");s=i!=null&&i.length>0&&Fe(e)}s&&this.beans.colDelayRenderSvc?.hideColumns(o)}}autoSizeCols(e){const{eventSvc:t,visibleCols:s}=this.beans;this.innerAutoSizeCols(e).then(o=>{const i=c=>vo(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return i(o);const n=Pd(this.beans),r=c=>s.leftCols.some(d=>$o(d,c)),a=c=>s.rightCols.some(d=>$o(d,c)),l=e.colKeys.filter(c=>!Yt(c)&&!zt(c)&&!r(c)&&!a(c));this.sizeColumnsToFit(n,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),i(o)})}innerAutoSizeCols(e){return new Promise((t,s)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,s));const{colKeys:o,skipHeader:i,skipHeaderGroups:n,stopAtGroup:r,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:c=[],source:d="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:g,autoWidthCalc:f,visibleCols:m}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,s)});return}this.timesDelayed=0;const v=new Set;let w=-1;const b=Object.fromEntries(c.map(({colId:y,...x})=>[y,x])),S=i??this.gos.get("skipHeaderOnAutoSize"),R=n??S;for(;w!==0;){w=0;const y=[];for(const x of o){if(!x||O1(x))continue;const D=g.getCol(x);if(!D||v.has(D))continue;const M=f.getPreferredWidthForColumn(D,S);if(M>0){const L=b[D.colId]??{};L.minWidth??(L.minWidth=l),L.maxWidth??(L.maxWidth=a);const I=RT(D,M,L);D.setActualWidth(I,d),v.add(D),w++}y.push(D)}y.length&&m.refresh(d)}R||this.autoSizeColumnGroupsByColumns(o,d,r),t(v)})}autoSizeColumn(e,t,s){this.autoSizeCols({colKeys:[e],skipHeader:s,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,s){const{colModel:o,ctrlsSvc:i}=this.beans,n=new Set,r=o.getColsForKeys(e);for(const l of r){let c=l.getParent();for(;c&&c!=s;)c.isPadding()||n.add(c),c=c.getParent()}let a;for(const l of n){for(const c of i.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(l),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const s=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",s)};e.addEventListener("dblclick",o);const i=new ws(e);return i.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),i.destroy()}}addColumnGroupResize(e,t,s){const o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{const n=[],r=t.getDisplayedLeafColumns();for(const a of r)a.getColDef().suppressAutoSize||n.push(a.getColId());n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),s()};return e.addEventListener("dblclick",i),()=>e.removeEventListener("dblclick",i)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const s=Pd(this.beans);if(s>0){this.sizeColumnsToFit(s,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):H(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",s,o){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,s,o));return}const i={};for(const{key:f,...m}of o?.columnLimits??[])i[typeof f=="string"?f:f.getColId()]=m;const n=this.beans.visibleCols.allCols;if(e<=0||!n.length)return;const r=Ht(n);if(o?.onlyScaleUp&&r>e||e===r&&n.every(m=>{if(m.colDef.suppressSizeToFit)return!0;const v=i?.[m.getId()],w=v?.minWidth??o?.defaultMinWidth,b=v?.maxWidth??o?.defaultMaxWidth,S=m.getActualWidth();return(w==null||S>=w)&&(b==null||S<=b)}))return;const l=[],c=[];for(const f of n){const m=o?.colKeys?.some(v=>$o(f,v))??!0;f.getColDef().suppressSizeToFit||!m?c.push(f):l.push(f)}const d=l.slice(0);let u=!1;const h=f=>{Ct(l,f),c.push(f)};for(const f of l){f.resetActualWidth(t);const m=i?.[f.getId()],v=m?.minWidth??o?.defaultMinWidth,w=m?.maxWidth??o?.defaultMaxWidth,b=f.getActualWidth();typeof v=="number"&&b<v?f.setActualWidth(v,t,!0):typeof w=="number"&&b>w&&f.setActualWidth(w,t,!0)}for(;!u;){u=!0;const f=e-Ht(c);if(f<=0)for(const m of l){const v=i?.[m.getId()]?.minWidth??o?.defaultMinWidth??m.minWidth;m.setActualWidth(v,t,!0)}else{const m=f/Ht(l);let v=f;for(let w=l.length-1;w>=0;w--){const b=l[w],S=i?.[b.getId()],R=S?.minWidth??o?.defaultMinWidth,y=S?.maxWidth??o?.defaultMaxWidth,x=b.getMinWidth(),D=b.getMaxWidth(),M=typeof R=="number"&&R>x?R:x,L=typeof y=="number"&&y<D?y:D;let I=Math.round(b.getActualWidth()*m);I<M?(I=M,h(b),u=!1):I>L?(I=L,h(b),u=!1):w===0&&(I=v),b.setActualWidth(I,t,!0),v-=I}}}for(const f of d)f.fireColumnWidthChangedEvent(t);const g=this.beans.visibleCols;g.setLeftValues(t),g.updateBodyWidths(),!s&&vo(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,s=e.get("autoSizeStrategy");s?.type!=="fitGridWidth"&&s?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=s.type;if(o==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:n,defaultMaxWidth:r}=s,a=i?.map(({colId:l,minWidth:c,maxWidth:d})=>({key:l,minWidth:c,maxWidth:d}));this.sizeColumnsToFitGridBody({defaultMinWidth:n,defaultMaxWidth:r,columnLimits:a})}else o==="fitProvidedWidth"&&this.sizeColumnsToFit(s.width,"sizeColumnsToFit");t?.revealColumns(o)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const s="autosizeColumns";e?this.autoSizeCols({...t,source:s,colKeys:e}):this.autoSizeAllColumns({...t,source:s}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function RT(e,t,s={}){const o=s.minWidth??e.getMinWidth();t<o&&(t=o);const i=s.maxWidth??e.getMaxWidth();return t>i&&(t=i),t}function Pd({ctrlsSvc:e,scrollVisibleSvc:t}){const s=e.getGridBodyCtrl(),i=s.isVerticalScrollShowing()?t.getScrollbarWidth():0;return ni(s.eGridBody)-i}var xT={moduleName:"ColumnAutoSize",version:G,beans:[yT],apiFunctions:{sizeColumnsToFit:bT,autoSizeColumns:Ap,autoSizeAllColumns:ST},dependsOn:[Dg]},FT=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function ET(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function DT(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function PT(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function TT(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function MT(e,t,s){return e.pinnedRowModel?.forEachPinnedRow(t,s)}var IT={moduleName:"PinnedRow",version:G,beans:[Hy],css:[FT],apiFunctions:{getPinnedTopRowCount:ET,getPinnedBottomRowCount:DT,getPinnedTopRow:PT,getPinnedBottomRow:TT,forEachPinnedRow:MT},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},kT=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(const s of this.spannedNodes)s!==this.lastNode&&(t+=s.rowHeight);return e-t}},AT=class extends T{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:s,pinnedRowModel:o,rowModel:i,valueSvc:n,pagination:r}}=this,{colDef:a}=t,l=this.getNodeMap(e),c=new Map,d=s.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,g=typeof h=="function";let f=null,m=null,v;const w=(S,R)=>{f=S,m=null,v=R},b=S=>{const R=!S.isExpandable()&&!S.group&&!S.detail&&(d?!d({rowNode:S}):!0);if(S.rowIndex==null||!R){w(null,null);return}if(f==null||S.level!==f.level||S.footer||m&&S.rowIndex-1!==m?.getLastNode().rowIndex){w(S,n.getValue(t,S));return}const y=n.getValue(t,S);if(g){const x=Y(s,{valueA:v,nodeA:f,valueB:y,nodeB:S,column:t,colDef:a});if(!h(x)){w(S,y);return}}else if(u?!u(v,y):v!==y){w(S,y);return}if(!m){const x=l?.get(f);x?.firstNode===f?(x.reset(),m=x):m=new kT(t,f),c.set(f,m)}m.addSpannedNode(S),c.set(S,m)};switch(e){case"center":i.forEachDisplayedNode?.(S=>{(!r||r.isRowInPage(S.rowIndex))&&b(S)}),this.centerValueNodeMap=c;break;case"top":o?.forEachPinnedRow("top",b),this.topValueNodeMap=c;break;case"bottom":o?.forEachPinnedRow("bottom",b),this.bottomValueNodeMap=c;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},LT=class extends T{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Ve(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Ve(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const s=this.createManagedBean(new AT(e));this.spanningColumns.set(e,s),s.buildCache("top"),s.buildCache("bottom"),s.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const s=this.spanningColumns.get(e);return s?s.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:s}=this.beans,o=e.column,i=e.rowIndex,n=this.spanningColumns.get(o);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(i);break;case"bottom":r=t?.getPinnedBottomRow(i);break;default:r=s.getRow(i)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const s=this.spanningColumns.get(e);if(s)return s.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[s,o]of this.spanningColumns)if(o.isCellSpanning(e)){const i=o.getCellSpan(e);t(s,i)}}destroy(){super.destroy(),this.spanningColumns.clear()}},OT=class extends po{constructor(e,t,s){super(e.col,e.firstNode,s,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,s,o,i,n,r){this.eWrapper=s,super.setComp(e,t,s,o,i,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Lu(e,t.rowIndex)}setAriaRowSpan(){Dw(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(_n(t)){this.focusedCellPosition=void 0;return}const s=this.isCellFocused();s||(this.focusedCellPosition=void 0),e&&s&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},HT=class extends yn{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new OT(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},NT=class extends T{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,s=this.getCtrlsMap(e),o=s.size,i=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const l of i)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(c,d)=>{if(n.has(d.firstNode))return;const u=s.get(d.firstNode);if(u){n.set(d.firstNode,u),s.delete(d.firstNode);return}r=!0;const h=new HT(d.firstNode,this.beans,!1,!1,!1);n.set(d.firstNode,h)});this.setCtrlsMap(e,n);const a=n.size===o;if(!(!r&&a)){for(const l of s.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,s=t?.getCellSpanByPosition(e);if(!s)return;const o=this.getCtrlsMap(e.rowPinned).get(s.firstNode);if(o)return o.getAllCellCtrls().find(i=>i.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},GT={moduleName:"CellSpan",version:G,beans:[LT,NT]},VT=class extends T{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,s=e.colDef,o=s.cellClassRules,i=this.getCellClassParams(e,s);Pl(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,i,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,s=t.cellStyle;if(!s)return;let o;if(typeof s=="function"){const i=this.getCellClassParams(e,t);o=s(i)}else o=s;o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,s=e.colDef,o=this.getCellClassParams(e,s);for(const n of this.staticClasses)t.toggleCss(n,!1);const i=this.beans.cellStyles.getStaticCellClasses(s,o);this.staticClasses=i;for(const n of i)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:s,rowNode:o}=this.cellCtrl;return Y(this.beans.gos,{value:s,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},BT=class extends T{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,s,o){Pl(this.beans.expressionSvc,void 0,e.cellClassRules,t,s,o),this.processStaticCellClasses(e,t,s)}getStaticCellClasses(e,t){const{cellClass:s}=e;if(!s)return[];let o;return typeof s=="function"?o=s(t):o=s,typeof o=="string"&&(o=[o]),o||[]}createCellCustomStyleFeature(e,t){return new VT(e,t)}processStaticCellClasses(e,t,s){this.getStaticCellClasses(e,t).forEach(i=>{s(i)})}},zT={moduleName:"CellStyle",version:G,beans:[BT]},WT={moduleName:"RowStyle",version:G,beans:[DE]};function _T(e,t){return!!e.colHover?.isHovered(t)}var UT=class extends T{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=s=>{const{beans:o,gos:i,element:n,columns:r}=this,a=o.colHover;if(s??!!i.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)});else{for(const c of this.destroyManagedListeners)c();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},jT="ag-column-hover",$T=class extends T{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,s){const o=()=>{const i=this.isHovered(s);t.toggleCss("ag-column-hover",i)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const s=this.isHovered(e);t.toggleCss(jT,s)}addHeaderFilterColumnHoverListener(e,t,s,o){this.createHoverFeature(e,[s],o);const i=()=>{const n=this.isHovered(s);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:i}),i()}createHoverFeature(e,t,s){e.createManagedBean(new UT(t,s))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},KT={moduleName:"ColumnHover",version:G,beans:[$T],apiFunctions:{isColumnHovered:_T}},qT=class extends T{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const s=this.wrapSvc?.wrap(e,t)??t,o=!Zi.has(e),i=o?this.asyncListeners:this.syncListeners;i.has(e)||i.set(e,new Set),i.get(e).add(s),this.eventSvc.addListener(e,s,o)}removeListener(e,t){const s=this.wrapSvc?.unwrap(e,t)??t,i=!!this.asyncListeners.get(e)?.delete(s);i||this.syncListeners.get(e)?.delete(s),this.eventSvc.removeListener(e,s,i)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,s=(n,r)=>{Zi.has(n)&&t(n,r)},o=(n,r)=>{Zi.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:s,asyncListener:o});const i=this.eventSvc;i.addGlobalListener(s,!1),i.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:s,globalListenerPairs:o}=this,i=s?.unwrapGlobal(e)??e;if(o.has(i)){const{syncListener:r,asyncListener:a}=o.get(i);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),o.delete(e)}else this.syncGlobalListeners.delete(i),t.removeGlobalListener(i,!1)}destroyEventListeners(e,t){e.forEach((s,o)=>{s.forEach(i=>this.eventSvc.removeListener(o,i,t)),s.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const s of e)this.eventSvc.removeGlobalListener(s,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:s,asyncListener:o})=>{t.removeGlobalListener(s,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function YT(e,t,s){e.apiEventSvc?.addListener(t,s)}function ZT(e,t,s){e.apiEventSvc?.removeListener(t,s)}function QT(e,t){e.apiEventSvc?.addGlobalListener(t)}function XT(e,t){e.apiEventSvc?.removeGlobalListener(t)}var JT={moduleName:"EventApi",version:G,apiFunctions:{addEventListener:YT,addGlobalListener:QT,removeEventListener:ZT,removeGlobalListener:XT},beans:[qT]},eM={moduleName:"Locale",version:G,beans:[D3]},tM=class extends T{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Ve(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:s,pinnedRowModel:o}=this.beans,i=e.autoHeightCols;let n=!1;const r=a=>{const l=a.__autoHeights;let c=ls(this.beans,a).height;for(const d of i){let u=l?.[d.getColId()];const h=s?.getCellSpan(d,a);if(h){if(h.getLastNode()!==a)continue;if(u=s?.getCellSpan(d,a)?.getLastNodeAutoHeight(),!u)return}if(u==null){if(this.colSpanSkipCell(d,a))continue;return}c=Math.max(u,c)}c!==a.rowHeight&&(a.setRowHeight(c),n=!0)};o?.forEachPinnedRow?.("top",r),o?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,s){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[s.getId()];return}const o=e.__autoHeights[s.getId()];e.__autoHeights[s.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:s,colViewport:o,visibleCols:i}=this.beans;if(!s.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=i.getLeftColsForRow(t);break;case"right":n=i.getRightColsForRow(t);break;case null:n=o.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,s){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:i,column:n}=e,r=this.beans,a=d=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!s.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:f}=Bs(o),m=u+h+g+f,w=t.offsetHeight+m;if(d<5){const S=!Le(r)?.contains(t),R=w==0;if(S||R){window.setTimeout(()=>a(d+1),0);return}}this.setRowAutoHeight(i,w,n)},l=()=>a(0);l();const c=Kt(r,t,l);return s.addDestroyFunc(()=>{c(),this.setRowAutoHeight(i,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:s}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(s).filter(i=>i.isAutoHeight())),t.length!==0){if(!s.__autoHeights)return!1;for(const o of t){const i=s.__autoHeights[o.getColId()];if(!i||s.rowHeight<i)return!1}}return!0}},sM={moduleName:"RowAutoHeight",version:G,beans:[tM]},oM={moduleName:"AllCommunity",version:G,dependsOn:[t4,c4,w4,$3,s5,o5,i5,n5,r5,a5,l5,t5,qD,YD,ZD,KD,XD,JD,O4,A5,eT,Pg,dT,uT,wT,xT,LR,IT,R5,c3,zT,KT,WT,JT,h3,T4,Cp,eM,sM,AR,s4,GT]},Ue=p.createContext({}),Lp=p.createContext("default"),yi=(e,t,s,o)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const n=e.newAgStackInstance();let r,a,l=!1;return n.then(c=>{if(l){t.destroyBean(c);return}r=c,a=r.getGui(),s.appendChild(a),Td(o,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),o&&Td(o,void 0))}},Td=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const s=e;s.current=t}},ct=(...e)=>e.filter(s=>s!=null&&s!=="").join(" "),gt=class Op{constructor(...t){this.classesMap={};for(const s of t)this.classesMap[s]=!0}setClass(t,s){if(!!this.classesMap[t]==s)return this;const i=new Op;return i.classesMap={...this.classesMap},i.classesMap[t]=s,i}toString(){return Object.keys(this.classesMap).filter(s=>this.classesMap[s]).join(" ")}},Po=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,s=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===s()},Pa=p.version?.split(".")[0],Hp=Pa==="16"||Pa==="17";function iM(){return Pa==="19"}var Xi=!1;function nM(e){return Xi||setTimeout(()=>Xi=!1,0),Xi=!0,e()}var pi=(e,t)=>{!Hp&&e&&!Xi?Dn.flushSync(t):t()},rM=e=>{Hp?e():p.startTransition(e)};function aM(e,t,s){return p.useSyncExternalStore?p.useSyncExternalStore(e,t):s}function Fn(e,t,s){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(s||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const o=[],i=[],n=new Map,r=new Map;for(let a=0;a<t.length;a++){const l=t[a];r.set(l.instanceId,l)}for(let a=0;a<e.length;a++){const l=e[a];n.set(l.instanceId,l),r.has(l.instanceId)&&o.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;n.has(c)||i.push(l)}return o.length===e.length&&i.length===0?e:o.length===0&&i.length===t.length?t:o.length===0?i:i.length===0?o:[...o,...i]}var Np=p.forwardRef((e,t)=>{const{registry:s,context:o}=p.useContext(Ue),i=p.useRef(null),n=p.useRef(null),r=p.useRef(null),a=p.useRef(null),l=p.useRef(null),c=p.useRef(),[d,u]=p.useState(),[h,g]=p.useState(),[f,m]=p.useState(),[v,w]=p.useState(()=>new gt),[b,S]=p.useState(()=>new gt("ag-hidden")),[R,y]=p.useState(()=>new gt("ag-hidden")),[x,D]=p.useState(()=>new gt("ag-invisible"));p.useImperativeHandle(t,()=>({refresh(){return!1}})),p.useLayoutEffect(()=>yi(d,o,n.current),[d]);const M=p.useCallback(z=>{if(i.current=z,!z||o.isDestroyed()){c.current=o.destroyBean(c.current);return}const k={setInnerRenderer:(N,X)=>{u(N),m(X)},setChildCount:N=>g(N),toggleCss:(N,X)=>w($=>$.setClass(N,X)),setContractedDisplayed:N=>y(X=>X.setClass("ag-hidden",!N)),setExpandedDisplayed:N=>S(X=>X.setClass("ag-hidden",!N)),setCheckboxVisible:N=>D(X=>X.setClass("ag-invisible",!N)),setCheckboxSpacing:N=>D(X=>X.setClass("ag-group-checkbox-spacing",N))},Z=s.createDynamicBean("groupCellRendererCtrl",!0);Z&&(c.current=o.createBean(Z),c.current.init(k,z,r.current,a.current,l.current,Np,e))},[]),L=p.useMemo(()=>`ag-cell-wrapper ${v.toString()}`,[v]),I=p.useMemo(()=>`ag-group-expanded ${b.toString()}`,[b]),F=p.useMemo(()=>`ag-group-contracted ${R.toString()}`,[R]),P=p.useMemo(()=>`ag-group-checkbox ${x.toString()}`,[x]),B=d?.componentFromFramework,Q=B?d.componentClass:void 0,A=d==null&&f!=null,te=Fo(f);return p.createElement("span",{className:L,ref:M,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},p.createElement("span",{className:I,ref:a}),p.createElement("span",{className:F,ref:l}),p.createElement("span",{className:P,ref:r}),p.createElement("span",{className:"ag-group-value",ref:n},A?te:B?p.createElement(Q,{...d.params}):null),p.createElement("span",{className:"ag-group-child-count"},h))}),Md=Np,Hl=p.createContext({setMethods:()=>{}}),lM=e=>{const{initialProps:t,addUpdateCallback:s,CustomComponentClass:o,setMethods:i}=e,[{key:n,...r},a]=p.useState(t);return p.useEffect(()=>{s(l=>a(l))},[]),p.createElement(Hl.Provider,{value:{setMethods:i}},p.createElement(o,{key:n,...r}))},cM=p.memo(lM),dM=0;function Id(){return`agPortalKey_${++dM}`}var Gp=class{constructor(e,t,s,o){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=s,this.suppressFallbackMethods=!!o,this.statelessComponent=this.isStateless(this.reactComponent),this.key=Id(),this.portalKey=Id(),this.instanceCreated=this.isStatelessComponent()?de.resolve(!1):new de(i=>{this.resolveInstanceCreated=i})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy();const e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),s=document.createElement(t||"div");return s.classList.add("ag-react-container"),e.reactContainer=s,s}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return typeof Symbol=="function"&&Symbol.for}isStateless(e){return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){const s=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!s){setTimeout(()=>this.callMethod(e,t));return}const o=s[e];if(o)return o.apply(s,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new de(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{this.componentInstance=t,this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=Dn.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return p.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const s=this[`${e}Component`];if(!this.suppressFallbackMethods&&s)return s.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function Yn(e,t,s){for(const o of e){const i=t[o];i&&(s[o]=i)}}var nt=class extends Gp{constructor(){super(...arguments),this.awaitUpdateCallback=new de(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=cM}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:s=>this.setMethods(s),addUpdateCallback:s=>{this.updateCallback=()=>(s(this.getProps()),new de(o=>{setTimeout(()=>{o()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,Yn(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new de(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},uM=class extends nt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},hM=class extends nt{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},gM=class extends nt{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){const e=super.getProps(),{label:t,icon:s,shake:o}=this;return e.label=t,e.icon=s,e.shake=o,e}},pM=class extends nt{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterModifiedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1,this.awaitSetMethodsCallback=new de(e=>{this.resolveSetMethodsCallback=e})}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||(this.hasBeenActive=this.isFilterActive()),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}setMethods(e){this.expectingNewMethods===!1&&this.hasBeenActive&&this.providedMethods?.doesFilterPass!==e?.doesFilterPass&&setTimeout(()=>{this.sourceParams.filterChangedCallback()}),this.expectingNewMethods=!1,super.setMethods(e),this.resolveSetMethodsCallback(),this.resolveFilterPassCallback?.(),this.resolveFilterPassCallback=void 0}updateModel(e){this.resolveFilterPassCallback?.();const t=new de(s=>{this.resolveFilterPassCallback=s});this.setModel(e).then(()=>{t.then(()=>{this.sourceParams.filterChangedCallback()})})}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,e}},fM=class extends nt{constructor(){super(...arguments),this.awaitSetMethodsCallback=new de(e=>{this.resolveSetMethodsCallback=e})}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","onAnyFilterChanged"]}setMethods(e){super.setMethods(e),this.resolveSetMethodsCallback()}};function Vp(e,t){e.parentFilterInstance(s=>{(s.setModel(t)||de.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var mM=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=s=>this.updateModel(s)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Yn(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),Vp(this.floatingFilterParams,e)}},CM=class extends nt{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),Vp(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},vM=class extends nt{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},wM=class extends nt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},bM=class extends nt{refresh(e){this.sourceParams=e,this.refreshProps()}},SM=class extends nt{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},yM=class extends nt{refresh(e){this.sourceParams=e,this.refreshProps()}},RM=class extends nt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},xM=class extends nt{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function Nl(){H(231)}var FM=1e3,EM=class{constructor(e,t,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=s||FM}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,s){this.portals=[...this.portals,e],this.waitForInstance(t,s),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,s=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-s>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){pi(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,s)})}}},DM=({ctrl:e})=>{const t=e.isAlive(),{context:s}=p.useContext(Ue),[o,i]=p.useState(),[n,r]=p.useState(),a=p.useRef(),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(),h=p.useRef();t&&!h.current&&(h.current=new Ci(()=>l.current));const g=p.useCallback(w=>{if(l.current=w,!w||!e.isAlive()||s.isDestroyed()){a.current=s.destroyBean(a.current);return}a.current=s.createBean(new Eo);const b=()=>{const R=e.getSelectAllGui();R&&(c.current?.insertAdjacentElement("afterend",R),a.current.addDestroyFunc(()=>R.remove()))},S={setWidth:R=>{l.current&&(l.current.style.width=R)},toggleCss:(R,y)=>h.current.toggleCss(R,y),setUserStyles:R=>r(R),setAriaSort:R=>{l.current&&(R?Mw(l.current,R):Iw(l.current))},setUserCompDetails:R=>i(R),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:b,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(S,w,c.current,d.current,a.current),b()},[]);p.useLayoutEffect(()=>yi(o,s,d.current,u),[o]),p.useEffect(()=>{e.setDragSource(l.current)},[o]);const f=p.useMemo(()=>!!(o?.componentFromFramework&&Po(o.componentClass)),[o]),m=o?.componentFromFramework,v=o?.componentClass;return p.createElement("div",{ref:g,style:n,className:"ag-header-cell",role:"columnheader"},p.createElement("div",{ref:c,className:"ag-header-cell-resize",role:"presentation"}),p.createElement("div",{ref:d,className:"ag-header-cell-comp-wrapper",role:"presentation"},m?f?p.createElement(v,{...o.params}):p.createElement(v,{...o.params,ref:u}):null))},PM=p.memo(DM),TM=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Yn(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},MM=({ctrl:e})=>{const{context:t,gos:s}=p.useContext(Ue),[o,i]=p.useState(),[n,r]=p.useState(()=>new gt("ag-header-cell","ag-floating-filter")),[a,l]=p.useState(()=>new gt),[c,d]=p.useState(()=>new gt("ag-floating-filter-button","ag-hidden")),[u,h]=p.useState("false"),[g,f]=p.useState(),[,m]=p.useState(1),v=p.useRef(),w=p.useRef(null),b=p.useRef(null),S=p.useRef(null),R=p.useRef(null),y=p.useRef(),x=p.useRef(),D=N=>{N!=null&&y.current&&y.current(N)},M=p.useCallback(N=>{if(w.current=N,!N||!e.isAlive()||t.isDestroyed()){v.current=t.destroyBean(v.current);return}v.current=t.createBean(new Eo),x.current=new de($=>{y.current=$});const X={toggleCss:($,_)=>r(se=>se.setClass($,_)),setUserStyles:$=>i($),addOrRemoveBodyCssClass:($,_)=>l(se=>se.setClass($,_)),setButtonWrapperDisplayed:$=>{d(_=>_.setClass("ag-hidden",!$)),h($?"false":"true")},setWidth:$=>{w.current&&(w.current.style.width=$)},setCompDetails:$=>f($),getFloatingFilterComp:()=>x.current?x.current:null,setMenuIcon:$=>R.current?.appendChild($)};e.setComp(X,N,R.current,b.current,v.current)},[]);p.useLayoutEffect(()=>yi(g,t,b.current,D),[g]);const L=p.useMemo(()=>n.toString(),[n]),I=p.useMemo(()=>a.toString(),[a]),F=p.useMemo(()=>c.toString(),[c]),P=p.useMemo(()=>!!(g&&g.componentFromFramework&&Po(g.componentClass)),[g]),B=p.useMemo(()=>s.get("reactiveCustomComponents"),[]),Q=p.useMemo(()=>s.get("enableFilterHandlers"),[]),[A,te]=p.useState();p.useEffect(()=>{if(g?.componentFromFramework)if(B){const N=Q?TM:mM,X=new N(g.params,()=>m($=>$+1));D(X),te(X)}else Nl()},[g]);const z=A?.getProps(),k=g?.componentFromFramework,Z=g?.componentClass;return p.createElement("div",{ref:M,style:o,className:L,role:"gridcell"},p.createElement("div",{ref:b,className:I,role:"presentation"},k?B?z&&p.createElement(Hl.Provider,{value:{setMethods:N=>A.setMethods(N)}},p.createElement(Z,{...z})):p.createElement(Z,{...g.params,ref:P?()=>{}:D}):null),p.createElement("div",{ref:S,"aria-hidden":u,className:F,role:"presentation"},p.createElement("button",{ref:R,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},IM=p.memo(MM),kM=({ctrl:e})=>{const{context:t}=p.useContext(Ue),[s,o]=p.useState(),[i,n]=p.useState(()=>new gt),[r,a]=p.useState(()=>new gt),[l,c]=p.useState("false"),[d,u]=p.useState(),[h,g]=p.useState(),f=p.useRef(),m=p.useRef(null),v=p.useRef(null),w=p.useRef(null),b=p.useRef(),S=p.useCallback(L=>{if(m.current=L,!L||!e.isAlive()||t.isDestroyed()){f.current=t.destroyBean(f.current);return}f.current=t.createBean(new Eo);const I={setWidth:F=>{m.current&&(m.current.style.width=F)},toggleCss:(F,P)=>n(B=>B.setClass(F,P)),setUserStyles:F=>o(F),setHeaderWrapperHidden:F=>{const P=w.current;P&&(F?P.style.setProperty("display","none"):P.style.removeProperty("display"))},setHeaderWrapperMaxHeight:F=>{const P=w.current;P&&(F!=null?P.style.setProperty("max-height",`${F}px`):P.style.removeProperty("max-height"),P.classList.toggle("ag-header-cell-comp-wrapper-limited-height",F!=null))},setUserCompDetails:F=>g(F),setResizableDisplayed:F=>{a(P=>P.setClass("ag-hidden",!F)),c(F?"false":"true")},setAriaExpanded:F=>u(F),getUserCompInstance:()=>b.current||void 0};e.setComp(I,L,v.current,w.current,f.current)},[]);p.useLayoutEffect(()=>yi(h,t,w.current),[h]),p.useEffect(()=>{m.current&&e.setDragSource(m.current)},[h]);const R=p.useMemo(()=>!!(h?.componentFromFramework&&Po(h.componentClass)),[h]),y=p.useMemo(()=>"ag-header-group-cell "+i.toString(),[i]),x=p.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),D=h?.componentFromFramework,M=h?.componentClass;return p.createElement("div",{ref:S,style:s,className:y,role:"columnheader","aria-expanded":d},p.createElement("div",{ref:w,className:"ag-header-cell-comp-wrapper",role:"presentation"},D?R?p.createElement(M,{...h.params}):p.createElement(M,{...h.params,ref:b}):null),p.createElement("div",{ref:v,"aria-hidden":l,className:x}))},AM=p.memo(kM),LM=({ctrl:e})=>{const{gos:t,context:s}=p.useContext(Ue),{topOffset:o,rowHeight:i}=p.useMemo(()=>e.getTopAndHeight(),[]),n=p.useMemo(()=>t.get("tabIndex"),[]),[r,a]=p.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=p.useState(()=>i+"px"),[u,h]=p.useState(()=>o+"px"),g=p.useRef(null),[f,m]=p.useState(()=>e.getUpdatedHeaderCtrls()),v=p.useRef(),w=p.useRef(null),b=p.useCallback(y=>{if(w.current=y,!y||!e.isAlive()||s.isDestroyed()){v.current=s.destroyBean(v.current);return}v.current=s.createBean(new Eo);const x={setHeight:D=>d(D),setTop:D=>h(D),setHeaderCtrls:(D,M,L)=>{const I=g.current,F=Fn(I,D,M);F!==I&&(g.current=F,pi(L,()=>m(F)))},setWidth:D=>{w.current&&(w.current.style.width=D)},setRowIndex:D=>{a(D)}};e.setComp(x,v.current,!1)},[]),S=p.useMemo(()=>({height:c,top:u}),[c,u]),R=p.useCallback(y=>{switch(e.type){case"group":return p.createElement(AM,{ctrl:y,key:y.instanceId});case"filter":return p.createElement(IM,{ctrl:y,key:y.instanceId});default:return p.createElement(PM,{ctrl:y,key:y.instanceId})}},[]);return p.createElement("div",{ref:b,className:l,role:"row",style:S,tabIndex:n,"aria-rowindex":r},f.map(R))},OM=p.memo(LM),HM=({pinned:e})=>{const[t,s]=p.useState(!0),[o,i]=p.useState([]),{context:n}=p.useContext(Ue),r=p.useRef(null),a=p.useRef(null),l=p.useRef(),c=e==="left",d=e==="right",u=!c&&!d,h=p.useCallback(m=>{if(r.current=m,!m||n.isDestroyed()){l.current=n.destroyBean(l.current);return}l.current=n.createBean(new my(e));const v={setDisplayed:s,setCtrls:w=>i(w),setCenterWidth:w=>{a.current&&(a.current.style.width=w)},setViewportScrollLeft:w=>{r.current&&(r.current.scrollLeft=w)},setPinnedContainerWidth:w=>{r.current&&(r.current.style.width=w,r.current.style.minWidth=w,r.current.style.maxWidth=w)}};l.current.setComp(v,r.current)},[]),g=t?"":"ag-hidden",f=()=>o.map(m=>p.createElement(OM,{ctrl:m,key:m.instanceId}));return c?p.createElement("div",{ref:h,className:"ag-pinned-left-header "+g,"aria-hidden":!t,role:"rowgroup"},f()):d?p.createElement("div",{ref:h,className:"ag-pinned-right-header "+g,"aria-hidden":!t,role:"rowgroup"},f()):u?p.createElement("div",{ref:h,className:"ag-header-viewport "+g,role:"rowgroup",tabIndex:-1},p.createElement("div",{ref:a,className:"ag-header-container",role:"presentation"},f())):null},Or=p.memo(HM),NM=()=>{const[e,t]=p.useState(()=>new gt),[s,o]=p.useState(),{context:i}=p.useContext(Ue),n=p.useRef(null),r=p.useRef(),a=p.useCallback(d=>{if(n.current=d,!d||i.isDestroyed()){r.current=i.destroyBean(r.current);return}r.current=i.createBean(new hy);const u={toggleCss:(h,g)=>t(f=>f.setClass(h,g)),setHeightAndMinHeight:h=>o(h)};r.current.setComp(u,d,d)},[]),l=p.useMemo(()=>"ag-header "+e.toString(),[e]),c=p.useMemo(()=>({height:s,minHeight:s}),[s]);return p.createElement("div",{ref:a,className:l,style:c,role:"presentation"},p.createElement(Or,{pinned:"left"}),p.createElement(Or,{pinned:null}),p.createElement(Or,{pinned:"right"}))},GM=p.memo(NM),VM=(e,t)=>{p.useEffect(()=>{const s=t.current;if(s){const o=s.parentElement;if(o){const i=document.createComment(e);return o.insertBefore(i,s),()=>{i.remove()}}}},[e])},bs=VM,BM=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new de(s=>{this.resolveInstanceCreated=s}),this.onValueChange=s=>this.updateValue(s),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){Yn(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){this.componentInstance=e,this.resolveInstanceCreated?.(),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached","getValidationErrors","getValidationElement"]}updateValue(e){this.value=e,this.refreshProps()}},zM=e=>{const t=p.useRef(e),s=p.useRef(),o=p.useRef(!1),i=p.useRef(!1),[,n]=p.useState(0);o.current&&(i.current=!0),p.useEffect(()=>(o.current||(s.current=t.current(),o.current=!0),n(r=>r+1),()=>{i.current&&s.current?.()}),[])},WM=e=>{const[t,s]=p.useState(),o=p.useContext(Ue),{context:i,popupSvc:n,gos:r,editSvc:a}=o,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return zM(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let g,f;if(!i.isDestroyed()){f=i.createBean(a.createPopupEditorWrapper(u.params));const m=f.getGui();if(e.jsChildComp){const y=e.jsChildComp.getGui();y&&m.appendChild(y)}const{column:v,rowNode:w}=c,b={column:v,rowNode:w,type:"popupCellEditor",eventSource:d,ePopup:m,position:l.popupPosition,keepWithinBounds:!0},S=n?.positionPopupByComponent.bind(n,b),R=n?.addPopup({modal:h,eChild:m,closeOnEsc:!0,closedCallback:()=>{c.onPopupEditorClosed()},anchorToElement:d,positionCallback:S,ariaOwns:d});g=R?R.hideFunc:void 0,s(f),e.jsChildComp?.afterGuiAttached?.()}return()=>{g?.(),i.destroyBean(f)}}),p.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(ye(o))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?Dn.createPortal(e.wrappedContent,t.getGui()):null},kd=p.memo(WM),_M=(e,t,s)=>{const{compProxy:o}=e;s(o);const i=o.getProps(),n=Po(t);return p.createElement(Hl.Provider,{value:{setMethods:r=>o.setMethods(r)}},n?p.createElement(t,{...i}):p.createElement(t,{...i,ref:r=>o.setRef(r)}))},Ad=(e,t,s)=>e.compProxy?_M(e,t,s):p.createElement(t,{...e.compDetails.params,ref:s}),UM=(e,t,s,o,i)=>{const n=e.compDetails,r=n.componentClass,a=n.componentFromFramework&&!e.popup,l=n.componentFromFramework&&e.popup,c=!n.componentFromFramework&&e.popup;return a?Ad(e,r,t):l?p.createElement(kd,{editDetails:e,cellCtrl:o,eParentCell:s,wrappedContent:Ad(e,r,t)}):c&&i?p.createElement(kd,{editDetails:e,cellCtrl:o,eParentCell:s,jsChildComp:i}):null},jM=(e,t,s,o,i,n)=>{const{context:r}=p.useContext(Ue),a=p.useCallback(()=>{const l=i.current;if(!l)return;const c=l.getGui();c&&c.parentElement&&c.remove(),r.destroyBean(l),i.current=void 0},[]);p.useEffect(()=>{const l=e!=null,c=e?.compDetails&&!e.compDetails.componentFromFramework,d=t&&s==null;if(!(l&&c&&!d)){a();return}const h=e.compDetails;if(i.current){const f=i.current,v=f.refresh!=null&&e.force==!1?f.refresh(h.params):!1;if(v===!0||v===void 0)return;a()}h.newAgStackInstance().then(f=>{if(!f)return;const m=f.getGui();if(!m)return;(t?s:n.current).appendChild(m),i.current=f})},[e,t,o]),p.useEffect(()=>a,[])},Bp=jM,$M=({cellCtrl:e,parent:t})=>{const s=p.useRef(),o=p.useMemo(()=>{const{loadingComp:i}=e.getDeferLoadingCellRenderer();return i?{value:void 0,compDetails:i,force:!1}:void 0},[e]);if(Bp(o,!1,void 0,1,s,t),o?.compDetails?.componentFromFramework){const i=o.compDetails.componentClass;return p.createElement(i,{...o.compDetails.params})}return p.createElement(p.Fragment,null)},KM=({cellCtrl:e,printLayout:t,editingCell:s})=>{const o=p.useContext(Ue),{context:i}=o,{column:{colIdSanitised:n},instanceId:r}=e,a=p.useRef(),[l,c]=p.useState(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[d,u]=p.useState(),[h,g]=p.useState(1),[f,m]=p.useState(),[v,w]=p.useState(!1),[b,S]=p.useState(!1),[R,y]=p.useState(!1),[x,D]=p.useState(),M=p.useMemo(()=>e.isForceWrapper(),[e]),L=p.useMemo(()=>e.getCellAriaRole(),[e]),I=p.useRef(null),F=p.useRef(null),P=p.useRef(null),B=p.useRef(),Q=p.useRef(),A=p.useRef(),te=p.useRef([]),z=p.useRef(),k=p.useRef(),[Z,N]=p.useState(0),X=p.useCallback(re=>{k.current=re,N(me=>me+1)},[]),$=l!=null&&(v||R||b)&&(d==null||!!d.popup),_=M||$,se=p.useMemo(()=>e.getCellValueClass(),[e]),O=p.useCallback(re=>{if(Q.current=re,re){const me=re.isCancelBeforeStart&&re.isCancelBeforeStart();setTimeout(()=>{me?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(re))})}},[e]),ee=p.useRef();ee.current||(ee.current=new Ci(()=>I.current)),Bp(l,_,k.current,Z,B,I);const ce=p.useRef();p.useLayoutEffect(()=>{const re=ce.current,me=l;if(ce.current=l,re==null||re.compDetails==null||me==null||me.compDetails==null)return;z.current?.refreshVisibility();const He=re.compDetails,ze=me.compDetails;if(He.componentClass!=ze.componentClass||P.current?.refresh==null)return;P.current.refresh(ze.params)!=!0&&g(ge=>ge+1)},[l]),p.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||i.isDestroyed())return;const me=d.compDetails,He=d.popup===!0,ze=me.newAgStackInstance();return ze.then(ne=>{if(!ne)return;const ge=ne.getGui();O(ne),He||((M?A:I).current?.appendChild(ge),ne.afterGuiAttached?.()),D(ne)}),()=>{ze.then(ne=>{const ge=ne.getGui();e.disableEditorTooltipFeature(),i.destroyBean(ne),O(void 0),D(void 0),ge?.remove()})}},[d]);const Oe=p.useCallback(re=>{if(A.current=re,!re||i.isDestroyed()||!e.isAlive()){const ze=te.current;te.current=[];for(const ne of ze)ne();return}let me;const He=ze=>{ze&&(re.insertAdjacentElement("afterbegin",ze.getGui()),te.current.push(()=>{as(ze.getGui()),i.destroyBean(ze),z.current===me&&(z.current=void 0)}))};v&&He(e.createSelectionCheckbox()),R&&He(e.createDndSource()),b&&(me=e.createRowDragComp(),z.current=me,me&&(He(me),me.refreshVisibility()))},[e,i,R,b,v]),Ze=p.useCallback(()=>{const re=!e.isCellSpanning()||F.current,me=I.current;if(!me||!re||!e||!e.isAlive()||i.isDestroyed()){a.current=i.destroyBean(a.current);return}a.current=i.createBean(new Eo);const He={toggleCss:(ne,ge)=>ee.current.toggleCss(ne,ge),setUserStyles:ne=>m(ne),getFocusableElement:()=>I.current,setIncludeSelection:ne=>w(ne),setIncludeRowDrag:ne=>S(ne),setIncludeDndSource:ne=>y(ne),getCellEditor:()=>Q.current??null,getCellRenderer:()=>P.current??B.current,getParentOfValue:()=>k.current??A.current??I.current,setRenderDetails:(ne,ge,je)=>{const Qt=()=>{c(Ne=>Ne?.compDetails!==ne||Ne?.value!==ge||Ne?.force!==je?{value:ge,compDetails:ne,force:je}:Ne)};if(ne?.params?.deferRender&&!e.rowNode.group){const{loadingComp:Ne,onReady:js}=e.getDeferLoadingCellRenderer();if(Ne){c({value:void 0,compDetails:Ne,force:!1}),js.then(()=>rM(Qt));return}}Qt()},setEditDetails:(ne,ge,je,Qt)=>{if(ne){let Ne;ne.componentFromFramework&&(Qt?Ne=new BM(ne.params,()=>g(js=>js+1)):Nl()),u({compDetails:ne,popup:ge,popupPosition:je,compProxy:Ne}),ge||c(void 0)}else e.hasBrowserFocus()&&He.getFocusableElement().focus({preventScroll:!0}),Q.current=void 0,u(void 0)},refreshEditStyles:(ne,ge)=>{if(!I.current)return;const{current:je}=ee;je.toggleCss("ag-cell-value",!_),je.toggleCss("ag-cell-inline-editing",!!ne&&!ge),je.toggleCss("ag-cell-popup-editing",!!ne&&!!ge),je.toggleCss("ag-cell-not-inline-editing",!ne||!!ge)}},ze=A.current||void 0;e.setComp(He,me,F.current??void 0,ze,t,s,a.current)},[]),he=p.useCallback(re=>{I.current=re,Ze()},[]),ft=p.useCallback(re=>{F.current=re,Ze()},[]),Te=p.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&Po(l.compDetails.componentClass)),[l]);p.useLayoutEffect(()=>{if(!I.current)return;const{current:re}=ee;re.toggleCss("ag-cell-value",!_),re.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),re.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),re.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});const rt=()=>{const{compDetails:re,value:me}=l;if(!re)return me?.toString?.()??me;if(re.componentFromFramework){const He=re.componentClass;return p.createElement(p.Suspense,{fallback:p.createElement($M,{cellCtrl:e,parent:I})},Te?p.createElement(He,{...re.params,key:h}):p.createElement(He,{...re.params,key:h,ref:P}))}},kt=()=>{const re=()=>l==null?null:_?p.createElement("span",{role:"presentation",id:`cell-${r}`,className:se,ref:X},rt()):rt(),me=He=>UM(He,O,I.current,e,x);return d!=null?d.popup?p.createElement(p.Fragment,null,re(),me(d)):me(d):re()},Zt=()=>p.createElement("div",{ref:he,style:f,role:L,"col-id":n},_?p.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:Oe},kt()):kt());return e.isCellSpanning()?p.createElement("div",{ref:ft,className:"ag-spanned-cell-wrapper",role:"presentation"},Zt()):Zt()},qM=p.memo(KM),YM=({rowCtrl:e,containerType:t})=>{const{context:s,gos:o,editSvc:i}=p.useContext(Ue),n=p.useContext(Lp)==="default",r=p.useRef(),a=p.useRef(e.getDomOrder()),l=e.isFullWidth(),c=e.rowNode.displayed,[d,u]=p.useState(()=>c?e.rowNode.getRowIndexString():null),[h,g]=p.useState(()=>e.rowId),[f,m]=p.useState(()=>e.businessKey),[v,w]=p.useState(()=>e.rowStyles),b=p.useRef(null),[S,R]=p.useState(()=>null),[y,x]=p.useState(),[D,M]=p.useState(()=>c?e.getInitialRowTop(t):void 0),[L,I]=p.useState(()=>c?e.getInitialTransform(t):void 0),F=p.useRef(null),P=p.useRef(),B=p.useRef(),Q=p.useRef(!1),[A,te]=p.useState(0);p.useEffect(()=>{if(Q.current||!y||A>10)return;const he=F.current?.firstChild;he?(e.setupDetailRowAutoHeight(he),Q.current=!0):te(ft=>ft+1)},[y,A]);const z=p.useRef();z.current||(z.current=new Ci(()=>F.current));const k=p.useRef(()=>{}),Z=p.useCallback(he=>(k.current=he,()=>{k.current=()=>{}}),[]),N=aM(Z,()=>b.current,[]),X=n?N:S,$=p.useCallback(he=>{if(F.current=he,r.current=he?s.createBean(new Eo):s.destroyBean(r.current),!he){e.unsetComp(t);return}if(!e.isAlive()||s.isDestroyed())return;const ft={setTop:M,setTransform:I,toggleCss:(Te,rt)=>z.current.toggleCss(Te,rt),setDomOrder:Te=>a.current=Te,setRowIndex:u,setRowId:g,setRowBusinessKey:m,setUserStyles:w,setCellCtrls:(Te,rt)=>{const kt=b.current,Zt=Fn(kt,Te,a.current);Zt!==kt&&(b.current=Zt,n?k.current():pi(rt,()=>R(Zt)))},showFullWidth:Te=>{B.current=Te.params,x(Te)},getFullWidthCellRenderer:()=>P.current,getFullWidthCellRendererParams:()=>B.current,refreshFullWidth:Te=>{const rt=Te();return B.current=rt,ce.current?(x(kt=>({...kt,params:rt})),!0):!P.current||!P.current.refresh?!1:P.current.refresh(rt)}};e.setComp(ft,he,t,r.current)},[]);p.useLayoutEffect(()=>yi(y,s,F.current,P),[y]);const _=p.useMemo(()=>{const he={top:D,transform:L};return Object.assign(he,v),he},[D,L,v]),se=l&&y?.componentFromFramework,O=!l&&X!=null,ee=p.useMemo(()=>!!(y?.componentFromFramework&&Po(y.componentClass)),[y]),ce=p.useRef(!1);p.useEffect(()=>{ce.current=ee&&!!y&&!!o.get("reactiveCustomComponents")},[ee,y]);const Oe=()=>X?.map(he=>p.createElement(qM,{cellCtrl:he,editingCell:i?.isEditing(he,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:he.instanceId})),Ze=()=>{const he=y.componentClass;return ee?p.createElement(he,{...y.params}):p.createElement(he,{...y.params,ref:P})};return p.createElement("div",{ref:$,role:"row",style:_,"row-index":d,"row-id":h,"row-business-key":f},O?Oe():se?Ze():null)},Ld=p.memo(YM),ZM=({name:e})=>{const{context:t,gos:s}=p.useContext(Ue),o=p.useMemo(()=>wi(e),[e]),i=p.useRef(null),n=p.useRef(null),r=p.useRef(null),a=p.useRef([]),l=p.useRef([]),[c,d]=p.useState(()=>[]),u=!!s.get("enableCellSpan")&&!!o.getSpannedRowCtrls,h=p.useRef([]),g=p.useRef([]),[f,m]=p.useState(()=>[]),v=p.useRef(!1),w=p.useRef(),b=p.useMemo(()=>ct("ag-viewport",ng(e)),[e]),S=p.useMemo(()=>ct(Ki(e)),[e]),R=p.useMemo(()=>ct("ag-spanning-container",HS(e)),[e]),y=o.type==="center"||u,x=y?i:n;bs(" AG Row Container "+e+" ",x);const D=p.useCallback(()=>{const A=!y||i.current!=null,te=n.current!=null,z=!u||r.current!=null;return A&&te&&z},[]),M=p.useCallback(()=>i.current==null&&n.current==null&&r.current==null,[]),L=p.useCallback(()=>{if(M()&&(w.current=t.destroyBean(w.current)),!t.isDestroyed()&&D()){const A=k=>{const Z=Fn(l.current,a.current,v.current);Z!==l.current&&(l.current=Z,pi(k,()=>d(Z)))},te=k=>{const Z=Fn(g.current,h.current,v.current);Z!==g.current&&(g.current=Z,pi(k,()=>m(Z)))},z={setHorizontalScroll:k=>{i.current&&(i.current.scrollLeft=k)},setViewportHeight:k=>{i.current&&(i.current.style.height=k)},setRowCtrls:({rowCtrls:k,useFlushSync:Z})=>{const N=!!Z&&a.current.length>0&&k.length>0;a.current=k,A(N)},setSpannedRowCtrls:(k,Z)=>{const N=!!Z&&h.current.length>0&&k.length>0;h.current=k,te(N)},setDomOrder:k=>{v.current!=k&&(v.current=k,A(!1))},setContainerWidth:k=>{n.current&&(n.current.style.width=k)},setOffsetTop:k=>{n.current&&(n.current.style.transform=`translateY(${k})`)}};w.current=t.createBean(new $S(e)),w.current.setComp(z,n.current,r.current??void 0,i.current)}},[D,M]),I=p.useCallback(A=>{n.current=A,L()},[L]),F=p.useCallback(A=>{r.current=A,L()},[L]),P=p.useCallback(A=>{i.current=A,L()},[L]),B=()=>p.createElement("div",{className:S,ref:I,role:y?"presentation":"rowgroup"},c.map(A=>p.createElement(Ld,{rowCtrl:A,containerType:o.type,key:A.instanceId})));if(!y)return B();const Q=()=>p.createElement("div",{className:R,ref:F,role:"presentation"},f.map(A=>p.createElement(Ld,{rowCtrl:A,containerType:o.type,key:A.instanceId})));return p.createElement("div",{className:b,ref:P,role:"rowgroup"},B(),u?Q():null)},QM=p.memo(ZM),XM=()=>{const e=p.useContext(Ue),{context:t,overlays:s}=e,[o,i]=p.useState(""),[n,r]=p.useState(0),[a,l]=p.useState(0),[c,d]=p.useState("0px"),[u,h]=p.useState("0px"),[g,f]=p.useState("100%"),[m,v]=p.useState("0px"),[w,b]=p.useState("0px"),[S,R]=p.useState("100%"),[y,x]=p.useState(!0),[D,M]=p.useState(!0),[L,I]=p.useState(null),[F,P]=p.useState(""),[B,Q]=p.useState(null),[A,te]=p.useState("ag-layout-normal"),z=p.useRef();z.current||(z.current=new Ci(()=>k.current));const k=p.useRef(null),Z=p.useRef(null),N=p.useRef(null),X=p.useRef(null),$=p.useRef(null),_=p.useRef(null),se=p.useRef(null),O=p.useRef([]),ee=p.useRef([]);bs(" AG Grid Body ",k),bs(" AG Pinned Top ",Z),bs(" AG Sticky Top ",N),bs(" AG Middle ",_),bs(" AG Pinned Bottom ",se);const ce=p.useCallback(ge=>{if(k.current=ge,!ge||t.isDestroyed()){O.current=t.destroyBeans(O.current);for(const xe of ee.current)xe();ee.current=[];return}const je=(xe,et)=>{xe.appendChild(et),ee.current.push(()=>et.remove())},Qt=xe=>{const et=t.createBean(new xe);return O.current.push(et),et},Ne=(xe,et,tf)=>{je(xe,document.createComment(tf)),je(xe,Qt(et).getGui())};Ne(ge,JS," AG Fake Horizontal Scroll ");const js=s?.getOverlayWrapperCompClass();js&&Ne(ge,js," AG Overlay Wrapper "),$.current&&Ne($.current,ty," AG Fake Vertical Scroll ");const ef={setRowAnimationCssOnBodyViewport:i,setColumnCount:xe=>{k.current&&Pw(k.current,xe)},setRowCount:xe=>{k.current&&Ew(k.current,xe)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:f,setTopInvisible:x,setBottomInvisible:M,setColumnMovingCss:(xe,et)=>z.current.toggleCss(xe,et),updateLayoutClasses:te,setAlwaysVerticalScrollClass:I,setPinnedTopBottomOverflowY:P,setCellSelectableCss:(xe,et)=>Q(et?xe:null),setBodyViewportWidth:xe=>{_.current&&(_.current.style.width=xe)},registerBodyViewportResizeListener:xe=>{if(_.current){const et=Kt(e,_.current,xe);ee.current.push(()=>et())}},setStickyBottomHeight:v,setStickyBottomBottom:b,setStickyBottomWidth:R,setGridRootRole:xe=>ge.setAttribute("role",xe)},Vl=t.createBean(new ZS);O.current.push(Vl),Vl.setComp(ef,ge,_.current,Z.current,se.current,N.current,X.current)},[]),Oe=p.useMemo(()=>ct("ag-root","ag-unselectable",A),[A]),Ze=p.useMemo(()=>ct("ag-body-viewport",o,A,L,B),[o,A,L,B]),he=p.useMemo(()=>ct("ag-body",A),[A]),ft=p.useMemo(()=>ct("ag-floating-top",y?"ag-invisible":null,B),[B,y]),Te=p.useMemo(()=>ct("ag-sticky-top",B),[B]),rt=p.useMemo(()=>ct("ag-sticky-bottom",m==="0px"?"ag-invisible":null,B),[B,m]),kt=p.useMemo(()=>ct("ag-floating-bottom",D?"ag-invisible":null,B),[B,D]),Zt=p.useMemo(()=>({height:n,minHeight:n,overflowY:F}),[n,F]),re=p.useMemo(()=>({height:c,top:u,width:g}),[c,u,g]),me=p.useMemo(()=>({height:m,bottom:w,width:S}),[m,w,S]),He=p.useMemo(()=>({height:a,minHeight:a,overflowY:F}),[a,F]),ze=ge=>p.createElement(QM,{name:ge,key:`${ge}-container`}),ne=({section:ge,children:je,className:Qt,style:Ne})=>p.createElement("div",{ref:ge,className:Qt,role:"presentation",style:Ne},je.map(ze));return p.createElement("div",{ref:ce,className:Oe},p.createElement(GM,null),ne({section:Z,className:ft,style:Zt,children:["topLeft","topCenter","topRight","topFullWidth"]}),p.createElement("div",{className:he,ref:$,role:"presentation"},ne({section:_,className:Ze,children:["left","center","right","fullWidth"]})),ne({section:N,className:Te,style:re,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),ne({section:X,className:rt,style:me,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),ne({section:se,className:kt,style:He,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},JM=p.memo(XM),e6=(e,t)=>{const{children:s,eFocusableElement:o,onTabKeyDown:i,gridCtrl:n,forceFocusOutWhenTabGuardsAreEmpty:r,isEmpty:a}=e,{context:l}=p.useContext(Ue),c=p.useRef(null),d=p.useRef(null),u=p.useRef(),h=w=>{const b=w==null?void 0:parseInt(w,10).toString();for(const S of[c,d])b===void 0?S.current?.removeAttribute("tabindex"):S.current?.setAttribute("tabindex",b)};p.useImperativeHandle(t,()=>({forceFocusOutOfContainer(w){u.current?.forceFocusOutOfContainer(w)}}));const g=p.useCallback(()=>{const w=c.current,b=d.current;if(!w&&!b||l.isDestroyed()){u.current=l.destroyBean(u.current);return}if(w&&b){const S={setTabIndex:h};u.current=l.createBean(new Cg({comp:S,eTopGuard:w,eBottomGuard:b,eFocusableElement:o,onTabKeyDown:i,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:R=>n.focusInnerElement(R),isEmpty:a}))}},[]),f=p.useCallback(w=>{c.current=w,g()},[g]),m=p.useCallback(w=>{d.current=w,g()},[g]),v=w=>{const b=w==="top"?uo.TAB_GUARD_TOP:uo.TAB_GUARD_BOTTOM;return p.createElement("div",{className:`${uo.TAB_GUARD} ${b}`,role:"presentation",ref:w==="top"?f:m})};return p.createElement(p.Fragment,null,v("top"),s,v("bottom"))},t6=p.forwardRef(e6),s6=p.memo(t6),o6=({context:e})=>{const[t,s]=p.useState(""),[o,i]=p.useState(""),[n,r]=p.useState(null),[a,l]=p.useState(null),[c,d]=p.useState(!1),[u,h]=p.useState(),g=p.useRef(),f=p.useRef(null),m=p.useRef(),[v,w]=p.useState(null),b=p.useRef(()=>{}),S=p.useRef(),R=p.useRef([]),y=p.useCallback(()=>{},[]);bs(" AG Grid ",f);const x=p.useCallback(P=>{if(f.current=P,g.current=P?e.createBean(new Xy):e.destroyBean(g.current),!P||e.isDestroyed())return;const B=g.current;b.current=B.focusInnerElement.bind(B);const Q={destroyGridUi:()=>{},setRtlClass:s,forceFocusOutOfContainer:A=>{if(!A&&S.current?.isDisplayed()){S.current.forceFocusOutOfContainer(A);return}m.current?.forceFocusOutOfContainer(A)},updateLayoutClasses:i,getFocusableContainers:()=>{const A=[],te=f.current?.querySelector(".ag-root");te&&A.push({getGui:()=>te});for(const z of R.current)z.isDisplayed()&&A.push(z);return A},setCursor:r,setUserSelect:l};B.setComp(Q,P,P),d(!0)},[]);p.useEffect(()=>{const P=g.current,B=f.current;if(!u||!P||!v||!B||e.isDestroyed())return;const Q=[],{watermarkSelector:A,paginationSelector:te,sideBarSelector:z,statusBarSelector:k,gridHeaderDropZonesSelector:Z}=P.getOptionalSelectors(),N=[];if(Z){const $=e.createBean(new Z.component),_=$.getGui();B.insertAdjacentElement("afterbegin",_),N.push(_),Q.push($)}if(z){const $=e.createBean(new z.component),_=$.getGui(),se=v.querySelector(".ag-tab-guard-bottom");se&&(se.insertAdjacentElement("beforebegin",_),N.push(_)),Q.push($),R.current.push($)}const X=$=>{const _=e.createBean(new $),se=_.getGui();return B.insertAdjacentElement("beforeend",se),N.push(se),Q.push(_),_};if(k&&X(k.component),te){const $=X(te.component);S.current=$,R.current.push($)}return A&&X(A.component),()=>{e.destroyBeans(Q);for(const $ of N)$.remove()}},[u,v,e]);const D=p.useMemo(()=>ct("ag-root-wrapper",t,o),[t,o]),M=p.useMemo(()=>ct("ag-root-wrapper-body","ag-focus-managed",o),[o]),L=p.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:n??""}),[a,n]),I=p.useCallback(P=>{m.current=P,h(P!==null)},[]),F=p.useCallback(()=>!g.current?.isFocusable(),[]);return p.createElement("div",{ref:x,className:D,style:L,role:"presentation"},p.createElement("div",{className:M,ref:w,role:"presentation"},c&&v&&!e.isDestroyed()&&p.createElement(Ue.Provider,{value:e.getBeans()},p.createElement(s6,{ref:I,eFocusableElement:v,onTabKeyDown:y,gridCtrl:g.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:F},p.createElement(JM,null)))))},i6=p.memo(o6),n6=class extends T{postConstruct(){if(this.beans.colAutosize){const e=this.queueResizeOperationsForTick.bind(this);this.addManagedEventListeners({rowExpansionStateChanged:e,expandOrCollapseAll:e,cellValueChanged:e,rowNodeDataChanged:e,rowDataUpdated:e})}}queueResizeOperationsForTick(){const e=this.beans.colAutosize;e.shouldQueueResizeOperations=!0,setTimeout(()=>{e.processResizeOperations()},0)}areHeaderCellsRendered(){return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}areCellsRendered(){return this.beans.rowRenderer.getAllRowCtrls().every(e=>e.isRowRendered()&&e.getAllCellCtrls().every(t=>!!t.eGui))}},zp={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},r6={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...zp},Wp=new Set(Object.keys(r6)),a6=new Set(Object.keys(zp)),_p=e=>{const t=p.useRef(),s=p.useRef(null),o=p.useRef(null),i=p.useRef([]),n=p.useRef([]),r=p.useRef(e),a=p.useRef(),l=p.useRef(),c=p.useRef(!1),[d,u]=p.useState(void 0),[,h]=p.useState(0),g=p.useCallback(w=>{if(s.current=w,!w){for(const F of i.current)F();i.current.length=0;return}const b=e.modules||[];o.current||(o.current=new EM(()=>h(F=>F+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),i.current.push(()=>{o.current?.destroy(),o.current=null}));const S=T1(e.gridOptions,e,Object.keys(e).filter(F=>!Wp.has(F))),R=()=>{if(c.current){const F=()=>a.current?.shouldQueueUpdates()?void 0:n.current.shift();let P=F();for(;P;)P(),P=F()}},y=new u6(R);a.current=y;const x=new n6,D={providedBeanInstances:{frameworkCompWrapper:new c6(o.current,S),renderStatus:x},modules:b,frameworkOverrides:y,setThemeOnGridDiv:!0},M=F=>{u(F),F.createBean(x),i.current.push(()=>{F.destroy()}),F.getBean("ctrlsSvc").whenReady({addDestroyFunc:P=>{i.current.push(P)}},()=>{if(F.isDestroyed())return;const P=t.current;P&&e.passGridApi?.(P)})},L=F=>{F.getBean("ctrlsSvc").whenReady({addDestroyFunc:P=>{i.current.push(P)}},()=>{for(const P of n.current)P();n.current.length=0,c.current=!0})},I=new F3;S.gridId??(S.gridId=l.current),t.current=I.create(w,S,M,L,D),i.current.push(()=>{t.current=void 0}),t.current&&(l.current=t.current.getGridId())},[]),f=p.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),m=p.useCallback(w=>{c.current&&!a.current?.shouldQueueUpdates()?w():n.current.push(w)},[]);p.useEffect(()=>{const w=l6(r.current,e);r.current=e,m(()=>{t.current&&M1(w,t.current)})},[e]);const v=!p.useSyncExternalStore||Wi(e,"renderingMode")==="legacy"?"legacy":"default";return p.createElement("div",{style:f,className:e.className,ref:g},p.createElement(Lp.Provider,{value:v},d&&!d.isDestroyed()?p.createElement(i6,{key:d.instanceId,context:d}):null,o.current?.getPortals()??null))};function l6(e,t){const s={};for(const o of Object.keys(t)){if(Wp.has(o)){a6.has(o)&&H(274,{prop:o});continue}const i=t[o];e[o]!==i&&(s[o]=i)}return s}var c6=class extends M3{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const s=this.gridOptions;if(Wi(s,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return Wi(s,"enableFilterHandlers")?fM:pM;case"floatingFilterComponent":return Wi(s,"enableFilterHandlers")?vM:CM;case"dateComponent":return hM;case"dragAndDropImageComponent":return gM;case"loadingOverlayComponent":return bM;case"noRowsOverlayComponent":return yM;case"statusPanel":return RM;case"toolPanel":return xM;case"menuItem":return SM;case"cellRenderer":return uM;case"innerHeaderComponent":return wM}})(t.name);if(r)return new r(e,this.parent,t)}else switch(t.name){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":Nl();break}const i=!t.cellRenderer&&t.name!=="toolPanel";return new Gp(e,this.parent,t,i)}},d6=p.forwardRef((e,t)=>{const s=p.useContext(Ue),{registry:o,context:i,gos:n,rowModel:r}=s,[a,l]=p.useState(()=>new gt),[c,d]=p.useState(()=>new gt),[u,h]=p.useState(),[g,f]=p.useState(),m=p.useRef(),v=p.useRef(null),w=p.useRef(),b=p.useMemo(()=>r1(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),S=p.useMemo(()=>a.toString()+" ag-details-row",[a]),R=p.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&p.useImperativeHandle(t,()=>({refresh(){return m.current?.refresh()??!1}})),e.template&&H(230);const y=p.useCallback(D=>{if(v.current=D,!D||i.isDestroyed()){m.current=i.destroyBean(m.current),w.current?.();return}const M={toggleCss:(I,F)=>l(P=>P.setClass(I,F)),toggleDetailGridCss:(I,F)=>d(P=>P.setClass(I,F)),setDetailGrid:I=>h(I),setRowData:I=>f(I),getGui:()=>v.current},L=o.createDynamicBean("detailCellRendererCtrl",!0);if(L&&(i.createBean(L),L.init(M,e),m.current=L,n.get("detailRowAutoHeight"))){const I=()=>{if(v.current==null)return;const F=v.current.clientHeight;F!=null&&F>0&&setTimeout(()=>{e.node.setRowHeight(F),(Fe(n)||zs(n))&&r.onRowHeightChanged()},0)};w.current=Kt(s,D,I),I()}},[]),x=p.useCallback(D=>{m.current?.registerDetailWithMaster(D)},[]);return p.createElement("div",{className:S,ref:y},u&&p.createElement(_p,{className:R,...u,modules:b,rowData:g,passGridApi:x}))}),u6=class extends vg{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:Md,agGroupRowRenderer:Md,agDetailCellRenderer:d6},this.wrapIncoming=(t,s)=>s==="ensureVisible"?nM(t):t()}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return iM()}},h6=class extends p.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e;for(const t of this.apiListeners)t(e)}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return p.createElement(_p,{...this.props,passGridApi:this.setGridApi})}};const g6="h-full",Hr={accentColor:"var(--controls-bg-accent, #5C8DEA)",backgroundColor:"var(--bg-layer-2, #141A23)",oddRowBackgroundColor:"var(--bg-layer-3, #222932)",borderColor:"var(--bg-layer-4, #333942)",rowBorder:"1px solid var(--border-tertiary, #090D13)",borderRadius:3,browserColorScheme:"dark",chromeBackgroundColor:"var(--bg-layer-1, #090D13)",foregroundColor:"var(--text-primary, #F3F4F6)",headerFontSize:14,headerFontWeight:600,headerTextColor:"var(--text-secondary, #7F8792)",spacing:4,wrapperBorderRadius:3,fontSize:14,fontFamily:{googleFont:"var(--theme-font, var(--font-inter))"},headerColumnBorderHeight:"0",cellStyle:{textAlign:"center"}},Nr=40,p6=(e,t,s,o,i)=>{const n=typeof e=="string"?e.toLowerCase():e,r=typeof t=="string"?t.toLowerCase():t;return n===r?0:n?r?n>r?1:-1:i?1:-1:i?-1:1},f6=({selectedRowIds:e,onSelectionChange:t,rowData:s,getRowId:o})=>{const[i,n]=p.useState(new Set),r=e??i,a=p.useCallback(g=>{if(t&&e!==void 0){const f=(s||[]).filter(m=>g.has(o(m)));try{t(g,f)}catch{}}else n(g)},[t,e,s,o]),l=p.useCallback((g,f)=>{const m=new Set(r);f?m.add(g):m.delete(g),a(m)},[r,a]),c=s?.length||0,d=r.size,u=p.useMemo(()=>d===0?"unchecked":d===c?"checked":"indeterminate",[d,c]),h=p.useCallback(()=>{if(u==="checked")a(new Set);else{const g=new Set((s||[]).map(o));a(g)}},[u,a,s,o]);return{currentSelectedIds:r,handleSelectionToggle:l,headerCheckboxState:u,handleHeaderCheckboxChange:h}};c1.registerModules([oM]);const m6=({columnDefs:e,rowData:t,additionalGridOptions:s,getContextMenuItems:o,cssClass:i,ariaLabel:n="Data grid",withSelectionColumn:r=!0,wrapCustomCellRenderers:a=!0,selectedRowIds:l,onSelectionChange:c,getRowId:d=g=>String(g.id||JSON.stringify(g)),alternateOddRowColors:u=!1,filterPlaceholder:h="Enter value"})=>{const[g,f]=p.useState(Nr),[m,v]=p.useState(),w=p.useId(),{currentSelectedIds:b,handleSelectionToggle:S,headerCheckboxState:R,handleHeaderCheckboxChange:y}=f6({selectedRowIds:l,onSelectionChange:c,rowData:t,getRowId:d}),x=p.useMemo(()=>({...Hr,oddRowBackgroundColor:u?Hr.oddRowBackgroundColor:Hr.backgroundColor}),[u]),D=p.useCallback(z=>{z.api.sizeColumnsToFit(),f(Nr)},[]),M=p.useCallback(z=>{if(z.data){const k=d(z.data);return b.has(k)?"ag-row-selected":""}},[b,d]),L=p.useCallback(()=>{const z=R==="checked",k=R==="indeterminate";return C.jsx("div",{className:"flex items-center justify-center h-full header-checkbox-container",children:C.jsx(Qo,{id:"header-select-all",ariaLabel:"Select all rows",checked:z,indeterminate:k,cssClass:`dial-header-select ${R}`,onChange:y})})},[R,y]),I=p.useCallback(z=>{if(z.data){const k=o?.(z.data)??[],Z=z.value==null?"":String(z.value);return C.jsx(Ut,{trigger:[Ft.ContextMenu],menu:{items:k},anchorToMouse:!0,matchReferenceWidth:!0,cssClass:"w-full",children:C.jsx("span",{className:"block min-w-0 h-full max-w-full",children:C.jsx(Tt,{text:Z,cssClass:"max-w-full h-full"})})})}},[o]),F=p.useCallback(z=>{if(!z.data)return null;const k=d(z.data),Z=b.has(k),N=`row-select-${k}`;return C.jsx("div",{className:"flex items-center justify-center h-full",children:C.jsx(Qo,{id:N,ariaLabel:"Select row",checked:Z,cssClass:"dial-row-select",onChange:X=>{S(k,!!X)}},`${k}-${Z}`)})},[b,d,S]),P=p.useCallback(z=>{const k=typeof a=="function"?a(z):!!a;if(!z.cellRenderer)return{...z,cellRenderer:I};if(!k)return z;const Z=z.cellRenderer;return{...z,cellRenderer:X=>{const $=X.data?o?.(X.data)??[]:[];let _=null;if(typeof Z=="function"){const se=Z;_=C.jsx(se,{...X})}else _=I(X);return C.jsx(Ut,{trigger:[Ft.ContextMenu],menu:{items:$},anchorToMouse:!0,matchReferenceWidth:!0,cssClass:"w-full h-full",children:C.jsx("span",{className:"block min-w-0 max-w-full",children:_})})}}},[o,I,a]),B=p.useMemo(()=>({colId:"__select",headerName:"",width:40,minWidth:40,suppressSizeToFit:!0,lockPosition:!0,sortable:!1,resizable:!1,filter:!1,floatingFilter:!1,suppressMenu:!0,borderless:!0,cellRenderer:F,headerComponent:L}),[F,L]),Q=p.useMemo(()=>{const z=(e??[]).map(P);return r?[B,...z]:z},[e,B,r,P]),A=p.useMemo(()=>({minWidth:150,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:h,buttons:["reset"]},comparator:p6.bind(void 0)}),[h]),te=z=>{const k=Q.map(Z=>({...Z,sort:void 0}));z.api.updateGridOptions({columnDefs:k,rowData:t}),z.api.sizeColumnsToFit(),v(z.api),s?.onGridReady?.(z)};return p.useEffect(()=>{m&&m.redrawRows()},[m,b]),C.jsx("div",{className:W(g6,i,r&&"with-selection-column"),"aria-label":n,role:"region",children:C.jsx("div",{className:"ag-theme-balham-dark h-full overflow-x-auto",role:"table","aria-describedby":w,children:C.jsx(h6,{rowModelType:"clientSide",headerHeight:Nr,rowHeight:g,cellSelection:!1,getRowClass:M,theme:sF.withPart(O2).withParams({...x}),autoSizeStrategy:{type:"fitGridWidth"},columnDefs:Q,defaultColDef:A,onGridSizeChanged:D,onGridReady:te,suppressCellFocus:!0,rowData:t,...s})})})},Ta=(e,t)=>{if(!(!e||!e.length||!t))for(const s of e){if(s.path===t)return s;const o=Ta(s.items,t);if(o)return o}},C6=(e,t)=>{if(!e?.length)return;if(!t)return e[0];const s=Ta(e,t);if(s&&s.nodeType===ns.FOLDER)return s;const o=t.split("/").filter(Boolean);if(o.length<=1)return e[0];const i="/"+o.slice(0,o.length-1).join("/");return Ta(e,i)??e[0]},Ji=e=>(e??"").toLowerCase(),v6=e=>Ji(e).replace(/^\./,""),w6=e=>{if(!e)return[];const t=[],s=o=>{const i=o.items??[];for(const n of i)t.push(n),n.nodeType===ns.FOLDER&&s(n)};return s(e),t},b6=C.jsx(K.IconChevronDown,{size:16}),S6=C.jsx(K.IconChevronUp,{size:16}),Up=e=>{const[t,s]=p.useState(!1),o=p.useMemo(()=>t?S6:b6,[t]);return C.jsx("div",{children:C.jsx(Ut,{menu:{items:e.items},onOpenChange:i=>s(i),children:C.jsx(Ie,{...e,iconAfter:o})})})},y6=({tabs:e,activeTab:t,onTabChange:s,areHiddenFilesVisible:o,onToggleHiddenFiles:i,onRefresh:n,isCreateButtonVisible:r,createButtonVariant:a=De.Secondary,createButtonDropdownItems:l=[],createButtonLabel:c="Create",hiddenFilesSwitcherLabel:d="Hidden files",refreshButtonLabel:u="Refresh"})=>C.jsxs("div",{className:"flex w-full justify-between gap-4 items-center overflow-x-auto",children:[C.jsx("div",{className:"flex-1 min-w-0",children:e&&t&&s&&C.jsx(vu,{tabs:e,activeTab:t,onClick:h=>s(h)})}),C.jsxs("div",{className:"flex gap-4 flex-shrink-0 items-center",children:[C.jsx(Fu,{switchId:"hidden-files-switch",title:d,isOn:o,onChange:i}),C.jsx("div",{className:"h-6 border-l border-primary"}),C.jsx(Ie,{title:u,onClick:n,variant:De.Secondary,iconBefore:C.jsx(K.IconRefresh,{...ke})}),r&&C.jsx(Up,{title:c,variant:a,items:l})]})]}),R6=e=>{if(!e||e<=0)return"-";const t=1024,s=t*1024;return e>=s?`${(e/s).toFixed(1)} MB`:e>=t?`${(e/t).toFixed(0)} KB`:`${e} B`},x6=({path:e,cssClass:t,items:s=[],treeOptions:o,navigationPanelOptions:i,gridOptions:n,toolbarOptions:r,onPathChange:a,onTableFileClick:l})=>{const[c,d]=p.useState(e);p.useEffect(()=>{d(e)},[e]);const[u,h]=p.useState("");p.useEffect(()=>{const A=i?.value;A!=null&&h(String(A))},[i?.value]);const{width:g=lw,title:f=cw,containerCssClass:m=rw,additionalButtons:v,...w}=o??{},b=String(i?.value??u??"").trim(),S=p.useMemo(()=>C6(s,c)??s[0],[s,c]),R=p.useMemo(()=>{const A=Ji(b).trim(),te=S?.items??[],k=(A?w6(S):te).map(N=>({id:N.id??N.path,name:N.name??N.path.split("/").pop()??"",updatedAt:N.updatedAt,size:N.nodeType===ns.ITEM?R6(N.contentLength):"-",author:N.author,path:N.path,nodeType:N.nodeType,extension:N.extension}));if(!A)return k;const Z=A.split(/\s+/).filter(Boolean);return k.filter(N=>{const X=Ji(N.name),$=Ji(N.author),_=v6(N.extension);return Z.every(se=>X.includes(se)||$.includes(se)||_.includes(se))})},[S,b]),y=p.useMemo(()=>[{field:"name",headerName:"Name",flex:1,minWidth:200,cellRenderer:A=>A.data?.nodeType===ns.FOLDER?C.jsx(za,{name:A.data.name}):C.jsx(Ba,{name:A.data.name})},{field:"updatedAt",headerName:"Modified Date",width:168,suppressSizeToFit:!0},{field:"size",headerName:"Size",width:120,suppressSizeToFit:!0}],[]),{columnDefs:x,filterable:D=!0,...M}=n??{},L=x??y,I=p.useMemo(()=>D?L:L.map(A=>({...A,filter:!1,floatingFilter:!1})),[L,D]),F=p.useCallback(A=>{d(A.path),a?.(A.path)},[a]),P=p.useCallback(A=>{d(A),a?.(A)},[a]),B=p.useCallback(A=>{const te=String(A??"");h(te),i?.onSearchChange?.(te)},[i]),Q=p.useCallback(A=>{A.nodeType===ns.FOLDER?(d(A.path),a?.(A.path)):l?.(A)},[a,l]);return C.jsxs("section",{className:ue(sw,t),children:[r&&C.jsx("div",{className:ow,role:"toolbar","aria-label":"File Manager Toolbar",children:C.jsx(y6,{...r})}),C.jsxs("div",{className:iw,children:[C.jsx("aside",{role:"region","aria-label":"File Manager Tree Navigation",className:"min-h-0 min-w-0 h-full flex-none",children:C.jsx(su,{width:g,title:f,containerCssClass:m,additionalButtons:v,children:C.jsx(hw,{...w,items:s,selectedPath:c,onItemClick:F})})}),C.jsxs("div",{className:nw,children:[C.jsx(Du,{...i??{},path:c,onItemClick:P,makeHref:A=>"/"+A.join("/"),value:b,onSearchChange:B}),C.jsx("section",{role:"region","aria-label":"File Manager Grid View",className:aw,children:C.jsx(m6,{columnDefs:I,rowData:R,getRowId:A=>A.path,...M,additionalGridOptions:{...M.additionalGridOptions,onRowClicked:A=>{A.data&&Q(A.data)}}})})]})]})]})},F6=({onClick:e})=>C.jsx(K.IconEyeOff,{...ke,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),E6=({onClick:e})=>C.jsx(K.IconEye,{...ke,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),jp=({...e})=>{const[t,s]=p.useState(!1),o=p.useCallback(i=>{s(i)},[]);return C.jsx(fo,{type:t?"text":"password",...e,iconAfter:t?C.jsx(F6,{onClick:()=>o(!1)}):C.jsx(E6,{onClick:()=>o(!0)})})},D6=({fieldTitle:e,optional:t,elementCssClass:s,elementId:o,errorText:i,...n})=>C.jsxs("div",{className:"flex flex-col",children:[C.jsx(Vs,{fieldTitle:e,optional:t,htmlFor:o}),C.jsx(jp,{cssClass:s,elementId:o,invalid:!!i,...n}),C.jsx(rs,{errorText:i})]}),P6=({placeholder:e="",selectedItems:t=[],updateSelected:s,listCssClass:o,listElementCssClass:i,containerCssClass:n,inputCssClass:r})=>{const[a,l]=p.useState(""),c=p.useCallback(u=>{u.key==="Enter"&&(s([...t,u.currentTarget.value]),l("")),(u.key==="Backspace"||u.key==="Delete")&&t.length&&!a&&s(t.slice(0,-1))},[t,s,a]),d=p.useCallback(u=>{l(u.target.value)},[l]);return C.jsxs("div",{className:W(["dial-input px-3 py-2 flex flex-row items-center flex-wrap w-fit gap-2",n]),children:[C.jsx(_a,{selectedItems:t,listCssClass:o,listElementCssClass:i}),C.jsx("input",{type:"text",value:a,className:W(["border-0 bg-transparent p-0",r]),placeholder:t?.length?"":e,onKeyDown:c,onChange:d})]})},T6=({initialTags:e=[],fieldTitle:t,optional:s,elementId:o,placeholder:i,errorText:n,invalid:r,disabled:a,onChange:l})=>{const c=p.useRef(null),[d,u]=p.useState(e),[h,g]=p.useState(""),[f,m]=p.useState(!1),v=S=>{const R=S.trim().replace(/,$/,"");if(R&&!d.includes(R)){const y=[R,...d];u(y),l?.(y)}},w=S=>{(S.key===","||S.key==="Enter")&&(S.preventDefault(),v(h),g(""))},b=S=>{const R=d.filter((y,x)=>x!==S);u(R),l?.(R)};return p.useEffect(()=>{const S=new ResizeObserver(()=>{if(c.current){const R=c.current.scrollHeight>c.current.clientHeight+10;m(R)}});return c.current&&S.observe(c.current),()=>S.disconnect()},[d]),C.jsxs("div",{className:W("flex flex-col w-full"),children:[C.jsx(Vs,{fieldTitle:t,optional:s,htmlFor:o}),C.jsx("div",{className:W("dial-input min-h-[38px] p-[6px]",r&&"dial-input-error",a&&"dial-input-disable"),children:C.jsxs("div",{ref:c,className:W("flex flex-wrap gap-2 items-center",f?"flex-col-reverse":"flex-row"),children:[d.map((S,R)=>C.jsx(In,{tag:S,remove:a?void 0:()=>b(R)},S+R)),C.jsx("input",{type:"text",value:h,onChange:S=>g(S.target.value),onKeyDown:w,className:W("dial-input-no-border outline-none border-none w-full min-w-[100px] flex-1 p-1"),placeholder:i,disabled:a})]})}),C.jsx(rs,{errorText:n})]})},M6="dial-input flex px-3 py-2 w-full items-center justify-between gap-2 dial-small min-h-[38px]",I6="w-full rounded",Gr="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none",k6="bg-accent-primary-alpha",A6="bg-accent-primary-alpha border-l border-accent-primary border-1",Od="opacity-75",L6=C.jsx(K.IconChevronDown,{size:16}),$p=({options:e,selectedValues:t,handleRemoveTag:s})=>C.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(o=>{const i=e.find(r=>r.value===o)?.label??o,n=e.find(r=>r.value===o)?.icon;return C.jsx(In,{tag:i,remove:r=>s?.(r,o),iconBefore:n?C.jsx(we,{icon:n}):null,cssClass:"max-w-full"},o)})}),Kp=({options:e,multiple:t=!1,value:s,defaultValue:o,placeholder:i="Select...",searchable:n=!1,searchPlaceholder:r,selectAll:a=!1,selectAllLabel:l="Select all",emptyStateTitle:c="No options available",emptyStateDescription:d,emptyStateIcon:u,disabled:h=!1,cssClass:g,closable:f=!1,onClose:m,onChange:v})=>{const[w,b]=p.useState(!1),[S,R]=p.useState(""),y=p.useId(),x=s!==void 0,[D,M]=p.useState(o),L=x?s:D,I=p.useMemo(()=>t?Array.isArray(L)?L:[]:typeof L=="string"?[L]:[],[L,t]),F=p.useMemo(()=>{const O=S.trim().toLowerCase();return O?e.filter(ee=>ee.label.toLowerCase().includes(O)):e},[e,S]);p.useEffect(()=>{w||R("")},[w]);const P=p.useCallback(O=>{x||M(O),v?.(O)},[x,v]),B=O=>{if(t){const ee=new Set(I);ee.has(O)?ee.delete(O):ee.add(O),P(Array.from(ee))}else P(O),b(!1)},Q=p.useCallback((O,ee)=>{if(O.stopPropagation(),!t){P("");return}const ce=I.filter(Oe=>Oe!==ee);P(ce)},[t,I,P]),A=p.useMemo(()=>F.filter(O=>!O.disabled),[F]),te=p.useMemo(()=>A.filter(O=>I.includes(O.value)).length,[A,I]),z=A.length>0&&te===A.length,k=te>0&&!z,Z=()=>{if(!(!t||A.length===0))if(z){const O=new Set(A.map(ce=>ce.value)),ee=I.filter(ce=>!O.has(ce));P(ee)}else{const O=new Set(I);A.forEach(ee=>O.add(ee.value)),P(Array.from(O))}},N=I.length>0,X=!t&&N?I[0]:void 0,$=p.useMemo(()=>X?e.find(O=>O.value===X):void 0,[e,X]),_=p.useCallback(()=>!t||I.length===0?null:C.jsx($p,{options:e,selectedValues:I,handleRemoveTag:Q}),[t,e,I,Q]),se=p.useCallback(()=>t?N?_():C.jsx("span",{className:"text-secondary truncate",children:i}):$?C.jsxs(C.Fragment,{children:[$.icon&&C.jsx(we,{icon:$.icon}),C.jsx(Tt,{text:$.label})]}):C.jsx("span",{className:"text-secondary truncate",children:i}),[N,t,i,_,$]);return C.jsx(Ut,{open:w,onOpenChange:b,disabled:h,closable:f,onClose:m,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>C.jsxs("div",{id:y,role:"listbox","aria-multiselectable":t||void 0,className:I6,children:[(n||f)&&C.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[n&&C.jsx(Ua,{placeholder:r,onChange:R,value:S,elementId:`search-${y}`}),f&&C.jsx(Ie,{ariaLabel:"Close select",cssClass:"shrink-0",iconBefore:C.jsx(K.IconX,{size:16}),onClick:O=>{m?.(O),b(!1)}})]}),t&&a&&A.length>0&&C.jsx("div",{className:W(Gr,"mt-2"),children:C.jsx(Qo,{id:`${y}-selectAll`,label:l,checked:z,indeterminate:k,onChange:Z,ariaLabel:l})}),C.jsx("div",{className:"overflow-y-auto py-1",children:F.length===0?C.jsx("div",{className:"px-2 py-3",children:C.jsx(ka,{icon:u??C.jsx(K.IconClipboardX,{size:24}),title:c,description:d})}):F.map(O=>{const ee=I.includes(O.value);return t?C.jsx("div",{className:W(Gr,ee&&k6,O.disabled&&Od,"w-full"),children:C.jsx(Qo,{id:`${y}-${O.value}`,label:C.jsxs("span",{className:"flex w-full flex-1 min-w-0 items-center gap-2 text-primary",children:[O.icon&&C.jsx(we,{icon:O.icon}),C.jsx("span",{className:"truncate",children:O.label})]}),checked:ee,disabled:O.disabled,onChange:()=>!O.disabled&&B(O.value),ariaLabel:O.label})},O.value):C.jsx("button",{role:"option",type:"button","aria-selected":ee,"aria-disabled":!!O.disabled,disabled:O.disabled,className:W(Gr,ee&&A6,O.disabled&&Od),onClick:()=>!O.disabled&&B(O.value),children:C.jsxs("div",{className:"flex items-center gap-2 w-full",children:[O.icon&&C.jsx(we,{icon:O.icon}),C.jsx(Tt,{text:O.label})]})},O.value)})})]}),children:C.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-expanded":w,"aria-controls":y,className:ue(M6,h&&"opacity-75 !cursor-not-allowed",g),onClick:()=>!h&&b(O=>!O),children:[C.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary",children:se()}),C.jsx(we,{icon:L6,className:W("text-primary",w&&"rotate-180")})]})})},O6=({fieldTitle:e,optional:t,captionDescription:s,containerCssClass:o,selectCssClass:i,error:n,elementId:r,description:a,readonly:l,value:c,defaultEmptyText:d,...u})=>{const h=p.useCallback(()=>{if(!c||Array.isArray(c)&&c.length===0)return d??"None";if(Array.isArray(c))return C.jsx($p,{options:u.options,selectedValues:c});{const g=u.options?.find(f=>f.value===c);return C.jsx("span",{"aria-readonly":!0,className:"text-primary",children:g?.label||c})}},[c,u.options,d]);return C.jsx(Tn,{elementId:r,label:e,optional:t,description:a,error:n,captionDescription:s,cssClass:o,readonly:l,value:h(),defaultEmptyText:d,children:C.jsx(Kp,{cssClass:i,value:c,...u})})};function qp(e){let t=null;return()=>(t==null&&(t=e()),t)}function H6(e,t){return e.filter(s=>s!==t)}function N6(e,t){const s=new Set,o=n=>s.add(n);e.forEach(o),t.forEach(o);const i=[];return s.forEach(n=>i.push(n)),i}class G6{enter(t){const s=this.entered.length,o=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=N6(this.entered.filter(o),[t]),s===0&&this.entered.length>0}leave(t){const s=this.entered.length;return this.entered=H6(this.entered.filter(this.isNodeInDocument),t),s>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class V6{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const s={};Object.keys(this.config.exposeProperties).forEach(o=>{const i=this.config.exposeProperties[o];i!=null&&(s[o]={value:i(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,s)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,s){return s===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Gl="__NATIVE_FILE__",Yp="__NATIVE_URL__",Zp="__NATIVE_TEXT__",Qp="__NATIVE_HTML__",Hd=Object.freeze(Object.defineProperty({__proto__:null,FILE:Gl,HTML:Qp,TEXT:Zp,URL:Yp},Symbol.toStringTag,{value:"Module"}));function Vr(e,t,s){const o=t.reduce((i,n)=>i||e.getData(n),"");return o??s}const Ma={[Gl]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Qp]:{exposeProperties:{html:(e,t)=>Vr(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Yp]:{exposeProperties:{urls:(e,t)=>Vr(e,t,"").split(`
62
+ `),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Zp]:{exposeProperties:{text:(e,t)=>Vr(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function B6(e,t){const s=Ma[e];if(!s)throw new Error(`native type ${e} has no configuration`);const o=new V6(s);return o.loadDataTransfer(t),o}function Br(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(Ma).filter(s=>{const o=Ma[s];return o?.matchesTypes?o.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const z6=qp(()=>/firefox/i.test(navigator.userAgent)),Xp=qp(()=>!!window.safari);class Nd{interpolate(t){const{xs:s,ys:o,c1s:i,c2s:n,c3s:r}=this;let a=s.length-1;if(t===s[a])return o[a];let l=0,c=r.length-1,d;for(;l<=c;){d=Math.floor(.5*(l+c));const g=s[d];if(g<t)l=d+1;else if(g>t)c=d-1;else return o[d]}a=Math.max(0,c);const u=t-s[a],h=u*u;return o[a]+i[a]*u+n[a]*h+r[a]*u*h}constructor(t,s){const{length:o}=t,i=[];for(let g=0;g<o;g++)i.push(g);i.sort((g,f)=>t[g]<t[f]?-1:1);const n=[],r=[];let a,l;for(let g=0;g<o-1;g++)a=t[g+1]-t[g],l=s[g+1]-s[g],n.push(a),r.push(l/a);const c=[r[0]];for(let g=0;g<n.length-1;g++){const f=r[g],m=r[g+1];if(f*m<=0)c.push(0);else{a=n[g];const v=n[g+1],w=a+v;c.push(3*w/((w+v)/f+(w+a)/m))}}c.push(r[r.length-1]);const d=[],u=[];let h;for(let g=0;g<c.length-1;g++){h=r[g];const f=c[g],m=1/n[g],v=f+c[g+1]-h-h;d.push((h-f-v)*m),u.push(v*m*m)}this.xs=t,this.ys=s,this.c1s=c,this.c2s=d,this.c3s=u}}const W6=1;function Jp(e){const t=e.nodeType===W6?e:e.parentElement;if(!t)return null;const{top:s,left:o}=t.getBoundingClientRect();return{x:o,y:s}}function Hi(e){return{x:e.clientX,y:e.clientY}}function _6(e){var t;return e.nodeName==="IMG"&&(z6()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function U6(e,t,s,o){let i=e?t.width:s,n=e?t.height:o;return Xp()&&e&&(n/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:n}}function j6(e,t,s,o,i){const n=_6(t),a=Jp(n?e:t),l={x:s.x-a.x,y:s.y-a.y},{offsetWidth:c,offsetHeight:d}=e,{anchorX:u,anchorY:h}=o,{dragPreviewWidth:g,dragPreviewHeight:f}=U6(n,t,c,d),m=()=>{let x=new Nd([0,.5,1],[l.y,l.y/d*f,l.y+f-d]).interpolate(h);return Xp()&&n&&(x+=(window.devicePixelRatio-1)*f),x},v=()=>new Nd([0,.5,1],[l.x,l.x/c*g,l.x+g-c]).interpolate(u),{offsetX:w,offsetY:b}=i,S=w===0||w,R=b===0||b;return{x:S?w:v(),y:R?b:m()}}class $6{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,s){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=s}}function K6(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Gd(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){K6(e,i,s[i])})}return e}class q6{profile(){var t,s;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((s=this.dragOverTargetIds)===null||s===void 0?void 0:s.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var s;(s=this.window)===null||s===void 0||s.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,s,o){return this.sourcePreviewNodeOptions.set(t,o),this.sourcePreviewNodes.set(t,s),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,s,o){this.sourceNodes.set(t,s),this.sourceNodeOptions.set(t,o);const i=r=>this.handleDragStart(r,t),n=r=>this.handleSelectStart(r);return s.setAttribute("draggable","true"),s.addEventListener("dragstart",i),s.addEventListener("selectstart",n),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),s.removeEventListener("dragstart",i),s.removeEventListener("selectstart",n),s.setAttribute("draggable","false")}}connectDropTarget(t,s){const o=r=>this.handleDragEnter(r,t),i=r=>this.handleDragOver(r,t),n=r=>this.handleDrop(r,t);return s.addEventListener("dragenter",o),s.addEventListener("dragover",i),s.addEventListener("drop",n),()=>{s.removeEventListener("dragenter",o),s.removeEventListener("dragover",i),s.removeEventListener("drop",n)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourceNodeOptions.get(t);return Gd({dropEffect:this.altKeyPressed?"copy":"move"},s||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourcePreviewNodeOptions.get(t);return Gd({anchorX:.5,anchorY:.5,captureDraggingState:!1},s||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Hd).some(s=>Hd[s]===t)}beginDragNativeItem(t,s){this.clearCurrentDragSourceNode(),this.currentNativeSource=B6(t,s),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const s=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var o;return(o=this.rootElement)===null||o===void 0?void 0:o.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},s)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,s){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(s))}handleDragEnter(t,s){this.dragEnterTargetIds.unshift(s)}handleDragOver(t,s){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(s)}handleDrop(t,s){this.dropTargetIds.unshift(s)}constructor(t,s,o){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const n=this.sourceNodes.get(i);return n&&Jp(n)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:n}=this;this.dragStartSourceIds=null;const r=Hi(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(n||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:a}=i,l=Br(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const d=this.monitor.getSourceId(),u=this.sourceNodes.get(d),h=this.sourcePreviewNodes.get(d)||u;if(h){const{anchorX:g,anchorY:f,offsetX:m,offsetY:v}=this.getCurrentSourcePreviewNodeOptions(),S=j6(u,h,r,{anchorX:g,anchorY:f},{offsetX:m,offsetY:v});a.setDragImage(h,S.x,S.y)}}try{a?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:c}=this.getCurrentSourcePreviewNodeOptions();c?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(l)this.beginDragNativeItem(l);else{if(a&&!a.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var n;(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:a}=i,l=Br(a);l&&this.beginDragNativeItem(l,a)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:n}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,n.length>0&&this.actions.hover(n,{clientOffset:Hi(i)}),n.some(a=>this.monitor.canDropOnTarget(a))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var n;(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:n}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=Hi(i),this.scheduleHover(n),(n||[]).some(a=>this.monitor.canDropOnTarget(a))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var n;i.preventDefault(),(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(i.dataTransfer)}else Br(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:n}=this;this.dropTargetIds=[],this.actions.hover(n,{clientOffset:Hi(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const n=i.target;typeof n.dragDrop=="function"&&(n.tagName==="INPUT"||n.tagName==="SELECT"||n.tagName==="TEXTAREA"||n.isContentEditable||(i.preventDefault(),n.dragDrop()))},this.options=new $6(s,o),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new G6(this.isNodeInDocument)}}const Y6=function(t,s,o){return new q6(t,s,o)},Z6=({onChange:e,emptyTextFirstLine:t,emptyTextSecondLine:s,emptyButtonLabel:o,acceptTypes:i,maxFilesCount:n,multiple:r,fileFormatError:a,fileCountError:l,getIsFileFormatError:c})=>{const d=p.useRef(null),u=p.useRef(null),[h,g]=p.useState([]),[f,m]=p.useState(!1),v=p.useCallback(F=>{const P=F.target.files;if(P&&P.length>0){const B=Array.from(P);c?.(B)?m(!0):e(B)}},[c,e]),w=p.useCallback(F=>n&&F?.length>n,[n]),b=p.useMemo(()=>f||w(h),[f,h,w]),S=()=>{g([]),m(!1)};p.useEffect(()=>{S()},[i]);const[{isOver:R,canDrop:y},x]=pu(()=>({accept:[Gl],drop(F){const P=F.files;!c?.(P)&&!w(P)&&e(P),S()},collect:F=>({isOver:F.isOver(),canDrop:F.canDrop()})}),[v]),D=F=>{(F.key==="Enter"||F.key==="Space")&&(F.preventDefault(),u.current?.click())},M=F=>{F?.preventDefault();const P=Array.from(F.dataTransfer?.items??[]);m(!!c?.(P)),g(P)},L=F=>{F.target===F.currentTarget&&S()},I=W("border border-dashed rounded w-full cursor-pointer relative h-full hover:border-hover",!y&&!b&&"border-primary",y&&(R?"border-accent-primary":"border-hover"),b&&"border-error");return x(d),C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:I,ref:d,onDragOver:M,onDragLeave:L,children:[C.jsxs("label",{htmlFor:"file",tabIndex:0,onKeyDown:D,className:"flex flex-col items-center cursor-pointer h-full w-full text-secondary dial-tiny justify-center",children:[t&&C.jsx("p",{className:"mb-1",children:t}),s&&C.jsx("p",{className:"mb-0.5",children:s}),o&&C.jsx(Ie,{variant:De.Tertiary,title:o,onClick:()=>u.current?.click()})]}),C.jsx("input",{multiple:r,id:"file",type:"file",ref:u,hidden:!0,accept:i,onChange:v})]}),C.jsx(C.Fragment,{children:f?C.jsx(rs,{errorText:a}):w(h)&&C.jsx(rs,{errorText:l})})]})},Q6=({iconBefore:e,cssClass:t,errorText:s,...o})=>{const i=o.invalid,n=()=>C.jsx("div",{className:"mr-2",children:i?C.jsx(K.IconExclamationCircle,{...ke,className:"text-error"}):e});return C.jsx(fo,{...o,iconBefore:n(),tooltipTriggerClassName:"flex-1 min-w-0",cssClass:W(i?"text-error":"",t),tooltipText:i&&s?s:void 0,hideBorder:!0})},X6=e=>{const{files:t,iconBeforeInput:s,dynamicIcon:o,onChange:i,isInvalid:n,errorText:r,removeButtonAriaLabel:a}=e,l=(u,h)=>{u.stopPropagation(),i(t?.filter(g=>g.name!==h)||[])},c=u=>C.jsx(yu,{ariaLabel:a,onClick:h=>l(h,u)}),d=u=>{i(u)};return!t||t.length===0?C.jsx(PC,{backend:Y6,children:C.jsx(Z6,{...e,onChange:d})}):C.jsx("div",{className:"flex-1 min-h-0 border border-solid border-primary rounded",children:t&&t.length>0&&C.jsx("div",{className:"max-h-full overflow-y-auto",children:t.map((u,h)=>C.jsx(Q6,{elementId:u.name,value:u.name,iconAfter:c(u.name),iconBefore:s||o?.(u.name),invalid:n?.(u),errorText:r},u.name+h))})})},J6=({onChange:e,fieldTitle:t,elementId:s,files:o,maxFilesCount:i,fileFormatError:n,fileCountError:r,multiple:a=!0,acceptTypes:l,deleteAllButtonLabel:c,addButtonLabel:d,...u})=>{const h=p.useRef(null),g=()=>h.current?.click(),f=()=>{e([])},m=p.useCallback(w=>w?.some(b=>b.type===""||!(l==="/"||l?.toLowerCase()?.includes(b?.type?.toLowerCase()))),[l]),v=p.useCallback(w=>{const b=w.target.files;if(b&&b.length>0){const S=Array.from(b);m(S)||e([...o||[],...S])}},[e,o,m]);return C.jsxs("div",{className:"h-full flex flex-col",children:[C.jsxs("div",{className:"flex justify-between items-center pb-1 min-h-[42px]",children:[C.jsx(Vs,{fieldTitle:`${t}: ${a?o?.length||0:""}`,htmlFor:s}),a&&!!o?.length&&C.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[C.jsx(Ie,{variant:De.Tertiary,cssClass:"!text-error",iconBefore:C.jsx(K.IconTrashX,{...ke}),title:c,onClick:f}),(i?i>o?.length:!0)&&C.jsx(Ie,{variant:De.Tertiary,iconBefore:C.jsx(K.IconPlus,{...ke}),title:d,onClick:g})]})]}),o&&o.length>0&&C.jsx("input",{id:"file",type:"file",multiple:a,ref:h,hidden:!0,accept:l,onChange:v}),C.jsx(X6,{files:o,onChange:e,acceptTypes:l,maxFilesCount:i,multiple:a,fileFormatError:n,fileCountError:r,getIsFileFormatError:m,...u})]})};var En=(e=>(e.MyFiles="my_files",e.Shared="shared",e.Organization="organization",e))(En||{});const eI=e=>{const[t,s]=p.useState(En.MyFiles),o=n=>{s(n)},i=p.useMemo(()=>{if(e)return Object.values(En).map(n=>({id:n,name:e?.[n]||n.replace("_"," ")}))},[e]);return{activeTab:t,handleTabChange:o,tabs:i}};exports.AlertVariant=Ss;exports.ButtonVariant=De;exports.ConfirmationPopupVariant=ei;exports.DialAlert=jf;exports.DialAutocompleteInput=P6;exports.DialAutocompleteInputValue=_a;exports.DialBreadcrumb=Su;exports.DialBreadcrumbItem=bu;exports.DialButton=Ie;exports.DialButtonDropdown=Up;exports.DialCheckbox=Qo;exports.DialCloseButton=Wa;exports.DialCollapsibleSidebar=su;exports.DialConfirmationPopup=$v;exports.DialDraggableItem=dv;exports.DialDropdown=Ut;exports.DialEllipsisTooltip=Tt;exports.DialErrorText=rs;exports.DialFieldLabel=Vs;exports.DialFileIcon=fu;exports.DialFileManager=x6;exports.DialFileManagerNavigationPanel=Du;exports.DialFileManagerTabs=En;exports.DialFileName=Ba;exports.DialFolderName=za;exports.DialFormItem=Tn;exports.DialFormPopup=Qv;exports.DialIcon=we;exports.DialInput=fo;exports.DialInputPopup=Eu;exports.DialLabelledText=rm;exports.DialLoadFileAreaField=J6;exports.DialLoader=Pn;exports.DialNoDataContent=ka;exports.DialNumberInputField=Ov;exports.DialPasswordInput=jp;exports.DialPasswordInputField=D6;exports.DialPopup=Nn;exports.DialRadioButton=eu;exports.DialRadioGroup=tu;exports.DialRadioGroupPopupField=Kv;exports.DialRemoveButton=yu;exports.DialSearch=Ua;exports.DialSelect=Kp;exports.DialSelectField=O6;exports.DialSharedEntityIndicator=Va;exports.DialSteps=Jf;exports.DialSwitch=Fu;exports.DialTab=No;exports.DialTabs=vu;exports.DialTag=In;exports.DialTagInput=T6;exports.DialTextAreaField=Nv;exports.DialTextInputField=Hv;exports.DialTextarea=Ru;exports.DialTooltip=hs;exports.DropdownType=mu;exports.FormItemOrientation=Xo;exports.PopupSize=Vt;exports.RadioGroupOrientation=Jo;exports.SearchSize=ti;exports.StepStatus=tt;exports.TabOrientation=en;exports.TagVariant=Mn;exports.mergeClasses=ue;exports.useDialFileManagerTabs=eI;