@epam/ai-dial-ui-kit 0.10.0-dev.57 → 0.10.0-dev.58

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.
@@ -3,7 +3,7 @@
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,ie,oe,Te,oe),L[oe+ie]=!0)}if(oe=null,K!==void 0&&(s(K),oe=""+K),r(z)&&(s(z.key),oe=""+z.key),"key"in z){K={};for(var ee in z)ee!=="key"&&(K[ee]=z[ee])}else K=z;return oe&&a(K,typeof M=="function"?M.displayName||M.name||"Unknown":M),c(M,oe,K,n(),we,N)}function u(M){h(M)?M._store&&(M._store.validated=1):typeof M=="object"&&M!==null&&M.$$typeof===D&&(M._payload.status==="fulfilled"?h(M._payload.value)&&M._payload.value._store&&(M._payload.value._store.validated=1):M._store&&(M._store.validated=1))}function h(M){return typeof M=="object"&&M!==null&&M.$$typeof===m}var g=p,m=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),y=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),k=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,U=Array.isArray,I=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(M){return M()}};var H,W={},V=g.react_stack_bottom_frame.bind(g,o)(),Z=I(i(o)),L={};lr.Fragment=C,lr.jsx=function(M,z,K){var ie=1e4>k.recentlyCreatedOwnerStacks++;return d(M,z,K,!1,ie?Error("react-stack-top-frame"):V,ie?I(i(M)):Z)},lr.jsxs=function(M,z,K){var ie=1e4>k.recentlyCreatedOwnerStacks++;return d(M,z,K,!0,ie?Error("react-stack-top-frame"):V,ie?I(i(M)):Z)}})()),lr}var ug;function w0(){return ug||(ug=1,process.env.NODE_ENV==="production"?Va.exports=v0():Va.exports=C0()),Va.exports}var f=w0();const b0=(e,t)=>{const s=new Array(e.length+t.length);for(let i=0;i<e.length;i++)s[i]=e[i];for(let i=0;i<t.length;i++)s[e.length+i]=t[i];return s},x0=(e,t)=>({classGroupId:e,validator:t}),qm=(e=new Map,t=null,s)=>({nextPart:e,validators:t,classGroupId:s}),Fl="-",hg=[],y0="arbitrary..",S0=e=>{const t=F0(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return R0(r);const a=r.split(Fl),l=a[0]===""&&a.length>1?1:0;return Km(a,l,t)},getConflictingClassGroupIds:(r,a)=>{if(a){const l=i[r],c=s[r];return l?c?b0(c,l):l:c||hg}return s[r]||hg}}},Km=(e,t,s)=>{if(e.length-t===0)return s.classGroupId;const n=e[t],o=s.nextPart.get(n);if(o){const c=Km(e,t+1,o);if(c)return c}const r=s.validators;if(r===null)return;const a=t===0?e.join(Fl):e.slice(t).join(Fl),l=r.length;for(let c=0;c<l;c++){const d=r[c];if(d.validator(a))return d.classGroupId}},R0=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),s=t.indexOf(":"),i=t.slice(0,s);return i?y0+i:void 0})(),F0=e=>{const{theme:t,classGroups:s}=e;return E0(s,t)},E0=(e,t)=>{const s=qm();for(const i in e){const n=e[i];wh(n,s,i,t)}return s},wh=(e,t,s,i)=>{const n=e.length;for(let o=0;o<n;o++){const r=e[o];D0(r,t,s,i)}},D0=(e,t,s,i)=>{if(typeof e=="string"){P0(e,t,s);return}if(typeof e=="function"){T0(e,t,s,i);return}k0(e,t,s,i)},P0=(e,t,s)=>{const i=e===""?t:Ym(t,e);i.classGroupId=s},T0=(e,t,s,i)=>{if(I0(e)){wh(e(i),t,s,i);return}t.validators===null&&(t.validators=[]),t.validators.push(x0(s,e))},k0=(e,t,s,i)=>{const n=Object.entries(e),o=n.length;for(let r=0;r<o;r++){const[a,l]=n[r];wh(l,Ym(t,a),s,i)}},Ym=(e,t)=>{let s=e;const i=t.split(Fl),n=i.length;for(let o=0;o<n;o++){const r=i[o];let a=s.nextPart.get(r);a||(a=qm(),s.nextPart.set(r,a)),s=a}return s},I0=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,M0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),i=Object.create(null);const n=(o,r)=>{s[o]=r,t++,t>e&&(t=0,i=s,s=Object.create(null))};return{get(o){let r=s[o];if(r!==void 0)return r;if((r=i[o])!==void 0)return n(o,r),r},set(o,r){o in s?s[o]=r:n(o,r)}}},bu="!",pg=":",A0=[],gg=(e,t,s,i,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:i,isExternal:n}),L0=e=>{const{prefix:t,experimentalParseClassName:s}=e;let i=n=>{const o=[];let r=0,a=0,l=0,c;const d=n.length;for(let v=0;v<d;v++){const C=n[v];if(r===0&&a===0){if(C===pg){o.push(n.slice(l,v)),l=v+1;continue}if(C==="/"){c=v;continue}}C==="["?r++:C==="]"?r--:C==="("?a++:C===")"&&a--}const u=o.length===0?n:n.slice(l);let h=u,g=!1;u.endsWith(bu)?(h=u.slice(0,-1),g=!0):u.startsWith(bu)&&(h=u.slice(1),g=!0);const m=c&&c>l?c-l:void 0;return gg(o,g,h,m)};if(t){const n=t+pg,o=i;i=r=>r.startsWith(n)?o(r.slice(n.length)):gg(A0,!1,r,void 0,!0)}if(s){const n=i;i=o=>s({className:o,parseClassName:n})}return i},O0=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((s,i)=>{t.set(s,1e6+i)}),s=>{const i=[];let n=[];for(let o=0;o<s.length;o++){const r=s[o],a=r[0]==="[",l=t.has(r);a||l?(n.length>0&&(n.sort(),i.push(...n),n=[]),i.push(r)):n.push(r)}return n.length>0&&(n.sort(),i.push(...n)),i}},N0=e=>({cache:M0(e.cacheSize),parseClassName:L0(e),sortModifiers:O0(e),...S0(e)}),H0=/\s+/,G0=(e,t)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:n,sortModifiers:o}=t,r=[],a=e.trim().split(H0);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:u,modifiers:h,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:v}=s(d);if(u){l=d+(l.length>0?" "+l:l);continue}let C=!!v,w=i(C?m.substring(0,v):m);if(!w){if(!C){l=d+(l.length>0?" "+l:l);continue}if(w=i(m),!w){l=d+(l.length>0?" "+l:l);continue}C=!1}const b=h.length===0?"":h.length===1?h[0]:o(h).join(":"),x=g?b+bu:b,y=x+w;if(r.indexOf(y)>-1)continue;r.push(y);const S=n(w,C);for(let F=0;F<S.length;++F){const R=S[F];r.push(x+R)}l=d+(l.length>0?" "+l:l)}return l},B0=(...e)=>{let t=0,s,i,n="";for(;t<e.length;)(s=e[t++])&&(i=Zm(s))&&(n&&(n+=" "),n+=i);return n},Zm=e=>{if(typeof e=="string")return e;let t,s="";for(let i=0;i<e.length;i++)e[i]&&(t=Zm(e[i]))&&(s&&(s+=" "),s+=t);return s},V0=(e,...t)=>{let s,i,n,o;const r=l=>{const c=t.reduce((d,u)=>u(d),e());return s=N0(c),i=s.cache.get,n=s.cache.set,o=a,a(l)},a=l=>{const c=i(l);if(c)return c;const d=G0(l,s);return n(l,d),d};return o=r,(...l)=>o(B0(...l))},z0=[],pt=e=>{const t=s=>s[e]||z0;return t.isThemeGetter=!0,t},Xm=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qm=/^\((?:(\w[\w-]*):)?(.+)\)$/i,W0=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,j0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_0=/\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$/,U0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,q0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ui=e=>W0.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),hi=e=>!!e&&Number.isInteger(Number(e)),Cd=e=>e.endsWith("%")&&Le(e.slice(0,-1)),Ks=e=>j0.test(e),Jm=()=>!0,K0=e=>_0.test(e)&&!U0.test(e),bh=()=>!1,Y0=e=>$0.test(e),Z0=e=>q0.test(e),X0=e=>!fe(e)&&!me(e),Q0=e=>Ai(e,sv,bh),fe=e=>Xm.test(e),Ui=e=>Ai(e,iv,K0),fg=e=>Ai(e,rx,Le),J0=e=>Ai(e,ov,Jm),ex=e=>Ai(e,nv,bh),mg=e=>Ai(e,ev,bh),tx=e=>Ai(e,tv,Z0),za=e=>Ai(e,rv,Y0),me=e=>Qm.test(e),cr=e=>Dn(e,iv),sx=e=>Dn(e,nv),vg=e=>Dn(e,ev),ix=e=>Dn(e,sv),nx=e=>Dn(e,tv),Wa=e=>Dn(e,rv,!0),ox=e=>Dn(e,ov,!0),Ai=(e,t,s)=>{const i=Xm.exec(e);return i?i[1]?t(i[1]):s(i[2]):!1},Dn=(e,t,s=!1)=>{const i=Qm.exec(e);return i?i[1]?t(i[1]):s:!1},ev=e=>e==="position"||e==="percentage",tv=e=>e==="image"||e==="url",sv=e=>e==="length"||e==="size"||e==="bg-size",iv=e=>e==="length",rx=e=>e==="number",nv=e=>e==="family-name",ov=e=>e==="number"||e==="weight",rv=e=>e==="shadow",ax=()=>{const e=pt("color"),t=pt("font"),s=pt("text"),i=pt("font-weight"),n=pt("tracking"),o=pt("leading"),r=pt("breakpoint"),a=pt("container"),l=pt("spacing"),c=pt("radius"),d=pt("shadow"),u=pt("inset-shadow"),h=pt("text-shadow"),g=pt("drop-shadow"),m=pt("blur"),v=pt("perspective"),C=pt("aspect"),w=pt("ease"),b=pt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...y(),me,fe],F=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],E=()=>[me,fe,l],D=()=>[ui,"full","auto",...E()],T=()=>[hi,"none","subgrid",me,fe],P=()=>["auto",{span:["full",hi,me,fe]},hi,me,fe],k=()=>[hi,"auto",me,fe],A=()=>["auto","min","max","fr",me,fe],U=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...E()],W=()=>[ui,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],V=()=>[ui,"screen","full","dvw","lvw","svw","min","max","fit",...E()],Z=()=>[ui,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],L=()=>[e,me,fe],M=()=>[...y(),vg,mg,{position:[me,fe]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",ix,Q0,{size:[me,fe]}],ie=()=>[Cd,cr,Ui],we=()=>["","none","full",c,me,fe],N=()=>["",Le,cr,Ui],oe=()=>["solid","dashed","dotted","double"],Te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[Le,Cd,vg,mg],le=()=>["","none",m,me,fe],$=()=>["none",Le,me,fe],he=()=>["none",Le,me,fe],G=()=>[Le,me,fe],ne=()=>[ui,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ks],breakpoint:[Ks],color:[Jm],container:[Ks],"drop-shadow":[Ks],ease:["in","out","in-out"],font:[X0],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ks],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ks],shadow:[Ks],spacing:["px",Le],text:[Ks],"text-shadow":[Ks],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ui,fe,me,C]}],container:["container"],columns:[{columns:[Le,fe,me,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:S()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[hi,"auto",me,fe]}],basis:[{basis:[ui,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,ui,"auto","initial","none",fe]}],grow:[{grow:["",Le,me,fe]}],shrink:[{shrink:["",Le,me,fe]}],order:[{order:[hi,"first","last","none",me,fe]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mbs:[{mbs:H()}],mbe:[{mbe:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...Z()]}],"min-block-size":[{"min-block":["auto",...Z()]}],"max-block-size":[{"max-block":["none",...Z()]}],w:[{w:[a,"screen",...W()]}],"min-w":[{"min-w":[a,"screen","none",...W()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",s,cr,Ui]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ox,J0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Cd,fe]}],"font-family":[{font:[sx,ex,t]}],"font-features":[{"font-features":[fe]}],"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:[n,me,fe]}],"line-clamp":[{"line-clamp":[Le,"none",me,fg]}],leading:[{leading:[o,...E()]}],"list-image":[{"list-image":["none",me,fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",me,Ui]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Le,"auto",me,fe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,fe]}],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",me,fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hi,me,fe],radial:["",me,fe],conic:[hi,me,fe]},nx,tx]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:we()}],"rounded-s":[{"rounded-s":we()}],"rounded-e":[{"rounded-e":we()}],"rounded-t":[{"rounded-t":we()}],"rounded-r":[{"rounded-r":we()}],"rounded-b":[{"rounded-b":we()}],"rounded-l":[{"rounded-l":we()}],"rounded-ss":[{"rounded-ss":we()}],"rounded-se":[{"rounded-se":we()}],"rounded-ee":[{"rounded-ee":we()}],"rounded-es":[{"rounded-es":we()}],"rounded-tl":[{"rounded-tl":we()}],"rounded-tr":[{"rounded-tr":we()}],"rounded-br":[{"rounded-br":we()}],"rounded-bl":[{"rounded-bl":we()}],"border-w":[{border:N()}],"border-w-x":[{"border-x":N()}],"border-w-y":[{"border-y":N()}],"border-w-s":[{"border-s":N()}],"border-w-e":[{"border-e":N()}],"border-w-bs":[{"border-bs":N()}],"border-w-be":[{"border-be":N()}],"border-w-t":[{"border-t":N()}],"border-w-r":[{"border-r":N()}],"border-w-b":[{"border-b":N()}],"border-w-l":[{"border-l":N()}],"divide-x":[{"divide-x":N()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":N()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,me,fe]}],"outline-w":[{outline:["",Le,cr,Ui]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",d,Wa,za]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",u,Wa,za]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:N()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Le,Ui]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":N()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",h,Wa,za]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Le,me,fe]}],"mix-blend":[{"mix-blend":[...Te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Te()}],"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":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[me,fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":y()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,fe]}],filter:[{filter:["","none",me,fe]}],blur:[{blur:le()}],brightness:[{brightness:[Le,me,fe]}],contrast:[{contrast:[Le,me,fe]}],"drop-shadow":[{"drop-shadow":["","none",g,Wa,za]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Le,me,fe]}],"hue-rotate":[{"hue-rotate":[Le,me,fe]}],invert:[{invert:["",Le,me,fe]}],saturate:[{saturate:[Le,me,fe]}],sepia:[{sepia:["",Le,me,fe]}],"backdrop-filter":[{"backdrop-filter":["","none",me,fe]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Le,me,fe]}],"backdrop-contrast":[{"backdrop-contrast":[Le,me,fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,me,fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,me,fe]}],"backdrop-invert":[{"backdrop-invert":["",Le,me,fe]}],"backdrop-opacity":[{"backdrop-opacity":[Le,me,fe]}],"backdrop-saturate":[{"backdrop-saturate":[Le,me,fe]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,me,fe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",me,fe]}],ease:[{ease:["linear","initial",w,me,fe]}],delay:[{delay:[Le,me,fe]}],animate:[{animate:["none",b,me,fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,me,fe]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:$()}],"rotate-x":[{"rotate-x":$()}],"rotate-y":[{"rotate-y":$()}],"rotate-z":[{"rotate-z":$()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:G()}],"skew-x":[{"skew-x":G()}],"skew-y":[{"skew-y":G()}],transform:[{transform:[me,fe,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",me,fe]}],"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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",me,fe]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Le,cr,Ui,fg]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},lx=V0(ax);function J(...e){return lx(ae(e))}var El=(e=>(e.Description="description",e.Error="error",e))(El||{});const Jr=({text:e,className:t,variant:s=El.Description,...i})=>e?f.jsx("span",{...i,role:"alert",className:J("dial-tiny-text",s===El.Error?"text-error":"text-secondary",t),children:e}):null,ds=({...e})=>f.jsx(Jr,{...e,variant:El.Error});var Ye=(e=>(e.Primary="primary",e.Neutral="neutral",e.Error="error",e.Success="Success",e.Secondary="secondary",e.Tertiary="tertiary",e))(Ye||{}),Ae=(e=>(e.Solid="solid",e.Outlined="outlined",e.Ghost="ghost",e.Link="link",e))(Ae||{});const Cg={[Ye.Primary]:{[Ae.Solid]:"dial-primary-solid-button",[Ae.Ghost]:"dial-primary-ghost-button",[Ae.Link]:"dial-primary-link-button"},[Ye.Neutral]:{[Ae.Outlined]:"dial-neutral-outlined-button"},[Ye.Error]:{[Ae.Solid]:"dial-error-solid-button",[Ae.Ghost]:"dial-error-ghost-button",[Ae.Outlined]:"dial-error-outlined-button"},[Ye.Success]:{[Ae.Ghost]:"dial-success-ghost-button"},[Ye.Secondary]:{[Ae.Ghost]:"dial-secondary-ghost-button"},[Ye.Tertiary]:{[Ae.Ghost]:"dial-tertiary-ghost-button"}},av=(e=Ye.Primary,t=Ae.Solid)=>{const s=Cg[e]?.[t];return s||(console.warn(`Could not find Button styles for variant: ${e} and appearance: ${t}. Using default primary solid button styles.`),Cg[Ye.Primary][Ae.Solid])},cx=7,dx=2,lv=p.createContext(null),cv=()=>{const e=p.useContext(lv);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},ux=({initialOpen:e=!1,placement:t="bottom",isTriggerClickable:s=!1,open:i,onOpenChange:n}={})=>{const[o,r]=p.useState(e),a=p.useRef(null),l=i??o,c=n??r,d=De.useFloating({placement:t,open:l,onOpenChange:c,whileElementsMounted:De.autoUpdate,middleware:[De.offset(cx+dx),De.flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"start",padding:5}),De.shift({padding:5}),De.arrow({element:a})]}),u=De.useHover(d.context,{move:!1,enabled:i==null,mouseOnly:s,delay:{open:500,close:0}}),h=De.useFocus(d.context,{enabled:i==null}),g=De.useDismiss(d.context),m=De.useRole(d.context,{role:"tooltip"}),v=De.useInteractions([u,h,g,m]);return p.useEffect(()=>{if(!l)return;const C=d.refs.reference.current;if(!(C instanceof Element))return;const w=new IntersectionObserver(([b])=>{b.isIntersecting||c(!1)},{root:null,threshold:0});return w.observe(C),()=>w.disconnect()},[l,d.refs.reference,c]),p.useMemo(()=>({open:l,setOpen:c,arrowRef:a,...v,...d}),[l,c,v,d])},xh=({children:e,...t})=>{const s=ux(t);return f.jsx(lv.Provider,{value:s,children:e})},yh=({style:e,...t})=>{const s=cv(),i=p.useRef(null),n=De.useMergeRefs([s.refs.setFloating,i]);return s.open?f.jsx(De.FloatingPortal,{id:"tooltip-portal",children:f.jsxs("div",{ref:n,style:{...s.floatingStyles,...e},...s.getFloatingProps(t),className:ae("z-[55] whitespace-pre-wrap break-words rounded border border-primary bg-layer-0 px-2 py-1 dial-tiny-text shadow max-w-[300px]",s.getFloatingProps(t).className),children:[t.children,f.jsx(De.FloatingArrow,{ref:s.arrowRef,context:s.context,fill:"currentColor",strokeWidth:1,className:"stroke-primary text-[var(--bg-layer-0,_#000000)]"})]})}):null},Sh=({children:e,asChild:t=!1,...s})=>{const i=cv(),n=t&&p.isValidElement(e),o=n?e.props?.ref:null,r=De.useMergeRefs([i.refs.setReference,...o?[o]:[]]);return n?p.cloneElement(e,i.getReferenceProps({...e.props,...s,ref:r})):f.jsx("span",{ref:r,...i.getReferenceProps(s),className:s.className??"dial-tooltip-trigger text-left",children:e})},Ot=({hideTooltip:e,tooltip:t,children:s,triggerClassName:i,contentClassName:n,...o})=>f.jsxs(xh,{...o,children:[f.jsx(Sh,{className:ae(i,"truncate"),children:s}),f.jsx(yh,{className:ae("text-primary",n,"max-w-[300px]",(e||!t)&&"hidden"),children:t})]});var nt=(e=>(e.Small="small",e.Standard="standard",e))(nt||{});const Gs=({variant:e,appearance:t=Ae.Solid,size:s=nt.Standard,className:i,icon:n,tooltipProps:o,type:r="button",...a})=>{const l=J(e&&av(e,t),s===nt.Small?"h-[24px] w-[24px]":"h-[40px] w-[40px]","dial-icon-button disabled:cursor-not-allowed focus-visible:outline outline-offset-0 disabled:text-controls-secondary-disable",i),c=f.jsx("button",{...a,type:r,className:l,"aria-label":a["aria-label"],children:n});return o?f.jsx(Ot,{...o,children:c}):c},hx="w-[24px] h-[24px] border border-solid rounded-[6px] border-transparent flex items-center justify-center text-secondary hover:text-controls-accent-primary-hover active:text-controls-accent-primary-active focus-within:border-focus";var ct=(e=>(e[e.LG=24]="LG",e[e.MD=20]="MD",e[e.SM=16]="SM",e))(ct||{});const $t=18,te={size:$t,stroke:2},dv=({caption:e,onClick:t})=>{if(!e)return null;const s=f.jsx(Gs,{"aria-label":e,className:hx,icon:f.jsx(j.IconInfoCircle,{size:ct.SM}),onClick:t});return e?f.jsx(Ot,{tooltip:e,triggerClassName:"flex justify-center items-center",children:s}):s},Pn=({label:e,required:t,className:s,caption:i,...n})=>e?f.jsxs("label",{...n,className:J("dial-tiny-text text-secondary flex items-center gap-1",s),children:[typeof e=="string"?f.jsx("span",{className:"min-h-4",children:e}):e,t&&f.jsx("span",{className:"text-accent-primary",children:"*"}),f.jsx(dv,{caption:i})]}):null,Be=({icon:e,className:t})=>e?f.jsx("span",{className:ae("flex-shrink-0",t),children:e}):null,us=({label:e,variant:t,appearance:s=Ae.Solid,size:i=nt.Standard,className:n,textClassName:o,iconAfter:r,iconBefore:a,hideTitleOnMobile:l,type:c="button",tooltipProps:d,...u})=>{const h=ae(l?"hidden sm:inline":"inline",o),g=J(t&&av(t,s),i===nt.Small?"dial-tiny-semi-text":"dial-small-semi-text",s!==Ae.Link&&(i===nt.Small?"h-[24px] px-2":"h-[40px] px-3"),"disabled:cursor-not-allowed focus-visible:outline outline-offset-0",n),m=f.jsxs("button",{...u,type:c,className:g,"aria-label":typeof e=="string"&&e||u["aria-label"],children:[f.jsx(Be,{icon:a}),e&&f.jsx("span",{className:h,children:e}),f.jsx(Be,{icon:r})]});return d?f.jsx(Ot,{...d,children:m}):m};var rs=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e.Loading="loading",e))(rs||{});const uv=({size:e=24,className:t,fullWidth:s=!1,ariaLabel:i="Loading"})=>f.jsx("div",{role:"status",className:J("flex items-center justify-center",{"size-full":s},t),children:f.jsx("div",{role:"img","aria-label":i,style:{width:e,height:e},className:"rounded-full border-2 border-secondary border-t-accent-primary animate-spin-steps shrink-0"})}),px=e=>({info:f.jsx(j.IconInfoCircleFilled,{size:e.size}),error:f.jsx(j.IconAlertCircleFilled,{size:e.size}),warning:f.jsx(j.IconAlertTriangleFilled,{size:e.size}),success:f.jsx(j.IconCircleCheckFilled,{size:e.size}),loading:f.jsx(uv,{size:e.size})}),gx={[rs.Info]:"bg-info border-info text-info",[rs.Success]:"bg-success border-success text-success",[rs.Warning]:"bg-warning border-warning text-warning",[rs.Error]:"bg-error border-error text-error",[rs.Loading]:"bg-info border-info text-info"},fx="items-center justify-between gap-3 p-3 border border-solid dial-small-text-150 rounded shadow flex",hv=({variant:e=rs.Info,title:t,message:s,className:i,iconSize:n=24,iconStroke:o=2,closable:r=!1,onClose:a,children:l,...c})=>{const d=p.useMemo(()=>px({size:n})[e],[e,n,o]);return f.jsxs("div",{...c,role:"alert",className:J(fx,gx[e],i),children:[f.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[f.jsx(Be,{icon:d}),t?f.jsxs("div",{className:"flex flex-col gap-1 text-primary",children:[f.jsx("div",{className:"dial-small-semi-text",children:t}),f.jsx("div",{className:"dial-small-text",children:s})]}):f.jsx("div",{className:"dial-small-text text-primary",children:s})]}),l,r&&f.jsx(us,{className:"ml-2 text-secondary hover:text-primary","aria-label":"Close alert",iconBefore:f.jsx(j.IconX,{size:ct.LG}),onClick:a})]})},mx="flex items-center justify-center text-secondary",vx="shrink-0 grow-0 basis-auto animate-spin-steps",Cx=e=>ye.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),ea=({size:e=18,className:t,iconClassName:s,fullWidth:i=!0,ariaLabel:n="Loading"})=>f.jsx("div",{role:"status",className:ae({[mx]:!0,"w-full h-full":i,[t||""]:!!t}),children:f.jsx(Be,{icon:f.jsx(Cx,{width:e,height:e,className:ae(vx,s),role:"img","aria-label":n})})});var pv=(e=>(e.Small="sm",e.Medium="md",e))(pv||{});const wx={sm:"h-1",md:"h-2"},bx=({value:e,max:t=100,size:s="md",className:i,ariaLabel:n="Progress"})=>{const o=Math.min(Math.max(e,0),t),r=t>0?o/t*100:0;return f.jsx("div",{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":t,"aria-label":n,className:J("w-full overflow-hidden rounded-full bg-layer-4",wx[s],i),children:f.jsx("div",{className:"h-full rounded-full bg-controls-accent-primary transition-[width] duration-300",style:{width:`${r}%`}})})},xx=7,yx=2,Sx=e=>e<=0?[]:Array.from({length:e},(t,s)=>s+1),Rx=(e,t,s)=>e===t?"active":s<xx||Math.abs(e-t)<=yx?"adjacent":"far",Fx=({page:e,totalPages:t,onPageChange:s,className:i})=>{const n=Sx(t);return f.jsxs("nav",{"aria-label":"Pagination",className:J("flex items-center gap-2",i),children:[f.jsx(Gs,{icon:f.jsx(j.IconCaretLeftFilled,{size:ct.SM,className:"text-secondary"}),size:nt.Small,className:"!p-0 items-center flex justify-center",disabled:e<=1,onClick:()=>s(e-1),"aria-label":"Previous page"}),f.jsx("div",{className:"flex flex-row items-center gap-2",children:n.map(o=>{const r=Rx(o,e,t);return f.jsx("button",{type:"button",onClick:()=>s(o),"aria-label":`Page ${o}`,"aria-current":o===e?"page":void 0,className:J("bg-secondary rounded-full focus-visible:outline outline-offset-0 transition-all duration-300 ease-in-out",r==="active"&&"h-[8px] w-[32px]",r==="adjacent"&&"size-[8px]",r==="far"&&"size-[4px]")},o)})}),f.jsx(Gs,{icon:f.jsx(j.IconCaretRightFilled,{size:ct.SM,className:"text-secondary"}),size:nt.Small,className:"!p-0 items-center flex justify-center",disabled:e>=t,onClick:()=>s(e+1),"aria-label":"Next page"})]})},Ex="text-primary",vt=({text:e,className:t,contentClassName:s,hideTooltip:i,id:n,customTooltipContent:o,...r})=>{const a=p.useRef(null),[l,c]=p.useState(!1),[d,u]=p.useState(""),h=p.useRef(null),g=()=>{const w=a.current;if(!w)return;u(w.textContent??"");const b=w.clientWidth,x=w.scrollWidth,y=Math.ceil(w.getBoundingClientRect().width);c(x>b||x>y)},m=p.useCallback(()=>{h.current&&cancelAnimationFrame(h.current),h.current=requestAnimationFrame(g)},[]);p.useEffect(()=>{m();const w=()=>m();window.addEventListener("resize",w);let b=null;return"ResizeObserver"in window&&a.current&&(b=new ResizeObserver(()=>m()),b.observe(a.current)),()=>{window.removeEventListener("resize",w),b&&b.disconnect(),h.current&&cancelAnimationFrame(h.current)}},[e,m]);const v=p.useMemo(()=>typeof e=="string"?e:d,[d,e]),C=p.useMemo(()=>i?"":o||(l?v:""),[o,v,i,l]);return f.jsxs(xh,{...r,children:[f.jsx(Sh,{asChild:!0,onMouseEnter:m,onFocusCapture:m,children:f.jsx("span",{id:n,className:J("block truncate flex-1 min-w-0 max-w-full text-left",t),"aria-label":l?v:void 0,onMouseEnter:m,onFocus:m,ref:a,children:e})}),f.jsx(yh,{className:J(Ex,s,!C&&"hidden"),children:C})]})},xu="checkbox-container",yu=({label:e,id:t,checked:s,indeterminate:i,disabled:n,ariaLabel:o,onChange:r,className:a,...l})=>{const c=p.useCallback(g=>{r?.(g.target.checked,t)},[r,t]),d=ae("flex flex-row items-center cursor-pointer text-accent-primary small-medium min-w-0",`${s||i?"":'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded'}`,n?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",a),u=ae("border rounded",n?"bg-layer-4 border-icon-secondary":""),h=()=>i?f.jsx(j.IconMinus,{className:u,...te}):s?f.jsx(j.IconCheck,{className:u,...te}):null;return f.jsxs("label",{...l,className:d,htmlFor:t,"aria-description":l["aria-description"]||xu,children:[h(),e&&(typeof e=="string"?f.jsx(vt,{text:e,className:"ml-2 text-primary"}):e),f.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:c,id:t,checked:s,"aria-checked":i?"mixed":s,"aria-disabled":n||void 0,"aria-label":e?void 0:o,className:"invisible size-0"})]})};var Yt=(e=>(e.VALID="valid",e.ERROR="error",e))(Yt||{});const Dx=(e,t)=>{if(t===e.id)switch(e.status){case Yt.VALID:return"border-accent-secondary text-primary";case Yt.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case Yt.VALID:return"border-primary text-primary";case Yt.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},Px=(e,t)=>{if(t===e.id)switch(e.status){case Yt.VALID:return"bg-accent-secondary";case Yt.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case Yt.VALID:return"bg-accent-secondary";case Yt.ERROR:return"bg-red-400";default:return"bg-layer-4"}},Tx=({step:e,index:t,currentStep:s,onChangeStep:i})=>{const n="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny-text cursor-pointer dial-step",o="w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full text-white",r=()=>s===e.id&&e.status===Yt.ERROR?f.jsx(j.IconExclamationCircle,{stroke:2,size:ct.SM}):s!==e.id&&e.status===Yt.VALID?f.jsx(j.IconCheck,{stroke:2,size:ct.SM}):t+1;return f.jsxs("button",{className:ae(n,Dx(e,s)),onClick:()=>i(e.id),children:[f.jsx("span",{className:ae(o,Px(e,s)),children:r()}),f.jsx("span",{children:e.name})]})},kx=({steps:e,currentStep:t,onChangeStep:s})=>{const i=n=>{const o=e.findIndex(l=>l.id===t),r=e.findIndex(l=>l.id===n);if(n===t)return;(e.slice(0,r).every(l=>l.status===Yt.VALID)||r<o)&&s(n)};return f.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((n,o)=>f.jsx(Tx,{currentStep:t,onChangeStep:i,step:n,index:o},n.id))})},nn=({name:e,value:t,label:s,description:i,checked:n=!1,inputId:o,className:r,labelClassName:a,disabled:l,onChange:c,descriptionClassName:d,caption:u})=>{const h=`${o}-desc`,g=ae("dial-small-text cursor-pointer py-[1px]",l?"text-secondary":"text-primary",a,l&&"cursor-not-allowed"),m=ae("cursor-pointer dial-input-radio",!!s&&"mr-2",r,l&&"!cursor-not-allowed"),v=ae("flex flex-col",!!i&&"mb-2",l&&"cursor-not-allowed"),C=ae("dial-tiny-text mt-2 ml-[26px] text-secondary",d,l&&"cursor-not-allowed"),w=b=>{l||b.target.checked&&c?.(t)};return f.jsxs("div",{className:v,children:[f.jsxs("div",{className:ae("flex flex-row",!u&&"items-center"),children:[f.jsx("input",{type:"radio",id:o,name:e,value:t,checked:n,disabled:l,"aria-describedby":n&&i?h:void 0,className:m,onChange:w}),(s||u)&&f.jsxs("div",{className:"flex flex-col gap-1",children:[s&&f.jsx("label",{className:g,htmlFor:o,"aria-describedby":u?"caption":"",children:s}),u&&f.jsx("span",{id:"caption",className:"dial-tiny-text text-secondary",children:u})]})]}),n&&i&&f.jsx("div",{id:h,className:C,children:i})]})};var Nr=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(Nr||{});const Ix="w-full flex gap-1",Mx={[Nr.Vertical]:"flex-col",[Nr.Horizontal]:"flex-row items-end"},cc=({id:e,label:t,required:s,description:i,error:n,orientation:o=Nr.Vertical,labelVisuallyHidden:r=!1,className:a,labelClassName:l,errorClassName:c,childrenClassName:d,captionDescription:u,readonly:h,value:g,defaultEmptyText:m,children:v})=>{const C=`${e}-label`,w=i?`${e}-desc`:void 0,b=n?`${e}-err`:void 0,x=`${e}-caption-desc`,y=[w,b].filter(Boolean).join(" ")||void 0,S=p.useCallback(()=>typeof n=="boolean"?null:typeof n=="string"||typeof n>"u"?n?f.jsx("div",{id:b,"aria-live":"polite",className:c,children:f.jsx(ds,{text:n})}):null:f.jsx("div",{id:b,role:"alert","aria-live":"polite",className:c,children:n}),[n,c,b]),F=p.useCallback(()=>g?typeof g=="string"||typeof g=="number"?f.jsx("span",{"aria-readonly":"true",children:g}):g:f.jsx("span",{className:"flex min-h-4","aria-readonly":"true",children:m??"None"}),[g,m]);return f.jsxs("div",{role:"group","aria-labelledby":t?C:void 0,"aria-describedby":y,className:J(Ix,Mx[o],a),children:[t&&f.jsx("div",{id:C,className:J(o==="horizontal"&&"shrink-0"),children:f.jsx(Pn,{htmlFor:e,label:t,required:s,className:J(r&&"sr-only",l),caption:i})}),f.jsxs("div",{className:J("min-w-0 w-full",d),children:[h?f.jsx("div",{className:"dial-input px-3 py-2",children:F()}):v,u&&f.jsx("div",{id:x,className:J({"dial-tiny-text text-secondary mt-1":!0,"text-error":!!n}),children:u}),S()]})]})};var hn=(e=>(e.Row="Row",e.Column="Column",e))(hn||{});const Ax="flex",Lx="pb-1 mt-2",Ox={[hn.Column]:"flex-col gap-y-3",[hn.Row]:"flex-row gap-x-6"},Dl=({fieldTitle:e,radioClassName:t,containerClassName:s,selectedItemClassName:i,selectedLabelClassName:n,radioGroupClassName:o,inputContainerClassName:r,selectedInputContainerClassName:a,groupLabelClassName:l,formItemChildrenClassName:c,labelClassName:d,disabled:u,elementId:h,radioButtons:g,activeRadioButton:m,orientation:v,onChange:C})=>f.jsx(cc,{id:h,label:e,labelClassName:l||d,className:s,childrenClassName:c,children:f.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":u||void 0,className:J(Ax,Ox[v],o),children:g.map(w=>f.jsxs("div",{className:J("flex flex-col",r,w.id===m&&a),children:[f.jsx(nn,{name:h,value:w.id,inputId:`${h}-${w.id}`,disabled:u,className:t,labelClassName:J(d,w.id===m&&n),label:w.name,caption:w.caption,checked:w.id===m,onChange:()=>C(w.id)}),w.id===m&&w.content?f.jsx("div",{className:J(Lx,i),children:w.content}):null]},w.id))})}),ta=({icon:e,title:t,description:s,containerClassName:i,titleClassName:n,descriptionClassName:o})=>f.jsxs("div",{className:J("h-full w-full flex flex-col items-center justify-center text-secondary",i),"aria-label":"no-data-container",children:[e||f.jsx(j.IconClipboardX,{width:60,height:60,stroke:.5}),f.jsx("span",{className:J("dial-small-text mt-2 text-primary",n),"aria-label":"no-results-title",children:t}),s&&f.jsx("span",{className:J("mt-1 text-primary",o),"aria-label":"no-results-description",children:s})]}),wd=48,gv=({containerClassName:e,children:t,width:s=280,title:i,iconSize:n=24,iconStroke:o=1.5,titleClassName:r,additionalButtons:a,isOpened:l,onToggle:c})=>{const[d,u]=p.useState(s),[h,g]=p.useState(!0),m=p.useMemo(()=>typeof l=="boolean",[l]),v=m?l:h;p.useEffect(()=>{m&&u(l?s:wd)},[m,l,s]);const C=J(["transform rotate-180 [writing-mode:tb-rl] py-4 px-3",v&&"hidden",r]),w=J(["flex flex-row gap-2 cursor-pointer text-secondary py-2 items-center",v?"justify-end px-4":"justify-center"]),b=x=>{const y=!v;if(m){u(y?s:wd),c?.(y,x);return}u(y?s:wd),g(y)};return f.jsxs("div",{className:J(["rounded flex flex-col justify-between",e]),style:{width:`${d}px`},"aria-label":"collapsible-sidebar",children:[f.jsx("div",{className:J(["flex-1 p-4 min-h-0 overflow-auto",!v&&"hidden"]),children:t}),f.jsx("div",{className:C,children:i}),f.jsxs("div",{className:J("border-t border-tertiary h-12",w),children:[v&&a,f.jsx(Gs,{className:"hover:text-accent-primary",onClick:b,"aria-label":"sidebar-state",size:nt.Small,icon:v?f.jsx(j.IconChevronsLeft,{size:n,stroke:o}):f.jsx(j.IconChevronsRight,{size:n,stroke:o})})]})]})},Nx=({label:e,text:t,tooltip:s,children:i,postfix:n,className:o})=>f.jsxs("div",{className:J("flex flex-col",i?"":"max-w-[200px]",o),children:[e&&f.jsx("label",{className:"dial-tiny-text mb-2 text-secondary",children:e}),i||f.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[f.jsx(Ot,{triggerClassName:"text-primary flex-1 min-w-0",tooltip:s||t,children:t}),n||null]})]});var dc=(e=>(e.Default="default",e))(dc||{});const Hx={[dc.Default]:"border-icon-secondary bg-layer-3"},io=({tag:e,className:t,remove:s,variant:i=dc.Default,iconBefore:n,bordered:o=!0})=>{const r=Hx[i],a=J("flex items-center gap-1 dial-tiny-text rounded p-1 h-[22px] text-primary",r,o?"border":"border-transparent",t);return f.jsxs("div",{className:a,children:[f.jsx(Be,{icon:n}),f.jsx(vt,{text:e}),s&&f.jsx(us,{className:"p-0",iconAfter:f.jsx(j.IconX,{size:ct.SM}),onClick:l=>s(l)})]},e)},fv=p.createContext({dragDropManager:void 0});function ts(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 wg=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),bg=function(){return Math.random().toString(36).substring(7).split("").join(".")},xg={INIT:"@@redux/INIT"+bg(),REPLACE:"@@redux/REPLACE"+bg()};function Gx(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 Bx(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(Wx(e))return"date";if(zx(e))return"error";var s=Vx(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 Vx(e){return typeof e.constructor=="function"?e.constructor.name:null}function zx(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Wx(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Kn(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Bx(e)),t}function mv(e,t,s){var i;if(typeof t=="function"&&typeof s=="function"||typeof s=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?ts(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"?ts(1):"Expected the enhancer to be a function. Instead, received: '"+Kn(s)+"'");return s(mv)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?ts(2):"Expected the root reducer to be a function. Instead, received: '"+Kn(e)+"'");var n=e,o=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"?ts(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 o}function u(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?ts(4):"Expected the listener to be a function. Instead, received: '"+Kn(v)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?ts(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 C=!0;return c(),a.push(v),function(){if(C){if(l)throw new Error(process.env.NODE_ENV==="production"?ts(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.");C=!1,c();var b=a.indexOf(v);a.splice(b,1),r=null}}}function h(v){if(!Gx(v))throw new Error(process.env.NODE_ENV==="production"?ts(7):"Actions must be plain objects. Instead, the actual type was: '"+Kn(v)+"'. 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 v.type>"u")throw new Error(process.env.NODE_ENV==="production"?ts(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"?ts(9):"Reducers may not dispatch actions.");try{l=!0,o=n(o,v)}finally{l=!1}for(var C=r=a,w=0;w<C.length;w++){var b=C[w];b()}return v}function g(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?ts(10):"Expected the nextReducer to be a function. Instead, received: '"+Kn(v));n=v,h({type:xg.REPLACE})}function m(){var v,C=u;return v={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?ts(11):"Expected the observer to be an object. Instead, received: '"+Kn(b)+"'");function x(){b.next&&b.next(d())}x();var y=C(x);return{unsubscribe:y}}},v[wg]=function(){return this},v}return h({type:xg.INIT}),i={dispatch:h,subscribe:u,getState:d,replaceReducer:g},i[wg]=m,i}function Ie(e,t,...s){if(jx()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let i;if(t===void 0)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let n=0;i=new Error(t.replace(/%s/g,function(){return s[n++]})),i.name="Invariant Violation"}throw i.framesToPop=1,i}}function jx(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function _x(e,t,s){return t.split(".").reduce((i,n)=>i&&i[n]?i[n]:s||null,e)}function Ux(e,t){return e.filter(s=>s!==t)}function vv(e){return typeof e=="object"}function $x(e,t){const s=new Map,i=o=>{s.set(o,s.has(o)?s.get(o)+1:1)};e.forEach(i),t.forEach(i);const n=[];return s.forEach((o,r)=>{o===1&&n.push(r)}),n}function qx(e,t){return e.filter(s=>t.indexOf(s)>-1)}const Rh="dnd-core/INIT_COORDS",uc="dnd-core/BEGIN_DRAG",Fh="dnd-core/PUBLISH_DRAG_SOURCE",hc="dnd-core/HOVER",pc="dnd-core/DROP",gc="dnd-core/END_DRAG";function yg(e,t){return{type:Rh,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const Kx={type:Rh,payload:{clientOffset:null,sourceClientOffset:null}};function Yx(e){return function(s=[],i={publishSource:!0}){const{publishSource:n=!0,clientOffset:o,getSourceClientOffset:r}=i,a=e.getMonitor(),l=e.getRegistry();e.dispatch(yg(o)),Zx(s,a,l);const c=Jx(s,a);if(c==null){e.dispatch(Kx);return}let d=null;if(o){if(!r)throw new Error("getSourceClientOffset must be defined");Xx(r),d=r(c)}e.dispatch(yg(o,d));const h=l.getSource(c).beginDrag(a,c);if(h==null)return;Qx(h),l.pinSource(c);const g=l.getSourceType(c);return{type:uc,payload:{itemType:g,item:h,sourceId:c,clientOffset:o||null,sourceClientOffset:d||null,isSourcePublic:!!n}}}}function Zx(e,t,s){Ie(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(i){Ie(s.getSource(i),"Expected sourceIds to be registered.")})}function Xx(e){Ie(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Qx(e){Ie(vv(e),"Item must be an object.")}function Jx(e,t){let s=null;for(let i=e.length-1;i>=0;i--)if(t.canDragSource(e[i])){s=e[i];break}return s}function ey(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function ty(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable}))),i.forEach(function(n){ey(e,n,s[n])})}return e}function sy(e){return function(s={}){const i=e.getMonitor(),n=e.getRegistry();iy(i),ry(i).forEach((r,a)=>{const l=ny(r,a,n,i),c={type:pc,payload:{dropResult:ty({},s,l)}};e.dispatch(c)})}}function iy(e){Ie(e.isDragging(),"Cannot call drop while not dragging."),Ie(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function ny(e,t,s,i){const n=s.getTarget(e);let o=n?n.drop(i,e):void 0;return oy(o),typeof o>"u"&&(o=t===0?{}:i.getDropResult()),o}function oy(e){Ie(typeof e>"u"||vv(e),"Drop result must either be an object or undefined.")}function ry(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function ay(e){return function(){const s=e.getMonitor(),i=e.getRegistry();ly(s);const n=s.getSourceId();return n!=null&&(i.getSource(n,!0).endDrag(s,n),i.unpinSource()),{type:gc}}}function ly(e){Ie(e.isDragging(),"Cannot call endDrag while not dragging.")}function Su(e,t){return t===null?e===null:Array.isArray(e)?e.some(s=>s===t):e===t}function cy(e){return function(s,{clientOffset:i}={}){dy(s);const n=s.slice(0),o=e.getMonitor(),r=e.getRegistry(),a=o.getItemType();return hy(n,r,a),uy(n,o,r),py(n,o,r),{type:hc,payload:{targetIds:n,clientOffset:i||null}}}}function dy(e){Ie(Array.isArray(e),"Expected targetIds to be an array.")}function uy(e,t,s){Ie(t.isDragging(),"Cannot call hover while not dragging."),Ie(!t.didDrop(),"Cannot call hover after drop.");for(let i=0;i<e.length;i++){const n=e[i];Ie(e.lastIndexOf(n)===i,"Expected targetIds to be unique in the passed array.");const o=s.getTarget(n);Ie(o,"Expected targetIds to be registered.")}}function hy(e,t,s){for(let i=e.length-1;i>=0;i--){const n=e[i],o=t.getTargetType(n);Su(o,s)||e.splice(i,1)}}function py(e,t,s){e.forEach(function(i){s.getTarget(i).hover(t,i)})}function gy(e){return function(){if(e.getMonitor().isDragging())return{type:Fh}}}function fy(e){return{beginDrag:Yx(e),publishDragSource:gy(e),hover:cy(e),drop:sy(e),endDrag:ay(e)}}class my{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 i(o){return(...r)=>{const a=o.apply(t,r);typeof a<"u"&&s(a)}}const n=fy(this);return Object.keys(n).reduce((o,r)=>{const a=n[r];return o[r]=i(a),o},{})}dispatch(t){this.store.dispatch(t)}constructor(t,s){this.isSetUp=!1,this.handleRefCountChange=()=>{const i=this.store.getState().refCount>0;this.backend&&(i&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!i&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=s,t.subscribe(this.handleRefCountChange)}}function vy(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Cv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Cy(e){const{clientOffset:t,initialClientOffset:s,initialSourceClientOffset:i}=e;return!t||!s||!i?null:Cv(vy(t,i),s)}function wy(e){const{clientOffset:t,initialClientOffset:s}=e;return!t||!s?null:Cv(t,s)}const yr=[],Eh=[];yr.__IS_NONE__=!0;Eh.__IS_ALL__=!0;function by(e,t){return e===yr?!1:e===Eh||typeof t>"u"?!0:qx(t,e).length>0}class xy{subscribeToStateChange(t,s={}){const{handlerIds:i}=s;Ie(typeof t=="function","listener must be a function."),Ie(typeof i>"u"||Array.isArray(i),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;const o=()=>{const r=this.store.getState(),a=r.stateId;try{a===n||a===n+1&&!by(r.dirtyHandlerIds,i)||t()}finally{n=a}};return this.store.subscribe(o)}subscribeToOffsetChange(t){Ie(typeof t=="function","listener must be a function.");let s=this.store.getState().dragOffset;const i=()=>{const n=this.store.getState().dragOffset;n!==s&&(s=n,t())};return this.store.subscribe(i)}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 i=this.registry.getTargetType(t),n=this.getItemType();return Su(i,n)&&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 i=this.registry.getSourceType(t),n=this.getItemType();return i!==n?!1:s.isDragging(this,t)}isOverTarget(t,s={shallow:!1}){if(!t)return!1;const{shallow:i}=s;if(!this.isDragging())return!1;const n=this.registry.getTargetType(t),o=this.getItemType();if(o&&!Su(n,o))return!1;const r=this.getTargetIds();if(!r.length)return!1;const a=r.indexOf(t);return i?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 Cy(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return wy(this.store.getState().dragOffset)}constructor(t,s){this.store=t,this.registry=s}}const Sg=typeof global<"u"?global:self,wv=Sg.MutationObserver||Sg.WebKitMutationObserver;function bv(e){return function(){const s=setTimeout(n,0),i=setInterval(n,50);function n(){clearTimeout(s),clearInterval(i),e()}}}function yy(e){let t=1;const s=new wv(e),i=document.createTextNode("");return s.observe(i,{characterData:!0}),function(){t=-t,i.data=t}}const Sy=typeof wv=="function"?yy:bv;class Ry{enqueueTask(t){const{queue:s,requestFlush:i}=this;s.length||(i(),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 i=0,n=t.length-this.index;i<n;i++)t[i]=t[i+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=Sy(this.flush),this.requestErrorThrow=bv(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Fy{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 Ey{create(t){const s=this.freeTasks,i=s.length?s.pop():new Fy(this.onError,n=>s[s.length]=n);return i.task=t,i}constructor(t){this.onError=t,this.freeTasks=[]}}const xv=new Ry,Dy=new Ey(xv.registerPendingError);function Py(e){xv.enqueueTask(Dy.create(e))}const Dh="dnd-core/ADD_SOURCE",Ph="dnd-core/ADD_TARGET",Th="dnd-core/REMOVE_SOURCE",fc="dnd-core/REMOVE_TARGET";function Ty(e){return{type:Dh,payload:{sourceId:e}}}function ky(e){return{type:Ph,payload:{targetId:e}}}function Iy(e){return{type:Th,payload:{sourceId:e}}}function My(e){return{type:fc,payload:{targetId:e}}}function Ay(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 Ly(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 Ru(e,t){if(t&&Array.isArray(e)){e.forEach(s=>Ru(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 ns;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(ns||(ns={}));let Oy=0;function Ny(){return Oy++}function Hy(e){const t=Ny().toString();switch(e){case ns.SOURCE:return`S${t}`;case ns.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function Rg(e){switch(e[0]){case"S":return ns.SOURCE;case"T":return ns.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Fg(e,t){const s=e.entries();let i=!1;do{const{done:n,value:[,o]}=s.next();if(o===t)return!0;i=!!n}while(!i);return!1}class Gy{addSource(t,s){Ru(t),Ay(s);const i=this.addHandler(ns.SOURCE,t,s);return this.store.dispatch(Ty(i)),i}addTarget(t,s){Ru(t,!0),Ly(s);const i=this.addHandler(ns.TARGET,t,s);return this.store.dispatch(ky(i)),i}containsHandler(t){return Fg(this.dragSources,t)||Fg(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 Rg(t)===ns.SOURCE}isTargetId(t){return Rg(t)===ns.TARGET}removeSource(t){Ie(this.getSource(t),"Expected an existing source."),this.store.dispatch(Iy(t)),Py(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){Ie(this.getTarget(t),"Expected an existing target."),this.store.dispatch(My(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,i){const n=Hy(t);return this.types.set(n,s),t===ns.SOURCE?this.dragSources.set(n,i):t===ns.TARGET&&this.dropTargets.set(n,i),n}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const By=(e,t)=>e===t;function Vy(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function zy(e,t,s=By){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(!s(e[i],t[i]))return!1;return!0}function Wy(e=yr,t){switch(t.type){case hc:break;case Dh:case Ph:case fc:case Th:return yr;case uc:case Fh:case gc:case pc:default:return Eh}const{targetIds:s=[],prevTargetIds:i=[]}=t.payload,n=$x(s,i);if(!(n.length>0||!zy(s,i)))return yr;const r=i[i.length-1],a=s[s.length-1];return r!==a&&(r&&n.push(r),a&&n.push(a)),n}function jy(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function _y(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable}))),i.forEach(function(n){jy(e,n,s[n])})}return e}const Eg={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Uy(e=Eg,t){const{payload:s}=t;switch(t.type){case Rh:case uc:return{initialSourceClientOffset:s.sourceClientOffset,initialClientOffset:s.clientOffset,clientOffset:s.clientOffset};case hc:return Vy(e.clientOffset,s.clientOffset)?e:_y({},e,{clientOffset:s.clientOffset});case gc:case pc:return Eg;default:return e}}function $y(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Yn(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable}))),i.forEach(function(n){$y(e,n,s[n])})}return e}const qy={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ky(e=qy,t){const{payload:s}=t;switch(t.type){case uc:return Yn({},e,{itemType:s.itemType,item:s.item,sourceId:s.sourceId,isSourcePublic:s.isSourcePublic,dropResult:null,didDrop:!1});case Fh:return Yn({},e,{isSourcePublic:!0});case hc:return Yn({},e,{targetIds:s.targetIds});case fc:return e.targetIds.indexOf(s.targetId)===-1?e:Yn({},e,{targetIds:Ux(e.targetIds,s.targetId)});case pc:return Yn({},e,{dropResult:s.dropResult,didDrop:!0,targetIds:[]});case gc:return Yn({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Yy(e=0,t){switch(t.type){case Dh:case Ph:return e+1;case Th:case fc:return e-1;default:return e}}function Zy(e=0){return e+1}function Xy(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Qy(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable}))),i.forEach(function(n){Xy(e,n,s[n])})}return e}function Jy(e={},t){return{dirtyHandlerIds:Wy(e.dirtyHandlerIds,{type:t.type,payload:Qy({},t.payload,{prevTargetIds:_x(e,"dragOperation.targetIds",[])})}),dragOffset:Uy(e.dragOffset,t),refCount:Yy(e.refCount,t),dragOperation:Ky(e.dragOperation,t),stateId:Zy(e.stateId)}}function eS(e,t=void 0,s={},i=!1){const n=tS(i),o=new xy(n,new Gy(n)),r=new my(n,o),a=e(r,t,s);return r.receiveBackend(a),r}function tS(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return mv(Jy,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function sS(e,t){if(e==null)return{};var s=iS(e,t),i,n;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)i=o[n],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(s[i]=e[i])}return s}function iS(e,t){if(e==null)return{};var s={},i=Object.keys(e),n,o;for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&(s[n]=e[n]);return s}let Dg=0;const cl=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var nS=p.memo(function(t){var{children:s}=t,i=sS(t,["children"]);const[n,o]=oS(i);return p.useEffect(()=>{if(o){const r=yv();return++Dg,()=>{--Dg===0&&(r[cl]=null)}}},[]),f.jsx(fv.Provider,{value:n,children:s})});function oS(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=rS(e.backend,e.context,e.options,e.debugMode),s=!e.context;return[t,s]}function rS(e,t=yv(),s,i){const n=t;return n[cl]||(n[cl]={dragDropManager:eS(e,t,s,i)}),n[cl]}function yv(){return typeof global<"u"?global:window}var bd,Pg;function aS(){return Pg||(Pg=1,bd=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 i,n,o;if(Array.isArray(t)){if(i=t.length,i!=s.length)return!1;for(n=i;n--!==0;)if(!e(t[n],s[n]))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(o=Object.keys(t),i=o.length,i!==Object.keys(s).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(s,o[n]))return!1;for(n=i;n--!==0;){var r=o[n];if(!e(t[r],s[r]))return!1}return!0}return t!==t&&s!==s}),bd}var lS=aS();const cS=f0(lS),pn=typeof window<"u"?p.useLayoutEffect:p.useEffect;function dS(e,t,s){const[i,n]=p.useState(()=>t(e)),o=p.useCallback(()=>{const r=t(e);cS(i,r)||(n(r),s&&s())},[i,e,s]);return pn(o),[i,o]}function uS(e,t,s){const[i,n]=dS(e,t,s);return pn(function(){const r=e.getHandlerId();if(r!=null)return e.subscribeToStateChange(n,{handlerIds:[r]})},[e,n]),i}function Sv(e,t,s){return uS(t,e||(()=>({})),()=>s.reconnect())}function Rv(e,t){const s=[...t||[]];return t==null&&typeof e!="function"&&s.push(e),p.useMemo(()=>typeof e=="function"?e():e,s)}function hS(e){return p.useMemo(()=>e.hooks.dragSource(),[e])}function pS(e){return p.useMemo(()=>e.hooks.dragPreview(),[e])}let xd=!1,yd=!1;class gS{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){Ie(!xd,"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 xd=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{xd=!1}}isDragging(){if(!this.sourceId)return!1;Ie(!yd,"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 yd=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{yd=!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 Sd=!1;class fS{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(!Sd,"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 Sd=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Sd=!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 mS(e,t,s){const i=s.getRegistry(),n=i.addTarget(e,t);return[n,()=>i.removeTarget(n)]}function vS(e,t,s){const i=s.getRegistry(),n=i.addSource(e,t);return[n,()=>i.removeSource(n)]}function Fu(e,t,s,i){let n;if(n!==void 0)return!!n;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let l=0;l<o.length;l++){const c=o[l];if(!a(c))return!1;const d=e[c],u=t[c];if(n=void 0,n===!1||n===void 0&&d!==u)return!1}return!0}function Eu(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function CS(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 wS(e){return(t=null,s=null)=>{if(!p.isValidElement(t)){const o=t;return e(o,s),o}const i=t;return CS(i),bS(i,s?o=>e(o,s):e)}}function Fv(e){const t={};return Object.keys(e).forEach(s=>{const i=e[s];if(s.endsWith("Ref"))t[s]=e[s];else{const n=wS(i);t[s]=()=>n}}),t}function Tg(e,t){typeof e=="function"?e(t):e.current=t}function bS(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:i=>{Tg(s,i),Tg(t,i)}}):p.cloneElement(e,{ref:t})}class xS{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,i=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(i&&this.disconnectDragPreview(),!!this.handlerId){if(!s){this.lastConnectedDragPreview=s;return}i&&(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!Fu(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Fu(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=Fv({dragSource:(s,i)=>{this.clearDragSource(),this.dragSourceOptions=i||null,Eu(s)?this.dragSourceRef=s:this.dragSourceNode=s,this.reconnectDragSource()},dragPreview:(s,i)=>{this.clearDragPreview(),this.dragPreviewOptions=i||null,Eu(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 yS{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!Fu(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=Fv({dropTarget:(s,i)=>{this.clearDropTarget(),this.dropTargetOptions=i,Eu(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 Lo(){const{dragDropManager:e}=p.useContext(fv);return Ie(e!=null,"Expected drag drop context"),e}function SS(e,t){const s=Lo(),i=p.useMemo(()=>new xS(s.getBackend()),[s]);return pn(()=>(i.dragSourceOptions=e||null,i.reconnect(),()=>i.disconnectDragSource()),[i,e]),pn(()=>(i.dragPreviewOptions=t||null,i.reconnect(),()=>i.disconnectDragPreview()),[i,t]),i}function RS(){const e=Lo();return p.useMemo(()=>new gS(e),[e])}class FS{beginDrag(){const t=this.spec,s=this.monitor;let i=null;return typeof t.item=="object"?i=t.item:typeof t.item=="function"?i=t.item(s):i={},i??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 i=this.spec,n=this.monitor,{isDragging:o}=i;return o?o(n):s===t.getSourceId()}endDrag(){const t=this.spec,s=this.monitor,i=this.connector,{end:n}=t;n&&n(s.getItem(),s),i.reconnect()}constructor(t,s,i){this.spec=t,this.monitor=s,this.connector=i}}function ES(e,t,s){const i=p.useMemo(()=>new FS(e,t,s),[t,s]);return p.useEffect(()=>{i.spec=e},[e]),i}function DS(e){return p.useMemo(()=>{const t=e.type;return Ie(t!=null,"spec.type must be defined"),t},[e])}function PS(e,t,s){const i=Lo(),n=ES(e,t,s),o=DS(e);pn(function(){if(o!=null){const[a,l]=vS(o,n,i);return t.receiveHandlerId(a),s.receiveHandlerId(a),l}},[i,t,s,n,o])}function TS(e,t){const s=Rv(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 i=RS(),n=SS(s.options,s.previewOptions);return PS(s,i,n),[Sv(s.collect,i,n),hS(n),pS(n)]}function kS(e){return p.useMemo(()=>e.hooks.dropTarget(),[e])}function IS(e){const t=Lo(),s=p.useMemo(()=>new yS(t.getBackend()),[t]);return pn(()=>(s.dropTargetOptions=e||null,s.reconnect(),()=>s.disconnectDropTarget()),[e]),s}function MS(){const e=Lo();return p.useMemo(()=>new fS(e),[e])}function AS(e){const{accept:t}=e;return p.useMemo(()=>(Ie(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class LS{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 OS(e,t){const s=p.useMemo(()=>new LS(e,t),[t]);return p.useEffect(()=>{s.spec=e},[e]),s}function NS(e,t,s){const i=Lo(),n=OS(e,t),o=AS(e);pn(function(){const[a,l]=mS(o,n,i);return t.receiveHandlerId(a),s.receiveHandlerId(a),l},[i,t,n,s,o.map(r=>r.toString()).join("|")])}function Ev(e,t){const s=Rv(e,t),i=MS(),n=IS(s.options);return NS(s,i,n),[Sv(s.collect,i,n),kS(n)]}const kg="column",HS="flex items-center",GS="mr-3 cursor-move text-secondary",BS=({id:e,children:t,className:s,onFind:i,onMove:n,ariaLabel:o="Drag item"})=>{const r=p.useRef(null),a=p.useRef(null),l=typeof i=="function"?i(e):-1,[{isDragging:c},d,u]=TS(()=>({type:kg,item:{id:e,originalIndex:l},collect:g=>{const m=g.getItem();return{isDragging:g.isDragging()&&m?.id===e}},end:(g,m)=>{if(!g)return;!m.didDrop()&&typeof n=="function"&&g.originalIndex>-1&&n(g.id,g.originalIndex)}}),[e,l,n]),[,h]=Ev(()=>({accept:kg,hover:g=>{if(!(!g||g.id===e)&&typeof i=="function"&&typeof n=="function"){const m=i(e);n(g.id,m)}}}),[i,n,e]);return u(h(a)),d(r),f.jsxs("div",{ref:a,className:J(HS,s),style:{opacity:c?0:1},"aria-roledescription":"Draggable item",children:[f.jsx("div",{ref:r,className:GS,"aria-label":o,children:f.jsx(j.IconGripVertical,{...te})}),t]})},VS=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"}),ye.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"}),ye.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"})),zS=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"})),WS=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"}),ye.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"})),jS=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"}),ye.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"}),ye.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"})),_S=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"}),ye.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"}),ye.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"}),ye.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"})),US=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"}),ye.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"})),$S=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"}),ye.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"})),Je=(e,t)=>f.jsx(e,{size:t.size??te.size,stroke:t.stroke??te.stroke,className:t.className}),$i=(e,t)=>f.jsx(e,{width:Number(t.size??te.size),height:Number(t.size??te.size),className:t.className}),Ig={".bmp":e=>Je(j.IconFileTypeBmp,e),".cpp":e=>$i(VS,e),".c":e=>$i(zS,e),".cs":e=>$i(WS,e),".css":e=>Je(j.IconFileTypeCss,e),".csv":e=>Je(j.IconFileTypeCsv,e),".doc":e=>Je(j.IconFileTypeDoc,e),".docx":e=>Je(j.IconFileTypeDocx,e),".html":e=>Je(j.IconFileTypeHtml,e),".ini":e=>$i(jS,e),".jpg":e=>Je(j.IconFileTypeJpg,e),".js":e=>Je(j.IconFileTypeJs,e),".json":e=>$i(_S,e),".jsx":e=>Je(j.IconFileTypeJsx,e),".md":e=>$i(US,e),".pdf":e=>Je(j.IconFileTypePdf,e),".php":e=>Je(j.IconFileTypePhp,e),".png":e=>Je(j.IconFileTypePng,e),".ppt":e=>Je(j.IconFileTypePpt,e),".py":e=>$i($S,e),".rs":e=>Je(j.IconFileTypeRs,e),".sql":e=>Je(j.IconFileTypeSql,e),".svg":e=>Je(j.IconFileTypeSvg,e),".ts":e=>Je(j.IconFileTypeTs,e),".tsx":e=>Je(j.IconFileTypeTsx,e),".txt":e=>Je(j.IconFileTypeTxt,e),".vue":e=>Je(j.IconFileTypeVue,e),".xls":e=>Je(j.IconFileTypeXls,e),".xml":e=>Je(j.IconFileTypeXml,e),".zip":e=>Je(j.IconFileTypeZip,e),default:e=>Je(j.IconFile,e)},kh=({extension:e,size:t=te.size,stroke:s=te.stroke,className:i,decorative:n=!1,label:o,indicator:r})=>{const a=(()=>{if(!e)return"";const u=e.trim().toLowerCase();return u.startsWith(".")?u:`.${u}`})(),c=(Ig[a]??Ig.default)({size:t,stroke:s}),d=typeof o=="string"?o:`${a.slice(1).toUpperCase()} file icon`;return f.jsxs("span",{className:ae("inline-flex relative",i),...n?{"aria-hidden":!0}:{role:"img","aria-label":d},children:[f.jsx(Be,{icon:c,className:"inline-block align-middle"}),r&&f.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:r})]})},Hr=({label:e="Shared entity",size:t=14,className:s,containerClassName:i,stroke:n=1.5,sharedIndicatorTooltip:o})=>f.jsx(Ot,{tooltip:o||"Shared",children:f.jsx(Be,{className:J("text-accent-primary flex bg-layer-3",i),icon:f.jsx(j.IconArrowUpRight,{size:t,stroke:n,"aria-label":typeof e=="string"?e:void 0,className:s,role:"img"})})}),mc=({name:e,className:t,shared:s=!1,iconSize:i=$t,details:n,sharedIndicatorClassName:o,sharedIndicatorTooltip:r,fileExtension:a,hideTooltip:l=!1,isInvalidName:c=!1,tooltipContent:d})=>{const u=a||(e.includes(".")?e.split(".").pop():void 0);return f.jsxs("div",{className:J("flex items-center gap-2 w-full",t),children:[f.jsx(kh,{extension:u,size:i,className:"text-secondary",indicator:s?f.jsx(Hr,{className:o,sharedIndicatorTooltip:r}):null,label:"File type icon"}),f.jsxs("div",{className:ae(["w-full flex min-w-0",n&&"flex-col gap-1"]),children:[f.jsx(vt,{className:ae(["dial-small-text flex-1 min-w-0",c?"text-secondary":"text-primary"]),text:e,id:"name",hideTooltip:l,customTooltipContent:d}),n]})]})},vc=({name:e,className:t,shared:s=!1,loading:i=!1,iconSize:n=$t,sharedIndicatorClassName:o,sharedIndicatorTooltip:r,hideTooltip:a=!1,isInvalidName:l=!1,tooltipContent:c})=>{const d=()=>i?f.jsx(ea,{size:n}):f.jsx(Be,{icon:f.jsx(j.IconFolder,{...te,size:n}),className:"inline-block align-middle"});return f.jsxs("div",{className:J("flex items-center gap-2 w-full",t),children:[f.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[d(),s&&f.jsx("span",{className:"absolute z-50 -bottom-0.5 -left-0.5",children:f.jsx(Hr,{className:o,sharedIndicatorTooltip:r})})]}),f.jsx(vt,{className:ae("dial-small-text flex-1 min-w-0",l?"text-secondary":"text-primary"),text:e,id:"name",hideTooltip:a,customTooltipContent:c})]})};var Gr=(e=>(e.Left="left",e.Right="right",e))(Gr||{}),ut=function(){return ut=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ut.apply(this,arguments)},Mg={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Ag={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ja={width:"20px",height:"20px",position:"absolute",zIndex:1},qS={top:ut(ut({},Mg),{top:"-5px"}),right:ut(ut({},Ag),{left:void 0,right:"-5px"}),bottom:ut(ut({},Mg),{top:void 0,bottom:"-5px"}),left:ut(ut({},Ag),{left:"-5px"}),topRight:ut(ut({},ja),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:ut(ut({},ja),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:ut(ut({},ja),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:ut(ut({},ja),{left:"-10px",top:"-10px",cursor:"nw-resize"})},KS=p.memo(function(e){var t=e.onResizeStart,s=e.direction,i=e.children,n=e.replaceStyles,o=e.className,r=p.useCallback(function(c){t(c,s)},[t,s]),a=p.useCallback(function(c){t(c,s)},[t,s]),l=p.useMemo(function(){return ut(ut({position:"absolute",userSelect:"none"},qS[s]),n??{})},[n,s]);return f.jsx("div",{className:o||void 0,style:l,onMouseDown:r,onTouchStart:a,children:i})}),YS=(function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},e(t,s)};return function(t,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(t,s);function i(){this.constructor=t}t.prototype=s===null?Object.create(s):(i.prototype=s.prototype,new i)}})(),ks=function(){return ks=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ks.apply(this,arguments)},ZS={width:"auto",height:"auto"},_a=function(e,t,s){return Math.max(Math.min(e,s),t)},Lg=function(e,t,s){var i=Math.round(e/t);return i*t+s*(i-1)},Zn=function(e,t){return new RegExp(e,"i").test(t)},Ua=function(e){return!!(e.touches&&e.touches.length)},XS=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},Og=function(e,t,s){s===void 0&&(s=0);var i=t.reduce(function(o,r,a){return Math.abs(r-e)<Math.abs(t[o]-e)?a:o},0),n=Math.abs(t[i]-e);return s===0||n<s?t[i]:e},Rd=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},$a=function(e,t,s,i){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var n=Number(e.replace("%",""))/100;return t*n}if(e.endsWith("vw")){var n=Number(e.replace("vw",""))/100;return s*n}if(e.endsWith("vh")){var n=Number(e.replace("vh",""))/100;return i*n}}return e},QS=function(e,t,s,i,n,o,r){return i=$a(i,e.width,t,s),n=$a(n,e.height,t,s),o=$a(o,e.width,t,s),r=$a(r,e.height,t,s),{maxWidth:typeof i>"u"?void 0:Number(i),maxHeight:typeof n>"u"?void 0:Number(n),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof r>"u"?void 0:Number(r)}},JS=function(e){return Array.isArray(e)?e:[e,e]},e2=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Ng="__resizable_base__",t2=(function(e){YS(t,e);function t(s){var i,n,o,r,a=e.call(this,s)||this;return a.ratio=1,a.resizable=null,a.parentLeft=0,a.parentTop=0,a.resizableLeft=0,a.resizableRight=0,a.resizableTop=0,a.resizableBottom=0,a.targetLeft=0,a.targetTop=0,a.delta={width:0,height:0},a.appendBase=function(){if(!a.resizable||!a.window)return null;var l=a.parentNode;if(!l)return null;var c=a.window.document.createElement("div");return c.style.width="100%",c.style.height="100%",c.style.position="absolute",c.style.transform="scale(0, 0)",c.style.left="0",c.style.flex="0 0 100%",c.classList?c.classList.add(Ng):c.className+=Ng,l.appendChild(c),c},a.removeBase=function(l){var c=a.parentNode;c&&c.removeChild(l)},a.state={isResizing:!1,width:(n=(i=a.propsSize)===null||i===void 0?void 0:i.width)!==null&&n!==void 0?n:"auto",height:(r=(o=a.propsSize)===null||o===void 0?void 0:o.height)!==null&&r!==void 0?r:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},a.onResizeStart=a.onResizeStart.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.onMouseUp=a.onMouseUp.bind(a),a}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ZS},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var s=0,i=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,o=this.resizable.offsetHeight,r=this.resizable.style.position;r!=="relative"&&(this.resizable.style.position="relative"),s=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:n,i=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=r}return{width:s,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var s=this,i=this.props.size,n=function(a){var l;if(typeof s.state[a]>"u"||s.state[a]==="auto")return"auto";if(s.propsSize&&s.propsSize[a]&&(!((l=s.propsSize[a])===null||l===void 0)&&l.toString().endsWith("%"))){if(s.state[a].toString().endsWith("%"))return s.state[a].toString();var c=s.getParentSize(),d=Number(s.state[a].toString().replace("px","")),u=d/c[a]*100;return"".concat(u,"%")}return Rd(s.state[a])},o=i&&typeof i.width<"u"&&!this.state.isResizing?Rd(i.width):n("width"),r=i&&typeof i.height<"u"&&!this.state.isResizing?Rd(i.height):n("height");return{width:o,height:r}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var s=this.appendBase();if(!s)return{width:0,height:0};var i=!1,n=this.parentNode.style.flexWrap;n!=="wrap"&&(i=!0,this.parentNode.style.flexWrap="wrap"),s.style.position="relative",s.style.minWidth="100%",s.style.minHeight="100%";var o={width:s.offsetWidth,height:s.offsetHeight};return i&&(this.parentNode.style.flexWrap=n),this.removeBase(s),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var s=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:s.flexBasis!=="auto"?s.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(s,i){var n=this.propsSize&&this.propsSize[i];return this.state[i]==="auto"&&this.state.original[i]===s&&(typeof n>"u"||n==="auto")?"auto":s},t.prototype.calculateNewMaxFromBoundary=function(s,i){var n=this.props.boundsByDirection,o=this.state.direction,r=n&&Zn("left",o),a=n&&Zn("top",o),l,c;if(this.props.bounds==="parent"){var d=this.parentNode;d&&(l=r?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),c=a?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=r?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=r?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(s=s&&s<l?s:l),c&&Number.isFinite(c)&&(i=i&&i<c?i:c),{maxWidth:s,maxHeight:i}},t.prototype.calculateNewSizeFromDirection=function(s,i){var n=this.props.scale||1,o=JS(this.props.resizeRatio||1),r=o[0],a=o[1],l=this.state,c=l.direction,d=l.original,u=this.props,h=u.lockAspectRatio,g=u.lockAspectRatioExtraHeight,m=u.lockAspectRatioExtraWidth,v=d.width,C=d.height,w=g||0,b=m||0;return Zn("right",c)&&(v=d.width+(s-d.x)*r/n,h&&(C=(v-b)/this.ratio+w)),Zn("left",c)&&(v=d.width-(s-d.x)*r/n,h&&(C=(v-b)/this.ratio+w)),Zn("bottom",c)&&(C=d.height+(i-d.y)*a/n,h&&(v=(C-w)*this.ratio+b)),Zn("top",c)&&(C=d.height-(i-d.y)*a/n,h&&(v=(C-w)*this.ratio+b)),{newWidth:v,newHeight:C}},t.prototype.calculateNewSizeFromAspectRatio=function(s,i,n,o){var r=this.props,a=r.lockAspectRatio,l=r.lockAspectRatioExtraHeight,c=r.lockAspectRatioExtraWidth,d=typeof o.width>"u"?10:o.width,u=typeof n.width>"u"||n.width<0?s:n.width,h=typeof o.height>"u"?10:o.height,g=typeof n.height>"u"||n.height<0?i:n.height,m=l||0,v=c||0;if(a){var C=(h-m)*this.ratio+v,w=(g-m)*this.ratio+v,b=(d-v)/this.ratio+m,x=(u-v)/this.ratio+m,y=Math.max(d,C),S=Math.min(u,w),F=Math.max(h,b),R=Math.min(g,x);s=_a(s,y,S),i=_a(i,F,R)}else s=_a(s,d,u),i=_a(i,h,g);return{newWidth:s,newHeight:i}},t.prototype.setBoundingClientRect=function(){var s=1/(this.props.scale||1);if(this.props.bounds==="parent"){var i=this.parentNode;if(i){var n=i.getBoundingClientRect();this.parentLeft=n.left*s,this.parentTop=n.top*s}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left*s,this.targetTop=o.top*s}if(this.resizable){var r=this.resizable.getBoundingClientRect(),a=r.left,l=r.top,c=r.right,d=r.bottom;this.resizableLeft=a*s,this.resizableRight=c*s,this.resizableTop=l*s,this.resizableBottom=d*s}},t.prototype.onResizeStart=function(s,i){if(!(!this.resizable||!this.window)){var n=0,o=0;if(s.nativeEvent&&XS(s.nativeEvent)?(n=s.nativeEvent.clientX,o=s.nativeEvent.clientY):s.nativeEvent&&Ua(s.nativeEvent)&&(n=s.nativeEvent.touches[0].clientX,o=s.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var r=this.props.onResizeStart(s,i,this.resizable);if(r===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var a,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var d=this.window.getComputedStyle(c).flexDirection;this.flexDir=d.startsWith("row")?"row":"column",a=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var u={original:{x:n,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ks(ks({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(s.target).cursor||"auto"}),direction:i,flexBasis:a};this.setState(u)}},t.prototype.onMouseMove=function(s){var i=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Ua(s))try{s.preventDefault(),s.stopPropagation()}catch{}var n=this.props,o=n.maxWidth,r=n.maxHeight,a=n.minWidth,l=n.minHeight,c=Ua(s)?s.touches[0].clientX:s.clientX,d=Ua(s)?s.touches[0].clientY:s.clientY,u=this.state,h=u.direction,g=u.original,m=u.width,v=u.height,C=this.getParentSize(),w=QS(C,this.window.innerWidth,this.window.innerHeight,o,r,a,l);o=w.maxWidth,r=w.maxHeight,a=w.minWidth,l=w.minHeight;var b=this.calculateNewSizeFromDirection(c,d),x=b.newHeight,y=b.newWidth,S=this.calculateNewMaxFromBoundary(o,r);this.props.snap&&this.props.snap.x&&(y=Og(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(x=Og(x,this.props.snap.y,this.props.snapGap));var F=this.calculateNewSizeFromAspectRatio(y,x,{width:S.maxWidth,height:S.maxHeight},{width:a,height:l});if(y=F.newWidth,x=F.newHeight,this.props.grid){var R=Lg(y,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),E=Lg(x,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),D=this.props.snapGap||0,T=D===0||Math.abs(R-y)<=D?R:y,P=D===0||Math.abs(E-x)<=D?E:x;y=T,x=P}var k={width:y-g.width,height:x-g.height};if(this.delta=k,m&&typeof m=="string"){if(m.endsWith("%")){var A=y/C.width*100;y="".concat(A,"%")}else if(m.endsWith("vw")){var U=y/this.window.innerWidth*100;y="".concat(U,"vw")}else if(m.endsWith("vh")){var I=y/this.window.innerHeight*100;y="".concat(I,"vh")}}if(v&&typeof v=="string"){if(v.endsWith("%")){var A=x/C.height*100;x="".concat(A,"%")}else if(v.endsWith("vw")){var U=x/this.window.innerWidth*100;x="".concat(U,"vw")}else if(v.endsWith("vh")){var I=x/this.window.innerHeight*100;x="".concat(I,"vh")}}var H={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(x,"height")};this.flexDir==="row"?H.flexBasis=H.width:this.flexDir==="column"&&(H.flexBasis=H.height);var W=this.state.width!==H.width,V=this.state.height!==H.height,Z=this.state.flexBasis!==H.flexBasis,L=W||V||Z;L&&Ao.flushSync(function(){i.setState(H)}),this.props.onResize&&L&&this.props.onResize(s,h,this.resizable,k)}},t.prototype.onMouseUp=function(s){var i,n,o=this.state,r=o.isResizing,a=o.direction;o.original,!(!r||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(s,a,this.resizable,this.delta),this.props.size&&this.setState({width:(i=this.props.size.width)!==null&&i!==void 0?i:"auto",height:(n=this.props.size.height)!==null&&n!==void 0?n:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ks(ks({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(s){var i,n;this.setState({width:(i=s.width)!==null&&i!==void 0?i:"auto",height:(n=s.height)!==null&&n!==void 0?n:"auto"})},t.prototype.renderResizer=function(){var s=this,i=this.props,n=i.enable,o=i.handleStyles,r=i.handleClasses,a=i.handleWrapperStyle,l=i.handleWrapperClass,c=i.handleComponent;if(!n)return null;var d=Object.keys(n).map(function(u){return n[u]!==!1?f.jsx(KS,{direction:u,onResizeStart:s.onResizeStart,replaceStyles:o&&o[u],className:r&&r[u],children:c&&c[u]?c[u]:null},u):null});return f.jsx("div",{className:l,style:a,children:d})},t.prototype.render=function(){var s=this,i=Object.keys(this.props).reduce(function(r,a){return e2.indexOf(a)!==-1||(r[a]=s.props[a]),r},{}),n=ks(ks(ks({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return f.jsxs(o,ks({style:n,className:this.props.className},i,{ref:function(r){r&&(s.resizable=r)},children:[this.state.isResizing&&f.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t})(p.PureComponent);const s2=({side:e,className:t})=>{const s=e===Gr.Left,i=s?j.IconChevronLeft:j.IconChevronRight;return f.jsx("div",{className:t,children:f.jsx(i,{className:ae("h-full",s&&"-ml-6")})})},i2=({side:e,isResizing:t,customHandler:s,handlerClassName:i})=>{const n=J("invisible h-full w-0.5 group-hover:visible bg-accent-primary text-accent-primary cursor-col-resize transition-opacity",t&&"visible",i),o=f.jsx(s2,{side:e,className:n});return s?f.jsx("div",{className:n,children:s}):o},Dv=({children:e,minWidth:t,maxWidth:s,width:i,defaultWidth:n,onResizeStop:o,onResize:r,side:a=Gr.Right,resizeHandlerClassName:l,resizeHandler:c})=>{const[d,u]=p.useState(!1),[h,g]=p.useState(n),m=i!==void 0,v=m?i:h,C=p.useRef(null),w=p.useCallback(()=>{u(!0)},[]),b=p.useCallback(()=>{u(!1);const y=C.current?.resizable?.getBoundingClientRect(),S=y?Math.round(y.width):t;m||g(S),o?.(S)},[o,m,t]),x=p.useMemo(()=>{const y=a===Gr.Left,S=f.jsx(i2,{side:a,isResizing:d,customHandler:c,handlerClassName:l});return{size:m?{width:v,height:"100%"}:void 0,defaultSize:m?void 0:{width:v,height:"100%"},minWidth:t,maxWidth:s,enable:{left:y,right:!y},handleClasses:{right:"group",left:"group"},handleStyles:{right:{right:"-8px",zIndex:10},left:{left:0,zIndex:10}},handleComponent:{left:y?S:void 0,right:y?void 0:S},onResizeStart:w,onResize:(F,R,E)=>{const D=Math.round(E.offsetWidth);r?.(D)},onResizeStop:b}},[a,m,v,t,s,c,l,d,w,b,r]);return f.jsx(t2,{ref:C,...x,children:f.jsx("div",{className:"group flex size-full flex-col bg-layer-3 divide-y divide-tertiary transition-all",children:e})})},Pv=({enabled:e=!0,children:t,...s})=>e?f.jsx(Dv,{...s,children:t}):t;var as=(e=>(e.Default="default",e.Text="text",e.Circular="circular",e.Rectangular="rectangular",e))(as||{}),Sr=(e=>(e.Small="small",e.Default="default",e.Large="large",e))(Sr||{}),Pl=(e=>(e.Circle="circle",e.Square="square",e))(Pl||{});const n2=e=>{if(typeof e=="number")return e;switch(e){case Sr.Small:return 32;case Sr.Large:return 64;case Sr.Default:default:return 40}},Jn=({active:e=!0,paragraph:t=!0,avatar:s=!1,showTitle:i=!0,loading:n=!0,children:o,variant:r=as.Default,width:a,height:l,className:c,...d})=>{if(!n&&o)return f.jsx(f.Fragment,{children:o});const u=J("bg-layer-3",e&&"animate-pulse",c);if(r!==as.Default){const E=J(u,r===as.Circular&&"rounded-full",r===as.Rectangular&&"rounded",r===as.Text&&"rounded"),D={};return a&&(D.width=typeof a=="number"?`${a}px`:a),l&&(D.height=typeof l=="number"?`${l}px`:l),f.jsx("div",{className:E,style:D,...d})}const h=!!s,g=!!i,m=!!t,v=typeof s=="object"?s:{},C=typeof i=="object"?i:{},w=typeof t=="object"?t:{},b=n2(v.size),x=v.shape??Pl.Circle,y=C.width??"38%",S=w.rows??3,F=w.width,R=E=>F?Array.isArray(F)?F[E]??"100%":F:E===S-1?"61%":"100%";return f.jsxs("div",{...d,className:J("flex gap-4",c),children:[h&&f.jsx("div",{className:J(u,x===Pl.Circle?"rounded-full":"rounded","flex-shrink-0"),style:{width:b,height:b}}),f.jsxs("div",{className:"flex-1 flex flex-col gap-3",children:[g&&f.jsx("div",{className:J(u,"h-4 rounded"),style:{width:y}}),m&&f.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:S}).map((E,D)=>f.jsx("div",{className:J(u,"h-4 rounded"),style:{width:R(D)}},D))})]})]})};function $e(e){if(e?.length)return e[e.length-1]}function Li(e,t,s){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(e[n]!==t[n]&&!s?.(e[n],t[n]))return!1;return!0}function dr(e,t){if(e){for(const s of e)if(t(s))return!0}}function Bs(e,t){const s=e.indexOf(t);s>=0&&e.splice(s,1)}function o2(e,t){let s=0,i=0;for(;s<e.length;s++)t.includes(e[s])||(e[i]=e[s],i++);for(;i<e.length;)e.pop()}function Hg(e,t,s){for(let i=0;i<t.length;i++)Bs(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(s,0,t[i])}var Qs=e=>e==null||e===""?null:e;function se(e){return e!=null&&e!==""}function st(e){return!se(e)}var Du=e=>e!=null&&typeof e.toString=="function"?e.toString():null,Br=(e,t)=>{const s=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return s===i},r2=(e,t,s=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e=="object"&&e.toNumber&&(e=e.toNumber()),typeof t=="object"&&t.toNumber&&(t=t.toNumber()),!s||typeof e!="string"?e>t?1:e<t?-1:0:e.localeCompare(t)),gn=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 i=t?this.allAsyncListeners:this.allSyncListeners;let n=i.get(e);return!n&&s&&(n=new Set,i.set(e,n)),n}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 i=this.getListeners(e,s,!1);i&&(i.delete(t),i.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:i}=this,n=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},o=this.getListeners(s,t,!1);if((o?.size??0)>0){const a=new Set(o);for(const l of a)o?.has(l)&&n(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)n(()=>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)},s=this.frameworkOverrides;s?s.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}},a2=/[&<>"']/g,l2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Oo(e){return e?.toString().toString()??null}function Rr(e){return Oo(e)?.replace(a2,t=>l2[t])??null}function Gg(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function c2(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(n=>n.substring(0,1).toUpperCase()+(n.length>1?n.substring(1,n.length):"")).join(" ")}function ms(e){return e.eRootDiv.getRootNode()}function et(e){return ms(e).activeElement}function Ct(e){const{gos:t,eRootDiv:s}=e;let i=null;const n=t.get("getDocument");return n&&se(n)?i=n():s&&(i=s.ownerDocument),i&&se(i)?i:document}function Ih(e){const t=et(e);return t===null||t===Ct(e).body}function Mh(e){return Ct(e).defaultView||window}function Ah(e){let t=null,s=null;try{t=Ct(e).fullscreenElement}catch{}finally{t||(t=ms(e));const i=t.querySelector("body");i?s=i:t instanceof ShadowRoot?s=t:t instanceof Document?s=t?.documentElement:s=t}return s}function d2(e){return Ah(e)?.clientWidth??(window.innerWidth||-1)}function u2(e){return Ah(e)?.clientHeight??(window.innerHeight||-1)}function ys(e,t,s){s==null||typeof s=="string"&&s==""?Tv(e,t):Ss(e,t,s)}function Ss(e,t,s){e.setAttribute(kv(t),s.toString())}function Tv(e,t){e.removeAttribute(kv(t))}function kv(e){return`aria-${e}`}function fn(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function h2(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function p2(e){return e.getAttribute("aria-label")}function Ro(e,t){ys(e,"label",t)}function Vr(e,t){ys(e,"labelledby",t)}function Iv(e,t){ys(e,"live",t)}function g2(e,t){ys(e,"atomic",t)}function f2(e,t){ys(e,"relevant",t)}function Lh(e,t){ys(e,"invalid",t)}function m2(e,t){ys(e,"disabled",t)}function Mv(e,t){ys(e,"hidden",t)}function Pu(e,t){Ss(e,"expanded",t)}function v2(e,t){Ss(e,"setsize",t)}function C2(e,t){Ss(e,"posinset",t)}function w2(e,t){Ss(e,"rowcount",t)}function Oh(e,t){Ss(e,"rowindex",t)}function b2(e,t){Ss(e,"rowspan",t)}function x2(e,t){Ss(e,"colcount",t)}function Av(e,t){Ss(e,"colindex",t)}function y2(e,t){Ss(e,"colspan",t)}function S2(e,t){Ss(e,"sort",t)}function R2(e){Tv(e,"sort")}function Lv(e,t){ys(e,"selected",t)}function F2(e,t){ys(e,"controls",t)}function E2(e,t){F2(e,t.id),Vr(t,e.id)}function Bg(e,t){ys(e,"owns",t)}function Cc(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var D2="[tabindex], input, select, button, textarea, [href]",Ov="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Fr(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(Ov)?!1:xs(e)}function Ke(e,t,s={}){const{skipAriaHidden:i}=s;e.classList.toggle("ag-hidden",!t),i||Mv(e,!t)}function P2(e,t,s={}){const{skipAriaHidden:i}=s;e.classList.toggle("ag-invisible",!t),i||Mv(e,!t)}function zr(e,t){const s="disabled",i=t?o=>o.setAttribute(s,""):o=>o.removeAttribute(s);i(e);const n=e.querySelectorAll("input")??[];for(const o of n)i(o)}function on(e,t,s){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof s=="number"){if(++i>s)break}else if(e===s)break}return!1}function Tn(e){const{height:t,width:s,borderTopWidth:i,borderRightWidth:n,borderBottomWidth:o,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:g,marginLeft:m,boxSizing:v}=window.getComputedStyle(e),C=Number.parseFloat;return{height:C(t||"0"),width:C(s||"0"),borderTopWidth:C(i||"0"),borderRightWidth:C(n||"0"),borderBottomWidth:C(o||"0"),borderLeftWidth:C(r||"0"),paddingTop:C(a||"0"),paddingRight:C(l||"0"),paddingBottom:C(c||"0"),paddingLeft:C(d||"0"),marginTop:C(u||"0"),marginRight:C(h||"0"),marginBottom:C(g||"0"),marginLeft:C(m||"0"),boxSizing:v}}function Nh(e){const t=Tn(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Wr(e){const t=Tn(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function Nv(e){const{height:t,marginBottom:s,marginTop:i}=Tn(e);return Math.floor(t+s+i)}function Tl(e){const{width:t,marginLeft:s,marginRight:i}=Tn(e);return Math.floor(t+s+i)}function Hv(e){const t=e.getBoundingClientRect(),{borderTopWidth:s,borderLeftWidth:i,borderRightWidth:n,borderBottomWidth:o}=Tn(e);return{top:t.top+(s||0),left:t.left+(i||0),right:t.right+(n||0),bottom:t.bottom+(o||0)}}function kl(e,t){let s=e.scrollLeft;return t&&(s=Math.abs(s)),s}function Il(e,t,s){s&&(t*=-1),e.scrollLeft=t}function Wt(e){for(;e?.firstChild;)e.firstChild.remove()}function si(e){e?.parentNode&&e.remove()}function Gv(e){return!!e.offsetParent}function xs(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!Gv(e)||window.getComputedStyle(e).visibility!=="visible")}function Hh(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function jr(e){return()=>{const t=e();return t?Bv(t)||T2(t):!0}}function Bv(e){return e.clientWidth<e.scrollWidth}function T2(e){return e.clientHeight<e.scrollHeight}function Ml(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Os(e,t)}function Os(e,t){t=Gh(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Er(e,t){t=Gh(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Gh(e){return typeof e=="number"?`${e}px`:e}function Bh(e){return e instanceof Node||e instanceof HTMLElement}function Bt(e,t,s){s==null||s===""?e.removeAttribute(t):e.setAttribute(t,s.toString())}function k2(e,t){if(!t.isContentEditable)return;const s=Mh(e).getSelection();if(!s)return;const i=Ct(e).createRange();i.selectNodeContents(t),i.collapse(!1),s.removeAllRanges(),s.addRange(i)}function ri(e,t,s){const n=Mh(e).ResizeObserver,o=n?new n(s):null;return o?.observe(t),()=>o?.disconnect()}function ai(e,t){const s=Mh(e);s.requestAnimationFrame?s.requestAnimationFrame(t):s.webkitRequestAnimationFrame?s.webkitRequestAnimationFrame(t):s.setTimeout(t,0)}var Vv="data-ref",Fd;function Vg(){return Fd??(Fd=document.createTextNode(" ")),Fd.cloneNode()}function mn(e){const{attrs:t,children:s,cls:i,ref:n,role:o,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),n&&a.setAttribute(Vv,n),o&&a.setAttribute("role",o),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(Vg()),l=!1),a.append(mn(c)),a.appendChild(Vg())))}return a}var I2=["touchstart","touchend","touchmove","touchcancel","scroll"],M2=["wheel"],Ed={},Al=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return s=>{if(typeof Ed[s]=="boolean")return Ed[s];const i=document.createElement(e[s]||"div");return s="on"+s,Ed[s]=s in i}})();function A2(e,t){return!t||!e?!1:O2(t).indexOf(e)>=0}function L2(e){const t=[];let s=e.target;for(;s;)t.push(s),s=s.parentElement;return t}function O2(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():L2(t)}function N2(e,t,s){const i=H2(t);let n;i!=null&&(n={passive:i}),e.addEventListener(t,s,n)}var H2=e=>{const t=I2.includes(e),s=M2.includes(e);if(t)return!0;if(s)return!1};function zv(e,t,s){if(s===0)return!1;const i=Math.abs(e.clientX-t.clientX),n=Math.abs(e.clientY-t.clientY);return Math.max(i,n)<=s}var co=(e,t)=>{const s=e.identifier;for(let i=0,n=t.length;i<n;++i){const o=t[i];if(o.identifier===s)return o}return null};function _r(e,t){return e.gos.isElementInThisInstance(t.target)}function G2(e,t,s){const n=e.getBoundingClientRect().height,o=d2(s)-2,r=u2(s)-2;if(!e.offsetParent)return;const l=Hv(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-n/2,h=d-l.left-10;const g=Ct(s),m=g.defaultView||window,v=m.pageYOffset||g.documentElement.scrollTop,C=m.pageXOffset||g.documentElement.scrollLeft;o>0&&h+e.clientWidth>o+C&&(h=o+C-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+v&&(u=r+v-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}var dl=(e,...t)=>{for(const s of t){const[i,n,o,r]=s;i.addEventListener(n,o,r),e.push(s)}},Vh=e=>{if(e){for(const[t,s,i,n]of e)t.removeEventListener(s,i,n);e.length=0}},bi=e=>{e.cancelable&&e.preventDefault()};function B2(e,t){return t}function Wv(e){return e?.getLocaleTextFunc()??B2}function V2(e,t,s,i){const n=t[s];return e.getLocaleTextFunc()(s,typeof n=="function"?n(i):n,i)}function z2(e){return(t,s,i)=>e({key:t,defaultValue:s,variableValues:i})}function W2(e){return(t,s,i)=>{let n=e?.[t];if(n&&i?.length){let o=0;for(;!(o>=i.length||n.indexOf("${variable}")===-1);)n=n.replace("${variable}",i[o++])}return n??s}}var Ht=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 gn),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 i of Object.keys(t)){const n=t[i];n&&s.push(this._setupListener(e,i,n))}return s}_setupListener(e,t,s){if(this.destroyed)return()=>null;let i;if(j2(e))e.__addEventListener(t,s),i=()=>(e.__removeEventListener(t,s),null);else{const n=_2(e);e instanceof HTMLElement?N2(e,t,s):n?e.addListener(t,s):e.addEventListener(t,s),i=n?()=>(e.removeListener(t,s),null):()=>(e.removeEventListener(t,s),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(n=>n!==i),null)}setupPropertyListener(e,t){const{gos:s}=this;s.addPropertyEventListener(e,t);const i=()=>(s.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(n=>n!==i),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++,i=n=>{if(n.changeSet){if(n.changeSet&&n.changeSet.id===this.lastChangeSetIdLookup[s])return;this.lastChangeSetIdLookup[s]=n.changeSet.id}const o={type:"propertyChanged",changeSet:n.changeSet,source:n.source};t(o)};for(const n of e)this.setupPropertyListener(n,i)}getLocaleTextFunc(){return Wv(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 j2(e){return e.__addEventListener!==void 0}function _2(e){return e.eventServiceType==="global"}var B=class extends Ht{},Tu=new Set,wc=(e,t)=>{Tu.has(t)||(Tu.add(t),e())};wc._set=Tu;var U2={pending:!1,funcs:[]},$2={pending:!1,funcs:[]};function ku(e,t="setTimeout",s){const i=t==="raf"?$2:U2;if(i.funcs.push(e),i.pending)return;i.pending=!0;const n=()=>{const o=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of o)r()};t==="raf"?ai(s,n):window.setTimeout(n,0)}function ht(e,t,s){let i;return function(...n){const o=this;return window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(o,n)},s),i}}function zg(e,t){let s=0;return function(...i){const n=this,o=Date.now();o-s<t||(s=o,e.apply(n,i))}}function q2(e,t,s,i=100){const n=Date.now();let o=null,r=!1;const a=()=>{o!=null&&(window.clearInterval(o),o=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-n>i;(t()||c)&&(s(),r=!0,a())};l(),r||(o=window.setInterval(l,10))}var jv=new Set(["__proto__","constructor","prototype"]);function K2(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(i=>!jv.has(i)))t(s,e[s])}}function Mt(e,t,s=!0,i=!1){se(t)&&K2(t,(n,o)=>{let r=e[n];r!==o&&(i&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},e[n]=r),Wg(o)&&Wg(r)&&!Array.isArray(r)?Mt(r,o,s,i):(s||o!==void 0)&&(e[n]=o))})}function Wg(e){return typeof e=="object"&&e!==null}var zh=class Ys{static applyGlobalGridOptions(t){if(!Ys.gridOptions)return{...t};let s={};return Mt(s,Ys.gridOptions,!0,!0),Ys.mergeStrategy==="deep"?Mt(s,t,!0,!0):s={...s,...t},Ys.gridOptions.context&&(s.context=Ys.gridOptions.context),t.context&&(Ys.mergeStrategy==="deep"&&s.context&&Mt(t.context,s.context,!0,!0),s.context=t.context),s}static applyGlobalGridOption(t,s){if(Ys.mergeStrategy==="deep"){const i=_v(t);if(i&&typeof i=="object"&&typeof s=="object")return Ys.applyGlobalGridOptions({[t]:s})[t]}return s}};zh.gridOptions=void 0;zh.mergeStrategy="shallow";var Wh=zh;function _v(e){return Wh.gridOptions?.[e]}var Uv={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,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,refreshAfterGroupEdit:!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,groupHideColumnsUntilExpanded:!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,enableFilterHandlers:!1},$v="https://www.ag-grid.com";function vn(e,t,...s){e.get("debug")&&console.log("AG Grid: "+t,...s)}function Dr(e,...t){wc(()=>qv(e,...t),e+t?.join(""))}function uo(e,...t){wc(()=>Y2(e,...t),e+t?.join(""))}function Y2(e,...t){console.error("AG Grid: "+e,...t)}function qv(e,...t){console.warn("AG Grid: "+e,...t)}var Kv=new Set,Ll={},rn={},ul,Yv=!1,Zv=!1,Z2=!1;function X2(e){const[t,s]=e.version.split(".")||[],[i,n]=ul.split(".")||[];return t===i&&s===n}function Q2(e){ul||(ul=e.version);const t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} Please update all modules to the same version.`;e.version?X2(e)||uo(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${ul}.`)):uo(t(`'${e.moduleName}' is incompatible.`));const s=e.validate?.();s&&!s.isValid&&uo(`${s.message}`)}function Ur(e,t,s=!1){s||(Yv=!0),Q2(e);const i=e.rowModels??["all"];Kv.add(e);let n;t!==void 0?(Zv=!0,rn[t]===void 0&&(rn[t]={}),n=rn[t]):n=Ll;for(const o of i)n[o]===void 0&&(n[o]={}),n[o][e.moduleName]=e;if(e.dependsOn)for(const o of e.dependsOn)Ur(o,t,s)}function J2(e){delete rn[e]}function Iu(e,t,s){const i=n=>!!Ll[n]?.[e]||!!rn[t]?.[n]?.[e];return i(s)||i("all")}function jh(){return Zv}function eR(e,t){const s=rn[e]??{};return[...Object.values(Ll.all??{}),...Object.values(s.all??{}),...Object.values(Ll[t]??{}),...Object.values(s[t]??{})]}function tR(){return new Set(Kv)}function sR(e,t){const s=rn[e]??{};return[...Object.values(s.all??{}),...Object.values(s[t]??{})]}function iR(){return Yv}function Xv(){return Z2}var Qv=class{static register(e){Ur(e,void 0)}static registerModules(e){for(const t of e)Ur(t,void 0)}};function Jv(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const s=Jv(t.dependsOn);if(s)return s}}}var Q="35.2.1",jg=2e3,_g=100,eC="_version_",tC=null,ho=`${$v}/javascript-data-grid`;function nR(e){tC=e}function oR(e){ho=e}function sC(e,t,s){return tC?.(e,t)??[cR(e,t,s)]}function _h(e,t,s,i,n){e(`${i?"warning":"error"} #${t}`,...sC(t,s,n))}function rR(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 aR(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=rR(e)),t}function hl(e){return e===void 0?"undefined":e===null?"null":e}function Mu(e,t){return`${e}?${t.toString()}`}function lR(e,t,s){const i=Array.from(t.entries()).sort((o,r)=>r[1].length-o[1].length);let n=Mu(e,t);for(const[o,r]of i){if(o===eC)continue;const a=n.length-s;if(a<=0)break;const l="...",c=a+l.length,d=r.length-c>_g?r.slice(0,r.length-c)+l:r.slice(0,_g)+l;t.set(o,d),n=Mu(e,t)}return n}function iC(e,t){const s=new URLSearchParams;if(s.append(eC,Q),t)for(const o of Object.keys(t))s.append(o,aR(t[o]));const i=`${ho}/errors/${e}`,n=Mu(i,s);return n.length<=jg?n:lR(i,s,jg)}var cR=(e,t,s)=>{const i=iC(e,t);return`${`${s?s+`
6
+ <%s key={someKey} {...props} />`,ie,oe,Te,oe),L[oe+ie]=!0)}if(oe=null,K!==void 0&&(s(K),oe=""+K),r(z)&&(s(z.key),oe=""+z.key),"key"in z){K={};for(var ee in z)ee!=="key"&&(K[ee]=z[ee])}else K=z;return oe&&a(K,typeof M=="function"?M.displayName||M.name||"Unknown":M),c(M,oe,K,n(),we,N)}function u(M){h(M)?M._store&&(M._store.validated=1):typeof M=="object"&&M!==null&&M.$$typeof===D&&(M._payload.status==="fulfilled"?h(M._payload.value)&&M._payload.value._store&&(M._payload.value._store.validated=1):M._store&&(M._store.validated=1))}function h(M){return typeof M=="object"&&M!==null&&M.$$typeof===m}var g=p,m=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),y=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),k=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,U=Array.isArray,I=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(M){return M()}};var H,W={},V=g.react_stack_bottom_frame.bind(g,o)(),Z=I(i(o)),L={};lr.Fragment=C,lr.jsx=function(M,z,K){var ie=1e4>k.recentlyCreatedOwnerStacks++;return d(M,z,K,!1,ie?Error("react-stack-top-frame"):V,ie?I(i(M)):Z)},lr.jsxs=function(M,z,K){var ie=1e4>k.recentlyCreatedOwnerStacks++;return d(M,z,K,!0,ie?Error("react-stack-top-frame"):V,ie?I(i(M)):Z)}})()),lr}var ug;function w0(){return ug||(ug=1,process.env.NODE_ENV==="production"?Va.exports=v0():Va.exports=C0()),Va.exports}var f=w0();const b0=(e,t)=>{const s=new Array(e.length+t.length);for(let i=0;i<e.length;i++)s[i]=e[i];for(let i=0;i<t.length;i++)s[e.length+i]=t[i];return s},x0=(e,t)=>({classGroupId:e,validator:t}),qm=(e=new Map,t=null,s)=>({nextPart:e,validators:t,classGroupId:s}),Fl="-",hg=[],y0="arbitrary..",S0=e=>{const t=F0(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return R0(r);const a=r.split(Fl),l=a[0]===""&&a.length>1?1:0;return Km(a,l,t)},getConflictingClassGroupIds:(r,a)=>{if(a){const l=i[r],c=s[r];return l?c?b0(c,l):l:c||hg}return s[r]||hg}}},Km=(e,t,s)=>{if(e.length-t===0)return s.classGroupId;const n=e[t],o=s.nextPart.get(n);if(o){const c=Km(e,t+1,o);if(c)return c}const r=s.validators;if(r===null)return;const a=t===0?e.join(Fl):e.slice(t).join(Fl),l=r.length;for(let c=0;c<l;c++){const d=r[c];if(d.validator(a))return d.classGroupId}},R0=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),s=t.indexOf(":"),i=t.slice(0,s);return i?y0+i:void 0})(),F0=e=>{const{theme:t,classGroups:s}=e;return E0(s,t)},E0=(e,t)=>{const s=qm();for(const i in e){const n=e[i];wh(n,s,i,t)}return s},wh=(e,t,s,i)=>{const n=e.length;for(let o=0;o<n;o++){const r=e[o];D0(r,t,s,i)}},D0=(e,t,s,i)=>{if(typeof e=="string"){P0(e,t,s);return}if(typeof e=="function"){T0(e,t,s,i);return}k0(e,t,s,i)},P0=(e,t,s)=>{const i=e===""?t:Ym(t,e);i.classGroupId=s},T0=(e,t,s,i)=>{if(I0(e)){wh(e(i),t,s,i);return}t.validators===null&&(t.validators=[]),t.validators.push(x0(s,e))},k0=(e,t,s,i)=>{const n=Object.entries(e),o=n.length;for(let r=0;r<o;r++){const[a,l]=n[r];wh(l,Ym(t,a),s,i)}},Ym=(e,t)=>{let s=e;const i=t.split(Fl),n=i.length;for(let o=0;o<n;o++){const r=i[o];let a=s.nextPart.get(r);a||(a=qm(),s.nextPart.set(r,a)),s=a}return s},I0=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,M0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),i=Object.create(null);const n=(o,r)=>{s[o]=r,t++,t>e&&(t=0,i=s,s=Object.create(null))};return{get(o){let r=s[o];if(r!==void 0)return r;if((r=i[o])!==void 0)return n(o,r),r},set(o,r){o in s?s[o]=r:n(o,r)}}},bu="!",pg=":",A0=[],gg=(e,t,s,i,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:i,isExternal:n}),L0=e=>{const{prefix:t,experimentalParseClassName:s}=e;let i=n=>{const o=[];let r=0,a=0,l=0,c;const d=n.length;for(let v=0;v<d;v++){const C=n[v];if(r===0&&a===0){if(C===pg){o.push(n.slice(l,v)),l=v+1;continue}if(C==="/"){c=v;continue}}C==="["?r++:C==="]"?r--:C==="("?a++:C===")"&&a--}const u=o.length===0?n:n.slice(l);let h=u,g=!1;u.endsWith(bu)?(h=u.slice(0,-1),g=!0):u.startsWith(bu)&&(h=u.slice(1),g=!0);const m=c&&c>l?c-l:void 0;return gg(o,g,h,m)};if(t){const n=t+pg,o=i;i=r=>r.startsWith(n)?o(r.slice(n.length)):gg(A0,!1,r,void 0,!0)}if(s){const n=i;i=o=>s({className:o,parseClassName:n})}return i},O0=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((s,i)=>{t.set(s,1e6+i)}),s=>{const i=[];let n=[];for(let o=0;o<s.length;o++){const r=s[o],a=r[0]==="[",l=t.has(r);a||l?(n.length>0&&(n.sort(),i.push(...n),n=[]),i.push(r)):n.push(r)}return n.length>0&&(n.sort(),i.push(...n)),i}},N0=e=>({cache:M0(e.cacheSize),parseClassName:L0(e),sortModifiers:O0(e),...S0(e)}),H0=/\s+/,G0=(e,t)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:n,sortModifiers:o}=t,r=[],a=e.trim().split(H0);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:u,modifiers:h,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:v}=s(d);if(u){l=d+(l.length>0?" "+l:l);continue}let C=!!v,w=i(C?m.substring(0,v):m);if(!w){if(!C){l=d+(l.length>0?" "+l:l);continue}if(w=i(m),!w){l=d+(l.length>0?" "+l:l);continue}C=!1}const b=h.length===0?"":h.length===1?h[0]:o(h).join(":"),x=g?b+bu:b,y=x+w;if(r.indexOf(y)>-1)continue;r.push(y);const S=n(w,C);for(let F=0;F<S.length;++F){const R=S[F];r.push(x+R)}l=d+(l.length>0?" "+l:l)}return l},B0=(...e)=>{let t=0,s,i,n="";for(;t<e.length;)(s=e[t++])&&(i=Zm(s))&&(n&&(n+=" "),n+=i);return n},Zm=e=>{if(typeof e=="string")return e;let t,s="";for(let i=0;i<e.length;i++)e[i]&&(t=Zm(e[i]))&&(s&&(s+=" "),s+=t);return s},V0=(e,...t)=>{let s,i,n,o;const r=l=>{const c=t.reduce((d,u)=>u(d),e());return s=N0(c),i=s.cache.get,n=s.cache.set,o=a,a(l)},a=l=>{const c=i(l);if(c)return c;const d=G0(l,s);return n(l,d),d};return o=r,(...l)=>o(B0(...l))},z0=[],pt=e=>{const t=s=>s[e]||z0;return t.isThemeGetter=!0,t},Xm=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qm=/^\((?:(\w[\w-]*):)?(.+)\)$/i,W0=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,j0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_0=/\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$/,U0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,q0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ui=e=>W0.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),hi=e=>!!e&&Number.isInteger(Number(e)),Cd=e=>e.endsWith("%")&&Le(e.slice(0,-1)),Ks=e=>j0.test(e),Jm=()=>!0,K0=e=>_0.test(e)&&!U0.test(e),bh=()=>!1,Y0=e=>$0.test(e),Z0=e=>q0.test(e),X0=e=>!fe(e)&&!me(e),Q0=e=>Ai(e,sv,bh),fe=e=>Xm.test(e),Ui=e=>Ai(e,iv,K0),fg=e=>Ai(e,rx,Le),J0=e=>Ai(e,ov,Jm),ex=e=>Ai(e,nv,bh),mg=e=>Ai(e,ev,bh),tx=e=>Ai(e,tv,Z0),za=e=>Ai(e,rv,Y0),me=e=>Qm.test(e),cr=e=>Dn(e,iv),sx=e=>Dn(e,nv),vg=e=>Dn(e,ev),ix=e=>Dn(e,sv),nx=e=>Dn(e,tv),Wa=e=>Dn(e,rv,!0),ox=e=>Dn(e,ov,!0),Ai=(e,t,s)=>{const i=Xm.exec(e);return i?i[1]?t(i[1]):s(i[2]):!1},Dn=(e,t,s=!1)=>{const i=Qm.exec(e);return i?i[1]?t(i[1]):s:!1},ev=e=>e==="position"||e==="percentage",tv=e=>e==="image"||e==="url",sv=e=>e==="length"||e==="size"||e==="bg-size",iv=e=>e==="length",rx=e=>e==="number",nv=e=>e==="family-name",ov=e=>e==="number"||e==="weight",rv=e=>e==="shadow",ax=()=>{const e=pt("color"),t=pt("font"),s=pt("text"),i=pt("font-weight"),n=pt("tracking"),o=pt("leading"),r=pt("breakpoint"),a=pt("container"),l=pt("spacing"),c=pt("radius"),d=pt("shadow"),u=pt("inset-shadow"),h=pt("text-shadow"),g=pt("drop-shadow"),m=pt("blur"),v=pt("perspective"),C=pt("aspect"),w=pt("ease"),b=pt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...y(),me,fe],F=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],E=()=>[me,fe,l],D=()=>[ui,"full","auto",...E()],T=()=>[hi,"none","subgrid",me,fe],P=()=>["auto",{span:["full",hi,me,fe]},hi,me,fe],k=()=>[hi,"auto",me,fe],A=()=>["auto","min","max","fr",me,fe],U=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...E()],W=()=>[ui,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],V=()=>[ui,"screen","full","dvw","lvw","svw","min","max","fit",...E()],Z=()=>[ui,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],L=()=>[e,me,fe],M=()=>[...y(),vg,mg,{position:[me,fe]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",ix,Q0,{size:[me,fe]}],ie=()=>[Cd,cr,Ui],we=()=>["","none","full",c,me,fe],N=()=>["",Le,cr,Ui],oe=()=>["solid","dashed","dotted","double"],Te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[Le,Cd,vg,mg],le=()=>["","none",m,me,fe],$=()=>["none",Le,me,fe],he=()=>["none",Le,me,fe],G=()=>[Le,me,fe],ne=()=>[ui,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ks],breakpoint:[Ks],color:[Jm],container:[Ks],"drop-shadow":[Ks],ease:["in","out","in-out"],font:[X0],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ks],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ks],shadow:[Ks],spacing:["px",Le],text:[Ks],"text-shadow":[Ks],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ui,fe,me,C]}],container:["container"],columns:[{columns:[Le,fe,me,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:S()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[hi,"auto",me,fe]}],basis:[{basis:[ui,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,ui,"auto","initial","none",fe]}],grow:[{grow:["",Le,me,fe]}],shrink:[{shrink:["",Le,me,fe]}],order:[{order:[hi,"first","last","none",me,fe]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mbs:[{mbs:H()}],mbe:[{mbe:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...Z()]}],"min-block-size":[{"min-block":["auto",...Z()]}],"max-block-size":[{"max-block":["none",...Z()]}],w:[{w:[a,"screen",...W()]}],"min-w":[{"min-w":[a,"screen","none",...W()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",s,cr,Ui]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ox,J0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Cd,fe]}],"font-family":[{font:[sx,ex,t]}],"font-features":[{"font-features":[fe]}],"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:[n,me,fe]}],"line-clamp":[{"line-clamp":[Le,"none",me,fg]}],leading:[{leading:[o,...E()]}],"list-image":[{"list-image":["none",me,fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",me,Ui]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Le,"auto",me,fe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,fe]}],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",me,fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hi,me,fe],radial:["",me,fe],conic:[hi,me,fe]},nx,tx]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:we()}],"rounded-s":[{"rounded-s":we()}],"rounded-e":[{"rounded-e":we()}],"rounded-t":[{"rounded-t":we()}],"rounded-r":[{"rounded-r":we()}],"rounded-b":[{"rounded-b":we()}],"rounded-l":[{"rounded-l":we()}],"rounded-ss":[{"rounded-ss":we()}],"rounded-se":[{"rounded-se":we()}],"rounded-ee":[{"rounded-ee":we()}],"rounded-es":[{"rounded-es":we()}],"rounded-tl":[{"rounded-tl":we()}],"rounded-tr":[{"rounded-tr":we()}],"rounded-br":[{"rounded-br":we()}],"rounded-bl":[{"rounded-bl":we()}],"border-w":[{border:N()}],"border-w-x":[{"border-x":N()}],"border-w-y":[{"border-y":N()}],"border-w-s":[{"border-s":N()}],"border-w-e":[{"border-e":N()}],"border-w-bs":[{"border-bs":N()}],"border-w-be":[{"border-be":N()}],"border-w-t":[{"border-t":N()}],"border-w-r":[{"border-r":N()}],"border-w-b":[{"border-b":N()}],"border-w-l":[{"border-l":N()}],"divide-x":[{"divide-x":N()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":N()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,me,fe]}],"outline-w":[{outline:["",Le,cr,Ui]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",d,Wa,za]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",u,Wa,za]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:N()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Le,Ui]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":N()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",h,Wa,za]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Le,me,fe]}],"mix-blend":[{"mix-blend":[...Te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Te()}],"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":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[me,fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":y()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,fe]}],filter:[{filter:["","none",me,fe]}],blur:[{blur:le()}],brightness:[{brightness:[Le,me,fe]}],contrast:[{contrast:[Le,me,fe]}],"drop-shadow":[{"drop-shadow":["","none",g,Wa,za]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Le,me,fe]}],"hue-rotate":[{"hue-rotate":[Le,me,fe]}],invert:[{invert:["",Le,me,fe]}],saturate:[{saturate:[Le,me,fe]}],sepia:[{sepia:["",Le,me,fe]}],"backdrop-filter":[{"backdrop-filter":["","none",me,fe]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Le,me,fe]}],"backdrop-contrast":[{"backdrop-contrast":[Le,me,fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,me,fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,me,fe]}],"backdrop-invert":[{"backdrop-invert":["",Le,me,fe]}],"backdrop-opacity":[{"backdrop-opacity":[Le,me,fe]}],"backdrop-saturate":[{"backdrop-saturate":[Le,me,fe]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,me,fe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",me,fe]}],ease:[{ease:["linear","initial",w,me,fe]}],delay:[{delay:[Le,me,fe]}],animate:[{animate:["none",b,me,fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,me,fe]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:$()}],"rotate-x":[{"rotate-x":$()}],"rotate-y":[{"rotate-y":$()}],"rotate-z":[{"rotate-z":$()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:G()}],"skew-x":[{"skew-x":G()}],"skew-y":[{"skew-y":G()}],transform:[{transform:[me,fe,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",me,fe]}],"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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",me,fe]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Le,cr,Ui,fg]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},lx=V0(ax);function J(...e){return lx(ae(e))}var El=(e=>(e.Description="description",e.Error="error",e))(El||{});const Jr=({text:e,className:t,variant:s=El.Description,...i})=>e?f.jsx("span",{...i,role:"alert",className:J("dial-tiny-text",s===El.Error?"text-error":"text-secondary",t),children:e}):null,ds=({...e})=>f.jsx(Jr,{...e,variant:El.Error});var Ye=(e=>(e.Primary="primary",e.Neutral="neutral",e.Danger="danger",e.Success="success",e.Secondary="secondary",e.Tertiary="tertiary",e))(Ye||{}),Ae=(e=>(e.Solid="solid",e.Outlined="outlined",e.Ghost="ghost",e.Link="link",e))(Ae||{});const Cg={[Ye.Primary]:{[Ae.Solid]:"dial-primary-solid-button",[Ae.Ghost]:"dial-primary-ghost-button",[Ae.Link]:"dial-primary-link-button"},[Ye.Neutral]:{[Ae.Outlined]:"dial-neutral-outlined-button"},[Ye.Danger]:{[Ae.Solid]:"dial-danger-solid-button",[Ae.Ghost]:"dial-danger-ghost-button",[Ae.Outlined]:"dial-danger-outlined-button"},[Ye.Success]:{[Ae.Ghost]:"dial-success-ghost-button"},[Ye.Secondary]:{[Ae.Ghost]:"dial-secondary-ghost-button"},[Ye.Tertiary]:{[Ae.Ghost]:"dial-tertiary-ghost-button"}},av=(e=Ye.Primary,t=Ae.Solid)=>{const s=Cg[e]?.[t];return s||(console.warn(`Could not find Button styles for variant: ${e} and appearance: ${t}. Using default primary solid button styles.`),Cg[Ye.Primary][Ae.Solid])},cx=7,dx=2,lv=p.createContext(null),cv=()=>{const e=p.useContext(lv);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},ux=({initialOpen:e=!1,placement:t="bottom",isTriggerClickable:s=!1,open:i,onOpenChange:n}={})=>{const[o,r]=p.useState(e),a=p.useRef(null),l=i??o,c=n??r,d=De.useFloating({placement:t,open:l,onOpenChange:c,whileElementsMounted:De.autoUpdate,middleware:[De.offset(cx+dx),De.flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"start",padding:5}),De.shift({padding:5}),De.arrow({element:a})]}),u=De.useHover(d.context,{move:!1,enabled:i==null,mouseOnly:s,delay:{open:500,close:0}}),h=De.useFocus(d.context,{enabled:i==null}),g=De.useDismiss(d.context),m=De.useRole(d.context,{role:"tooltip"}),v=De.useInteractions([u,h,g,m]);return p.useEffect(()=>{if(!l)return;const C=d.refs.reference.current;if(!(C instanceof Element))return;const w=new IntersectionObserver(([b])=>{b.isIntersecting||c(!1)},{root:null,threshold:0});return w.observe(C),()=>w.disconnect()},[l,d.refs.reference,c]),p.useMemo(()=>({open:l,setOpen:c,arrowRef:a,...v,...d}),[l,c,v,d])},xh=({children:e,...t})=>{const s=ux(t);return f.jsx(lv.Provider,{value:s,children:e})},yh=({style:e,...t})=>{const s=cv(),i=p.useRef(null),n=De.useMergeRefs([s.refs.setFloating,i]);return s.open?f.jsx(De.FloatingPortal,{id:"tooltip-portal",children:f.jsxs("div",{ref:n,style:{...s.floatingStyles,...e},...s.getFloatingProps(t),className:ae("z-[55] whitespace-pre-wrap break-words rounded border border-primary bg-layer-0 px-2 py-1 dial-tiny-text shadow max-w-[300px]",s.getFloatingProps(t).className),children:[t.children,f.jsx(De.FloatingArrow,{ref:s.arrowRef,context:s.context,fill:"currentColor",strokeWidth:1,className:"stroke-primary text-[var(--bg-layer-0,_#000000)]"})]})}):null},Sh=({children:e,asChild:t=!1,...s})=>{const i=cv(),n=t&&p.isValidElement(e),o=n?e.props?.ref:null,r=De.useMergeRefs([i.refs.setReference,...o?[o]:[]]);return n?p.cloneElement(e,i.getReferenceProps({...e.props,...s,ref:r})):f.jsx("span",{ref:r,...i.getReferenceProps(s),className:s.className??"dial-tooltip-trigger text-left",children:e})},Ot=({hideTooltip:e,tooltip:t,children:s,triggerClassName:i,contentClassName:n,...o})=>f.jsxs(xh,{...o,children:[f.jsx(Sh,{className:ae(i,"truncate"),children:s}),f.jsx(yh,{className:ae("text-primary",n,"max-w-[300px]",(e||!t)&&"hidden"),children:t})]});var nt=(e=>(e.Small="small",e.Standard="standard",e))(nt||{});const Gs=({variant:e,appearance:t=Ae.Solid,size:s=nt.Standard,className:i,icon:n,tooltipProps:o,type:r="button",...a})=>{const l=J(e&&av(e,t),s===nt.Small?"h-[24px] w-[24px]":"h-[40px] w-[40px]","dial-icon-button disabled:cursor-not-allowed focus-visible:outline outline-offset-0 disabled:text-controls-secondary-disable",i),c=f.jsx("button",{...a,type:r,className:l,"aria-label":a["aria-label"],children:n});return o?f.jsx(Ot,{...o,children:c}):c},hx="w-[24px] h-[24px] border border-solid rounded-[6px] border-transparent flex items-center justify-center text-secondary hover:text-controls-accent-primary-hover active:text-controls-accent-primary-active focus-within:border-focus";var ct=(e=>(e[e.LG=24]="LG",e[e.MD=20]="MD",e[e.SM=16]="SM",e))(ct||{});const $t=18,te={size:$t,stroke:2},dv=({caption:e,onClick:t})=>{if(!e)return null;const s=f.jsx(Gs,{"aria-label":e,className:hx,icon:f.jsx(j.IconInfoCircle,{size:ct.SM}),onClick:t});return e?f.jsx(Ot,{tooltip:e,triggerClassName:"flex justify-center items-center",children:s}):s},Pn=({label:e,required:t,className:s,caption:i,...n})=>e?f.jsxs("label",{...n,className:J("dial-tiny-text text-secondary flex items-center gap-1",s),children:[typeof e=="string"?f.jsx("span",{className:"min-h-4",children:e}):e,t&&f.jsx("span",{className:"text-accent-primary",children:"*"}),f.jsx(dv,{caption:i})]}):null,Be=({icon:e,className:t})=>e?f.jsx("span",{className:ae("flex-shrink-0",t),children:e}):null,us=({label:e,variant:t,appearance:s=Ae.Solid,size:i=nt.Standard,className:n,textClassName:o,iconAfter:r,iconBefore:a,hideTitleOnMobile:l,type:c="button",tooltipProps:d,...u})=>{const h=ae(l?"hidden sm:inline":"inline",o),g=J(t&&av(t,s),i===nt.Small?"dial-tiny-semi-text":"dial-small-semi-text",s!==Ae.Link&&(i===nt.Small?"h-[24px] px-2":"h-[40px] px-3"),"disabled:cursor-not-allowed focus-visible:outline outline-offset-0",n),m=f.jsxs("button",{...u,type:c,className:g,"aria-label":typeof e=="string"&&e||u["aria-label"],children:[f.jsx(Be,{icon:a}),e&&f.jsx("span",{className:h,children:e}),f.jsx(Be,{icon:r})]});return d?f.jsx(Ot,{...d,children:m}):m};var rs=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e.Loading="loading",e))(rs||{});const uv=({size:e=24,className:t,fullWidth:s=!1,ariaLabel:i="Loading"})=>f.jsx("div",{role:"status",className:J("flex items-center justify-center",{"size-full":s},t),children:f.jsx("div",{role:"img","aria-label":i,style:{width:e,height:e},className:"rounded-full border-2 border-secondary border-t-accent-primary animate-spin-steps shrink-0"})}),px=e=>({info:f.jsx(j.IconInfoCircleFilled,{size:e.size}),error:f.jsx(j.IconAlertCircleFilled,{size:e.size}),warning:f.jsx(j.IconAlertTriangleFilled,{size:e.size}),success:f.jsx(j.IconCircleCheckFilled,{size:e.size}),loading:f.jsx(uv,{size:e.size})}),gx={[rs.Info]:"bg-info border-info text-info",[rs.Success]:"bg-success border-success text-success",[rs.Warning]:"bg-warning border-warning text-warning",[rs.Error]:"bg-error border-error text-error",[rs.Loading]:"bg-info border-info text-info"},fx="items-center justify-between gap-3 p-3 border border-solid dial-small-text-150 rounded shadow flex",hv=({variant:e=rs.Info,title:t,message:s,className:i,iconSize:n=24,iconStroke:o=2,closable:r=!1,onClose:a,children:l,...c})=>{const d=p.useMemo(()=>px({size:n})[e],[e,n,o]);return f.jsxs("div",{...c,role:"alert",className:J(fx,gx[e],i),children:[f.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[f.jsx(Be,{icon:d}),t?f.jsxs("div",{className:"flex flex-col gap-1 text-primary",children:[f.jsx("div",{className:"dial-small-semi-text",children:t}),f.jsx("div",{className:"dial-small-text",children:s})]}):f.jsx("div",{className:"dial-small-text text-primary",children:s})]}),l,r&&f.jsx(us,{className:"ml-2 text-secondary hover:text-primary","aria-label":"Close alert",iconBefore:f.jsx(j.IconX,{size:ct.LG}),onClick:a})]})},mx="flex items-center justify-center text-secondary",vx="shrink-0 grow-0 basis-auto animate-spin-steps",Cx=e=>ye.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ye.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),ea=({size:e=18,className:t,iconClassName:s,fullWidth:i=!0,ariaLabel:n="Loading"})=>f.jsx("div",{role:"status",className:ae({[mx]:!0,"w-full h-full":i,[t||""]:!!t}),children:f.jsx(Be,{icon:f.jsx(Cx,{width:e,height:e,className:ae(vx,s),role:"img","aria-label":n})})});var pv=(e=>(e.Small="sm",e.Medium="md",e))(pv||{});const wx={sm:"h-1",md:"h-2"},bx=({value:e,max:t=100,size:s="md",className:i,ariaLabel:n="Progress"})=>{const o=Math.min(Math.max(e,0),t),r=t>0?o/t*100:0;return f.jsx("div",{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":t,"aria-label":n,className:J("w-full overflow-hidden rounded-full bg-layer-4",wx[s],i),children:f.jsx("div",{className:"h-full rounded-full bg-controls-accent-primary transition-[width] duration-300",style:{width:`${r}%`}})})},xx=7,yx=2,Sx=e=>e<=0?[]:Array.from({length:e},(t,s)=>s+1),Rx=(e,t,s)=>e===t?"active":s<xx||Math.abs(e-t)<=yx?"adjacent":"far",Fx=({page:e,totalPages:t,onPageChange:s,className:i})=>{const n=Sx(t);return f.jsxs("nav",{"aria-label":"Pagination",className:J("flex items-center gap-2",i),children:[f.jsx(Gs,{icon:f.jsx(j.IconCaretLeftFilled,{size:ct.SM,className:"text-secondary"}),size:nt.Small,className:"!p-0 items-center flex justify-center",disabled:e<=1,onClick:()=>s(e-1),"aria-label":"Previous page"}),f.jsx("div",{className:"flex flex-row items-center gap-2",children:n.map(o=>{const r=Rx(o,e,t);return f.jsx("button",{type:"button",onClick:()=>s(o),"aria-label":`Page ${o}`,"aria-current":o===e?"page":void 0,className:J("bg-secondary rounded-full focus-visible:outline outline-offset-0 transition-all duration-300 ease-in-out",r==="active"&&"h-[8px] w-[32px]",r==="adjacent"&&"size-[8px]",r==="far"&&"size-[4px]")},o)})}),f.jsx(Gs,{icon:f.jsx(j.IconCaretRightFilled,{size:ct.SM,className:"text-secondary"}),size:nt.Small,className:"!p-0 items-center flex justify-center",disabled:e>=t,onClick:()=>s(e+1),"aria-label":"Next page"})]})},Ex="text-primary",vt=({text:e,className:t,contentClassName:s,hideTooltip:i,id:n,customTooltipContent:o,...r})=>{const a=p.useRef(null),[l,c]=p.useState(!1),[d,u]=p.useState(""),h=p.useRef(null),g=()=>{const w=a.current;if(!w)return;u(w.textContent??"");const b=w.clientWidth,x=w.scrollWidth,y=Math.ceil(w.getBoundingClientRect().width);c(x>b||x>y)},m=p.useCallback(()=>{h.current&&cancelAnimationFrame(h.current),h.current=requestAnimationFrame(g)},[]);p.useEffect(()=>{m();const w=()=>m();window.addEventListener("resize",w);let b=null;return"ResizeObserver"in window&&a.current&&(b=new ResizeObserver(()=>m()),b.observe(a.current)),()=>{window.removeEventListener("resize",w),b&&b.disconnect(),h.current&&cancelAnimationFrame(h.current)}},[e,m]);const v=p.useMemo(()=>typeof e=="string"?e:d,[d,e]),C=p.useMemo(()=>i?"":o||(l?v:""),[o,v,i,l]);return f.jsxs(xh,{...r,children:[f.jsx(Sh,{asChild:!0,onMouseEnter:m,onFocusCapture:m,children:f.jsx("span",{id:n,className:J("block truncate flex-1 min-w-0 max-w-full text-left",t),"aria-label":l?v:void 0,onMouseEnter:m,onFocus:m,ref:a,children:e})}),f.jsx(yh,{className:J(Ex,s,!C&&"hidden"),children:C})]})},xu="checkbox-container",yu=({label:e,id:t,checked:s,indeterminate:i,disabled:n,ariaLabel:o,onChange:r,className:a,...l})=>{const c=p.useCallback(g=>{r?.(g.target.checked,t)},[r,t]),d=ae("flex flex-row items-center cursor-pointer text-accent-primary small-medium min-w-0",`${s||i?"":'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded'}`,n?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",a),u=ae("border rounded",n?"bg-layer-4 border-icon-secondary":""),h=()=>i?f.jsx(j.IconMinus,{className:u,...te}):s?f.jsx(j.IconCheck,{className:u,...te}):null;return f.jsxs("label",{...l,className:d,htmlFor:t,"aria-description":l["aria-description"]||xu,children:[h(),e&&(typeof e=="string"?f.jsx(vt,{text:e,className:"ml-2 text-primary"}):e),f.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:c,id:t,checked:s,"aria-checked":i?"mixed":s,"aria-disabled":n||void 0,"aria-label":e?void 0:o,className:"invisible size-0"})]})};var Yt=(e=>(e.VALID="valid",e.ERROR="error",e))(Yt||{});const Dx=(e,t)=>{if(t===e.id)switch(e.status){case Yt.VALID:return"border-accent-secondary text-primary";case Yt.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case Yt.VALID:return"border-primary text-primary";case Yt.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},Px=(e,t)=>{if(t===e.id)switch(e.status){case Yt.VALID:return"bg-accent-secondary";case Yt.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case Yt.VALID:return"bg-accent-secondary";case Yt.ERROR:return"bg-red-400";default:return"bg-layer-4"}},Tx=({step:e,index:t,currentStep:s,onChangeStep:i})=>{const n="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny-text cursor-pointer dial-step",o="w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full text-white",r=()=>s===e.id&&e.status===Yt.ERROR?f.jsx(j.IconExclamationCircle,{stroke:2,size:ct.SM}):s!==e.id&&e.status===Yt.VALID?f.jsx(j.IconCheck,{stroke:2,size:ct.SM}):t+1;return f.jsxs("button",{className:ae(n,Dx(e,s)),onClick:()=>i(e.id),children:[f.jsx("span",{className:ae(o,Px(e,s)),children:r()}),f.jsx("span",{children:e.name})]})},kx=({steps:e,currentStep:t,onChangeStep:s})=>{const i=n=>{const o=e.findIndex(l=>l.id===t),r=e.findIndex(l=>l.id===n);if(n===t)return;(e.slice(0,r).every(l=>l.status===Yt.VALID)||r<o)&&s(n)};return f.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((n,o)=>f.jsx(Tx,{currentStep:t,onChangeStep:i,step:n,index:o},n.id))})},nn=({name:e,value:t,label:s,description:i,checked:n=!1,inputId:o,className:r,labelClassName:a,disabled:l,onChange:c,descriptionClassName:d,caption:u})=>{const h=`${o}-desc`,g=ae("dial-small-text cursor-pointer py-[1px]",l?"text-secondary":"text-primary",a,l&&"cursor-not-allowed"),m=ae("cursor-pointer dial-input-radio",!!s&&"mr-2",r,l&&"!cursor-not-allowed"),v=ae("flex flex-col",!!i&&"mb-2",l&&"cursor-not-allowed"),C=ae("dial-tiny-text mt-2 ml-[26px] text-secondary",d,l&&"cursor-not-allowed"),w=b=>{l||b.target.checked&&c?.(t)};return f.jsxs("div",{className:v,children:[f.jsxs("div",{className:ae("flex flex-row",!u&&"items-center"),children:[f.jsx("input",{type:"radio",id:o,name:e,value:t,checked:n,disabled:l,"aria-describedby":n&&i?h:void 0,className:m,onChange:w}),(s||u)&&f.jsxs("div",{className:"flex flex-col gap-1",children:[s&&f.jsx("label",{className:g,htmlFor:o,"aria-describedby":u?"caption":"",children:s}),u&&f.jsx("span",{id:"caption",className:"dial-tiny-text text-secondary",children:u})]})]}),n&&i&&f.jsx("div",{id:h,className:C,children:i})]})};var Nr=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(Nr||{});const Ix="w-full flex gap-1",Mx={[Nr.Vertical]:"flex-col",[Nr.Horizontal]:"flex-row items-end"},cc=({id:e,label:t,required:s,description:i,error:n,orientation:o=Nr.Vertical,labelVisuallyHidden:r=!1,className:a,labelClassName:l,errorClassName:c,childrenClassName:d,captionDescription:u,readonly:h,value:g,defaultEmptyText:m,children:v})=>{const C=`${e}-label`,w=i?`${e}-desc`:void 0,b=n?`${e}-err`:void 0,x=`${e}-caption-desc`,y=[w,b].filter(Boolean).join(" ")||void 0,S=p.useCallback(()=>typeof n=="boolean"?null:typeof n=="string"||typeof n>"u"?n?f.jsx("div",{id:b,"aria-live":"polite",className:c,children:f.jsx(ds,{text:n})}):null:f.jsx("div",{id:b,role:"alert","aria-live":"polite",className:c,children:n}),[n,c,b]),F=p.useCallback(()=>g?typeof g=="string"||typeof g=="number"?f.jsx("span",{"aria-readonly":"true",children:g}):g:f.jsx("span",{className:"flex min-h-4","aria-readonly":"true",children:m??"None"}),[g,m]);return f.jsxs("div",{role:"group","aria-labelledby":t?C:void 0,"aria-describedby":y,className:J(Ix,Mx[o],a),children:[t&&f.jsx("div",{id:C,className:J(o==="horizontal"&&"shrink-0"),children:f.jsx(Pn,{htmlFor:e,label:t,required:s,className:J(r&&"sr-only",l),caption:i})}),f.jsxs("div",{className:J("min-w-0 w-full",d),children:[h?f.jsx("div",{className:"dial-input px-3 py-2",children:F()}):v,u&&f.jsx("div",{id:x,className:J({"dial-tiny-text text-secondary mt-1":!0,"text-error":!!n}),children:u}),S()]})]})};var hn=(e=>(e.Row="Row",e.Column="Column",e))(hn||{});const Ax="flex",Lx="pb-1 mt-2",Ox={[hn.Column]:"flex-col gap-y-3",[hn.Row]:"flex-row gap-x-6"},Dl=({fieldTitle:e,radioClassName:t,containerClassName:s,selectedItemClassName:i,selectedLabelClassName:n,radioGroupClassName:o,inputContainerClassName:r,selectedInputContainerClassName:a,groupLabelClassName:l,formItemChildrenClassName:c,labelClassName:d,disabled:u,elementId:h,radioButtons:g,activeRadioButton:m,orientation:v,onChange:C})=>f.jsx(cc,{id:h,label:e,labelClassName:l||d,className:s,childrenClassName:c,children:f.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":u||void 0,className:J(Ax,Ox[v],o),children:g.map(w=>f.jsxs("div",{className:J("flex flex-col",r,w.id===m&&a),children:[f.jsx(nn,{name:h,value:w.id,inputId:`${h}-${w.id}`,disabled:u,className:t,labelClassName:J(d,w.id===m&&n),label:w.name,caption:w.caption,checked:w.id===m,onChange:()=>C(w.id)}),w.id===m&&w.content?f.jsx("div",{className:J(Lx,i),children:w.content}):null]},w.id))})}),ta=({icon:e,title:t,description:s,containerClassName:i,titleClassName:n,descriptionClassName:o})=>f.jsxs("div",{className:J("h-full w-full flex flex-col items-center justify-center text-secondary",i),"aria-label":"no-data-container",children:[e||f.jsx(j.IconClipboardX,{width:60,height:60,stroke:.5}),f.jsx("span",{className:J("dial-small-text mt-2 text-primary",n),"aria-label":"no-results-title",children:t}),s&&f.jsx("span",{className:J("mt-1 text-primary",o),"aria-label":"no-results-description",children:s})]}),wd=48,gv=({containerClassName:e,children:t,width:s=280,title:i,iconSize:n=24,iconStroke:o=1.5,titleClassName:r,additionalButtons:a,isOpened:l,onToggle:c})=>{const[d,u]=p.useState(s),[h,g]=p.useState(!0),m=p.useMemo(()=>typeof l=="boolean",[l]),v=m?l:h;p.useEffect(()=>{m&&u(l?s:wd)},[m,l,s]);const C=J(["transform rotate-180 [writing-mode:tb-rl] py-4 px-3",v&&"hidden",r]),w=J(["flex flex-row gap-2 cursor-pointer text-secondary py-2 items-center",v?"justify-end px-4":"justify-center"]),b=x=>{const y=!v;if(m){u(y?s:wd),c?.(y,x);return}u(y?s:wd),g(y)};return f.jsxs("div",{className:J(["rounded flex flex-col justify-between",e]),style:{width:`${d}px`},"aria-label":"collapsible-sidebar",children:[f.jsx("div",{className:J(["flex-1 p-4 min-h-0 overflow-auto",!v&&"hidden"]),children:t}),f.jsx("div",{className:C,children:i}),f.jsxs("div",{className:J("border-t border-tertiary h-12",w),children:[v&&a,f.jsx(Gs,{className:"hover:text-accent-primary",onClick:b,"aria-label":"sidebar-state",size:nt.Small,icon:v?f.jsx(j.IconChevronsLeft,{size:n,stroke:o}):f.jsx(j.IconChevronsRight,{size:n,stroke:o})})]})]})},Nx=({label:e,text:t,tooltip:s,children:i,postfix:n,className:o})=>f.jsxs("div",{className:J("flex flex-col",i?"":"max-w-[200px]",o),children:[e&&f.jsx("label",{className:"dial-tiny-text mb-2 text-secondary",children:e}),i||f.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[f.jsx(Ot,{triggerClassName:"text-primary flex-1 min-w-0",tooltip:s||t,children:t}),n||null]})]});var dc=(e=>(e.Default="default",e))(dc||{});const Hx={[dc.Default]:"border-icon-secondary bg-layer-3"},io=({tag:e,className:t,remove:s,variant:i=dc.Default,iconBefore:n,bordered:o=!0})=>{const r=Hx[i],a=J("flex items-center gap-1 dial-tiny-text rounded p-1 h-[22px] text-primary",r,o?"border":"border-transparent",t);return f.jsxs("div",{className:a,children:[f.jsx(Be,{icon:n}),f.jsx(vt,{text:e}),s&&f.jsx(us,{className:"p-0",iconAfter:f.jsx(j.IconX,{size:ct.SM}),onClick:l=>s(l)})]},e)},fv=p.createContext({dragDropManager:void 0});function ts(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 wg=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),bg=function(){return Math.random().toString(36).substring(7).split("").join(".")},xg={INIT:"@@redux/INIT"+bg(),REPLACE:"@@redux/REPLACE"+bg()};function Gx(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 Bx(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(Wx(e))return"date";if(zx(e))return"error";var s=Vx(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 Vx(e){return typeof e.constructor=="function"?e.constructor.name:null}function zx(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Wx(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Kn(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Bx(e)),t}function mv(e,t,s){var i;if(typeof t=="function"&&typeof s=="function"||typeof s=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?ts(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"?ts(1):"Expected the enhancer to be a function. Instead, received: '"+Kn(s)+"'");return s(mv)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?ts(2):"Expected the root reducer to be a function. Instead, received: '"+Kn(e)+"'");var n=e,o=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"?ts(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 o}function u(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?ts(4):"Expected the listener to be a function. Instead, received: '"+Kn(v)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?ts(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 C=!0;return c(),a.push(v),function(){if(C){if(l)throw new Error(process.env.NODE_ENV==="production"?ts(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.");C=!1,c();var b=a.indexOf(v);a.splice(b,1),r=null}}}function h(v){if(!Gx(v))throw new Error(process.env.NODE_ENV==="production"?ts(7):"Actions must be plain objects. Instead, the actual type was: '"+Kn(v)+"'. 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 v.type>"u")throw new Error(process.env.NODE_ENV==="production"?ts(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"?ts(9):"Reducers may not dispatch actions.");try{l=!0,o=n(o,v)}finally{l=!1}for(var C=r=a,w=0;w<C.length;w++){var b=C[w];b()}return v}function g(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?ts(10):"Expected the nextReducer to be a function. Instead, received: '"+Kn(v));n=v,h({type:xg.REPLACE})}function m(){var v,C=u;return v={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?ts(11):"Expected the observer to be an object. Instead, received: '"+Kn(b)+"'");function x(){b.next&&b.next(d())}x();var y=C(x);return{unsubscribe:y}}},v[wg]=function(){return this},v}return h({type:xg.INIT}),i={dispatch:h,subscribe:u,getState:d,replaceReducer:g},i[wg]=m,i}function Ie(e,t,...s){if(jx()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let i;if(t===void 0)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let n=0;i=new Error(t.replace(/%s/g,function(){return s[n++]})),i.name="Invariant Violation"}throw i.framesToPop=1,i}}function jx(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function _x(e,t,s){return t.split(".").reduce((i,n)=>i&&i[n]?i[n]:s||null,e)}function Ux(e,t){return e.filter(s=>s!==t)}function vv(e){return typeof e=="object"}function $x(e,t){const s=new Map,i=o=>{s.set(o,s.has(o)?s.get(o)+1:1)};e.forEach(i),t.forEach(i);const n=[];return s.forEach((o,r)=>{o===1&&n.push(r)}),n}function qx(e,t){return e.filter(s=>t.indexOf(s)>-1)}const Rh="dnd-core/INIT_COORDS",uc="dnd-core/BEGIN_DRAG",Fh="dnd-core/PUBLISH_DRAG_SOURCE",hc="dnd-core/HOVER",pc="dnd-core/DROP",gc="dnd-core/END_DRAG";function yg(e,t){return{type:Rh,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const Kx={type:Rh,payload:{clientOffset:null,sourceClientOffset:null}};function Yx(e){return function(s=[],i={publishSource:!0}){const{publishSource:n=!0,clientOffset:o,getSourceClientOffset:r}=i,a=e.getMonitor(),l=e.getRegistry();e.dispatch(yg(o)),Zx(s,a,l);const c=Jx(s,a);if(c==null){e.dispatch(Kx);return}let d=null;if(o){if(!r)throw new Error("getSourceClientOffset must be defined");Xx(r),d=r(c)}e.dispatch(yg(o,d));const h=l.getSource(c).beginDrag(a,c);if(h==null)return;Qx(h),l.pinSource(c);const g=l.getSourceType(c);return{type:uc,payload:{itemType:g,item:h,sourceId:c,clientOffset:o||null,sourceClientOffset:d||null,isSourcePublic:!!n}}}}function Zx(e,t,s){Ie(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(i){Ie(s.getSource(i),"Expected sourceIds to be registered.")})}function Xx(e){Ie(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Qx(e){Ie(vv(e),"Item must be an object.")}function Jx(e,t){let s=null;for(let i=e.length-1;i>=0;i--)if(t.canDragSource(e[i])){s=e[i];break}return s}function ey(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function ty(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable}))),i.forEach(function(n){ey(e,n,s[n])})}return e}function sy(e){return function(s={}){const i=e.getMonitor(),n=e.getRegistry();iy(i),ry(i).forEach((r,a)=>{const l=ny(r,a,n,i),c={type:pc,payload:{dropResult:ty({},s,l)}};e.dispatch(c)})}}function iy(e){Ie(e.isDragging(),"Cannot call drop while not dragging."),Ie(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function ny(e,t,s,i){const n=s.getTarget(e);let o=n?n.drop(i,e):void 0;return oy(o),typeof o>"u"&&(o=t===0?{}:i.getDropResult()),o}function oy(e){Ie(typeof e>"u"||vv(e),"Drop result must either be an object or undefined.")}function ry(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function ay(e){return function(){const s=e.getMonitor(),i=e.getRegistry();ly(s);const n=s.getSourceId();return n!=null&&(i.getSource(n,!0).endDrag(s,n),i.unpinSource()),{type:gc}}}function ly(e){Ie(e.isDragging(),"Cannot call endDrag while not dragging.")}function Su(e,t){return t===null?e===null:Array.isArray(e)?e.some(s=>s===t):e===t}function cy(e){return function(s,{clientOffset:i}={}){dy(s);const n=s.slice(0),o=e.getMonitor(),r=e.getRegistry(),a=o.getItemType();return hy(n,r,a),uy(n,o,r),py(n,o,r),{type:hc,payload:{targetIds:n,clientOffset:i||null}}}}function dy(e){Ie(Array.isArray(e),"Expected targetIds to be an array.")}function uy(e,t,s){Ie(t.isDragging(),"Cannot call hover while not dragging."),Ie(!t.didDrop(),"Cannot call hover after drop.");for(let i=0;i<e.length;i++){const n=e[i];Ie(e.lastIndexOf(n)===i,"Expected targetIds to be unique in the passed array.");const o=s.getTarget(n);Ie(o,"Expected targetIds to be registered.")}}function hy(e,t,s){for(let i=e.length-1;i>=0;i--){const n=e[i],o=t.getTargetType(n);Su(o,s)||e.splice(i,1)}}function py(e,t,s){e.forEach(function(i){s.getTarget(i).hover(t,i)})}function gy(e){return function(){if(e.getMonitor().isDragging())return{type:Fh}}}function fy(e){return{beginDrag:Yx(e),publishDragSource:gy(e),hover:cy(e),drop:sy(e),endDrag:ay(e)}}class my{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 i(o){return(...r)=>{const a=o.apply(t,r);typeof a<"u"&&s(a)}}const n=fy(this);return Object.keys(n).reduce((o,r)=>{const a=n[r];return o[r]=i(a),o},{})}dispatch(t){this.store.dispatch(t)}constructor(t,s){this.isSetUp=!1,this.handleRefCountChange=()=>{const i=this.store.getState().refCount>0;this.backend&&(i&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!i&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=s,t.subscribe(this.handleRefCountChange)}}function vy(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Cv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Cy(e){const{clientOffset:t,initialClientOffset:s,initialSourceClientOffset:i}=e;return!t||!s||!i?null:Cv(vy(t,i),s)}function wy(e){const{clientOffset:t,initialClientOffset:s}=e;return!t||!s?null:Cv(t,s)}const yr=[],Eh=[];yr.__IS_NONE__=!0;Eh.__IS_ALL__=!0;function by(e,t){return e===yr?!1:e===Eh||typeof t>"u"?!0:qx(t,e).length>0}class xy{subscribeToStateChange(t,s={}){const{handlerIds:i}=s;Ie(typeof t=="function","listener must be a function."),Ie(typeof i>"u"||Array.isArray(i),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;const o=()=>{const r=this.store.getState(),a=r.stateId;try{a===n||a===n+1&&!by(r.dirtyHandlerIds,i)||t()}finally{n=a}};return this.store.subscribe(o)}subscribeToOffsetChange(t){Ie(typeof t=="function","listener must be a function.");let s=this.store.getState().dragOffset;const i=()=>{const n=this.store.getState().dragOffset;n!==s&&(s=n,t())};return this.store.subscribe(i)}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 i=this.registry.getTargetType(t),n=this.getItemType();return Su(i,n)&&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 i=this.registry.getSourceType(t),n=this.getItemType();return i!==n?!1:s.isDragging(this,t)}isOverTarget(t,s={shallow:!1}){if(!t)return!1;const{shallow:i}=s;if(!this.isDragging())return!1;const n=this.registry.getTargetType(t),o=this.getItemType();if(o&&!Su(n,o))return!1;const r=this.getTargetIds();if(!r.length)return!1;const a=r.indexOf(t);return i?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 Cy(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return wy(this.store.getState().dragOffset)}constructor(t,s){this.store=t,this.registry=s}}const Sg=typeof global<"u"?global:self,wv=Sg.MutationObserver||Sg.WebKitMutationObserver;function bv(e){return function(){const s=setTimeout(n,0),i=setInterval(n,50);function n(){clearTimeout(s),clearInterval(i),e()}}}function yy(e){let t=1;const s=new wv(e),i=document.createTextNode("");return s.observe(i,{characterData:!0}),function(){t=-t,i.data=t}}const Sy=typeof wv=="function"?yy:bv;class Ry{enqueueTask(t){const{queue:s,requestFlush:i}=this;s.length||(i(),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 i=0,n=t.length-this.index;i<n;i++)t[i]=t[i+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=Sy(this.flush),this.requestErrorThrow=bv(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Fy{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 Ey{create(t){const s=this.freeTasks,i=s.length?s.pop():new Fy(this.onError,n=>s[s.length]=n);return i.task=t,i}constructor(t){this.onError=t,this.freeTasks=[]}}const xv=new Ry,Dy=new Ey(xv.registerPendingError);function Py(e){xv.enqueueTask(Dy.create(e))}const Dh="dnd-core/ADD_SOURCE",Ph="dnd-core/ADD_TARGET",Th="dnd-core/REMOVE_SOURCE",fc="dnd-core/REMOVE_TARGET";function Ty(e){return{type:Dh,payload:{sourceId:e}}}function ky(e){return{type:Ph,payload:{targetId:e}}}function Iy(e){return{type:Th,payload:{sourceId:e}}}function My(e){return{type:fc,payload:{targetId:e}}}function Ay(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 Ly(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 Ru(e,t){if(t&&Array.isArray(e)){e.forEach(s=>Ru(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 ns;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(ns||(ns={}));let Oy=0;function Ny(){return Oy++}function Hy(e){const t=Ny().toString();switch(e){case ns.SOURCE:return`S${t}`;case ns.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function Rg(e){switch(e[0]){case"S":return ns.SOURCE;case"T":return ns.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Fg(e,t){const s=e.entries();let i=!1;do{const{done:n,value:[,o]}=s.next();if(o===t)return!0;i=!!n}while(!i);return!1}class Gy{addSource(t,s){Ru(t),Ay(s);const i=this.addHandler(ns.SOURCE,t,s);return this.store.dispatch(Ty(i)),i}addTarget(t,s){Ru(t,!0),Ly(s);const i=this.addHandler(ns.TARGET,t,s);return this.store.dispatch(ky(i)),i}containsHandler(t){return Fg(this.dragSources,t)||Fg(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 Rg(t)===ns.SOURCE}isTargetId(t){return Rg(t)===ns.TARGET}removeSource(t){Ie(this.getSource(t),"Expected an existing source."),this.store.dispatch(Iy(t)),Py(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){Ie(this.getTarget(t),"Expected an existing target."),this.store.dispatch(My(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,i){const n=Hy(t);return this.types.set(n,s),t===ns.SOURCE?this.dragSources.set(n,i):t===ns.TARGET&&this.dropTargets.set(n,i),n}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const By=(e,t)=>e===t;function Vy(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function zy(e,t,s=By){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(!s(e[i],t[i]))return!1;return!0}function Wy(e=yr,t){switch(t.type){case hc:break;case Dh:case Ph:case fc:case Th:return yr;case uc:case Fh:case gc:case pc:default:return Eh}const{targetIds:s=[],prevTargetIds:i=[]}=t.payload,n=$x(s,i);if(!(n.length>0||!zy(s,i)))return yr;const r=i[i.length-1],a=s[s.length-1];return r!==a&&(r&&n.push(r),a&&n.push(a)),n}function jy(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function _y(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable}))),i.forEach(function(n){jy(e,n,s[n])})}return e}const Eg={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Uy(e=Eg,t){const{payload:s}=t;switch(t.type){case Rh:case uc:return{initialSourceClientOffset:s.sourceClientOffset,initialClientOffset:s.clientOffset,clientOffset:s.clientOffset};case hc:return Vy(e.clientOffset,s.clientOffset)?e:_y({},e,{clientOffset:s.clientOffset});case gc:case pc:return Eg;default:return e}}function $y(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Yn(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable}))),i.forEach(function(n){$y(e,n,s[n])})}return e}const qy={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ky(e=qy,t){const{payload:s}=t;switch(t.type){case uc:return Yn({},e,{itemType:s.itemType,item:s.item,sourceId:s.sourceId,isSourcePublic:s.isSourcePublic,dropResult:null,didDrop:!1});case Fh:return Yn({},e,{isSourcePublic:!0});case hc:return Yn({},e,{targetIds:s.targetIds});case fc:return e.targetIds.indexOf(s.targetId)===-1?e:Yn({},e,{targetIds:Ux(e.targetIds,s.targetId)});case pc:return Yn({},e,{dropResult:s.dropResult,didDrop:!0,targetIds:[]});case gc:return Yn({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Yy(e=0,t){switch(t.type){case Dh:case Ph:return e+1;case Th:case fc:return e-1;default:return e}}function Zy(e=0){return e+1}function Xy(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Qy(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable}))),i.forEach(function(n){Xy(e,n,s[n])})}return e}function Jy(e={},t){return{dirtyHandlerIds:Wy(e.dirtyHandlerIds,{type:t.type,payload:Qy({},t.payload,{prevTargetIds:_x(e,"dragOperation.targetIds",[])})}),dragOffset:Uy(e.dragOffset,t),refCount:Yy(e.refCount,t),dragOperation:Ky(e.dragOperation,t),stateId:Zy(e.stateId)}}function eS(e,t=void 0,s={},i=!1){const n=tS(i),o=new xy(n,new Gy(n)),r=new my(n,o),a=e(r,t,s);return r.receiveBackend(a),r}function tS(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return mv(Jy,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function sS(e,t){if(e==null)return{};var s=iS(e,t),i,n;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)i=o[n],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(s[i]=e[i])}return s}function iS(e,t){if(e==null)return{};var s={},i=Object.keys(e),n,o;for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&(s[n]=e[n]);return s}let Dg=0;const cl=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var nS=p.memo(function(t){var{children:s}=t,i=sS(t,["children"]);const[n,o]=oS(i);return p.useEffect(()=>{if(o){const r=yv();return++Dg,()=>{--Dg===0&&(r[cl]=null)}}},[]),f.jsx(fv.Provider,{value:n,children:s})});function oS(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=rS(e.backend,e.context,e.options,e.debugMode),s=!e.context;return[t,s]}function rS(e,t=yv(),s,i){const n=t;return n[cl]||(n[cl]={dragDropManager:eS(e,t,s,i)}),n[cl]}function yv(){return typeof global<"u"?global:window}var bd,Pg;function aS(){return Pg||(Pg=1,bd=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 i,n,o;if(Array.isArray(t)){if(i=t.length,i!=s.length)return!1;for(n=i;n--!==0;)if(!e(t[n],s[n]))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(o=Object.keys(t),i=o.length,i!==Object.keys(s).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(s,o[n]))return!1;for(n=i;n--!==0;){var r=o[n];if(!e(t[r],s[r]))return!1}return!0}return t!==t&&s!==s}),bd}var lS=aS();const cS=f0(lS),pn=typeof window<"u"?p.useLayoutEffect:p.useEffect;function dS(e,t,s){const[i,n]=p.useState(()=>t(e)),o=p.useCallback(()=>{const r=t(e);cS(i,r)||(n(r),s&&s())},[i,e,s]);return pn(o),[i,o]}function uS(e,t,s){const[i,n]=dS(e,t,s);return pn(function(){const r=e.getHandlerId();if(r!=null)return e.subscribeToStateChange(n,{handlerIds:[r]})},[e,n]),i}function Sv(e,t,s){return uS(t,e||(()=>({})),()=>s.reconnect())}function Rv(e,t){const s=[...t||[]];return t==null&&typeof e!="function"&&s.push(e),p.useMemo(()=>typeof e=="function"?e():e,s)}function hS(e){return p.useMemo(()=>e.hooks.dragSource(),[e])}function pS(e){return p.useMemo(()=>e.hooks.dragPreview(),[e])}let xd=!1,yd=!1;class gS{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){Ie(!xd,"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 xd=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{xd=!1}}isDragging(){if(!this.sourceId)return!1;Ie(!yd,"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 yd=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{yd=!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 Sd=!1;class fS{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(!Sd,"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 Sd=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Sd=!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 mS(e,t,s){const i=s.getRegistry(),n=i.addTarget(e,t);return[n,()=>i.removeTarget(n)]}function vS(e,t,s){const i=s.getRegistry(),n=i.addSource(e,t);return[n,()=>i.removeSource(n)]}function Fu(e,t,s,i){let n;if(n!==void 0)return!!n;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let l=0;l<o.length;l++){const c=o[l];if(!a(c))return!1;const d=e[c],u=t[c];if(n=void 0,n===!1||n===void 0&&d!==u)return!1}return!0}function Eu(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function CS(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 wS(e){return(t=null,s=null)=>{if(!p.isValidElement(t)){const o=t;return e(o,s),o}const i=t;return CS(i),bS(i,s?o=>e(o,s):e)}}function Fv(e){const t={};return Object.keys(e).forEach(s=>{const i=e[s];if(s.endsWith("Ref"))t[s]=e[s];else{const n=wS(i);t[s]=()=>n}}),t}function Tg(e,t){typeof e=="function"?e(t):e.current=t}function bS(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:i=>{Tg(s,i),Tg(t,i)}}):p.cloneElement(e,{ref:t})}class xS{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,i=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(i&&this.disconnectDragPreview(),!!this.handlerId){if(!s){this.lastConnectedDragPreview=s;return}i&&(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!Fu(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Fu(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=Fv({dragSource:(s,i)=>{this.clearDragSource(),this.dragSourceOptions=i||null,Eu(s)?this.dragSourceRef=s:this.dragSourceNode=s,this.reconnectDragSource()},dragPreview:(s,i)=>{this.clearDragPreview(),this.dragPreviewOptions=i||null,Eu(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 yS{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!Fu(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=Fv({dropTarget:(s,i)=>{this.clearDropTarget(),this.dropTargetOptions=i,Eu(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 Lo(){const{dragDropManager:e}=p.useContext(fv);return Ie(e!=null,"Expected drag drop context"),e}function SS(e,t){const s=Lo(),i=p.useMemo(()=>new xS(s.getBackend()),[s]);return pn(()=>(i.dragSourceOptions=e||null,i.reconnect(),()=>i.disconnectDragSource()),[i,e]),pn(()=>(i.dragPreviewOptions=t||null,i.reconnect(),()=>i.disconnectDragPreview()),[i,t]),i}function RS(){const e=Lo();return p.useMemo(()=>new gS(e),[e])}class FS{beginDrag(){const t=this.spec,s=this.monitor;let i=null;return typeof t.item=="object"?i=t.item:typeof t.item=="function"?i=t.item(s):i={},i??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 i=this.spec,n=this.monitor,{isDragging:o}=i;return o?o(n):s===t.getSourceId()}endDrag(){const t=this.spec,s=this.monitor,i=this.connector,{end:n}=t;n&&n(s.getItem(),s),i.reconnect()}constructor(t,s,i){this.spec=t,this.monitor=s,this.connector=i}}function ES(e,t,s){const i=p.useMemo(()=>new FS(e,t,s),[t,s]);return p.useEffect(()=>{i.spec=e},[e]),i}function DS(e){return p.useMemo(()=>{const t=e.type;return Ie(t!=null,"spec.type must be defined"),t},[e])}function PS(e,t,s){const i=Lo(),n=ES(e,t,s),o=DS(e);pn(function(){if(o!=null){const[a,l]=vS(o,n,i);return t.receiveHandlerId(a),s.receiveHandlerId(a),l}},[i,t,s,n,o])}function TS(e,t){const s=Rv(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 i=RS(),n=SS(s.options,s.previewOptions);return PS(s,i,n),[Sv(s.collect,i,n),hS(n),pS(n)]}function kS(e){return p.useMemo(()=>e.hooks.dropTarget(),[e])}function IS(e){const t=Lo(),s=p.useMemo(()=>new yS(t.getBackend()),[t]);return pn(()=>(s.dropTargetOptions=e||null,s.reconnect(),()=>s.disconnectDropTarget()),[e]),s}function MS(){const e=Lo();return p.useMemo(()=>new fS(e),[e])}function AS(e){const{accept:t}=e;return p.useMemo(()=>(Ie(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class LS{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 OS(e,t){const s=p.useMemo(()=>new LS(e,t),[t]);return p.useEffect(()=>{s.spec=e},[e]),s}function NS(e,t,s){const i=Lo(),n=OS(e,t),o=AS(e);pn(function(){const[a,l]=mS(o,n,i);return t.receiveHandlerId(a),s.receiveHandlerId(a),l},[i,t,n,s,o.map(r=>r.toString()).join("|")])}function Ev(e,t){const s=Rv(e,t),i=MS(),n=IS(s.options);return NS(s,i,n),[Sv(s.collect,i,n),kS(n)]}const kg="column",HS="flex items-center",GS="mr-3 cursor-move text-secondary",BS=({id:e,children:t,className:s,onFind:i,onMove:n,ariaLabel:o="Drag item"})=>{const r=p.useRef(null),a=p.useRef(null),l=typeof i=="function"?i(e):-1,[{isDragging:c},d,u]=TS(()=>({type:kg,item:{id:e,originalIndex:l},collect:g=>{const m=g.getItem();return{isDragging:g.isDragging()&&m?.id===e}},end:(g,m)=>{if(!g)return;!m.didDrop()&&typeof n=="function"&&g.originalIndex>-1&&n(g.id,g.originalIndex)}}),[e,l,n]),[,h]=Ev(()=>({accept:kg,hover:g=>{if(!(!g||g.id===e)&&typeof i=="function"&&typeof n=="function"){const m=i(e);n(g.id,m)}}}),[i,n,e]);return u(h(a)),d(r),f.jsxs("div",{ref:a,className:J(HS,s),style:{opacity:c?0:1},"aria-roledescription":"Draggable item",children:[f.jsx("div",{ref:r,className:GS,"aria-label":o,children:f.jsx(j.IconGripVertical,{...te})}),t]})},VS=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"}),ye.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"}),ye.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"})),zS=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"})),WS=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"}),ye.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"})),jS=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"}),ye.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"}),ye.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"})),_S=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"}),ye.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"}),ye.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"}),ye.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"})),US=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"}),ye.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"})),$S=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"}),ye.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"}),ye.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"})),Je=(e,t)=>f.jsx(e,{size:t.size??te.size,stroke:t.stroke??te.stroke,className:t.className}),$i=(e,t)=>f.jsx(e,{width:Number(t.size??te.size),height:Number(t.size??te.size),className:t.className}),Ig={".bmp":e=>Je(j.IconFileTypeBmp,e),".cpp":e=>$i(VS,e),".c":e=>$i(zS,e),".cs":e=>$i(WS,e),".css":e=>Je(j.IconFileTypeCss,e),".csv":e=>Je(j.IconFileTypeCsv,e),".doc":e=>Je(j.IconFileTypeDoc,e),".docx":e=>Je(j.IconFileTypeDocx,e),".html":e=>Je(j.IconFileTypeHtml,e),".ini":e=>$i(jS,e),".jpg":e=>Je(j.IconFileTypeJpg,e),".js":e=>Je(j.IconFileTypeJs,e),".json":e=>$i(_S,e),".jsx":e=>Je(j.IconFileTypeJsx,e),".md":e=>$i(US,e),".pdf":e=>Je(j.IconFileTypePdf,e),".php":e=>Je(j.IconFileTypePhp,e),".png":e=>Je(j.IconFileTypePng,e),".ppt":e=>Je(j.IconFileTypePpt,e),".py":e=>$i($S,e),".rs":e=>Je(j.IconFileTypeRs,e),".sql":e=>Je(j.IconFileTypeSql,e),".svg":e=>Je(j.IconFileTypeSvg,e),".ts":e=>Je(j.IconFileTypeTs,e),".tsx":e=>Je(j.IconFileTypeTsx,e),".txt":e=>Je(j.IconFileTypeTxt,e),".vue":e=>Je(j.IconFileTypeVue,e),".xls":e=>Je(j.IconFileTypeXls,e),".xml":e=>Je(j.IconFileTypeXml,e),".zip":e=>Je(j.IconFileTypeZip,e),default:e=>Je(j.IconFile,e)},kh=({extension:e,size:t=te.size,stroke:s=te.stroke,className:i,decorative:n=!1,label:o,indicator:r})=>{const a=(()=>{if(!e)return"";const u=e.trim().toLowerCase();return u.startsWith(".")?u:`.${u}`})(),c=(Ig[a]??Ig.default)({size:t,stroke:s}),d=typeof o=="string"?o:`${a.slice(1).toUpperCase()} file icon`;return f.jsxs("span",{className:ae("inline-flex relative",i),...n?{"aria-hidden":!0}:{role:"img","aria-label":d},children:[f.jsx(Be,{icon:c,className:"inline-block align-middle"}),r&&f.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:r})]})},Hr=({label:e="Shared entity",size:t=14,className:s,containerClassName:i,stroke:n=1.5,sharedIndicatorTooltip:o})=>f.jsx(Ot,{tooltip:o||"Shared",children:f.jsx(Be,{className:J("text-accent-primary flex bg-layer-3",i),icon:f.jsx(j.IconArrowUpRight,{size:t,stroke:n,"aria-label":typeof e=="string"?e:void 0,className:s,role:"img"})})}),mc=({name:e,className:t,shared:s=!1,iconSize:i=$t,details:n,sharedIndicatorClassName:o,sharedIndicatorTooltip:r,fileExtension:a,hideTooltip:l=!1,isInvalidName:c=!1,tooltipContent:d})=>{const u=a||(e.includes(".")?e.split(".").pop():void 0);return f.jsxs("div",{className:J("flex items-center gap-2 w-full",t),children:[f.jsx(kh,{extension:u,size:i,className:"text-secondary",indicator:s?f.jsx(Hr,{className:o,sharedIndicatorTooltip:r}):null,label:"File type icon"}),f.jsxs("div",{className:ae(["w-full flex min-w-0",n&&"flex-col gap-1"]),children:[f.jsx(vt,{className:ae(["dial-small-text flex-1 min-w-0",c?"text-secondary":"text-primary"]),text:e,id:"name",hideTooltip:l,customTooltipContent:d}),n]})]})},vc=({name:e,className:t,shared:s=!1,loading:i=!1,iconSize:n=$t,sharedIndicatorClassName:o,sharedIndicatorTooltip:r,hideTooltip:a=!1,isInvalidName:l=!1,tooltipContent:c})=>{const d=()=>i?f.jsx(ea,{size:n}):f.jsx(Be,{icon:f.jsx(j.IconFolder,{...te,size:n}),className:"inline-block align-middle"});return f.jsxs("div",{className:J("flex items-center gap-2 w-full",t),children:[f.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[d(),s&&f.jsx("span",{className:"absolute z-50 -bottom-0.5 -left-0.5",children:f.jsx(Hr,{className:o,sharedIndicatorTooltip:r})})]}),f.jsx(vt,{className:ae("dial-small-text flex-1 min-w-0",l?"text-secondary":"text-primary"),text:e,id:"name",hideTooltip:a,customTooltipContent:c})]})};var Gr=(e=>(e.Left="left",e.Right="right",e))(Gr||{}),ut=function(){return ut=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ut.apply(this,arguments)},Mg={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Ag={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ja={width:"20px",height:"20px",position:"absolute",zIndex:1},qS={top:ut(ut({},Mg),{top:"-5px"}),right:ut(ut({},Ag),{left:void 0,right:"-5px"}),bottom:ut(ut({},Mg),{top:void 0,bottom:"-5px"}),left:ut(ut({},Ag),{left:"-5px"}),topRight:ut(ut({},ja),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:ut(ut({},ja),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:ut(ut({},ja),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:ut(ut({},ja),{left:"-10px",top:"-10px",cursor:"nw-resize"})},KS=p.memo(function(e){var t=e.onResizeStart,s=e.direction,i=e.children,n=e.replaceStyles,o=e.className,r=p.useCallback(function(c){t(c,s)},[t,s]),a=p.useCallback(function(c){t(c,s)},[t,s]),l=p.useMemo(function(){return ut(ut({position:"absolute",userSelect:"none"},qS[s]),n??{})},[n,s]);return f.jsx("div",{className:o||void 0,style:l,onMouseDown:r,onTouchStart:a,children:i})}),YS=(function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},e(t,s)};return function(t,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(t,s);function i(){this.constructor=t}t.prototype=s===null?Object.create(s):(i.prototype=s.prototype,new i)}})(),ks=function(){return ks=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ks.apply(this,arguments)},ZS={width:"auto",height:"auto"},_a=function(e,t,s){return Math.max(Math.min(e,s),t)},Lg=function(e,t,s){var i=Math.round(e/t);return i*t+s*(i-1)},Zn=function(e,t){return new RegExp(e,"i").test(t)},Ua=function(e){return!!(e.touches&&e.touches.length)},XS=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},Og=function(e,t,s){s===void 0&&(s=0);var i=t.reduce(function(o,r,a){return Math.abs(r-e)<Math.abs(t[o]-e)?a:o},0),n=Math.abs(t[i]-e);return s===0||n<s?t[i]:e},Rd=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},$a=function(e,t,s,i){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var n=Number(e.replace("%",""))/100;return t*n}if(e.endsWith("vw")){var n=Number(e.replace("vw",""))/100;return s*n}if(e.endsWith("vh")){var n=Number(e.replace("vh",""))/100;return i*n}}return e},QS=function(e,t,s,i,n,o,r){return i=$a(i,e.width,t,s),n=$a(n,e.height,t,s),o=$a(o,e.width,t,s),r=$a(r,e.height,t,s),{maxWidth:typeof i>"u"?void 0:Number(i),maxHeight:typeof n>"u"?void 0:Number(n),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof r>"u"?void 0:Number(r)}},JS=function(e){return Array.isArray(e)?e:[e,e]},e2=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Ng="__resizable_base__",t2=(function(e){YS(t,e);function t(s){var i,n,o,r,a=e.call(this,s)||this;return a.ratio=1,a.resizable=null,a.parentLeft=0,a.parentTop=0,a.resizableLeft=0,a.resizableRight=0,a.resizableTop=0,a.resizableBottom=0,a.targetLeft=0,a.targetTop=0,a.delta={width:0,height:0},a.appendBase=function(){if(!a.resizable||!a.window)return null;var l=a.parentNode;if(!l)return null;var c=a.window.document.createElement("div");return c.style.width="100%",c.style.height="100%",c.style.position="absolute",c.style.transform="scale(0, 0)",c.style.left="0",c.style.flex="0 0 100%",c.classList?c.classList.add(Ng):c.className+=Ng,l.appendChild(c),c},a.removeBase=function(l){var c=a.parentNode;c&&c.removeChild(l)},a.state={isResizing:!1,width:(n=(i=a.propsSize)===null||i===void 0?void 0:i.width)!==null&&n!==void 0?n:"auto",height:(r=(o=a.propsSize)===null||o===void 0?void 0:o.height)!==null&&r!==void 0?r:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},a.onResizeStart=a.onResizeStart.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.onMouseUp=a.onMouseUp.bind(a),a}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ZS},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var s=0,i=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,o=this.resizable.offsetHeight,r=this.resizable.style.position;r!=="relative"&&(this.resizable.style.position="relative"),s=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:n,i=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=r}return{width:s,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var s=this,i=this.props.size,n=function(a){var l;if(typeof s.state[a]>"u"||s.state[a]==="auto")return"auto";if(s.propsSize&&s.propsSize[a]&&(!((l=s.propsSize[a])===null||l===void 0)&&l.toString().endsWith("%"))){if(s.state[a].toString().endsWith("%"))return s.state[a].toString();var c=s.getParentSize(),d=Number(s.state[a].toString().replace("px","")),u=d/c[a]*100;return"".concat(u,"%")}return Rd(s.state[a])},o=i&&typeof i.width<"u"&&!this.state.isResizing?Rd(i.width):n("width"),r=i&&typeof i.height<"u"&&!this.state.isResizing?Rd(i.height):n("height");return{width:o,height:r}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var s=this.appendBase();if(!s)return{width:0,height:0};var i=!1,n=this.parentNode.style.flexWrap;n!=="wrap"&&(i=!0,this.parentNode.style.flexWrap="wrap"),s.style.position="relative",s.style.minWidth="100%",s.style.minHeight="100%";var o={width:s.offsetWidth,height:s.offsetHeight};return i&&(this.parentNode.style.flexWrap=n),this.removeBase(s),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var s=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:s.flexBasis!=="auto"?s.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(s,i){var n=this.propsSize&&this.propsSize[i];return this.state[i]==="auto"&&this.state.original[i]===s&&(typeof n>"u"||n==="auto")?"auto":s},t.prototype.calculateNewMaxFromBoundary=function(s,i){var n=this.props.boundsByDirection,o=this.state.direction,r=n&&Zn("left",o),a=n&&Zn("top",o),l,c;if(this.props.bounds==="parent"){var d=this.parentNode;d&&(l=r?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),c=a?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=r?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=r?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(s=s&&s<l?s:l),c&&Number.isFinite(c)&&(i=i&&i<c?i:c),{maxWidth:s,maxHeight:i}},t.prototype.calculateNewSizeFromDirection=function(s,i){var n=this.props.scale||1,o=JS(this.props.resizeRatio||1),r=o[0],a=o[1],l=this.state,c=l.direction,d=l.original,u=this.props,h=u.lockAspectRatio,g=u.lockAspectRatioExtraHeight,m=u.lockAspectRatioExtraWidth,v=d.width,C=d.height,w=g||0,b=m||0;return Zn("right",c)&&(v=d.width+(s-d.x)*r/n,h&&(C=(v-b)/this.ratio+w)),Zn("left",c)&&(v=d.width-(s-d.x)*r/n,h&&(C=(v-b)/this.ratio+w)),Zn("bottom",c)&&(C=d.height+(i-d.y)*a/n,h&&(v=(C-w)*this.ratio+b)),Zn("top",c)&&(C=d.height-(i-d.y)*a/n,h&&(v=(C-w)*this.ratio+b)),{newWidth:v,newHeight:C}},t.prototype.calculateNewSizeFromAspectRatio=function(s,i,n,o){var r=this.props,a=r.lockAspectRatio,l=r.lockAspectRatioExtraHeight,c=r.lockAspectRatioExtraWidth,d=typeof o.width>"u"?10:o.width,u=typeof n.width>"u"||n.width<0?s:n.width,h=typeof o.height>"u"?10:o.height,g=typeof n.height>"u"||n.height<0?i:n.height,m=l||0,v=c||0;if(a){var C=(h-m)*this.ratio+v,w=(g-m)*this.ratio+v,b=(d-v)/this.ratio+m,x=(u-v)/this.ratio+m,y=Math.max(d,C),S=Math.min(u,w),F=Math.max(h,b),R=Math.min(g,x);s=_a(s,y,S),i=_a(i,F,R)}else s=_a(s,d,u),i=_a(i,h,g);return{newWidth:s,newHeight:i}},t.prototype.setBoundingClientRect=function(){var s=1/(this.props.scale||1);if(this.props.bounds==="parent"){var i=this.parentNode;if(i){var n=i.getBoundingClientRect();this.parentLeft=n.left*s,this.parentTop=n.top*s}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left*s,this.targetTop=o.top*s}if(this.resizable){var r=this.resizable.getBoundingClientRect(),a=r.left,l=r.top,c=r.right,d=r.bottom;this.resizableLeft=a*s,this.resizableRight=c*s,this.resizableTop=l*s,this.resizableBottom=d*s}},t.prototype.onResizeStart=function(s,i){if(!(!this.resizable||!this.window)){var n=0,o=0;if(s.nativeEvent&&XS(s.nativeEvent)?(n=s.nativeEvent.clientX,o=s.nativeEvent.clientY):s.nativeEvent&&Ua(s.nativeEvent)&&(n=s.nativeEvent.touches[0].clientX,o=s.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var r=this.props.onResizeStart(s,i,this.resizable);if(r===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var a,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var d=this.window.getComputedStyle(c).flexDirection;this.flexDir=d.startsWith("row")?"row":"column",a=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var u={original:{x:n,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ks(ks({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(s.target).cursor||"auto"}),direction:i,flexBasis:a};this.setState(u)}},t.prototype.onMouseMove=function(s){var i=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Ua(s))try{s.preventDefault(),s.stopPropagation()}catch{}var n=this.props,o=n.maxWidth,r=n.maxHeight,a=n.minWidth,l=n.minHeight,c=Ua(s)?s.touches[0].clientX:s.clientX,d=Ua(s)?s.touches[0].clientY:s.clientY,u=this.state,h=u.direction,g=u.original,m=u.width,v=u.height,C=this.getParentSize(),w=QS(C,this.window.innerWidth,this.window.innerHeight,o,r,a,l);o=w.maxWidth,r=w.maxHeight,a=w.minWidth,l=w.minHeight;var b=this.calculateNewSizeFromDirection(c,d),x=b.newHeight,y=b.newWidth,S=this.calculateNewMaxFromBoundary(o,r);this.props.snap&&this.props.snap.x&&(y=Og(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(x=Og(x,this.props.snap.y,this.props.snapGap));var F=this.calculateNewSizeFromAspectRatio(y,x,{width:S.maxWidth,height:S.maxHeight},{width:a,height:l});if(y=F.newWidth,x=F.newHeight,this.props.grid){var R=Lg(y,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),E=Lg(x,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),D=this.props.snapGap||0,T=D===0||Math.abs(R-y)<=D?R:y,P=D===0||Math.abs(E-x)<=D?E:x;y=T,x=P}var k={width:y-g.width,height:x-g.height};if(this.delta=k,m&&typeof m=="string"){if(m.endsWith("%")){var A=y/C.width*100;y="".concat(A,"%")}else if(m.endsWith("vw")){var U=y/this.window.innerWidth*100;y="".concat(U,"vw")}else if(m.endsWith("vh")){var I=y/this.window.innerHeight*100;y="".concat(I,"vh")}}if(v&&typeof v=="string"){if(v.endsWith("%")){var A=x/C.height*100;x="".concat(A,"%")}else if(v.endsWith("vw")){var U=x/this.window.innerWidth*100;x="".concat(U,"vw")}else if(v.endsWith("vh")){var I=x/this.window.innerHeight*100;x="".concat(I,"vh")}}var H={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(x,"height")};this.flexDir==="row"?H.flexBasis=H.width:this.flexDir==="column"&&(H.flexBasis=H.height);var W=this.state.width!==H.width,V=this.state.height!==H.height,Z=this.state.flexBasis!==H.flexBasis,L=W||V||Z;L&&Ao.flushSync(function(){i.setState(H)}),this.props.onResize&&L&&this.props.onResize(s,h,this.resizable,k)}},t.prototype.onMouseUp=function(s){var i,n,o=this.state,r=o.isResizing,a=o.direction;o.original,!(!r||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(s,a,this.resizable,this.delta),this.props.size&&this.setState({width:(i=this.props.size.width)!==null&&i!==void 0?i:"auto",height:(n=this.props.size.height)!==null&&n!==void 0?n:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ks(ks({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(s){var i,n;this.setState({width:(i=s.width)!==null&&i!==void 0?i:"auto",height:(n=s.height)!==null&&n!==void 0?n:"auto"})},t.prototype.renderResizer=function(){var s=this,i=this.props,n=i.enable,o=i.handleStyles,r=i.handleClasses,a=i.handleWrapperStyle,l=i.handleWrapperClass,c=i.handleComponent;if(!n)return null;var d=Object.keys(n).map(function(u){return n[u]!==!1?f.jsx(KS,{direction:u,onResizeStart:s.onResizeStart,replaceStyles:o&&o[u],className:r&&r[u],children:c&&c[u]?c[u]:null},u):null});return f.jsx("div",{className:l,style:a,children:d})},t.prototype.render=function(){var s=this,i=Object.keys(this.props).reduce(function(r,a){return e2.indexOf(a)!==-1||(r[a]=s.props[a]),r},{}),n=ks(ks(ks({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return f.jsxs(o,ks({style:n,className:this.props.className},i,{ref:function(r){r&&(s.resizable=r)},children:[this.state.isResizing&&f.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t})(p.PureComponent);const s2=({side:e,className:t})=>{const s=e===Gr.Left,i=s?j.IconChevronLeft:j.IconChevronRight;return f.jsx("div",{className:t,children:f.jsx(i,{className:ae("h-full",s&&"-ml-6")})})},i2=({side:e,isResizing:t,customHandler:s,handlerClassName:i})=>{const n=J("invisible h-full w-0.5 group-hover:visible bg-accent-primary text-accent-primary cursor-col-resize transition-opacity",t&&"visible",i),o=f.jsx(s2,{side:e,className:n});return s?f.jsx("div",{className:n,children:s}):o},Dv=({children:e,minWidth:t,maxWidth:s,width:i,defaultWidth:n,onResizeStop:o,onResize:r,side:a=Gr.Right,resizeHandlerClassName:l,resizeHandler:c})=>{const[d,u]=p.useState(!1),[h,g]=p.useState(n),m=i!==void 0,v=m?i:h,C=p.useRef(null),w=p.useCallback(()=>{u(!0)},[]),b=p.useCallback(()=>{u(!1);const y=C.current?.resizable?.getBoundingClientRect(),S=y?Math.round(y.width):t;m||g(S),o?.(S)},[o,m,t]),x=p.useMemo(()=>{const y=a===Gr.Left,S=f.jsx(i2,{side:a,isResizing:d,customHandler:c,handlerClassName:l});return{size:m?{width:v,height:"100%"}:void 0,defaultSize:m?void 0:{width:v,height:"100%"},minWidth:t,maxWidth:s,enable:{left:y,right:!y},handleClasses:{right:"group",left:"group"},handleStyles:{right:{right:"-8px",zIndex:10},left:{left:0,zIndex:10}},handleComponent:{left:y?S:void 0,right:y?void 0:S},onResizeStart:w,onResize:(F,R,E)=>{const D=Math.round(E.offsetWidth);r?.(D)},onResizeStop:b}},[a,m,v,t,s,c,l,d,w,b,r]);return f.jsx(t2,{ref:C,...x,children:f.jsx("div",{className:"group flex size-full flex-col bg-layer-3 divide-y divide-tertiary transition-all",children:e})})},Pv=({enabled:e=!0,children:t,...s})=>e?f.jsx(Dv,{...s,children:t}):t;var as=(e=>(e.Default="default",e.Text="text",e.Circular="circular",e.Rectangular="rectangular",e))(as||{}),Sr=(e=>(e.Small="small",e.Default="default",e.Large="large",e))(Sr||{}),Pl=(e=>(e.Circle="circle",e.Square="square",e))(Pl||{});const n2=e=>{if(typeof e=="number")return e;switch(e){case Sr.Small:return 32;case Sr.Large:return 64;case Sr.Default:default:return 40}},Jn=({active:e=!0,paragraph:t=!0,avatar:s=!1,showTitle:i=!0,loading:n=!0,children:o,variant:r=as.Default,width:a,height:l,className:c,...d})=>{if(!n&&o)return f.jsx(f.Fragment,{children:o});const u=J("bg-layer-3",e&&"animate-pulse",c);if(r!==as.Default){const E=J(u,r===as.Circular&&"rounded-full",r===as.Rectangular&&"rounded",r===as.Text&&"rounded"),D={};return a&&(D.width=typeof a=="number"?`${a}px`:a),l&&(D.height=typeof l=="number"?`${l}px`:l),f.jsx("div",{className:E,style:D,...d})}const h=!!s,g=!!i,m=!!t,v=typeof s=="object"?s:{},C=typeof i=="object"?i:{},w=typeof t=="object"?t:{},b=n2(v.size),x=v.shape??Pl.Circle,y=C.width??"38%",S=w.rows??3,F=w.width,R=E=>F?Array.isArray(F)?F[E]??"100%":F:E===S-1?"61%":"100%";return f.jsxs("div",{...d,className:J("flex gap-4",c),children:[h&&f.jsx("div",{className:J(u,x===Pl.Circle?"rounded-full":"rounded","flex-shrink-0"),style:{width:b,height:b}}),f.jsxs("div",{className:"flex-1 flex flex-col gap-3",children:[g&&f.jsx("div",{className:J(u,"h-4 rounded"),style:{width:y}}),m&&f.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:S}).map((E,D)=>f.jsx("div",{className:J(u,"h-4 rounded"),style:{width:R(D)}},D))})]})]})};function $e(e){if(e?.length)return e[e.length-1]}function Li(e,t,s){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(e[n]!==t[n]&&!s?.(e[n],t[n]))return!1;return!0}function dr(e,t){if(e){for(const s of e)if(t(s))return!0}}function Bs(e,t){const s=e.indexOf(t);s>=0&&e.splice(s,1)}function o2(e,t){let s=0,i=0;for(;s<e.length;s++)t.includes(e[s])||(e[i]=e[s],i++);for(;i<e.length;)e.pop()}function Hg(e,t,s){for(let i=0;i<t.length;i++)Bs(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(s,0,t[i])}var Qs=e=>e==null||e===""?null:e;function se(e){return e!=null&&e!==""}function st(e){return!se(e)}var Du=e=>e!=null&&typeof e.toString=="function"?e.toString():null,Br=(e,t)=>{const s=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return s===i},r2=(e,t,s=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e=="object"&&e.toNumber&&(e=e.toNumber()),typeof t=="object"&&t.toNumber&&(t=t.toNumber()),!s||typeof e!="string"?e>t?1:e<t?-1:0:e.localeCompare(t)),gn=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 i=t?this.allAsyncListeners:this.allSyncListeners;let n=i.get(e);return!n&&s&&(n=new Set,i.set(e,n)),n}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 i=this.getListeners(e,s,!1);i&&(i.delete(t),i.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:i}=this,n=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},o=this.getListeners(s,t,!1);if((o?.size??0)>0){const a=new Set(o);for(const l of a)o?.has(l)&&n(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)n(()=>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)},s=this.frameworkOverrides;s?s.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}},a2=/[&<>"']/g,l2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Oo(e){return e?.toString().toString()??null}function Rr(e){return Oo(e)?.replace(a2,t=>l2[t])??null}function Gg(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function c2(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(n=>n.substring(0,1).toUpperCase()+(n.length>1?n.substring(1,n.length):"")).join(" ")}function ms(e){return e.eRootDiv.getRootNode()}function et(e){return ms(e).activeElement}function Ct(e){const{gos:t,eRootDiv:s}=e;let i=null;const n=t.get("getDocument");return n&&se(n)?i=n():s&&(i=s.ownerDocument),i&&se(i)?i:document}function Ih(e){const t=et(e);return t===null||t===Ct(e).body}function Mh(e){return Ct(e).defaultView||window}function Ah(e){let t=null,s=null;try{t=Ct(e).fullscreenElement}catch{}finally{t||(t=ms(e));const i=t.querySelector("body");i?s=i:t instanceof ShadowRoot?s=t:t instanceof Document?s=t?.documentElement:s=t}return s}function d2(e){return Ah(e)?.clientWidth??(window.innerWidth||-1)}function u2(e){return Ah(e)?.clientHeight??(window.innerHeight||-1)}function ys(e,t,s){s==null||typeof s=="string"&&s==""?Tv(e,t):Ss(e,t,s)}function Ss(e,t,s){e.setAttribute(kv(t),s.toString())}function Tv(e,t){e.removeAttribute(kv(t))}function kv(e){return`aria-${e}`}function fn(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function h2(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function p2(e){return e.getAttribute("aria-label")}function Ro(e,t){ys(e,"label",t)}function Vr(e,t){ys(e,"labelledby",t)}function Iv(e,t){ys(e,"live",t)}function g2(e,t){ys(e,"atomic",t)}function f2(e,t){ys(e,"relevant",t)}function Lh(e,t){ys(e,"invalid",t)}function m2(e,t){ys(e,"disabled",t)}function Mv(e,t){ys(e,"hidden",t)}function Pu(e,t){Ss(e,"expanded",t)}function v2(e,t){Ss(e,"setsize",t)}function C2(e,t){Ss(e,"posinset",t)}function w2(e,t){Ss(e,"rowcount",t)}function Oh(e,t){Ss(e,"rowindex",t)}function b2(e,t){Ss(e,"rowspan",t)}function x2(e,t){Ss(e,"colcount",t)}function Av(e,t){Ss(e,"colindex",t)}function y2(e,t){Ss(e,"colspan",t)}function S2(e,t){Ss(e,"sort",t)}function R2(e){Tv(e,"sort")}function Lv(e,t){ys(e,"selected",t)}function F2(e,t){ys(e,"controls",t)}function E2(e,t){F2(e,t.id),Vr(t,e.id)}function Bg(e,t){ys(e,"owns",t)}function Cc(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var D2="[tabindex], input, select, button, textarea, [href]",Ov="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Fr(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(Ov)?!1:xs(e)}function Ke(e,t,s={}){const{skipAriaHidden:i}=s;e.classList.toggle("ag-hidden",!t),i||Mv(e,!t)}function P2(e,t,s={}){const{skipAriaHidden:i}=s;e.classList.toggle("ag-invisible",!t),i||Mv(e,!t)}function zr(e,t){const s="disabled",i=t?o=>o.setAttribute(s,""):o=>o.removeAttribute(s);i(e);const n=e.querySelectorAll("input")??[];for(const o of n)i(o)}function on(e,t,s){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof s=="number"){if(++i>s)break}else if(e===s)break}return!1}function Tn(e){const{height:t,width:s,borderTopWidth:i,borderRightWidth:n,borderBottomWidth:o,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:g,marginLeft:m,boxSizing:v}=window.getComputedStyle(e),C=Number.parseFloat;return{height:C(t||"0"),width:C(s||"0"),borderTopWidth:C(i||"0"),borderRightWidth:C(n||"0"),borderBottomWidth:C(o||"0"),borderLeftWidth:C(r||"0"),paddingTop:C(a||"0"),paddingRight:C(l||"0"),paddingBottom:C(c||"0"),paddingLeft:C(d||"0"),marginTop:C(u||"0"),marginRight:C(h||"0"),marginBottom:C(g||"0"),marginLeft:C(m||"0"),boxSizing:v}}function Nh(e){const t=Tn(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Wr(e){const t=Tn(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function Nv(e){const{height:t,marginBottom:s,marginTop:i}=Tn(e);return Math.floor(t+s+i)}function Tl(e){const{width:t,marginLeft:s,marginRight:i}=Tn(e);return Math.floor(t+s+i)}function Hv(e){const t=e.getBoundingClientRect(),{borderTopWidth:s,borderLeftWidth:i,borderRightWidth:n,borderBottomWidth:o}=Tn(e);return{top:t.top+(s||0),left:t.left+(i||0),right:t.right+(n||0),bottom:t.bottom+(o||0)}}function kl(e,t){let s=e.scrollLeft;return t&&(s=Math.abs(s)),s}function Il(e,t,s){s&&(t*=-1),e.scrollLeft=t}function Wt(e){for(;e?.firstChild;)e.firstChild.remove()}function si(e){e?.parentNode&&e.remove()}function Gv(e){return!!e.offsetParent}function xs(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!Gv(e)||window.getComputedStyle(e).visibility!=="visible")}function Hh(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function jr(e){return()=>{const t=e();return t?Bv(t)||T2(t):!0}}function Bv(e){return e.clientWidth<e.scrollWidth}function T2(e){return e.clientHeight<e.scrollHeight}function Ml(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Os(e,t)}function Os(e,t){t=Gh(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Er(e,t){t=Gh(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Gh(e){return typeof e=="number"?`${e}px`:e}function Bh(e){return e instanceof Node||e instanceof HTMLElement}function Bt(e,t,s){s==null||s===""?e.removeAttribute(t):e.setAttribute(t,s.toString())}function k2(e,t){if(!t.isContentEditable)return;const s=Mh(e).getSelection();if(!s)return;const i=Ct(e).createRange();i.selectNodeContents(t),i.collapse(!1),s.removeAllRanges(),s.addRange(i)}function ri(e,t,s){const n=Mh(e).ResizeObserver,o=n?new n(s):null;return o?.observe(t),()=>o?.disconnect()}function ai(e,t){const s=Mh(e);s.requestAnimationFrame?s.requestAnimationFrame(t):s.webkitRequestAnimationFrame?s.webkitRequestAnimationFrame(t):s.setTimeout(t,0)}var Vv="data-ref",Fd;function Vg(){return Fd??(Fd=document.createTextNode(" ")),Fd.cloneNode()}function mn(e){const{attrs:t,children:s,cls:i,ref:n,role:o,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),n&&a.setAttribute(Vv,n),o&&a.setAttribute("role",o),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(Vg()),l=!1),a.append(mn(c)),a.appendChild(Vg())))}return a}var I2=["touchstart","touchend","touchmove","touchcancel","scroll"],M2=["wheel"],Ed={},Al=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return s=>{if(typeof Ed[s]=="boolean")return Ed[s];const i=document.createElement(e[s]||"div");return s="on"+s,Ed[s]=s in i}})();function A2(e,t){return!t||!e?!1:O2(t).indexOf(e)>=0}function L2(e){const t=[];let s=e.target;for(;s;)t.push(s),s=s.parentElement;return t}function O2(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():L2(t)}function N2(e,t,s){const i=H2(t);let n;i!=null&&(n={passive:i}),e.addEventListener(t,s,n)}var H2=e=>{const t=I2.includes(e),s=M2.includes(e);if(t)return!0;if(s)return!1};function zv(e,t,s){if(s===0)return!1;const i=Math.abs(e.clientX-t.clientX),n=Math.abs(e.clientY-t.clientY);return Math.max(i,n)<=s}var co=(e,t)=>{const s=e.identifier;for(let i=0,n=t.length;i<n;++i){const o=t[i];if(o.identifier===s)return o}return null};function _r(e,t){return e.gos.isElementInThisInstance(t.target)}function G2(e,t,s){const n=e.getBoundingClientRect().height,o=d2(s)-2,r=u2(s)-2;if(!e.offsetParent)return;const l=Hv(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-n/2,h=d-l.left-10;const g=Ct(s),m=g.defaultView||window,v=m.pageYOffset||g.documentElement.scrollTop,C=m.pageXOffset||g.documentElement.scrollLeft;o>0&&h+e.clientWidth>o+C&&(h=o+C-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+v&&(u=r+v-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}var dl=(e,...t)=>{for(const s of t){const[i,n,o,r]=s;i.addEventListener(n,o,r),e.push(s)}},Vh=e=>{if(e){for(const[t,s,i,n]of e)t.removeEventListener(s,i,n);e.length=0}},bi=e=>{e.cancelable&&e.preventDefault()};function B2(e,t){return t}function Wv(e){return e?.getLocaleTextFunc()??B2}function V2(e,t,s,i){const n=t[s];return e.getLocaleTextFunc()(s,typeof n=="function"?n(i):n,i)}function z2(e){return(t,s,i)=>e({key:t,defaultValue:s,variableValues:i})}function W2(e){return(t,s,i)=>{let n=e?.[t];if(n&&i?.length){let o=0;for(;!(o>=i.length||n.indexOf("${variable}")===-1);)n=n.replace("${variable}",i[o++])}return n??s}}var Ht=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 gn),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 i of Object.keys(t)){const n=t[i];n&&s.push(this._setupListener(e,i,n))}return s}_setupListener(e,t,s){if(this.destroyed)return()=>null;let i;if(j2(e))e.__addEventListener(t,s),i=()=>(e.__removeEventListener(t,s),null);else{const n=_2(e);e instanceof HTMLElement?N2(e,t,s):n?e.addListener(t,s):e.addEventListener(t,s),i=n?()=>(e.removeListener(t,s),null):()=>(e.removeEventListener(t,s),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(n=>n!==i),null)}setupPropertyListener(e,t){const{gos:s}=this;s.addPropertyEventListener(e,t);const i=()=>(s.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(n=>n!==i),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++,i=n=>{if(n.changeSet){if(n.changeSet&&n.changeSet.id===this.lastChangeSetIdLookup[s])return;this.lastChangeSetIdLookup[s]=n.changeSet.id}const o={type:"propertyChanged",changeSet:n.changeSet,source:n.source};t(o)};for(const n of e)this.setupPropertyListener(n,i)}getLocaleTextFunc(){return Wv(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 j2(e){return e.__addEventListener!==void 0}function _2(e){return e.eventServiceType==="global"}var B=class extends Ht{},Tu=new Set,wc=(e,t)=>{Tu.has(t)||(Tu.add(t),e())};wc._set=Tu;var U2={pending:!1,funcs:[]},$2={pending:!1,funcs:[]};function ku(e,t="setTimeout",s){const i=t==="raf"?$2:U2;if(i.funcs.push(e),i.pending)return;i.pending=!0;const n=()=>{const o=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of o)r()};t==="raf"?ai(s,n):window.setTimeout(n,0)}function ht(e,t,s){let i;return function(...n){const o=this;return window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(o,n)},s),i}}function zg(e,t){let s=0;return function(...i){const n=this,o=Date.now();o-s<t||(s=o,e.apply(n,i))}}function q2(e,t,s,i=100){const n=Date.now();let o=null,r=!1;const a=()=>{o!=null&&(window.clearInterval(o),o=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-n>i;(t()||c)&&(s(),r=!0,a())};l(),r||(o=window.setInterval(l,10))}var jv=new Set(["__proto__","constructor","prototype"]);function K2(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(i=>!jv.has(i)))t(s,e[s])}}function Mt(e,t,s=!0,i=!1){se(t)&&K2(t,(n,o)=>{let r=e[n];r!==o&&(i&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},e[n]=r),Wg(o)&&Wg(r)&&!Array.isArray(r)?Mt(r,o,s,i):(s||o!==void 0)&&(e[n]=o))})}function Wg(e){return typeof e=="object"&&e!==null}var zh=class Ys{static applyGlobalGridOptions(t){if(!Ys.gridOptions)return{...t};let s={};return Mt(s,Ys.gridOptions,!0,!0),Ys.mergeStrategy==="deep"?Mt(s,t,!0,!0):s={...s,...t},Ys.gridOptions.context&&(s.context=Ys.gridOptions.context),t.context&&(Ys.mergeStrategy==="deep"&&s.context&&Mt(t.context,s.context,!0,!0),s.context=t.context),s}static applyGlobalGridOption(t,s){if(Ys.mergeStrategy==="deep"){const i=_v(t);if(i&&typeof i=="object"&&typeof s=="object")return Ys.applyGlobalGridOptions({[t]:s})[t]}return s}};zh.gridOptions=void 0;zh.mergeStrategy="shallow";var Wh=zh;function _v(e){return Wh.gridOptions?.[e]}var Uv={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,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,refreshAfterGroupEdit:!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,groupHideColumnsUntilExpanded:!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,enableFilterHandlers:!1},$v="https://www.ag-grid.com";function vn(e,t,...s){e.get("debug")&&console.log("AG Grid: "+t,...s)}function Dr(e,...t){wc(()=>qv(e,...t),e+t?.join(""))}function uo(e,...t){wc(()=>Y2(e,...t),e+t?.join(""))}function Y2(e,...t){console.error("AG Grid: "+e,...t)}function qv(e,...t){console.warn("AG Grid: "+e,...t)}var Kv=new Set,Ll={},rn={},ul,Yv=!1,Zv=!1,Z2=!1;function X2(e){const[t,s]=e.version.split(".")||[],[i,n]=ul.split(".")||[];return t===i&&s===n}function Q2(e){ul||(ul=e.version);const t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} Please update all modules to the same version.`;e.version?X2(e)||uo(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${ul}.`)):uo(t(`'${e.moduleName}' is incompatible.`));const s=e.validate?.();s&&!s.isValid&&uo(`${s.message}`)}function Ur(e,t,s=!1){s||(Yv=!0),Q2(e);const i=e.rowModels??["all"];Kv.add(e);let n;t!==void 0?(Zv=!0,rn[t]===void 0&&(rn[t]={}),n=rn[t]):n=Ll;for(const o of i)n[o]===void 0&&(n[o]={}),n[o][e.moduleName]=e;if(e.dependsOn)for(const o of e.dependsOn)Ur(o,t,s)}function J2(e){delete rn[e]}function Iu(e,t,s){const i=n=>!!Ll[n]?.[e]||!!rn[t]?.[n]?.[e];return i(s)||i("all")}function jh(){return Zv}function eR(e,t){const s=rn[e]??{};return[...Object.values(Ll.all??{}),...Object.values(s.all??{}),...Object.values(Ll[t]??{}),...Object.values(s[t]??{})]}function tR(){return new Set(Kv)}function sR(e,t){const s=rn[e]??{};return[...Object.values(s.all??{}),...Object.values(s[t]??{})]}function iR(){return Yv}function Xv(){return Z2}var Qv=class{static register(e){Ur(e,void 0)}static registerModules(e){for(const t of e)Ur(t,void 0)}};function Jv(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const s=Jv(t.dependsOn);if(s)return s}}}var Q="35.2.1",jg=2e3,_g=100,eC="_version_",tC=null,ho=`${$v}/javascript-data-grid`;function nR(e){tC=e}function oR(e){ho=e}function sC(e,t,s){return tC?.(e,t)??[cR(e,t,s)]}function _h(e,t,s,i,n){e(`${i?"warning":"error"} #${t}`,...sC(t,s,n))}function rR(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 aR(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=rR(e)),t}function hl(e){return e===void 0?"undefined":e===null?"null":e}function Mu(e,t){return`${e}?${t.toString()}`}function lR(e,t,s){const i=Array.from(t.entries()).sort((o,r)=>r[1].length-o[1].length);let n=Mu(e,t);for(const[o,r]of i){if(o===eC)continue;const a=n.length-s;if(a<=0)break;const l="...",c=a+l.length,d=r.length-c>_g?r.slice(0,r.length-c)+l:r.slice(0,_g)+l;t.set(o,d),n=Mu(e,t)}return n}function iC(e,t){const s=new URLSearchParams;if(s.append(eC,Q),t)for(const o of Object.keys(t))s.append(o,aR(t[o]));const i=`${ho}/errors/${e}`,n=Mu(i,s);return n.length<=jg?n:lR(i,s,jg)}var cR=(e,t,s)=>{const i=iC(e,t);return`${`${s?s+`
7
7
  `:""}Visit ${i}`}${s?"":`
8
8
  Alternatively register the ValidationModule to see the full message in the console.`}`};function q(...e){_h(Dr,e[0],e[1],!0)}function je(...e){_h(uo,e[0],e[1],!1)}function Cr(e,t,s){_h(uo,e,t,!1,s)}function dR(e,t){const s=t[0];return`error #${s} `+sC(s,t[1],e).join(" ")}function Ns(...e){return dR(void 0,e)}function nC(e,t){return e.get("rowModelType")===t}function it(e,t){return nC(e,"clientSide")}function No(e,t){return nC(e,"serverSide")}function yt(e,t){return e.get("domLayout")===t}function an(e){return Hl(e)!==void 0}function oC(e){return typeof e.get("getRowHeight")=="function"}function uR(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function hR({gos:e,formula:t}){const s=e.get("rowNumbers");return s||!!t?.active&&s!==!1}function Di(e,t,s=!1,i){const{gos:n,environment:o}=e;if(i==null&&(i=o.getDefaultRowHeight()),oC(n)){if(s)return{height:i,estimated:!0};const l={node:t,data:t.data},c=n.getCallback("getRowHeight")(l);if(Au(c))return c===0&&q(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&n.get("masterDetail"))return pR(n);const r=n.get("rowHeight");return{height:r&&Au(r)?r:i,estimated:!1}}function pR(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Au(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ln(e){const{environment:t,gos:s}=e,i=s.get("rowHeight");if(!i||st(i))return t.getDefaultRowHeight();const n=t.refreshRowHeightVariable();return n!==-1?n:(q(24),t.getDefaultRowHeight())}function Au(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function rC(e,t,s){const i=t[e.getDomDataKey()];return i?i[s]:void 0}function Cn(e,t,s,i){const n=e.getDomDataKey();let o=t[n];st(o)&&(o={},t[n]=o),o[s]=i}function po(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function aC(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||yt(e,"print"))}function Xs(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Ol(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function lC(e){return e.get("grandTotalRow")}function gR(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function fR(e){return gR(e)&&e.get("groupHideColumnsUntilExpanded")&&it(e)}function cC(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function dC(e,t,s){return!!t.group&&!t.footer&&cC(e,s)}function Fo(e){const t=e.getCallback("getRowId");return t===void 0?t:s=>{let i=t(s);return typeof i!="string"&&(wc(()=>q(25,{id:i}),"getRowIdString"),i=String(i)),i}}function mR(e,t){const s=e.get("groupHideParentOfSingleChild");return!!(s===!0||s==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function vR(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function go(e){return e?.checkboxes??!0}function pl(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function Nl(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Dd(e){return e?.hideDisabledCheckboxes??!1}function CR(e){return typeof e.get("rowSelection")!="string"}function Pi(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function fo(e){const t=e.get("cellSelection")??!1;return(typeof t=="object"&&t.enableColumnSelection)??!1}function uC(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const s=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return s&&i?!1:s?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function wR(e){const t=uC(e);return t===!0||t==="enableSelection"}function bR(e){const t=uC(e);return t===!0||t==="enableDeselection"}function Lu(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function Hl(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 Gl(e){return Hl(e)==="multiRow"}function xR(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Bl(e){const t=e.get("rowSelection");if(typeof t=="string"){const s=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return s&&i?"filteredDescendants":s?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function hC(e,t=!0){const s=e.get("rowSelection");return typeof s!="object"?t?"all":void 0:s.mode==="multiRow"?s.selectAll:"all"}function yR(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function $r(e){const t=Bl(e);return t==="descendants"||t==="filteredDescendants"}function Ug(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function SR(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Vt(e){return e.get("columnMenu")==="legacy"}function RR(e){return!Vt(e)}function FR(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function ER(e,t,s){typeof e!="object"&&(e={});const i={...e};for(const n of s){const o=t[n];typeof o<"u"&&(i[n]=o)}return i}function DR(e,t){if(!e)return;const s={};let i=!1;for(const r of Object.keys(e))s[r]=e[r],i=!0;if(!i)return;const n={type:"gridOptionsChanged",options:s};t.dispatchEvent(n);const o={type:"componentStateChanged",...s};t.dispatchEvent(o)}function xe(e,t){return e.addCommon(t)}function gl(e,t){return e[t]??e.gridOptions?.[t]??_v(t)??Uv[t]}function PR({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var TR={resizable:!0,sortable:!0},kR=0;function pC(){return kR++}function Ti(e){return e instanceof kn}var IR=["asc","desc",null],MR=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],kn=class extends B{constructor(e,t,s,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=s,this.primary=i,this.isColumn=!0,this.instanceId=pC(),this.autoHeaderHeight=null,this.sortDef=ls(),this._wasSortExplicitlyRemoved=!1,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.formulaRef=null,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new gn,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Rr(s)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:s,colFlex:i}}=this;t?.initCol(this);const n=e.hide;n!==void 0?this.visible=!n:this.visible=!e.initialHide,s?.initCol(this),i?.initCol(this)}setColDef(e,t,s){const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&(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.initState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:s}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=se(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=se(s)&&s.includes(".")&&!i}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 i=e.recreateColDef(this.colDef);this.setColDef(i,i,s.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){const t=e.width??e.initialWidth??200;return 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 xe(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]??TR[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 xe(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){return this.sortDef.direction?this.sortDef:null}getColDefAllowedSortTypes(){const e=[],{sort:t,initialSort:s}=this.colDef,i=t===null?t:ii(t?.type),n=s===null?s:ii(s?.type);return i&&e.push(i),n&&e.push(n),e}getSortingOrder(){const e=this.getColDefAllowedSortTypes().includes("absolute")?MR:IR;return(this.colDef.sortingOrder??this.gos.get("sortingOrder")??e).map(t=>ls(t))}getAvailableSortTypes(){const e=this.getSortingOrder().reduce((t,s)=>(s.direction&&t.push(s.type),t),this.getColDefAllowedSortTypes());return new Set(e)}get wasSortExplicitlyRemoved(){return this._wasSortExplicitlyRemoved}setSortDef(e,t=!1){t||(this._wasSortExplicitlyRemoved=!e.direction),this.sortDef=e}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.getSort()==="asc"}isSortDescending(){return this.getSort()==="desc"}isSortNone(){return st(this.getSort())}isSorting(){return se(this.getSort())}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 q(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 xe(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(st(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.colSpan(t);return Math.max(s,1)}getRowSpan(e){if(st(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}isAllowFormula(){return this.colDef.allowFormula===!0}dispatchColEvent(e,t,s){const i=this.createColumnEvent(e,t);s&&Mt(i,s),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function ls(e){return mo(e)?{direction:e.direction,type:e.type}:{direction:bc(e),type:ii(e)}}function Fi(e){return e==="asc"||e==="desc"||e===null}function Uh(e){return e==="default"||e==="absolute"}function mo(e){if(!e||typeof e!="object")return!1;const t=e;return Uh(t.type)&&Fi(t.direction)}function fl(e,t){return e?t?e.type===t.type&&e.direction===t.direction:e?e.direction===null:!0:t?t.direction===null:!0}function bc(e){return Fi(e)?e:null}function ii(e){return Uh(e)?e:"default"}function AR(e,t,s){const n=s?.()??t.sortSvc.getDisplaySortForColumn(e),o=ii(n?.type),r=bc(n?.direction),a=e.getAvailableSortTypes(),l=a.has("default"),c=a.has("absolute");return{isDefaultSortAllowed:l,isAbsoluteSortAllowed:c,isAbsoluteSort:o==="absolute",isDefaultSort:o==="default",isAscending:r==="asc",isDescending:r==="desc",direction:r}}function Dt(e){return e instanceof ml}var ml=class extends B{constructor(e,t,s,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=s,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=pC(),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)Ti(t)?e(t):Dt(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)Ti(t)?e.push(t):Dt(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 i=this.findChildrenRemovingPadding();for(let o=0,r=i.length;o<r;o++){const a=i[o];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,s=!0):l==="closed"?(t=!0,s=!0):(e=!0,t=!0)}const n=e&&t&&s;this.expandable!==n&&(this.expandable=n,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=s=>{for(const i of s)Dt(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},LR={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function $g(e,t,s){const i={},n=e.gos;return Object.assign(i,n.get("defaultColGroupDef")),Object.assign(i,t),n.validateColDef(i,s),i}var OR=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Du(e);let s=0;for(;;){let i=e??t;if(i?s!==0&&(i+="_"+s):i=s,!this.existingKeys[i]){const n=String(i);return e&&s>0&&q(273,{providedId:e,usedId:n}),this.existingKeys[n]=!0,n}s++}}},NR=(e,t)=>{Dt(e)&&e.setupExpandable(),e.originalParent=t};function HR(e,t=null,s,i,n){const o=new OR,{existingCols:r,existingGroups:a,existingColKeys:l}=GR(i);o.addExistingKeys(l);const c=gC(e,t,0,s,r,o,a,n),{colGroupSvc:d}=e,u=d?.findMaxDepth(c,0)??0,h=d?d.balanceColumnTree(c,0,u,o):c;return Js(null,h,NR),{columnTree:h,treeDepth:u}}function GR(e){const t=[],s=[],i=[];return e&&Js(null,e,n=>{if(Dt(n)){const o=n;s.push(o)}else{const o=n;i.push(o.getId()),t.push(o)}}),{existingCols:t,existingGroups:s,existingColKeys:i}}function gC(e,t,s,i,n,o,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&&_R(u)?c[d]=l.createProvidedColumnGroup(i,u,s,n,o,r,a):c[d]=BR(e,i,u,n,o,a)}return c}function BR(e,t,s,i,n,o){const r=zR(s,i);r&&i?.splice(r.idx,1);let a=r?.column;if(a){const l=Ou(e,s,a.getColId());a.setColDef(l,s,o),VR(e,a,l,o)}else{const l=n.getUniqueKey(s.colId,s.field),c=Ou(e,s,l);a=new kn(c,s,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function fC(e,t,s,i,n,o,r,a){const{sortSvc:l,pinnedCols:c,colFlex:d}=e;s!==void 0&&t.setVisible(!s,a),l&&(l.updateColSort(t,i,a),n!==void 0&&l.setColSortIndex(t,n)),o!==void 0&&c?.setColPinned(t,o),r!==void 0&&d?.setColFlex(t,r)}function VR(e,t,s,i){fC(e,t,s.hide,s.sort,s.sortIndex,s.pinned,s.flex,i);const n=t.getFlex();if(!(n!=null&&n>0))if(s.width!=null)t.setActualWidth(s.width,i);else{const o=t.getActualWidth();t.setActualWidth(o,i)}}function zR(e,t){if(t)for(let s=0;s<t.length;s++){const i=t[s].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[s].getId()===e.colId)return{idx:s,column:t[s]};continue}if(e.field!=null){if(i.field===e.field)return{idx:s,column:t[s]};continue}if(i===e)return{idx:s,column:t[s]}}}function Ou(e,t,s,i){const{gos:n,dataTypeSvc:o}=e,r={},a=n.get("defaultColDef");Mt(r,a,!1,!0);const l=WR(e,r,t,s);l&&jR(e,l,r);const c=r.cellDataType;Mt(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const d=n.get("autoGroupColumnDef"),u=Xs(n);return t.rowGroup&&d&&u&&Mt(r,{sort:d.sort,initialSort:d.initialSort},!1,!0),o?.postProcess(r),o?.validateColDef(r,t,a,s),n.validateColDef(r,s,i),r}function WR(e,t,s,i){const n=e.dataTypeSvc?.updateColDefAndGetColumnType(t,s,i),o=s.type??n??t.type;return t.type=o,o?zl(o):void 0}function jR(e,t,s){if(!t.length)return;const i=Object.assign({},LR),n=e.gos.get("columnTypes")||{};for(const o of Object.keys(n)){const r=n[o];o in i?q(34,{key:o}):(r.type&&q(35),i[o]=r)}for(const o of t){const r=i[o.trim()];r?Mt(s,r,!1,!0):q(36,{t:o})}}function _R(e){return e.children!==void 0}function Js(e,t,s){if(t)for(let i=0;i<t.length;i++){const n=t[i];Dt(n)&&Js(n,n.getChildren(),s),s(n,e)}}var xi="ag-Grid-AutoColumn",$h="ag-Grid-SelectionColumn",qh="ag-Grid-RowNumbersColumn";function mC(e){const t=[],s=i=>{for(let n=0;n<i.length;n++){const o=i[n];Ti(o)?t.push(o):Dt(o)&&s(o.getChildren())}};return s(e),t}function Zs(e){return e.reduce((t,s)=>t+s.getActualWidth(),0)}function Vl(e,t,s){const i={};if(!t)return;Js(null,t,o=>{i[o.getInstanceId()]=o}),s&&Js(null,s,o=>{i[o.getInstanceId()]=null});const n=Object.values(i).filter(o=>o!=null);e.context.destroyBeans(n)}function Kh(e){return e.getId().startsWith(xi)}function Oi(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith($h)??!1}function At(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(qh)??!1}function UR(e){return Oi(e)||At(e)}function zl(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function $R(e,t){return Li(e,t,(s,i)=>s.getColId()===i.getColId())}function qR(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function vo(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Pr(e,t){return e===t||e.colId==t||e.getColDef()===t}var KR=(e,t)=>(s,i)=>{const n={value1:void 0,value2:void 0};let o=!1;return e&&(e[s]!==void 0&&(n.value1=e[s],o=!0),se(i)&&e[i]!==void 0&&(n.value2=e[i],o=!0)),!o&&t&&(t[s]!==void 0&&(n.value1=t[s]),se(i)&&t[i]!==void 0&&(n.value2=t[i])),n};function YR(e,t){const s={...e,sort:void 0,colId:t},i=vC(e);return i&&(s.sort=i.direction,s.sortType=i.type),s}function vC(e){const{sort:t,initialSort:s}=e,i=mo(t)||Fi(t),n=mo(s)||Fi(s);return i?ls(t):n?ls(s):null}function CC(e,t){return e+"_"+t}function at(e){return e instanceof qr}var qr=class extends B{constructor(e,t,s,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=s,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=Rr(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return CC(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)at(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=$e(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??[])Ti(t)?e.push(t):at(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])Ti(t)?e.push(t):at(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(at(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"})}},O={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"},ZR=65,XR=67,QR=86,JR=68,e3=90,t3=89;function wC(e){const{keyCode:t}=e;let s;switch(t){case ZR:s=O.A;break;case XR:s=O.C;break;case QR:s=O.V;break;case JR:s=O.D;break;case e3:s=O.Z;break;case t3:s=O.Y;break;default:s=e.code}return s}function s3(e,t){return new Oe(s=>{s(window.setInterval(e,t))})}var Oe=class wr{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 wr(s=>{let i=t.length;const n=new Array(i);t.forEach((o,r)=>{o.then(a=>{n[r]=a,i--,i===0&&s(n)})})}):wr.resolve()}static resolve(t=null){return new wr(s=>s(t))}then(t){return new wr(s=>{this.status===1?s(t(this.resolution)):this.waiters.push(i=>s(t(i)))})}onDone(t){this.status=1,this.resolution=t;for(const s of this.waiters)s(t)}onReject(t){}},i3=class extends Ht{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.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.externalDropZoneCount=0,this.lastDropTarget=null}addDragSource(e,t=!1){const s={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:i=>this.onDragStart(e,i),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(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;for(let i=0,n=t.length;i<n;i++)if(t[i].dragSource===e){const o=t[i];s.dragSvc?.removeDragSource(o),t.splice(i,1);break}}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:s}=this,i=s.dragSvc;for(const n of e)i?.removeDragSource(n);e.length=0,t.length=0,this.externalDropZoneCount=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 i=this.dropTargetEvent(s,e,!1);s.onDragStop?.(i)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:s}=this;if(e?.onDragCancelled?.(),t&&s){const i=this.dropTargetEvent(t,s,!1);t.onDragCancel?.(i)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const s=this.findCurrentDropTarget(e),{lastDropTarget:i,dragSource:n,dragItem:o}=this;let r=!1;if(s!==i){if(r=!0,i){const a=this.dropTargetEvent(i,e,t);i.onDragLeave?.(a)}if(i!==null&&!s?this.handleExit(n,o):i===null&&s&&this.handleEnter(n,o),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.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.getContainer(),s=e.getSecondaryContainers?.(),i=s?.length;if(!i)return[[t]];const n=new Array(i+1);n[0]=[t];for(let o=0;o<i;++o)n[o+1]=s[o];return n}isMouseOnDropTarget(e,t){const s=this.getAllContainersFromDropTarget(t);let i=!1;const n=(a,l)=>{for(const c of l){const{width:d,height:u,left:h,right:g,top:m,bottom:v}=c.getBoundingClientRect();if(d===0||u===0)return!1;const C=a.clientX>=h&&a.clientX<g,w=a.clientY>=m&&a.clientY<v;if(!C||!w)return!1}return!0};for(const a of s)if(n(e,a)){i=!0;break}const{eElement:o,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(o)?!1:i&&t.isInterestedIn(r,o)}findCurrentDropTarget(e){const t=[],s=this.dropTargets;for(let r=0,a=s.length;r<a;++r){const l=s[r];this.isMouseOnDropTarget(e,l)&&t.push(l)}const i=t.length;if(i===0)return null;if(i===1)return t[0];const o=ms(this.beans).elementsFromPoint(e.clientX,e.clientY);for(let r=0,a=o.length;r<a;++r){const l=o[r];for(let c=0,d=t.length;c<d;c++){const u=t[c],h=this.getAllContainersFromDropTarget(u);let g=!1;for(let m=0,v=h.length;m<v&&!g;m++){const C=h[m];for(let w=0,b=C.length;w<b;w++)if(C[w]===l){g=!0;break}}if(g)return u}}return null}addDropTarget(e){this.dropTargets.push(e),e.external&&this.externalDropZoneCount++}removeDropTarget(e){const t=e.getContainer(),s=this.dropTargets;let i=0;for(let n=0,o=s.length;n<o;++n){const r=s[n];if(r.getContainer()===t){r.external&&--this.externalDropZoneCount;continue}i!==n&&(s[i]=r),++i}s.length=i}hasExternalDropZones(){return this.externalDropZoneCount>0}findExternalZone(e){const t=this.dropTargets;for(let s=0,i=t.length;s<i;++s){const n=t[s];if(n.external&&n.getContainer()===e)return n}return null}dropTargetEvent(e,t,s){const{dragSource:i,dragItem:n,lastDraggingEvent:o,lastMouseEvent:r,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,c=e.getContainer(),d=c.getBoundingClientRect(),{clientX:u,clientY:h}=t,g=u-(r?.clientX||0),m=h-(r?.clientY||0),v=this.createEvent({event:t,x:u-d.left,y:h-d.top,vDirection:m>0?"down":m<0?"up":null,hDirection:g<0?"left":g>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:i,fromNudge:s,dragItem:n,dropZoneTarget:c,dropTarget:o?.dropTarget??null,changed:!!o?.changed});return this.lastDraggingEvent=v,v}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&G2(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=>{const i=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!i||!this.isAlive()){this.destroyBean(s);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const n=this.dragImageComp;n!==s&&(this.dragImageComp=s,this.removeDragImageComp(n)),s&&(this.appendDragImageComp(s),this.updateDragImageComp(),this.positionDragImageComp(i))})}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 i=Ah(this.beans);i?i.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:s,lastDraggingEvent:i,dragImageLastLabel:n}=this;if(!e)return;this.setDragImageCompIcon(s?.getIconName?.(i)??null);let o=t?.dragItemName;typeof o=="function"&&(o=o(i)),o||(o=""),n!==o&&(this.dragImageLastLabel=o,e.setLabel(o))}};function bC(e){return typeof e=="object"&&!!e.component}function n3(e){return e?e.prototype&&"getGui"in e.prototype:!1}function xC(e,t,s,i){const{name:n}=s;let o,r,a,l,c,d;if(t){const u=t,h=u[n+"Selector"],g=h?h(i):null,m=v=>{typeof v=="string"?o=v:v!=null&&v!==!0&&(e.isFrameworkComponent(v)?a=v:r=v)};g?(m(g.component),l=g.params,c=g.popup,d=g.popupPosition):m(u[n])}return{compName:o,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var o3=class extends B{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,i=!1){return this.getCompDetails(this.gridOptions,e,t,s,i)}getCompDetails(e,t,s,i,n=!1){const{name:o,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:u,popupPositionFromSelector:h}=xC(this.beans.frameworkOverrides,e,t,i),g,m;const v=x=>{const y=this.registry.getUserComponent(o,x);y&&(l=y.componentFromFramework?void 0:y.component,c=y.componentFromFramework?y.component:void 0,g=y.params,m=y.processParams)};if(a!=null&&v(a),l==null&&c==null&&s!=null&&v(s),l&&r&&!n3(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!c){const{validation:x}=this.beans;n&&(a!==s||!s)?a?x?.isProvidedUserComp(a)||je(50,{compName:a}):s?x||je(260,{...this.gos.getModuleErrorParams(),propName:o,compName:s}):je(216,{name:o}):s&&!x&&je(146,{comp:s});return}const C=this.mergeParams(e,t,i,d,g,m),w=l==null,b=l??c;return{componentFromFramework:w,componentClass:b,params:C,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(b,w,C,t)}}newAgStackInstance(e,t,s,i){const n=!t;let o;n?o=new e:o=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(o);const r=o.init?.(s);return r==null?Oe.resolve(o):r.then(()=>o)}mergeParams(e,t,s,i=null,n,o){const r={...s,...n},l=e?.[t.name+"Params"];if(typeof l=="function"){const c=l(s);Mt(r,c)}else typeof l=="object"&&Mt(r,l);return Mt(r,i),o?o(r):r}},r3={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},a3={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},l3={name:"headerComponent",optionalMethods:["refresh"]},c3={name:"innerHeaderComponent"},d3={name:"innerHeaderGroupComponent"},u3={name:"headerGroupComponent"},h3={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},p3={name:"loadingCellRenderer",cellRenderer:!0},g3={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},f3={name:"tooltipComponent"},Yh={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},m3={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},v3={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},C3={name:"loadingCellRenderer",cellRenderer:!0},w3={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},b3={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function x3(e,t){return e.getCompDetailsFromGridOptions(a3,"agDragAndDropImage",t,!0)}function y3(e,t,s){return e.getCompDetails(t,l3,"agColumnHeader",s)}function S3(e,t,s){return e.getCompDetails(t,c3,void 0,s)}function R3(e,t){const s=t.columnGroup.getColGroupDef();return e.getCompDetails(s,u3,"agColumnGroupHeader",t)}function F3(e,t,s){return e.getCompDetails(t,d3,void 0,s)}function E3(e,t){return e.getCompDetailsFromGridOptions(v3,void 0,t,!0)}function D3(e,t){return e.getCompDetailsFromGridOptions(C3,"agLoadingCellRenderer",t,!0)}function P3(e,t){return e.getCompDetailsFromGridOptions(w3,"agGroupRowRenderer",t,!0)}function T3(e,t){return e.getCompDetailsFromGridOptions(b3,"agDetailCellRenderer",t,!0)}function qg(e,t,s){return e.getCompDetails(t,h3,void 0,s)}function Kg(e,t,s){return e.getCompDetails(t,p3,"agSkeletonCellRenderer",s,!0)}function yC(e,t,s){return e.getCompDetails(t,g3,"agCellEditor",s,!0)}function k3(e,t,s,i){const n=t.filter;return bC(n)&&(t={filter:n.component,filterParams:t.filterParams}),e.getCompDetails(t,Yh,i,s,!0)}function I3(e,t,s){return e.getCompDetails(t,r3,"agDateInput",s,!0)}function M3(e,t){return e.getCompDetails(t.colDef,f3,"agTooltipComponent",t,!0)}function A3(e,t,s,i){return e.getCompDetails(t,m3,i,s)}function SC(e,t){return xC(e,t,Yh)}function Pd(e,t,s){return e.mergeParams(t,Yh,s)}var L3=class extends i3{createEvent(e){return xe(this.gos,e)}createDragImageComp(e){const{gos:t,beans:s}=this;return x3(s.userCompFactory,xe(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){q(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const s={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(s),t.addDestroyFunc(()=>this.removeDropTarget(s))}};function RC(e){return!!e.operator}var FC="ag-resizer-wrapper",pi=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),O3={tag:"div",cls:FC,children:[pi("eTopLeft","topLeft"),pi("eTop","top"),pi("eTopRight","topRight"),pi("eRight","right"),pi("eBottomRight","bottomRight"),pi("eBottom","bottom"),pi("eBottomLeft","bottomLeft"),pi("eLeft","left")]},N3=class extends Ht{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={popup:!1,...t}}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:s}=this.offsetParent,i=s/2-this.getWidth()/2,n=t/2-this.getHeight()/2;this.offsetElement(i,n,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:s,minWidth:i,width:n,minHeight:o,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,d=0;const u=xs(this.element);if(u){const h=this.findBoundaryElement(),g=window.getComputedStyle(h);if(g.minWidth!=null){const m=h.offsetWidth-this.element.offsetWidth;d=Number.parseInt(g.minWidth,10)-m}if(g.minHeight!=null){const m=h.offsetHeight-this.element.offsetHeight;c=Number.parseInt(g.minHeight,10)-m}}if(this.minHeight=o||c,this.minWidth=i||d,n&&this.setWidth(n),r&&this.setHeight(r),(!n||!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 m=Number.parseFloat(h.style.top),v=Number.parseFloat(h.style.left);g?this.offsetElement(Number.isNaN(v)?0:v,Number.isNaN(m)?0:m,e):this.setPosition(v,m)}}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}}for(const t of Object.keys(e)){const s=!!e[t],i=this.getResizerElement(t),n={dragStartPixels:0,eElement:i,onDragStart:o=>this.onResizeStart(o,t),onDragging:this.onResize.bind(this),onDragStop:o=>this.onResizeEnd(o,t)};(s||!this.isAlive()&&!s)&&(s?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),i.style.pointerEvents="all"):i.style.pointerEvents="none",this.resizable[t]=s)}}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 i=!1;if(typeof e=="string"&&e.includes("%"))Er(s,e),e=Nv(s),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const n=this.getAvailableHeight();n&&e>n&&(e=n)}this.getHeight()!==e&&(i?(s.style.maxHeight="unset",s.style.minHeight="unset"):t?Er(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 i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),o=e?this.position.y:i.top,r=e?0:n.top;let a=0;if(t){const c=this.element.parentElement;if(c){const{bottom:d}=c.getBoundingClientRect();a=d-i.bottom}}return s+r-o-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:s}=this.config;let i=!1;if(typeof e=="string"&&e.includes("%"))Os(t,e),e=Tl(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:n}=this.offsetParent,o=s?this.position.x:this.element.getBoundingClientRect().left;n&&e+o>n&&(e=n-o)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Os(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:i}=this.config,n=i?this.boundaryEl:this.element;n&&(this.popupSvc?.positionPopup({ePopup:n,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:s}),this.setPosition(Number.parseFloat(n.style.left),Number.parseFloat(n.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=ri(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:i,anywhereWithin:n,topBuffer:o}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!s,!!n,r)?0:r,c=this.shouldSkipY(t,!!i,o,a)?0:a;return{movementX:l,movementY:c}}shouldSkipX(e,t,s,i){const n=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:n.left;let l=a<=0&&o.left>=e.clientX||o.right<=e.clientX&&o.right<=r.right;return l?!0:(t?l=i<0&&e.clientX>a+o.left||i>0&&e.clientX<a+o.left:s?l=i<0&&e.clientX>r.right||i>0&&e.clientX<a+o.left:l=i<0&&e.clientX>r.right||i>0&&e.clientX<r.right,l)}shouldSkipY(e,t,s=0,i){const n=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:n.top;let l=a<=0&&o.top>=e.clientY||o.bottom<=e.clientY&&o.bottom<=r.bottom;return l?!0:(t?l=i<0&&e.clientY>a+o.top+s||i>0&&e.clientY<a+o.top:l=i<0&&e.clientY>r.bottom||i>0&&e.clientY<r.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(mn(O3)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${FC}`)?.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:i}=this.config;!s&&!i&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(s=>!s.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,s=0;for(const i of e){const n=!!i.style.flex&&i.style.flex!=="0 0 auto";if(i===this.element)continue;let o=this.minHeight||0,r=this.minWidth||0;if(n){const a=window.getComputedStyle(i);a.minHeight&&(o=Number.parseInt(a.minHeight,10)),a.minWidth&&(r=Number.parseInt(a.minWidth,10))}else o=i.offsetHeight,r=i.offsetWidth;t+=o,s+=r}return{height:t,width:s}}applySizeToSiblings(e){let t=null;const s=this.getSiblings();if(s){for(let i=0;i<s.length;i++){const n=s[i];n!==t&&(e?n.style.height=`${n.offsetHeight}px`:n.style.width=`${n.offsetWidth}px`,n.style.flex="0 0 auto",n===this.element&&(t=s[i+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:s}=this.config,{isTop:i,isRight:n,isBottom:o,isLeft:r}=this.currentResizer,a=n||r,l=o||i,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:r,isTop:i}),u=this.position.x,h=this.position.y;let g=0,m=0;if(a&&c){const v=r?-1:1,C=this.getWidth(),w=C+c*v;let b=!1;r&&(g=C-w,(u+g<=0||w<=this.minWidth)&&(b=!0,g=0)),b||this.setWidth(w)}if(l&&d){const v=i?-1:1,C=this.getHeight(),w=C+d*v;let b=!1;i?(m=C-w,(h+m<=0||w<=this.minHeight)&&(b=!0,m=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&C<w&&this.getMinSizeOfSiblings().height+w>this.element.parentElement.offsetHeight&&(b=!0),b||this.setHeight(w)}this.updateDragStartPosition(e.clientX,e.clientY),((t||s)&&g||m)&&this.offsetElement(u+g,h+m)}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 i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());const{movementX:n,movementY:o}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+n,s+o),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){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()}},H3=class extends N3{},ue=null;function Yg(e){return typeof e?.getGui=="function"}var sa=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.includes(" ")){const i=(e||"").split(" ");if(i.length>1){for(const n of i)this.toggleCss(n,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},G3=0,Ho=class extends Ht{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=G3++,this.cssManager=new sa(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(s=>[s.selector,s])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui()),this.addGlobalCss()}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(Vv):null}applyElementsToComponent(e,t,s,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const n=this[t];if(n===ue)this[t]=i??e;else{const o=s?.[t];if(!this.suppressDataRefValidation&&!o)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${n}`)}}}createChildComponentsFromTags(e,t){const s=[];for(const i of e.childNodes??[])s.push(i);for(const i of s){if(!(i instanceof HTMLElement))continue;const n=this.createComponentFromElement(i,o=>{const r=o.getGui();if(r)for(const a of i.attributes??[])r.setAttribute(a.name,a.value)},t);if(n){if(n.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const o=Array.prototype.slice.call(i.children);n.addItems(o)}this.swapComponentForNode(n,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)}}createComponentFromElement(e,t,s){const i=e.nodeName,n=this.getDataRefAttribute(e),o=i.indexOf("AG-")===0,r=o?this.componentSelectors.get(i):null;let a=null;if(r){const l=s&&n?s[n]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(o)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,n,s,a),a}swapComponentForNode(e,t,s){const i=e.getGui();t.replaceChild(i,s),t.insertBefore(document.createComment(s.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){const s=t??this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const i of e)i.setAttribute("tabindex",s.toString())}setTemplate(e,t,s){let i;typeof e=="string"||e==null?i=Hh(e):i=mn(e),this.setTemplateFromElement(i,t,s)}setTemplateFromElement(e,t,s,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let n=0;n<t.length;n++){const o=t[n];this.componentSelectors.set(o.selector,o)}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),Bh(e)?{element:e,parent:s}:{element:e.getGui(),parent:s})}prependChild(e,t){const{element:s,parent:i}=this.getContainerAndElement(e,t)||{};!s||!i||i.prepend(s)}appendChild(e,t){const{element:s,parent:i}=this.getContainerAndElement(e,t)||{};!s||!i||i.appendChild(s)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:s}=t;P2(this.eGui,e,{skipAriaHidden:s})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:s}=t;Ke(this.eGui,e,{skipAriaHidden:s});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}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===Zg?(this.css=[e],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(e))}addGlobalCss(){if(Array.isArray(this.css)){const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}this.css=Zg}},Zg=Symbol(),ot=class extends Ho{},Td,kd,Id,Md,Nu,Hu,Ad;function Ni(){return Td===void 0&&(Td=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Td}function Eo(){return kd===void 0&&(kd=/(firefox)/i.test(navigator.userAgent)),kd}function EC(){return Id===void 0&&(Id=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Id}function cn(){return Md===void 0&&(Md=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Md}function Gu(e){if(!e)return null;const t=e.tabIndex,s=e.getAttribute("tabIndex");return t===-1&&(s===null||s===""&&!Eo())?null:t.toString()}function B3(){if(Ad!==void 0)return Ad;if(!document.body)return-1;let e=1e6;const t=Eo()?6e6:1e9,s=document.createElement("div");for(document.body.appendChild(s);;){const i=e*2;if(s.style.height=i+"px",i>t||s.clientHeight!==i)break;e=i}return s.remove(),Ad=e,e}function Zh(){return Hu==null&&DC(),Hu}function DC(){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&&(Hu=s,Nu=s===0)}function PC(){return Nu==null&&DC(),Nu}var Bu=!1,Wl=0;function V3(e){Wl>0||(e.addEventListener("keydown",jl),e.addEventListener("mousedown",jl))}function z3(e){Wl>0||(e.removeEventListener("keydown",jl),e.removeEventListener("mousedown",jl))}function jl(e){const t=Bu,s=e.type==="keydown";s&&(e.ctrlKey||e.metaKey||e.altKey)||t!==s&&(Bu=s)}function W3(e){const t=Ct(e);return V3(t),Wl++,()=>{Wl--,z3(t)}}function TC(){return Bu}function dn(e,t,s=!1){const i=D2;let n=Ov;t&&(n+=", "+t),s&&(n+=', [tabindex="-1"]');const o=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>xs(l)),r=Array.prototype.slice.apply(e.querySelectorAll(n));return r.length?((l,c)=>l.filter(d=>c.indexOf(d)===-1))(o,r):o}function wn(e,t=!1,s=!1,i=!1){const n=dn(e,i?".ag-tab-guard":null,s),o=t?$e(n):n[0];return o?(o.focus({preventScroll:!0}),!0):!1}function In(e,t,s,i){const n=dn(t,s?':not([tabindex="-1"])':null),o=et(e);let r;s?r=n.findIndex(l=>l.contains(o)):r=n.indexOf(o);const a=r+(i?-1:1);return a<0||a>=n.length?null:n[a]}function kC(e,t=5){let s=0;for(;e&&Gu(e)===null&&++s<=t;)e=e.parentElement;return Gu(e)===null?null:e}var j3="ag-focus-managed",IC=class extends Ht{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},s={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=s,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:i=>{if(i.defaultPrevented)return;const n=In(this.beans,this.eFocusable,!1,i.shiftKey);n&&(n.focus(),i.preventDefault())},...s}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:s}}=this;e.classList.add(j3),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||this.stopPropagationCallbacks.isStopPropagation(t))return;const{callbacks:s}=this;if(s.shouldStopEventPropagation(t)){this.stopPropagationCallbacks.stopPropagation(t);return}t.key===O.TAB?s.onTabKeyDown(t):s.handleKeyDown&&s.handleKeyDown(t)}})}},MC="__ag_Grid_Stop_Propagation";function bn(e){e[MC]=!0}function ei(e){return e[MC]===!0}var Xh={isStopPropagation:ei,stopPropagation:bn},ia=class extends IC{constructor(e,t){super(e,Xh,t)}},_3={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",bigintFilter:"BigInt 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",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",last7Days:"Last 7 Days",lastWeek:"Last Week",thisWeek:"This Week",nextWeek:"Next Week",last30Days:"Last 30 Days",lastMonth:"Last Month",thisMonth:"This Month",nextMonth:"Next Month",last90Days:"Last 90 Days",lastQuarter:"Last Quarter",thisQuarter:"This Quarter",nextQuarter:"Next Quarter",lastYear:"Last Year",thisYear:"This Year",yearToDate:"Year To Date",nextYear:"Next Year",last6Months:"Last 6 Months",last12Months:"Last 12 Months",last24Months:"Last 24 Months",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`,minDateValidation:e=>`Date must be after ${e[0]}`,maxDateValidation:e=>`Date must be before ${e[0]}`,strictMinValueValidation:e=>`Must be greater than ${e[0]}`,strictMaxValueValidation:e=>`Must be less than ${e[0]}`};function Cs(e,t,s){return V2(e,_3,t,s)}function Qh(e,t){const{debounceMs:s}=e;return xc(e)?(s!=null&&q(71),0):s??t}function xc(e){return(e.buttons?.indexOf("apply")??-1)>=0}function AC(e,t,s,i){let n=Cs(e,s);if(typeof t=="function"){const o=Cs(e,i);n=t({filterOptionKey:i,filterOption:o,placeholder:n})}else typeof t=="string"&&(n=t);return n}var U3=class extends ot{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 ia(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new H3(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){const t=e,s=this.params;this.params=t;const{source:i,state:n,additionalEventAttributes:o}=t;i==="colDef"&&this.updateParams(t,s);const r=this.state;this.state=n;const a=o?.fromAction;return(a&&a!=="apply"||n.model!==r.model||!this.areStatesEqual(n.state,r.state))&&this.setModelIntoUi(n.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=xc(e),this.setupApplyDebounced()}doesFilterPass(e){q(283);const{getHandler:t,model:s,column:i}=this.params;return t().doesFilterPass({...e,model:s,handlerParams:this.beans.colFilter.getHandlerParams(i)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return q(284),this.params.model!=null}setupApplyDebounced(){const e=Qh(this.params,this.defaultDebounceMs),t=ht(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return q(285),this.params.model}setModel(e){q(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:{valid:s=!0,model:i}}=this;if(!s)return!1;const n=!this.areModelsEqual(t.model,i);return n&&t.onAction("apply",e),n}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const s=this.getModelFromUi(),i={model:s,state:this.getState(),valid:this.canApply(s)};this.state=i;const{params:n,gos:o,eventSvc:r,applyActive:a}=this;n.onStateChange(i),n.onUiChange(this.getUiChangeEventParams()),o.get("enableFilterHandlers")||r.dispatchEvent({type:"filterModified",column:n.column,filterInstance:this}),i.valid&&(e??(e=a?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 i=e==="floatingFilter"||e==="columnFilter";i?(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(i)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return Cs(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}},Jh=class extends Ho{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()}},yc=class extends Jh{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}};function js(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Sc(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function $3(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Xg="row-group-",ep="t-",tp="b-",q3=0,ki=class{constructor(e){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenAfterGroup=null,this.childrenAfterFilter=null,this.childrenAfterAggFilter=null,this.childrenAfterSort=null,this.allChildrenCount=null,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this._expanded=void 0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=q3++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){const e=this._groupData;return e!==void 0?e:this.footer?this.sibling?.groupData:this.beans.groupStage?.loadGroupData(this)??null}set groupData(e){this._groupData=e}get primaryRow(){let e=this.footer&&this.sibling?this.sibling:this;const{pinnedSibling:t}=e;return t&&e.rowPinned&&(e=t,e.footer&&e.sibling&&(e=e.sibling)),e}get allLeafChildren(){const e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}get expanded(){const e=this.beans.expansionSvc;return e?e.isExpanded(this):this.level===-1?!0:!!this._expanded}set expanded(e){this._expanded=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:s,eventSvc:i}=this.beans,n=this.data;this.data=e,s?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const o=this.createDataChangedEvent(e,n,t);if(this.__localEventService?.dispatchEvent(o),this.sibling){this.sibling.data=e;const a=this.sibling.createDataChangedEvent(e,n,t);this.sibling.__localEventService?.dispatchEvent(a)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,n,t)),i.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?(je(13),null):this.rowPinned==="top"?ep+this.rowIndex:this.rowPinned==="bottom"?tp+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:s}=this.beans,i=s?.createDaemonNode?.(this),n=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),s&&(s.updateRowSelectable(this),s.syncInRowNode(this,i));const o=this.createDataChangedEvent(e,n,!1);this.__localEventService?.dispatchEvent(o)}setId(e){const t=Fo(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(Xg)&&je(14,{groupPrefix:Xg})}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:i,valueSvc:n,gos:o,editSvc:r}=this.beans;if(e==null)return!1;let a=i.getCol(e)??i.getColDefCol(e);if(!a)return!1;if(!this.group){const d=a.getColDef();d.pivotValueColumn&&(a=d.pivotValueColumn)}const l=n.getValueForDisplay({column:a,node:this,from:"data"}).value;if(o.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(s!=="data"&&r&&!r.committing){const d=r.setDataValue({rowNode:this,column:a},t,s);if(d!=null)return d}const c=n.setValue(this,a,t,s);return this.dispatchCellChangedEvent(a,t,l),c&&this.pinnedSibling?.dispatchCellChangedEvent(a,t,l),c}getDataValue(e,t="data"){const{colModel:s,valueSvc:i,formula:n}=this.beans;if(e==null)return;const o=s.getCol(e)??s.getColDefCol(e);if(!o)return;const r=t==="data-raw",a=r||t==="value"?"data":t;let l=i.getValue(o,this,a,r);if(!r&&(n&&o.isAllowFormula()&&n.isFormula(l)&&(l=n.resolveValue(o,this)),t!=="data"&&o.getAggFunc()&&typeof l=="object"&&l!=null)){if(typeof l.toNumber=="function")return l.toNumber();if("value"in l)return l.value}return l}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 i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:s};this.__localEventService?.dispatchEvent(i)}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,i=t.length;s<i;++s)t[s].depthFirstSearch(e);e(this)}getAggregatedChildren(e,t){const s=this.beans;return s.aggChildrenSvc?.getAggregatedChildren(this,s.colModel.getCol(e),t)??[]}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 gn)).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 gn);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,s);const i=this.frameworkEventListenerService?.wrap(e,t)??t;s.addEventListener(e,i)}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(q(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}_destroy(e){if(this.destroyed)return!1;this.destroyed=!0;const t=this.pinnedSibling;if(t?.rowPinned&&!this.rowPinned&&this.beans.pinnedRowModel?.pinRow(t,null),e?this.clearRowTopAndRowIndex():(this.setRowTop(null),this.setRowIndex(null)),!this.footer){const s=this.detailNode;s&&s._destroy(e);const i=this.sibling;i&&i._destroy(e)}return!0}};function K3(e,t,s){return xe(t,{type:s,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Y3=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_groupData","_leafs","childStore","groupValue","oldRowTop","sticky","treeNodeFlags","treeParent"]),Z3=(e,t)=>{const s=new ki(t);for(const i of Object.keys(e))Y3.has(i)||(s[i]=e[i]);return s.oldRowTop=null,s},Vu=(e,t,s)=>{if(!s)return;let i=s.rowIndex;if(i==null)return;i+=t;const n=e.getRowCount();for(;i>=0&&i<n;){const o=e.getRow(i);if(!o||!o.footer&&!o.detail)return o;i+=t}},Qg=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:i}=this;t.has(e)||(t.add(e),s.add(e),i.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),Bs(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:i}=this;e.clear(),i.clear(),t.clear(),s.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:s}=this.beans,i=e?.getSortOptions()??[],n=this.order,o=J3(n);if(n.sort((a,l)=>t?.compareRowNodes(i,a,l)||(a.pinnedSibling?.rowIndex??0)-(l.pinnedSibling?.rowIndex??0)),!o)return;const r=lC(s);r==="bottom"||r==="pinnedBottom"?this.order.push(o):this.order.unshift(o)}hide(e){const{all:t,visible:s}=this,i=s.size;return t.forEach(n=>e(n)?s.delete(n):s.add(n)),this.order=Array.from(s),this.sort(),i!=s.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function LC(e){if(e.level===-1)return!0;const t=e.parent;return t?.childrenAfterSort?.some(s=>s==e)?LC(t):!1}function Ld(e,t){const{gos:s,rowModel:i,filterManager:n}=e;return No(s)?!i.getRowNode(t.id):n?.isAnyFilterPresent()?!LC(t):s.get("pivotMode")?!t.group:!1}function X3(e){return!!e.footer&&e.level===-1}function Q3(e){return!!e.pinnedSibling&&X3(e.pinnedSibling)}function J3(e){const t=e.findIndex(Q3);if(t>-1)return e.splice(t,1)?.[0]}var Jg=class extends B{constructor(){super(...arguments),this.csrm=null}postConstruct(){const{gos:e,beans:t}=this;this.top=new Qg(t,"top"),this.bottom=new Qg(t,"bottom"),this.csrm=js(t)??null;const s=n=>Ld(t,n.pinnedSibling),i=()=>{const n=e.get("isRowPinned");n&&e.get("enableRowPinning")&&t.rowModel.forEachNode(o=>this.pinRow(o,n(o)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:n})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let o=!1;this.forContainers(a=>{o||(o=a.hide(s))});const r=this.refreshRowPositions();(!n||r||o)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(tF),this.refreshRowPositions()},rowNodeDataChanged:({node:n})=>{(e.get("isRowPinnable")?.(n)??!0)||this.pinRow(n,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(n=>n.hide(s)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:n})=>{this._grandTotalPinned=n==="pinnedBottom"?"bottom":n==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const s=[];t.forEach(i=>s.push(i)),s.forEach(i=>this.pinRow(i,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,s){if(t!=null&&e.destroyed)return;if(e.footer){const r=e.level;if(r>-1)return;if(r===-1){this._grandTotalPinned=t,this.csrm?.reMapRows();return}}const i=e.rowPinned??e.pinnedSibling?.rowPinned;if(i!=null&&t!=null&&t!=i){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 o=s&&sF(this.beans,e,s);if(o){o.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;Od(r),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(l)}else{const r=ef(this.beans,e,t),a=this.getContainer(t);a.add(r),Ld(this.beans,e)&&a.hide(l=>Ld(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=i=>{if(i.rowHeightEstimated){const n=Di(this.beans,i);i.setRowTop(t),i.setRowHeight(n.height),t+=n.height,e=!0}};return this.bottom.forEach(s),t=0,this.top.forEach(s),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return tf(this.top)}getPinnedBottomTotalHeight(){return tf(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,i=>{const n=i.pinnedSibling?.id;n!=null&&s.push(n)}),s};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,s)=>{for(const i of e[s]){const n=this.beans.rowModel.getRowNode(i);n?this.pinRow(n,s):t.queue(i)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const s=new Set;e.forEachQueued(i=>{const n=this.beans.rowModel.getRowNode(i);n&&s.add(n)});for(const i of s)e.unqueue(i.id),this.pinRow(i,t)})}pinGrandTotalRow(){const{csrm:e,beans:t,_grandTotalPinned:s}=this;if(!e)return;const i=e.rootNode?.sibling;if(!i)return;const n=i.pinnedSibling,o=n&&this.findPinnedRowNode(n);if(s){if(o&&o.floating!==s&&(Od(n),o.delete(n)),!o||o.floating!==s){const r=ef(t,i,s);this.getContainer(s).add(r)}}else{if(!o)return;Od(n),o.delete(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=i=>eF(this.beans,i);if(e)return t(this.getContainer(e));let s=!1;return this.forContainers(i=>{const n=t(i);s||(s=n)}),s}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function eF(e,t){let s=0,i=!1;return t.forEach((n,o)=>{if(i||(i=n.rowTop!==s),n.setRowTop(s),n.rowHeightEstimated||n.rowHeight==null){const r=Di(e,n).height;i||(i=n.rowHeight!==r),n.setRowHeight(r)}n.setRowIndex(o),s+=n.rowHeight}),i}function ef(e,t,s){if(t.pinnedSibling)return t.pinnedSibling;const i=Z3(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=s;const n=s==="top"?ep:tp;return i.id=`${n}${s}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function Od(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function tF(e){const t=new Set;e.forEach(s=>{s.group&&t.add(s)}),t.forEach(s=>e.delete(s))}function sF(e,t,s){const{rowSpanSvc:i}=e,n=(s&&i?.isCellSpanning(s,t))??!1;if(s&&n)return i?.getCellSpan(s,t)?.spannedNodes}function tf(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}var sf=class extends B{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({stylesChanged: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)};ur(this.pinnedBottomRows,t),ur(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const s=i=>{if(i.rowHeightEstimated){const n=Di(this.beans,i);i.setRowTop(t),i.setRowHeight(n.height),t+=n.height,e=!0}};return ur(this.pinnedBottomRows,s),t=0,ur(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 i=Fo(this.gos),n=t==="top"?ep:tp,o=new Set(s.order),r=[],a=new Set;let l=0,c=-1;for(const d of e){const u=i?.({data:d,level:0,rowPinned:t})??n+this.nextId++;if(a.has(u)){q(96,{id:u,data:d});continue}c++,a.add(u),r.push(u);const h=Tr(s,u);if(h!==void 0)h.data!==d&&h.updateData(d),l+=this.setRowTopAndRowIndex(h,l,c),o.delete(u);else{const g=new ki(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 o)Tr(s,d)?.clearRowTopAndRowIndex(),delete s.cache[d];s.order=r}setRowTopAndRowIndex(e,t,s){return e.setRowTop(t),e.setRowHeight(Di(this.beans,e).height),e.setRowIndex(s),e.rowHeight}getPinnedTopTotalHeight(){return nf(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return nf(this.pinnedBottomRows)}getPinnedTopRowCount(){return Wu(this.pinnedTopRows)}getPinnedBottomRowCount(){return Wu(this.pinnedBottomRows)}getPinnedTopRow(e){return zu(this.pinnedTopRows,e)}getPinnedBottomRow(e){return zu(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return Tr(this.getCache(t),e)}forEachPinnedRow(e,t){return ur(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function nf(e){const t=Wu(e);if(t===0)return 0;const s=zu(e,t-1);return s===void 0?0:s.rowTop+s.rowHeight}function Tr(e,t){return e.cache[t]}function zu(e,t){return Tr(e,e.order[t])}function ur(e,t){e.order.forEach((s,i)=>{const n=Tr(e,s);n&&t(n,i)})}function Wu(e){return e.order.length}var iF=class extends B{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const s=e.get("enableRowPinning"),i=lC(e),o=!!s||(i==="pinnedBottom"||i==="pinnedTop"),r=o?this.inner instanceof sf:this.inner instanceof Jg;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(o?new Jg:new sf))};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()}},nF=500,oF=550,qa,rF=e=>{if(!qa)qa=new WeakSet;else if(qa.has(e))return!1;return qa.add(e),!0},Yi=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 gn;const i=this.onTouchStart.bind(this);this.startListener=i,this.eElement.addEventListener("touchstart",i,{passive:!0})}s.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!rF(e))return;const t=e.touches[0];this.touchStart=t;const s=this.handlers;if(!s.length){const i=this.eElement,n=i.ownerDocument,o=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};dl(s,[i,"touchmove",o,l],[n,"touchcancel",a,l],[n,"touchend",r,c],[n,"contextmenu",bi,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}))},oF)}onTouchMove(e){const{moved:t,touchStart:s}=this;if(!t&&s){const i=co(s,e.touches);i&&!zv(i,s,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!co(t,e.changedTouches)||(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&bi(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!co(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const s=this.lastTapTime;s&&t-s>nF&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),Vh(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}},aF=1,lF=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=aF++,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:i}=t(this);this.beans[s]=i,this.createdBeans.push(i)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){const s=this.beans;for(const i of e)i.preWireBeans?.(s),i.wireBeans?.(s);for(const i of e)i.preConstruct?.();t&&e.forEach(t);for(const i of e)i.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}};function cF(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var dF=["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"],of=Object.fromEntries(dF.map((e,t)=>[e,t]));function uF(e,t){const s=(e.beanName?of[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,i=(t.beanName?of[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return s-i}function hF(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}function pF(e){const{rowIndex:t,rowPinned:s,column:i}=e;return`${t}.${s??"null"}.${i.getId()}`}function sp(e,t){const s=e.column===t.column,i=e.rowPinned===t.rowPinned,n=e.rowIndex===t.rowIndex;return s&&i&&n}function gF(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(se(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function fF(e,t){return!e&&!t?!0:!e||!t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function rf(e){let t=0,s;const{pinnedRowModel:i,rowModel:n,pageBounds:o}=e;return i?.getPinnedTopRowCount()?s="top":n.getRowCount()?(s=null,t=o.getFirstRow()):i?.getPinnedBottomRowCount()&&(s="bottom"),s===void 0?null:{rowIndex:t,rowPinned:s}}function af(e){let t,s=null;const{pinnedRowModel:i,pageBounds:n}=e,o=i?.getPinnedBottomRowCount(),r=i?.getPinnedTopRowCount();return o?(s="bottom",t=o-1):e.rowModel.getRowCount()?t=n.getLastRow():r&&(s="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:s}}function Vs(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 no(e,t){const s=e.spannedRowRenderer?.getCellByPosition(t);if(s)return s;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function mF(e,t,s){const{rowModel:i,pinnedRowModel:n}=e;let o;return o??(o=i?.getRowNode(t)),s?o??(o=n?.getPinnedRowById(t,s)):(o??(o=n?.getPinnedRowById(t,"top")),o??(o=n?.getPinnedRowById(t,"bottom"))),o}function _l(e,t,s=!1){const{rowIndex:i,rowPinned:n}=t,{pageBounds:o,pinnedRowModel:r,rowModel:a}=e;if(i===0)return n==="top"?null:n==="bottom"&&a.isRowsToRender()?{rowIndex:o.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(s){const l=n?void 0:a.getRow(i);return OC(e,l,!0)??{rowIndex:i-1,rowPinned:n}}return{rowIndex:i-1,rowPinned:n}}function lf(e,t,s=!1){const{rowIndex:i,rowPinned:n}=t,{pageBounds:o,pinnedRowModel:r,rowModel:a}=e;if(vF(e,t))return n==="bottom"?null:n==="top"&&a.isRowsToRender()?{rowIndex:o.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(s){const l=n?void 0:a.getRow(i);return OC(e,l)??{rowIndex:i+1,rowPinned:n}}return{rowIndex:i+1,rowPinned:n}}function OC(e,t,s=!1){const{gos:i,rowRenderer:n}=e;if(!t?.sticky||!aC(i))return;const o=n.getStickyTopRowCtrls(),r=n.getStickyBottomRowCtrls(),a=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),l=a?o: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 vF(e,t){const{rowPinned:s,rowIndex:i}=t,{pinnedRowModel:n,pageBounds:o}=e;return s==="top"?(n?.getPinnedTopRowCount()??0)-1<=i:s==="bottom"?(n?.getPinnedBottomRowCount()??0)-1<=i:o.getLastRow()<=i}function CF(e,t,s){t.addManagedElementListeners(s,{keydown:i=>{if(!i.defaultPrevented&&!SF(i)&&i.key===O.TAB){const n=i.shiftKey;In(e,s,!1,n)||Do(e,n)&&i.preventDefault()}}})}function wF(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function vs(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.exclusive}function Kr(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.exclusive}function Do(e,t,s=!1){const i=e.ctrlsSvc.get("gridCtrl"),n=i.focusNextInnerContainer(t);return n===!0?!0:n===!1?n:((s||!t&&!i.isDetailGrid()&&i.isFocusInsideGridBody())&&i.forceFocusOutOfContainer(t),!1)}function bF(e,t){const s=e.focusSvc,i=s.getFocusedCell();if(i&&t&&sp(i,t)){const{rowIndex:n,rowPinned:o,column:r}=t;Ih(e)&&s.setFocusedCell({rowIndex:n,column:r,rowPinned:o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!TC()})}}function xF(e,t){const s=e.getFocusableContainerName();return s==="gridBody"?t():NC(e,()=>dn(e.getGui(),".ag-tab-guard").length>0)?s:null}function NC(e,t){e.setAllowFocus?.(!0);try{return t()}finally{e.setAllowFocus?.(!1)}}var yF="__ag_Grid_Skip_Focusable_Container";function SF(e){return e[yF]===!0}function os(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function ip(e){const t=[],s=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const i of s){if(!i)continue;const n=i.getGroupRowCount()||0;for(let o=0;o<n;o++){const r=i.getGroupRowCtrlAtIndex(o),a=t[o];if(r){const l=RF(e,r);(a==null||l>a)&&(t[o]=l)}}}return t}function RF(e,t){let i=e.colModel.isPivotMode()?EF(e):GC(e);const n=t.getHeaderCellCtrls();for(const o of n){const{column:r}=o,a=r.getAutoHeaderHeight();a!=null&&a>i&&r.isAutoHeaderHeight()&&(i=a)}return i}function np(e){let s=e.colModel.isPivotMode()?FF(e):na(e);return e.colModel.forAllCols(i=>{const n=i.getAutoHeaderHeight();n!=null&&n>s&&i.isAutoHeaderHeight()&&(s=n)}),s}function na(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function HC(e){return e.gos.get("floatingFiltersHeight")??na(e)}function GC(e){return e.gos.get("groupHeaderHeight")??na(e)}function FF(e){return e.gos.get("pivotHeaderHeight")??na(e)}function EF(e){return e.gos.get("pivotGroupHeaderHeight")??GC(e)}function DF(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function PF(e){return e?.headerRowIndex!=null}var TF=class extends B{setComp(e,t,s){this.comp=e,this.eGui=t;const{beans:i}=this,{headerNavigation:n,touchSvc:o,ctrlsSvc:r}=i;n&&this.createManagedBean(new ia(s,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),o?.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:()=>ai(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const s=ip(e).reduce((r,a)=>r+a,0),i=np(e);e.filterManager?.hasFloatingFilters()&&(t+=HC(e)),t+=s,t+=i;const n=e.environment.getHeaderRowBorderWidth(),o=t+n;if(this.headerHeightWithBorder!==o){this.headerHeightWithBorder=o;const r=`${o}px`;this.comp.setHeightAndMinHeight(r)}this.headerHeight!==t&&(this.headerHeight=t,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(i=>i.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",s)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),s=e.shiftKey,i=s!==t?"LEFT":"RIGHT",{beans:n}=this,{headerNavigation:o,focusSvc:r}=n;(o.navigateHorizontally(i,!0,e)||!s&&r.focusOverlay(!1)||Do(n,s,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:s}=this.beans;switch(e.key){case O.LEFT:t="LEFT";case O.RIGHT:{se(t)||(t="RIGHT"),s.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case O.UP:t="UP";case O.DOWN:{se(t)||(t="DOWN"),s.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:s,beans:i}=this;!t&&s.contains(et(i))||s.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,s){const{menuSvc:i,ctrlsSvc:n}=this.beans;if(!e&&!s||!i?.isHeaderContextMenuEnabled())return;const{target:o}=e??t;(o===this.eGui||o===n.getHeaderRowContainerCtrl()?.eViewport)&&i.showHeaderContextMenu(void 0,e,s)}},op=class extends B{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=yt(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:s}=this.beans,i=t.bodyWidth,n=t.getColsLeftWidth(),o=t.getDisplayedColumnsRightWidth();let r;e?r=i+n+o:(r=i,this.addSpacer&&(this.gos.get("enableRtl")?n:o)===0&&s.verticalScrollShowing&&(r+=s.getScrollbarWidth())),this.callback(r)}},Go=class extends B{};function oa(e,t,s){return s&&e.addDestroyFunc(()=>t.destroyBean(s)),s??e}var rp=class extends B{constructor(e,t,s,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,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?$e(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"),i=se(this.columnOrGroup.getOldLeft());t?.isActive()&&i&&!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:i}=this.beans;if(!yt(s,"print")||e.getPinned()==="left")return t;const o=i.getColsLeftWidth();if(e.getPinned()==="right"){const r=i.bodyWidth;return o+r+t}return o+t}setLeft(e){if(se(e)&&(this.eCell.style.left=`${e}px`),at(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&y2(this.ariaEl,t.length)}}},kF="ag-column-first",IF="ag-column-last";function BC(e,t,s,i){return st(e)?[]:AF(e.headerClass,e,t,s,i)}function VC(e,t,s){e.toggleCss(kF,s.isColAtEdge(t,"first")),e.toggleCss(IF,s.isColAtEdge(t,"last"))}function MF(e,t,s,i){return xe(t,{colDef:e,column:s,columnGroup:i})}function AF(e,t,s,i,n){if(st(e))return[];let o;if(typeof e=="function"){const r=MF(t,s,i,n);o=e(r)}else o=e;return typeof o=="string"?[o]:Array.isArray(o)?[...o]:[]}var LF=0,zC="headerCtrl",ap=class extends B{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()+"-"+LF++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,s,i,n){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,s,i,n),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:s}=this.beans.focusSvc.focusedHeader,i=s.getDefinition(),n=i?.suppressHeaderKeyboardEvent;if(!se(n))return!1;const o=xe(this.gos,{colDef:i,column:s,headerRowIndex:t,event:e});return!!n(o)}getWrapperHasFocus(){return et(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 i=this.getHeaderClassParams();s=t(i)}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:i}=e,{beans:n}=this,o=u=>{if(!this.isAlive()||!i.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:m,borderTopWidth:v}=Tn(this.eGui),C=h+g+m+v,b=t.offsetHeight+C;if(u<5){const y=!Ct(n)?.contains(t),S=b==0;if(y||S){ku(()=>o(u+1),"raf",n);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),o(0),a=ri(this.beans,t,()=>o(0))},d=()=>{r=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),i.addDestroyFunc(()=>d()),i.addManagedListeners(this.column,{widthChanged:()=>r&&o(0)}),i.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>o(0))}}),s&&s(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:s,eGui:i}=this;!e||!t||!i||(VC(e,t,s.visibleCols),Av(i,s.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=vs(this.beans);this.eGui&&Bt(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=et(this.beans),s=e.key===O.LEFT||e.key===O.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey)return;if((this.isResizing||s)&&(e.preventDefault(),e.stopImmediatePropagation()),(e.ctrlKey||e.metaKey)&&wC(e)===O.C)return this.beans.clipboardSvc?.copyToClipboard();if(!s)return;const o=e.key===O.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(o)}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 i=e.key===O.LEFT!==t.get("enableRtl");const n=s.getPinned(),o=t.get("enableRtl");return n&&o!==(n==="right")&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case O.PAGE_DOWN:case O.PAGE_UP:case O.PAGE_HOME:case O.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=zC,{eGui:s,gos:i}=this;Cn(i,s,t,this),e.addDestroyFunc(()=>Cn(i,s,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus()):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 i=e??t,{menuSvc:n,gos:o}=this.beans;o.get("preventDefaultOnContextMenu")&&i.preventDefault(),n?.isHeaderContextMenuEnabled(s)&&n.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}},OF=class extends ap{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,s,i,n){this.comp=e;const{rowCtrl:o,column:r,beans:a}=this,{colResize:l,context:c,colHover:d,rangeSvc:u}=a,h=oa(this,c,n);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:m=>this.setRefreshFunction("measuring",m),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(o.pinned,r,s,e,this)):Ke(s,!1),d?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new rp(r,t,a)),h.createManagedBean(new ia(t,{shouldStopEventPropagation:m=>this.shouldStopEventPropagation(m),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(),formulaRefChanged:()=>this.refresh(),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 xe(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 y3(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:s,gos:i}=this.beans;return xe(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!s&&(!this.openFilterEnabled||Vt(this.gos)),showColumnMenu:(o,r)=>{e?.showColumnMenu({column:this.column,buttonElement:o,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(o,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:o,positionBy:"mouse",onClosedCallback:r})},showFilter:o=>{e?.showFilterMenu({column:this.column,buttonElement:o,containerType:"columnFilter",positionBy:"button"})},progressSort:o=>{t?.progressSort(this.column,!!o,"uiColumnSorted")},setSort:(o,r)=>{t?.setSortForColumn(this.column,ls(o),!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(o,r)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(o,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===O.SPACE?this.selectAllFeature?.onSpaceKeyDown(e):e.key===O.ENTER?this.onEnterKeyDown(e):e.key===O.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){const{column:t,gos:s,sortable:i,beans:n}=this;let o=!1;(e.ctrlKey||e.metaKey)&&(o=this.showMenuOnKeyPress(e,!0)),o||(!e.altKey&&fo(s)?n.rangeSvc?.handleColumnSelection(t,e):i&&n.sortSvc?.progressSort(t,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const s=this.comp.getUserCompInstance();return cf(s)&&s.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),TC()&&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=BC(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(s);for(const n of s)i.has(n)?i.delete(n):this.comp.toggleCss(n,!0);for(const n of i)this.comp.toggleCss(n,!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:i}=this,n=ip(this.beans),o=n.reduce((h,g)=>h+g,0)===0;if(s.toggleCss("ag-header-parent-hidden",o),!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=np(i);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=n.length-c;let u=0;for(let h=0;h<d;h++)u+=n[n.length-1-h];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){let e=null;const{beans:t,column:s,comp:i,sortable:n}=this;if(n){const o=this.getLocaleTextFunc(),r=t.sortSvc?.getDisplaySortForColumn(s)??null;i.setAriaSort(h2(r)),e=o("ariaSortableColumn","Press ENTER to sort")}else i.setAriaSort();this.setAriaDescriptionProperty("sort",e)}refreshAriaMenu(){let e=null;this.menuEnabled&&(e=this.getLocaleTextFunc()("ariaMenuColumn","Press ALT DOWN to open column menu")),this.setAriaDescriptionProperty("menu",e)}refreshAriaFilterButton(){let e=null;const{openFilterEnabled:t,gos:s}=this;t&&!Vt(s)&&(e=this.getLocaleTextFunc()("ariaFilterColumn","Press CTRL ENTER to open filter")),this.setAriaDescriptionProperty("filterButton",e)}refreshAriaFiltered(){let e=null;this.column.isFilterActive()&&(e=this.getLocaleTextFunc()("ariaColumnFiltered","Column Filtered")),this.setAriaDescriptionProperty("filter",e)}refreshAriaCellSelection(){let e=null;const{gos:t,column:s}=this;fo(t)&&!At(s)&&(e=this.getLocaleTextFunc()("ariaColumnCellSelection","Press Enter to toggle selection for all visible cells in this column")),this.setAriaDescriptionProperty("cellSelection",e)}setAriaDescriptionProperty(e,t){const s=this.ariaDescriptionProperties;t!=null?s.set(e,t):s.delete(e)}announceAriaDescription(){const{beans:e,eGui:t,ariaDescriptionProperties:s}=this;if(!t.contains(et(e)))return;const i=Array.from(s.keys()).sort((n,o)=>n==="filter"?-1:o.charCodeAt(0)-n.charCodeAt(0)).map(n=>s.get(n)).join(". ");e.ariaAnnounce?.announceValue(i,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=n=>this.handleMouseOverChange(n.type==="mouseenter"),s=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=n=>this.handleContextMenuMouseEvent(n,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:s,contextmenu:i})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return cf(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function cf(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var NF=0,Nd=class extends B{constructor(e,t,s){super(),this.rowIndex=e,this.pinned=t,this.type=s,this.instanceId=NF++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";s==="group"?i="ag-header-row-group":s==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=yt(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=oa(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:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",s),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=yt(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=ip(this.beans);for(let n=0;n<t.length;n++){if(n===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[n]};e+=t[n]}const s=np(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:s};e+=s;const i=HC(this.beans);return{topOffset:e,rowHeight:i}}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 i of t)this.recycleAndCreateHeaderCtrls(i,this.ctrlsById,e);const s=i=>{const{focusSvc:n,visibleCols:o}=this.beans;return n.isHeaderWrapperFocused(i)?o.isVisible(i.column):!1};if(e)for(const[i,n]of e)s(n)?this.ctrlsById.set(i,n):this.destroyBean(n);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,s){if(e.isEmptyGroup())return;const i=e.getUniqueId();let n;if(s&&(n=s.get(i),s.delete(i)),n&&n.column!=e&&(this.destroyBean(n),n=void 0),n==null)switch(this.type){case"filter":{n=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":n=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:n=this.createBean(new OF(e,this));break}t.set(i,n)}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(n=>n.column==e);return s?s.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},HF=class extends B{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:i,colModel:n,colMoves:o}=this.beans;this.setupCenterWidth(),s?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(o,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const a=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;i.register(a,this),n.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:i}=this.beans;let n=0;const o=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=i.headerGroupRowCount;n=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 m=this.createBean(new Nd(g,this.pinned,"group"));this.groupsRowCtrls.push(m)}}},a=()=>{const u=n++;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 Nd(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=n++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new Nd(h,this.pinned,"filter"))},c=this.getAllCtrls();r(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,o),c.length!==d.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=s=>s?.getHeaderCellCtrls().find(i=>i.column===e);if(Ti(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let s=0;s<this.groupsRowCtrls.length;s++){const i=t(this.groupsRowCtrls[s]);if(i)return i}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,s){const n=this.getAllCtrls()[e];return n?n.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 op(e=>this.comp.setCenterWidth(`${e}px`),!0))}},vl={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},lp=class extends B{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?vl.AUTO_HEIGHT:t.print?vl.PRINT:vl.NORMAL;this.view.updateLayoutClasses(s,t)}},WC=class extends ot{constructor(e,t){super(),this.direction=t,this.eViewport=ue,this.eContainer=ue,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",EC()||cn())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=PC(),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(),ai(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;q2(this,()=>xs(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},GF={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"}]},BF=class extends WC{constructor(){super(GF,"horizontal"),this.eLeftSpacer=ue,this.eRightSpacer=ue,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 op(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,i=this.scrollVisibleSvc.getScrollbarWidth();s&&(t+=i),Os(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let n=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(n+=i),Os(this.eLeftSpacer,n),this.eLeftSpacer.classList.toggle("ag-scroller-corner",n<=i)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,s=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,o=s?0:i===0&&t?16:i,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Er(this.getGui(),o),Er(this.eViewport,o),Er(this.eContainer,o),o||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return kl(this.eViewport,this.enableRtl)}setScrollPosition(e){xs(this.eViewport)||this.attemptSettingScrollPosition(e),Il(this.eViewport,e,this.enableRtl)}},jC=class extends B{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)}},VF={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"}]}]},zF=class extends WC{constructor(){super(VF,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new jC(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,i=t&&e.getScrollbarWidth()||0,n=i===0&&s?16:i;this.toggleCss("ag-scrollbar-invisible",s),Os(this.getGui(),n),Os(this.eViewport,n),Os(this.eContainer,n),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const s=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),n=s.scrollTop;i!=n&&this.setScrollPosition(n,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!xs(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},gi="Viewport",df="fakeVScrollComp",Hd=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],uf=100,Gd=150,WF=class extends B{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=ht(this,()=>this.lastScrollSource[1]=null,Gd),this.resetLastVScrollDebounced=ht(this,()=>this.lastScrollSource[0]=null,Gd)}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.fakeVScrollComp=s.fakeVScrollComp,this.fakeHScrollComp=s.fakeHScrollComp,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,gi)});for(const e of Hd){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.gos.get("debounceVerticalScrollbar"),t=e?ht(this,this.onVScroll.bind(this,gi),uf):this.onVScroll.bind(this,gi),s=e?ht(this,this.onVScroll.bind(this,df),uf):this.onVScroll.bind(this,df);this.addManagedElementListeners(this.eBodyViewport,{scroll:t}),this.registerScrollPartner(this.fakeVScrollComp,s)}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[...Hd,gi]){if(this.lastScrollSource[1]===t)continue;const s=this.getViewportForSource(t);Il(s,e,this.enableRtl)}}getViewportForSource(e){return e===gi?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 i=kl(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;const t=e===gi?this.eBodyViewport.scrollTop:this.fakeVScrollComp.getScrollPosition();let s=t;if(this.shouldBlockScrollUpdate(0,s,!0))return;e===gi?this.fakeVScrollComp.setScrollPosition(s):(this.eBodyViewport.scrollTop=t,s=this.eBodyViewport.scrollTop,this.invalidateVerticalScroll(),s!==t&&this.fakeVScrollComp.setScrollPosition(s,!0));const{animationFrameSvc:i}=this;i?.setScrollTop(s),this.nextScrollTop=s,i?.active?i.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.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"})},Gd)}shouldBlockScrollUpdate(e,t,s=!1){return s&&!cn()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Nh(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 Hd)if(this.getViewportForSource(s).scrollLeft!==e){t=!0;break}t&&this.onHScroll(gi)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),Il(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:i}=this;return{top:i,bottom:i+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.setVerticalScrollPosition(0)}ensureNodeVisible(e,t=null){const{rowModel:s}=this.beans,i=s.getRowCount();let n=-1;for(let o=0;o<i;o++){const r=s.getRow(o);if(typeof e=="function"){if(r&&e(r)){n=o;break}}else if(e===r||e===r.data){n=o;break}}n>=0&&this.ensureIndexVisible(n,t)}ensureIndexVisible(e,t,s=0){if(yt(this.gos,"print"))return;const{rowModel:i}=this.beans,n=i.getRowCount();if(typeof e!="number"||e<0||e>=n){q(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:o,pageBounds:r,rowContainerHeight:a,rowRenderer:l}=this.beans;o.wrapIncoming(()=>{const c=this.ctrlsSvc.getGridBodyCtrl(),d=i.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:m,stickyBottomHeight:v}=c,C=d.rowTop,w=d.rowHeight,b=r.getPixelOffset(),x=d.rowTop-b,y=x+d.rowHeight,S=this.getVScrollPosition(),F=a.divStretchOffset,R=S.top+F,E=S.bottom+F,D=E-R,T=a.getScrollPositionForPixel(x),P=a.getScrollPositionForPixel(y-D),k=Math.min((T+P)/2,x),A=R+m>x,U=E-v<y;let I=null;t==="top"?I=T-m:t==="bottom"?I=P+v:t==="middle"?I=k:A?I=T-m:U&&(P-T>D?I=T-m:I=P+v),I!==null&&(this.setVerticalScrollPosition(I),l.redraw({afterScroll:!0})),u=C!==d.rowTop||w!==d.rowHeight,h=m!==c.stickyTopHeight||v!==c.stickyBottomHeight,g++}while((u||h)&&g<10);if(this.animationFrameSvc?.flushAllFrames(),s<10&&(d?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const m=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const v=this.getVScrollPosition().top;m!==v&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=i.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:i}=this.beans,n=s.getCol(e);if(!n||n.isPinned()||!this.visibleCols.isColDisplayed(n))return;const o=this.getPositionedHorizontalScroll(n,t);i.wrapIncoming(()=>{o!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(o),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:s,columnAfterEnd:i}=this.isColumnOutsideViewport(e),n=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),o=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?s:i)||n,l=r?i: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-o/2:a?r?h:d:r?d-o:h-o}return null}isColumnOutsideViewport(e){const{start:t,end:s}=this.getViewportBounds(),{colLeft:i,colRight:n}=this.getColumnBounds(e),o=this.enableRtl,r=o?t>n:s<n,a=o?s<i:t>i;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,s=this.visibleCols.bodyWidth,i=e.getActualWidth(),n=e.getLeft(),o=t?-1:1,r=t?s-n:n,a=r+i*o,l=r+i/2*o;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),s=t,i=e+t;return{start:s,end:i,width:e}}},hf={horizontal:{overflow:e=>e.scrollWidth-e.clientWidth,scrollSize:e=>e.scrollWidth,clientSize:e=>e.clientWidth,opposite:"vertical"},vertical:{overflow:e=>e.scrollHeight-e.clientHeight,scrollSize:e=>e.scrollHeight,clientSize:e=>e.clientHeight,opposite:"horizontal"}};function jF(e,t,s=Zh()||0,i,n){return _C(e,t,"horizontal",s,i,n)}function _F(e,t,s=Zh()||0,i,n){return _C(e,t,"vertical",s,i,n)}function _C(e,t,s,i,n,o){const r=hf[s],a=hf[r.opposite],l=n?xs(n):!0,c=o?xs(o):!0,d=r.overflow(e);if(d<=0)return!1;if(!t||i===0)return!0;const u=a.overflow(t);if(u<=0)return!0;if(d<=i){if(l&&c&&UF({candidateOverflow:u,candidateScrollSize:a.scrollSize(t),candidateClientSize:a.clientSize(t),scrollbarWidth:i}))return!1;const h=r.clientSize(e)+i;return r.scrollSize(e)<=h}return!0}function UF({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:s,scrollbarWidth:i}){if(e<=0||e>i)return!1;const n=s+i;return t>s&&t<=n}var $F=class extends B{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,i=()=>{ai(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),s.registerBodyViewportResizeListener(i)}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=Nh(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{centerContainerCtrl:e,beans:t}=this,s=e.getCenterWidth(),i=e.getViewportScrollLeft();t.colViewport.setScrollPosition(s,i)}};function UC(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function Cl(e,t,s,i){const n=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return $C(e,t,s,i,n)}function qF(e,t,s,i){const n=t?.suppressMouseEventHandling;return $C(e,void 0,s,i,n)}function $C(e,t,s,i,n){return n?n(xe(e,{column:t,node:s,event:i})):!1}function qC(e,t,s){let i=t;for(;i;){const n=rC(e,i,s);if(n)return n;i=i.parentElement}return null}var Ul="cellCtrl";function cp(e,t){return qC(e,t,Ul)}var $l="renderedRow";function KF(e,t){return qC(e,t,$l)}function ju(e,t,s,i,n){const o=i?i.getColDef().suppressKeyboardEvent:void 0;if(!o)return!1;const r=xe(e,{event:t,editing:n,column:i,node:s,data:s.data,colDef:i.getColDef()});return!!(o&&o(r))}function YF(e){const{pinnedRowModel:t,rowModel:s,rangeSvc:i,visibleCols:n}=e;if(!i||n.allCols.length===0)return;const o=t?.isEmpty("top")??!0,r=t?.isEmpty("bottom")??!0,a=o?null:"top";let l,c;r?(l=null,c=s.getRowCount()-1):(l="bottom",c=t?.getPinnedBottomRowCount()??-1),i.setCellRange({rowStartIndex:0,rowStartPinned:a,rowEndIndex:c,rowEndPinned:l})}var ZF=class extends B{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(){let e="mousedown";Al("pointerdown")?e="pointerdown":Al("touchstart")&&(e="touchstart");const t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(const s of t){const i=this.processMouseEvent.bind(this,s);this.addManagedElementListeners(this.element,{[s]:i})}}processMouseEvent(e,t){if(!_r(this.beans,t)||ei(t))return;const{cellCtrl:s,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(s?.column&&s.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,i,s)):(s&&s.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:cp(t,e),rowCtrl:KF(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:s,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(s?this.processCellKeyboardEvent(s,e,t):i?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,s){const i=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!ju(this.gos,s,e.rowNode,e.column,i)&&t==="keydown"&&(!i&&this.beans.navigation?.handlePageScrollingKey(s)||e.onKeyDown(s),this.doGridOperations(s,i),UC(s)&&e.processCharacter(s)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(s,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,s){const{rowNode:i}=e,{focusSvc:n,navigation:o}=this.beans,a=n.getFocusedCell()?.column;if(!ju(this.gos,s,i,a,!1)){const c=s.key;if(t==="keydown")switch(c){case O.PAGE_HOME:case O.PAGE_END:case O.PAGE_UP:case O.PAGE_DOWN:o?.handlePageScrollingKey(s,!0);break;case O.LEFT:case O.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case O.UP:case O.DOWN:e.onKeyboardNavigate(s);break;case O.TAB:e.onTabKeyDown(s);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",s))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!_r(this.beans,e))return;const s=wC(e),{clipboardSvc:i,undoRedo:n}=this.beans;if(s===O.A)return this.onCtrlAndA(e);if(s===O.C)return this.onCtrlAndC(i,e);if(s===O.D)return this.onCtrlAndD(i,e);if(s===O.V)return this.onCtrlAndV(i,e);if(s===O.X)return this.onCtrlAndX(i,e);if(s===O.Y)return this.onCtrlAndY(n);if(s===O.Z)return this.onCtrlAndZ(n,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:s,selectionSvc:i},gos:n}=this;s&&Pi(n)&&!yR(n)&&t.isRowsToRender()?YF(this.beans):i&&i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:hC(n)}),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")}},Ka=e=>e.topRowCtrls,Ya=e=>e.getStickyTopRowCtrls(),Za=e=>e.getStickyBottomRowCtrls(),Xa=e=>e.bottomRowCtrls,Qa=e=>e.allRowCtrls,Bd=e=>e.getCtrls("top"),Vd=e=>e.getCtrls("center"),zd=e=>e.getCtrls("bottom"),XF={center:{type:"center",name:"center-cols",getRowCtrls:Qa,getSpannedRowCtrls:Vd},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Qa,getSpannedRowCtrls:Vd},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Qa,getSpannedRowCtrls:Vd},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Qa},topCenter:{type:"center",name:"floating-top",getRowCtrls:Ka,getSpannedRowCtrls:Bd},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Ka,getSpannedRowCtrls:Bd},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Ka,getSpannedRowCtrls:Bd},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:Ka},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Ya},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Ya},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Ya},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Ya},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:Za},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:Za},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:Za},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:Za},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Xa,getSpannedRowCtrls:zd},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Xa,getSpannedRowCtrls:zd},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Xa,getSpannedRowCtrls:zd},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Xa}};function KC(e){return`ag-${ra(e).name}-viewport`}function YC(e){const t=ra(e);return t.container??`ag-${t.name}-container`}function QF(e){return`ag-${ra(e).name}-spanned-cells-container`}function ra(e){return XF[e]}var JF=["topCenter","topLeft","topRight"],eE=["bottomCenter","bottomLeft","bottomRight"],tE=["center","left","right"],sE=["center","left","right","fullWidth"],iE=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],nE=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],oE=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],ZC=["stickyTopCenter","stickyTopLeft","stickyTopRight"],XC=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],rE=[...ZC,"stickyTopFullWidth",...XC,"stickyBottomFullWidth"],aE=[...JF,...eE,...tE,...ZC,...XC],lE=class extends B{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=ra(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new $F(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,i){this.comp=e,this.eContainer=t,this.eSpannedContainer=s,this.eViewport=i,this.createManagedBean(new ZF(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:n,rangeSvc:o}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(nE,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(n?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(oE,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(n?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(sE,()=>this.createManagedBean(new jC(this.eContainer,this.name==="center"?i:void 0))),o&&this.forContainers(aE,()=>this.createManagedBean(o.createDragListenerFeature(this.eContainer))),this.forContainers(iE,()=>this.createManagedBean(new op(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:i=>this.onDisplayedRowsChanged(i.afterScroll)}),s(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(rE.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const s=this.gos.get("ensureDomOrder"),i=yt(this.gos,"print");this.comp.setDomOrder(s||i)};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 Wr(this.eViewport)}getCenterViewportScrollLeft(){return kl(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=ri(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return Gv(this.eViewport)}getViewportScrollLeft(){return kl(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){const{beans:e,gos:t,eViewport:s}=this,i=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:n}=e,o=n.getGridBodyCtrl()?.eBodyViewport,r=n.get("fakeHScrollComp")?.getGui(),a=n.get("fakeVScrollComp")?.getGui();return i||jF(s,o,void 0,r,a)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Il(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=yt(this.gos,"print"),n=this.gos.get("embedFullWidthRows")||s,o=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!n&&a:n||!a});this.comp.setRowCtrls({rowCtrls:o,useFlushSync:e})}},cE="ag-force-vertical-scroll",dE="ag-selectable",uE="ag-column-moving",hE=class extends B{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,i,n,o,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=s,this.eTop=i,this.eBottom=n,this.eStickyTop=o,this.eStickyBottom=r,this.eCenterColsViewport=s.querySelector(`.${KC("center")}`),this.eFullWidthContainer=s.querySelector(`.${YC("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new lp(this.comp)),this.scrollFeature=this.createManagedBean(new WF(s)),this.beans.rowDragSvc?.setupRowDrag(s,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,s,n,o,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(i),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,i=PC()?16:0,n=`calc(100% + ${s+i}px)`;ai(this.beans,()=>this.comp.setBodyViewportWidth(n)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t,gos:s}=this;let i=s.get("treeData");if(!i){const n=t.isPivotMode();i=(e?e.columns.length:0)>=(n?2:1)}this.comp.setGridRootRole(i?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:s=>{const{target:i}=s,n=on(i,"ag-root",t);t.classList.toggle("ag-has-focus",!n)},focusout:s=>{const{target:i,relatedTarget:n}=s,o=t.contains(n),r=on(n,"ag-root",t);on(i,"ag-root",t)||(!o||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(uE,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(dE,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,i=s===-1?-1:e+s;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const{gos:e,comp:t,ctrlsSvc:s}=this,i=e.get("alwaysShowVerticalScroll"),n=i?cE:null,o=yt(e,"normal");t.setAlwaysVerticalScrollClass(n,i);const r=s.get("center")?.eViewport,a=s.get("fakeHScrollComp")?.getGui(),l=s.get("fakeVScrollComp")?.getGui();return i||o&&_F(this.eBodyViewport,r,void 0,l,a)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let s=t.sizesMeasured;const i=()=>{const n=s&&po(this.gos)&&!e.stretching,o=n?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(o,n)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({stylesChanged:()=>{!s&&t.sizesMeasured&&(s=!0,i())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:s,eTop:i,eBottom:n,beans:{popupSvc:o,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,o)});const l=this.onStickyWheel.bind(this);for(const d of[t,s,i,n])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:i}=e;(i||Math.abs(t)>Math.abs(s))&&_r(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:i}=e;(i||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:i}=e||t;(i===this.eBodyViewport||i===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(),i=e?.getPinnedBottomTotalHeight(),n=t.getPinnedRowBorderWidth(),o=t.getRowBorderWidth(),r=n-o,a=s?r+s:0,l=i?r+i:0;this.comp.setTopHeight(a),this.comp.setBottomHeight(l),this.comp.setTopInvisible(a<=0),this.comp.setBottomInvisible(l<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),s=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let i=0;t>0&&(i+=t),s>0&&(i+=s),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:s}=this,i=e?.getPinnedBottomTotalHeight()??0,o=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=i+o;s.setStickyBottomBottom(`${r}px`)}};function Qt(e){return mn(e)}var Co={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},QC=class extends Ht{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:s,eTopGuard:i,eBottomGuard:n,focusTrapActive:o,forceFocusOutWhenTabGuardsAreEmpty:r,isFocusableContainer:a,focusInnerElement:l,onFocusIn:c,onFocusOut:d,shouldStopEventPropagation:u,onTabKeyDown:h,handleKeyDown:g,isEmpty:m,eFocusableElement:v}=e;this.comp=s,this.eTopGuard=i,this.eBottomGuard=n,this.providedFocusInnerElement=l,this.eFocusableElement=v,this.focusTrapActive=!!o,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.isFocusableContainer=!!a,this.providedFocusIn=c,this.providedFocusOut=d,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=g,this.providedIsEmpty=m}postConstruct(){this.createManagedBean(new IC(this.eFocusableElement,this.stopPropagationCallbacks,{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():dn(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=Ct(this.beans),s=dn(t.body,null,!0),i=s.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let n,o;e?(n=0,o=i):(n=i+1,o=s.length);const r=s.slice(n,o),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=dn(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return In(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}},pE=class extends Ht{constructor(e,t){super(),this.comp=e,this.stopPropagationCallbacks=t}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:s,eFocusableElement:i,stopPropagationCallbacks:n}=this,o=[t,s],r={setTabIndex:w=>{for(const b of o)w==null?b.removeAttribute("tabindex"):b.setAttribute("tabindex",w)}};this.addTabGuards(t,s);const{focusTrapActive:a=!1,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:m,forceFocusOutWhenTabGuardsAreEmpty:v,isFocusableContainer:C}=e;this.tabGuardCtrl=this.createManagedBean(new QC({comp:r,focusTrapActive:a,eTopGuard:t,eBottomGuard:s,eFocusableElement:i,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:m,forceFocusOutWhenTabGuardsAreEmpty:v,isFocusableContainer:C},n))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Ct(this.beans).createElement("div"),s=e==="top"?Co.TAB_GUARD_TOP:Co.TAB_GUARD_BOTTOM;return t.classList.add(Co.TAB_GUARD,s),fn(t,"presentation"),t}addTabGuards(e,t){const s=this.eFocusableElement;s.prepend(e),s.append(t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];Wt(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,s){Bh(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.before(t):e(t,s)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;si(e),si(t),super.destroy()}},gE=class extends Ho{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new pE(this,t)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},fE=class extends gE{initialiseTabGuard(t){super.initialiseTabGuard(t,Xh)}},pf=(e,t)=>NC(e,()=>wn(e.getGui(),t,!1,!0)),gf=e=>e?.getFocusableContainerName()??"external",mE=e=>e==null?"external":typeof e=="string"?e:"gridBody",vE=class extends B{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:i,ctrlsSvc:n}=this.beans;i?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new lp(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const o=ri(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>o()),n.register("gridCtrl",this)}isDetailGrid(){return kC(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;e===!1?t.setCursor(null):t.setCursor(e===1?"ew-resize":"ns-resize")}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:s,nextIndex:i}=this.getNextFocusableIndex(t,e),n=s===-1?e?t.length-1:0:i,{gos:o,beans:{focusSvc:r,navigation:a}}=this,l=o.getCallback("tabToNextGridContainer");if(l){const c=r.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:n}),d=gf(t[n]),u=c==null&&d==="gridBody"?"gridBody":mE(c),h=l({backwards:e,previousContainer:gf(t[s]),nextContainer:u,defaultTarget:c});if(h!==void 0){if(typeof h=="boolean")return h;if(typeof h=="string"){if(h==="gridBody")return this.focusGridBodyDefault(e)||void 0;const g=t.find(m=>m.getFocusableContainerName()===h);if(!g){qv(`tabToNextGridContainer - ${h} container not found`);return}return pf(g,e)?!0:void 0}return PF(h)?r.focusHeaderPosition({headerPosition:h})||void 0:(a?.ensureCellVisible(h),r.setFocusedCell({...h,forceBrowserFocus:!0}),r.isCellFocused(h)||void 0)}}return this.focusNextInnerContainerDefault({backwards:e,focusableContainers:t,indexWithFocus:s,nextIndex:n})||void 0}focusInnerElement(e){const{gos:t,beans:s,beans:{focusSvc:i,visibleCols:n}}=this;if(t.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const r=this.getFocusableContainers();if(e)return this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:r,indexWithFocus:r.length,nextIndex:r.length-1})?!0:i.focusGridView({column:$e(n.allCols),backwards:!0});const a=n.allCols;if(t.get("headerHeight")===0||vs(s)){if(i.focusGridView({column:a[0],backwards:e}))return!0;for(let l=1;l<r.length;l++)if(wn(r[l].getGui(),e))return!0;return!1}return i.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}isFocusInsideGridBody(){const e=this.getFocusableContainers(),{indexWithFocus:t}=this.getNextFocusableIndex(e);return e[t]?.getFocusableContainerName()==="gridBody"}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{indexWithFocus:s,nextIndex:i}=this.getNextFocusableIndex(t,e);this.focusNextInnerContainerDefault({backwards:!!e,focusableContainers:t,indexWithFocus:s,nextIndex:i})||this.forceFocusOutOfContainer(e)}isFocusable(){const e=this.beans;return!Kr(e)||!vs(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const s=et(this.beans),i=e.findIndex(n=>n.getGui().contains(s));return{indexWithFocus:i,nextIndex:i+(t?-1:1)}}focusGridBodyDefault(e){const{gos:t,beans:s,beans:{focusSvc:i,visibleCols:{allCols:n}}}=this;return e?i.focusGridView({column:$e(n),backwards:!0}):t.get("headerHeight")===0||vs(s)?i.focusGridView({column:n[0]}):i.focusFirstHeader()}focusNextInnerContainerDefault(e){const{backwards:t,focusableContainers:s,indexWithFocus:i}=e,n=t?-1:1;for(let o=e.nextIndex;o>=0&&o<s.length;o+=n){const r=s[o];if(r.getFocusableContainerName()==="gridBody"&&(i===-1||(t?i>o:i<o))){if(this.focusGridBodyDefault(t))return!0;continue}if(pf(r,t))return!0}return!1}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},Re=(e,t)=>{for(const s of Object.keys(t))t[s]=e;return t},ff={dispatchEvent:"CommunityCore",...Re("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...Re("GridState",{getState:0,setState:0}),...Re("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...Re("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...Re("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...Re("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...Re("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...Re("ValueCache",{expireValueCache:0}),...Re("CellApi",{getCellValue:0}),...Re("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...Re("Sort",{onSortChanged:0}),...Re("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...Re("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...Re("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...Re("HighlightChanges",{flashCells:0}),...Re("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...Re("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}),...Re("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...Re("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...Re("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...Re("ColumnResize",{setColumnWidths:0}),...Re("ColumnHover",{isColumnHovered:0}),...Re("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...Re("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...Re("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...Re("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...Re("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...Re("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...Re("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...Re("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...Re("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...Re("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...Re("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}),...Re("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...Re("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...Re("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...Re("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...Re("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...Re("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...Re("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...Re("ContextMenu",{showContextMenu:0}),...Re("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...Re("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...Re("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...Re("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...Re("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}),...Re("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...Re("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...Re("StatusBar",{getStatusPanel:0}),...Re("AiToolkit",{getStructuredSchema:0})},Wd={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},CE=(e,t)=>e.eventSvc.dispatchEvent(t),JC=class{};Reflect.defineProperty(JC,"name",{value:"GridApi"});var wE=class extends B{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new JC,this.fns={...Wd,dispatchEvent:CE},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(ff))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:i}=this;s!==Wd&&(s[e]=i?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:s,fns:{[e]:i}}=this;return i?i(s,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:s,preDestroyLink:i}=this;if(!t)q(26,{fnName:e,preDestroyLink:i});else{const n=ff[e];s.assertModuleRegistered(n,`api.${e}`)&&q(27,{fnName:e,module:n})}}destroy(){super.destroy(),this.fns=Wd,this.beans=null}};function ew(e){return e.context.getId()}function bE(e){e.gridDestroySvc.destroy()}function xE(e){return e.gridDestroySvc.destroyCalled}function yE(e,t){return e.gos.get(t)}function SE(e,t,s){tw(e,{[t]:s})}function tw(e,t){e.gos.updateGridOptions({options:t})}function RE(e,t){const s=t.replace(/Module$/,"");return e.gos.isModuleRegistered(s)}function FE(e,t,s){const i=zt(e,t,s);if(i){const{className:o}=i;if(typeof o=="string"&&o.includes("ag-icon")||typeof o=="object"&&o["ag-icon"])return i}const n=Qt({tag:"span"});return n.appendChild(i),n}function zt(e,t,s){let i=null;e==="smallDown"?q(262):e==="smallLeft"?q(263):e==="smallRight"&&q(264);const n=s?.getColDef().icons;if(n&&(i=n[e]),t.gos&&!i){const o=t.gos.get("icons");o&&(i=o[e])}if(i){let o;if(typeof i=="function")o=i();else if(typeof i=="string")o=i;else{q(38,{iconName:e});return}if(typeof o=="string")return Hh(o);if(Bh(o))return o;q(133,{iconName:e});return}else{const o=t.registry.getIcon(e);return o||t.validation?.validateIcon(e),Qt({tag:"span",cls:`ag-icon ag-icon-${o??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var EE={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},DE=class extends ot{constructor(e,t,s){super(EE),this.rowNode=e,this.column=t,this.eCell=s}postConstruct(){this.getGui().appendChild(zt("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:i,gos:n}=this,o=s.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(i,0,0),o){const a=xe(n,{rowNode:t,dragEvent:e});o(a)}else try{const a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},PE=".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)}",TE={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"}]}]},kE=class extends ot{constructor(){super(),this.dragSource=null,this.eIcon=ue,this.eLabel=ue,this.eGhost=ue,this.registerCSS(PE)}postConstruct(){const e=t=>FE(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(TE),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:s,eIcon:i,dragSource:n,dropIconMap:o,gos:r}=this;Wt(i);let a=null;e||(e=n?.getDefaultIconName?n.getDefaultIconName():"notAllowed"),a=o[e],s.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),i.classList.toggle("ag-shake-left-to-right",t),!(a===o.hide&&r.get("suppressDragLeaveHidesColumns"))&&a&&i.appendChild(a)}setLabel(e){this.eLabel.textContent=e}};function IE(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function ME(e,t){const s=e.dragAndDrop?.findExternalZone(t.getContainer());s&&e.dragAndDrop?.removeDropTarget(s)}function AE(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function LE(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function OE(e,t){const s=e.rowDropHighlightSvc;if(!s)return;const i=t?.row;let n=t?.dropIndicatorPosition;n!=="above"&&n!=="below"&&n!=="inside"&&(n="none");const o=i?.rowIndex;o==null||n==="none"?s.clear():s.set(i,n)}var sw=(e,t)=>{if(t!=null&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},NE=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const s=t.pointerId;if(!sw(e,s))return null;const i={eElement:e,pointerId:s,onLost(n){GE(i,n)}};return e.addEventListener("lostpointercapture",i.onLost),i},HE=e=>{if(!e)return;iw(e);const{eElement:t,pointerId:s}=e;if(t){try{t.releasePointerCapture(s)}catch{}e.eElement=null}},iw=e=>{const{eElement:t,onLost:s}=e;t&&s&&(t.removeEventListener("lostpointercapture",s),e.onLost=null)},GE=(e,t)=>{iw(e);const{eElement:s,pointerId:i}=e;s&&t.pointerId===i&&sw(s,i)},Xn,oo,jd={passive:!0},fi={passive:!1},Ds=e=>{if(!oo)oo=new WeakSet;else if(oo.has(e))return!1;return oo.add(e),!0},BE=class extends Ht{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!Xn?.has(ms(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)mf(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let s=0,i=t.length;s<i;++s){const n=t[s];if(n.params===e){t.splice(s,1),mf(n);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:s}=e,i=[];let n;if(s){const c=t.style;c&&(n=c.touchAction,c.touchAction="none")}const o={handlers:i,params:e,oldTouchAction:n};this.dragSources.push(o),dl(i,[t,"pointerdown",c=>this.onPointerDown(e,c),fi],[t,"mousedown",c=>this.onMouseDown(e,c)]);const l=this.gos.get("suppressTouch");s&&!l&&dl(i,[t,"touchstart",d=>this.onTouchStart(e,d),fi])}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&&_r(this.beans,e)&&!Fr(Ud(e))}initDrag(e,...t){this.drag=e;const s=this.beans,i=a=>this.onScroll(a),n=a=>this.onKeyDown(a),o=ms(s),r=Ct(s);dl(e.handlers,[o,"contextmenu",bi],[o,"keydown",n],[r,"scroll",i,{capture:!0}],[r.defaultView||window,"scroll",i],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;Xn?.get(t)===e&&Xn.delete(t),this.drag=null,HE(e.pointerCapture),Vh(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const s=this.beans;if(oo?.has(t))return;const i=t.pointerType;if(i==="touch"&&(s.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),Fr(Ud(t))))||!t.isPrimary||i==="mouse"&&t.button!==0)return;this.destroyDrag();const n=ms(s),o=e.eElement,r=t.pointerId,a=new _d(n,e,t,r);Xn??(Xn=new WeakMap),Xn.set(n,a);const l=h=>{h.pointerId===r&&this.onMouseOrPointerMove(h)},c=h=>{h.pointerId===r&&this.onMouseOrPointerUp(h)},d=h=>{h.pointerId===r&&Ds(h)&&this.cancelDrag()},u=h=>this.draggingPreventDefault(h);this.initDrag(a,[n,"pointerup",c],[n,"pointercancel",d],[n,"pointermove",l,fi],[n,"touchmove",u,fi],[o,"mousemove",u,fi]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Ds(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!Ds(t)||Fr(Ud(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&bi(t);return}this.destroyDrag();const i=this.beans,n=ms(i),o=new _d(n,e,t.touches[0]),r=h=>this.onTouchMove(h),a=h=>this.onTouchUp(h),l=h=>this.onTouchCancel(h),c=h=>this.draggingPreventDefault(h),d=ms(i),u=t.target??e.eElement;this.initDrag(o,[u,"touchmove",r,jd],[u,"touchend",a,jd],[u,"touchcancel",l,jd],[d,"touchmove",c,fi],[d,"touchend",a,fi],[d,"touchcancel",l,fi]),e.dragStartPixels===0&&this.onMove(o.start)}draggingPreventDefault(e){this.dragging&&bi(e)}onMouseDown(e,t){if(t.button!==0||oo?.has(t)||this.isPointer())return;const s=this.beans;this.destroyDrag();const i=new _d(ms(s),e,t),n=a=>this.onMouseOrPointerMove(a),o=a=>this.onMouseOrPointerUp(a),r=ms(s);this.initDrag(i,[r,"mousemove",n],[r,"mouseup",o]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Ds(t)}onScroll(e){if(!Ds(e))return;const t=this.drag,s=t?.lastDrag;s&&this.dragging&&t.params?.onDragging?.(s)}onMouseOrPointerMove(e){Ds(e)&&(Ni()&&Ct(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&bi(e),this.onMove(e))}onTouchCancel(e){const t=this.drag;!t||!Ds(e)||co(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){const t=this.drag;if(!t||!Ds(e))return;const s=co(t.start,e.touches);s&&(this.onMove(s),this.draggingPreventDefault(e))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const s=t.params;if(!this.dragging){const i=t.start,o=s.dragStartPixels??4;if(zv(e,i,o)||(this.dragging=!0,s.capturePointer&&(t.pointerCapture=NE(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:s.eElement}),s.onDragStart?.(i),this.drag!==t)||(s.onDragging?.(i),this.drag!==t))return}s.onDragging?.(e)}onTouchUp(e){const t=this.drag;t&&Ds(e)&&this.onUp(co(t.start,e.changedTouches))}onMouseOrPointerUp(e){Ds(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===O.ESCAPE&&this.cancelDrag()}},mf=e=>{Vh(e.handlers);const t=e.oldTouchAction;if(t!=null){const s=e.params.eElement.style;s&&(s.touchAction=t)}},_d=class{constructor(e,t,s,i=null){this.rootEl=e,this.params=t,this.start=s,this.pointerId=i,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},Ud=e=>{const t=e.target;return t instanceof Element?t:null},VE=class extends BE{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},zE=class extends B{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)}},WE={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Ja={skipAriaHidden:!0},jE=class extends ot{constructor(e,t,s,i,n,o=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=s,this.customGui=i,this.dragStartPixels=n,this.alwaysVisible=o,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(WE),this.getGui().appendChild(zt("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,rowNode:t}=this,s=this.refreshVisibility.bind(this);this.addManagedListeners(e.eventSvc,{rowDragVisibilityChanged:s}),this.addManagedListeners(t,{dataChanged:s,cellChanged:s}),this.refreshVisibility()}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const{beans:e,column:t,rowNode:s}=this,{gos:i,dragAndDrop:n,rowDragSvc:o}=e,r=o?.visibility;let l=!(r==="suppress"||r==="hidden"&&!n?.hasExternalDropZones()),c=l;if(l&&!this.isCustomGui()&&t){const d=t.getColDef().rowDrag;if(d===!1)l=!1;else{const u=typeof d=="function";c=t.isRowDrag(s),l=u||c}}l&&c&&s.footer&&i.get("rowDragManaged")&&(c=!1,l=!0),c&&(c=l),l||this.setDisplayed(l,Ja),c||this.setVisible(c,Ja),this.setDisabled(!c||r==="disabled"&&!n?.hasExternalDropZones()),l&&this.setDisplayed(l,Ja),c&&this.setVisible(c,Ja)}setDisabled(e){e!==this.disabled&&(this.disabled=e,this.getGui()?.classList?.toggle("ag-drag-handle-disabled",e))}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()}}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();const i=Al("pointerdown")?{pointerdown:bi}:{mousedown:bi};this.mouseDownListener=this.addManagedElementListeners(t,i)[0]}const s=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:i=>this.getDragItemName(i,s),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){const s=e?.dragItem||this.getDragItem(),i=(e?.dropTarget?.rows.length??s.rowNodes?.length)||1,n=this.column?.getColDef()?.rowDragText??this.gos.get("rowDragText");if(n)return n(s,i);if(i!==1)return`${i} ${t("rowDragRows","rows")}`;const o=this.cellValueFn();return o||`1 ${t("rowDragRow","rows")}`}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)}},_E=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??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=!this.scrollVertically||t||this.shouldSkipVerticalScroll(),i=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(s&&i)return;const n=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=!i&&e.clientX<n.left+o,this.tickRight=!i&&e.clientX>n.right-o,this.tickUp=!s&&e.clientY<n.top+o,this.tickDown=!s&&e.clientY>n.bottom-o,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)}},wl=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},ql=e=>{let t=e.childrenAfterGroup;for(;t?.length;){const s=t[0];if(s.sourceRowIndex>=0)return s;t=s.childrenAfterGroup}},UE=(e,t,s,i)=>{if(!t.size||!e)return!1;let n=!1;const o=e.length??0;let r=-1;s&&(r=s.sourceRowIndex,s=r<0?ql(s):null,s&&(r=s.sourceRowIndex)),r<0||r>=o?r=o:i||++r;let a=r,l=Math.min(r,o-1);for(const u of t){const h=u.sourceRowIndex;h<a&&(a=h),h>l&&(l=h)}let c=a;for(let u=a;u<r;++u){const h=e[u];t.has(h)||(h.sourceRowIndex!==c&&(h.sourceRowIndex=c,e[c]=h,n=!0),++c)}let d=l;for(let u=l;u>=r;--u){const h=e[u];t.has(h)||(h.sourceRowIndex!==d&&(h.sourceRowIndex=d,e[d]=h,n=!0),--d)}for(const u of t)u.sourceRowIndex!==c&&(u.sourceRowIndex=c,e[c]=u,n=!0),++c;return n};function $E(e,t){return cp(e,t.target)?.getFocusedCellPosition()??null}function vf(e,t){const s=yt(e.gos,"normal"),i=t;let n,o;i.clientX!=null||i.clientY!=null?(n=i.clientX,o=i.clientY):(n=i.x,o=i.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(o+=r,s){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition(),c=a.getHScrollPosition();n+=c.left,o+=l.top}return{x:n,y:o}}var qE=.25,KE=class extends B{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{const s=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,i=new _E({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:s,setVerticalPosition:n=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(n),onScrollCallback:()=>{const n=s();if(this.autoScrollOldV!==n){this.autoScrollOldV=n,this.autoScrollChanging=!0;return}const o=this.autoScrollChanging;this.autoScrollChanged=o,this.autoScrollChanging=!1,o&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=i,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.beans.rowDragSvc.visibility!=="visible"?"notAllowed":"move"}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(YE)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:s,beans:i}=this;if(t){const a=this.getRowNodes(e);e.dragItem.rowNodes=a,wf(a,!0)}this.lastDraggingEvent=e;const n=e.fromNudge,o=this.makeRowsDrop(s,e,n,!1);i.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);const r=this.autoScroll;o?.rowDragManaged&&o.moved&&o.allowed&&o.sameGrid&&!o.suppressMoveWhenRowDragging&&(!n&&!r?.scrolling||this.autoScrollChanged)&&this.dropRows(o),r?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,s,i){const{beans:n,gos:o}=this,r=this.newRowsDrop(t,i),a=n.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:l,rootNode:c,source:d,target:u}=r;u??(u=a.getRow(a.getRowCount()-1)??null);const h=this.beans.groupEditSvc,g=!!h?.canSetParent(r);let m=null;if(u?.footer){const C=Vu(a,-1,u)??Vu(a,1,u);g&&(m=u.sibling??c),u=C??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=d!==u);let v=.5;if(u&&(l&&r.moved&&(m||!g)?v=d.rowIndex>u.rowIndex?-.5:.5:v=(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&l&&u&&r.moved&&it(o)){const C=ZE(a,r);C&&(v=d.rowIndex>C.rowIndex?-.5:.5,u=C,r.moved&&(r.moved=d!==u))}return r.target=u,r.newParent=m,r.pointerPos=XE(u,r.y),r.yDelta=v,h?.fixRowsDrop(r,g,s,v),this.validateRowsDrop(r,g,i),t.changed||(t.changed=Cf(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:s,gos:i}=this,n=s.rowModel.rootNode,o=it(i)?i.get("rowDragManaged"):!1,r=i.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!n)return null;const d=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;o&&(!c.length||s.rowDragSvc.visibility!=="visible"||(r||!a)&&!d)&&(u=!1);const h=vf(s,e).y,g=this.getOverNode(h);return{api:s.gridApi,context:s.gridOptions.context,draggingEvent:e,rowDragManaged:o,suppressMoveWhenRowDragging:r,sameGrid:a,withinGrid:d,treeData:!1,rootNode:n,moved:l!==g,y:h,overNode:g,overIndex:g?.rowIndex??-1,pointerPos:"none",position:"none",source:l,target:g??null,newParent:null,rows:c,allowed:u,highlight:!t&&o&&r&&(d||!a),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,s){const{source:i,target:n,yDelta:o,inside:r,moved:a,rowDragManaged:l,suppressMoveWhenRowDragging:c}=e;e.moved&&(e.moved=i!==n);const{position:d,fallbackPosition:u}=this.computeDropPosition(a,r,o);e.position=d,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,c,"initial");const h=(!l||e.allowed)&&this.gos.get("isRowValidDropPosition");h&&this.applyDropValidator(e,t,s,l,h),l&&(e.rows=this.filterRows(e)),this.beans.groupEditSvc?.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,c,"final"),e.position==="inside"&&(!e.allowed||!e.newParent)&&(e.position=u)}computeDropPosition(e,t,s){const i=s<0?"above":"below";return e?{position:t?"inside":i,fallbackPosition:i}:{position:"none",fallbackPosition:i}}enforceSuppressMoveWhenRowDragging(e,t,s){if(t){if(s==="initial"){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position==="none")&&(e.allowed=!1)}}applyDropValidator(e,t,s,i,n){this.beans.groupEditSvc?.clearNewSameParent(e,t);const o=n(e);if(!o){e.allowed=!1;return}if(typeof o!="object")return;o.rows!==void 0&&(e.rows=o.rows??[]),t&&o.newParent!==void 0&&(e.newParent=o.newParent),o.target!==void 0&&(e.target=o.target),o.position&&(e.position=o.position),o.allowed!==void 0?e.allowed=o.allowed:i||(e.allowed=!0);const r=e.draggingEvent;o.changed&&r&&(r.changed=!0),!s&&o.highlight!==void 0&&(e.highlight=o.highlight)}addRowDropZone(e){if(!e.getContainer()){q(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){q(56);return}const s=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(n=>e.onDragEnter(this.rowDragEvent("rowDragEnter",n))),onDragLeave:e.onDragLeave&&(n=>e.onDragLeave(this.rowDragEvent("rowDragLeave",n))),onDragging:e.onDragging&&(n=>e.onDragging(this.rowDragEvent("rowDragMove",n))),onDragStop:e.onDragStop&&(n=>e.onDragStop(this.rowDragEvent("rowDragEnd",n))),onDragCancel:e.onDragCancel&&(n=>e.onDragCancel(this.rowDragEvent("rowDragCancel",n)))},i={isInterestedIn:n=>n===2,getIconName:()=>"move",external:!0,...s};t.addDropTarget(i),this.addDestroyFunc(()=>t.removeDropTarget(i))}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,n=e>t.getCurrentPagePixelRange().pageLastPixel?-1:s.getRowIndexAtPixel(e);return n>=0?s.getRow(n):void 0}rowDragEvent(e,t){const s=this.beans,{dragItem:i,dropTarget:n,event:o,vDirection:r}=t,a=n?.rootNode===s.rowModel.rootNode,l=a?n.y:vf(s,t).y,c=a?n.overNode:this.getOverNode(l),d=a?n.overIndex:c?.rowIndex??-1;return{api:s.gridApi,context:s.gridOptions.context,type:e,event:o,node:i.rowNode,nodes:i.rowNodes,overIndex:d,overNode:c,y:l,vDirection:r,rowsDrop:n}}dispatchGridEvent(e,t){const s=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(s)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){const t=this.lastDraggingEvent?.dropTarget??null,s=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),s?.allowed&&s.rowDragManaged&&(!t?.droppedManaged||Cf(t,s))&&this.dropRows(s),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){this.clearAutoScroll(),this.beans.groupEditSvc?.stopDragging(t),this.beans.rowDropHighlightSvc?.fromDrag(null),wf(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){this.autoScroll?.ensureCleared(),this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}dropRows(e){return e.droppedManaged=!0,e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:s}){const i=Fo(this.gos),n=this.beans.rowModel,o=s.filter(({data:a,rowPinned:l})=>!n.getRowNode(i?.({data:a,level:0,rowPinned:l})??a.id)).map(({data:a})=>a);if(o.length===0)return!1;let r;if(t){const a=t.sourceRowIndex>=0?t:ql(t);a&&(r=a.sourceRowIndex+(e==="above"?0:1))}return n.updateRowData({add:o,addIndex:r}),!0}filterRows(e){const{groupEditSvc:t}=this.beans,{rows:s,sameGrid:i}=e;let n;for(let o=0,r=s.length;o<r;++o){let a=!0;const l=s[o];(!l||l.footer||i&&l.destroyed&&!l.group||!this.csrmGetLeaf(l))&&(a=!1),a&&t&&!t.canDropRow(l,e)&&(a=!1),a?n?.push(l):n??(n=s.slice(0,o))}return n??s}csrmMoveRows(e){const t=this.beans.groupEditSvc;return t?.isGroupingDrop(e)?t.dropGroupEdit(e):this.csrmMoveRowsReorder(e)}csrmMoveRowsReorder({position:e,target:t,rows:s,newParent:i,rootNode:n}){let o=!1;const r=new Set;for(const h of s){i&&h.parent!==i&&(h.treeParent=i,o=!0);const g=this.csrmGetLeaf(h);g&&r.add(g)}if(!o&&r.size===0)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),c=l&&no(this.beans,l);if(r.size&&UE(n._leafs,r,t,e==="above")&&(o=!0),!o)return!1;const d=this.beans.rowModel,u=new wl;return u.reordered=!0,d.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:u}),c?c.focusCell():a.clearFocusedCell(),!0}csrmGetLeaf(e){if(e.sourceRowIndex>=0)return e.destroyed?void 0:e;const t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):ql(e)}},Cf=(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||!Li(e.rows,t.rows)),YE=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,wf=(e,t)=>{for(let s=0,i=e?.length||0;s<i;++s){const n=e[s];n.dragging!==t&&(n.dragging=t,n.dispatchRowEvent("draggingChanged"))}},ZE=(e,t)=>{let s=null,i=t.target;if(i&&t.rows.indexOf(i)<0)return null;const n=t.source;if(!i||!n)return null;let o=i.rowIndex-n.rowIndex;const r=o<0?-1:1;o=t.suppressMoveWhenRowDragging?Math.abs(o):1;const a=new Set(t.rows);do{const l=Vu(e,r,i);if(!l)break;a.has(l)||(s=l,--o),i=l}while(o>0);return s},XE=(e,t)=>{const s=e?.rowTop,i=e?.rowHeight??0;if(s==null||!i||i<=0)return"none";const n=t-s,o=i*qE;return n<=o?"above":n>=i-o?"below":"inside"},QE=class extends B{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){const s=t.createManagedBean(new KE(e)),i=this.beans.dragAndDrop;i.addDropTarget(s),t.addDestroyFunc(()=>i.removeDropTarget(s)),this.rowDragFeature=s;const n=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],n),this.addManagedEventListeners({newColumnsLoaded:n,columnRowGroupChanged:n,columnPivotModeChanged:n,sortChanged:n,filterChanged:n}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,s,i,n,o){return new jE(e,t,s,i,n,o)}createRowDragCompForRow(e,t){if(Pi(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,i,n,o){const r=this.gos;return r.get("rowDragManaged")&&(!it(r)||r.get("pagination"))?void 0:this.createRowDragComp(s,e,t,i,n,o)}cancelRowDrag(){this.rowDragFeature?.lastDraggingEvent&&this.beans.dragSvc?.cancelDrag()}computeVisibility(){const e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";const i=e.colModel.isPivotMode();return(i||e.rowGroupColsSvc?.columns?.length)&&!t.get("refreshAfterGroupEdit")?"hidden":i||e.filterManager?.isAnyFilterPresent()||e.sortSvc?.isSortActive()?"disabled":"visible"}refreshVisibility(){const e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,this.eventSvc?.dispatchEvent({type:"rowDragVisibilityChanged"}))}},JE=class extends B{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,i=e.uiLevel,n=t!==this.position,o=i!==this.uiLevel;this.dragging=!1,(s||n||o)&&(s&&this.clear(),this.uiLevel=i,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:s,target:i,position:n}=t;if(s&&i&&n!=="none"){this.set(i,n),this.dragging=!0;return}}this.dragging&&this.clear()}},nw={moduleName:"Drag",version:Q,beans:[VE]},eD={moduleName:"DragAndDrop",version:Q,dynamicBeans:{dndSourceComp:DE},icons:{rowDrag:"grip"}},ow={moduleName:"SharedDragAndDrop",version:Q,beans:[L3],dependsOn:[nw],userComponents:{agDragAndDropImage:kE},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},tD={moduleName:"RowDrag",version:Q,beans:[JE,QE],apiFunctions:{addRowDropZone:IE,removeRowDropZone:ME,getRowDropZoneParams:AE,getRowDropPositionIndicator:LE,setRowDropPositionIndicator:OE},dependsOn:[ow]},sD={moduleName:"HorizontalResize",version:Q,beans:[zE],dependsOn:[nw]},iD=":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}}",nD=class extends B{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:i}=this;if(s.length===0&&i.length===0){e(),t();return}const n=o=>{for(;o.length;){const r=o.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),n(s)},0),window.setTimeout(()=>{t(),n(i)},200)})}};function oD(e,t,s){e.colMoves?.moveColumnByIndex(t,s,"api")}function rD(e,t,s){e.colMoves?.moveColumns(t,s,"api")}var aD=class extends B{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:i}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&s?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&i?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function lD(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,n)=>{const o=e.indexOf(i),r=e.indexOf(n);return o-r})}function cD(e){const t=[...e];for(const s of e){let i=null,n=s.getParent();for(;n!=null&&n.getDisplayedLeafColumns().length===1;)i=n,n=n.getParent();if(i!=null){const r=!!i.getColGroupDef()?.marryChildren?i.getProvidedColumnGroup().getLeafColumns():i.getLeafColumns();for(const a of r)t.includes(a)||t.push(a)}}return t}function dD(e,t,s,i){const n=i.allCols;let o=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=>n.includes(h));if(r===null)r=d;else if(!Li(d,r))break;const u=hD(c);(o===null||u<o.fragCount)&&(o={move:l,fragCount:u})}return o}function rw(e){const{isFromHeader:t,fromLeft:s,xPosition:i,fromEnter:n,fakeEvent:o,pinned:r,gos:a,colModel:l,colMoves:c,visibleCols:d}=e;let{allMovingColumns:u}=e;t&&(u=cD(u));const h=u.slice();lD(l.getCols(),h);const g=gD({movingCols:h,draggingRight:s,xPosition:i,pinned:r,gos:a,colModel:l,visibleCols:d}),m=uD(h,l);if(g.length===0)return;const v=g[0];if(m!==null&&(t||!n)&&!o&&(!s&&v>=m||s&&v<=m))return;const w=dD(g,h,c,d);if(!w)return;const b=w.move;if(!(b>l.getCols().length-h.length))return{columns:h,toIndex:b}}function aw(e){const{columns:t,toIndex:s}=rw(e)||{},{finished:i,colMoves:n}=e;return!t||s==null?null:(n.moveColumns(t,s,"uiColumnMoved",i),i?null:{columns:t,toIndex:s})}function uD(e,t){const s=t.getCols(),i=e.map(l=>s.indexOf(l)).sort((l,c)=>l-c),n=i[0];return $e(i)-n!==i.length-1?null:n}function hD(e){function t(i){const n=[];let o=i.getOriginalParent();for(;o!=null;)n.push(o),o=o.getOriginalParent();return n}let s=0;for(let i=0;i<e.length-1;i++){let n=t(e[i]),o=t(e[i+1]);[n,o]=n.length>o.length?[n,o]:[o,n];for(const r of n)o.indexOf(r)===-1&&s++}return s}function pD(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function gD(e){const{movingCols:t,draggingRight:s,xPosition:i,pinned:n,gos:o,colModel:r,visibleCols:a}=e;if(o.get("suppressMovableColumns")||t.some(x=>x.getColDef().suppressMovable))return[];const c=pD(a,n),d=r.getCols(),u=c.filter(x=>t.includes(x)),h=c.filter(x=>!t.includes(x)),g=d.filter(x=>!t.includes(x));let m=0,v=i;if(s){let x=0;for(const y of u)x+=y.getActualWidth();v-=x}if(v>0){for(let x=0;x<h.length;x++){const y=h[x];if(v-=y.getActualWidth(),v<0)break;m++}s&&m++}let C;if(m>0){const x=h[m-1];C=g.indexOf(x)+1}else C=g.indexOf(h[0]),C===-1&&(C=0);const w=[C],b=(x,y)=>x-y;if(s){let x=C+1;const y=d.length-1;for(;x<=y;)w.push(x),x++;w.sort(b)}else{let x=C;const y=d.length-1;let S=d[x];for(;x<=y&&c.indexOf(S)<0;)x++,w.push(x),S=d[x];x=C-1;const F=0;for(;x>=F;)w.push(x),x--;w.sort(b).reverse()}return w}function _u(e){const{pinned:t,fromKeyboard:s,gos:i,ctrlsSvc:n,useHeaderRow:o,skipScrollPadding:r}=e;let a=n.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(s&&(l-=a.getBoundingClientRect().left),i.get("enableRtl")&&(o&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=n.get("center").getCenterViewportScrollLeft()),l):0}function $d(e,t){for(const s of e)s.moving=t,s.dispatchColEvent("movingChanged","uiColumnMoved")}var bf=7,Uu=100,el=Uu/2,fD=5,mD=100,vD=class extends B{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!se(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:s}=t||{},i=s?.columns??[];for(const n of i){const o=n.getPinned();if(n.getColDef().lockPinned){if(o==e)return"move";continue}const r=s?.containerType;if(r===e||!e)return"move";if(e&&(!o||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 n=t.visibleState,o=(s||[]).filter(r=>n[r.getId()]&&!r.isVisible());this.setColumnsVisible(o,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(s,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,s=!1,i=!1){const{gos:n,ctrlsSvc:o}=this.beans,r=n.get("suppressMoveWhenColumnDragging");if(i&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&st(e.hDirection))return;const a=_u({x:e.x,pinned:this.pinned,gos:n,ctrlsSvc:o});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,s,a,i):this.handleColumnDragWhileAllowingMovement(e,t,s,a,i)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,s){if(!e?.length)return;const i=e.filter(n=>!n.getColDef().lockVisible);i.length&&this.beans.colModel.setColsVisible(i,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,i,n){const o=this.getAllMovingColumns(e,!0);if(n){const r=this.isAttemptingToPin(o);r&&this.attemptToPinColumns(o,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(o,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:o,xPosition:l,fromEnter:t,fakeEvent:s,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(o,i)}}handleColumnDragWhileAllowingMovement(e,t,s,i,n){const o=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:o,isFromHeader:a,xPosition:i,fromLeft:r,fromEnter:t,fakeEvent:s}),c=aw({...l,finished:n});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){const s=e.dragSource.getDragItem();let i=null;t?(i=s.columnsInSplit,i||(i=s.columns)):i=s.columns;const n=o=>o.getColDef().lockPinned?o.getPinned()==this.pinned:!0;return i?i.filter(n):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:s,xPosition:i,fromLeft:n,fromEnter:o,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:s,fromLeft:n,xPosition:i,pinned:this.pinned,fromEnter:o,fakeEvent:r,gos:a,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){const{gos:s,colModel:i}=this.beans,n=s.get("enableRtl"),o=i.getCols().filter(d=>d.isVisible()&&d.getPinned()===this.pinned);let r=null,a=null,l=null;for(const d of o){if(a=d.getActualWidth(),r=this.getNormalisedColumnLeft(d,0,n),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=o.length-1;d>=0;d--){const u=o[d],h=o[d].getParent();if(!h){l=u;break}const g=h?.getDisplayedLeafColumns();if(g.length){l=$e(g);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,n),a=l.getActualWidth()}if(l==null||r==null||a==null){this.lastHighlightedColumn?.column!==l&&this.clearHighlighted();return}let c;if(t-r<a/2){const d=o.indexOf(l);d===0?c=0:(c=1,l=o[d-1])}else c=1;(this.lastHighlightedColumn?.column!==l||this.lastHighlightedColumn?.position!==c)&&this.clearHighlighted(),xf(l,c),this.lastHighlightedColumn={column:l,position:c}}getNormalisedXPositionInfo(e,t){const{gos:s,visibleCols:i}=this.beans,n=s.get("enableRtl"),{firstMovingCol:o,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,n);if(!o||!r||a==null)return;const l=i.allCols,c=l.indexOf(o),d=l.indexOf(r),u=a===0,h=c<d||c===d&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),d+g===c)return;const m=l[d+g];if(!m)return;const v=this.getNormalisedColumnLeft(m,20,n);return{fromLeft:h,xPosition:v}}getColumnMoveAndTargetInfo(e,t,s){const i=this.lastHighlightedColumn||{},{firstMovingCol:n,lastMovingCol:o}=CD(e);if(!n||!o||i.column||!t)return{firstMovingCol:n,...i};const a=this.getPinDirection()==="left";return{firstMovingCol:n,position:a?1:0,column:a!==s?n:o}}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:i,ctrlsSvc:n}=this.beans,o=e.getLeft();if(o==null)return null;const r=e.getActualWidth();return _u({x:s?o+r-t:o+t,pinned:e.getPinned(),useHeaderRow:s,skipScrollPadding:!0,gos:i,ctrlsSvc:n})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,s=this.failedMoveAttempts>bf;return t&&s||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:s,fromEnter:i,fakeEvent:n,fromLeft:o}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:s,fromLeft:o,fromEnter:i,fakeEvent:n}),{columns:a,toIndex:l}=rw(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(xf(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),s=t.getCenterViewportScrollLeft(),i=s+t.getCenterWidth();let n,o;this.gos.get("enableRtl")?(n=e<s+el,o=e>i-el):(o=e<s+el,n=e>i-el),this.needToMoveRight=n,this.needToMoveLeft=o,o||n?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),mD),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*fD,e>Uu&&(e=Uu);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:i,dragAndDrop:n,gos:o}=this.beans;if(this.failedMoveAttempts<=bf+1||!i)return;if(n.setDragImageCompIcon("pinned"),!o.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 i=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!i.length)return 0;s&&(t=this.getPinDirection());const{pinnedCols:n,dragAndDrop:o}=this.beans;return n?.setColsPinned(i,t,"uiColumnDragged"),s&&o.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function xf(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function CD(e){const t=e.length;let s,i;for(let n=0;n<t;n++){if(!s){const o=e[n];o.getLeft()!=null&&(s=o)}if(!i){const o=e[t-1-n];o.getLeft()!=null&&(i=o)}if(s&&i)break}return{firstMovingCol:s,lastMovingCol:i}}var wD=class extends B{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,s=this.pinned;e.whenReady(this,i=>{let n;const o=i.gridBodyCtrl.eBodyViewport;switch(s){case"left":n=[[o,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":n=[[o,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:n=[[o,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=n}),this.moveColumnFeature=this.createManagedBean(new vD(s)),this.bodyDropPivotTarget=this.createManagedBean(new aD(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()}};function lw(e,t){const s=[],i=[],n=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?n.push(r):a==="left"||a===!0?s.push(r):i.push(r)}),t.get("enableRtl")?[...n,...i,...s]:[...s,...i,...n]}function cw(e,t){let s=!0;return Js(null,t,i=>{if(!Dt(i))return;const n=i;if(!n.getColGroupDef()?.marryChildren)return;const a=[];for(const h of n.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=n.getLeafColumns().length-1;d>u&&(s=!1)}),s}var bD=class extends B{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,s){const i=this.beans.colModel.getCols();if(!i)return;const n=i[e];this.moveColumns([n],t,s)}moveColumns(e,t,s,i=!0){const{colModel:n,colAnimation:o,visibleCols:r,eventSvc:a}=this.beans,l=n.getCols();if(!l)return;if(t>l.length-e.length){q(30,{toIndex:t});return}o?.start();const c=n.getColsForKeys(e);this.doesMovePassRules(c,t)&&(Hg(n.getCols(),c,t),r.refresh(s),a.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,toIndex:t,finished:i,source:s})),o?.finish()}doesMovePassRules(e,t){const s=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(s)}doesOrderPassRules(e){const{colModel:t,gos:s}=this.beans;return!(!cw(e,t.getColTree())||!(n=>{const o=c=>c?c==="left"||c===!0?-1:1:0,r=s.get("enableRtl");let a=r?1:-1,l=!0;for(const c of n){const d=o(c.getColDef().lockPosition);r?d>a&&(l=!1):d<a&&(l=!1),a=d}return l})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return Hg(i,e,t),i}createBodyDropTarget(e,t){return new wD(e,t)}moveHeader(e,t,s,i,n){const{ctrlsSvc:o,gos:r,colModel:a,visibleCols:l,focusSvc:c}=this.beans,d=t.getBoundingClientRect(),u=d.left,h=at(s),g=h?d.width:s.getActualWidth(),m=e==="left"!==r.get("enableRtl"),v=_u({x:m?u-20:u+g+20,pinned:i,fromKeyboard:!0,gos:r,ctrlsSvc:o}),C=c.focusedHeader;aw({allMovingColumns:h?s.getLeafColumns():[s],isFromHeader:!0,fromLeft:e==="right",xPosition:v,pinned:i,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let w;if(h){const b=s.getDisplayedLeafColumns();w=m?b[0]:$e(b)}else w=s;if(o.getScrollFeature().ensureColumnVisible(w,"auto"),(!n.isAlive()||r.get("ensureDomOrder"))&&C){let b;if(h){const x=s.getGroupId(),y=s.getLeafColumns();if(!y.length)return;const S=y[0].getParent();if(!S)return;b=xD(S,x)}else b=s;b&&c.focusHeaderPosition({headerPosition:{...C,column:b}})}}setDragSourceForHeader(e,t,s){const{gos:i,colModel:n,dragAndDrop:o,visibleCols:r}=this.beans;let a=!i.get("suppressDragLeaveHidesColumns");const l=at(t),c=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>SD(t,r.allCols):()=>yD(t),dragItemName:s,onDragStarted:()=>{a=!i.get("suppressDragLeaveHidesColumns"),$d(c,!0)},onDragStopped:()=>$d(c,!1),onDragCancelled:()=>$d(c,!1),onGridEnter:h=>{if(a){const{columns:g=[],visibleState:m}=h??{},v=l?w=>!m||m[w.getColId()]:()=>!0,C=g.filter(w=>!w.getColDef().lockVisible&&v(w));n.setColsVisible(C,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const g=h?.columns?.filter(m=>!m.getColDef().lockVisible)||[];n.setColsVisible(g,!1,"uiColumnMoved")}}};return o.addDragSource(u,!0),u}};function xD(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function yD(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function SD(e,t){const s=e.getProvidedColumnGroup().getLeafColumns(),i={};for(const a of s)i[a.getId()]=a.isVisible();const n=[];for(const a of t)s.indexOf(a)>=0&&(n.push(a),Bs(s,a));for(const a of s)n.push(a);const o=[],r=e.getLeafColumns();for(const a of n)r.indexOf(a)!==-1&&o.push(a);return{columns:n,columnsInSplit:o,visibleState:i,containerType:o[0]?.pinned}}var RD={moduleName:"ColumnMove",version:Q,beans:[bD,nD],apiFunctions:{moveColumnByIndex:oD,moveColumns:rD},dependsOn:[ow],css:[iD]},FD=class extends B{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 i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(s),this.getPreferredWidthForElements(i)}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 i=this.centerRowContainerCtrl.eContainer;for(const o of e)this.cloneItemIntoDummy(o,s);i.appendChild(s);const n=Math.ceil(s.getBoundingClientRect().width);return s.remove(),t=t??this.gos.get("autoSizePadding"),n+t}getHeaderCellForColumn(e){let t=null;for(const s of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const i=s.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}return t}cloneItemIntoDummy(e,t){const s=e.cloneNode(!0);s.style.width="",s.style.position="static",s.style.left="";const i=document.createElement("div"),n=i.classList;["ag-header-cell","ag-header-group-cell"].some(a=>s.classList.contains(a))?(n.add("ag-header","ag-header-row"),i.style.position="static"):n.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"&&n.add(c)}break}r=r.parentElement}i.appendChild(s),t.appendChild(i)}},dw={moduleName:"AutoWidth",version:Q,beans:[FD]};function ED(e,t,s=!0,i="api"){e.colResize?.setColumnWidths(t,!1,s,i)}function uw(e,t){if(!e||e.length==0)return;const s=t(e[0]);for(let i=1;i<e.length;i++)if(s!==t(e[i]))return;return s}function hw(e,t,s){if(!t.length)return;const i=t.length===1?t[0]:null,n=uw(t,o=>o.getPinned());e.dispatchEvent({type:"columnPinned",pinned:n??null,columns:t,column:i,source:s})}function DD(e,t,s){if(!t.length)return;const i=t.length===1?t[0]:null,n=uw(t,o=>o.isVisible());e.dispatchEvent({type:"columnVisible",visible:n,columns:t,column:i,source:s})}function PD(e,t,s,i){e.dispatchEvent({type:t,columns:s,column:s&&s.length==1?s[0]:null,source:i})}function Po(e,t,s,i,n=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:n,finished:s,source:i})}var TD=class extends B{constructor(e,t,s,i){super(),this.comp=e,this.eResize=t,this.pinned=s,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:s}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&s&&this.addDestroyFunc(s.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:s,resizeRatios:i,groupAfterColumns:n,groupAfterStartWidth:o,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=s,this.resizeRatios=i,this.resizeTakeFromCols=n,this.resizeTakeFromStartWidth=o,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,s="uiColumnResized"){const i=this.normaliseDragChange(t),n=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(n,s,e)}getInitialValues(e){const t=l=>l.reduce((c,d)=>c+d.getActualWidth(),0),s=(l,c)=>l.map(d=>d.getActualWidth()/c),i=this.getColumnsToResize(),n=t(i),o=s(i,n),r={columnsToResize:i,resizeStartWidth:n,resizeRatios:o};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 i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,s)}resizeColumns(e,t,s,i=!0){const{columnsToResize:n,resizeStartWidth:o,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];if(d.push({columns:n,ratios:r,width:t}),a){const u=t-o;d.push({columns:a,ratios:c,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:d,finished:i,source:s}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},kD=class extends B{constructor(e,t,s,i,n){super(),this.pinned=e,this.column=t,this.eResize=s,this.comp=i,this.ctrl=n}postConstruct(){const e=[];let t,s;const i=()=>{if(Ke(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))},n=()=>{for(const r of e)r();e.length=0},o=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==s)&&(t=r,s=a,n(),i())};o(),this.addDestroyFunc(n),this.ctrl.setRefreshFunction("resize",o)}onResizing(e,t){const{column:s,lastResizeAmount:i,resizeStartWidth:n,beans:o}=this,r=this.normaliseResizeAmount(t),a=n+r,l=[{key:s,newWidth:a}],{pinnedCols:c,ctrlsSvc:d,colResize:u}=o;if(this.column.getPinned()){const h=c?.leftWidth??0,g=c?.rightWidth??0,m=Wr(d.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-i)>m)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",i=this.pinned==="right";return this.gos.get("enableRtl")?s&&(t*=-1):i&&(t*=-1),t}},ID=class extends B{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,s,i){const n=[],{colModel:o,gos:r,visibleCols:a}=this.beans;for(const l of e){const c=o.getColDefCol(l.key)||o.getCol(l.key);if(!c)continue;if(n.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;n.push({width:g,ratios:[1],columns:[u]})}}n.length!==0&&this.resizeColumnSets({resizeSets:n,finished:s,source:i})}resizeColumnSets(e){const{resizeSets:t,finished:s,source:i}=e;if(!(!t||t.every(d=>MD(d)))){if(s){const d=t&&t.length>0?t[0].columns:null;Po(this.eventSvc,d,s,i)}return}const o=[],r=[];for(const d of t){const{width:u,columns:h,ratios:g}=d,m={},v={};for(const b of h)r.push(b);let C=!0,w=0;for(;C;){if(w++,w>1e3){je(31);break}C=!1;const b=[];let x=0,y=u;h.forEach((F,R)=>{if(v[F.getId()])y-=m[F.getId()];else{b.push(F);const D=g[R];x+=D}});const S=1/x;b.forEach((F,R)=>{const E=R===b.length-1;let D;E?D=y:(D=Math.round(g[R]*u*S),y-=D);const T=F.getMinWidth(),P=F.getMaxWidth();D<T?(D=T,v[F.getId()]=!0,C=!0):P>0&&D>P&&(D=P,v[F.getId()]=!0,C=!0),m[F.getId()]=D})}for(const b of h){const x=m[b.getId()];b.getActualWidth()!==x&&(b.setActualWidth(x,i),o.push(b))}}const a=o.length>0;let l=[];if(a){const{colFlex:d,visibleCols:u,colViewport:h}=this.beans;l=d?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(i),u.updateBodyWidths(),h.checkViewportColumns()}const c=r.concat(l);(a||s)&&Po(this.eventSvc,c,s,i,l)}resizeHeader(e,t,s){if(!e.isResizable())return;const i=e.getActualWidth(),n=e.getMinWidth(),o=e.getMaxWidth(),r=Math.min(Math.max(i+t,n),o);this.setColumnWidths([{key:e,newWidth:r}],s,!0,"uiColumnResized")}createResizeFeature(e,t,s,i,n){return new kD(e,t,s,i,n)}createGroupResizeFeature(e,t,s,i){return new TD(e,t,s,i)}};function MD(e){const{columns:t,width:s}=e;let i=0,n=0,o=!0;for(const l of t){const c=l.getMinWidth();i+=c||0;const d=l.getMaxWidth();d>0?n+=d:o=!1}const r=s>=i,a=!o||s<=n;return r&&a}var AD={moduleName:"ColumnResize",version:Q,beans:[ID],apiFunctions:{setColumnWidths:ED},dependsOn:[sD,dw]},LD=class extends B{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)}},OD=class extends ap{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,s,i,n){const{column:o,beans:r}=this,{context:a,colNames:l,colHover:c,rangeSvc:d,colResize:u}=r;this.comp=e,n=oa(this,a,n),this.setGui(t,n),this.displayName=l.getDisplayNameForColumnGroup(o,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(n),this.setupExpandable(n),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:i,compBean:n}),this.setupUserComp(),this.addHeaderMouseListeners(n,i),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=o.getProvidedColumnGroup().getLeafColumns();c?.createHoverFeature(n,g,t),d?.createRangeHighlightFeature(n,o,e),n.createManagedBean(new rp(o,t,r)),n.createManagedBean(new LD(e,o)),u?this.resizeFeature=n.createManagedBean(u.createGroupResizeFeature(e,s,h,o)):e.setResizableDisplayed(!1),n.createManagedBean(new ia(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(n,g),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),n.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(n),n.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.getDefinition();return xe(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,i=$e(t)===e;if(!s&&!i)return;const n=e.getHighlighted(),o=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let r=!1,a=!1;if(o){const l=this.beans.gos.get("enableRtl"),c=n===1,d=n===0;s&&(l?a=c:r=d),i&&(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 i=s.getInitialValues(t);s.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:s,enterpriseMenuFactory:i}=this.beans,n=this.column,o=n.getProvidedColumnGroup(),r=xe(s,{displayName:this.displayName,columnGroup:n,setExpanded:l=>{e.setColumnGroupOpened(o,l,"gridInitializing")},setTooltip:(l,c)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>i?.showMenuAfterButtonClick(o,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>i?.showMenuAfterMouseEvent(o,l,"columnMenu",c),eGridHeader:this.eGui}),a=R3(t,r);a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e,t){const{column:s,comp:i,beans:{rangeSvc:n},gos:o}=this,r=d=>this.handleMouseOverChange(d.type==="mouseenter"),a=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",s.getProvidedColumnGroup()),l=d=>this.handleContextMenuMouseEvent(d,void 0,s.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:r,mouseleave:r,click:a,contextmenu:l}),i.toggleCss("ag-header-group-cell-selectable",fo(o));const c=n?.createHeaderGroupCellMouseListenerFeature(this.column,t);c&&this.createManagedBean(c)}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=BC(t,this.gos,null,e);e.isPadding()?(s.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(n=>n.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 i of s)this.comp.toggleCss(i,!0)}setupMovingCss(e){const{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),n=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const o of i)e.addManagedListeners(o,{movingChanged:n});n()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;const{column:s,expandable:i,gos:n,beans:o}=this,r=fo(n);if(e.key==O.ENTER){if(r&&!e.altKey)o.rangeSvc?.handleColumnSelection(s,e);else if(i){const a=!s.isExpanded();o.colGroupSvc.setColumnGroupOpened(s.getProvidedColumnGroup(),a,"uiColumnExpanded")}}}refreshAnnouncement(){let e;const{gos:t}=this;fo(t)&&(e=this.getLocaleTextFunc()("ariaColumnGroupCellSelection","Press Enter to toggle selection for all visible cells in this column group")),this.ariaAnnouncement=e}announceAriaDescription(){const{beans:e,eGui:t,ariaAnnouncement:s}=this;!s||!t.contains(et(e))||e.ariaAnnounce?.announceValue(s,"columnHeader")}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 ND(e,t,s){e.colGroupSvc?.setColumnGroupOpened(t,s,"api")}function HD(e,t,s){return e.colGroupSvc?.getColumnGroup(t,s)??null}function GD(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function BD(e,t,s){return e.colNames.getDisplayNameForColumnGroup(t,s)||""}function VD(e){return e.colGroupSvc?.getColumnGroupState()??[]}function zD(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function WD(e){e.colGroupSvc?.resetColumnGroupState("api")}function jD(e){return e.visibleCols.treeLeft}function _D(e){return e.visibleCols.treeCenter}function UD(e){return e.visibleCols.treeRight}function $D(e){return e.visibleCols.getAllTrees()}var pw=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let s;return typeof t!="number"?s=0:s=t+1,this.existingIds[e]=s,s}};function qD(e,t){for(let s=0;s<t.length;s++){const i=e.indexOf(t[s]);i>=0&&(e[i]=e[e.length-1],e.pop())}}var KD=class extends B{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:i,colGroupSvc:n,colViewport:o,selectionColSvc:r}=this.beans;t||this.buildTrees(i,n),n?.updateOpenClosedVisibility(),this.leftCols=qd(this.treeLeft),this.centerCols=qd(this.treeCenter),this.rightCols=qd(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(i),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),s?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(i,this.leftCols,this.rightCols,e),o.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let s=t.getParent();for(;s;){if(!s.isPadding()){const i=s.getProvidedColumnGroup().getLevel()+1;i>e&&(e=i);break}s=s.getParent()}}return e}updateBodyWidths(){const e=Zs(this.centerCols),t=Zs(this.leftCols),s=Zs(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,i){let n,o;this.gos.get("enableRtl")?(n=t?t[0]:null,o=s?$e(s):null):(n=t?$e(t):null,o=s?s[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===n,i),r.setFirstRightPinned(r===o,i)}buildTrees(e,t){const s=e.getColsToShow(),i=s.filter(l=>l.getPinned()=="left"),n=s.filter(l=>l.getPinned()=="right"),o=s.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new pw,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:i,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:n,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:o,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),s=[],i=[],n=[];for(const o of t){const r=o.getPinned();r?r===!0||r==="left"?s.push(o):n.push(o):i.push(o)}this.ariaOrderColumns=s.concat(i).concat(n)}getAriaColIndex(e){let t;return at(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)at(t)&&t.checkLeft()}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const i=t.getCols().slice(0),n=this.gos.get("enableRtl");for(const o of[this.leftCols,this.rightCols,this.centerCols]){if(n){let r=Zs(o);for(const a of o)r-=a.getActualWidth(),a.setLeft(r,e)}else{let r=0;for(const a of o)a.setLeft(r,e),r+=a.getActualWidth()}qD(i,o)}for(const o of i)o.setLeft(null,e)}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel: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,i){const n=[];let o=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&&(n.length===0&&o&&i&&i(a)&&n.push(o),n.push(a)),o=a}return n}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};un(this.treeCenter,!1,e),un(this.treeLeft,!1,e),un(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 i=this[t[s]];if(i.length)return e?$e(i):i[0]}return null}getColAfter(e){const t=this.allCols,s=t.indexOf(e);return s<t.length-1?t[s+1]:null}getColsLeftWidth(){return Zs(this.leftCols)}getDisplayedColumnsRightWidth(){return Zs(this.rightCols)}isColAtEdge(e,t){const s=this.allCols;if(!s.length)return!1;const i=t==="first";let n;if(at(e)){const o=e.getDisplayedLeafColumns();if(!o.length)return!1;n=i?o[0]:$e(o)}else n=e;return(i?s[0]:$e(s))===n}};function un(e,t,s){if(e)for(let i=0;i<e.length;i++){const n=e[i];if(at(n)){const o=t?n.getDisplayedChildren():n.getChildren();un(o,t,s)}s(n)}}function qd(e){const t=[];return un(e,!0,s=>{Ti(s)&&t.push(s)}),t}var YD=class extends B{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Js(null,t,s=>{Dt(s)&&e.push({groupId:s.getGroupId(),open:s.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const s=[];Js(null,t,i=>{if(Dt(i)){const n=i.getColGroupDef(),o={groupId:i.getGroupId(),open:n?n.openByDefault:void 0};s.push(o)}}),this.setColumnGroupState(s,e)}setColumnGroupState(e,t){const{colModel:s,colAnimation:i,visibleCols:n,eventSvc:o}=this.beans;if(!s.getColTree().length)return;i?.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))}n.refresh(t,!0),a.length&&o.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),i?.finish()}setColumnGroupOpened(e,t,s){let i;Dt(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],s)}getProvidedColGroup(e){let t=null;return Js(null,this.beans.colModel.getColTree(),s=>{Dt(s)&&s.getId()===e&&(t=s)}),t}getGroupAtDirection(e,t){const s=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),n=t==="After"?$e(i):i[0],o=`getCol${t}`;for(;;){const r=this.beans.visibleCols[o](n);if(!r)return null;const a=this.getColGroupAtLevel(r,s);if(a!==e)return a}}getColGroupAtLevel(e,t){let s=e.getParent(),i,n;for(;i=s.getProvidedColumnGroup().getLevel(),n=s.getPaddingLevel(),!(i+n<=t);)s=s.getParent();return s}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();un(e,!1,t=>{at(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(at(e))return e;const s=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let n=null;return un(s,!1,o=>{if(at(o)){const r=o;let a;i?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(n=r)}}),n}createColumnGroups(e){const{columns:t,idCreator:s,pinned:i,oldDisplayedGroups:n,isStandaloneStructure:o}=e,r=this.mapOldGroupsById(n),a=[];let l=t;for(;l.length;){const c=l;l=[];let d=0;const u=h=>{const g=d;d=h;const m=c[g],C=(at(m)?m.getProvidedColumnGroup():m).getOriginalParent();if(C==null){for(let b=g;b<h;b++)a.push(c[b]);return}const w=this.createColumnGroup(C,s,r,i,o);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],v=(at(g)?g.getProvidedColumnGroup():g).getOriginalParent(),C=c[d],b=(at(C)?C.getProvidedColumnGroup():C).getOriginalParent();v!==b&&u(h)}d<c.length&&u(c.length)}return o||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,s,i,n,o,r){const a=n.getUniqueKey(t.groupId||null,null),l=$g(this.beans,t,a),c=new ml(l,a,!1,s);this.createBean(c);const d=this.findExistingGroup(t,o);d&&o.splice(d.idx,1);const u=d?.group;u&&c.setExpanded(u.isExpanded());const h=gC(this.beans,l.children,s+1,e,i,n,o,r);return c.setChildren(h),c}balanceColumnTree(e,t,s,i){const n=[];for(let o=0;o<e.length;o++){const r=e[o];if(Dt(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,s,i);a.setChildren(l),n.push(a)}else{let a,l;for(let c=t;c<s;c++){const d=i.getUniqueKey(null,null),u=$g(this.beans,null,d),h=new ml(u,d,!0,c);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(n.push(a),e.some(d=>Dt(d))){l.setChildren([r]);continue}else{l.setChildren(e);break}n.push(r)}}return n}findDepth(e){let t=0,s=e;for(;s?.[0]&&Dt(s[0]);)t++,s=s[0].getChildren();return t}findMaxDepth(e,t){let s=t;for(let i=0;i<e.length;i++){const n=e[i];if(Dt(n)){const o=n,r=this.findMaxDepth(o.getChildren(),t+1);s<r&&(s=r)}}return s}balanceTreeForAutoCols(e,t){const s=[];for(const i of e){let n=i;for(let o=t-1;o>=0;o--){const r=new ml(null,`FAKE_PATH_${i.getId()}_${o}`,!0,o);this.createBean(r),r.setChildren([n]),n.originalParent=r,n=r}t===0&&(i.originalParent=null),s.push(n)}return s}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i<t.length;i++){const n=t[i];if(n.getColGroupDef()&&n.getId()===e.groupId)return{idx:i,group:n}}}createColumnGroup(e,t,s,i,n){const o=e.getGroupId(),r=t.getInstanceIdForKey(o),a=CC(o,r);let l=s[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),se(l)?l.reset():(l=new qr(e,o,r,i),n||this.createBean(l)),l}mapOldGroupsById(e){const t={},s=i=>{for(const n of i)if(at(n)){const o=n;t[n.getUniqueId()]=o,s(o.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,at(s)){const i=s;this.setupParentsIntoCols(i.getChildren(),i)}}},ZD={moduleName:"ColumnGroup",version:Q,dynamicBeans:{headerGroupCellCtrl:OD},beans:[YD],apiFunctions:{getAllDisplayedColumnGroups:$D,getCenterDisplayedColumnGroups:_D,getColumnGroup:HD,getColumnGroupState:VD,getDisplayNameForColumnGroup:BD,getLeftDisplayedColumnGroups:jD,getProvidedColumnGroup:GD,getRightDisplayedColumnGroups:UD,resetColumnGroupState:WD,setColumnGroupOpened:ND,setColumnGroupState:zD}};function bs(e,t,s){const{colModel:i,rowGroupColsSvc:n,pivotColsSvc:o,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:u,valueColsSvc:h,eventSvc:g,gos:m}=e,v=i.getColDefCols()??[],C=a?.getColumns();if(!v.length&&!C?.length)return!1;if(t?.state&&!t.state.forEach)return q(32),!1;const w=(S,F,R,E,D)=>{if(!S)return;const T=KR(F,t.defaultState),P=T("flex").value1,k=T("sort").value1,A=T("sortType").value1,U=Fi(k)||Uh(A),I=ii(A),H=bc(k),W=U?{type:I,direction:H}:void 0;if(fC(e,S,T("hide").value1,W,T("sortIndex").value1,T("pinned").value1,P,s),P==null){const V=T("width").value1;if(V!=null){const Z=S.getColDef().minWidth??u.getDefaultColumnMinWidth();Z!=null&&V>=Z&&S.setActualWidth(V,s)}}D||!S.isPrimary()||(h?.syncColumnWithState(S,s,T),n?.syncColumnWithState(S,s,T,R),o?.syncColumnWithState(S,s,T,E))},b=(S,F,R)=>{const E=gw(e,s),D=F.slice(),T={},P={},k=[],A=[],U=[];let I=0;const H=n?.columns.slice()??[],W=o?.columns.slice()??[];for(const L of S){const M=L.colId;if(M.startsWith(xi)){k.push(L),U.push(L);continue}if(Oi(M)){A.push(L),U.push(L);continue}const K=R(M);K?(w(K,L,T,P,!1),Bs(D,K)):(U.push(L),I+=1)}const V=L=>w(L,null,T,P,!1);D.forEach(V),n?.sortColumns(yf.bind(n,T,H)),o?.sortColumns(yf.bind(o,P,W)),i.refreshCols(!1,s);const Z=(L,M,z=[])=>{for(const K of M){const ie=L(K.colId);Bs(z,ie),w(ie,K,null,null,!0)}z.forEach(V)};return Z(L=>r?.getColumn(L)??null,k,r?.getColumns()?.slice()),Z(L=>a?.getColumn(L)??null,A,a?.getColumns()?.slice()),QD(t,i,m),c.refresh(s),g.dispatchEvent({type:"columnEverythingChanged",source:s}),E(),{unmatchedAndAutoStates:U,unmatchedCount:I}};l?.start();let{unmatchedAndAutoStates:x,unmatchedCount:y}=b(t.state||[],v,S=>i.getColDefCol(S));if(x.length>0||se(t.defaultState)){const S=d?.getPivotResultCols()?.list??[];y=b(x,S,F=>d?.getPivotResultCol(F)??null).unmatchedCount}return l?.finish(),y===0}function XD(e,t){const{colModel:s,autoColSvc:i,selectionColSvc:n,eventSvc:o,gos:r}=e,a=s.getColDefCols();if(!a?.length)return;const l=s.getColDefColTree(),c=mC(l),d=[];let u=1e3,h=1e3;const g=b=>{const x=fw(b);st(x.rowGroupIndex)&&x.rowGroup&&(x.rowGroupIndex=u++),st(x.pivotIndex)&&x.pivot&&(x.pivotIndex=h++),d.push(x)};i?.getColumns()?.forEach(g),n?.getColumns()?.forEach(g),c?.forEach(g),bs(e,{state:d},t);const m=i?.getColumns()??[],w=[...n?.getColumns()??[],...m,...a].map(b=>({colId:b.colId}));bs(e,{state:w,applyOrder:!0},t),o.dispatchEvent(xe(r,{type:"columnsReset",source:t}))}function gw(e,t){const{rowGroupColsSvc:s,pivotColsSvc:i,valueColsSvc:n,colModel:o,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:s?.columns.slice()??[],pivotColumns:i?.columns.slice()??[],valueColumns:n?.columns.slice()??[]},c=Kl(e),d={};for(const u of c)d[u.colId]=u;return()=>{const u=(F,R,E,D)=>{const T=R.map(D),P=E.map(D);if(Li(T,P))return;const A=new Set(R);for(const I of E)A.delete(I)||A.add(I);const U=[...A];a.dispatchEvent({type:F,columns:U,column:U.length===1?U[0]:null,source:t})},h=F=>{const R=[];return o.forAllCols(E=>{const D=d[E.getColId()];D&&F(D,E)&&R.push(E)}),R},g=F=>F.getColId();u("columnRowGroupChanged",l.rowGroupColumns,s?.columns??[],g),u("columnPivotChanged",l.pivotColumns,i?.columns??[],g);const v=h((F,R)=>{const E=F.aggFunc!=null,D=E!=R.isValueActive(),T=E&&F.aggFunc!=R.getAggFunc();return D||T});v.length>0&&PD(a,"columnValueChanged",v,t),Po(a,h((F,R)=>F.width!=R.getActualWidth()),!0,t),hw(a,h((F,R)=>F.pinned!=R.getPinned()),t),DD(a,h((F,R)=>F.hide==R.isVisible()),t);const y=h((F,R)=>!fl(R.getSortDef(),{type:ii(F.sortType),direction:bc(F.sort)})||F.sortIndex!=R.getSortIndex());y.length>0&&r?.dispatchSortChangedEvents(t,y);const S=Kl(e);e5(c,S,t,o,a)}}function Kl(e){const{colModel:t,rowGroupColsSvc:s,pivotColsSvc:i}=e,n=t.getColDefCols();if(st(n)||!t.isAlive())return[];const o=s?.columns,r=i?.columns,a=[],l=d=>{const u=d.isRowGroupActive()&&o?o.indexOf(d):null,h=d.isPivotActive()&&r?r.indexOf(d):null,g=d.isValueActive()?d.getAggFunc():null,m=d.getSortIndex()!=null?d.getSortIndex():null;a.push({colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:d.getSort(),sortType:d.getSortDef()?.type,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 fw(e){const t=(C,w)=>C??w??null,s=e.getColDef(),i=ls(t(s.sort,s.initialSort)),n=i.direction,o=i.type,r=t(s.sortIndex,s.initialSortIndex),a=t(s.hide,s.initialHide),l=t(s.pinned,s.initialPinned),c=t(s.width,s.initialWidth),d=t(s.flex,s.initialFlex);let u=t(s.rowGroupIndex,s.initialRowGroupIndex),h=t(s.rowGroup,s.initialRowGroup);u==null&&!h&&(u=null,h=null);let g=t(s.pivotIndex,s.initialPivotIndex),m=t(s.pivot,s.initialPivot);g==null&&!m&&(g=null,m=null);const v=t(s.aggFunc,s.initialAggFunc);return{colId:e.getColId(),sort:n,sortType:o,sortIndex:r,hide:a,pinned:l,width:c,flex:d,rowGroup:h,rowGroupIndex:u,pivot:m,pivotIndex:g,aggFunc:v}}function QD(e,t,s){if(!e.applyOrder||!e.state)return;const i=[];for(const n of e.state)n.colId!=null&&i.push(n.colId);JD(t.cols,i,t,s)}function JD(e,t,s,i){if(e==null)return;let n=[];const o={};for(const a of t){if(o[a])continue;const l=e.map[a];l&&(n.push(l),o[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(o[l]!=null)continue;l.startsWith(xi)?n.splice(r++,0,a):n.push(a)}if(n=lw(n,i),!cw(n,s.getColTree())){q(39);return}e.list=n}function e5(e,t,s,i,n){const o={};for(const d of t)o[d.colId]=d;const r={};for(const d of e)o[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=i.getCol(h.colId);g&&c.push(g)}}),c.length&&n.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:s})}var yf=(e,t,s,i)=>{const n=e[s.getId()],o=e[i.getId()],r=n!=null,a=o!=null;if(r&&a)return n-o;if(r)return-1;if(a)return 1;const l=t.indexOf(s),c=t.indexOf(i),d=l>=0,u=c>=0;return d&&u?l-c:d?-1:1},t5=class extends B{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","groupHideColumnsUntilExpanded","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(vo(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),vo(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:s,colAutosize:i,rowGroupColsSvc:n,pivotColsSvc:o,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?gw(t,e):void 0;s?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=HR(t,this.colDefs,!0,h,e);Vl(t,this.colDefCols?.tree,g.columnTree);const m=g.columnTree,v=g.treeDepth,C=mC(m),w={};for(const b of C)w[b.getId()]=b;this.colDefCols={tree:m,treeDepth:v,list:C,map:w},this.createColumnsForService([c],this.colDefCols,e),n?.extractCols(e,u),o?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,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"&&i?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const s=this.cols?.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:n,rowNumbersSvc:o,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:d,colViewport:u,eventSvc:h,formula:g}=this.beans,m=this.selectCols(a,this.colDefCols);g?.setFormulasActive(m),this.createColumnsForService([i,n,o],m,t);const v=uR(this.gos,this.showingPivotResult);(!e||v)&&this.restoreColOrder(m),this.positionLockedCols(m),l?.refresh(),r?.refreshCols(),this.setColSpanActive(),c?.setAutoHeightActive(m),d.clear(),u.clear(),Li(s,this.cols.tree)||h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,s){for(const i of e)i&&(i.createColumns(t,n=>{this.lastOrder=n(this.lastOrder),this.lastPivotOrder=n(this.lastPivotOrder)},s),i.addColumns(t))}selectCols(e,t){const s=e?.getPivotResultCols()??null;this.showingPivotResult=s!=null;const{map:i,list:n,tree:o,treeDepth:r}=s??t;return this.cols={list:n.slice(),map:{...i},tree:o.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{beans:e,showingPivotResult:t,cols:s}=this,{valueColsSvc:i,selectionColSvc:n,gos:o}=e,r=this.isPivotMode()&&!t,a=n?.isSelectionColumnEnabled(),l=hR(e),c=i?.columns,d=fR(o);return s.list.filter(h=>{const g=Kh(h);return r?c?.includes(h)||g&&(!d||h.isVisible())||a&&Oi(h)||l&&At(h):g&&!d||h.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,s){bs(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.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 i=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:i(h):!1};if(!s.some(u=>i(u))){const u=new Set(s);for(const h of e.list)u.has(h)||s.push(h);e.list=s;return}const n=new Map;for(let u=0;u<s.length;u++){const h=s[u];n.set(h,u)}const o=e.list.filter(u=>!n.has(u));if(o.length===0){e.list=s;return}const r=(u,h)=>{const g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let m=null,v=null;for(const C of g.getChildren())if(!(C===h||C===u)){if(C instanceof kn){const w=n.get(C);if(w==null)continue;(m==null||m<w)&&(m=w,v=C);continue}C.forEachLeafColumn(w=>{const b=n.get(w);b!=null&&(m==null||m<b)&&(m=b,v=w)})}return v??r(u,g)},a=[],l=new Map;for(const u of o){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 m=g.length-1;m>=0;m--){const v=g[m];c[d--]=v}else c[d--]=g;c[d--]=h}e.list=c}positionLockedCols(e){e.list=lw(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:i}=this.beans;s.refresh(t),i.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=vo(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){Vl(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:i,groupHierarchyColSvc:n}=this.beans;dr(this.colDefCols?.list,e)||dr(s?.columns?.list,e)||dr(i?.columns?.list,e)||dr(n?.columns?.list,e)||dr(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:i}=t;if(typeof e=="string"&&s[e])return s[e];for(let a=0;a<i.length;a++)if(Pr(i[a],e))return i[a];const{autoColSvc:n,selectionColSvc:o,groupHierarchyColSvc:r}=this.beans;return n?.getColumn(e)??o?.getColumn(e)??r?.getColumn(e)??null}},s5=".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)}:where(.ag-label-align-right){.ag-label,.ag-wrapper{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column}:where(.ag-label-align-top){.ag-label,.ag-wrapper{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)}",i5=class extends Ho{constructor(e,t,s){super(t,s),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(s5)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:s,labelAlignment:i,disabled:n,labelEllipsis:o}=this.config;n!=null&&this.setDisabled(n),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),s!=null&&this.setLabelWidth(s),o!=null&&this.setLabelEllipsis(o),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;Wt(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Ke(t,!1),fn(t,"presentation")):(Ke(t,!0),fn(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:(Ml(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return zr(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},mw=class extends i5{constructor(e,t,s,i){super(e,t,s),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:s,ariaLabel:i}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),s!=null&&this.onValueChange(s),i!=null&&this.setAriaLabel(i),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==""||p2(e)!==null?Vr(e,""):Vr(e,t??"")}setAriaLabel(e){return Ro(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 Os(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 n5(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 en=class extends mw{constructor(e,t,s="text",i="input"){super(e,e?.template??n5(i),[],t),this.inputType=s,this.displayFieldTag=i,this.eLabel=ue,this.eWrapper=ue,this.eInput=ue}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:s,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),s.classList.add(`${i}-input`),this.addCss("ag-input-field"),s.id=s.id||`ag-${this.getCompId()}-input`;const{inputName:n,inputWidth:o,inputPlaceholder:r,autoComplete:a,tabIndex:l}=this.config;n!=null&&this.setInputName(n),o!=null&&this.setInputWidth(o),r!=null&&this.setInputPlaceholder(r),a!=null&&this.setAutoComplete(a),this.addInputListeners(),this.activateTabIndex([s],l)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Bt(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return Ml(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 Bt(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Ro(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return zr(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Bt(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Bt(this.eInput,"autocomplete",t)}return this}},dp=class extends en{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,name:s}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t),s!=null&&this.setName(s)}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 i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),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)}},up={selector:"AG-CHECKBOX",component:dp},o5=".ag-checkbox-cell{height:100%}",r5={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},a5=class extends ot{constructor(){super(r5,[up]),this.eCheckbox=ue,this.registerCSS(o5)}init(e){this.refresh(e);const{eCheckbox:t,beans:s}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),Iv(i,"polite"),this.addManagedListeners(i,{click:n=>{if(bn(n),t.isDisabled())return;const o=t.getValue();this.onCheckboxChanged(o)},dblclick:n=>{bn(n)}}),this.addManagedElementListeners(e.eGridCell,{keydown:n=>{if(n.key===O.SPACE&&!t.isDisabled()){e.eGridCell===et(s)&&t.toggle();const o=t.getValue();this.onCheckboxChanged(o),n.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,s=!0;const{value:i,column:n,node:o}=e;if(o.group&&n)if(typeof i=="boolean")t=i;else{const u=n.getColId();u.startsWith(xi)?t=i==null||i===""?void 0:i==="true":o.aggData&&o.aggData[u]!==void 0||o.sourceRowIndex>=0?t=i??void 0:s=!1}else t=i??void 0;const{eCheckbox:r}=this;if(!s){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!n?.isCellEditable(o);r.setDisabled(a);const l=this.getLocaleTextFunc(),c=Cc(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:i,value:n}=t,{editSvc:o}=this.beans;if(!s)return;const r={rowNode:i,column:s};o?.dispatchCellEvent(r,null,"cellEditingStarted",{value:n});const a=i.setDataValue(s,e,"ui");o?.dispatchCellEvent(r,null,"cellEditingStopped",{oldValue:n,newValue:e,valueChanged:a}),a||this.updateCheckbox(t)}},l5={tag:"div",cls:"ag-skeleton-container"},c5=class extends ot{constructor(){super(l5)}init(t){const s=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",s),this.addDestroyFunc(()=>Vr(t.eParentOfValue)),Vr(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");Ro(this.getGui(),s)}setupLoading(t){const s=Qt({tag:"div",cls:"ag-skeleton-effect"}),i=t.node.rowIndex;if(i!=null){const r=75+25*(i%2===0?Math.sin(i):Math.cos(i));s.style.width=`${r}%`}this.getGui().appendChild(s);const n=this.getLocaleTextFunc(),o=t.deferRender?n("ariaDeferSkeletonCellLoading","Cell is loading"):n("ariaSkeletonCellLoading","Row data is loading");Ro(this.getGui(),o)}refresh(t){return!1}},d5={moduleName:"CheckboxCellRenderer",version:Q,userComponents:{agCheckboxCellRenderer:a5}},u5={moduleName:"SkeletonCellRenderer",version:Q,userComponents:{agSkeletonCellRenderer:c5}};function h5(e,t){const s=e.colModel.getColDefCol(t);return s?s.getColDef():null}function p5(e){return e.colModel.getColumnDefs(!0)}function g5(e,t,s){return e.colNames.getDisplayNameForColumn(t,s)||""}function f5(e,t){return e.colModel.getColDefCol(t)}function m5(e){return e.colModel.getColDefCols()}function v5(e,t){return bs(e,t,"api")}function C5(e){return Kl(e)}function w5(e){XD(e,"api")}function b5(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function x5(e){return e.visibleCols.isPinningLeft()}function y5(e){return e.visibleCols.isPinningRight()}function S5(e,t){return e.visibleCols.getColAfter(t)}function R5(e,t){return e.visibleCols.getColBefore(t)}function F5(e,t,s){e.colModel.setColsVisible(t,s,"api")}function E5(e,t,s){e.pinnedCols?.setColsPinned(t,s,"api")}function D5(e){return e.colModel.getCols()}function P5(e){return e.visibleCols.leftCols}function T5(e){return e.visibleCols.centerCols}function k5(e){return e.visibleCols.rightCols}function I5(e){return e.visibleCols.allCols}function M5(e){return e.colViewport.getViewportColumns()}function $u(e,t){if(!e)return;const s=e,i={};for(const n of Object.keys(s)){if(t&&t.indexOf(n)>=0||jv.has(n))continue;const o=s[n];typeof o=="object"&&o!==null&&o.constructor===Object?i[n]=$u(o):i[n]=o}return i}var A5=class extends B{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,s,i,n=!1){const o=e.slice();t?o.sort((l,c)=>s.indexOf(l)-s.indexOf(c)):(s||n)&&o.sort((l,c)=>i.indexOf(l)-i.indexOf(c));const r=this.rowGroupColsSvc?.columns,a=this.pivotColsSvc?.columns;return this.buildColumnDefs(o,r,a)}buildColumnDefs(e,t=[],s=[]){const i=[],n={};for(const o of e){const r=this.createDefFromColumn(o,t,s);let a=!0,l=r,c=o.getOriginalParent(),d=null;for(;c;){let u=null;if(c.isPadding()){c=c.getOriginalParent();continue}const h=n[c.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(c),u&&(u.children=[l],n[u.groupId]=u,l=u,c=c.getOriginalParent()),c!=null&&d===c){a=!1;break}d=c}a&&i.push(l)}return i}createDefFromGroup(e){const t=$u(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,s){const i=$u(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?s.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=e.isVisible()?void 0:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSortDef(),i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},L5=class extends B{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:i,colDelayRenderSvc:n}=this.beans,o=i.centerCols;let r=-1;if(e.resizingCols){const v=new Set(e.resizingCols);for(let C=o.length-1;C>=0;C--)if(v.has(o[C])){r=C;break}}let a=!1;const l=o.map((v,C)=>{const w=v.getFlex(),b=w!=null&&w>0&&C>r;return a||(a=b),{col:v,isFlex:b,flex:Math.max(0,w??0),initialSize:v.getActualWidth(),min:v.getMinWidth(),max:v.getMaxWidth(),targetSize:0}});if(a?(n?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(n),!s||!a)return[];let c=l.length,d=l.reduce((v,C)=>v+C.flex,0),u=s;const h=(v,C)=>{v.frozenSize=C,v.col.setActualWidth(C,t),u-=C,d-=v.flex,c-=1},g=v=>v.frozenSize!=null;for(const v of l)v.isFlex||h(v,v.initialSize);for(;c>0;){const v=Math.round(d<1?u*d:u);let C,w=0,b=0;for(const S of l){if(g(S))continue;C=S,b+=v*(S.flex/d);const F=b-w,R=Math.round(F);S.targetSize=R,w+=R}C&&(C.targetSize+=v-w);let x=0;for(const S of l){if(g(S))continue;const F=S.targetSize,R=Math.min(Math.max(F,S.min),S.max);x+=R-F,S.violationType=R===F?void 0:R<F?"max":"min",S.targetSize=R}const y=x===0?"all":x>0?"min":"max";for(const S of l)g(S)||(y==="all"||S.violationType===y)&&h(S,S.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const m=l.filter(v=>v.isFlex&&!v.violationType).map(v=>v.col);if(e.fireResizedEvent){const v=l.filter(w=>w.initialSize!==w.frozenSize).map(w=>w.col),C=l.filter(w=>w.flex).map(w=>w.col);Po(this.eventSvc,v,!0,t,C)}return this.revealColumns(n),m}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")}},jt=e=>{if(typeof e=="bigint")return e;let t;if(typeof e=="number")t=e;else if(typeof e=="string"&&(t=e.trim(),t===""||(t.endsWith("n")&&(t=t.slice(0,-1)),!/^[+-]?\d+$/.test(t))))return null;if(t==null)return null;try{return BigInt(t)}catch{return null}},hp="T",O5=new RegExp(`[${hp} ]`),N5=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${hp}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Ms(e,t){return e.toString().padStart(t,"0")}function Lt(e,t=!0,s=hp){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(n=>Ms(n,2)).join("-");return t&&(i+=s+[e.getHours(),e.getMinutes(),e.getSeconds()].map(n=>Ms(n,2)).join(":")),i}function tl(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Ms(e.getDate(),2),Ms(e.getHours(),2),`:${Ms(e.getMinutes(),2)}`,`:${Ms(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Ms(e.getDate(),2)].map(String):null}var Kd=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"},Sf=["January","February","March","April","May","June","July","August","September","October","November","December"],Yd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function H5(e,t){if(t==null)return Lt(e,!1);const s=Ms(e.getFullYear(),4),i={YYYY:()=>s.slice(s.length-4,s.length),YY:()=>s.slice(s.length-2,s.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>Sf[e.getMonth()],MMM:()=>Sf[e.getMonth()].slice(0,3),MM:()=>Ms(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Kd(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Kd(e.getDate())}`,DD:()=>Ms(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>Yd[e.getDay()],ddd:()=>Yd[e.getDay()].slice(0,3),dd:()=>Yd[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Kd(e.getDay())}`,d:()=>`${e.getDay()}`},n=new RegExp(Object.keys(i).join("|"),"g");return t.replace(n,o=>o in i?i[o]():o)}function bl(e,t=!1){return!!Nt(e,t)}function G5(e){return bl(e,!0)}function Nt(e,t=!1,s){if(!e||!s&&!N5.test(e))return null;const[i,n]=e.split(O5);if(!i)return null;const o=i.split("-").map(g=>Number.parseInt(g,10));if(o.filter(g=>!isNaN(g)).length!==3)return null;const[r,a,l]=o,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!n&&t)return null;if(!n||n==="00:00:00")return c;const[d,u,h]=n.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 kr(e,t,s){if(!t||!e)return;if(!s)return e[t];const i=t.split(".");let n=e;for(let o=0;o<i.length;o++){if(n==null)return;n=n[i[o]]}return n}var B5=["dateTimeString","dateString","text","number","bigint","boolean","date"],V5=class extends B{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},bigint({filterModuleBean:e}){return e?{cellEditor:"agTextCellEditor"}:{cellEditor:"agTextCellEditor",comparator:{default:_5,absolute:U5}}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:({node:e,event:t,column:s})=>t.key===O.SPACE&&s.isCellEditable(e)}},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:(i,n)=>{const o=t.getColDefCol(s),r=o?.getColDef();if(!o||!r)return 0;const a=i==null?"":e({column:o,node:null,value:i}),l=n==null?"":e({column:o,node:null,value:n});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={},i=d=>u=>{const{column:h,node:g,value:m}=u;let v=h.getColDef().valueFormatter;return v===d.groupSafeValueFormatter&&(v=d.valueFormatter),this.beans.valueSvc.formatValue(h,g,m,v)};for(const d of Object.keys(e)){const u=e[d],h={...u,groupSafeValueFormatter:Ef(u,this.gos)};t[d]=h,s[d]=i(h)}const n=this.gos.get("dataTypeDefinitions")??{},o={};for(const d of Object.keys(n)){const u=n[d],h=this.processDataTypeDefinition(u,n,[d],e);h&&(t[d]=h,u.dataTypeMatcher&&(o[d]=u.dataTypeMatcher),s[d]=i(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(o,e)}sortKeysInMatchers(e,t){const s={...e};for(const i of B5)delete s[i],s[i]=e[i]??t[i].dataTypeMatcher;return s}processDataTypeDefinition(e,t,s,i){let n;const o=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=i[o];const a=t[o];if(r&&a&&(r=a),!Ff(e,r,o))return;n=Rf(r,e)}else{if(s.includes(o)){q(44);return}const r=t[o];if(!Ff(e,r,o))return;const a=this.processDataTypeDefinition(r,t,[...s,o],i);if(!a)return;n=Rf(a,e)}return{...n,groupSafeValueFormatter:Ef(n,this.gos)}}updateColDefAndGetColumnType(e,t,s){let{cellDataType:i}=t;i===void 0&&(i=e.cellDataType);const{field:n}=t;if((i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(n,s):!1),this.addFormulaCellEditorToColDef(e,t),!i){e.cellDataType=!1;return}const o=this.dataTypeDefinitions[i];if(!o){q(47,{cellDataType:i});return}return e.cellDataType=i,o.groupSafeValueFormatter&&(e.valueFormatter=o.groupSafeValueFormatter),o.valueParser&&(e.valueParser=o.valueParser),o.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,o,s),o.columnTypes}addFormulaCellEditorToColDef(e,t){!(t.allowFormula??e.allowFormula)||t.cellEditor||(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const s=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",s),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",s))}canInferCellDataType(e,t){const{gos:s}=this;if(!it(s))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Zd(t,i))return!1;const n=t.type===null?e.type:t.type;if(n){const o=s.get("columnTypes")??{};if(zl(n).some(a=>{const l=o[a.trim()];return l&&Zd(l,i)}))return!1}return!Zd(e,i)}inferCellDataType(e,t){if(!e)return;let s;const i=this.getInitialData();if(i){const o=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");s=kr(i,e,o)}else this.initWaitForRowData(t);return s==null?void 0:Object.keys(this.dataTypeMatchers).find(o=>this.dataTypeMatchers[o](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:i}=this.beans;t&&s&&(s.shouldQueueResizeOperations=!0);const[n]=this.addManagedEventListeners({rowDataUpdateStarted:o=>{const{firstRowData:r}=o;r&&(n?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&s?.processResizeOperations(),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const s=[];this.destroyColumnStateUpdateListeners();const i={},n={};for(const o of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[o],a=this.colModel.getCol(o);if(!a)continue;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))continue;const c=a.getColDef();if(t&&c.type&&c.type!==l.type){const d=$5(a,r);d.rowGroup&&d.rowGroupIndex==null&&(i[o]=d),d.pivot&&d.pivotIndex==null&&(n[o]=d),s.push(d)}}t&&s.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,n)),s.length&&bs(this.beans,{state:s},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const s={},{rowGroupColsSvc:i,pivotColsSvc:n}=this.beans;return i?.restoreColumnOrder(s,e),n?.restoreColumnOrder(s,t),Object.values(s)}resetColDefIntoCol(e,t){const s=e.getUserProvidedColDef();if(!s)return!1;const i=Ou(this.beans,s,e.getColId());return e.setColDef(i,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||e.getColDef().allowFormula&&this.beans.formula?.isFormula(t)?!0:s(t)}validateColDef(e,t,s,i){if(e.cellDataType==="object"){const n=l=>l?.cellDataType==null||l?.cellDataType===!0,o=n(t)&&n(s),r=l=>q(48,{property:l,inferred:o,colId:i}),{object:a}=this.dataTypeDefinitions;e.valueFormatter===a.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&r("Formatter"),e.editable&&e.valueParser===a.valueParser&&!this.hasObjectValueParser&&r("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:s,beans:i,formatValueFuncs:n}=this,o=s[t];o&&i.colFilter?.setColDefPropsForDataType(e,o,n[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,s,i){const n=this.formatValueFuncs[t],o=this.columnDefinitionPropsPerDataType[s.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:s,colId:i,formatValue:n,filterModuleBean:this.beans.filterManager});e.cellEditor==="agFormulaCellEditor"&&o.cellEditor!==e.cellEditor&&(o.cellEditor=e.cellEditor),Object.assign(e,o)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),s=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:i=>Nt(i.newValue&&String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):Lt(i.value,s)??"",dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:s=>Nt(s)??void 0,dateFormatter:s=>Lt(s??null,t)??void 0,valueParser:s=>bl(String(s.newValue))?s.newValue:null,valueFormatter:s=>bl(String(s.value))?String(s.value):"",dataTypeMatcher:s=>typeof s=="string"&&bl(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"},bigint:{baseDataType:"bigint",valueParser:t=>{const{newValue:s}=t;return s==null||typeof s=="string"&&s.trim()===""?null:jt(s)},valueFormatter:t=>t.value==null?"":typeof t.value!="bigint"?e("invalidBigInt","Invalid BigInt"):String(t.value),dataTypeMatcher:t=>typeof t=="bigint"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:Du(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"&&G5(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>Du(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 Rf(e,t){const s={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(s.columnTypes=[...zl(e.columnTypes),...zl(t.columnTypes)]),s}function Ff(e,t,s){return t?t.baseDataType!==e.baseDataType?(q(46),!1):!0:(q(45,{parentCellDataType:s}),!1)}var z5=e=>typeof e=="bigint"||typeof e=="number",W5=e=>e==="number"||e==="bigint";function Ef(e,t){if(e.valueFormatter)return s=>{const{node:i,colDef:n,column:o,value:r}=s;if(i?.group){const a=(n.pivotValueColumn??o).getAggFunc();if(a){if(a==="first"||a==="last")return e.valueFormatter(s);const{baseDataType:l}=e;if(W5(l)&&a!=="count"){if(z5(r))return e.valueFormatter(s);if(r==null)return;if(typeof r=="object"){if(typeof r.toNumber=="function")return e.valueFormatter({...s,value:r.toNumber()});if("value"in r)return e.valueFormatter({...s,value:r.value})}}return}}else if(t.get("groupHideOpenParents")&&s.column.isRowGroupActive()&&typeof s.value=="string"&&!e.dataTypeMatcher?.(s.value))return;return e.valueFormatter(s)}}function j5(e,t,s,i){if(!t[s])return!1;const n=e[s];return n===null?(t[s]=!1,!1):i===void 0?!!n:n===i}function _5(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const s=jt(e),i=jt(t);return s!=null&&i!=null?s===i?0:s>i?1:-1:0}function U5(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const s=Df(e),i=Df(t);return s!=null&&i!=null?s===i?0:s>i?1:-1:0}function Df(e){const t=jt(e);return t==null?null:t<0n?-t:t}function Zd(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([s,i])=>j5(e,t,s,i))}function $5(e,t){const s=fw(e);for(const i of t)delete s[i],i==="rowGroup"?delete s.rowGroupIndex:i==="pivot"&&delete s.pivotIndex;return s}var q5={moduleName:"DataType",version:Q,beans:[V5],dependsOn:[d5]},K5={moduleName:"ColumnFlex",version:Q,beans:[L5]},vw={moduleName:"ColumnApi",version:Q,beans:[A5],apiFunctions:{getColumnDef:h5,getDisplayNameForColumn:g5,getColumn:f5,getColumns:m5,applyColumnState:v5,getColumnState:C5,resetColumnState:w5,isPinning:b5,isPinningLeft:x5,isPinningRight:y5,getDisplayedColAfter:S5,getDisplayedColBefore:R5,setColumnsVisible:F5,setColumnsPinned:E5,getAllGridColumns:D5,getDisplayedLeftColumns:P5,getDisplayedCenterColumns:T5,getDisplayedRightColumns:k5,getAllDisplayedColumns:I5,getAllDisplayedVirtualColumns:M5,getColumnDefs:p5}},Y5=class extends B{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,s=!1){if(!e)return null;const i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:n}=this.beans;return s&&n?n.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,s){const i=t?.getColGroupDef();return i?this.getHeaderName(i,null,e,t,s):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,s,i,n){const o=e.headerValueGetter;if(o){const r=xe(this.gos,{colDef:e,column:t,columnGroup:s,providedColumnGroup:i,location:n});return typeof o=="function"?o(r):typeof o=="string"?this.beans.expressionSvc?.evaluate(o,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return c2(e.field)}return""}},Z5=class extends B{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")}getScrollPosition(){return this.scrollPosition}setScrollPosition(e,t,s=!1){const{visibleCols:i}=this,n=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!n)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=i.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(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()||X5(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,s=t+e.getActualWidth(),i=this.viewportLeft-200,n=this.viewportRight+200,o=t<i&&s<i,r=t>n&&s>n;return!o&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=o=>{const r=o.getLeft();return se(r)&&r>this.viewportLeft},s=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,n=i.centerCols;return i.getColsForRow(e,n,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=i=>{const n=new Set,o={};for(const r of i){let a=r.getParent();const l=r.isSpanHeaderHeight();for(;a&&!n.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const d=a.getProvidedColumnGroup().getLevel();o[d]??(o[d]=[]),o[d].push(a),n.add(a),a=a.getParent()}}return o};this.rowsOfHeadersToRenderLeft=s(e),this.rowsOfHeadersToRenderRight=s(t),this.rowsOfHeadersToRenderCenter=s(this.headerColsWithinViewport)}extractViewport(){const e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),s=this.colsWithinViewportHash!==t;return s&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),s}};function X5(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var Q5=class extends B{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class s{refresh(){return!1}getGui(){return this.eGui}init(n){const o=t(n),r=typeof o;if(r==="string"||r==="number"||r==="boolean"){this.eGui=Hh("<span>"+o+"</span>");return}if(o==null){this.eGui=Qt({tag:"span"});return}this.eGui=o}}return s}},J5={moduleName:"CellRendererFunction",version:Q,beans:[Q5]},eP=class extends Ht{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 i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new i(...s)}};function tP(e){return typeof e=="object"&&!!e.getComp}var sP=class extends eP{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:i,selectors:n}=e;if(s){const o=(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(tP(a)&&(a=a.getComp(this.beans)),typeof a=="object"){const{classImp:l,params:c,processParams:d}=a;o(r,l,c,d)}else o(r,a)}}this.registerDynamicBeans(i);for(const o of n??[])this.selectors[o.selector]=o;if(t)for(const o of Object.keys(t))this.icons[o]=t[o]}getUserComponent(e,t){const s=(a,l,c,d)=>({componentFromFramework:l,component:a,params:c,processParams:d}),{frameworkOverrides:i}=this.beans,n=i.frameworkComponent(t,this.gos.get("components"));if(n!=null)return s(n,!0);const o=this.jsComps[t];if(o){const a=i.isFrameworkComponent(o);return s(o,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?Ns(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??Ns(256)}},iP=23,nP=class extends B{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===iP&&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}},oP=':where([class^=ag-]),:where([class^=ag-]):after,:where([class^=ag-]):before{box-sizing:border-box}:where([class^=ag-]):where(button){color:inherit}:where([class^=ag-]):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([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block}.ag-measurement-element-border:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}.ag-popup-child{top:0;z-index:5}.ag-popup-child: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);font-weight:var(--ag-font-weight);--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 .ag-icon,[disabled] .ag-icon{opacity:.5}.ag-icon-grip.ag-disabled,.ag-icon-grip[disabled]{opacity:.35}.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-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}}.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}',pp=typeof window!="object"||!window?.document?.fonts?.forEach,Cw=!1,xn=(e,t,s,i,n,o,r=!1)=>{if(pp||Cw)return;let a=e;i&&(a=`@layer ${CSS.escape(i).replaceAll("\\.",".")} { ${e} }`);let l=As.map.get(t);if(l||(l=[],As.map.set(t,l)),l.some(h=>h.injectedCss===a))return;const c=document.createElement("style");o&&c.setAttribute("nonce",o),c.dataset.agCss=s,c.dataset.agCssVersion=Q,c.textContent=a;const d={rawCss:e,injectedCss:a,el:c,priority:n,isParams:r};let u;for(const h of l){if(h.priority>n)break;u=h}if(u){u.el.after(c);const h=l.indexOf(u);l.splice(h+1,0,d)}else t.nodeName==="STYLE"?t.after(c):t.insertBefore(c,t.querySelector(":not(title, meta)")),l.push(d)},ww=(e,t,s,i)=>{xn(oP,e,"shared",t,0,s),i?.forEach((n,o)=>n.forEach(r=>xn(r,e,o,t,0,s)))},rP=(e,t,s,i,n,o)=>{if(pp||Cw)return;const r=As.grids.get(e);r?r.paramsCss=t:As.grids.set(e,{styleContainer:i,paramsCss:t}),qu(i),t&&s&&xn(t,i,s,n,2,o,!0)},aP=e=>{const t=As.grids.get(e)?.styleContainer;if(!t)return;As.grids.delete(e),Array.from(As.grids.values()).some(i=>i.styleContainer===t)?qu(t):(qu(t,!0),As.map.delete(t))},qu=(e,t=!1)=>{const s=new Set;for(const n of As.grids.values())n.styleContainer===e&&s.add(n.paramsCss);const i=As.map.get(e)??[];for(let n=i.length-1;n>=0;n--)(t||i[n].isParams&&!s.has(i[n].rawCss))&&(i[n].el.remove(),i.splice(n,1))},bw=()=>{const e=globalThis.agStyleInjectionVersions??(globalThis.agStyleInjectionVersions=new Map);let t=e.get(Q);return t||(t={map:new WeakMap,grids:new Map,paramsId:0},e.set(Q,t)),t},As=bw(),Pt=e=>new xw(e),Ci="$default",lP=0,xw=class{constructor({feature:e,params:t,modeParams:s={},css:i,cssImports:n}){this.feature=e,this.css=i,this.cssImports=n,this.modeParams={[Ci]:{...s[Ci]??{},...t??{}},...s}}use(e,t,s){let i=this._inject;if(i==null){let{css:n}=this;if(n){const o=`ag-theme-${this.feature??"part"}-${++lP}`;typeof n=="function"&&(n=n()),n=`:where(.${o}) {
9
9
  ${n}
@@ -65,7 +65,7 @@ See ${iC(e,t)}`;return Array.isArray(i)?i.concat(o):[i,o]}var uk={1:"Charting Ag
65
65
  `,TI=class extends PI{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,Jf),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((s,i)=>{i!==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,i){s!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,s){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue({column:e,node:s,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(q(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Jf),this.isFirstLine=!1}},kI=class extends EI{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){q(51);return}const t=()=>{const i=this.getMergedParams(e),n=this.getData(i),o=new Blob(["\uFEFF",n],{type:"text/plain"}),r=i.fileName,a=typeof r=="function"?r(xe(this.gos,{})):r;DI(this.getFileName(a),o)},{overlays:s}=this.beans;s?s.showExportOverlay(t):t()}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:i,valueSvc:n,gos:o}=this.beans,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u,valueFrom:h}=e;return new TI({colModel:t,colNames:s,valueSvc:n,gos:o,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||",",rowGroupColsSvc:i,valueFrom:h})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function II(e,t){return e.csvCreator?.getDataAsCsv(t)}function MI(e,t){e.csvCreator?.exportDataAsCsv(t)}var AI={moduleName:"CsvExport",version:Q,beans:[kI],apiFunctions:{getDataAsCsv:II,exportDataAsCsv:MI},dependsOn:[FI]},a1=class extends Ht{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const s="title",i=this.ctrl.getGui();i&&(e!=null&&(e!=""||t)?i.setAttribute(s,e):i.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()}},LI=1e3,OI=1e3,em=100,tm,sl=!1,NI=class extends Ht{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 this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}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()),!cn()&&(sl?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},em):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(),i=this.tooltipComp?.getGui();this.isInteractingWithTooltip||s.contains(t)||this.interactionEnabled&&i?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||sl)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-tm<LI}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(!se(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 i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(s,i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),tm=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 i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const n=this.getLocaleTextFunc(),o=this.popupSvc?.addPopup({eChild:i,ariaLabel:n("ariaLabelTooltip","Tooltip")});if(o&&(this.tooltipPopupDestroyFunc=o.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(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Ct(this.beans),{keydown:r=>{i.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=et(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?OI: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(){sl=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},em)}unlockService(){sl=!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()}},HI=class extends a1{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()}},GI=class extends Jh{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,s=this.getGui();s.textContent=Oo(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();s.classList.add(`ag-${i}-tooltip`)}},BI=".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),&:where(.ag-cell-formula-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}}",il=0,VI=200,zI=class extends Ht{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:s,nudgeY:i,skipObserver:n}=e;this.positionPopup({ePopup:t,nudgeX:s,nudgeY:i,keepWithinBounds:!0,skipObserver:n,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,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:i,keepWithinBounds:n,eventSource:o,alignSide:r="left",position:a="over",type:l}=e,c=o.getBoundingClientRect(),d=this.getParentRect();this.setAlignedTo(o,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-(i||0)*2-d.top),{x:h,y:g}};this.positionPopup({ePopup:t,nudgeX:s,nudgeY:i,keepWithinBounds:n,updatePosition:u,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,o,null)})}positionPopupForMenu(e){const{eventSource:t,ePopup:s,event:i}=e,n=t.getBoundingClientRect(),o=this.getParentRect();this.setAlignedTo(t,s);let r=!1;const a=()=>{const l=this.keepXYWithinBounds(s,n.top-o.top,0),c=s.clientWidth>0?s.clientWidth:200;r||(s.style.minWidth=`${c}px`,r=!0);const u=o.right-o.left-c;let h;return this.gos.get("enableRtl")?(h=m(),h<0&&(h=g(),this.setAlignedStyles(s,"left")),h>u&&(h=0,this.setAlignedStyles(s,"right"))):(h=g(),h>u&&(h=m(),this.setAlignedStyles(s,"right")),h<0&&(h=0,this.setAlignedStyles(s,"left"))),{x:h,y:l};function g(){return n.right-o.left-2}function m(){return n.left-o.left-c}};this.positionPopup({ePopup:s,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",s,t,i instanceof MouseEvent?i:void 0)})}shouldRenderUnderOrAbove(e,t,s,i){const n=s.bottom-t.bottom,o=t.top-s.top,r=e.offsetHeight+i;return n>r?"under":o>r||o>n?"above":"under"}setAlignedStyles(e,t){const s=this.getPopupIndex(e);if(s===-1)return;const i=this.popupList[s],{alignedToElement:n}=i;if(!n)return;const o=["right","left","over","above","under"];for(const r of o)n.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`);t&&(n.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 i=this.popupList[s];i.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:s,nudgeX:i,nudgeY:n,skipObserver:o,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,i&&(d+=i),n&&(u+=n),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(),!o){const c=ri(this.beans,t,()=>l(!0));setTimeout(()=>c(),VI)}}getParentRect(){const e=Ct(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Hv(t)}keepXYWithinBounds(e,t,s){const i=s===0,n=i?"clientHeight":"clientWidth",o=i?"top":"left",r=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=Ct(this.beans),c=l.documentElement,d=this.getPopupParent(),u=e.getBoundingClientRect(),h=d.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),m=d===l.body,v=Math.ceil(u[r]);let w=m?(i?Nv:Tl)(c)+c[a]:d[n];m&&(w-=Math.abs(g[o]-h[o]));const b=w-v;return Math.min(Math.max(t,0),Math.max(b,0))}addPopup(e){const{eChild:t,ariaLabel:s,ariaOwns:i,alwaysOnTop:n,positionCallback:o,anchorToElement:r}=e,a=this.getPopupIndex(t);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!n,s,i),c=this.addEventListenersToPopup({...e,wrapperEl:l});return o&&o(),this.addPopupToPopupList(t,l,c,r),{hideFunc:c}}initialisePopupPosition(e){const s=this.getPopupParent().getBoundingClientRect();se(e.style.top)||(e.style.top=`${s.top*-1}px`),se(e.style.left)||(e.style.left=`${s.left*-1}px`)}createPopupWrapper(e,t,s,i){const n=this.getPopupParent(),{environment:o,gos:r}=this.beans,a=mn({tag:"div"});return o.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||fn(e,"dialog"),s?Ro(e,s):i&&(e.id||(e.id=`popup-component-${il}`),Bg(i,e.id)),a.appendChild(e),n.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,s=Ct(t),{wrapperEl:i,eChild:n,closedCallback:o,afterGuiAttached:r,closeOnEsc:a,modal:l,ariaOwns:c}=e;let d=!1;const u=v=>{if(!i.contains(et(t)))return;v.key===O.ESCAPE&&!this.isStopPropagation(v)&&m({keyboardEvent:v})},h=v=>m({mouseEvent:v}),g=v=>m({touchEvent:v}),m=(v={})=>{const{mouseEvent:C,touchEvent:w,keyboardEvent:b,forceHide:x}=v;!x&&(this.isEventFromCurrentPopup({mouseEvent:C,touchEvent:w},n)||d)||(d=!0,i.remove(),s.removeEventListener("keydown",u),s.removeEventListener("mousedown",h),s.removeEventListener("touchstart",g),s.removeEventListener("contextmenu",h),this.eventSvc.removeListener("dragStarted",h),o&&o(C||w||b),this.removePopupFromPopupList(n,c))};return r&&r({hidePopup:m}),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),m}addPopupToPopupList(e,t,s,i){this.popupList.push({element:e,wrapper:t,hideFunc:s,instanceId:il,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),il=il+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const s=this.getPopupIndex(e);if(s===-1)return;const i=this.popupList[s];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(o=>o&&o()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const n=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=n,i.isAnchored=!0,n}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&Bg(t,null),this.popupList=this.popupList.filter(s=>s.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),s=t.getBoundingClientRect(),{element:i,ePopup:n}=e,o=i.getBoundingClientRect(),r=u=>Number.parseInt(u.substring(0,u.length-1),10),a=(u,h)=>{const g=s[u]-o[u],m=r(n.style[u]);return{initialDiff:g,lastDiff:g,initial:m,last:m,direction:h}},l=a("top",0),c=a("left",1),d=this.beans.frameworkOverrides;return new Oe(u=>{d.wrapIncoming(()=>{s3(()=>{const h=t.getBoundingClientRect(),g=i.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const v=(C,w)=>{const b=r(n.style[w]);C.last!==b&&(C.initial=b,C.last=b);const x=h[w]-g[w];if(x!=C.lastDiff){const y=this.keepXYWithinBounds(n,C.initial+C.initialDiff-x,C.direction);n.style[w]=`${y}px`,C.last=y}C.lastDiff=x};v(l,"top"),v(c,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:s,touchEvent:i}=e,n=s||i;if(!n)return!1;const o=this.getPopupIndex(t);if(o===-1)return!1;for(let r=o;r<this.popupList.length;r++){const a=this.popupList[r];if(A2(a.element,n))return!0}return this.isElementWithinCustomPopup(n.target)}isElementWithinCustomPopup(e){const t=Ct(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")),i=s.length,n=this.getWrapper(e);if(!n||i<=1||!t.contains(e))return;const o=[],r=[];for(const h of s)h!==n&&(h.classList.contains("ag-always-on-top")?r.push(h):o.push(h));const a=[],l=r.length,u=n.classList.contains("ag-always-on-top")||!l?[...o,...r,n]:[...o,n,...r];for(let h=0;h<=i;h++){const g=u[h];if(s[h]===u[h]||g===n)continue;const m=g.querySelectorAll("div");for(const v of m)v.scrollTop!==0&&a.push([v,v.scrollTop]);h===0?t.prepend(g):u[h-1].after(g)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const s of this.popupList)t.applyThemeClasses(s.wrapper)}}},WI=class extends zI{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,s,i,n){const o=this.gos.getCallback("postProcessPopup");if(o){const{column:r,rowNode:a}=e??{};o({column:r,rowNode:a,ePopup:s,type:t,eventSource:i,mouseEvent:n})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return ei(e)}},Dc={moduleName:"Popup",version:Q,beans:[WI]};function th(e){return e.get("tooltipShowMode")==="whenTruncated"}var jI=(e,t)=>{const s=e;return typeof s.getTranslatedMessage=="function"?s.getTranslatedMessage(t):e.message},sh=(e,t,s)=>{const{editModelSvc:i}=e,n=i?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,o=i?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=n||o;return r?.length?r.join(s("tooltipValidationErrorSeparator",". ")):void 0},_I=(e,t)=>{if(th(e.gos)){if(t.isCellRenderer()){const i=t.column.getColDef();return!!i.showRowGroup||i.cellRenderer==="agGroupCellRenderer"?jr(()=>{const o=t.eGui;return o.querySelector(".ag-group-value")||o.querySelector(".ag-cell-value")||o}):void 0}return jr(()=>{const i=t.eGui;return i.children.length===0?i:i.querySelector(".ag-cell-value")})}},UI=(e,t,s)=>{const{editSvc:i}=e,{column:n}=t,o=_I(e,t),r=()=>i?.isEditing(t)?!1:o?n.isTooltipEnabled()?o():!1:!0;return{shouldDisplayDefault:r,shouldDisplayColumnTooltip:r,shouldDisplayCustomTooltip:s??r}},$I=({beans:e,ctrl:t,value:s,displayFunctions:i,translate:n})=>{const{editSvc:o,formula:r,gos:a}=e,{column:l,rowNode:c}=t;if(r?.active&&l.isAllowFormula()){const C=r.getFormulaError(l,c);if(C)return{value:jI(C,n),location:"cellFormula",shouldDisplay:()=>!!r?.getFormulaError(l,c)}}if(!!!o?.isEditing(t)){const C=sh(e,t,n);if(C)return{value:C,location:"cellEditor",shouldDisplay:()=>!o?.isEditing(t)&&!!sh(e,t,n)}}const{shouldDisplayCustomTooltip:u,shouldDisplayColumnTooltip:h}=i;if(s!=null)return{value:s,location:"cell",shouldDisplay:u};const g=l.getColDef(),m=c.data;if(g.tooltipField&&se(m))return{value:kr(m,g.tooltipField,l.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:h};const v=g.tooltipValueGetter;return v?{value:v(xe(a,{location:"cell",colDef:l.getColDef(),column:l,rowIndex:t.cellPosition.rowIndex,node:c,data:c.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:h}:null},qI=class extends B{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,s,i){e&&t.destroyBean(e);const n=this.gos,o=th(n),{column:r,eGui:a}=t,l=r.getColDef();!i&&o&&!l.headerComponent&&(i=jr(()=>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?.(xe(n,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let m=this.createTooltipFeature(g);return m&&(m=t.createBean(m),t.setRefreshFunction("tooltip",()=>m.refreshTooltip())),m}setupHeaderGroupTooltip(e,t,s,i){e&&t.destroyBean(e);const n=this.gos,o=th(n),{column:r,eGui:a}=t,l=r.getColGroupDef();!i&&o&&!l?.headerGroupComponent&&(i=jr(()=>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?.(xe(n,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>{const v={column:r};return l&&(v.colDef=l),v}},m=this.createTooltipFeature(g);return m&&t.createBean(m)}enableCellTooltipFeature(e,t,s){const{beans:i}=this,{column:n,rowNode:o}=e,r=UI(i,e,s),a=this.getLocaleTextFunc();let l=null;const c=()=>(l=$I({beans:i,ctrl:e,value:t,displayFunctions:r,translate:a}),l),u={getGui:()=>e.eGui,getLocation:()=>l?.location??"cell",getTooltipValue:()=>c()?.value,shouldDisplayTooltip:()=>{const h=l??c();return h?h.shouldDisplay?h.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:n,colDef:n.getColDef(),rowIndex:e.cellPosition.rowIndex,node:o,data:o.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(u,i)}setupFullWidthRowTooltip(e,t,s,i){const n={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>s,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},o=this.beans,r=o.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(n,o);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){const{beans:s}=this,{context:i}=s,n=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!n)return;const o={getGui:()=>n,getTooltipValue:()=>sh(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(o,s);if(r)return e.createBean(r,i)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=se(t.tooltipField)||se(t.tooltipValueGetter)||se(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},KI=class extends NI{createTooltipComp(e,t){M3(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},l1={moduleName:"Tooltip",version:Q,beans:[qI],dynamicBeans:{tooltipFeature:a1,highlightTooltipFeature:HI,tooltipStateManager:KI},userComponents:{agTooltipComponent:GI},dependsOn:[Dc],css:[BI]},to=class{constructor(e){this.cellValueChanges=e}},su=class extends to{constructor(e,t,s,i){super(e),this.initialRange=t,this.finalRange=s,this.ranges=i}},YI=10,sm=class{constructor(e){this.actionStack=[],this.maxStackSize=e||YI,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}},ZI=class extends B{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&&sp(this.activeCellEdit,t),i=this.activeRowEdit!==null&&fF(this.activeRowEdit,t);if(!(s||i||this.isPasting||this.isRangeInAction))return;const{rowPinned:o,rowIndex:r,column:a,oldValue:l,value:c}=e,d={rowPinned:o,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 sm(s),this.redoStack=new sm(s),this.addListeners();const i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:n=>{n.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,n=>{this.gridBodyCtrl=n.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:s,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});const n=this.undoRedo(s,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:n})}redo(e){const{eventSvc:t,undoStack:s,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});const n=this.undoRedo(i,s,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:n})}undoRedo(e,t,s,i,n){if(!e)return!1;const o=e.pop();return o?.cellValueChanges?(this.processAction(o,r=>r[i],n),o instanceof su?this.processRange(o.ranges||[o[s]]):this.processCell(o.cellValueChanges),t.push(o),!0):!1}processAction(e,t,s){const{changeDetectionSvc:i}=this.beans;i?.beginDeferred();try{for(const n of e.cellValueChanges){const{rowIndex:o,rowPinned:r,columnId:a}=n,l={rowIndex:o,rowPinned:r},c=Vs(this.beans,l);c?.displayed&&c.setDataValue(a,t(n),s)}}finally{i?.endDeferred()}}processRange(e){let t;const s=this.beans.rangeSvc;s.removeAllCellRanges(!0),e.forEach((i,n)=>{if(!i)return;const o=i.startRow,r=i.endRow;n===e.length-1&&(t={rowPinned:o.rowPinned,rowIndex:o.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:o.rowIndex,rowStartPinned:o.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:i.startColumn,columns:i.columns};s.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:s,rowPinned:i}=t,n={rowIndex:s,rowPinned:i},o=Vs(this.beans,n),r={rowPinned:t.rowPinned,rowIndex:o.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:s,rowPinned:i}=e,{colModel:n,focusSvc:o,rangeSvc:r}=this.beans,a=n.getCol(s);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const c={rowIndex:t,column:a,rowPinned:i};o.setFocusedCell({...c,forceBrowserFocus:!0}),r?.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new to(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 to(this.cellValueChanges);this.pushActionsToUndoStack(s)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new to(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new su(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&&Pi(s)?e=new su(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new to(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 to(t??[]);this.pushActionsToUndoStack(s),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},XI=".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) .ag-text-area-input{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}",QI={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},JI=class extends yc{constructor(){super(QI,[up]),this.eEditor=ue}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute("tabindex","-1"),this.addManagedListeners(this.eEditor,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}agSetEditValue(e){this.params.value=e;const t=e??void 0;this.eEditor.setValue(t,!0),this.setAriaLabel(t)}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=Cc(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${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}},ni=class extends en{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=se(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,s=e.length>0;t.setCustomValidity(e),s&&t.reportValidity(),Lh(t,s)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=s=>{UC(s)&&s.key&&!e.test(s.key)&&s.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:s=>{s.clipboardData?.getData("text")?.split("").some(n=>!e.test(n))&&s.preventDefault()}})}},Pc={selector:"AG-INPUT-TEXT-FIELD",component:ni},eM=class extends ni{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Ni();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){et(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Lt(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Bt(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Lt(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Bt(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Bt(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 Nt(this.getValue())??void 0}setDate(e,t){this.setValue(Lt(e??null,this.includeTime),t)}},c1={selector:"AG-INPUT-DATE-FIELD",component:eM},Tc=class extends yc{constructor(e){super(),this.cellEditorInput=e,this.eEditor=ue}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:i,eventKey:n,suppressPreventDefault:o}=e;s.getInputElement().setAttribute("title",""),t.init(s,e);let r,a=!0;i?(this.focusAfterAttached=!0,n===O.BACKSPACE||n===O.DELETE?r="":n&&n.length===1?o?a=!1:r=n:(r=t.getStartValue(),n!==O.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===O.PAGE_UP||c===O.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Ni()||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()}agSetEditValue(e){this.params.value=e;const t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t??null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},tM={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},sM=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return tM}getAgComponents(){return[c1]}init(e,t){this.eEditor=e,this.params=t;const{min:s,max:i,step:n,colDef:o}=t;s!=null&&e.setMin(s),i!=null&&e.setMax(i),n!=null&&e.setStep(n),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(o.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:s}=this,{min:i,max:n,getValidationErrors:o}=s;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const l=i instanceof Date?i:new Date(i);if(t<l){const c=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${c}`,[c]))}}if(n){const l=n instanceof Date?n:new Date(n);if(t>l){const c=l.toLocaleDateString();r.push(a("maxDateValidation",`Date must be before ${c}`,[c]))}}}return r.length||(r=null),o?o({value:t,cellEditorParams:s,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,s=e.getDate();return!se(s)&&!se(t.value)?t.value:s??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Lt(e,this.includeTime??!1)}},iM=class extends Tc{constructor(){super(new sM(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},nM={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},oM=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return nM}getAgComponents(){return[c1]}init(e,t){this.eEditor=e,this.params=t;const{min:s,max:i,step:n,colDef:o}=t;s!=null&&e.setMin(s),i!=null&&e.setMax(i),n!=null&&e.setStep(n),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(o.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,s=e.getInputElement().value,i=this.formatDate(this.parseDate(s??void 0)),{min:n,max:o,getValidationErrors:r}=t;let a=[];if(i){const l=new Date(i),c=this.getLocaleTextFunc();if(n){const d=new Date(n);if(l<d){const u=d.toLocaleDateString();a.push(c("minDateValidation",`Date must be after ${u}`,[u]))}}if(o){const d=new Date(o);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!se(s)&&!se(e.value)?e.value:e.parseValue(s??"")}getStartValue(){return Lt(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):Nt(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Lt(e??null,this.includeTime??!1)??void 0}},rM=class extends Tc{constructor(){super(new oM(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},aM=class extends en{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}},lM={selector:"AG-INPUT-TEXT-AREA",component:aM},cM={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},dM=class extends yc{constructor(){super(cM,[lM]),this.eEditor=ue}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:s,eventKey:i,maxLength:n,cols:o,rows:r}=e;this.focusAfterAttached=s,t.getInputElement().setAttribute("title",""),t.setMaxLength(n||200).setCols(o||60).setRows(r||10);let a;s?(this.focusAfterAttached=!0,i===O.BACKSPACE||i===O.DELETE?a="":i&&i.length===1?a=i:(a=this.getStartValue(e),i!==O.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}agSetEditValue(e){this.params.value=e;const t=this.getStartValue(this.params);this.eEditor.setValue(t??"",!0)}onKeyDown(e){const t=e.key;(t===O.LEFT||t===O.UP||t===O.RIGHT||t===O.DOWN||e.shiftKey&&t===O.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:s}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),s&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:s}=t,i=e.getValue();return!se(i)&&!se(s)?s:t.parseValue(i)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:s}=e,i=this.getLocaleTextFunc(),n=this.getValue();let o=[];return typeof n=="string"&&t!=null&&n.length>t&&o.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),o.length||(o=null),s?s({value:n,internalErrors:o,cellEditorParams:e}):o}},yp=class extends ni{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const o=Number.parseFloat(e.value),r=isNaN(o)?"":this.normalizeValue(o.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:s,max:i,step:n}=this.config;typeof t=="number"&&this.setPrecision(t),typeof s=="number"&&this.setMin(s),typeof i=="number"&&this.setMax(i),typeof n=="number"&&this.setStep(n)}onWheel(e){et(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 n=Number.parseFloat(e).toFixed(s);return Number.parseFloat(n).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=s)return e;if(s>0)return`${i[0]}.${i[1].slice(0,s)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,Bt(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Bt(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Bt(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(se(s)){let i=this.isScientificNotation(s);if(i&&this.eInput.validity.valid)return e(s);if(!i){s=this.adjustPrecision(s);const n=this.normalizeValue(s);i=s!=n}if(i)return t(s)}return e(s)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const s=t.value;return this.isScientificNotation(s)?this.adjustPrecision(s,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},uM={selector:"AG-INPUT-NUMBER-FIELD",component:yp},hM={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},pM=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return hM}getAgComponents(){return[uM]}init(e,t){this.eEditor=e,this.params=t;const{max:s,min:i,precision:n,step:o}=t;s!=null&&e.setMax(s),i!=null&&e.setMin(i),n!=null&&e.setPrecision(n),o!=null&&e.setStep(o);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:s,getValidationErrors:i}=e,o=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let a=[];return typeof o=="number"&&(t!=null&&o<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),s!=null&&o>s&&a.push(r("maxValueValidation",`Must be less than or equal to ${s}.`,[String(s)]))),a.length||(a=null),i?i({value:o,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===O.UP||e.key===O.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,s=e.getValue();if(!se(s)&&!se(t.value))return t.value;let i=t.parseValue(s);if(i==null)return i;if(typeof i=="string"){if(i==="")return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){Ni()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},gM=class extends Tc{constructor(){super(new pM(()=>this.getLocaleTextFunc()))}},fM=".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)}}",mM="ag-active-item",vM=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}),CM=class extends Ho{constructor(e,t,s){super(vM(e,t)),this.label=t,this.value=s,this.eText=ue}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(mM,e),Lv(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const s=this.getGui();C2(s,e),v2(s,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>Bv(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)}))}},wM=class extends Ho{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(fM)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case O.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const s=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(s)}break;case O.DOWN:case O.UP:e.preventDefault(),this.navigate(t);break;case O.PAGE_DOWN:case O.PAGE_UP:case O.PAGE_HOME:case O.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,i=s??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();Wt(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){const t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const s=this.options.findIndex(i=>i.value===e);if(s!==-1){const i=this.options[s];this.value=i.value,this.displayValue=i.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(!xs(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const s=this.getGui(),{scrollTop:i,clientHeight:n}=s,{offsetTop:o,offsetHeight:r}=t;(o+r>i+n||o<i)&&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 CM(this.cssIdentifier,t,e);s.setParentComponent(this);const i=this.createManagedBean(s);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===O.DOWN;let s;const{listItems:i,highlightedItem:n}=this;if(!n)s=t?i[0]:$e(i);else{let r=i.indexOf(n)+(t?1:-1);r=Math.min(Math.max(r,0),i.length-1),s=i[r]}this.highlightItem(s)}navigateToPage(e){const{listItems:t,highlightedItem:s}=this;if(!s||t.length===0)return;const i=t.indexOf(s),n=this.options.length-1,o=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/o);let a=-1;e===O.PAGE_HOME?a=0:e===O.PAGE_END?a=n:e===O.PAGE_DOWN?a=Math.min(i+r,n):e===O.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){fn(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((s,i)=>{s.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},bM=".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(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper: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)}}.ag-picker-field-wrapper:disabled{opacity:.5}",xM={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"}}]}]},yM=class extends mw{constructor(e){if(super(e,e?.template||xM,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=ue,this.eWrapper=ue,this.eDisplayField=ue,this.eIcon=ue,this.registerCSS(bM),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:s,variableWidth:i,minPickerWidth:n,maxPickerWidth:o}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,s!=null&&this.setPickerMaxHeight(s),n!=null&&this.setPickerMinWidth(n),o!=null&&this.setPickerMaxWidth(o)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:s,inputWidth:i}=this.config;if(s){const n=this.beans.iconSvc.createIconNoSpan(s);n&&this.eIcon.appendChild(n)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Pu(e,!1),this.ariaRole&&fn(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 O.UP:case O.DOWN:case O.ENTER:case O.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case O.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:i,modalPicker:n=!0},maxPickerHeight:o,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:d}=this,u={modal:n,eChild:e,closeOnEsc:!0,closedCallback:()=>{const v=Ih(c);this.beforeHidePicker(),v&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(s,i),anchorToElement:d};e.style.position="absolute";const h=c.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=Gh(Tl(d)),a&&(e.style.maxWidth=a)):Ml(e,a??Tl(d));const m=o??`${Nh(h.getPopupParent())}px`;return e.style.setProperty("max-height",m),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:s,gos:i},eWrapper:n,pickerComponent:o}=this,r=i.get("enableRtl")?"right":"left";s.positionPopupByComponent({type:t,eventSource:n,ePopup:o.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();Pu(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 Ml(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()}},SM=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.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(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",Sp=class extends yM{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(SM)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:jr(()=>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 wM("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),s=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",s),E2(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch(t===O.TAB&&this.hidePicker(),t){case O.ENTER:case O.UP:case O.DOWN:case O.PAGE_UP:case O.PAGE_DOWN:case O.PAGE_HOME:case O.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case O.ESCAPE:super.onKeyDown(e);break;case O.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}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,s){const{listComponent:i,config:{placeholder:n},eDisplayField:o,tooltipFeature:r}=this;if(this.value===e||!i)return this;if(s||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&n&&(l=n),o.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},RM={selector:"AG-SELECT",component:Sp},FM={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},EM=class extends yc{constructor(){super(FM,[RM]),this.eEditor=ue,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:s,gos:i}=this,{values:n,value:o,eventKey:r}=e;if(st(n)){q(58);return}this.startedByEnter=r!=null?r===O.ENTER:!1;let a=!1;n.forEach(u=>{const h={value:u},g=s.formatValue(e.column,null,u),m=g!=null;h.text=m?g:u,t.addOption(h),a=a||o===u}),a?t.setValue(e.value??void 0,!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),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e??void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:s}=e,i=this.getValue();let n=[];if(t&&i!=null&&!t.includes(i)){const o=this.getLocaleTextFunc();n.push(o("invalidSelectionValidation","Invalid selection."))}else n=null;return s?s({value:i,internalErrors:n,cellEditorParams:e}):n}},DM={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},PM=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return DM}getAgComponents(){return[Pc]}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,i=this.getValue(),n=this.getLocaleTextFunc();let o=[];return t!=null&&typeof i=="string"&&i.length>t&&o.push(n("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),o.length||(o=null),s?s({value:i,cellEditorParams:e,internalErrors:o}):o}getValue(){const{eEditor:e,params:t}=this,s=e.getValue();return!se(s)&&!se(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(){Ni()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),s=se(t)&&t.length||0;s&&e.getInputElement().setSelectionRange(s,s)}},im=class extends Tc{constructor(){super(new PM(()=>this.getLocaleTextFunc()))}};function TM(e){e.undoRedo?.undo("api")}function kM(e){e.undoRedo?.redo("api")}function IM(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function MM(e){const t=e.editModelSvc?.getEditMap(),s=[];return t?.forEach((i,n)=>{const{rowIndex:o,rowPinned:r}=n;i.forEach((a,l)=>{const{editorValue:c,pendingValue:d,sourceValue:u,state:h}=a,g=ws(a);let m=c??d;m===bt&&(m=void 0);const v={newValue:m,oldValue:u,state:h,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:o,rowPinned:r},C=h==="editing";(C||!C&&g)&&s.push(v)})}),s}function AM(e,t=!1){const{editSvc:s}=e;if(s?.isBatchEditing()){if(t)for(const i of e.editModelSvc?.getEditPositions()??[])i.state==="editing"&&s.revertSingleCellEdit(i);else yi(e,{persist:!0});wi(e,void 0,{cancel:t})}else s?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function LM(e,t){const s=ze(e,t);return!!e.editSvc?.isEditing(s)}function OM(e,t){const{key:s,colKey:i,rowIndex:n,rowPinned:o}=t,{editSvc:r,colModel:a}=e,l=a.getCol(i);if(!l){q(12,{colKey:i});return}const d=Vs(e,{rowIndex:n,rowPinned:o||null});if(!d){q(290,{rowIndex:n,rowPinned:o});return}if(!r?.isCellEditable({rowNode:d,column:l},"api"))return;o==null&&e1(e,n),Jw(e,i),r?.startEditing({rowNode:d,column:l},{event:s?new KeyboardEvent("keydown",{key:s}):void 0,source:"api",editable:!0})}function NM(e){return e.editSvc?.validateEdit()||null}function HM(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function GM(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var BM={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},VM=class extends Jh{constructor(e){super(BM),this.params=e}postConstruct(){Cn(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,s=i=>{ju(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)};this.addManagedElementListeners(e,{keydown:s})}};function zM(e,{column:t},s,i,n="ui"){if(s instanceof KeyboardEvent&&(s.key===O.TAB||s.key===O.ENTER||s.key===O.F2||s.key===O.BACKSPACE&&i))return!0;if(s?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const r=t?.getColDef(),a=WM(e.gos,r),l=s?.type;return l==="click"&&s?.detail===1&&a===1||l==="dblclick"&&s?.detail===2&&a===2?!0:n==="api"?!!i:!1}function WM(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function iu(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function ih(e,t){const s=t.column,i=t.rowNode,n=s.getColDef();if(!i)return iu(e,t);const o=n.editable;return i.group&&n.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(i,s)?!0:iu(e,t):s.isColumnFunc(i,o)?!0:iu(e,t)}function jM(e,t,s="ui"){const i=ih(e,t);if(i||s==="ui")return i;const{rowNode:n,column:o}=t;for(const r of e.colModel.getCols())if(r!==o&&ih(e,{rowNode:n,column:r}))return!0;return!1}var Jl=(e,t=!1)=>{if(e!==void 0)return ws(e)||t&&e.state==="editing"};function d1(e,t,s=!1){return Jl(e.editModelSvc?.getEdit(t),s)}var u1=(e,t,s)=>{if(e)for(let i=0,n=e.length;i<n;++i){const o=e[i];if(o.data&&(Jl(t?.getEdit({rowNode:o,column:s}))||Jl(t?.getEdit({rowNode:o.pinnedSibling,column:s})))||u1(o.childrenAfterGroup,t,s))return!0}};function h1(e,t){const{column:s,rowNode:i}=t;return e.gos.get("groupTotalRow")&&!i?.footer?!1:u1(i?.childrenAfterGroup,e.editModelSvc,s)}function p1(e,{rowNode:t,column:s}){if(t=t.pinnedSibling,!!t)return Jl(e.editModelSvc?.getEdit({rowNode:t,column:s}))}var _M=class extends B{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 n=d1(s,e)||h1(s,e)||p1(s,e);this.applyBatchingStyle(n)}else this.applyBatchingStyle(!1);const i=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},UM=class extends B{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 i=e.rowNode,n=t?.getEditRow(i);const o=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:i});if(!n&&i.pinnedSibling&&(i=i.pinnedSibling,n=t?.getEditRow(i)),n){const r=Array.from(n.keys()).some(a=>{const l={rowNode:i,column:a};return d1(s,l,!0)||h1(s,l)||p1(s,l)});this.applyStyle(o,r);return}this.applyStyle(o)}applyStyle(e=!1,t=!1){const s=!!this.editSvc?.isBatchEditing(),i=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:n})=>{n.toggleCss("ag-row-editing",i&&t),n.toggleCss("ag-row-batch-edit",i&&t&&s),n.toggleCss("ag-row-inline-editing",t),n.toggleCss("ag-row-not-inline-editing",!t),n.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},$M=({rowModel:e,pinnedRowModel:t,editModelSvc:s},i)=>{const n=new Set;e.forEachNode(o=>i.has(o)&&n.add(o)),t?.forEachPinnedRow("top",o=>i.has(o)&&n.add(o)),t?.forEachPinnedRow("bottom",o=>i.has(o)&&n.add(o));for(const o of i)n.has(o)||s.removeEdits({rowNode:o});return n},qM=({editModelSvc:e},t,s)=>{for(const i of t)e?.getEditRow(i)?.forEach((n,o)=>!s.has(o)&&e.removeEdits({rowNode:i,column:o}))},KM=e=>()=>{const t=new Set(e.colModel.getCols()),s=e.editModelSvc.getEditMap(!0),i=new Set(s.keys());qM(e,$M(e,i),t)},YM=new Set(["undo","redo","paste","bulk","rangeSvc"]),ZM=new Set(["ui","api"]),g1={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},XM=new Set(Object.keys(g1)),QM=new Set(["paste","rangeSvc","cellClear","redo","undo"]),nu={cancel:!0,source:"api"},JM={cancel:!1,source:"api"},Ki={checkSiblings:!0},mi={force:!0,suppressFlash:!0},e8={force:!0},t8=class extends B{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,nu),this.createStrategy(i)});const t=KM(e),s=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,n=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||n?this.stopEditing(void 0,nu):this.isEditing()&&(this.batch?wi(e,this.model.getEditPositions()):this.stopEditing(void 0,JM)),!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}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,nu))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){!this.batch||this.batchStartDispatched||(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:s,strategy:i}=this,n=nm(s,e);if(i){if(i.beanName===n)return i;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(n,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,s,i="ui"){const n=zM(this.beans,e,t,s,i);return n&&(this.strategy??(this.strategy=this.createStrategy())),n}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 H6(this.beans)}isEditing(e,t){return this.model.hasEdits(e??void 0,t??Ki)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){const{startedEdit:s=!0,event:i=null,source:n="ui",ignoreEventKey:o=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;const l=ze(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const c=this.shouldStartEditing(e,i,s,n);if(c===!1&&n!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,n)&&!t.continueEditing&&this.stopEditing(void 0,{source:n}),c&&this.ensureBatchStarted(),this.strategy.start({position:e,event:i,source:n,ignoreEventKey:o,startedEdit:s,silent:r})}stopEditing(e,t){const s=this.prepareStopContext(e,t);if(!s)return!1;this.stopping=!0;let i=!1,{edits:n}=s;try{const o=this.processStopRequest(s);return i||(i=o.res),n=o.edits,this.finishStopEditing({...s,edits:n,params:t,position:e,res:i}),i}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:s=null,cancel:i=!1,source:n="ui",forceCancel:o=!1,forceStop:r=!1,commit:a=!1}=t||{};if(XM.has(n)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;const l=this.committing?g1[n]:n;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,Ki))||!this.strategy||this.stopping)return null;const d=ze(this.beans,e);d&&(d.onEditorAttachedFuncs=[]);const u=!i&&(!!this.shouldStopEditing(e,s,l)||(this.committing||n==="paste")&&!this.batch)||r,h=i&&!!this.shouldCancelEditing(e,s,l)||o;return{cancel:i,cellCtrl:d,edits:this.model.getEditMap(!0),event:s??null,forceCancel:o,forceStop:r,commit:a,position:e,source:n,treatAsSource:l,willCancel:h,willStop:u}}processStopRequest(e){const{event:t,position:s,willCancel:i,willStop:n}=e;return n||i?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,s)?{res:!1,edits:this.handleMidBatchKey(t,s,e)}:(yi(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(s),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){const{beans:t,model:s}=this,{cancel:i,commit:n,edits:o,event:r,source:a,willCancel:l,willStop:c}=e,d=!this.batch||!l;yi(t,{persist:d,isCancelling:l||i,isStopping:c});const u=s.getEditMap(),g=!l&&(!this.batch||n)?this.processEdits(u,a):[];i?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(r,n),this.clearValidationIfNoOpenEditors();for(const m of g)s.clearEditValue(m);this.bulkRefreshMap(o);for(const m of s.getEditPositions(u)){const v=ze(t,m),C=ws(m);v?.refreshCell({force:!0,suppressFlash:!C})}return{res:c,edits:u}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,s){const{beans:i,model:n}=this,{cellCtrl:o,edits:r}=s,{key:a}=e,l=a===O.ENTER,c=a===O.ESCAPE,d=a===O.TAB;if(l||d||c){if(l||d)yi(i,{persist:!0});else if(c&&o){const{rowNode:u,column:h}=o;if(this.batch&&u&&h){const g={rowNode:u,column:h};wi(i,[g],{silent:!0}),this.model.stop(g,!0,!0),ze(i,g)?.refreshCell(mi)}else this.revertSingleCellEdit(o)}return this.batch?this.strategy?.cleanupEditors():wi(i,n.getEditPositions(),{event:e,cancel:c}),e.preventDefault(),this.bulkRefreshMap(r,{suppressFlash:!0}),n.getEditMap()}return r}finishStopEditing({cellCtrl:e,edits:t,params:s,position:i,res:n,commit:o,forceCancel:r,willCancel:a,willStop:l}){const c=this.beans;n&&i&&(!this.batch||o)&&this.model.removeEdits(i),this.navigateAfterEdit(s,e?.cellPosition),br(c),this.clearValidationIfNoOpenEditors();const{rowRenderer:d,formula:u}=c;if(a&&d.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){u?u.refreshFormulas(!0):d.refreshRows({suppressFlash:!0,force:!0});const h=l&&o;(h||a&&r)&&this.dispatchBatchStopped(t,h)}}dispatchBatchStopped(e,t){let s;t&&(s=T6(e),s.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",s??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;const{event:s,suppressNavigateAfterEdit:i}=e;if(!(s instanceof KeyboardEvent)||i)return;const{key:o,shiftKey:r}=s,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(o!==O.ENTER||!a)return;const l=r?O.UP:O.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t){const s=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[],{changeDetectionSvc:o}=this.beans;o?.beginDeferred();try{for(const r of s){const a=e.get(r);for(const l of a.keys()){const c=a.get(l),d={rowNode:r,column:l};if(ws(c)&&!i){const u=ze(this.beans,d);this.setNodeDataValue(r,l,c.pendingValue,u,t)||n.push(d)}}}}finally{o?.endDeferred()}return n}setNodeDataValue(e,t,s,i,n="edit"){const o=ZM.has(n)?"edit":n;i&&(i.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,s,o)}finally{this.committing=!1,i&&(i.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const s=this.model.getEdit(e);s&&s.state!=="editing"&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:s.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefreshMap(e);let s=mi;t?.forceRefreshOfEditCellsOnly&&(s={...s8(e),...mi}),this.beans.rowRenderer.refreshCells(s)}dispatchEditValuesChanged({rowNode:e,column:t},s={}){if(!e||!t||!s)return;const{pendingValue:i,sourceValue:n}=s,{rowIndex:o,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:o,rowPinned:r,column:t,source:"api",data:a,newValue:i,oldValue:n,value:i,colDef:t.getColDef()})}bulkRefreshCell(e,t){it(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){it(this.gos,this.beans.rowModel)&&e.forEach((s,i)=>{for(const n of s.keys())this.refCell({rowNode:i,column:n},s.get(n),t)})}refCell({rowNode:e,column:t},s,i={}){const{beans:n,gos:o}=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&&o.get("groupTotalRow")||!d.parent&&d.sibling&&o.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)ze(n,{rowNode:u,column:t})?.refreshCell(i);for(const u of a){const h=ze(n,{rowNode:u,column:t});h&&(h.refreshCell(i),!i.force&&this.batch&&h.editStyleFeature?.applyCellStyles?.())}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:s,beans:i}=this,n=e.rowNode;if(n.group&&e.column.getColDef().groupRowEditable==null){if(s.get("treeData")){if(!n.data&&!s.get("enableGroupEdit"))return!1}else if(!s.get("enableGroupEdit"))return!1}const o=nm(s)==="fullRow"?jM(i,e,t):ih(i,e);return o&&(this.strategy??(this.strategy=this.createStrategy())),o}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,s=!0){if(this.hasValidationErrors(e)){const i=ze(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),s&&(i&&!i.hasBrowserFocus()&&i.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(i&&this.revertSingleCellEdit(i),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const s=ze(this.beans,e);s?.comp?.getCellEditor()&&(wi(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),Sn(this.beans,e,{silent:!0}),Ei(this.beans),s?.refreshCell(mi),t&&(s?.focusCell(),s?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){Ei(this.beans);const t=ze(this.beans,e);t&&(t.refreshCell(mi),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,i="ui"){let n;const o=this.isEditing(),r=o&&this.checkNavWithValidation(void 0,s)==="block-stop";return e instanceof bo&&o&&(n=this.strategy?.moveToNextEditingCell(e,t,s,i,r)),n===null||(n=n||!!this.beans.focusSvc.focusedHeader,n===!1&&!r&&this.stopEditing()),n}getPendingEditValue(e,t,s){if(s==="data"||s==="batch"&&!this.batch)return;const i=this.model.getEdit({rowNode:e,column:t},Ki);if(!i||this.stopping&&!this.batch&&!i.editorState?.cellStartedEditing)return;if(s==="edit"){const o=i.editorValue;if(o!=null&&o!==bt)return o}const n=i.pendingValue;if(n!==bt)return n}getCellDataValue(e){const t=this.model.getEdit(e,Ki);if(t){const s=t.pendingValue;if(s!==bt)return s;const i=t.sourceValue;if(i!=null)return i}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){E6(this,this.beans,e)}createPopupEditorWrapper(e){return new VM(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:s,sourceValue:i,state:n}=t;return s===i||n==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:i}),this.beans.editModelSvc?.removeEdits(e),ze(this.beans,e)?.refreshCell(mi),!0)}setDataValue(e,t,s){try{const i=this.batch,n=this.isEditing(i?void 0:e);if((!n||this.committing)&&!i&&!QM.has(s)||!n&&!i&&s==="paste"||s==="batch"&&!i)return;if(s==="edit"){if(n&&this.applyEditorValue(e,t))return!0;if(!i)return}if(this.strategy??(this.strategy=this.createStrategy()),s==="batch"||s==="edit")return this.applyDirectValue(e,t,s);const o=this.beans;let r;if(i?r="ui":this.committing?r=s??"api":r="api",!s||YM.has(s))return this.applyDirectValue(e,t,s);const a=this.applyExistingEdit(e,t,s,r);return a!==void 0?a:(eo(o,e,t,s,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,s,i){const n=this.model.getEdit(e);if(n)return n.pendingValue===t?!1:n.sourceValue!==t?(eo(this.beans,e,t,s,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0)}applyEditorValue(e,t){const s=this.beans,i=ze(s,e),n=i?.comp?.getCellEditor();return!i||!n?!1:(eo(s,e,t,"edit",void 0,{persist:!0}),i.editStyleFeature?.applyCellStyles?.(),"agSetEditValue"in n?(n.agSetEditValue(t),!0):n.refresh&&i.editCompDetails?(n.refresh({...i.editCompDetails.params,value:t}),!0):(i.hasBrowserFocus()&&i.onEditorAttachedFuncs.push(()=>{const r=ze(this.beans,e);r?.focusCell(!0),r?.comp?.getCellEditor()?.focusIn?.()}),wi(s,[e],{silent:!0,cancel:!0}),Sn(s,e,{silent:!0}),Ei(s),ze(s,e)?.refreshCell(mi),!0))}applyDirectValue(e,t,s){const i=this.beans;if(this.batch){if(s==="batch"&&ze(i,e)?.comp?.getCellEditor()){const{editModelSvc:r,valueSvc:a}=i,{rowNode:l,column:c}=e;r?.getEdit(e)?.sourceValue===void 0&&r?.setEdit(e,{sourceValue:a.getValue(c,l,"data")}),r?.setEdit(e,{pendingValue:t})}else eo(i,e,t,s,void 0,{persist:!0}),s!=="batch"&&this.cleanupEditors();return br(i),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}eo(i,e,t,s,void 0,{persist:!0});const n=ze(i,e),o=this.setNodeDataValue(e.rowNode,e.column,t,n,s);return this.syncEditAfterCommit(e,o),br(i),ze(i,e)?.refreshCell(o?e8:mi),o}handleColDefChanged(e){I6(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:s}=this;if(!this.batch||!s.hasRowEdits(e.rowNode,Ki))return;const{rowNode:n}=e,{compDetails:o,valueToDisplay:r}=t;if(o){const{params:a}=o;return a.data=s.getEditRowDataValue(n,Ki),{compDetails:o}}return{valueToDisplay:r}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,s,i){this.strategy?.dispatchCellEvent(e,t,s,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return xe(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:i,rangeSvc:n,valueSvc:o}=this,{formula:r}=i;yi(i,{persist:!0});const a=this.model.getEditMap(!0);let l=a.get(e)?.get(t)?.pendingValue,c=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),c=!0);const d=r?.isFormula(l)??!1;s.forEach(h=>{const g=h.columns.some(m=>m?.isAllowFormula());if(n?.forEachRowInRange(h,m=>{const v=Vs(i,m);if(v===void 0)return;const C=a.get(v)??new Map;let w=l;for(const b of h.columns){if(!b)continue;const x=!!d&&b.isAllowFormula();if(this.isCellEditable({rowNode:v,column:b},"api")){const y=o.getValue(b,v,"data",!0);let S=o.parseValue(b,v??null,w,y);Number.isNaN(S)&&(S=null),C.set(b,{editorValue:void 0,pendingValue:S,sourceValue:y,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}x&&(w=r?.updateFormulaByOffset({value:w,columnDelta:1}))}C.size>0&&a.set(v,C),d&&g&&(l=r?.updateFormulaByOffset({value:l,rowDelta:1}))}),this.setEditMap(a),this.batch){this.cleanupEditors(),br(i),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,c&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(a)})}});const u=ze(i,{rowNode:e,column:t});u&&u.focusCell(!0)}createCellStyleFeature(e){return new _M(e,this.beans)}createRowStyleFeature(e){return new UM(e,this.beans)}setEditingCells(e,t){const{beans:s}=this,{colModel:i,valueSvc:n}=s,o=new Map;for(let{colId:r,column:a,colKey:l,rowIndex:c,rowPinned:d,newValue:u,state:h}of e){const g=r?i.getCol(r):l?i.getCol(l):a;if(!g)continue;const m=Vs(s,{rowIndex:c,rowPinned:d});if(!m)continue;const v=n.getValue(g,m,"data",!0);if(!t?.forceRefreshOfEditCellsOnly&&!ws({pendingValue:u,sourceValue:v})&&h!=="editing")continue;let C=o.get(m);C||(C=new Map,o.set(m,C)),u===void 0&&(u=bt),C.set(g,{editorValue:void 0,pendingValue:u,sourceValue:v,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(o,t)}onCellFocused(e){const t=ze(this.beans,e);if(!t||!this.isEditing(t,Ki))return;const s=this.model.getEdit(t);if(!s||!ws(s))return;const n=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(n,"pendingChange")}allowedFocusTargetOnValidation(e){return ze(this.beans,e)}};function s8(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 nm(e,t){return t??e.get("editType")??"singleCell"}var f1=class extends B{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:i,beans:n}=this,o=e.type==="cellFocused"?e.sourceEvent:null;s&&(t=ze(n,s));const{gos:r,editModelSvc:a}=n,l=e.type==="cellFocusCleared";if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:c,rowIndex:d,rowPinned:u}=e,h={column:c,rowNode:Vs(n,{rowIndex:d,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const m=!g,v=!!a?.getCellValidationModel().hasCellValidation(h),C=m&&v;!(s||l)||i.stopEditing(void 0,{cancel:C,source:l&&m?"api":void 0,event:o})||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){const t=this.editSvc.isBatchEditing()&&!e;for(const s of this.model.getEditPositions())Yr(this.beans,s,{cancel:!0},ze(this.beans,s)),this.model.stop(s,t,!0);return!0}stopCommitted(e,t){const s=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(const r of s)i.all.push(r),(this.model.getCellValidationModel().getCellValidation(r)?.errorMessages?.length??0)>0?i.fail.push(r):i.pass.push(r);const n=this.processValidationResults(i),o=this.editSvc.isBatchEditing()&&!t;for(const r of n.destroy)Yr(this.beans,r,{event:e},ze(this.beans,r)),this.model.stop(r,o,!1);for(const r of n.keep){const a=ze(this.beans,r);!this.editSvc.cellEditingInvalidCommitBlocks()&&a&&this.editSvc.revertSingleCellEdit(a)}return!0}cleanupEditors({rowNode:e}={},t){yi(this.beans,{persist:!1});const s=this.model.getEditPositions(),i=[];if(e)for(const n of s)n.rowNode!==e&&i.push(n);else for(const n of s)i.push(n);wi(this.beans,i),br(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 i=this.beans.gos.get("editType")==="fullRow";e.focusCell(i),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:s=!1,startedEdit:i,position:n,cells:o=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!s&&t.key||void 0;P6(this.beans,o,n,r,t,i)}dispatchCellEvent(e,t,s,i){const n=ze(this.beans,e);n&&this.eventSvc.dispatchEvent({...n.createEvent(t??null,s),...i})}dispatchRowEvent(e,t,s){if(s)return;const i=Zl(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,s="ui"){const i=this.editSvc.isBatchEditing();return i&&s==="api"?!0:i&&(s==="ui"||s==="edit")?!1:s==="api"?!0:t instanceof KeyboardEvent&&!i?t.key===O.ENTER:null}shouldCancel(e,t,s="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&t.key===O.ESCAPE||i&&s==="api"||s==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const s=[];if(e.forEach((i,n)=>{i.forEach((o,r)=>{o.state==="editing"&&s.push({...o,rowNode:n,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),s.length>0){const i=s.at(-1),n=i.pendingValue===bt?void 0:i.pendingValue;this.start({position:i,event:new KeyboardEvent("keydown",{key:n}),source:"api"});const o=ze(this.beans,i);o&&this.setFocusInOnEditor(o)}}destroy(){this.cleanupEditors(),super.destroy()}},i8=class extends f1{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,s="ui"){const{rowNode:i,beans:n}=this,{rowNode:o}=e||{};if(!Zl(n,{rowNode:i}))return!0;const a=super.shouldStop({rowNode:i},t,s);return a!==null?a:i?o!==i:!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:i,event:n,ignoreEventKey:o}=e,{rowNode:r}=t,{beans:a,model:l,startedRows:c}=this;this.rowNode!==r&&super.cleanupEditors(t);const d=a.visibleCols.allCols,u=[],h=[];for(const g of d)g.isCellEditable(r)&&h.push(g);if(h.length!=0){c.has(r)||(this.dispatchRowEvent({rowNode:r},"rowEditingStarted",s),c.add(r));for(const g of h){const m={rowNode:r,column:g};u.push(m),l.start(m)}this.rowNode=r,this.setupEditors({cells:u,position:t,startedEdit:i,event:n,ignoreEventKey:o})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){const{rowNode:t,model:s}=this;return t&&!s.hasRowEdits(t)?!1:(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){const{rowNode:s,beans:i,model:n,editSvc:o}=this;if(s&&!n.hasRowEdits(s))return!1;const r=[];if(n.getEditMap().forEach((a,l)=>{if(!(!a||a.size===0)){for(const c of a.values())if(ws(c)){r.push(l);break}}}),Ei(i),o.checkNavWithValidation({rowNode:s})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!o.isBatchEditing())for(const a of r)this.dispatchRowEvent({rowNode:a},"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{beans:i,gos:n,model:o}=this;if(i.editSvc?.isRangeSelectionEnabledWhileEditing())return;const r=ze(i,s);n.get("invalidEditValueMode")==="block"&&r&&(o.getCellValidationModel().getCellValidation(r)||o.getRowValidationModel().getRowValidation(r))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);const{startedRows:s}=this;for(const i of s)this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.destroyEditorsForRow(i);s.clear()}destroyEditorsForRow(e){const t=Zl(this.beans,{rowNode:e});if(!t)return;const s={};for(const i of t.getAllCellCtrls())i.comp?.getCellEditor()&&Yr(this.beans,i,s,i)}moveToNextEditingCell(e,t,s,i="ui",n=!1){const{beans:o,model:r,gos:a,editSvc:l}=this,c=e.cellPosition;let d;r.suspend(!0);try{d=o.navigation?.findNextCellToFocusOn(c,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{r.suspend(!1)}if(d===!1)return null;if(d==null)return!1;const u=d.cellPosition,h=e.isCellEditable(),g=d.isCellEditable(),m=u&&c.rowIndex===u.rowIndex&&c.rowPinned===u.rowPinned;h&&this.setFocusOutOnEditor(e),this.restoreEditors();const v=a.get("suppressStartEditOnTab");return g&&!n?v?d.focusCell(!0,s):(d.comp?.getCellEditor()||Sn(o,d,{event:s,cellStartedEdit:!0}),this.setFocusInOnEditor(d),d.focusCell(!1,s)):(g&&n&&this.setFocusInOnEditor(d),d.focusCell(!0,s)),!m&&!n&&(l?.stopEditing({rowNode:e.rowNode},{event:s,forceStop:!0}),l?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(d,!0),v?d.focusCell(!0,s):l.startEditing(d,{startedEdit:!0,event:s,source:i,ignoreEventKey:!0,editable:g||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){const{beans:e,model:t}=this;t.getEditMap().forEach((s,i)=>s.forEach(({state:n},o)=>{if(n!=="editing")return;const r=ze(e,{rowNode:i,column:o});r&&!r.comp?.getCellEditor()&&Sn(e,r,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},n8=class extends f1{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,s="ui"){const i=super.shouldStop(e,t,s);if(i!==null)return i;const n=e?.rowNode,o=e?.column,r=this.rowNode,a=this.column;return(!r||!a)&&n&&o?null:r!==n||a!==o?!0:!r&&!a?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:s,event:i,ignoreEventKey:n}=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:i,ignoreEventKey:n})}dispatchRowEvent(e,t,s){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:s}=this.beans,{rowIndex:i,column:n,rowPinned:o}=e,r=Vs(this.beans,{rowIndex:i,rowPinned:o}),a=Zu(n),l=t.getCol(a),c=e.previousParams;if(c){const d=Zu(c.column);if(c?.rowIndex===i&&d===a&&c?.rowPinned===o)return}e.type=="cellFocused"&&(s?.isRangeSelectionEnabledWhileEditing()||s?.isEditing({rowNode:r,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,s,i="ui",n=!1){const o=this.beans.focusSvc.getFocusedCell();o&&(e=no(this.beans,o)??e);const r=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),n||(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&&!n&&this.setFocusOutOnEditor(e);const g=this.gos.get("suppressStartEditOnTab");let m=!1;if(!h&&!n&&(super.cleanupEditors(a,!0),g?a.focusCell(!0,s):(m=!0,this.editSvc.startEditing(a,{startedEdit:!0,event:s,source:i,ignoreEventKey:!0,editable:u}))),u&&!n){if(a.focusCell(!1,s),g)a.focusCell(!0,s);else if(!a.comp?.getCellEditor()){if(!m){const v=this.editSvc?.isEditing(a,{withOpenEditor:!0});Sn(this.beans,a,{event:s,cellStartedEdit:!0,silent:v})}this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else u&&n&&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}},Gi={moduleName:"EditCore",version:Q,beans:[F6,t8],apiFunctions:{getEditingCells:MM,getEditRowValues:IM,getCellEditorInstances:D6,startEditingCell:OM,stopEditing:AM,isEditing:LM,validateEdit:NM},dynamicBeans:{singleCell:n8,fullRow:i8},dependsOn:[Dc,l1],css:[XI]},o8={moduleName:"UndoRedoEdit",version:Q,beans:[ZI],apiFunctions:{undoCellEditing:TM,redoCellEditing:kM,getCurrentUndoSize:HM,getCurrentRedoSize:GM},dependsOn:[Gi]},r8={moduleName:"TextEditor",version:Q,userComponents:{agCellEditor:im,agTextCellEditor:im},dependsOn:[Gi]},a8={moduleName:"NumberEditor",version:Q,userComponents:{agNumberCellEditor:{classImp:gM}},dependsOn:[Gi]},l8={moduleName:"DateEditor",version:Q,userComponents:{agDateCellEditor:iM,agDateStringCellEditor:rM},dependsOn:[Gi]},c8={moduleName:"CheckboxEditor",version:Q,userComponents:{agCheckboxCellEditor:JI},dependsOn:[Gi]},d8={moduleName:"SelectEditor",version:Q,userComponents:{agSelectCellEditor:EM},dependsOn:[Gi]},u8={moduleName:"LargeTextEditor",version:Q,userComponents:{agLargeTextCellEditor:dM},dependsOn:[Gi]},h8={moduleName:"CustomEditor",version:Q,dependsOn:[Gi]},m1={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},p8=new Set(Object.values(m1));function vi(e,t){const s=e.filterUi;if(!s)return null;if(s.created)return s.promise;if(t)return null;const i=s.create(s.refreshed),n=s;return n.created=!0,n.promise=i,i}function g8(e,t,s,i,n,o,r){return t.refresh?.({...s,model:i,source:o,additionalEventAttributes:r}),e().then(a=>{if(a){const{filter:l,filterParams:c}=a;v1(l,c,i,n,o,r)}})}function v1(e,t,s,i,n,o){e?.refresh?.({...t,model:s,state:i,source:n,additionalEventAttributes:o})}function C1(e,t,s,i){const n=e();n?.created&&n.promise.then(o=>{const r=t();v1(o,n.filterParams,r,s()??{model:r},"ui",i)})}function om(e){let t,s=!1,i;const{action:n,filterParams:o,getFilterUi:r,getModel:a,getState:l,updateState:c,updateModel:d,processModelToApply:u}=e;switch(n){case"apply":{const h=l();i=h?.model??null,u&&(i=u(i)),t={state:h?.state,model:i},s=!0;break}case"clear":{t={model:null},o?.buttons?.includes("apply")||(s=!0,i=null);break}case"reset":{t={model:null},s=!0,i=null;break}case"cancel":{t={model:a()};break}}c(t),s?d(i):C1(r,a,l,{fromAction:n})}function wt(e,t){return e[t]??null}var f8=class extends ap{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,s,i,n){this.comp=e;const o=oa(this,this.beans.context,n);this.eButtonShowMainFilter=s,this.eFloatingFilterBody=i,this.setGui(t,o),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(o),this.setupLeft(o),this.setupHover(o),this.setupFocus(o),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(o),this.setupUi(),o.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(o);const r=()=>this.onColDefChanged(o);o.addManagedListeners(this.column,{colDefChanged:r}),o.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&r()}}),o.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.colDef;return xe(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=zt("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new ia(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();Ro(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(et(t)===this.eGui)return;const n=In(t,this.eGui,null,e.shiftKey);if(n){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),n.focus();return}const o=this.findNextColumnWithFloatingFilter(e.shiftKey);o&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:o},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let 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 O.UP:case O.DOWN:case O.LEFT:case O.RIGHT:if(t)return;bn(e);case O.ENTER:t&&wn(this.eGui)&&e.preventDefault();break;case O.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"),i=!!e.relatedTarget&&on(e.relatedTarget,"ag-floating-filter");if(s&&i&&e.target===this.eGui){const n=this.lastFocusEvent,o=!!(n&&n.key===O.TAB);if(n&&o){const r=n.shiftKey;wn(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new rp(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!Vt(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:i}=this,n=o=>{if(o?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const r=this.comp.getFloatingFilterComp();r&&r.then(a=>{if(a){if(i.get("enableFilterHandlers")){const d=o;let u="filter";d?.afterFloatingFilter?u="ui":d?.afterDataChange?u="dataChanged":o?.source==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}const l=t?.getCurrentFloatingFilterParentModel(s),c=o?{...o,columns:o.columns??[],source:o.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,c)}})};[this.destroySyncListener]=e.addManagedListeners(s,{filterChanged:n}),t?.isFilterActive(s)&&n(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 i=this.beans.colFilter,n=this.active?i?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,o=this.comp.getFloatingFilterComp();!o||!n?this.updateCompDetails(e,n,s):o.then(r=>{!r||i?.areFilterCompsDifferent(this.userCompDetails??null,n)?this.updateCompDetails(e,n,s):this.updateFloatingFilterParams(n,"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(i=>{typeof i?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(s={...s,model:wt(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),i.refresh(s))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function m8(e,t){const s=e.colModel.getCol(t);if(!s){je(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:s,positionBy:"auto"})}function v8(e){e.menuSvc?.hidePopupMenu()}var C8=class extends B{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(am(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(){am(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(Vt(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&Ti(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(cn()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!Vt(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!Vt(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 Vt(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,s,i){const{positionBy:n,onClosedCallback:o}=t,r=t.column;if(n==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,s,o,i)}else if(n==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,s,o,i)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),ai(a,()=>{const c=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);c&&e?.showMenuAfterButtonClick(r,c.getAnchorElementForMenu(i),s,o,i)})}}};function rm(e,t,s){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",s))}function am(e){const{enterpriseMenuFactory:t,filterMenuFactory:s,gos:i}=e;return t&&Vt(i)?t:s}var w8={moduleName:"SharedMenu",version:Q,beans:[C8],apiFunctions:{showColumnMenu:m8,hidePopupMenu:v8}},b8=".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;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){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{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%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){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(.ag-input-field-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;gap:var(--ag-widget-vertical-spacing);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:var(--ag-widget-container-vertical-padding);: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 x8(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function y8(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function S8(e,t){const s=e.colModel.getColDefCol(t);if(s)return e.colFilter?.destroyFilter(s,"api")}function R8(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function F8(e){return e.filterManager?.getFilterModel()??{}}function E8(e,t,s){const{gos:i,colModel:n,colFilter:o}=e;s&&!i.get("enableFilterHandlers")&&(q(288),s=!1);const r=n.getColDefCol(t);return r?o?.getModelForColumn(r,s)??null:null}function D8(e,t,s){return e.filterManager?.setColumnFilterModel(t,s)??Promise.resolve()}function P8(e,t){const s=e.colModel.getCol(t);if(!s){je(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:s,containerType:"columnFilter",positionBy:"auto"})}function T8(e){e.menuSvc?.hideFilterMenu()}function k8(e,t){const s=e.colModel.getCol(t);if(!s){je(12,{colKey:t});return}return e.colFilter?.getHandler(s,!0)}function I8(e,t){const{colModel:s,colFilter:i,gos:n}=e;if(!n.get("enableFilterHandlers")){q(287);return}const{colId:o,action:r}=t;if(o){const a=s.getColById(o);a&&i?.updateModel(a,r)}else i?.updateAllModels(r)}var lm={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},cm=["january","february","march","april","may","june","july","august","september","october","november","december"];function M8(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function A8(e,t){if(e==null)return-1;if(t==null)return 1;const s=jt(e),i=jt(t);return s!=null&&i!=null?s===i?0:s>i?1:-1:String(e).localeCompare(String(t))}function dm(e){return e instanceof Date&&!isNaN(e.getTime())}var nh={number:()=>{},bigint:()=>{},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:dm}),dateString:({dataTypeDefinition:e})=>({comparator:(t,s)=>{const i=e.dateParser(s);return s==null||i<t?-1:i>t?1:0},isValidDate:t=>typeof t=="string"&&dm(e.dateParser(t))}),dateTime:e=>nh.date(e),dateTimeString:e=>nh.dateString(e),object:()=>{},text:()=>{}},oh={number:()=>({comparator:M8}),bigint:()=>({comparator:A8}),boolean:({t:e})=>({valueFormatter:t=>se(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:s=>{const i=e(s);return se(i)?i:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(s,i)=>{if(s==="NaN")return t("invalidDate","Invalid Date");if(i===1&&s!=null){const n=cm[Number(s)-1];return t(n,lm[n])}return s??t("blanks","(Blanks)")},treeListPathGetter:s=>tl(s,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:s})=>({valueFormatter:i=>{const n=e(i);return se(n)?n:s("blanks","(Blanks)")},treeList:!0,treeListPathGetter:i=>tl(t.dateParser(i??void 0),!1),treeListFormatter:(i,n)=>{if(n===1&&i!=null){const o=cm[Number(i)-1];return s(o,lm[o])}return i??s("blanks","(Blanks)")}}),dateTime:e=>{const t=oh.date(e);return t.treeListPathGetter=tl,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,s=oh.dateString(e);return s.treeListPathGetter=i=>tl(t(i??void 0)),s},object:({formatValue:e,t})=>({valueFormatter:s=>{const i=e(s);return se(i)?i:t("blanks","(Blanks)")}}),text:()=>{}};function L8(e,t,s,i,n,o,r){let a=t,l=s;const c=e==="agSetColumnFilter";!l&&i.baseDataType==="object"&&!c&&(l=({column:g,node:m})=>n({column:g,node:m,value:o.valueSvc.getValue(g,m,"data")}));const u=(c?oh:nh)[i.baseDataType],h=u({dataTypeDefinition:i,formatValue:n,t:r});return a=typeof t=="object"?{...h,...t}:h,{filterParams:a,filterValueGetter:l}}var O8={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},N8={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function H8(e,t=!1){return(t?N8:O8)[e??"text"]}function G8(e,t,s){if(t==null)return null;let i=null;const{compName:n,jsComp:o,fwComp:r}=SC(e,t);return n?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[n]:o==null&&r==null&&t.filter===!0&&(i=s()),i}var B8={filterHandler:()=>({doesFilterPass:()=>!0})};function um(e,t,s,i){if(!e.isPrimary())return!0;const o=!s;return!e.isValueActive()||!o?!1:t?!0:i}var V8=class extends B{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={...m1},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.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:i,dataTypeSvc:n,filterManager:o}=this.beans;if(n?.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=i.getColDefCol(c)||i.getCol(c);if(!d){q(62,{colId:c});return}if(!d.isFilterAllowed()){q(63,{colId:c});return}const u=this.getOrCreateFilterWrapper(d,!0);if(!u){q(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))});Oe.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;Br(h,g)||c.push(d.column)}),c.length>0?o?.onFilterChanged({columns:c,source:t}):s&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:s,initialModel:i,beans:{colModel:n}}=this;if(s.forEach((o,r)=>{const a=this.getModelFromFilterWrapper(o);se(a)&&(t[r]=a)}),!e)for(const o of Object.keys(i)){const r=i[o];se(r)&&!s.has(o)&&n.getCol(o)?.isFilterAllowed()&&(t[o]=r)}return t}setState(e,t,s="api"){if(this.state.clear(),t)for(const i of Object.keys(t)){const n=t[i];this.state.set(i,{model:wt(this.model,i),state:n})}this.setModel(e,s,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let s=!1;return e.forEach((i,n)=>{const o=i.state;o!=null&&(s=!0,t[n]=o)}),s?t:void 0}getModelFromFilterWrapper(e){const s=e.column.getColId();if(e.isHandler)return wt(this.model,s);const i=e.filter;return i?typeof i.getModel!="function"?(q(66),null):i.getModel():wt(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=l=>l?l.isFilterActive?l.isFilterActive():(q(67),!1):!1,{colModel:t,gos:s}=this.beans,i=!!Ol(s),n=[],o=[],r=(l,c,d)=>{c&&(um(l,t.isPivotMode(),t.isPivotActive(),i)?n.push(d):o.push(d))},a=[];return this.allColumnFilters.forEach(l=>{const c=l.column,d=c.getColId();if(l.isHandler)a.push(Oe.resolve().then(()=>{r(c,this.isHandlerActive(c),{colId:d,isHandler:!0,handler:l.handler,handlerParams:l.handlerParams})}));else{const u=vi(l);u&&a.push(u.then(h=>{r(c,e(h),{colId:d,isHandler:!1,comp:h})}))}}),Oe.all(a).then(()=>{this.activeAggregateFilters=n,this.activeColumnFilters=o})}updateFilterFlagInColumns(e,t){const s=[];return this.allColumnFilters.forEach(i=>{const n=i.column;if(i.isHandler)s.push(Oe.resolve().then(()=>{this.setColFilterActive(n,this.isHandlerActive(n),e,t)}));else{const o=vi(i);o&&s.push(o.then(r=>{this.setColFilterActive(n,r.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),Oe.all(s)}doFiltersPass(e,t,s){const{data:i,aggData:n}=e,o=s?this.activeAggregateFilters:this.activeColumnFilters,r=s?n:i,a=this.model;for(let l=0;l<o.length;l++){const c=o[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:wt(a,d),handlerParams:g}))return!1}else{const h=c.comp;if(typeof h.doesFilterPass!="function"){je(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,i=()=>{this.isAlive()&&s?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:s}=e,i=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",s).then(()=>{this.allColumnFilters.forEach(n=>{const{column:o,isHandler:r}=n;i!==o.getColId()&&(r&&n.handler.onAnyFilterChanged?.(),vi(n,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 i=s.isHandler;i&&s.handler.onNewRowsLoaded?.();const n=vi(s,i);n&&t.push(n.then(o=>{o.onNewRowsLoaded?.()}))}),Oe.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:i}=this.beans;return(n,o)=>{const r=o?i.getCol(o):e;return r?s.getValue(r,n,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():wt(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=se(wt(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?vi(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const s=vi(t);return s?s.then(i=>({comp:i,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 SR(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":H8(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,s,i,n,o){const r=()=>{const c=this.createFilterCompParams(e,n,o),d=i(c,n);return k3(this.beans.userCompFactory,t,d,s)},a=r();return a?{compDetails:a,createFilterUi:c=>(c?r():a).newAgStackInstance()}:null}createFilterInstance(e,t,s,i){const n=this.beans.selectableFilter;n?.isSelectable(t)&&(t=n.getFilterDef(e,t));const{handler:o,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,s)??{},l=this.createFilterComp(e,t,s,i,!!o,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:o,handlerGenerator:a,handlerParams:r};const{compDetails:c,createFilterUi:d}=l;return this.isGlobalButtons&&(c.params?.buttons?.length||q(281,{colId:e.getColId()})),{compDetails:c,handler:o,handlerGenerator:a,handlerParams:r,createFilterUi:d}}createBaseFilterParams(e,t){const{filterManager:s,rowModel:i}=this.beans;return xe(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:n=>s?.doesRowPassOtherFilters(e.getColId(),n)??!0,rowModel:i})}createFilterCompParams(e,t,s,i){const n=this.filterChangedCallbackFactory(e),o=this.createBaseFilterParams(e,i);if(o.filterChangedCallback=n,o.filterModifiedCallback=i?()=>{}:r=>this.filterModified(e,r),t){const r=o,a=e.getColId(),l=wt(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(()=>{n({...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 o}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,s){const i=t(),n={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(s),n}createFilterWrapper(e){const{compDetails:t,handler:s,handlerGenerator:i,handlerParams:n,createFilterUi:o}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),r=e.getColId();if(s)return delete this.initialModel[r],s.init?.({...n,source:"init",model:wt(this.model,r)}),{column:e,isHandler:!0,handler:s,handlerGenerator:i,handlerParams:n,filterUi:this.createFilterUiForHandler(t,o)};if(o){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,o,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,s){const{gos:i,frameworkOverrides:n,registry:o}=this.beans;let r;const a=g=>{const m=g.filter;if(bC(m)){const v=m.handler;return v||(r=m.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof m=="string"?m:void 0},l=i.get("enableFilterHandlers"),c=l?a(t):void 0,d=g=>()=>this.createBean(o.createDynamicBean(g,!0));let u,h;if(typeof c=="string"){const g=i.get("filterHandlers")?.[c];g!=null?u=g:p8.has(c)&&(u=d(c),h=c)}else u=c;if(!u){let g;const{compName:m,jsComp:v,fwComp:C}=SC(n,t);m?g=m:v==null&&C==null&&t.filter===!0&&(g=s),h=this.handlerMap[g],h&&(u=d(h))}return u?{filterHandler:u,handlerNameOrCallback:r??h}:l?(it(i)&&q(277,{colId:e.getColId()}),B8):void 0}createHandler(e,t,s){const i=this.createHandlerFunc(e,t,s);if(!i)return;const n=Pd(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:o,filterHandler:r}=i,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,n);return{handler:a,handlerParams:l,handlerGenerator:o??r}}createHandlerFromFunc(e,t,s){const i=e.getColDef(),n=t(xe(this.gos,{column:e,colDef:i})),o=this.createHandlerParams(e,s);return{handler:n,handlerParams:o}}createHandlerParams(e,t){const s=e.getColDef(),i=e.getColId(),n=this.filterChangedCallbackFactory(e);return xe(this.gos,{colDef:s,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:o=>this.beans.filterManager?.doesRowPassOtherFilters(i,o)??!0,onModelChange:(o,r)=>{this.updateStoredModel(i,o),this.refreshHandlerAndUi(e,o,"handler",!1,r).then(()=>{n({...r,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:s,groupFilter:i}=this.beans;this.allColumnFilters.forEach((o,r)=>{let a;o.column.isPrimary()?a=t.getColDefCol(r):a=t.getCol(r),!(a&&a===o.column)&&(e.push(o.column),this.disposeFilterWrapper(o,"columnChanged"),this.disposeColumnListener(r))});const n=i&&e.every(o=>i.isGroupFilter(o));e.length>0&&!n&&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:i,selectableFilter:n,gos:o}=this.beans,r=g=>{this.getOrCreateFilterUi(e)?.then(v=>{g(yn(v))})},a=e.getColDef(),l=n?.isSelectable(a)?n.getFilterDef(e,a):a,c=G8(i,l,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",d=o.get("enableFilterHandlers"),u=Pd(s,l,this.createFilterCompParams(e,d,"init",!0)),h=xe(o,{column:e,filterParams:u,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:r,showParentFilter:t});if(d){const g=h,m=e.getColId(),v=this.filterChangedCallbackFactory(e);g.onUiChange=C=>this.floatingFilterUiChanged(e,C),g.model=wt(this.model,m),g.onModelChange=(C,w)=>{this.updateStoredModel(m,C),this.refreshHandlerAndUi(e,C,"floating",!0,w).then(()=>{v({...w,source:"columnFilter"})})},g.getHandler=()=>this.getHandler(e,!0),g.source="init"}return A3(s,a,h,c)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,s,i){const n="paramsUpdated";if(e.isHandler){const o=t.getColId();delete this.initialModel[o],this.state.delete(o);const r=e.filterUi,a=this.createFilterUiForHandler(s,i);e.filterUi=a;const l=this.eventSvc;r?.created?r.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:n,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:n,column:t})}else this.destroyFilter(t,n)}destroyFilter(e,t="api"){const s=e.getColId(),i=this.allColumnFilters.get(s);this.disposeColumnListener(s),delete this.initialModel[s],i&&this.disposeFilterWrapper(i,t).then(n=>{n&&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:i,isHandler:n,filterUi:o}=e,r=i.getColId();n&&(s=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const a=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(o){if(o.created)return o.promise.then(l=>(s=n?s:!!l?.isFilterActive(),this.destroyBean(l),a(),s));a()}return Oe.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 i=this.beans,n=s.column,o=n.getColDef(),r=n.isFilterAllowed(),a=this.getDefaultFilter(n),l=i.selectableFilter,c=l?.isSelectable(o)?l.getFilterDef(n,o):o,d=r?this.createHandlerFunc(n,c,this.getDefaultFilter(n)):void 0,u=!!d,h=s.isHandler;if(h!=u){this.destroyFilter(n,"paramsUpdated");return}const{compDetails:g,createFilterUi:m}=(r?this.createFilterComp(n,c,a,C=>C,u,"colDef"):null)??{compDetails:null,createFilterUi:null},v=g?.params??Pd(i.userCompFactory,c,this.createFilterCompParams(n,u,"colDef"));if(h){const C=d?.handlerNameOrCallback??d?.filterHandler,w=wt(this.model,e);if(s.handlerGenerator!=C){const b=s.handler,{handler:x,handlerParams:y}=this.createHandlerFromFunc(n,d.filterHandler,v);s.handler=x,s.handlerParams=y,s.handlerGenerator=C,delete this.model[e],x.init?.({...y,source:"init",model:null}),this.destroyBean(b),w!=null&&this.beans.filterManager?.onFilterChanged({columns:[n],source:t})}else{const b=this.createHandlerParams(n,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,n,g,m);return}s.filterUi.filterParams=v,vi(s,h)?.then(C=>{(C?.refresh?C.refresh(v):!0)===!1?this.destroyFilterUi(s,n,g,m):this.dispatchLocalEvent({type:"filterParamsChanged",column:n,params:v})})}refreshHandlerAndUi(e,t,s,i,n){const o=this.cachedFilter(e);if(!o)return i&&this.getOrCreateFilterWrapper(e,!0),Oe.resolve();if(!o.isHandler)return Oe.resolve();const{filterUi:r,handler:a,handlerParams:l}=o;return g8(()=>{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 Oe.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},s,n)}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:i}=t;return!(s===i||s?.render&&i?.render&&s.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const s=this.getOrCreateFilterUi(t);return s?new Promise(i=>{s.then(n=>{i(yn(n))})}):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:i,model:n}=this,o=e.getColId(),r=i.get(o);return r?r.model??null:wt(n,o)}const s=this.cachedFilter(e);return s?this.getModelFromFilterWrapper(s):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let s=()=>{};const i=new Promise(n=>{s=n});return this.columnModelUpdates.push({key:e,model:t,resolve:s}),i}return new Promise(s=>{this.setModelForColumnLegacy(e,t).then(i=>s(i))})}getStateForColumn(e){return this.state.get(e)??{model:wt(this.model,e)}}setModelForColumnLegacy(e,t){const s=this.beans.colModel.getColDefCol(e),i=s?this.getOrCreateFilterWrapper(s,!0):null;return i?this.setModelOnFilterWrapper(i,t):Oe.resolve()}setColDefPropsForDataType(e,t,s){const i=e.filter,n=i===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):i;if(typeof n!="string")return;let o,r;const a=this.beans,{filterParams:l,filterValueGetter:c}=e;n==="agMultiColumnFilter"?{filterParams:o,filterValueGetter:r}=a.multiFilter?.getParamsForDataType(l,c,t,s)??{}:{filterParams:o,filterValueGetter:r}=L8(n,l,c,t,s,a,this.getLocaleTextFunc()),e.filterParams=o,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,s,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",s)),e.dispatchColEvent("filterChanged",s,i)}setModelOnFilterWrapper(e,t,s){return new Oe(i=>{if(e.isHandler){const o=e.column,r=o.getColId(),a=this.model[r];if(this.updateStoredModel(r,t),s&&t===a){i();return}this.refreshHandlerAndUi(o,t,"api").then(()=>i());return}const n=vi(e);if(n){n.then(o=>{if(typeof o?.setModel!="function"){q(65),i();return}(o.setModel(t)||Oe.resolve()).then(()=>i())});return}i()})}updateStoredModel(e,t){se(t)?this.model[e]=t:delete this.model[e];const s=this.state.get(e),i={model:t,state:s?.state};this.state.set(e,i)}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 i=e.getColId(),n=this.cachedFilter(e),o=()=>n?.filterUi;om({action:t,filterParams:n?.filterUi?.filterParams,getFilterUi:o,getModel:()=>wt(this.model,i),getState:()=>this.state.get(i),updateState:r=>this.updateState(e,r),updateModel:r=>o()?.filterParams?.onModelChange(r,{...s,fromAction:t}),processModelToApply:n?.isHandler?n.handler.processModelToApply?.bind(n.handler):void 0})}updateAllModels(e,t){const s=[];this.allColumnFilters.forEach((i,n)=>{const o=this.beans.colModel.getColDefCol(n);o&&om({action:e,filterParams:i.filterUi?.filterParams,getFilterUi:()=>i.filterUi,getModel:()=>wt(this.model,n),getState:()=>this.state.get(n),updateState:r=>this.updateState(o,r),updateModel:r=>{this.updateStoredModel(n,r),this.dispatchLocalEvent({type:"filterAction",column:o,action:e}),s.push(this.refreshHandlerAndUi(o,r,"ui"))},processModelToApply:i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0})}),s.length&&Oe.all(s).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();C1(()=>this.cachedFilter(e)?.filterUi,()=>wt(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 n of s)if(n.source==="COLUMN_MENU")return!1;let i=!1;for(const n of e.keys()){const o=e.get(n);if(o.valid===!1)return!1;(o.model??null)!==wt(t,n)&&(i=!0)}return i}hasUnappliedModel(e){const{model:t,state:s}=this;return(s.get(e)?.model??null)!==wt(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}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:s}=this.beans,i=!!Ol(this.gos),n=e.currentValue,o=n?this.activeColumnFilters:this.activeAggregateFilters,r=n?this.activeAggregateFilters:this.activeColumnFilters,a=[];for(const l of o){const c=t.getColById(l.colId),d=n&&!!s?.columns.length;c&&n===um(c,n,d,i)&&(r.push(l),a.push(l))}o2(o,a)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function z8(e){return!!e.filterManager?.isAnyFilterPresent()}function W8(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var j8=class extends B{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos: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(){Ol(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:s,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):Oe.resolve()).then(()=>{const n={source:t,type:"filterChanged",columns:i};s&&Mt(n,s),this.eventSvc.dispatchEvent(n),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Ol(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(){q(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()}};function _8(e){return{tag:"div",cls:e}}var U8=class extends ot{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(_8(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const s=this.buttons;if(this.buttons=e,s===e)return;const i=this.getGui();Wt(i);let n;this.destroyListeners();const o=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)||q(75);const h=c==="apply",m=Qt({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([m]),h&&(n=m);const v=w=>{w.key===O.ENTER&&(w.preventDefault(),u(w))},C=this.listeners;m.addEventListener("click",u),C.push(()=>m.removeEventListener("click",u)),m.addEventListener("keydown",v),C.push(()=>m.removeEventListener("keydown",v)),o.append(m)};for(const c of e)a(c);this.eApply=n;const l=this.validationTooltipFeature;n&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!n&&l&&(this.validationTooltipFeature=this.destroyBean(l)),i.append(o)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const s=this.eApply;s&&(zr(s,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},$8=class extends ot{constructor(e,t,s,i,n,o){super(),this.column=e,this.wrapper=t,this.eventParent=s,this.updateModel=i,this.isGlobalButtons=n,this.enableGlobalButtonCheck=o,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,s=t,i=s.useForm,n=i?"form":"div";this.setTemplate({tag:n,cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:o=>{o?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=s,this.resetButtonsPanel(s),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:o,params:r})=>{o===this.column&&this.resetButtonsPanel(r,this.params)},filterStateChanged:({column:o,state:r})=>{o===this.column&&this.eButtons?.updateValidity(r.valid!==!1)},filterAction:({column:o,action:r,event:a})=>{o===this.column&&this.afterAction(r,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:o})=>{if(o!==this.isGlobalButtons){this.isGlobalButtons=o;const r=this.params;this.resetButtonsPanel(r,r,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,s){const{buttons:i,readOnly:n}=t??{},{buttons:o,readOnly:r,useForm:a}=e;if(!s&&n===r&&Br(i,o))return;const l=o&&o.length>0&&!e.readOnly&&!this.isGlobalButtons;let c=this.eButtons;if(l){const d=o.map(u=>{const h=`${u}Filter`;return{type:u,label:Cs(this,h)}});if(this.applyActive=xc(this.params),!c){c=this.createBean(new U8),this.appendChild(c.getGui());const u=this.column,h=g=>({event:m})=>{this.updateModel(u,g,{fromButtons:!0}),this.afterAction(g,m)};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&&(si(c.getGui()),this.eButtons=this.destroyBean(c))}close(e){const t=this.hidePopup;if(!t)return;const s=e,i=s?.key;let n;(i===O.ENTER||i===O.SPACE)&&(n={keyboardEvent:s}),t(n),this.hidePopup=null}afterAction(e,t){const{params:s,applyActive:i}=this,n=s?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),n&&i&&this.close(t);break}case"reset":{n&&i&&this.close();break}case"cancel":{n&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===O.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},q8=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",K8={tag:"div",cls:"ag-filter"},Y8=class extends ot{constructor(e,t,s){super(K8),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(()=>{})??Oe.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:i}}=this,n=i.getFilterUiForDisplay(t)??null;this.wrapper=n,n?.then(o=>{if(!o)return;const{isHandler:r,comp:a}=o;let l;if(r){const c=!!this.enableGlobalButtonCheck,d=this.createBean(new $8(t,o,i,i.updateModel.bind(i),c&&i.isGlobalButtons,c));this.comp=d,l=d.getGui()}else this.registerCSS(q8),l=a.getGui(),se(l)||q(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)&&(Wt(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()}},Z8=class extends B{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,s,i){e&&!e.isColumn||this.showPopup(e,n=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:s,mouseEvent:t,ePopup:n})},s,t.target,Vt(this.gos),i)}showMenuAfterButtonClick(e,t,s,i){if(e&&!e.isColumn)return;let n=-1,o="left";const r=Vt(this.gos);!r&&this.gos.get("enableRtl")&&(n=1,o="right");const a=r?void 0:4*n,l=r?void 0:4;this.showPopup(e,c=>{this.popupSvc?.positionPopupByComponent({type:s,eventSource:t,ePopup:c,nudgeX:a,nudgeY:l,alignSide:o,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},s,t,r,i)}showPopup(e,t,s,i,n,o){const r=e?this.createBean(new Y8(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){je(57);return}const a=Qt({tag:"div",cls:`ag-menu${n?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:v=>this.trapFocusWithin(v,a)}),a.appendChild(r?.getGui());let l;const c=()=>r?.afterGuiDetached(),d=RR(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=v=>{rm(e,!1,"contextMenu");const C=v instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),C&&i&&xs(i)&&kC(i)?.focus({preventScroll:!0}),c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,s,e),o?.()},h=this.getLocaleTextFunc(),g=n&&s!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),m=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(a),anchorToElement:d,ariaLabel:g});m&&(this.hidePopup=l=m.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:s,hidePopup:l})}),rm(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,s,e)}trapFocusWithin(e,t){e.key!==O.TAB||e.defaultPrevented||In(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),wn(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()}},X8=class extends B{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,s){if(!t)return;const i=e.getColDef(),{selectableFilter:n,valueSvc:o,formula:r}=this.beans,a=s??n?.getFilterValueGetter(e.getColId())??i.filterValueGetter;if(a)return this.executeFilterValueGetter(a,t.data,e,t,i);const l=o.getValue(e,t,"data");return e.isAllowFormula()&&r?.isFormula(l)?r.resolveValue(e,t):l}executeFilterValueGetter(e,t,s,i,n){const{expressionSvc:o,valueSvc:r}=this.beans,a=xe(this.gos,{data:t,node:i,column:s,colDef:n,getValue:r.getValueCallback.bind(r,i)});return typeof e=="function"?e(a):o?.evaluate(e,a)}},Q8={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},J8=class extends ot{constructor(){super(Q8,[Pc]),this.eFloatingFilterText=ue}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,i=s.getHandler();if(i.getModelAsString){const n=i.getModelAsString(s.model);this.eFloatingFilterText.setValue(n)}}}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)}},eA=class extends dp{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)}},Rp=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"]],i=n=>n.some(o=>t[o]!=null)?!0:(q(72,{keys:n}),!1);if(!s.every(i)){this.filterOptions=e.filter(n=>n===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;q(73)}else q(74)}getCustomOption(e){return this.customFilterOptions[e]}};function Mr(e,t,s){return s==null?e.splice(t):e.splice(t,s)}function ec(e){return e==null||typeof e=="string"&&e.trim().length===0}function tA(e){return e==="AND"||e==="OR"?e:"AND"}function sA(e,t,s){if(e==null)return;const{predicate:i}=e;if(i!=null&&!t.some(n=>n==null))return i(t,s)}function iA(e,t){let s=e.length;return s>t&&(e.splice(t),q(78),s=t),s}var nA=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function Ii(e,t){const s=t.getCustomOption(e);if(s){const{numberOfInputs:i}=s;return i??1}return e&&nA.has(e)?0:e==="inRange"?2:1}var kc=class extends U3{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 Rp;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=tA(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),Bt(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,s)=>{const i=s===0?e:this.optionsFactory.defaultOption;t.setValue(i,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const s=!e.operator,i=!t.operator;if(!s&&i||s&&!i)return!1;let o;if(s){const r=e,a=t;o=this.areSimpleModelsEqual(r,a)}else{const r=e,a=t;o=r.operator===a.operator&&Li(r.conditions,a.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return o}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),Oe.resolve();if(e.operator){const i=e;let n=i.conditions;n==null&&(n=[],q(77));const o=iA(n,this.maxNumConditions),r=this.getNumConditions();if(o<r)this.removeConditionsAndOperators(o);else if(o>r)for(let l=r;l<o;l++)this.createJoinOperatorPanel(),this.createOption();const a=i.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),n.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{const i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),Oe.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(q(79),t=1),this.maxNumConditions=t;let s=e.numAlwaysVisibleConditions??1;s<1&&(q(80),s=1),s>t&&(q(81),s=t),this.numAlwaysVisibleConditions=s}createOption(){const e=this.getGui(),t=this.createManagedBean(new Sp);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 i=this.getNumConditions()-1;this.forEachPositionInput(i,n=>this.resetInput(n)),this.addChangedListeners(t,i)}createJoinOperatorPanel(){const e=Qt({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 i=this.eJoinPanels.length-1,n=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,n),this.resetJoinOperatorOr(s,i,n),this.isReadOnly()||(t.onValueChange(this.listener),s.onValueChange(this.listener))}createJoinOperator(e,t,s){const i=this.createManagedBean(new eA);e.push(i);const n="ag-filter-condition-operator";return i.addCss(n),i.addCss(`${n}-${s}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const 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 i=e+1,n=s-i;n>0&&this.removeConditionsAndOperators(i,n),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,n)=>{const o=this.isConditionDisabled(n,e);i.setDisabled(o||this.filterListOptions.length<=1),n===1&&(zr(this.eJoinPanels[0],o),this.eJoinAnds[0].setDisabled(o),this.eJoinOrs[0].setDisabled(o))}),this.eConditionBodies.forEach((i,n)=>{Ke(i,this.isConditionBodyVisible(n))});const s=(t??this.getJoinOperator())==="OR";for(const i of this.eJoinAnds)i.setValue(!s,!0);for(const i of this.eJoinOrs)i.setValue(s,!0);this.forEachInput((i,n,o,r)=>{this.setElementDisplayed(i,n<r),this.setElementDisabled(i,this.isConditionDisabled(o,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:s,eConditionBodies:i,eJoinPanels:n,eJoinAnds:o,eJoinOrs:r}=this;this.removeComponents(s,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(n,a,t),this.removeComponents(o,a,t),this.removeComponents(r,a,t)}removeElements(e,t,s){const i=Mr(e,t,s);for(const n of i)si(n)}removeComponents(e,t,s){const i=Mr(e,t,s);for(const n of i)si(n.getGui()),this.destroyBean(n)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const s=this.getInputs(0)[0];s instanceof en&&this.isConditionBodyVisible(0)?t=s.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,s=-1,i=!1;const n=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),i=!0,l&&s--)}let o=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),o=!0),this.shouldAddNewConditionAtEnd(s===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),o=!0),o&&this.updateConditionStatusesAndValues(s,n),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=s}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){const e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:s}=this;this.forEachInput((i,n,o,r)=>{if(!(i instanceof en))return;const a=n===0&&r>1?"inRangeStart":n===0?"filterOoo":"inRangeEnd",l=n===0&&r>1?e("ariaFilterFromValue","Filter from value"):n===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),c=s[o].getValue(),d=AC(this,t,a,c);i.setInputPlaceholder(d),i.setInputAriaLabel(l)})}setElementValue(e,t,s){e instanceof en&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){Yg(e)&&Ke(e.getGui(),t)}setElementDisabled(e,t){Yg(e)&&zr(e.getGui(),t)}attachElementOnChange(e,t){e instanceof en&&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 i=Ii(t,this.optionsFactory),n=this.getInputs(e);for(let o=0;o<n.length;o++){const r=n[o];r!=null&&s(r,o,e,i)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return Ii(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(s=>s==null)||this.positionHasInvalidInputs(e))}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,i,n){this.updateJoinOperatorDisabled(e.setValue(s,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${n}`).setLabel(i),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((i,n,o)=>{o===t&&this.setElementValue(i,s[n]!=null?s[n]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,s,i)=>{this.setElementValue(t,s===0&&i===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}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},Fp=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function rh(e){return e?.allowedCharPattern??null}function w1(e,t){const{filter:s,filterTo:i,type:n}=e||{};return[jt(s),jt(i)].slice(0,Ii(n,t))}var oA=class extends kc{constructor(){super("bigintFilter",w1,Fp),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Eo()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],s=this.eValuesTo[e];this.refreshInputPairValidation(t,s)}}refreshInputPairValidation(e,t,s=!1){const{bigintParser:i}=this.params,n=this.getParsedValue(e,i),o=this.getParsedValue(t,i),r=this.isInvalidValue(e,n),a=this.isInvalidValue(t,o),l=s?e:t,c=s?t:e,d=s?r:a,u=s?a:r;let h="";if(d)h=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt");else if(!r&&!a){const g=rA(n,o,s);g&&(h=this.translate(g,[String(s?t.getValue():e.getValue())]))}l.setCustomValidity(h),u||c.setCustomValidity(""),h.length>0&&this.beans.ariaAnnounce.announceValue(h,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:s,additionalEventAttributes:i}=e,n=this.state,o=i?.fromAction;return(o&&o!="apply"||s.model!==n.model||!this.areStatesEqual(s.state,n.state))&&this.refreshInputValidation(),t}setElementValue(e,t,s){super.setElementValue(e,t,s),t===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:s}=this,i=rh(e),n=Qt({tag:"div",cls:"ag-filter-body",role:"presentation"}),o=this.createFromToElement(n,t,"from",i),r=this.createFromToElement(n,s,"to",i),a=(d,u,h)=>()=>this.refreshInputPairValidation(d,u,h),l=a(o,r,!0);o.onValueChange(l),o.addGuiEventListener("focusin",l);const c=a(o,r,!1);return r.onValueChange(c),r.addGuiEventListener("focusin",c),n}createFromToElement(e,t,s,i){const n=this.createManagedBean(i?new ni({allowedCharPattern:i}):new ni);return n.addCss(`ag-filter-${s}`),n.addCss("ag-filter-filter"),t.push(n),e.appendChild(n.getGui()),n}removeEValues(e,t){const s=i=>this.removeComponents(i,e,t);s(this.eValuesFrom),s(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(s,i,n,o)=>{i<o&&t.push(jt(s.getValue()??null))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(s.filter=String(i[0])),i.length>1&&(s.filterTo=String(i[1])),s}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}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=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,s=>t||(t=!s.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){const s=e.getValue();return s==null||typeof s=="string"&&s.trim()===""?null:t?t(s):jt(s)}isInvalidValue(e,t){const s=e.getValue();return s!=null&&String(s).trim()!==""&&t===null}};function rA(e,t,s){return e!=null&&t!=null&&e>=t?`strict${s?"Max":"Min"}ValueValidation`:null}var b1=class extends B{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,s=new Rp;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,i=[];if(s){const r=t;i.push(...r.conditions??[])}else i.push(t);const n=s&&s==="OR"?"some":"every",o=this.params.getValue(e.node);return i[n](r=>this.individualConditionPasses(e,r,o))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:s,maxNumConditions:i}}=e;if(t==null)return;let o=RC(t)?t.conditions:[t];const r=s?.map(d=>typeof d=="string"?d:d.displayKey)??this.defaultOptions;if(!(!o||o.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((o&&!o.every(d=>d.filterType===c)||t.filterType!==c)&&(o=o.map(d=>({...d,filterType:c})),l=!0),typeof i=="number"&&o&&o.length>i&&(o=o.slice(0,i),l=!0),l){const d=o.length>1?{...t,filterType:c,conditions:o}:{...o[0],filterType:c};this.params={...e,model:d},e.onModelChange(d)}}individualConditionPasses(e,t,s){const i=this.optionsFactory,n=this.mapValuesFromModel(t,i),o=i.getCustomOption(t.type),r=sA(o,n,s);return r??(s==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(n,s,t,e))}},Ep=class extends b1{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:s,includeBlanksInGreaterThan:i,includeBlanksInLessThan:n,includeBlanksInRange:o}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(s)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(n)return!0;break;case"inRange":if(o)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,s){const i=s.type;if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const n=this.comparator(),o=e[0]!=null?n(e[0],t):0;switch(i){case"equals":return o===0;case"notEqual":return o!==0;case"greaterThan":return o>0;case"greaterThanOrEqual":return o>=0;case"lessThan":return o<0;case"lessThanOrEqual":return o<=0;case"inRange":{const r=n(e[1],t);return this.params.filterParams.inRangeInclusive?o>=0&&r<=0:o>0&&r<0}case"blank":return ec(t);case"notBlank":return!ec(t);default:return q(76,{filterModelType:i}),!0}}},Dp={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},aA={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Ic=class extends B{constructor(e,t,s){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=s}getModelAsString(e,t){const s=this.getLocaleTextFunc(),i=t==="filterToolPanel";if(!e)return i?Cs(this,"filterSummaryInactive"):null;if(e.operator!=null){const o=e,a=(o.conditions??[]).map(c=>this.getModelAsString(c,t)),l=o.operator==="AND"?"andCondition":"orCondition";return a.join(` ${Cs(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return i?Cs(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):s(e.type,e.type);{const o=e,r=this.optionsFactory.getCustomOption(o.type),{displayKey:a,displayName:l,numberOfInputs:c}=r||{};return a&&l&&c===0?s(a,l):this.conditionToString(o,i,o.type==="inRange"||c===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:s}=e;this.optionsFactory=t,this.filterParams=s}conditionForToolPanel(e,t,s,i,n,o){let r;const a=this.getTypeKey(e);return a&&(r=Cs(this,a)),n&&o&&(r=this.getLocaleTextFunc()(n,o)),r!=null?t?`${r} ${Cs(this,"filterSummaryInRangeValues",[s(),i()])}`:`${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)}},x1=class extends Ic{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=Dp}conditionToString(e,t,s,i,n){const{filter:o,filterTo:r,type:a}=e,l=this.formatValue.bind(this),c=jt(o),d=jt(r);if(t){const u=this.conditionForToolPanel(a,s,()=>l(c),()=>l(d),i,n);if(u!=null)return u}return s?`${l(c)}-${l(d)}`:o!=null?l(c):`${a}`}},lA=class extends Ep{constructor(){super(w1,Fp),this.filterType="bigint",this.FilterModelFormatterClass=x1}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return jt(e)!==null}},Pp=class extends B{constructor(e){super(),this.params=e,this.eInput=ue,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new ni(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const s=i=>this.onValueChanged(i);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,placeholder:s}){const{eInput:i}=this;i.setInputAriaLabel(e),t!==void 0&&i.setAutoComplete(t),i.toggleCss("ag-floating-filter-search-icon",!!s),i.setInputPlaceholder(s)}};function ah(e){const t=e?.trim();return t===""?e:t}function y1(e,t){const{filter:s,filterTo:i,type:n}=e||{};return[s||null,i||null].slice(0,Ii(n,t))}var S1=class extends ot{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 Rp;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 i=this.isTypeEditable(s);this.setEditable(i)}refresh(e){this.params=e;const t=e,s=this.reactive;if((!s||t.source==="colDef")&&this.updateParams(e),s){const{source:i,model:n}=t;if(i==="dataChanged"||i==="ui")return;this.onModelUpdated(n)}}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)}isTypeEditable(e){return!!e&&!this.readOnly&&Ii(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},cA={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},Tp=class extends S1{constructor(){super(...arguments),this.eFloatingFilterInputContainer=ue,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(cA)}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{inputSvc:t,defaultDebounceMs:s,readOnly:i}=this,{filterPlaceholder:n,column:o,browserAutoComplete:r,filterParams:a}=e,l=this.lastType??this.optionsFactory.defaultOption,c=e.filterParams.filterPlaceholder,d=n===!0?AC(this,c,"filterOoo",l):n||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(o),autoComplete:r??!1,placeholder:d}),this.applyActive=xc(a),!i){const u=Qh(a,s);t.setValueChangedListener(ht(this,this.syncUpWithParentFilter.bind(this),u))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,s=t.getValue();Wt(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(s,!0)}syncUpWithParentFilter(e){const t=e.key===O.ENTER,s=this.reactive;if(s&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:i,params:n,lastType:o}=this;let r=i.getValue();if(n.filterParams.trimInput&&(r=ah(r),i.setValue(r,!0)),s){const a=n,l=a.model,c=this.convertValue(r),d=c==null?null:{...l??{filterType:this.filterType,type:o??this.optionsFactory.defaultOption},filter:c};a.onModelChange(d,{afterFloatingFilter:!0})}else n.parentFilterInstance(a=>{a?.onFloatingFilterChanged(o||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},dA=class extends Tp{constructor(){super(...arguments),this.FilterModelFormatterClass=x1,this.filterType="bigint",this.defaultOptions=Fp}updateParams(e){const t=e.filterParams;rh(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams;this.allowedCharPattern=rh(t),this.bigintParser=t?.bigintParser;const s=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new Pp({config:s}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):jt(e)}},hm=".ag-input-field-input",R1=class{constructor(e,t,s,i,n,o){this.context=e,this.eParent=n,this.alive=!0,this.debouncedReport=ht({isAlive:()=>this.alive},pm,500),this.timeoutHandle=null,I3(t,s,i)?.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;n.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:c}=this;l&&a.setDate(l),c!=null&&a.setDisabled?.(c),o?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){Ke(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)}setCustomValidity(e,t=!1){const s=this.dateComp?.getGui().querySelector(hm);if(s&&"setCustomValidity"in s){const i=e.length>0;s.setCustomValidity(e),i?t?this.timeoutHandle=this.debouncedReport(s):pm(s):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),Lh(s,i)}}getValidity(){return this.dateComp?.getGui().querySelector(hm)?.validity}};function pm(e){e.reportValidity()}var kp=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function F1(e,t){const{dateFrom:s,dateTo:i,type:n}=e||{};return[s&&Nt(s,void 0,!0)||null,i&&Nt(i,void 0,!0)||null].slice(0,Ii(n,t))}var gm=1e3,fm=1/0,uA=class extends kc{constructor(){super("dateFilter",F1,kp),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=gm,this.maxValidYear=fm,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Eo()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,c)=>{const d=e[l];if(d!=null)if(isNaN(d))q(82,{param:l});else return d==null?c:Number(d);return c},s=t("minValidYear",gm),i=t("maxValidYear",fm);this.minValidYear=s,this.maxValidYear=i,s>i&&q(83);const{minValidDate:n,maxValidDate:o}=e,r=n instanceof Date?n:Nt(n);this.minValidDate=r;const a=o instanceof Date?o:Nt(o);this.maxValidDate=a,r&&a&&r>a&&q(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,s=!1){const{dateConditionFromComps:i,dateConditionToComps:n,beans:o}=this,r=i[e],a=n[e],l=Ii(this.getConditionType(e),this.optionsFactory),c=r.getDate(),d=a.getDate(),u=l>=2?hA(c,d,t):null,h=u?this.translate(u,[String(t?d:c)]):"",g=!Eo()&&!s;(t?r:a).setCustomValidity(h,g),(t?a:r).setCustomValidity("",g),h.length>0&&o.ariaAnnounce.announceValue(h,"dateFilter")}createDateCompWrapper(e,t,s){const{beans:{userCompFactory:i,context:n,gos:o},params:r}=this,a=s==="from",l=new R1(n,i,r.colDef,xe(o,{onDateChanged:()=>{this.refreshInputPairValidation(t,a),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,a),filterParams:r,location:"filter"}),e);return this.addDestroyFunc(()=>l.destroy()),l}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=Qt({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,i){const n=Qt({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(n),e.appendChild(n),s.push(this.createDateCompWrapper(n,t.length-1,i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),Mr(this.eConditionPanelsFrom,e,t),Mr(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,s){const i=Mr(e,t,s);for(const n of i)n.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:s,minValidYear:i,maxValidYear:n}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<i)return!1;if(s){if(e>s)return!1}else if(e.getUTCFullYear()>n)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=t.getDate()!=null&&!(t.getValidity()?.valid??!0))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,s=>t||(t=!(s.getValidity()?.valid??!0))),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(s,i,n,o)=>{!t||i>=o||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={},{params:i,filterType:n}=this,o=this.getValues(e),r=i.useIsoSeparator?"T":" ";return o.length>0&&(s.dateFrom=Lt(o[0],!0,r)),o.length>1&&(s.dateTo=Lt(o[1],!0,r)),{dateFrom:null,dateTo:null,filterType:n,type:t,...s}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),s=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.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,i,n,o)=>{i<o&&t.push(s.getDate())}),t}translate(e,t){let s=e;return e==="lessThan"?s="before":e==="greaterThan"&&(s="after"),super.translate(s,t)}};function hA(e,t,s){return e!=null&&t!=null&&e>=t?`${s?"max":"min"}DateValidation`:null}var E1=class extends Ic{constructor(e,t){super(e,t,s=>{const{dataTypeSvc:i,valueSvc:n}=this.beans,o=t.column,r=i?.getDateFormatterFunction(o),a=r?r(s??void 0):s;return n.formatValue(o,null,a)}),this.filterTypeKeys=Dp}conditionToString(e,t,s,i,n){const{type:o}=e,r=Nt(e.dateFrom),a=Nt(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):h=>H5(h,l),d=()=>r!==null?c(r):"null",u=()=>a!==null?c(a):"null";if(r==null&&a==null)return Cs(this,o);if(t){const h=this.conditionForToolPanel(o,s,d,u,i,n);if(h!=null)return h}return s?`${d()}-${u()}`:r!=null?c(r):`${o}`}};function pA(e,t){const s=t;return s<e?-1:s>e?1:0}var gA=class extends Ep{constructor(){super(F1,kp),this.filterType="date",this.FilterModelFormatterClass=E1,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){const{filterTypeToRangeCache:s}=this,i=Date.now();let n=s.get(e);if(n&&n.expires<i&&(n=void 0),!n){const[o,r]=t(new Date(i),new Date(i));n={from:o,to:r,expires:hs(new Date(i)).getTime()-i},s.set(e,n)}return n}comparator(){return this.params.filterParams.comparator??pA}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,s){const i=s.type,n=this.comparator();if(!this.isValid(t))return i==="notEqual"||i==="notBlank";const o=i,r=LA[o];if(r){const{from:a,to:l}=this.getOrRefreshRangeCacheItem(o,r);return n(a,t)>=0&&n(l,t)<0}return super.evaluateNonNullValue(e,t,s)}},fA=1,nl=null,mA=()=>{if(nl!=null)return nl;let e;const t=typeof navigator>"u"?void 0:navigator.languages?.[0]??navigator.language;if(t&&typeof Intl<"u"&&typeof Intl.Locale=="function")try{e=new Intl.Locale(t).getWeekInfo?.()?.firstDay}catch{e=void 0}return nl=e==null?fA:e%7,nl},Jt=e=>(e.setHours(0,0,0,0),e),Mc=e=>{const t=e.getDay(),s=mA(),i=(t-s+7)%7;return e.setDate(e.getDate()-i),Jt(e)},Ac=(e,t=1)=>(e.setDate(e.getDate()-t),e),hs=e=>(e.setDate(e.getDate()+1),Jt(e)),D1=e=>(Mc(e),e.setDate(e.getDate()+6),hs(e)),Lc=e=>(e.setDate(1),Jt(e)),Ip=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),Jt(e)),Mp=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),Lc(e)},P1=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),Ip(e)},Ap=e=>(e.setMonth(0,1),Jt(e)),T1=e=>(e.setMonth(12,0),hs(e)),ko=e=>Ac(e),lh=e=>ko(Mc(e)),ch=e=>ko(Lc(e)),dh=e=>ko(Mp(e)),Lp=(e,t)=>[Jt(e),hs(t)],vA=(e,t)=>Lp(ko(e),ko(t)),Op=(e,t)=>[Mc(e),D1(t)],CA=(e,t)=>Op(lh(e),lh(t)),Np=(e,t)=>[Lc(e),Ip(t)],wA=(e,t)=>Np(ch(e),ch(t)),Hp=(e,t)=>[Mp(e),P1(t)],bA=(e,t)=>Hp(dh(e),dh(t)),Gp=(e,t)=>[Ap(e),T1(t)],xA=(e,t)=>[Ap(e),hs(t)],yA=(e,t)=>[Jt(Ac(e,7)),hs(t)],SA=(e,t)=>[Jt(Ac(e,30)),hs(t)],RA=(e,t)=>[Jt(Ac(e,90)),hs(t)],FA=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[Jt(e),hs(t)]),EA=(e,t)=>(e.setFullYear(e.getFullYear()-1),[Jt(e),hs(t)]),DA=(e,t)=>(e.setFullYear(e.getFullYear()-2),[Jt(e),hs(t)]),PA=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),Gp(e,t)),TA=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),Gp(e,t)),kA=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),Hp(e,t)),IA=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),Np(e,t)),MA=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),Op(e,t)),AA=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),Lp(e,t)),LA={today:Lp,yesterday:vA,tomorrow:AA,thisWeek:Op,lastWeek:CA,nextWeek:MA,thisMonth:Np,lastMonth:wA,nextMonth:IA,thisQuarter:Hp,lastQuarter:bA,nextQuarter:kA,thisYear:Gp,lastYear:PA,nextYear:TA,yearToDate:xA,last7Days:yA,last30Days:SA,last90Days:RA,last6Months:FA,last12Months:EA,last24Months:DA,setStartOfDay:Jt,setStartOfWeek:Mc,setStartOfNextDay:hs,setStartOfNextWeek:D1,setStartOfMonth:Lc,setStartOfNextMonth:Ip,setStartOfQuarter:Mp,setStartOfNextQuarter:P1,setStartOfYear:Ap,setStartOfNextYear:T1,setPreviousDay:ko,setPreviousWeek:lh,setPreviousMonth:ch,setPreviousQuarter:dh},OA={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"}]},NA=class extends S1{constructor(){super(OA,[Pc]),this.eReadOnlyText=ue,this.eDateWrapper=ue,this.FilterModelFormatterClass=E1,this.filterType="date",this.defaultOptions=kp}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?Nt(e.dateFrom):null;this.dateComp.setDate(s),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){Ke(this.eDateWrapper,e),Ke(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,i=Lt(e),n=i==null?null:{...s??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:i};t.onModelChange(n,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=Qh(e,this.defaultDebounceMs);return xe(this.gos,{onDateChanged:ht(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:s,params:{column:i}}=this;this.dateComp=new R1(e,t,i.getColDef(),this.getDateComponentParams(),s,n=>{n.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},HA={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},GA=class extends ot{constructor(){super(HA,[Pc]),this.eDateInput=ue,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),focusin:this.handleFocusIn.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())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){const t=this.eDateInput.getInputElement(),s=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=s&&Ni();const{minValidYear:i,maxValidYear:n,minValidDate:o,maxValidDate:r,buttons:a,includeTime:l,colDef:c}=e.filterParams||{},d=this.beans.dataTypeSvc,u=l??d?.getDateIncludesTimeFlag?.(c.cellDataType)??!1;s?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";const h=mm(o,i,!0),g=mm(r,n,!1);h&&g&&h.getTime()>g.getTime()&&q(87),h&&(t.min=Lt(h,u)),g&&(t.max=Lt(g,u)),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return Nt(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,s=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(Lt(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}};function mm(e,t,s){return e&&t&&q(s?85:86),e instanceof Date?e:e?Nt(e):t?Nt(`${t}-${s?"01-01":"12-31"}`):null}var Bp=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function uh(e){return e?.allowedCharPattern??null}function tc(e){return e==null||isNaN(e)?null:e}function k1(e,t){const{filter:s,filterTo:i,type:n}=e||{};return[tc(s),tc(i)].slice(0,Ii(n,t))}var BA=class extends kc{constructor(){super("numberFilter",k1,Bp),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Eo()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],s=this.eValuesTo[e];this.refreshInputPairValidation(t,s)}}refreshInputPairValidation(e,t,s=!1){const i=this.params.numberParser,n=vm(i,e),o=vm(i,t),r=VA(n,o,s),a=r?this.translate(r,[String(s?o:n)]):"";(s?e:t).setCustomValidity(a),(s?t:e).setCustomValidity(""),a.length>0&&this.beans.ariaAnnounce.announceValue(a,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:s,additionalEventAttributes:i}=e,n=this.state,o=i?.fromAction;return(o&&o!="apply"||s.model!==n.model||!this.areStatesEqual(s.state,n.state))&&this.refreshInputValidation(),t}setElementValue(e,t,s){const{numberFormatter:i}=this.params,n=!s&&i?i(t??null):t;super.setElementValue(e,n),n===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:s}=this,i=uh(e),n=Qt({tag:"div",cls:"ag-filter-body",role:"presentation"}),o=this.createFromToElement(n,t,"from",i),r=this.createFromToElement(n,s,"to",i),a=(d,u,h)=>()=>this.refreshInputPairValidation(d,u,h),l=a(o,r,!0);o.onValueChange(l),o.addGuiEventListener("focusin",l);const c=a(o,r,!1);return r.onValueChange(c),r.addGuiEventListener("focusin",c),n}createFromToElement(e,t,s,i){const n=this.createManagedBean(i?new ni({allowedCharPattern:i}):new yp);return n.addCss(`ag-filter-${s}`),n.addCss("ag-filter-filter"),t.push(n),e.appendChild(n.getGui()),n}removeEValues(e,t){const s=i=>this.removeComponents(i,e,t);s(this.eValuesFrom),s(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(s,i,n,o)=>{i<o&&t.push(tc(I1(this.params.numberParser,s.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(s.filter=i[0]),i.length>1&&(s.filterTo=i[1]),s}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}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=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,s=>t||(t=!s.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}};function I1(e,t){if(typeof t=="number")return t;let s=Qs(t);return s!=null&&s.trim()===""&&(s=null),e?e(s):s==null||s.trim()==="-"?null:Number.parseFloat(s)}function vm(e,t){return tc(I1(e,t.getValue(!0)))}function VA(e,t,s){return e!=null&&t!=null&&e>=t?`strict${s?"Max":"Min"}ValueValidation`:null}var M1=class extends Ic{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=Dp}conditionToString(e,t,s,i,n){const{filter:o,filterTo:r,type:a}=e,l=this.formatValue.bind(this);if(t){const c=this.conditionForToolPanel(a,s,()=>l(o),()=>l(r),i,n);if(c!=null)return c}return s?`${l(o)}-${l(r)}`:o!=null?l(o):`${a}`}},zA=class extends Ep{constructor(){super(k1,Bp),this.filterType="number",this.FilterModelFormatterClass=M1}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},WA=class extends B{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new yp),this.eTextInput=this.createManagedBean(new ni),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),s=this.eTextInput.getGui();e.appendChild(t),e.appendChild(s),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(s,i=>this.onValueChanged(i))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:s}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,s),this.setPlaceholder(this.eTextInput,s)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},jA=class extends Tp{constructor(){super(...arguments),this.FilterModelFormatterClass=M1,this.filterType="number",this.defaultOptions=Bp}updateParams(e){uh(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=uh(e.filterParams),this.allowedCharPattern?this.createManagedBean(new Pp({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new WA)}convertValue(e){return e?Number(e):null}},Vp=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],_A=class extends kc{constructor(){super("textFilter",y1,Vp),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(s.filter=i[0]),i.length>1&&(s.filterTo=i[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,i,n,o)=>{i<o&&t.push(Qs(s.getValue()))}),t}createEValue(){const e=Qt({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 i=this.createManagedBean(new ni);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),{eValuesFrom:i,eValuesTo:n}=this;s(i),s(n)}},A1=class extends Ic{constructor(){super(...arguments),this.filterTypeKeys=aA}conditionToString(e,t,s,i,n){const{filter:o,filterTo:r,type:a}=e;if(t){const l=d=>()=>Cs(this,"filterSummaryTextQuote",[d]),c=this.conditionForToolPanel(a,s,l(o),l(r),i,n);if(c!=null)return c}return s?`${o}-${r}`:o!=null?`${o}`:`${a}`}},UA=({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 i=t.lastIndexOf(s);return i>=0&&i===t.length-s.length}default:return!1}},$A=e=>e,qA=e=>e==null?null:e.toString().toLowerCase(),KA=class extends b1{constructor(){super(y1,Vp),this.filterType="text",this.FilterModelFormatterClass=A1}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??UA,this.formatter=t.textFormatter??(t.caseSensitive?$A:qA)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,s,i){const n=e.map(h=>this.formatter(h))||[],o=this.formatter(t),{api:r,colDef:a,column:l,context:c,filterParams:{textFormatter:d}}=this.params;if(s.type==="blank")return ec(t);if(s.type==="notBlank")return!ec(t);const u={api:r,colDef:a,column:l,context:c,node:i.node,data:i.data,filterOption:s.type,value:o,textFormatter:d};return n.some(h=>this.matcher({...u,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=s=>{const i={...s},{filter:n,filterTo:o}=s;return n&&(i.filter=ah(n)??null),o&&(i.filterTo=ah(o)??null),i};return RC(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},YA=class extends Tp{constructor(){super(...arguments),this.FilterModelFormatterClass=A1,this.filterType="text",this.defaultOptions=Vp}createFloatingFilterInputService(){return this.createManagedBean(new Pp)}};function ZA(e){return!!e.quickFilter?.isFilterPresent()}function XA(e){return e.quickFilter?.getText()}function QA(e){e.quickFilter?.resetCache()}var JA=class extends B{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:i}=this.beans,n=t.isPivotMode(),o=e?.getColumns(),r=t.getColDefCols();let a=(n&&!s.get("applyQuickFilterBeforePivotOrAgg")?i?.getPivotResultCols()?.list:r)??[];o&&(a=a.concat(o)),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 se(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){q(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 i=this.getTextForColumn(s,e);return se(i)&&i.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:i,matcher:n}=this;return n(i,s)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let s=this.beans.filterValueSvc.getValue(e,t);const i=e.getColDef();if(i.getQuickFilterText){const n=xe(this.gos,{value:s,node:t,data:t.data,column:e,colDef:i});s=i.getQuickFilterText(n)}return se(s)?s.toString().toUpperCase():null}getAggText(e){const t=[];for(const s of this.colsToUse){const i=this.getTextForColumn(s,e);se(i)&&t.push(i)}return t.join(`
66
66
  `)}},e7={moduleName:"ClientSideRowModelFilter",version:Q,rowModels:["clientSide"],beans:[qk]},zp={moduleName:"FilterCore",version:Q,beans:[j8],apiFunctions:{isAnyFilterPresent:z8,onFilterChanged:W8},css:[b8],dependsOn:[e7]},L1={moduleName:"FilterValue",version:Q,beans:[X8]},la={moduleName:"ColumnFilter",version:Q,beans:[V8,Z8],dynamicBeans:{headerFilterCellCtrl:f8},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:x8,getColumnFilterInstance:y8,destroyFilter:S8,setFilterModel:R8,getFilterModel:F8,getColumnFilterModel:E8,setColumnFilterModel:D8,showColumnFilter:P8,hideColumnFilter:T8,getColumnFilterHandler:k8,doFilterAction:I8},dependsOn:[zp,Dc,L1,w8]},t7={moduleName:"CustomFilter",version:Q,userComponents:{agReadOnlyFloatingFilter:J8},dependsOn:[la]},s7={moduleName:"TextFilter",version:Q,dependsOn:[la],userComponents:{agTextColumnFilter:{classImp:_A,params:{useForm:!0}},agTextColumnFloatingFilter:YA},dynamicBeans:{agTextColumnFilterHandler:KA}},i7={moduleName:"NumberFilter",version:Q,dependsOn:[la],userComponents:{agNumberColumnFilter:{classImp:BA,params:{useForm:!0}},agNumberColumnFloatingFilter:jA},dynamicBeans:{agNumberColumnFilterHandler:zA}},n7={moduleName:"BigIntFilter",version:Q,dependsOn:[la],userComponents:{agBigIntColumnFilter:{classImp:oA,params:{useForm:!0}},agBigIntColumnFloatingFilter:dA},dynamicBeans:{agBigIntColumnFilterHandler:lA}},o7={moduleName:"DateFilter",version:Q,dependsOn:[la],userComponents:{agDateColumnFilter:{classImp:uA,params:{useForm:!0}},agDateInput:GA,agDateColumnFloatingFilter:NA},dynamicBeans:{agDateColumnFilterHandler:gA}},r7={moduleName:"QuickFilterCore",version:Q,rowModels:["clientSide"],beans:[JA],dependsOn:[zp,L1]},a7={moduleName:"QuickFilter",version:Q,apiFunctions:{isQuickFilterPresent:ZA,getQuickFilter:XA,resetQuickFilter:QA},dependsOn:[r7]},l7={moduleName:"ExternalFilter",version:Q,dependsOn:[zp]},c7=class extends B{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:i,rowNodes:n}=this;for(let o=0;o<e;o++){const r=s+o,a=new ki(i);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),n.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:s,state:i}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:s,pageStatus:i}}}setDataAndId(e,t,s){se(t)?e.setDataAndId(t,s.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(st(this.params.datasource.getRows)){q(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:s,params:{sortModel:i,filterModel:n},gos:o}=this;return xe(o,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,s),failCallback:this.pageLoadFailed.bind(this,s),sortModel:i,filterModel:n})}forEachNode(e,t,s){this.rowNodes.forEach((i,n)=>{this.startRow+n<s&&e(i,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((n,o)=>{const r=e.rowData?e.rowData[o]:void 0;!n.id&&n.alreadyRendered&&r&&(t[o]=new ki(s),t[o].setRowIndex(n.rowIndex),t[o].setRowTop(n.rowTop),t[o].setRowHeight(n.rowHeight),n._destroy(!0)),this.setDataAndId(t[o],r,this.startRow+o)});const i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)}destroy(){const e=this.rowNodes;for(let t=0,s=e.length;t<s;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},d7=2,u7=class extends B{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 i=this.blocks[s];if(!i){if(t)return;i=this.createBlock(s)}return i.getRow(e)}createBlock(e){const t=this.params,s=this.createBean(new c7(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()&&(vn(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 i=this.params.maxBlocksInCache>0,n=i?this.params.maxBlocksInCache-1:null,o=d7-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=o,c=i?a>=n:!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:i}=e;return t.rowIndex>=s&&t.rowIndex<i}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:i}=this.params,o=(e.id+1)*s+i;this.rowCount<o&&(this.rowCount=o)}}setRowCount(e,t){this.rowCount=e,se(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,i)=>s.id-i.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const s=[];let i=-1,n=!1;const o={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(n&&i+1!==l.id){r=!0;continue}i=l.id,l.forEachNode(c=>{const d=c===e||c===t;(n||d)&&s.push(c),d&&(n=!n)},o,this.rowCount)}return r||n?[]:s}},h7=class extends B{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.hierarchical=!1}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 ki(e);this.rootNode=t,t.level=-1,this.rowHeight=ln(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=ln(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!Br(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}getOverlayType(){return this.infiniteCache?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;Fo(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:i,eventSvc:n,gos:o}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:s?.getSortModel()??[],rowNodeBlockLoader:i,initialRowCount:o.get("infiniteInitialRowCount"),maxBlocksInCache:o.get("maxBlocksInCache"),rowHeight:ln(e),overflowSize:o.get("cacheOverflowSize"),blockSize:o.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new u7(this.cacheParams)),n.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 p7(e){Sc(e)?.refreshCache()}function g7(e){Sc(e)?.purgeCache()}function f7(e){return Sc(e)?.getRowCount()}var m7=class extends B{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=vR(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=ht(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Bs(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){vn(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:i}=t.getBlockStateJson();e[s]=i}),e}printCacheStatus(){vn(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},v7={moduleName:"InfiniteRowModelCore",version:Q,rowModels:["infinite"],beans:[h7,m7]},C7={moduleName:"InfiniteRowModel",version:Q,apiFunctions:{refreshInfiniteCache:p7,purgeInfiniteCache:g7,getInfiniteRowCount:f7},dependsOn:[v7,Vk]},w7=class extends B{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,i=!xl.has(e),n=i?this.asyncListeners:this.syncListeners;n.has(e)||n.set(e,new Set),n.get(e).add(s),this.eventSvc.addListener(e,s,i)}removeListener(e,t){const s=this.wrapSvc?.unwrap(e,t)??t,n=!!this.asyncListeners.get(e)?.delete(s);n||this.syncListeners.get(e)?.delete(s),this.eventSvc.removeListener(e,s,n)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,s=(o,r)=>{xl.has(o)&&t(o,r)},i=(o,r)=>{xl.has(o)||t(o,r)};this.globalListenerPairs.set(e,{syncListener:s,asyncListener:i});const n=this.eventSvc;n.addGlobalListener(s,!1),n.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:s,globalListenerPairs:i}=this,n=s?.unwrapGlobal(e)??e;if(i.has(n)){const{syncListener:r,asyncListener:a}=i.get(n);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(n),t.removeGlobalListener(n,!1)}destroyEventListeners(e,t){e.forEach((s,i)=>{s.forEach(n=>this.eventSvc.removeListener(i,n,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:i})=>{t.removeGlobalListener(s,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function b7(e,t,s){e.apiEventSvc?.addListener(t,s)}function x7(e,t,s){e.apiEventSvc?.removeListener(t,s)}function y7(e,t){e.apiEventSvc?.addGlobalListener(t)}function S7(e,t){e.apiEventSvc?.removeGlobalListener(t)}var R7={moduleName:"EventApi",version:Q,apiFunctions:{addEventListener:b7,addGlobalListener:y7,removeEventListener:x7,removeGlobalListener:S7},beans:[w7]},F7=class extends B{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?z2(t):W2(e.get("localeText"))}},E7={moduleName:"Locale",version:Q,beans:[F7]};function D7(e){return e.stateSvc?.getState()??{}}function P7(e,t,s){return e.stateSvc?.setState(t,s)}function Cm(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=T7(e)),e.version=Q,e}function T7(e){return e.cellSelection=k7(e,"rangeSelection"),e}function k7(e,t){if(e&&typeof e=="object")return e[t]}var I7=class extends B{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=ht(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=ht(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=ht(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=it(e);const i=Cm(e.get("initialState")??{}),n=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;const o=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>o(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&s?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{c==="gridInitializing"&&(r(),o(()=>{this.setupStateOnColumnsInitialised(i,!!n),s?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),o(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l?.(),o(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const s=Cm(e);delete s.partialColumnState,this.cachedState=s,this.startSuppressEvents();const i="api",n=t?new Set(t):void 0;this.setGridReadyState(s,i,n),this.setColumnsInitialisedState(s,i,!!n,n),this.setRowCountState(s,i,n),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(s,i,n),this.stopSuppressEvents(i)})}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,i){this.setColumnState(e,t,s,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const s=i=>()=>this.updateColumnState([i]);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:({source:i})=>{this.updateColumnAndGroupState(),i!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,s){const{filter:i,rowGroupExpansion:n,ssrmRowGroupExpansion:o,rowSelection:r,pagination:a,rowPinning:l}=e,c=(u,h)=>!s?.has(u)&&(h||t==="api");c("filter",i)&&this.setFilterState(i),(c("rowGroupExpansion",n)||c("ssrmRowGroupExpansion",o))&&this.setRowGroupExpansionState(o,n,t),c("rowSelection",r)&&this.setRowSelectionState(r,t),c("pagination",a)&&this.setPaginationState(a,t),c("rowPinning",l)&&this.setRowPinningState(l);const d=this.updateCachedState.bind(this);d("filter",this.getFilterState()),this.updateGroupExpansionState(),d("rowSelection",this.getRowSelectionState()),d("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},i=()=>t("filter",this.getFilterState()),{gos:n,colFilter:o,selectableFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:s,columnRowGroupChanged:s,rowDataUpdated:()=>{(n.get("groupDefaultExpanded")!==0||n.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(s)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:a=>{(a.newPage||a.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),o&&this.addManagedListeners(o,{filterStateChanged:i}),r&&this.addManagedListeners(r,{selectedFilterChanged:i})}setFirstDataRenderedState(e,t,s){const{scroll:i,cellSelection:n,focusedCell:o,columnOrder:r}=e,a=(d,u)=>!s?.has(d)&&(u||t==="api");a("focusedCell",o)&&this.setFocusedCellState(o),a("cellSelection",n)&&this.setCellSelectionState(n),a("scroll",i)&&this.setScrollState(i),this.setColumnPivotState(!!r?.orderedColIds,t);const l=this.updateCachedState.bind(this);l("sideBar",this.getSideBarState()),l("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();l("rangeSelection",c),l("cellSelection",c),l("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:i=>{if(i.finished){const n=this.getRangeSelectionState();t("rangeSelection",n),t("cellSelection",n)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){const e=this.beans;return gk(Kl(e),e.colModel.isPivotMode())}setColumnState(e,t,s,i){const{sort:n,rowGroup:o,aggregation:r,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:u}=e;let h=!1;const g=(P,k)=>{const A=!i?.has(P)&&!!(k||t==="api");return h||(h=A),A},m={},v=P=>{let k=m[P];return k||(k={colId:P},m[P]=k,k)},C={},w=g("sort",n);w&&n?.sortModel.forEach(({colId:P,sort:k,type:A},U)=>{const I=v(P);I.sort=k,I.sortIndex=U,I.sortType=A}),(w||!s)&&(C.sort=null,C.sortIndex=null);const b=g("rowGroup",o);b&&o?.groupColIds.forEach((P,k)=>{const A=v(P);A.rowGroup=!0,A.rowGroupIndex=k}),(b||!s)&&(C.rowGroup=null,C.rowGroupIndex=null);const x=g("aggregation",r);x&&r?.aggregationModel.forEach(({colId:P,aggFunc:k})=>{v(P).aggFunc=k}),(x||!s)&&(C.aggFunc=null);const y=g("pivot",a);y&&(a?.pivotColIds.forEach((P,k)=>{const A=v(P);A.pivot=!0,A.pivotIndex=k}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(y||!s)&&(C.pivot=null,C.pivotIndex=null);const S=g("columnPinning",l);if(S){for(const P of l?.leftColIds??[])v(P).pinned="left";for(const P of l?.rightColIds??[])v(P).pinned="right"}(S||!s)&&(C.pinned=null);const F=g("columnVisibility",c);if(F)for(const P of c?.hiddenColIds??[])v(P).hide=!0;(F||!s)&&(C.hide=null);const R=g("columnSizing",d);if(R)for(const{colId:P,flex:k,width:A}of d?.columnSizingModel??[]){const U=v(P);U.flex=k??null,U.width=A}(R||!s)&&(C.flex=null);const E=u?.orderedColIds,D=!!E?.length&&!i?.has("columnOrder"),T=D?E.map(P=>v(P)):Object.values(m);(T.length||h)&&(this.columnStates=T,bs(this.beans,{state:T,applyOrder:D,defaultState:C},t))}setColumnPivotState(e,t){const s=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const n=this.beans,{pivotResultCols:o,colGroupSvc:r}=n;if(o?.isPivotResultColsPresent()){if(s){const a=[];for(const l of s)o.getPivotResultCol(l.colId)&&a.push(l);bs(n,{state:a,applyOrder:e},t)}i&&r?.setColumnGroupState(i,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return fk(t)}setColumnGroupState(e,t,s){const i=this.beans.colGroupSvc;if(!i||s?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const n=new Set(e.columnGroup?.openColumnGroupIds),r=i.getColumnGroupState().map(({groupId:a})=>{const l=n.has(a);return l&&n.delete(a),{groupId:a,open:l}});for(const a of n)r.push({groupId:a,open:!0});r.length&&(this.columnGroupStates=r),i.setColumnGroupState(r,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let s=e?.getFilterModel();s&&Object.keys(s).length===0&&(s=void 0);const i=e?.getFilterState(),n=e?.getAdvFilterModel()??void 0,o=t?.getState();return s||n||i||o?{filterModel:s,columnFilterState:i,advancedFilterModel:n,selectableFilters:o}:void 0}setFilterState(e){const{filterManager:t,selectableFilter:s}=this.beans,{filterModel:i,columnFilterState:n,advancedFilterModel:o,selectableFilters:r}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};r!==void 0&&s?.setState(r??{}),(i!==void 0||n!==void 0)&&t?.setFilterState(i??null,n??null,"columnFilter"),o!==void 0&&t?.setAdvFilterModel(o??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:s,type:i,startRow:n,endRow:o,columns:r,startColumn:a}=t;return{id:s,type:i,startRow:n,endRow:o,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:s,colModel:i,visibleCols:n}=this.beans;if(!Pi(t)||!s)return;const o=[];for(const r of e?.cellRanges??[]){const a=[];for(const c of r.colIds){const d=i.getCol(c);d&&a.push(d)}if(!a.length)continue;let l=i.getCol(r.startColId);if(!l){const c=n.allCols,d=new Set(a);l=c.find(u=>d.has(u))}o.push({...r,columns:a,startColumn:l})}s.setCellRanges(o)}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:i,rowRenderer:n,animationFrameSvc:o,ctrlsSvc:r}=this.beans;i.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(s),r.getScrollFeature()?.setVerticalScrollPosition(t),n.redraw({afterScroll:!0}),o?.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:i}=e;return{colId:t.getColId(),rowIndex:s,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:s}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:i,rowIndex:n,rowPinned:o}=e;t.setFocusedCell({column:s.getCol(i),rowIndex:n,rowPinned:o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const s=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!s&&!i))return{page:s,pageSize:i}}setPaginationState(e,t){const{pagination:s,gos:i}=this.beans;if(!s)return;const{pageSize:n,page:o}=e??{page:0,pageSize:i.get("paginationPageSize")},r=t==="gridInitializing";n&&!i.get("paginationAutoPageSize")&&s.setPageSize(n,r?"initialState":"pageSizeSelector"),typeof o=="number"&&(r?s.setPage(o):s.goToPage(o))}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")}updateGroupExpansionState(){const{expansionSvc:e,gos:t}=this.beans,s=e?.getExpansionState(),i=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",i?s:void 0),this.updateCachedState("rowGroupExpansion",i?void 0:s)}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,s){const i=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(i,s)}updateColumnState(e){const t=this.getColumnState();let s=!1;const i=this.cachedState;for(const n of Object.keys(t)){const o=t[n];Br(o,i[n])||(s=!0)}this.cachedState={...i,...t},s&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const s=this.cachedState[e];this.setCachedStateValue(e,t),Br(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")}},M7={moduleName:"GridState",version:Q,beans:[I7],apiFunctions:{getState:D7,setState:P7}};function A7(e){return e.rowModel.isLastRowIndexKnown()}function L7(e){return e.pagination?.getPageSize()??100}function O7(e){return e.pagination?.getCurrentPage()??0}function N7(e){return e.pagination?.getTotalPages()??1}function H7(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function G7(e){e.pagination?.goToNextPage()}function B7(e){e.pagination?.goToPreviousPage()}function V7(e){e.pagination?.goToFirstPage()}function z7(e){e.pagination?.goToLastPage()}function W7(e,t){e.pagination?.goToPage(t)}var j7=class extends B{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 i=Math.max(ln(t),1),n=Math.floor(e/i);t.pagination.setPageSize(n,"autoCalculated")};this.isBodyRendered?ht(this,s,50)():(s(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function _7(e,t){if(typeof e!="number")return"";const s=t(),i=s("thousandSeparator",","),n=s("decimalSeparator",".");return e.toString().replace(".",n).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var pr="paginationPageSizeSelector",U7={tag:"span",cls:"ag-paging-page-size"},$7=class extends ot{constructor(){super(U7),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(pr,()=>{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(){Wt(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(pr)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),s=!t||!e.includes(t);if(s){const n=this.gos.exists("paginationPageSize"),o=this.gos.get(pr)!==!0;q(94,{pageSizeSet:n,pageSizesSet:o,pageSizeOptions:e,paginationPageSizeOption:t}),o||q(95,{paginationPageSizeOption:t,paginationPageSizeSelector:pr}),e.unshift("")}const i=String(s?"":t);this.selectPageSizeComp?(Li(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=s}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const s=this.getLocaleTextFunc(),i=s("pageSizeSelectorLabel","Page Size:"),n=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Sp).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(n).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(pr);return!Array.isArray(t)||!t?.length?e:[...t].sort((s,i)=>s-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},q7={selector:"AG-PAGE-SIZE-SELECTOR",component:$7},K7=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.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}.ag-paging-description{line-height:0}",Y7=class extends fE{constructor(){super(),this.btFirst=ue,this.btPrevious=ue,this.btNext=ue,this.btLast=ue,this.lbRecordCount=ue,this.lbFirstRowOnPage=ue,this.lbLastRowOnPage=ue,this.lbCurrent=ue,this.lbTotal=ue,this.pageSizeComp=ue,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(K7)}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(),[q7]);const{btFirst:t,btPrevious:s,btNext:i,btLast:n}=this;this.activateTabIndex([t,s,i,n]),t.insertAdjacentElement("afterbegin",zt(e?"last":"first",this.beans)),s.insertAdjacentElement("afterbegin",zt(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",zt(e?"previous":"next",this.beans)),n.insertAdjacentElement("afterbegin",zt(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:o=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(o):wF(this.beans,o),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}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:i=>{(i.key===O.ENTER||i.key===O.SPACE)&&(i.preventDefault(),s())}})}CF(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}):_7(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 i=this.isZeroPagesToDisplay(),n=e===s-1;this.nextButtonDisabled=n||i,this.lastButtonDisabled=!t||i||e===s-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){m2(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(),i=e?s:null,n=this.pagination.getCurrentPage(),o=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=o*n+1,a=r+o-1,e&&a>i&&(a=i));const l=r+o-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 m=t>0?n+1:0,v=this.formatNumber(m);this.lbCurrent.textContent=v;let C,w;if(e)C=this.formatNumber(t),w=this.formatNumber(i);else{const b=h("more","more");C=b,w=b}this.lbTotal.textContent=C,this.lbRecordCount.textContent=w,this.announceAriaStatus(d,u,w,v,C)}announceAriaStatus(e,t,s,i,n){const o=this.getLocaleTextFunc(),r=o("page","Page"),a=o("to","to"),l=o("of","of"),c=`${e} ${a} ${t} ${l} ${s}`,d=`${r} ${i} ${l} ${n}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnounce?.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnounce?.announceValue(d,"paginationPage"))}},Z7={selector:"AG-PAGINATION",component:Y7},X7=100,Q7=class extends B{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 Z7}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 se(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:se(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:se(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:se(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:X7}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,i=t-1;this.totalPages=Math.floor(i/s)+1,this.adjustCurrentPageIfInvalid();const n=this.currentPage,o=s*n;let r=s*(n+1)-1;if(r>i&&(r=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(o),r===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:s}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*s,this.bottomDisplayedRowIndex=t*(s+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:s=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:s,newPageSize:i,keepRenderedRows:t})}},J7={moduleName:"Pagination",version:Q,beans:[Q7,j7],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:A7,paginationGetPageSize:L7,paginationGetCurrentPage:O7,paginationGetTotalPages:N7,paginationGetRowCount:H7,paginationGoToNextPage:G7,paginationGoToPreviousPage:B7,paginationGoToFirstPage:V7,paginationGoToLastPage:z7,paginationGoToPage:W7},dependsOn:[Dc]},e9=".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 t9(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function s9(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function i9(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function n9(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function o9(e,t,s){return e.pinnedRowModel?.forEachPinnedRow(t,s)}var r9={moduleName:"PinnedRow",version:Q,beans:[iF],css:[e9],apiFunctions:{getPinnedTopRowCount:t9,getPinnedBottomRowCount:s9,getPinnedTopRow:i9,getPinnedBottomRow:n9,forEachPinnedRow:o9},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},a9="↑",l9="↓",c9={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},d9=class extends ot{constructor(){super(c9),this.eValue=ue,this.eDelta=ue,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const s=Math.abs(t),i=e.formatValue(s),n=se(i)?i:s,o=t>=0,r=this.eDelta;o?r.textContent=a9+n:r.textContent=l9+n,r.classList.toggle("ag-value-change-delta-up",o),r.classList.toggle("ag-value-change-delta-down",!o)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),Wt(this.eDelta)}refresh(e,t=!1){const{value:s,valueFormatted:i}=e,{eValue:n,lastValue:o,beans:r}=this;if(s===o||(se(i)?n.textContent=i:se(s)?n.textContent=s:Wt(n),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=s&&typeof s=="object"&&"toNumber"in s?s.toNumber():s,l=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return o&&n.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=s,!0}},u9=".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}",h9={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},p9=class extends ot{constructor(){super(h9),this.eCurrent=ue,this.refreshCount=0,this.registerCSS(u9)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:s}=this,i=Qt({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=s.textContent,this.getGui().insertBefore(i,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(st(s)&&(s=""),s===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=s;const i=this.eCurrent;return se(e.valueFormatted)?i.textContent=e.valueFormatted:se(e.value)?i.textContent=s:Wt(i),!0}},g9=class extends B{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"),i=this.beans.gos.get("cellFadeDuration")){const n=this.animations[t];n.delete(e);const o=Date.now(),r=o+s,a=o+s+i,l={phase:"flash",flashEndTime:r,fadeEndTime:a};n.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 i=this.animations[s],n=`ag-cell-${s}`,o=`${n}-animation`;for(const[r,a]of i){if(!r.isAlive()||!r.comp){i.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:m}}=r;switch(l){case"flash":g.toggleCss(n,!1),g.toggleCss(o,!0),m.transition=`background-color ${d-c}ms`,m.transitionDelay=`${c-e}ms`,t=Math.min(d,t??1/0),a.phase="fade";break;case"fade":g.toggleCss(n,!1),g.toggleCss(o,!1),m.removeProperty("transition"),m.removeProperty("transition-delay"),i.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const s=pF(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 f9(e,t={}){const{cellFlashSvc:s}=e;s&&e.frameworkOverrides.wrapIncoming(()=>{for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))s.flashCell(i,t)})}var m9={moduleName:"HighlightChanges",version:Q,beans:[g9],userComponents:{agAnimateShowChangeCellRenderer:d9,agAnimateSlideCellRenderer:p9},apiFunctions:{flashCells:f9}};function v9(e,t,s){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,n=`aria-${t}`;s===null?i.removeAttribute(n):i.setAttribute(n,s)}function C9(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function w9(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function b9(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function x9(e){e.animationFrameSvc?.flushAllFrames()}function y9(e){return{rowHeight:ln(e),headerHeight:na(e)}}function S9(e,t={}){const s=[];for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=o.getCellRenderer();r!=null&&s.push(yn(r))}if(t.columns?.length)return s;const i=[],n=Xu(t.rowNodes);for(const o of e.rowRenderer.getAllRowCtrls()){if(n&&!Qu(o.rowNode,n)||!o.isFullWidth())continue;const r=o.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];l!=null&&i.push(yn(l))}}return[...i,...s]}var R9={moduleName:"RenderApi",version:Q,apiFunctions:{setGridAriaProperty:v9,refreshCells:C9,refreshHeader:w9,isAnimationFrameQueueEmpty:b9,flushAllAnimationFrames:x9,getSizesForCurrentTheme:y9,getCellRendererInstances:S9}},F9=class extends B{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=ht(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:s,pinnedRowModel:i}=this.beans,n=e.autoHeightCols;let o=!1;const r=a=>{const l=a.__autoHeights;let c=Di(this.beans,a).height;for(const d of n){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),o=!0)};i?.forEachPinnedRow?.("top",r),i?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),o&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,s){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[s.getId()];return}const i=e.__autoHeights[s.getId()];e.__autoHeights[s.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:s,colViewport:i,visibleCols:n}=this.beans;if(!s.colSpanActive)return!1;let o=[];switch(e.getPinned()){case"left":o=n.getLeftColsForRow(t);break;case"right":o=n.getRightColsForRow(t);break;case null:o=i.getColsWithinViewport(t);break}return!o.includes(e)}setupCellAutoHeight(e,t,s){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:n,column:o}=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:m}=Tn(i),v=u+h+g+m,w=t.offsetHeight+v;if(d<5){const x=!Ct(r)?.contains(t),y=w==0;if(x||y){window.setTimeout(()=>a(d+1),0);return}}this.setRowAutoHeight(n,w,o)},l=()=>a(0);l();const c=ri(r,t,l);return s.addDestroyFunc(()=>{c(),this.setRowAutoHeight(n,void 0,o)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:s}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(s).filter(n=>n.isAutoHeight())),t.length!==0){if(!s.__autoHeights)return!1;for(const i of t){const n=s.__autoHeights[i.getColId()];if(!n||s.rowHeight<n)return!1}}return!0}},E9={moduleName:"RowAutoHeight",version:Q,beans:[F9]},D9=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}},P9=class extends B{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:s,pinnedRowModel:i,rowModel:n,valueSvc:o,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 m=null,v=null,C;const w=(x,y)=>{m=x,v=null,C=y},b=x=>{const y=!x.isExpandable()&&!x.group&&!x.detail&&(d?!d({rowNode:x}):!0);if(x.rowIndex==null||!y){w(null,null);return}if(m==null||x.level!==m.level||x.footer||v&&x.rowIndex-1!==v?.getLastNode().rowIndex){w(x,o.getValue(t,x,"data"));return}const S=o.getValue(t,x,"data");if(g){const F=xe(s,{valueA:C,nodeA:m,valueB:S,nodeB:x,column:t,colDef:a});if(!h(F)){w(x,S);return}}else if(u?!u(C,S):C!==S){w(x,S);return}if(!v){const F=l?.get(m);F?.firstNode===m?(F.reset(),v=F):v=new D9(t,m),c.set(m,v)}v.addSpannedNode(x),c.set(x,v)};switch(e){case"center":n.forEachDisplayedNode?.(x=>{(!r||r.isRowInPage(x.rowIndex))&&b(x)}),this.centerValueNodeMap=c;break;case"top":i?.forEachPinnedRow("top",b),this.topValueNodeMap=c;break;case"bottom":i?.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}}},T9=class extends B{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=ht(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=ht(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 P9(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,i=e.column,n=e.rowIndex,o=this.spanningColumns.get(i);if(!o)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(n);break;case"bottom":r=t?.getPinnedBottomRow(n);break;default:r=s.getRow(n)}if(r)return o.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const s=this.spanningColumns.get(e);if(s)return s.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[s,i]of this.spanningColumns)if(i.isCellSpanning(e)){const n=i.getCellSpan(e);t(s,n)}}destroy(){super.destroy(),this.spanningColumns.clear()}},k9=class extends bo{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,i,n,o,r){this.eWrapper=s,super.setComp(e,t,s,i,n,o,r),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Oh(e,t.rowIndex)}setAriaRowSpan(){b2(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(Kr(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}},I9=class extends Xl{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 k9(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(){}},M9=class extends B{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),i=s.size,n=this.getAllRelevantRowControls(e),o=new Map;let r=!1;for(const l of n)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(c,d)=>{if(o.has(d.firstNode))return;const u=s.get(d.firstNode);if(u){o.set(d.firstNode,u),s.delete(d.firstNode);return}r=!0;const h=new I9(d.firstNode,this.beans,!1,!1,!1);o.set(d.firstNode,h)});this.setCtrlsMap(e,o);const a=o.size===i;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 i=this.getCtrlsMap(e.rowPinned).get(s.firstNode);if(i)return i.getAllCellCtrls().find(n=>n.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")}},A9={moduleName:"CellSpan",version:Q,beans:[T9,M9]},L9=class extends B{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,vo(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),qR(e))}createColumns(e,t){const s=()=>{Vl(this.beans,this.columns?.tree),this.columns=null},i=e.treeDepth,o=(this.columns?.treeDepth??-1)==i,r=this.generateSelectionCols();if($R(r,this.columns?.list??[])&&o)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(m=>!Oi(m));return[...r,...g]})}updateColumns(e){const t=vo(e.source),{beans:s}=this;for(const i of this.columns?.list??[]){const n=this.createSelectionColDef(e.currentValue);i.setColDef(n,null,t),bs(s,{state:[YR(n,i.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>Pr(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,s=e.get("rowSelection");if(typeof s!="object"||!an(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&i)return!1;const n=!!go(s),o=pl(s);return n||o}createSelectionColDef(e){const{gos:t}=this,s=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:n,spanRows:o,...r}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"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,suppressAutoSize:!0,pinned:null,...r,colId:$h,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const s=new kn(e,null,t,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(e,t,s){const i=t&&typeof t!="string"?go(t):void 0,n=e&&typeof e!="string"?go(e):void 0,o=i!==n,r=t&&typeof t!="string"?pl(t):void 0,a=e&&typeof e!="string"?pl(e):void 0,l=r!==a,c=Nl(e),d=Nl(t);(o||l||c!==d)&&this.beans.colModel.refreshAll(s)}destroy(){Vl(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,s){if(!this.columns?.list.length)return;const i=e.length+t.length+s.length;if(i===0)return;const n=this.columns.list[0];if(!n.isVisible())return;const o=()=>{let l;switch(n.pinned){case"left":case!0:l=e;break;case"right":l=s;break;default:l=t}l&&Bs(l,n)};(this.beans.rowNumbersSvc?.getColumn(qh)?2:1)===i&&o()}},O9=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function N9(e,t){if(!t.nodes.every(r=>r.rowPinned&&!Fc(r)?(q(59),!1):r.id===void 0?(q(60),!1):!0))return;const{nodes:i,source:n,newValue:o}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:n??"api",newValue:o})}function H9(e,t,s="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:s,selectAll:t})}function G9(e,t,s="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:s,selectAll:t})}function B9(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function V9(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function z9(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function W9(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function j9(e){return e.selectionSvc?.getSelectedNodes()??[]}function _9(e){return e.selectionSvc?.getSelectedRows()??[]}var U9={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},$9=class extends ot{constructor(){super(U9,[up]),this.eCheckbox=ue}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:s}=this,i=t.isSelected(),n=Cc(e,i),[o,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(o,r);s.setValue(i,!0),s.setInputAriaLabel(`${a} (${n})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:bn,click:i=>{bn(i),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:n})=>{const o=typeof i=="object"?Dd(i):void 0,r=typeof n=="object"?Dd(n):void 0;o!==r&&this.onSelectableChanged()}),Lu(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:s,gos:i}=this,n=t.selectable,o=this.getIsVisible();let r;if(typeof o=="function"){const u=s?.callbackParams;if(!e)r=o({...u,node:t,data:t.data});else{const h=e.createColumnFunctionCallbackParams(t);r=o({...u,...h})}}else r=o??!1;const a=n&&!r||!n&&r,l=n||r,c=i.get("rowSelection"),d=c&&typeof c!="string"?!Dd(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"?go(t):this.column?.getColDef()?.checkboxSelection}},q9=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:i}=this;return t??(t=s.getRowNode(e)),i?.isManual()&&(t??(t=i.getPinnedRowById(e,"top")),t??(t=i.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const s=t[0].id===this.rootId,i=t.findIndex(n=>n.id===e.id);if(i>-1){const n=t.slice(0,i),o=t.slice(i+1);return this.setEndRange(e),s?{keep:n,discard:o}:{keep:o,discard:n}}else return{keep:t,discard:[]}}extend(e,t=!1){const s=this.getRoot();if(s==null){const n=this.getRange().slice();return t&&e.depthFirstSearch(o=>!o.group&&n.push(o)),n.push(e),this.setRoot(e),{keep:n,discard:[]}}const i=this.getNodesInRange(s,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(n=>n.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const n=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:n}}}getNodesInRange(e,t){const{pinnedRowModel:s,rowModel:i}=this;if(!s?.isManual())return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return ss(s,"top",e,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const n=ss(s,"bottom",void 0,e),o=i.getRowCount(),r=i.getRow(o-1);return(i.getNodesInRangeForSelection(t,r)??[]).concat(n)}if(!e.rowPinned&&!t.rowPinned)return i.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return ss(s,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const n=ss(s,"top",t,void 0),o=ss(s,"bottom",void 0,e),r=i.getRow(0),a=i.getRow(i.getRowCount()-1);return n.concat(i.getNodesInRangeForSelection(r,a)??[]).concat(o)}if(!e.rowPinned&&t.rowPinned==="top")return ss(s,"top",t,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const n=ss(s,"top",e,void 0),o=ss(s,"bottom",void 0,t),r=i.getRow(0),a=i.getRow(i.getRowCount()-1);return n.concat(i.getNodesInRangeForSelection(r,a)??[]).concat(o)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return ss(s,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const n=ss(s,"bottom",void 0,t),o=i.getRow(i.getRowCount());return(i.getNodesInRangeForSelection(e,o)??[]).concat(n)}return null}},K9=class extends B{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(et(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new dp);this.cbSelectAll=t,t.addCss("ag-header-select-all"),fn(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:i,previousValue:n})=>{const o=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;o(i)!==o(n)&&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,i=t.getSelectAllState(e);s.setValue(i);const n=t.hasNodesToSelect(e);s.setDisabled(!n),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:s,cbSelectAll:i,cbSelectAllVisible:n}=this,o=i.getValue(),r=Cc(t,o),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",n?`${a} (${r})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||s.announceAriaDescription()}checkSelectionType(e){return Gl(this.gos)?!0:(q(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:s}=this.beans;return it(t)||No(t)?!0:(q(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 i={source:s,selectAll:t},n=this.beans.selectionSvc;e?n.selectAllRowNodes(i):n.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:s}=this,o=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return O1(s,e)&&this.checkRightRowModelType(o)&&this.checkSelectionType(o)}getSelectAllMode(){const e=hC(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 O1({gos:e,selectionColSvc:t},s){const i=e.get("rowSelection"),n=s.getColDef(),{headerCheckboxSelection:o}=n;let r=!1;if(typeof i=="object"){const l=Oi(s),c=Kh(s);(Nl(i)==="autoGroupColumn"&&c||l&&t?.isSelectionColumnEnabled())&&(r=pl(i))}else typeof o=="function"?r=o(xe(e,{column:s,colDef:n})):r=!!o;return r}var Y9=class extends B{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new q9(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=Lu(e);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=Lu(e),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new $9}createSelectAllFeature(e){if(O1(this.beans,e))return new K9(e)}isMultiSelect(){return Gl(this.gos)}onRowCtrlSelected(e,t,s){const i=!!e.rowNode.isSelected();e.forEachGui(s,n=>{n.rowComp.toggleCss("ag-row-selected",i);const o=n.element;Lv(o,i),o.contains(et(this.beans))&&t(n)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),s=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||s)return;const n=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(n,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!Fc(e)||!an(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($r(this.gos)){const n=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:n??!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 i=0;i<e.childrenAfterGroup.length;i++){const n=e.childrenAfterGroup[i];let o=n.isSelected();if(!n.selectable){const r=this.calculateSelectedFromChildren(n);if(r===null)continue;o=r}switch(o){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,i="api"){if(t&&e.destroyed)return!1;const n=!e.selectable&&t,o=e.__selected===t;if(n||o)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...K3(e,this.gos,"rowSelected"),event:s||null,source:i}),!0}isCellCheckboxSelection(e,t){const s=this.gos.get("rowSelection");if(s&&typeof s!="string"){const i=Oi(e)&&go(s);return e.isColumnFunc(t,i)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,s,i){const{gos:n,selectionCtx:o}=this,r=e.isSelected(),a=$r(n),l=wR(n),c=bR(n),d=this.isMultiSelect(),u=i==="rowClicked";if(u&&!(l||c))return null;if(t&&s&&d){const h=o.getRoot();if(h)if(h.isSelected()){const g=o.isInRange(e)?o.truncate(e):o.extend(e,a);return{deselect:g.discard,select:g.keep,reset:!1}}else{const g=o.extend(e,a);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&d){const h=o.selectAll?this.beans.rowModel.getRow(0):void 0,g=o.getRoot(h),m=o.isInRange(e)?o.truncate(e):o.extend(e,a);return{select:m.keep,deselect:m.discard,reset:o.selectAll||!!(g&&!g.isSelected())}}else if(s){if(u){const h=!r;return h&&!l||!h&&!c?null:(o.setRoot(e),{node:e,newValue:h,clearSelection:!1})}return o.setRoot(e),{node:e,newValue:!r,clearSelection:!d}}else{o.setRoot(e);const h=xR(n),g=Bl(n)==="filteredDescendants",m=u&&(!h||!l);if(g&&r===void 0&&it(n))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!d||m};if(u){const v=r?!h:l;return v===r&&!m||v&&!l||!v&&!c?null:{node:e,newValue:v,clearSelection:!d||m,keepDescendants:e.group&&a}}return{node:e,newValue:!r,clearSelection:!d||m}}}},Z9=class extends Y9{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=Hl(e),this.groupSelectsDescendants=$r(e),this.groupSelectsFiltered=Bl(e)==="filteredDescendants",this.masterSelectsDetail=Ug(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=$r(e),s=Hl(e),i=Bl(e)==="filteredDescendants";this.masterSelectsDetail=Ug(e)==="detail",(t!==this.groupSelectsDescendants||i!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,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 i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,s);if(i==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in i)return i.reset?this.resetNodes():this.selectRange(i.deselect,!1,s),this.selectRange(i.select,!0,s);{const n=i.checkFilteredNodes?H1(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:n,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:s})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:s,nodes:i,event:n,source:o,keepDescendants:r=!1}){if(i.length===0)return 0;const{gos:a}=this;if(!an(a)&&e)return q(132),0;if(i.length>1&&!this.isMultiSelect())return q(130),0;let l=0;for(let c=0;c<i.length;c++){const d=i[c],u=d.primaryRow;if(u.rowPinned&&!Fc(u)){q(59);continue}if(u.id===void 0){q(60);continue}if(e&&d.destroyed)continue;this.groupSelectsFiltered&&u.group&&!a.get("treeData")||this.selectRowNode(u,e,n,o)&&(this.detailSelection.delete(u.id),l++),this.groupSelectsDescendants&&u.childrenAfterGroup?.length&&(l+=this.selectChildren(u,e,o))}return s||(i.length===1&&o==="api"&&this.selectionCtx.setRoot(i[0].primaryRow),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(i[0].primaryRow,r,o)),l>0&&(this.updateGroupsFromChildrenSelections(o),this.dispatchSelectionChanged(o))),l}selectRange(e,t,s){let i=0;return e.forEach(n=>{const o=n.primaryRow;if(o.group&&this.groupSelectsDescendants)return;this.selectRowNode(o,t,void 0,s)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),i}selectChildren(e,t,s){const i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:i}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((s,i)=>{e(s)&&t.set(i,s)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:i}=this.beans;if(!it(s))return!1;const n=i.rootNode;if(!n)return!1;let o=!1;const r=a=>{if(a!==n){const l=this.calculateSelectedFromChildren(a);o=this.selectRowNode(a,l===null?!1:l,void 0,e)||o}};return Rn(n,this.beans.rowModel.hierarchical,t,r),o}clearOtherNodes(e,t,s){const i=new Map;let n=0;return this.selectedNodes.forEach(o=>{const r=o.id==e.id;if((t?!Q9(e,o):!0)&&!r){const l=this.selectedNodes.get(o.id);n+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&o.parent&&i.set(o.parent.id,o.parent)}}),i.forEach(o=>{const r=this.calculateSelectedFromChildren(o);this.selectRowNode(o,r===null?!1:r,void 0,s)}),n}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 ki(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(!it(e))return;const s=t.getTopLevelNodes();if(s===null)return;const i=[];function n(o){for(let r=0,a=o.length;r<a;r++){const l=o[r];l.isSelected()?i.push(l):l.group&&l.childrenAfterGroup&&n(l.childrenAfterGroup)}}return n(s),i}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const s=it(this.gos);let i=!1;const n=o=>{const r=this.selectRowNode(o.primaryRow,!1,void 0,e);i||(i=r)};if(t==="currentPage"||t==="filtered"){if(!s){je(102);return}this.getNodesToSelect(t).forEach(n)}else this.selectedNodes.forEach(n),this.reset(e);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const o=this.updateGroupsFromChildrenSelections(e);i||(i=o)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,s=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&s++)}),{selectedCount:t,notSelectedCount:s}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:s}=this.getSelectedCounts(e);return N1(t,s)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],s=n=>t.push(n);if(e==="currentPage")return this.forEachNodeOnPage(n=>{if(!n.group){s(n);return}if(!n.footer&&!n.expanded){const o=r=>{s(r);const a=r.childrenAfterFilter;if(a)for(let l=0,c=a.length;l<c;++l)o(a[l])};o(n);return}this.groupSelectsDescendants||s(n)}),t;const i=this.beans.rowModel;return e==="filtered"?(i.forEachNodeAfterFilter(s),t):(i.forEachNode(s),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:s}=this.beans,i=t.getFirstRow(),n=t.getLastRow();for(let o=i;o<=n;o++){const r=s.getRow(o);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:s}=this;if(!an(t)){q(132);return}if(CR(t)&&!Gl(t)){q(130);return}if(!this.canSelectAll())return;const{source:i,selectAll:n}=e;let o=!1;if(this.getNodesToSelect(n).forEach(r=>{const a=this.selectRowNode(r.primaryRow,!0,void 0,i);o||(o=a)}),s.selectAll=!0,it(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(i);o||(o=r)}o&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,s){if(e||(e=[]),!Array.isArray(e)){je(103);return}const i=new Set(e),n=[];this.beans.rowModel.forEachNode(o=>{i.has(o.id)&&n.push(o)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:n,source:t})}canSelectAll(){return it(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:s}=this.beans;if(!an(t))return;const i="selectableChanged",n=it(t)&&this.groupSelectsDescendants,o=[];if(n){const r=s.rootNode;r&&Rn(r,s.hierarchical,e,a=>{let l=!1;for(const c of a.childrenAfterGroup)l||(l=c.selectable),!c.group&&!this.updateRowSelectable(c,!0)&&c.isSelected()&&o.push(c);this.setRowSelectable(a,l,!0)})}else s.forEachNode(r=>{!this.updateRowSelectable(r,!0)&&r.isSelected()&&o.push(r)});o.length&&this.setNodesSelected({nodes:o,newValue:!1,source:i}),!e&&n&&this.updateGroupsFromChildrenSelections?.(i)}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 i=X9(s);e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),i||this.detailSelection.set(e.id,new Set(s.getSelectedNodes().map(o=>o.id)))}setDetailSelectionState(e,t,s){if(this.masterSelectsDetail){if(!Gl(t)){q(269);return}switch(e.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const i=this.detailSelection.get(e.id);if(i){const n=[];for(const o of i){const r=s.getRowNode(o);r&&n.push(r)}s.setNodesSelected({nodes:n,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function X9(e){let t=0,s=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&s++}),N1(t,s)}function N1(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function Q9(e,t){let s=t.parent;for(;s;){if(s===e)return!0;s=s.parent}return!1}function H1(e){const t=e.isSelected()===!1,s=e.childrenAfterFilter?.some(H1)??!1;return t||s}var J9={moduleName:"SharedRowSelection",version:Q,beans:[L9],css:[O9],apiFunctions:{setNodesSelected:N9,selectAll:H9,deselectAll:G9,selectAllFiltered:B9,deselectAllFiltered:V9,selectAllOnCurrentPage:z9,deselectAllOnCurrentPage:W9,getSelectedNodes:j9,getSelectedRows:_9}},eL={moduleName:"RowSelection",version:Q,rowModels:["clientSide","infinite","viewport"],beans:[Z9],dependsOn:[J9]},tL=class extends B{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,i=s.cellClassRules,n=this.getCellClassParams(e,s);wp(this.beans.expressionSvc,i===this.cellClassRules?void 0:this.cellClassRules,i,n,o=>t.toggleCss(o,!0),o=>t.toggleCss(o,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column,t=e.colDef,s=t.cellStyle;if(!s)return;let i;if(typeof s=="function"){const n=this.getCellClassParams(e,t);i=s(n)}else i=s;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,s=e.colDef,i=this.getCellClassParams(e,s);for(const o of this.staticClasses)t.toggleCss(o,!1);const n=this.beans.cellStyles.getStaticCellClasses(s,i);this.staticClasses=n;for(const o of n)t.toggleCss(o,!0)}getCellClassParams(e,t){const{value:s,rowNode:i}=this.cellCtrl;return xe(this.beans.gos,{value:s,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},sL=class extends B{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,s,i){wp(this.beans.expressionSvc,void 0,e.cellClassRules,t,s,i),this.processStaticCellClasses(e,t,s)}getStaticCellClasses(e,t){const{cellClass:s}=e;if(!s)return[];let i;return typeof s=="function"?i=s(t):i=s,typeof i=="string"&&(i=[i]),i||[]}createCellCustomStyleFeature(e){return new tL(e,this.beans)}processStaticCellClasses(e,t,s){this.getStaticCellClasses(e,t).forEach(n=>{s(n)})}},iL={moduleName:"CellStyle",version:Q,beans:[sL]},nL={moduleName:"RowStyle",version:Q,beans:[Q6]},oL={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,overlayComponent:!0,suppressOverlays:!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},Gt="clientSide",Et="serverSide",Qn="infinite",rL={onGroupExpandedOrCollapsed:[Gt],refreshClientSideRowModel:[Gt],isRowDataEmpty:[Gt],forEachLeafNode:[Gt],forEachNodeAfterFilter:[Gt],forEachNodeAfterFilterAndSort:[Gt],resetRowHeights:[Gt,Et],applyTransaction:[Gt],applyTransactionAsync:[Gt],flushAsyncTransactions:[Gt],getBestCostNodeSelection:[Gt],getServerSideSelectionState:[Et],setServerSideSelectionState:[Et],applyServerSideTransaction:[Et],applyServerSideTransactionAsync:[Et],applyServerSideRowData:[Et],retryServerSideLoads:[Et],flushServerSideAsyncTransactions:[Et],refreshServerSide:[Et],getServerSideGroupLevelState:[Et],refreshInfiniteCache:[Qn],purgeInfiniteCache:[Qn],getInfiniteRowCount:[Qn],isLastRowIndexKnown:[Qn,Et],expandAll:[Gt,Et],collapseAll:[Gt,Et],onRowHeightChanged:[Gt,Et],setRowCount:[Qn,Et],getCacheBlockState:[Qn,Et]},aL={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 lL(e,t,s){const i=aL[e];if(i){const{version:o,new:r,old:a,message:l}=i,c=a??e;return(...d)=>{const u=r?`Please use ${r} instead. `:"";return Dr(`Since ${o} api.${c} is deprecated. ${u}${l??""}`),t.apply(t,d)}}const n=rL[e];return n?(...o)=>{const r=s.rowModel.getType();if(!n.includes(r)){uo(`api.${e} can only be called when gridOptions.rowModelType is ${n.join(" or ")}`);return}return t.apply(t,o)}:t}var cL={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",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},dL={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,aasc:1,adesc: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},uL={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",overlayLoading:"Overlay",overlayExporting:"Overlay",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",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["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"},hL=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),pL=class extends B{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,nR(dk)}warnOnInitialPropertyUpdate(e,t){e==="api"&&oL[t]&&q(22,{key:t})}processGridOptions(e){this.processOptions(e,J4())}validateApiFunction(e,t){return lL(e,t,this.beans)}missingUserComponent(e,t,s,i){const n=wo[t];n?this.gos.assertModuleRegistered(n,`AG Grid '${e}' component: ${t}`):q(101,{propertyName:e,componentName:t,agGridDefaults:s,jsComps:i})}missingDynamicBean(e){const t=cL[e];return t?Ns(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){fL.has(e)&&q(10,{eventType:e})}validateIcon(e){if(hL.has(e)&&q(43,{iconName:e}),dL[e])return;const t=uL[e];if(t){je(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:jh(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}q(134,{iconName:e})}isProvidedUserComp(e){return!!wo[e]}validateColDef(e){this.processOptions(e,W4())}processOptions(e,t){const{validations:s,deprecations:i,allProperties:n,propertyExceptions:o,objectName:r,docsUrl:a}=t;n&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...o??[],...Object.keys(i)],n,r,a);const l=new Set;if(Object.keys(e).forEach(d=>{const u=i[d];if(u){const{message:b,version:x}=u;l.add(`As of v${x}, ${String(d)} is deprecated. ${b??""}`)}const h=e[d];if(h==null||h===!1)return;const g=s[d];if(!g)return;const{dependencies:m,validate:v,supportedRowModels:C,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(C){const b=this.gridOptions.rowModelType??"clientSide";if(!C.includes(b)){l.add(`${String(d)} is not supported with the '${b}' row model. It is only valid with: ${C.join(", ")}.`);return}}if(m){const b=this.checkForRequiredDependencies(d,m,e);if(b){l.add(b);return}}if(v){const b=v(e,this.gridOptions,this.beans);if(b){l.add(b);return}}}),l.size>0)for(const d of l)Dr(d)}checkForRequiredDependencies(e,t,s){const n=Object.entries(t).filter(([o,r])=>{const a=s[o];return!r.required.includes(a)});return n.length===0?null:n.map(([o,r])=>`'${String(e)}' requires '${o}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
67
67
  `)}checkProperties(e,t,s,i,n){const o=["__ob__","__v_skip","__metadata__"],r=gL(Object.getOwnPropertyNames(e),[...o,...t,...s],s),a=Object.keys(r);for(const l of a){const c=r[l];let d=`invalid ${i} property '${l}' did you mean any of these: ${c.slice(0,8).join(", ")}.`;s.includes("context")&&(d+=`
68
- If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Dr(d)}if(a.length>0&&n){const l=this.beans.frameworkOverrides.getDocLink(n);Dr(`to see all the valid ${i} properties please check: ${l}`)}}};function gL(e,t,s){const i={},n=e.filter(o=>!t.some(r=>r===o));if(n.length>0)for(const o of n)i[o]=Ju({inputValue:o,allSuggestions:s}).values;return i}var fL=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),mL={moduleName:"Validation",version:Q,beans:[pL]},vL={moduleName:"AllCommunity",version:Q,dependsOn:[uI,AI,C7,mL,r8,a8,l8,c8,d8,u8,h8,o8,s7,i7,n7,o7,t7,a7,l7,M7,vk,J7,vw,kk,Ik,R9,CI,tD,r9,eL,ZT,iL,SI,nL,R7,JT,m9,l1,E7,E9,eD,hI,A9]};function de(e,t={}){const s=Object.keys(t).map(i=>{const n=t[i];return n!=null?`${i}=${n}`:null}).filter(Boolean).join(";");return[e,s].filter(i=>i.length>0).join(":")}var re={grid(e){return de("ag-grid-root",{gridId:e})},headerGroupCell(e){return de("ag-header-group-cell",{colId:e})},headerCell(e){return de("ag-header-cell",{colId:e})},headerCheckbox(e){return de("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return de("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return de("ag-floating-filter",{colId:e})},floatingFilterButton(e){return de("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return de("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return de("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return de(`ag-${e.source}-picker-display`,ol(e))},numberFilterInstanceInput(e){return de(`ag-${e.source}-number-input`,ol(e))},textFilterInstanceInput(e){return de(`ag-${e.source}-text-input`,ol(e))},dateFilterInstanceInput(e){return de(`ag-${e.source}-date-input`,ol(e))},setFilterInstanceMiniFilterInput(e){return de(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return de(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return de(`ag-${e.source}-set-filter-apply-panel-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},filterConditionRadioButton(e,t){return de(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return de("ag-advanced-filter-input")},advancedFilterButton(e){return de("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return de("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return de("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return de("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return de("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return de("ag-advanced-filter-builder-add-item-button")},rowNode(e){return de("ag-row",{"row-id":e})},cell(e,t){return de("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return re.cell(e,xi)},checkbox(e,t){return de("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return re.checkbox(e,$h)},autoGroupColumnCheckbox(e){return re.checkbox(e,xi)},dragHandle(e,t){return de("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return de("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return de("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return re.groupContracted(e,xi)},autoGroupExpanded(e){return re.groupExpanded(e,xi)},rowNumber(e){return re.cell(e,qh)},menu(){return de("ag-menu")},menuOption(e){return de("ag-menu-option",{option:e})},sideBar(){return de("ag-side-bar")},sideBarButton(e){return de("ag-side-button",{label:e})},columnToolPanel(){return de("ag-column-panel")},pivotModeSelect(){return de("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return de("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return de("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return de("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return de("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return de("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,s){return de("ag-column-drop-cell-drag-handle",{source:e,area:t,label:s})},columnDropCellCancelButton(e,t,s){return de("ag-column-drop-cell-cancel",{source:e,area:t,label:s})},columnDropArea(e,t){return de("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return de("ag-filter-panel")},filterToolPanelAddFilterButton(){return de("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return de("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return de("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return de("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return de("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return de("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return de("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return de("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return de("ag-status-bar-selected-row-count")},statusBarAggregations(){return de("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return de("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return de("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return de("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return de("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return de("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return de("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return de("ag-paging-page-summary-panel-total-page",{value:e})},fillHandle(){return de("ag-fill-handle")},columnChooserCloseButton(){return de("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return de("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return de("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return de("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return de("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return de("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return de("ag-overlay")}};function CL(e,t){const s={};for(const i of Object.keys(e))t[i]!==null&&(s[t[i]??i]=e[i]);return s}function wL(e){return e.source!=="floating-filter"?{index:0,...e}:e}function ol(e){return CL(wL(e),{colLabel:"label"})}var G1="data-testid";function ge(e,t){e?.setAttribute(G1,t)}function bL(e){G1=e}var xL=class extends B{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=ht(this,()=>this.setupAllTestIds(),500),t=ht(this,()=>{this.setupAllTestIds(),e()},0);this.addManagedEventListeners({firstDataRendered:t,displayedRowsChanged:t,displayedColumnsChanged:t,displayedColumnsWidthChanged:t,virtualColumnsChanged:t,columnMenuVisibleChanged:t,contextMenuVisibleChanged:t,advancedFilterBuilderVisibleChanged:t,fieldPickerValueSelected:t,modelUpdated:t,sideBarUpdated:t,pinnedHeightChanged:t,gridReady:t,overlayExclusiveChanged:t,rowGroupOpened:t,scrollVisibilityChanged:t,gridSizeChanged:t,filterOpened:t,filterChanged:t,cellSelectionChanged:t})}setupAllTestIds(){const e=ms(this.beans),t=ew(this.beans),s=e.querySelector(`[grid-id="${t}"]`);ge(s,re.grid(t)),e.querySelectorAll(".ag-header-group-cell").forEach(o=>{ge(o,re.headerGroupCell(o.getAttribute("col-id")))}),e.querySelectorAll(".ag-header-cell").forEach(o=>{const r=o.getAttribute("col-id"),l=o.classList.contains("ag-floating-filter")?re.floatingFilter(r):re.headerCell(r);ge(o,l),ge(o.querySelector(".ag-header-cell-filter-button"),re.headerFilterButton(r)),ge(o.querySelector(".ag-header-cell-menu-button"),re.headerCellMenuButton(r)),ge(o.querySelector(".ag-header-cell-resize"),re.headerResizeHandle(r)),ge(o.querySelector(".ag-checkbox input[type=checkbox]"),re.headerCheckbox(r)),ge(o.querySelector(".ag-floating-filter-button button"),re.floatingFilterButton(r)),this.setupFilterInstance(o.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:r})});const i=e.querySelector(".ag-filter-menu");this.setupFilterInstance(i,{source:"column-filter"}),ge(e.querySelector(".ag-advanced-filter input[type=text]"),re.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(o=>{ge(o,re.advancedFilterButton(o.textContent))}),ge(e.querySelector("button.ag-advanced-filter-builder-button"),re.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((o,r)=>{ge(o,r===0?re.advancedFilterPanelMaximiseButton():re.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-lable="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(o=>{ge(o,re.advancedFilterPill(o.querySelector(".ag-picker-field-display")?.textContent))}),ge(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),re.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row").forEach(o=>{const r=o.getAttribute("row-id");ge(o,re.rowNode(r)),o.querySelectorAll(".ag-cell").forEach(a=>{const l=a.getAttribute("col-id");ge(a,re.cell(r,l)),ge(a.querySelector(".ag-selection-checkbox input[type=checkbox]"),re.checkbox(r,l)),ge(a.querySelector(".ag-drag-handle"),re.dragHandle(r,l)),ge(a.querySelector(".ag-group-contracted"),re.groupContracted(r,l)),ge(a.querySelector(".ag-group-expanded"),re.groupExpanded(r,l))})}),e.querySelectorAll(".ag-menu-list").forEach(o=>{ge(o,re.menu()),o.querySelectorAll(".ag-menu-option").forEach(r=>{ge(r,re.menuOption(r.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(o=>{ge(o,re.sideBar()),o.querySelectorAll(".ag-side-button button").forEach(r=>{ge(r,re.sideBarButton(r.querySelector(".ag-side-button-label")?.textContent))}),o.querySelectorAll(".ag-column-panel").forEach(r=>{ge(r,re.columnToolPanel()),ge(r.querySelector(".ag-pivot-mode-select input[type=checkbox]"),re.pivotModeSelect()),ge(r.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),re.columnPanelSelectHeaderCheckbox()),ge(r.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),re.columnPanelSelectHeaderFilter()),r.querySelectorAll(".ag-column-select-list").forEach(a=>{a.querySelectorAll(".ag-column-select-virtual-list-item").forEach(l=>{const c=l.getAttribute("aria-label");ge(l.querySelector(".ag-column-group-closed-icon"),re.columnSelectListItemGroupClosedIcon(c)),ge(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),re.columnSelectListItemCheckbox(c)),ge(l.querySelector(".ag-drag-handle"),re.columnSelectListItemDragHandle(c))})}),this.setupColumnDropArea(r,"toolbar")}),o.querySelectorAll(".ag-filter-panel").forEach(r=>{ge(r,re.filterToolPanel()),ge(r.querySelector("button.ag-filter-add-button"),re.filterToolPanelAddFilterButton()),r.querySelectorAll(".ag-filter-card").forEach(a=>{const l=a.querySelector(".ag-filter-card-title")?.textContent,c=a.querySelector(".ag-filter-type-select");ge(c,re.filterToolPanelFilterTypeSelector(l)),a.querySelectorAll(".ag-filter").forEach(d=>this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:l}))})}),o.querySelectorAll(".ag-filter-toolpanel").forEach(r=>{ge(r.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),re.filterToolPanelSearchInput()),r.querySelectorAll(".ag-filter-toolpanel-group").forEach(a=>{const l=a.querySelector(".ag-filter-toolpanel-group-title")?.textContent;ge(a,re.filterToolPanelGroup(l)),ge(a.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),re.filterToolPanelGroupCollapsedIcon(l));const c=a.querySelector(".ag-filter-toolpanel-instance-filter");c&&this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:l})})})}),ge(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),re.statusBarTotalAndFilteredRowCount()),ge(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),re.statusBarTotalRowCount()),ge(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),re.statusBarFilteredRowCount()),ge(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),re.statusBarSelectedRowCount()),ge(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),re.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(o=>{ge(o.querySelector(".ag-paging-page-size .ag-picker-field-display"),re.paginationPanelSizePickerDisplay(o.querySelector(".ag-paging-page-size .ag-picker-field-display")?.textContent)),o.querySelectorAll(".ag-paging-row-summary-panel-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbFirstRowOnPage":ge(r,re.paginationPanelFirstRowOnPage(r.textContent));break;case"lbLastRowOnPage":ge(r,re.paginationPanelLastRowOnPage(r.textContent));break;case"lbRecordCount":ge(r,re.paginationPanelRecordCount(r.textContent));break}}),o.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(r=>{ge(r,re.paginationSummaryPanelButton(r.getAttribute("aria-label")?.toLowerCase()))}),o.querySelectorAll(".ag-paging-page-summary-panel .ag-paging-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbCurrent":ge(r,re.paginationSummaryPanelCurrentPage(r.textContent));break;case"lbTotal":ge(r,re.paginationSummaryPanelTotalPage(r.textContent));break}})}),ge(e.querySelector(".ag-fill-handle"),re.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(o=>{ge(o.querySelector(".ag-panel-title-bar-button-icon"),re.columnChooserCloseButton()),ge(o.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),re.columnChooserSearchBarCheckbox()),ge(o.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),re.columnChooserSearchBarFilter()),o.querySelectorAll(".ag-column-select-list").forEach(r=>{r.querySelectorAll(".ag-column-select-virtual-list-item").forEach(a=>{const l=a.getAttribute("aria-label");ge(a.querySelector(".ag-column-group-closed-icon"),re.columnChooserListItemGroupClosedIcon(l)),ge(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),re.columnChooserListItemCheckbox(l)),ge(a.querySelector(".ag-drag-handle"),re.columnChooserListItemDragHandle(l))})})}),ge(e.querySelector(".ag-overlay-wrapper"),re.overlay());const n=e.querySelector(".ag-column-drop-wrapper");n&&this.setupColumnDropArea(n,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(n=>{ge(n,re.filterInstancePickerDisplay(t))});const s=t.source==="floating-filter"?".ag-floating-filter-body":".ag-filter-body";e.querySelectorAll(`${s} .ag-input-field:not(.ag-hidden) input[type="number"]`).forEach((n,o,r)=>{const l=r.length>1?{...t,index:o}:t;ge(n,re.numberFilterInstanceInput(l))}),e.querySelectorAll(`${s} .ag-input-field:not(.ag-hidden) input[type="text"]`).forEach((n,o,r)=>{const l=r.length>1?{...t,index:o}:t;ge(n,re.textFilterInstanceInput(l))}),e.querySelectorAll(`${s} .ag-input-field:not(.ag-hidden) input[type="date"]`).forEach((n,o,r)=>{const l=r.length>1?{...t,index:o}:t;ge(n,re.dateFilterInstanceInput(l))});const i=e.querySelector('.ag-mini-filter input[type="text"]');ge(i,re.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(n=>{const o=n.querySelector(".ag-checkbox-label")?.textContent,r=n.querySelector('input[type="checkbox"]');ge(r,re.setFilterInstanceItem(t,o))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(n=>{ge(n,re.setFilterApplyPanelButton(t,n.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(n=>{const o=n.querySelector(".ag-radio-button-label")?.textContent;ge(n.querySelector("input[type=radio]"),re.filterConditionRadioButton(t,o))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(s=>{const i=s.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");ge(s,re.columnDropArea(t,i)),s.querySelectorAll(".ag-column-drop-cell").forEach(n=>{const o=n.querySelector(".ag-column-drop-cell-text")?.textContent;ge(n.querySelector(".ag-drag-handle"),re.columnDropCellDragHandle(t,i,o)),ge(n.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),re.columnDropCellCancelButton(t,i,o))})})}},yL={moduleName:"Testing",version:Q,beans:[xL]};function SL({testIdAttribute:e}={}){e&&bL(e),Qv.registerModules([yL])}var RL=class{wrap(e,t,s,i){const n=this.createWrapper(e,i);for(const o of t??[])this.createMethod(n,o,!0);for(const o of s??[])this.createMethod(n,o,!1);return n}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&&q(49,{methodName:t}),null)}}},FL=class extends QC{constructor(e){super(e,Xh)}},kt=p.createContext({}),B1=p.createContext("default"),ca=(e,t,s,i)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const o=e.newAgStackInstance();let r,a,l=!1;return o.then(c=>{if(l){t.destroyBean(c);return}r=c,a=r.getGui(),s.appendChild(a),wm(i,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),i&&wm(i,void 0))}},wm=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const s=e;s.current=t}},is=(...e)=>e.filter(s=>s!=null&&s!=="").join(" "),cs=class V1{constructor(...t){this.classesMap={};for(const s of t)this.classesMap[s]=!0}setClass(t,s){if(!!this.classesMap[t]==s)return this;const n=new V1;return n.classesMap={...this.classesMap},n.classesMap[t]=s,n}toString(){return Object.keys(this.classesMap).filter(s=>this.classesMap[s]).join(" ")}},Bo=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()},hh=p.version?.split(".")[0],z1=hh==="16"||hh==="17";function EL(){return hh==="19"}var Sl=!1;function DL(e){return Sl||setTimeout(()=>Sl=!1,0),Sl=!0,e()}var Zr=(e,t)=>{!z1&&e&&!Sl?Ao.flushSync(t):t()},PL=e=>{z1?e():p.startTransition(e)};function TL(e,t,s){return p.useSyncExternalStore?p.useSyncExternalStore(e,t):s}function sc(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 i=[],n=[],o=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];o.set(l.instanceId,l),r.has(l.instanceId)&&i.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;o.has(c)||n.push(l)}return i.length===e.length&&n.length===0?e:i.length===0&&n.length===t.length?t:i.length===0?n:n.length===0?i:[...i,...n]}var W1=p.forwardRef((e,t)=>{const{registry:s,context:i}=p.useContext(kt),n=p.useRef(null),o=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(),[m,v]=p.useState(),[C,w]=p.useState(()=>new cs),[b,x]=p.useState(()=>new cs("ag-hidden")),[y,S]=p.useState(()=>new cs("ag-hidden")),[F,R]=p.useState(()=>new cs("ag-invisible"));p.useImperativeHandle(t,()=>({refresh(){return!1}})),p.useLayoutEffect(()=>ca(d,i,o.current),[d]);const E=p.useCallback(W=>{if(n.current=W,!W||i.isDestroyed()){c.current=i.destroyBean(c.current);return}const V={setInnerRenderer:(L,M)=>{u(L),v(M)},setChildCount:L=>g(L),toggleCss:(L,M)=>w(z=>z.setClass(L,M)),setContractedDisplayed:L=>S(M=>M.setClass("ag-hidden",!L)),setExpandedDisplayed:L=>x(M=>M.setClass("ag-hidden",!L)),setCheckboxVisible:L=>R(M=>M.setClass("ag-invisible",!L)),setCheckboxSpacing:L=>R(M=>M.setClass("ag-group-checkbox-spacing",L))},Z=s.createDynamicBean("groupCellRendererCtrl",!0);Z&&(c.current=i.createBean(Z),c.current.init(V,W,r.current,a.current,l.current,W1,e))},[]),D=p.useMemo(()=>`ag-cell-wrapper ${C.toString()}`,[C]),T=p.useMemo(()=>`ag-group-expanded ${b.toString()}`,[b]),P=p.useMemo(()=>`ag-group-contracted ${y.toString()}`,[y]),k=p.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),A=d?.componentFromFramework,U=A?d.componentClass:void 0,I=d==null&&m!=null,H=Oo(m);return p.createElement("span",{className:D,ref:E,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},p.createElement("span",{className:T,ref:a}),p.createElement("span",{className:P,ref:l}),p.createElement("span",{className:k,ref:r}),p.createElement("span",{className:"ag-group-value",ref:o},I?H:A?p.createElement(U,{...d.params}):null),p.createElement("span",{className:"ag-group-child-count"},h))}),bm=W1,Wp=p.createContext({setMethods:()=>{}}),kL=e=>{const{initialProps:t,addUpdateCallback:s,CustomComponentClass:i,setMethods:n}=e,[{key:o,...r},a]=p.useState(t);return p.useEffect(()=>{s(l=>a(l))},[]),p.createElement(Wp.Provider,{value:{setMethods:n}},p.createElement(i,{key:o,...r}))},IL=p.memo(kL),ML=0;function xm(){return`agPortalKey_${++ML}`}var j1=class{constructor(e,t,s,i){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=s,this.suppressFallbackMethods=!!i,this.statelessComponent=this.isStateless(this.reactComponent),this.key=xm(),this.portalKey=xm(),this.instanceCreated=this.isStatelessComponent()?Oe.resolve(!1):new Oe(n=>{this.resolveInstanceCreated=n})}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 i=s[e];if(i)return i.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 Oe(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=Ao.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 Oc(e,t,s){for(const i of e){const n=t[i];n&&(s[i]=n)}}var ps=class extends j1{constructor(){super(...arguments),this.awaitUpdateCallback=new Oe(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=IL}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 Oe(i=>{setTimeout(()=>{i()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,Oc(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new Oe(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},AL=class extends ps{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},LL=class extends ps{refresh(e){this.sourceParams=e,this.refreshProps()}},OL=class extends ps{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}},NL=class extends ps{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:i}=this;return e.label=t,e.icon=s,e.shake=i,e}},HL=class extends ps{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 Oe(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 Oe(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}},GL=class extends ps{constructor(){super(...arguments),this.awaitSetMethodsCallback=new Oe(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 _1(e,t){e.parentFilterInstance(s=>{(s.setModel(t)||Oe.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var BL=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){Oc(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),_1(this.floatingFilterParams,e)}},VL=class extends ps{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(),_1(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},zL=class extends ps{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},WL=class extends ps{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},jL=class extends ps{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}},_L=class extends ps{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},UL=class extends ps{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 jp(){q(231)}var $L=1e3,qL=class{constructor(e,t,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=s||$L}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){Zr(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,s)})}}},KL=p.createContext([]),YL=p.createContext(void 0),ZL=({ctrl:e})=>{const t=e.isAlive(),{context:s}=p.useContext(kt),[i,n]=p.useState(),[o,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 sa(()=>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 Go);const b=()=>{const y=e.getSelectAllGui();y&&(c.current?.insertAdjacentElement("afterend",y),a.current.addDestroyFunc(()=>y.remove()))},x={setWidth:y=>{l.current&&(l.current.style.width=y)},toggleCss:(y,S)=>h.current.toggleCss(y,S),setUserStyles:y=>r(y),setAriaSort:y=>{l.current&&(y?S2(l.current,y):R2(l.current))},setUserCompDetails:y=>n(y),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:b,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(x,w,c.current,d.current,a.current),b()},[]);p.useLayoutEffect(()=>ca(i,s,d.current,u),[i]),p.useEffect(()=>{e.setDragSource(l.current)},[i]);const m=p.useMemo(()=>!!(i?.componentFromFramework&&Bo(i.componentClass)),[i]),v=i?.componentFromFramework,C=i?.componentClass;return p.createElement("div",{ref:g,style:o,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"},v?m?p.createElement(C,{...i.params}):p.createElement(C,{...i.params,ref:u}):null))},XL=p.memo(ZL),QL=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Oc(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},JL=({ctrl:e})=>{const{context:t,gos:s}=p.useContext(kt),[i,n]=p.useState(),[o,r]=p.useState(()=>new cs("ag-header-cell","ag-floating-filter")),[a,l]=p.useState(()=>new cs),[c,d]=p.useState(()=>new cs("ag-floating-filter-button","ag-hidden")),[u,h]=p.useState("false"),[g,m]=p.useState(),[,v]=p.useState(1),C=p.useRef(),w=p.useRef(null),b=p.useRef(null),x=p.useRef(null),y=p.useRef(null),S=p.useRef(),F=p.useRef(),R=L=>{L!=null&&S.current?.(L)},E=p.useCallback(L=>{if(w.current=L,!L||!e.isAlive()||t.isDestroyed()){C.current=t.destroyBean(C.current);return}C.current=t.createBean(new Go),F.current=new Oe(z=>{S.current=z});const M={toggleCss:(z,K)=>r(ie=>ie.setClass(z,K)),setUserStyles:z=>n(z),addOrRemoveBodyCssClass:(z,K)=>l(ie=>ie.setClass(z,K)),setButtonWrapperDisplayed:z=>{d(K=>K.setClass("ag-hidden",!z)),h(z?"false":"true")},setWidth:z=>{w.current&&(w.current.style.width=z)},setCompDetails:z=>m(z),getFloatingFilterComp:()=>F.current?F.current:null,setMenuIcon:z=>y.current?.appendChild(z)};e.setComp(M,L,y.current,b.current,C.current)},[]);p.useLayoutEffect(()=>ca(g,t,b.current,R),[g]);const D=p.useMemo(()=>o.toString(),[o]),T=p.useMemo(()=>a.toString(),[a]),P=p.useMemo(()=>c.toString(),[c]),k=p.useMemo(()=>!!(g&&g.componentFromFramework&&Bo(g.componentClass)),[g]),A=p.useMemo(()=>s.get("reactiveCustomComponents"),[]),U=p.useMemo(()=>s.get("enableFilterHandlers"),[]),[I,H]=p.useState();p.useEffect(()=>{if(g?.componentFromFramework)if(A){const L=U?QL:BL,M=new L(g.params,()=>v(z=>z+1));R(M),H(M)}else jp()},[g]);const W=I?.getProps(),V=g?.componentFromFramework,Z=g?.componentClass;return p.createElement("div",{ref:E,style:i,className:D,role:"gridcell"},p.createElement("div",{ref:b,className:T,role:"presentation"},V?A?W&&p.createElement(Wp.Provider,{value:{setMethods:L=>I.setMethods(L)}},p.createElement(Z,{...W})):p.createElement(Z,{...g.params,ref:k?()=>{}:R}):null),p.createElement("div",{ref:x,"aria-hidden":u,className:P,role:"presentation"},p.createElement("button",{ref:y,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},eO=p.memo(JL),tO=({ctrl:e})=>{const{context:t}=p.useContext(kt),[s,i]=p.useState(),[n,o]=p.useState(()=>new cs),[r,a]=p.useState(()=>new cs),[l,c]=p.useState("false"),[d,u]=p.useState(),[h,g]=p.useState(),m=p.useRef(),v=p.useRef(null),C=p.useRef(null),w=p.useRef(null),b=p.useRef(),x=p.useCallback(D=>{if(v.current=D,!D||!e.isAlive()||t.isDestroyed()){m.current=t.destroyBean(m.current);return}m.current=t.createBean(new Go);const T={setWidth:P=>{v.current&&(v.current.style.width=P)},toggleCss:(P,k)=>o(A=>A.setClass(P,k)),setUserStyles:P=>i(P),setHeaderWrapperHidden:P=>{const k=w.current;k&&(P?k.style.setProperty("display","none"):k.style.removeProperty("display"))},setHeaderWrapperMaxHeight:P=>{const k=w.current;k&&(P!=null?k.style.setProperty("max-height",`${P}px`):k.style.removeProperty("max-height"),k.classList.toggle("ag-header-cell-comp-wrapper-limited-height",P!=null))},setUserCompDetails:P=>g(P),setResizableDisplayed:P=>{a(k=>k.setClass("ag-hidden",!P)),c(P?"false":"true")},setAriaExpanded:P=>u(P),getUserCompInstance:()=>b.current||void 0};e.setComp(T,D,C.current,w.current,m.current)},[]);p.useLayoutEffect(()=>ca(h,t,w.current),[h]),p.useEffect(()=>{v.current&&e.setDragSource(v.current)},[h]);const y=p.useMemo(()=>!!(h?.componentFromFramework&&Bo(h.componentClass)),[h]),S=p.useMemo(()=>"ag-header-group-cell "+n.toString(),[n]),F=p.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),R=h?.componentFromFramework,E=h?.componentClass;return p.createElement("div",{ref:x,style:s,className:S,role:"columnheader","aria-expanded":d},p.createElement("div",{ref:w,className:"ag-header-cell-comp-wrapper",role:"presentation"},R?y?p.createElement(E,{...h.params}):p.createElement(E,{...h.params,ref:b}):null),p.createElement("div",{ref:C,"aria-hidden":l,className:F}))},sO=p.memo(tO),iO=({ctrl:e})=>{const{gos:t,context:s}=p.useContext(kt),{topOffset:i,rowHeight:n}=p.useMemo(()=>e.getTopAndHeight(),[]),o=p.useMemo(()=>t.get("tabIndex"),[]),[r,a]=p.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=p.useState(()=>n+"px"),[u,h]=p.useState(()=>i+"px"),g=p.useRef(null),[m,v]=p.useState(()=>e.getUpdatedHeaderCtrls()),C=p.useRef(),w=p.useRef(null),b=p.useCallback(S=>{if(w.current=S,!S||!e.isAlive()||s.isDestroyed()){C.current=s.destroyBean(C.current);return}C.current=s.createBean(new Go);const F={setHeight:R=>d(R),setTop:R=>h(R),setHeaderCtrls:(R,E,D)=>{const T=g.current,P=sc(T,R,E);P!==T&&(g.current=P,Zr(D,()=>v(P)))},setWidth:R=>{w.current&&(w.current.style.width=R)},setRowIndex:R=>{a(R)}};e.setComp(F,C.current,!1)},[]),x=p.useMemo(()=>({height:c,top:u}),[c,u]),y=p.useCallback(S=>{switch(e.type){case"group":return p.createElement(sO,{ctrl:S,key:S.instanceId});case"filter":return p.createElement(eO,{ctrl:S,key:S.instanceId});default:return p.createElement(XL,{ctrl:S,key:S.instanceId})}},[]);return p.createElement("div",{ref:b,className:l,role:"row",style:x,tabIndex:o,"aria-rowindex":r},m.map(y))},nO=p.memo(iO),oO=({pinned:e})=>{const[t,s]=p.useState(!0),[i,n]=p.useState([]),{context:o}=p.useContext(kt),r=p.useRef(null),a=p.useRef(null),l=p.useRef(),c=e==="left",d=e==="right",u=!c&&!d,h=p.useCallback(v=>{if(r.current=v,!v||o.isDestroyed()){l.current=o.destroyBean(l.current);return}l.current=o.createBean(new HF(e));const C={setDisplayed:s,setCtrls:w=>n(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(C,r.current)},[]),g=t?"":"ag-hidden",m=()=>i.map(v=>p.createElement(nO,{ctrl:v,key:v.instanceId}));return c?p.createElement("div",{ref:h,className:"ag-pinned-left-header "+g,"aria-hidden":!t,role:"rowgroup"},m()):d?p.createElement("div",{ref:h,className:"ag-pinned-right-header "+g,"aria-hidden":!t,role:"rowgroup"},m()):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"},m())):null},ou=p.memo(oO),rO=()=>{const[e,t]=p.useState(()=>new cs),[s,i]=p.useState(),{context:n}=p.useContext(kt),o=p.useRef(null),r=p.useRef(),a=p.useCallback(d=>{if(o.current=d,!d||n.isDestroyed()){r.current=n.destroyBean(r.current);return}r.current=n.createBean(new TF);const u={toggleCss:(h,g)=>t(m=>m.setClass(h,g)),setHeightAndMinHeight:h=>i(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(ou,{pinned:"left"}),p.createElement(ou,{pinned:null}),p.createElement(ou,{pinned:"right"}))},aO=p.memo(rO),lO=(e,t)=>{p.useEffect(()=>{const s=t.current;if(s){const i=s.parentElement;if(i){const n=document.createComment(e);return i.insertBefore(n,s),()=>{n.remove()}}}},[e])},Qi=lO,cO=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new Oe(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){Oc(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()}},dO=e=>{const t=p.useRef(e),s=p.useRef(),i=p.useRef(!1),n=p.useRef(!1),[,o]=p.useState(0);i.current&&(n.current=!0),p.useEffect(()=>(i.current||(s.current=t.current(),i.current=!0),o(r=>r+1),()=>{n.current&&s.current?.()}),[])},uO=e=>{const[t,s]=p.useState(),i=p.useContext(kt),{context:n,popupSvc:o,gos:r,editSvc:a}=i,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return dO(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let g,m;if(!n.isDestroyed()){m=n.createBean(a.createPopupEditorWrapper(u.params));const v=m.getGui();if(e.jsChildComp){const S=e.jsChildComp.getGui();S&&v.appendChild(S)}const{column:C,rowNode:w}=c,b={column:C,rowNode:w,type:"popupCellEditor",eventSource:d,ePopup:v,position:l.popupPosition,keepWithinBounds:!0},x=o?.positionPopupByComponent.bind(o,b),y=o?.addPopup({modal:h,eChild:v,closeOnEsc:!0,closedCallback:S=>{c.onPopupEditorClosed(S)},anchorToElement:d,positionCallback:x,ariaOwns:d});g=y?y.hideFunc:void 0,s(m),e.jsChildComp?.afterGuiAttached?.()}return()=>{g?.(),n.destroyBean(m)}}),p.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(et(i))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?Ao.createPortal(e.wrappedContent,t.getGui()):null},ym=p.memo(uO),hO=(e,t,s)=>{const{compProxy:i}=e;s(i);const n=i.getProps(),o=Bo(t);return p.createElement(Wp.Provider,{value:{setMethods:r=>i.setMethods(r)}},o?p.createElement(t,{...n}):p.createElement(t,{...n,ref:r=>i.setRef(r)}))},Sm=(e,t,s)=>e.compProxy?hO(e,t,s):p.createElement(t,{...e.compDetails.params,ref:s}),pO=(e,t,s,i,n)=>{const o=e.compDetails,r=o.componentClass,a=o.componentFromFramework&&!e.popup,l=o.componentFromFramework&&e.popup,c=!o.componentFromFramework&&e.popup;return a?Sm(e,r,t):l?p.createElement(ym,{editDetails:e,cellCtrl:i,eParentCell:s,wrappedContent:Sm(e,r,t)}):c&&n?p.createElement(ym,{editDetails:e,cellCtrl:i,eParentCell:s,jsChildComp:n}):null},gO=(e,t,s,i,n,o,r=!1)=>{const{context:a}=p.useContext(kt),l=p.useCallback(()=>{const c=n.current;if(!c)return;const d=c.getGui();d&&d.parentElement&&d.remove(),a.destroyBean(c),n.current=void 0},[]);p.useEffect(()=>{const c=e!=null&&!r,d=e?.compDetails&&!e.compDetails.componentFromFramework,u=t&&s==null;if(!(c&&d&&!u)){l();return}const g=e.compDetails;if(n.current){const v=n.current,w=v.refresh!=null&&e.force==!1?v.refresh(g.params):!1;if(w===!0||w===void 0)return;l()}g.newAgStackInstance().then(v=>{if(!v)return;const C=v.getGui();if(!C)return;(t?s:o.current).appendChild(C),n.current=v})},[e,t,i,r]),p.useEffect(()=>l,[])},U1=gO,fO=({cellCtrl:e,parent:t})=>{const s=p.useRef(),i=p.useMemo(()=>{const{loadingComp:n}=e.getDeferLoadingCellRenderer();return n?{value:void 0,compDetails:n,force:!1}:void 0},[e]);if(U1(i,!1,void 0,1,s,t),i?.compDetails?.componentFromFramework){const n=i.compDetails.componentClass;return p.createElement(n,{...i.compDetails.params})}return p.createElement(p.Fragment,null)},mO=({cellCtrl:e,printLayout:t,editingCell:s})=>{const i=p.useContext(kt),{context:n}=i,{column:{colIdSanitised:o},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),[m,v]=p.useState(),[C,w]=p.useState(!1),[b,x]=p.useState(!1),[y,S]=p.useState(!1),F=p.useRef(null),[R,E]=p.useState(),D=p.useMemo(()=>e.isForceWrapper(),[e]),T=p.useMemo(()=>e.getCellAriaRole(),[e]),P=p.useRef(null),k=p.useRef(null),A=p.useRef(null),U=p.useRef(),I=p.useRef(),H=p.useRef(),W=p.useRef([]),V=p.useRef(),Z=p.useRef(),[L,M]=p.useState(0),z=p.useCallback(ce=>{Z.current=ce,M(Se=>Se+1)},[]),K=l!=null&&(C||y||b)&&(d==null||!!d.popup),ie=D||K,we=p.useMemo(()=>e.getCellValueClass(),[e]),N=p.useCallback(ce=>{if(I.current=ce,ce){const Se=ce.isCancelBeforeStart&&ce.isCancelBeforeStart();setTimeout(()=>{Se?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(ce))})}},[e]),oe=p.useRef();oe.current||(oe.current=new sa(()=>P.current));const Te=!!d&&!d.popup;U1(l,ie,Z.current,L,U,P,Te);const ee=p.useRef();p.useLayoutEffect(()=>{const ce=ee.current,Se=l;if(ee.current=l,ce==null||ce.compDetails==null||Se==null||Se.compDetails==null)return;V.current?.refreshVisibility();const ke=ce.compDetails,Me=Se.compDetails;if(ke.componentClass!=Me.componentClass||A.current?.refresh==null)return;A.current.refresh(Me.params)!=!0&&g(Ne=>Ne+1)},[l]),p.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||n.isDestroyed())return;const Se=d.compDetails,ke=d.popup===!0,Me=Se.newAgStackInstance();return Me.then(be=>{if(!be)return;const Ne=be.getGui();N(be),ke||((D?H:P).current?.appendChild(Ne),be.afterGuiAttached?.()),E(be)}),()=>{Me.then(be=>{const Ne=be.getGui();e.disableEditorTooltipFeature(),n.destroyBean(be),N(void 0),E(void 0),Ne?.remove()})}},[d]);const le=p.useCallback(ce=>{if(H.current=ce,!ce||n.isDestroyed()||!e.isAlive()){const Me=W.current;W.current=[];for(const be of Me)be();return}let Se;const ke=Me=>{Me&&(ce.insertAdjacentElement("afterbegin",Me.getGui()),W.current.push(()=>{si(Me.getGui()),n.destroyBean(Me),V.current===Se&&(V.current=void 0)}))};C&&ke(e.createSelectionCheckbox()),y&&ke(e.createDndSource()),b&&(Se=e.createRowDragComp(),V.current=Se,Se&&(ke(Se),Se.refreshVisibility()))},[e,n,y,b,C]),$=p.useCallback(()=>{const ce=!e.isCellSpanning()||k.current,Se=P.current;if(!Se||!ce||!e||!e.isAlive()||n.isDestroyed()){a.current=n.destroyBean(a.current);return}a.current=n.createBean(new Go);const ke={toggleCss:(be,Ne)=>oe.current.toggleCss(be,Ne),setUserStyles:be=>v(be),getFocusableElement:()=>P.current,setIncludeSelection:be=>w(be),setIncludeRowDrag:be=>x(be),setIncludeDndSource:be=>S(be),setRowResizerElement:be=>{F.current&&si(F.current),F.current=be,be&&P.current&&P.current.appendChild(be)},getCellEditor:()=>I.current??null,getCellRenderer:()=>A.current??U.current,getParentOfValue:()=>Z.current??H.current??P.current,setRenderDetails:(be,Ne,Ve)=>{const St=()=>{c(_e=>_e?.compDetails!==be||_e?.value!==Ne||_e?.force!==Ve?{value:Ne,compDetails:be,force:Ve}:_e)};if(be?.params?.deferRender&&!e.rowNode.group){const{loadingComp:_e,onReady:Rt}=e.getDeferLoadingCellRenderer();if(_e){c({value:void 0,compDetails:_e,force:!1}),Rt.then(()=>PL(St));return}}St()},setEditDetails:(be,Ne,Ve,St)=>{if(be){let _e;be.componentFromFramework&&(St?_e=new cO(be.params,()=>g(Rt=>Rt+1)):jp()),u({compDetails:be,popup:Ne,popupPosition:Ve,compProxy:_e}),Ne||c(void 0)}else e.hasBrowserFocus()&&ke.getFocusableElement().focus({preventScroll:!0}),I.current=void 0,u(void 0)},refreshEditStyles:(be,Ne)=>{if(!P.current)return;const{current:Ve}=oe;Ve.toggleCss("ag-cell-value",!ie),Ve.toggleCss("ag-cell-inline-editing",!!be&&!Ne),Ve.toggleCss("ag-cell-popup-editing",!!be&&!!Ne),Ve.toggleCss("ag-cell-not-inline-editing",!be||!!Ne)}},Me=H.current||void 0;e.setComp(ke,Se,k.current??void 0,Me,t,s,a.current)},[]),he=p.useCallback(ce=>{P.current=ce,$()},[]),G=p.useCallback(ce=>{k.current=ce,$()},[]),ne=p.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&Bo(l.compDetails.componentClass)),[l]);p.useLayoutEffect(()=>{if(!P.current)return;const{current:ce}=oe;ce.toggleCss("ag-cell-value",!ie),ce.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),ce.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),ce.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});const pe=()=>{const{compDetails:ce,value:Se}=l;if(!ce)return Se?.toString?.()??Se;if(ce.componentFromFramework){const ke=ce.componentClass;return p.createElement(p.Suspense,{fallback:p.createElement(fO,{cellCtrl:e,parent:P})},ne?p.createElement(ke,{...ce.params,key:h}):p.createElement(ke,{...ce.params,key:h,ref:A}))}},Fe=()=>{const ce=()=>l==null?null:ie?p.createElement("span",{role:"presentation",id:`cell-${r}`,className:we,ref:z},pe()):pe(),Se=ke=>pO(ke,N,P.current,e,R);return d!=null?d.popup?p.createElement(p.Fragment,null,ce(),Se(d)):Se(d):ce()},Pe=()=>p.createElement("div",{ref:he,style:m,role:T,"col-id":o},ie?p.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:le},Fe()):Fe());return e.isCellSpanning()?p.createElement("div",{ref:G,className:"ag-spanned-cell-wrapper",role:"presentation"},Pe()):Pe()},vO=p.memo(mO),CO=({rowCtrl:e,containerType:t})=>{const{context:s,gos:i,editSvc:n}=p.useContext(kt),o=p.useContext(B1)==="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),[m,v]=p.useState(()=>e.businessKey),[C,w]=p.useState(()=>e.rowStyles),b=p.useRef(null),[x,y]=p.useState(()=>null),[S,F]=p.useState(),[R,E]=p.useState(()=>c?e.getInitialRowTop(t):void 0),[D,T]=p.useState(()=>c?e.getInitialTransform(t):void 0),P=p.useRef(null),k=p.useRef(),A=p.useRef(),U=p.useRef(!1),[I,H]=p.useState(0);p.useEffect(()=>{if(U.current||!S||I>10)return;const le=P.current?.firstChild;le?(e.setupDetailRowAutoHeight(le),U.current=!0):H($=>$+1)},[S,I]);const W=p.useRef();W.current||(W.current=new sa(()=>P.current));const V=p.useRef(()=>{}),Z=p.useCallback(le=>(V.current=le,()=>{V.current=()=>{}}),[]),L=TL(Z,()=>b.current,[]),M=o?L:x,z=p.useCallback(le=>{if(P.current=le,r.current=le?s.createBean(new Go):s.destroyBean(r.current),!le){e.unsetComp(t);return}if(!e.isAlive()||s.isDestroyed())return;const $={setTop:E,setTransform:T,toggleCss:(he,G)=>W.current.toggleCss(he,G),setDomOrder:he=>a.current=he,setRowIndex:u,setRowId:g,setRowBusinessKey:v,setUserStyles:w,setCellCtrls:(he,G)=>{const ne=b.current,pe=sc(ne,he,a.current);pe!==ne&&(b.current=pe,o?V.current():Zr(G,()=>y(pe)))},showFullWidth:he=>{A.current=he.params,F(he)},getFullWidthCellRenderer:()=>k.current,getFullWidthCellRendererParams:()=>A.current,refreshFullWidth:he=>{const G=he();return A.current=G,oe.current?(F(ne=>({...ne,params:G})),!0):!k.current||!k.current.refresh?!1:k.current.refresh(G)}};e.setComp($,le,t,r.current)},[]);p.useLayoutEffect(()=>ca(S,s,P.current,k),[S]);const K=p.useMemo(()=>{const le={top:R,transform:D};return Object.assign(le,C),le},[R,D,C]),ie=l&&S?.componentFromFramework,we=!l&&M!=null,N=p.useMemo(()=>!!(S?.componentFromFramework&&Bo(S.componentClass)),[S]),oe=p.useRef(!1);p.useEffect(()=>{oe.current=N&&!!S&&!!i.get("reactiveCustomComponents")},[N,S]);const Te=()=>M?.map(le=>p.createElement(vO,{cellCtrl:le,editingCell:n?.isEditing(le,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:le.instanceId})),ee=()=>{const le=S.componentClass;return N?p.createElement(le,{...S.params}):p.createElement(le,{...S.params,ref:k})};return p.createElement("div",{ref:z,role:"row",style:K,"row-index":d,"row-id":h,"row-business-key":m},we?Te():ie?ee():null)},Rm=p.memo(CO),wO=({name:e})=>{const{context:t,gos:s}=p.useContext(kt),i=p.useMemo(()=>ra(e),[e]),n=p.useRef(null),o=p.useRef(null),r=p.useRef(null),a=p.useRef([]),l=p.useRef([]),[c,d]=p.useState(()=>[]),u=!!s.get("enableCellSpan")&&!!i.getSpannedRowCtrls,h=p.useRef([]),g=p.useRef([]),[m,v]=p.useState(()=>[]),C=p.useRef(!1),w=p.useRef(),b=p.useMemo(()=>is("ag-viewport",KC(e)),[e]),x=p.useMemo(()=>is(YC(e)),[e]),y=p.useMemo(()=>is("ag-spanning-container",QF(e)),[e]),S=i.type==="center"||u,F=S?n:o;Qi(" AG Row Container "+e+" ",F);const R=p.useCallback(()=>{const I=!S||n.current!=null,H=o.current!=null,W=!u||r.current!=null;return I&&H&&W},[]),E=p.useCallback(()=>n.current==null&&o.current==null&&r.current==null,[]),D=p.useCallback(()=>{if(E()&&(w.current=t.destroyBean(w.current)),!t.isDestroyed()&&R()){const I=V=>{const Z=sc(l.current,a.current,C.current);Z!==l.current&&(l.current=Z,Zr(V,()=>d(Z)))},H=V=>{const Z=sc(g.current,h.current,C.current);Z!==g.current&&(g.current=Z,Zr(V,()=>v(Z)))},W={setHorizontalScroll:V=>{n.current&&(n.current.scrollLeft=V)},setViewportHeight:V=>{n.current&&(n.current.style.height=V)},setRowCtrls:({rowCtrls:V,useFlushSync:Z})=>{const L=!!Z&&a.current.length>0&&V.length>0;a.current=V,I(L)},setSpannedRowCtrls:(V,Z)=>{const L=!!Z&&h.current.length>0&&V.length>0;h.current=V,H(L)},setDomOrder:V=>{C.current!=V&&(C.current=V,I(!1))},setContainerWidth:V=>{o.current&&(o.current.style.width=V)},setOffsetTop:V=>{o.current&&(o.current.style.transform=`translateY(${V})`)}};w.current=t.createBean(new lE(e)),w.current.setComp(W,o.current,r.current??void 0,n.current)}},[R,E]),T=p.useCallback(I=>{o.current=I,D()},[D]),P=p.useCallback(I=>{r.current=I,D()},[D]),k=p.useCallback(I=>{n.current=I,D()},[D]),A=()=>p.createElement("div",{className:x,ref:T,role:S?"presentation":"rowgroup"},c.map(I=>p.createElement(Rm,{rowCtrl:I,containerType:i.type,key:I.instanceId})));if(!S)return A();const U=()=>p.createElement("div",{className:y,ref:P,role:"presentation"},m.map(I=>p.createElement(Rm,{rowCtrl:I,containerType:i.type,key:I.instanceId})));return p.createElement("div",{className:b,ref:k,role:"rowgroup"},A(),u?U():null)},bO=p.memo(wO),xO=()=>{const e=p.useContext(kt),{context:t,overlays:s}=e,[i,n]=p.useState(""),[o,r]=p.useState(0),[a,l]=p.useState(0),[c,d]=p.useState("0px"),[u,h]=p.useState("0px"),[g,m]=p.useState("100%"),[v,C]=p.useState("0px"),[w,b]=p.useState("0px"),[x,y]=p.useState("100%"),[S,F]=p.useState(!0),[R,E]=p.useState(!0),[D,T]=p.useState(null),[P,k]=p.useState(""),[A,U]=p.useState(null),[I,H]=p.useState("ag-layout-normal"),W=p.useRef();W.current||(W.current=new sa(()=>V.current));const V=p.useRef(null),Z=p.useRef(null),L=p.useRef(null),M=p.useRef(null),z=p.useRef(null),K=p.useRef(null),ie=p.useRef(null),we=p.useRef([]),N=p.useRef([]);Qi(" AG Grid Body ",V),Qi(" AG Pinned Top ",Z),Qi(" AG Sticky Top ",L),Qi(" AG Middle ",K),Qi(" AG Pinned Bottom ",ie);const oe=p.useCallback(Me=>{if(V.current=Me,!Me||t.isDestroyed()){we.current=t.destroyBeans(we.current);for(const _ of N.current)_();N.current=[];return}const be=(_,Ee)=>{_.appendChild(Ee),N.current.push(()=>Ee.remove())},Ne=_=>{const Ee=t.createBean(new _);return we.current.push(Ee),Ee},Ve=(_,Ee,Ft)=>{be(_,document.createComment(Ft)),be(_,Ne(Ee).getGui())};Ve(Me,BF," AG Fake Horizontal Scroll ");const St=s?.getOverlayWrapperCompClass();St&&Ve(Me,St," AG Overlay Wrapper "),z.current&&Ve(z.current,zF," AG Fake Vertical Scroll ");const _e={setRowAnimationCssOnBodyViewport:n,setColumnCount:_=>{V.current&&x2(V.current,_)},setRowCount:_=>{V.current&&w2(V.current,_)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:m,setTopInvisible:F,setBottomInvisible:E,setColumnMovingCss:(_,Ee)=>W.current.toggleCss(_,Ee),updateLayoutClasses:H,setAlwaysVerticalScrollClass:T,setPinnedTopBottomOverflowY:k,setCellSelectableCss:(_,Ee)=>U(Ee?_:null),setBodyViewportWidth:_=>{K.current&&(K.current.style.width=_)},registerBodyViewportResizeListener:_=>{if(K.current){const Ee=ri(e,K.current,_);N.current.push(()=>Ee())}},setStickyBottomHeight:C,setStickyBottomBottom:b,setStickyBottomWidth:y,setGridRootRole:_=>Me.setAttribute("role",_)},Rt=t.createBean(new hE);we.current.push(Rt),Rt.setComp(_e,Me,K.current,Z.current,ie.current,L.current,M.current)},[]),Te=p.useMemo(()=>is("ag-root","ag-unselectable",I),[I]),ee=p.useMemo(()=>is("ag-body-viewport",i,I,D,A),[i,I,D,A]),le=p.useMemo(()=>is("ag-body",I),[I]),$=p.useMemo(()=>is("ag-floating-top",S?"ag-invisible":null,A),[A,S]),he=p.useMemo(()=>is("ag-sticky-top",A),[A]),G=p.useMemo(()=>is("ag-sticky-bottom",v==="0px"?"ag-invisible":null,A),[A,v]),ne=p.useMemo(()=>is("ag-floating-bottom",R?"ag-invisible":null,A),[A,R]),pe=p.useMemo(()=>({height:o,minHeight:o,overflowY:P}),[o,P]),Fe=p.useMemo(()=>({height:c,top:u,width:g}),[c,u,g]),Pe=p.useMemo(()=>({height:v,bottom:w,width:x}),[v,w,x]),ce=p.useMemo(()=>({height:a,minHeight:a,overflowY:P}),[a,P]),Se=Me=>p.createElement(bO,{name:Me,key:`${Me}-container`}),ke=({section:Me,children:be,className:Ne,style:Ve})=>p.createElement("div",{ref:Me,className:Ne,role:"presentation",style:Ve},be.map(Se));return p.createElement("div",{ref:oe,className:Te},p.createElement(aO,null),ke({section:Z,className:$,style:pe,children:["topLeft","topCenter","topRight","topFullWidth"]}),p.createElement("div",{className:le,ref:z,role:"presentation"},ke({section:K,className:ee,children:["left","center","right","fullWidth"]})),ke({section:L,className:he,style:Fe,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),ke({section:M,className:G,style:Pe,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),ke({section:ie,className:ne,style:ce,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},yO=p.memo(xO),SO=(e,t)=>{const{children:s,eFocusableElement:i,onTabKeyDown:n,gridCtrl:o,forceFocusOutWhenTabGuardsAreEmpty:r,isEmpty:a}=e,{context:l}=p.useContext(kt),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 x of[c,d])b===void 0?x.current?.removeAttribute("tabindex"):x.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 x={setTabIndex:h};u.current=l.createBean(new FL({comp:x,eTopGuard:w,eBottomGuard:b,eFocusableElement:i,onTabKeyDown:n,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:y=>o.focusInnerElement(y),isEmpty:a}))}},[]),m=p.useCallback(w=>{c.current=w,g()},[g]),v=p.useCallback(w=>{d.current=w,g()},[g]),C=w=>{const b=w==="top"?Co.TAB_GUARD_TOP:Co.TAB_GUARD_BOTTOM;return p.createElement("div",{className:`${Co.TAB_GUARD} ${b}`,role:"presentation",ref:w==="top"?m:v})};return p.createElement(p.Fragment,null,C("top"),s,C("bottom"))},RO=p.forwardRef(SO),FO=p.memo(RO),EO=({context:e})=>{const[t,s]=p.useState(""),[i,n]=p.useState(""),[o,r]=p.useState(null),[a,l]=p.useState(null),[c,d]=p.useState(!1),[u,h]=p.useState(),g=p.useRef(),m=p.useRef(null),v=p.useRef(),[C,w]=p.useState(null),b=p.useRef(()=>{}),x=p.useRef(),y=p.useRef([]),S=p.useCallback(()=>{},[]);Qi(" AG Grid ",m);const F=p.useCallback(k=>{if(m.current=k,g.current=k?e.createBean(new vE):e.destroyBean(g.current),!k||e.isDestroyed())return;const A=g.current;b.current=A.focusInnerElement.bind(A);const U={destroyGridUi:()=>{},setRtlClass:s,forceFocusOutOfContainer:I=>{if(!I&&x.current?.isDisplayed()){x.current.forceFocusOutOfContainer(I);return}v.current?.forceFocusOutOfContainer(I)},updateLayoutClasses:n,getFocusableContainers:()=>{const I=[],H=[],W=m.current?.querySelector(".ag-root");for(const Z of y.current){if(!Z.isDisplayed())continue;const L=Z.getFocusableContainerName();if(L==="rowGroupToolbar"||L==="pivotToolbar"){I.push(Z);continue}H.push(Z)}const V=[...I];return W&&V.push({getGui:()=>W,getFocusableContainerName:()=>"gridBody"}),V.push(...H),V},setCursor:r,setUserSelect:l};A.setComp(U,k,k),d(!0)},[]);p.useEffect(()=>{const k=g.current,A=m.current;if(!u||!k||!C||!A||e.isDestroyed())return;const U=[];y.current=[],x.current=void 0;const{watermarkSelector:I,paginationSelector:H,sideBarSelector:W,statusBarSelector:V,gridHeaderDropZonesSelector:Z}=k.getOptionalSelectors(),L=[];if(Z){const z=e.createBean(new Z.component),K=z.getGui();A.insertAdjacentElement("afterbegin",K),L.push(K),U.push(z),y.current.push(...z.getFocusableContainers?.()??[])}if(W){const z=e.createBean(new W.component),K=z.getGui(),ie=C.querySelector(".ag-tab-guard-bottom");ie&&(ie.insertAdjacentElement("beforebegin",K),L.push(K)),U.push(z),y.current.push(z)}const M=z=>{const K=e.createBean(new z),ie=K.getGui();return A.insertAdjacentElement("beforeend",ie),L.push(ie),U.push(K),K};if(V){const z=M(V.component);y.current.push(z)}if(H){const z=M(H.component);x.current=z,y.current.push(z)}return I&&M(I.component),()=>{e.destroyBeans(U),y.current=[],x.current=void 0;for(const z of L)z.remove()}},[u,C,e]);const R=p.useMemo(()=>is("ag-root-wrapper",t,i),[t,i]),E=p.useMemo(()=>is("ag-root-wrapper-body","ag-focus-managed",i),[i]),D=p.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:o??""}),[a,o]),T=p.useCallback(k=>{v.current=k,h(k!==null)},[]),P=p.useCallback(()=>!g.current?.isFocusable(),[]);return p.createElement("div",{ref:F,className:R,style:D,role:"presentation"},p.createElement("div",{className:E,ref:w,role:"presentation"},c&&C&&!e.isDestroyed()&&p.createElement(kt.Provider,{value:e.getBeans()},p.createElement(FO,{ref:T,eFocusableElement:C,onTabKeyDown:S,gridCtrl:g.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:P},p.createElement(yO,null)))))},DO=p.memo(EO),PO=class extends B{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))}},TO=typeof window>"u"?p.useEffect:p.useLayoutEffect,$1={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},kO={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...$1},q1=new Set(Object.keys(kO)),IO=new Set(Object.keys($1)),K1=e=>{const t=p.useContext(KL),s=p.useContext(YL),i=p.useRef(),n=p.useRef(null),o=p.useRef(null),r=p.useRef([]),a=p.useRef([]),l=p.useRef(e),c=p.useRef(),d=p.useRef(),u=p.useRef(!1),[h,g]=p.useState(void 0),[,m]=p.useState(0),v=p.useRef(),C=S=>{const F=n.current?.classList,R=(E="")=>E.trim().split(/\s+/g).filter(Boolean);if(v.current!==S){for(const E of R(v.current))F?.contains(E)&&F.remove(E);for(const E of R(S))F?.contains(E)||F?.add(E);v.current=S}};TO(()=>{C(e.className)},[e.className]);const w=p.useCallback(S=>{if(n.current=S,C(e.className),!S){for(const I of r.current)I();r.current.length=0;return}const F=[...e.modules??[],...t??[]];s&&Jv(F)?.setLicenseKey(s),o.current||(o.current=new qL(()=>m(I=>I+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),r.current.push(()=>{o.current?.destroy(),o.current=null}));const R=ER(e.gridOptions,e,Object.keys(e).filter(I=>!q1.has(I))),E=()=>{if(u.current){const I=()=>c.current?.shouldQueueUpdates()?void 0:a.current.shift();let H=I();for(;H;)H(),H=I()}},D=new OO(E);c.current=D;const T=new PO,P={providedBeanInstances:{frameworkCompWrapper:new AO(o.current,R),renderStatus:T},modules:F,frameworkOverrides:D,setThemeOnGridDiv:!0},k=I=>{g(I),I.createBean(T),r.current.push(()=>{I.destroy()}),I.getBean("ctrlsSvc").whenReady({addDestroyFunc:H=>{r.current.push(H)}},()=>{if(I.isDestroyed())return;const H=i.current;H&&e.passGridApi?.(H)})},A=I=>{I.getBean("ctrlsSvc").whenReady({addDestroyFunc:H=>{r.current.push(H)}},()=>{for(const H of a.current)H();a.current.length=0,u.current=!0})},U=new pk;R.gridId??(R.gridId=d.current),i.current=U.create(S,R,k,A,P),r.current.push(()=>{i.current=void 0}),i.current&&(d.current=i.current.getGridId())},[]),b=p.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),x=p.useCallback(S=>{u.current&&!c.current?.shouldQueueUpdates()?S():a.current.push(S)},[]);p.useEffect(()=>{const S=MO(l.current,e);l.current=e,x(()=>{i.current&&DR(S,i.current)})},[e]);const y=!p.useSyncExternalStore||gl(e,"renderingMode")==="legacy"?"legacy":"default";return p.createElement("div",{style:b,ref:w},p.createElement(B1.Provider,{value:y},h&&!h.isDestroyed()?p.createElement(DO,{key:h.instanceId,context:h}):null,o.current?.getPortals()??null))};function MO(e,t){const s={};for(const i of Object.keys(t)){if(q1.has(i)){IO.has(i)&&q(274,{prop:i});continue}const n=t[i];e[i]!==n&&(s[i]=n)}return s}var AO=class extends RL{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const s=this.gridOptions;if(gl(s,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return gl(s,"enableFilterHandlers")?GL:HL;case"floatingFilterComponent":return gl(s,"enableFilterHandlers")?zL:VL;case"dateComponent":return OL;case"dragAndDropImageComponent":return NL;case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":return LL;case"statusPanel":return _L;case"toolPanel":return UL;case"menuItem":return jL;case"cellRenderer":return AL;case"innerHeaderComponent":return WL}})(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"activeOverlay":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":jp();break}const n=!t.cellRenderer&&t.name!=="toolPanel";return new j1(e,this.parent,t,n)}},LO=p.forwardRef((e,t)=>{const s=p.useContext(kt),{registry:i,context:n,gos:o,rowModel:r}=s,[a,l]=p.useState(()=>new cs),[c,d]=p.useState(()=>new cs),[u,h]=p.useState(),[g,m]=p.useState(),v=p.useRef(),C=p.useRef(null),w=p.useRef(),b=p.useMemo(()=>sR(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),x=p.useMemo(()=>a.toString()+" ag-details-row",[a]),y=p.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&p.useImperativeHandle(t,()=>({refresh(){return v.current?.refresh()??!1}})),e.template&&q(230);const S=p.useCallback(R=>{if(C.current=R,!R||n.isDestroyed()){v.current=n.destroyBean(v.current),w.current?.();return}const E={toggleCss:(T,P)=>l(k=>k.setClass(T,P)),toggleDetailGridCss:(T,P)=>d(k=>k.setClass(T,P)),setDetailGrid:T=>h(T),setRowData:T=>m(T),getGui:()=>C.current},D=i.createDynamicBean("detailCellRendererCtrl",!0);if(D&&(n.createBean(D),D.init(E,e),v.current=D,o.get("detailRowAutoHeight"))){const T=()=>{if(C.current==null)return;const P=C.current.clientHeight;P!=null&&P>0&&setTimeout(()=>{e.node.setRowHeight(P),(it(o)||No(o))&&r.onRowHeightChanged()},0)};w.current=ri(s,R,T),T()}},[]),F=p.useCallback(R=>{v.current?.registerDetailWithMaster(R)},[]);return p.createElement("div",{className:x,ref:S},u&&p.createElement(K1,{className:y,...u,modules:b,rowData:g,passGridApi:F}))}),OO=class extends Xw{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:bm,agGroupRowRenderer:bm,agDetailCellRenderer:LO},this.wrapIncoming=(t,s)=>s==="ensureVisible"?DL(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 EL()}},NO=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(K1,{...this.props,passGridApi:this.setGridApi})}},Y1=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(Y1||{}),Kt=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(Kt||{}),Io=(e=>(e.Item="item",e.Divider="divider",e.PlainText="plainText",e))(Io||{});const HO=ae("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),GO=ae("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none"),ph=ae("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-text h-[34px] rounded text-primary"),gh="opacity-75 !cursor-not-allowed",Z1="text-error",BO="my-1 border-t border-hover border-secondary",so=4,VO=f.jsx(j.IconChevronRight,{size:14}),_p=({ariaLabel:e,className:t,size:s=24,onClose:i,...n})=>f.jsx(Gs,{"aria-label":e,className:J("text-secondary hover:enabled:text-accent-primary",t,"w-auto h-auto"),onClick:i,icon:f.jsx(j.IconX,{size:s}),...n});function X1(e,t="menu",s=!1){const[i,n]=p.useState(!1),{refs:o,floatingStyles:r,context:a}=De.useFloating({placement:"right-start",open:i,onOpenChange:n,whileElementsMounted:De.autoUpdate,middleware:[De.offset({mainAxis:0,crossAxis:-4}),De.flip({padding:e}),De.shift({padding:e})]}),l=De.useHover(a,{enabled:!s,move:!1,delay:{open:80,close:80}}),c=De.useDismiss(a,{bubbles:!0}),d=De.useRole(a,{role:t}),{getReferenceProps:u,getFloatingProps:h}=De.useInteractions([l,c,d]);return{isOpen:i,refs:o,floatingStyles:r,context:a,getReferenceProps:u,getFloatingProps:h}}const Q1=({refs:e,floatingStyles:t,context:s,getFloatingProps:i,role:n,className:o,children:r})=>f.jsx(De.FloatingPortal,{children:f.jsx(De.FloatingFocusManager,{context:s,modal:!1,initialFocus:-1,returnFocus:!1,children:f.jsx("div",{ref:e.setFloating,style:t,role:n,className:ae("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none",o),...i(),children:r})})}),zO=({item:e,onRootClose:t})=>{const{isOpen:s,refs:i,floatingStyles:n,context:o,getReferenceProps:r,getFloatingProps:a}=X1(so,"menu",!!e.disabled),l=p.useCallback(c=>d=>{c.disabled||(c.onClick?.({key:c.key,domEvent:d}),t())},[t]);return f.jsxs(f.Fragment,{children:[f.jsxs("button",{ref:i.setReference,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":s,"aria-disabled":!!e.disabled,disabled:e.disabled,className:ae(ph,e.disabled&&gh,e.className),...r(),children:[e.icon&&f.jsx("span",{className:ae(e.disabled&&"text-secondary"),children:f.jsx(Be,{icon:e.icon})}),f.jsx("span",{className:ae("flex-1 truncate text-left",e.disabled&&"text-secondary"),children:e.label}),f.jsx("span",{className:ae("ml-auto shrink-0",e.disabled&&"text-secondary"),children:VO})]}),s&&f.jsx(Q1,{refs:i,floatingStyles:n,context:o,getFloatingProps:a,role:"menu",className:"w-max",children:f.jsx("div",{role:"none",className:"py-1",children:e.children.map(c=>f.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!c.disabled,disabled:c.disabled,className:ae(ph,c.disabled&&gh,c.danger&&Z1,c.className),onClick:l(c),children:[c.icon&&f.jsx("span",{className:ae(c.danger&&"text-error",c.disabled&&"text-secondary"),children:f.jsx(Be,{icon:c.icon})}),f.jsx("span",{className:ae("flex-1 truncate text-left",c.danger&&"text-error",c.disabled&&"text-secondary"),children:c.label})]},c.key))})})]})},WO=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,Tt=({children:e,menu:t,renderOverlay:s,trigger:i=[Kt.Click],placement:n,disabled:o=!1,open:r,defaultOpen:a=!1,onOpenChange:l,closable:c=!1,onClose:d,className:u,listClassName:h,outsidePressIgnoreRef:g,outsideClosable:m=!0,allowedPlacements:v,anchorToMouse:C=!1,matchReferenceWidth:w=!0,maxDropdownHeight:b})=>{const[x,y]=p.useState(a),S=r!==void 0,F=S?!!r:x,R=p.useRef(null),E=p.useCallback(N=>{S||y(N),l?.(N)},[S,l]),D=p.useId(),T=n===void 0,{refs:P,floatingStyles:k,context:A}=De.useFloating({placement:n,open:F,onOpenChange:E,whileElementsMounted:De.autoUpdate,middleware:[De.offset({mainAxis:so,crossAxis:0}),T?De.autoPlacement({alignment:"start",crossAxis:!0,padding:so,allowedPlacements:v}):De.flip({padding:so}),De.shift({padding:so}),De.size({padding:so,apply({availableWidth:N,availableHeight:oe,elements:Te}){const ee=Te.floating,le=WO(Te.reference);ee.style.setProperty("--fui-available-height",`${Math.floor(oe)}px`),ee.style.setProperty("--reference-width",w?`${Math.round(le)}px`:"0px"),w?ee.style.minWidth=`${Math.round(le)}px`:ee.style.removeProperty("min-width"),ee.style.maxWidth=`${Math.floor(N)}px`;const $=Math.floor(oe);ee.style.maxHeight=`${b?Math.min($,b):$}px`}})]}),U=De.useClick(A,{enabled:i.includes(Kt.Click)&&!o}),I=De.useHover(A,{enabled:i.includes(Kt.Hover)&&!o,move:!1,restMs:40,delay:{open:80,close:80}}),H=De.useDismiss(A,{bubbles:!0,referencePress:!1,outsidePress:N=>{if(!m)return!1;const oe=N.target;return!(g?.current&&oe instanceof Node&&g.current.contains(oe))}}),W=De.useRole(A,{role:"menu"}),{getReferenceProps:V,getFloatingProps:Z}=De.useInteractions([U,I,H,W]),L=p.useCallback((N,oe)=>{P.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:N,y:oe,top:oe,left:N,right:N,bottom:oe})})},[P]),M=p.useCallback(N=>{!i.includes(Kt.ContextMenu)||o||(N.preventDefault(),C&&(L(N.clientX,N.clientY),R.current=document.elementFromPoint(N.clientX,N.clientY)),E(!0))},[C,o,E,L,i]),z=p.useCallback(N=>{!C||o||(i.includes(Kt.ContextMenu)&&F&&E(!1),L(N.clientX,N.clientY),R.current=document.elementFromPoint(N.clientX,N.clientY))},[C,o,L,F,i,E]);p.useEffect(()=>{o&&F&&E(!1)},[o,F,E]);const K=p.useCallback(N=>oe=>{N.disabled||(N.onClick?.({key:N.key,domEvent:oe}),t?.onClick?.({key:N.key,domEvent:oe}),E(!1))},[t,E]),ie=p.useMemo(()=>s?s():t?f.jsxs(f.Fragment,{children:[t.header&&f.jsx(f.Fragment,{children:typeof t.header=="function"?t.header():t.header}),f.jsx("div",{role:"none",className:"py-1","aria-label":"dropdown",children:t.items.map(N=>N.type===Io.Divider?f.jsx("div",{role:"separator",className:BO},N.key):N.type===Io.PlainText?f.jsx("div",{className:J("px-3 py-2 text-secondary dial-caption",N.className),children:N.label},N.key):N.children?.length?f.jsx(zO,{item:N,onRootClose:()=>E(!1)},N.key):f.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!N.disabled,className:ae(ph,N.disabled&&gh,N.danger&&Z1,N.className),disabled:N.disabled,onClick:K(N),children:[N.icon&&f.jsx("span",{className:ae(N.danger&&"text-error",N.disabled&&"text-secondary"),children:f.jsx(Be,{icon:N.icon})}),f.jsx("span",{className:ae("flex-1 truncate text-left",N.danger&&"text-error",N.disabled&&"text-secondary"),"aria-labelledby":"item-text",children:N.label})]},N.key))}),t.footer&&f.jsx(f.Fragment,{children:typeof t.footer=="function"?t.footer():t.footer})]}):null,[K,t,s,E]),we=V({onContextMenu:M,onMouseDown:z});return p.useEffect(()=>{if(!F)return;const N=P.reference.current;let oe=null;if(N instanceof Element?oe=N:R.current instanceof Element&&(oe=R.current),!oe)return;const Te=new IntersectionObserver(([ee])=>{ee.isIntersecting||E(!1)},{root:null,threshold:0});return Te.observe(oe),()=>Te.disconnect()},[F,P.reference,E]),f.jsxs(f.Fragment,{children:[f.jsx("span",{ref:P.setReference,className:ae(HO,o&&"!cursor-not-allowed opacity-75",u),"aria-haspopup":"menu","aria-expanded":F,"aria-controls":D,...we,children:e}),F&&f.jsx(De.FloatingPortal,{children:f.jsx(De.FloatingFocusManager,{context:A,modal:!1,initialFocus:-1,returnFocus:!0,children:f.jsxs("div",{id:D,ref:P.setFloating,style:k,className:ae(GO,!w&&"w-max",h),...Z(),children:[c&&f.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:f.jsx(_p,{ariaLabel:"Close dropdown",onClose:N=>{d?.(N),E(!1)}})}),ie]})})})]})},jO="h-full w-full",Fm=".ag-checkbox-input",ru={accentColor:"var(--controls-bg-accent, #5C8DEA)",backgroundColor:"var(--bg-layer-3, #1D2439)",oddRowBackgroundColor:"var(--bg-layer-2, #161B2D)",selectedRowBackgroundColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderColor:"var(--bg-layer-4, #242C42)",rowBorder:"1px solid var(--stroke-tertiary, #0C101D)",rowHoverColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderRadius:3,browserColorScheme:"dark",chromeBackgroundColor:"var(--bg-layer-1, #0C101D)",foregroundColor:"var(--text-primary, #EEF1F7)",headerFontSize:14,headerFontWeight:600,headerTextColor:"var(--text-secondary, #7F8792)",spacing:4,wrapperBorderRadius:3,fontSize:14,fontFamily:"var(--theme-font, var(--font-inter))"},Em=40;var Zi=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(Zi||{});const _O=(e,t,s,i,n)=>{const o=typeof e=="string"?e.toLowerCase():e,r=typeof t=="string"?t.toLowerCase():t;return o===r?0:o?r?o>r?1:-1:n?1:-1:n?-1:1};var Ar=(e=>(e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e))(Ar||{});const J1="en-US",eb={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},UO="text-primary",au=40,tb={minWidth:au,width:au,maxWidth:au},$O={cellClass:"ag-grid-no-checkbox",...tb},qO={...tb};function KO(e,t){let s=null;return(...i)=>{s&&clearTimeout(s),s=setTimeout(()=>e(...i),t)}}var Si=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(Si||{});const Dm=()=>typeof window<"u"&&window.innerWidth<1279,Pm=()=>typeof window<"u"&&window.innerWidth<640,lu=()=>{if(typeof window>"u")return Si.Undefined;const e=window.innerWidth;return e>=1024?Si.Desktop:e<640?Si.Mobile:Si.Tablet},Nc=()=>{const[e,t]=p.useState(Pm());return p.useEffect(()=>{const s=()=>t(Pm());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},YO=()=>{const[e,t]=p.useState(Dm());return p.useEffect(()=>{const s=()=>t(Dm());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e};SL({testIdAttribute:"dataQA"});Qv.registerModules([vL]);const Up=({columnDefs:e,rowData:t,additionalGridOptions:s,getContextMenuItems:i,className:n,ariaLabel:o="Data grid",wrapCustomCellRenderers:r=!0,disabledRowIds:a,selectedRowIds:l,onSelectionChange:c,onGridApiChange:d,getRowId:u=F=>String(F.id??JSON.stringify(F)),alternateOddRowColors:h=!1,filterPlaceholder:g="Enter value",emptyStateIcon:m,emptyStateTitle:v="No results found",emptyStateDescription:C="Sorry, we couldn't find any results for your search.",loading:w=!1,wrapperBorder:b=!0,withoutHeaderBorders:x=!1,allowDisabledContextMenu:y=!1,selectionMode:S})=>{const[F,R]=p.useState(),E=p.useId(),D=Nc(),T=YO(),P=p.useRef(new Set),k=p.useRef(void 0),A=p.useMemo(()=>({...ru,oddRowBackgroundColor:h?ru.oddRowBackgroundColor:ru.backgroundColor,wrapperBorder:b}),[h,b]),U=p.useCallback($=>{$.api.sizeColumnsToFit()},[]),I=p.useCallback($=>{if($.data){const he=u($.data),G=a?.has(he)??!1,ne=G&&!y,pe=$.value==null?"":String($.value),Fe=i?.($.data)??[];return f.jsx(Tt,{trigger:[Kt.ContextMenu],menu:{items:Fe},anchorToMouse:!0,matchReferenceWidth:!0,className:"w-full",disabled:ne,children:f.jsx("span",{className:"block min-w-0 h-full max-w-full",children:f.jsx(vt,{text:pe,className:"max-w-full h-full",hideTooltip:G})})})}},[i,a,u,y]),H=p.useCallback($=>$===Zi.API||$===Zi.ROW_DATA_CHANGED,[]),W=p.useCallback($=>{if(!F)return;const G=($.selectedNodes||[]).map(pe=>pe.data),ne=new Set(G.map(u));P.current=ne,k.current=$.source,H($.source)||c?.(ne,G)},[F,u,H,c]),V=p.useMemo(()=>KO($=>W?.($),100),[W]),Z=p.useCallback($=>{if(!$.data)return null;const he=u($.data),G=$.node.isSelected(),ne=a?.has(he),pe=`row-select-${he}`;return f.jsx("div",{className:"size-6 flex items-center justify-center",children:f.jsx(nn,{className:"size-[18px]",inputId:pe,checked:G,disabled:ne,name:"gridradiobutton",value:"selected",onChange:()=>{ne||($.node.setSelected(!0,!0,Zi.CHECKBOX_SELECTED),$.api.refreshCells({columns:[$.column?.getColId()]}))}})})},[u,a]),L=p.useCallback(()=>{const $="dial-row-select",he="dial-row-select-visible";return D||T||l&&l.size>0?`${$} ${he}`:!l||l.size===0?$:`${$} ${he}`},[D,T,l]),M=p.useCallback(()=>D||T?L():!l||l.size===0?"dial-row-not-select-header":L(),[L,D,T,l]),z=p.useMemo(()=>{if(S===Ar.SINGLE)return{...$O,cellRenderer:Z};if(S===Ar.MULTIPLE)return{...qO,headerClass:()=>M(),cellClass:$=>{const he=$.data?u($.data):null;let G=L();return he&&a?.has(he)&&(G+=" opacity-50 pointer-events-none"),G}}},[S,Z,M,u,L,a]),K=p.useCallback($=>{const he=typeof r=="function"?r($):!!r;if(!$.cellRenderer)return{...$,cellRenderer:I};if(!he)return $;const G=$.cellRenderer;return{...$,cellRenderer:pe=>{const Fe=pe.data?i?.(pe.data)??[]:[];let Pe=null;if(typeof G=="function"){const ke=G;Pe=f.jsx(ke,{...pe})}else Pe=I(pe);const ce=pe.data?u(pe.data):null,Se=ce?a?.has(ce):!1;return f.jsx(Tt,{trigger:[Kt.ContextMenu],menu:{items:Fe},anchorToMouse:!0,matchReferenceWidth:!0,className:ae("w-full h-full",Se&&"!cursor-not-allowed opacity-75"),disabled:Se&&!y,children:f.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:Pe})})}}},[a,i,u,I,r,y]),ie=p.useMemo(()=>r?(e??[]).map(K):e??[],[e,r,r?K:null]),we=p.useMemo(()=>({minWidth:150,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:g,buttons:["reset"]},comparator:_O.bind(void 0)}),[g]),N=$=>{const he=document.querySelector(Fm);he&&he.setAttribute("aria-description",xu);const G=ie.map(ne=>({...ne,sort:void 0}));$.api.updateGridOptions({columnDefs:G,rowData:t}),$.api.sizeColumnsToFit(),R($.api),s?.onGridReady?.($),d?.($.api)};p.useEffect(()=>{F&&t&&F.setGridOption("rowData",t)},[F,t]);const oe=p.useCallback(()=>f.jsx(ta,{title:v,description:C,containerClassName:"gap-3",titleClassName:"mt-2 !text-lg",icon:m||f.jsx(j.IconZoomCancel,{size:100,stroke:.5,className:"text-secondary"})}),[v,C,m]),Te=p.useMemo(()=>{if(S)return{mode:S===Ar.SINGLE?"singleRow":"multiRow",isRowSelectable:$=>{const he=$.data?u($.data):null;return he?!a?.has(he):!0}}},[a,u,S]);p.useEffect(()=>{F&&t&&P.current.size&&P.current.forEach($=>{const he=F.getRowNode($);he&&!he.isSelected()&&he.setSelected(!0,!1,Zi.API)})},[F,t]),p.useEffect(()=>{F&&l&&(F.deselectAll("all",Zi.API),l.forEach($=>{const he=F.getRowNode($);he&&!he.isSelected()&&he.setSelected(!0,!1,Zi.API)}))},[F,l]);const ee=p.useCallback($=>$.data?u($.data):"",[u]),le=p.useCallback(()=>{document.querySelectorAll(`.ag-row ${Fm}`).forEach($=>{$.setAttribute("aria-description",xu)})},[]);return p.useEffect(()=>{const $=H(k.current);if(F&&l?.size&&$){const he=Array.from(l)[0];if(he){const G=F.getRowNode(he);G&&F.ensureNodeVisible(G)}}},[F,H,l]),f.jsx("div",{className:ae(jO,n,S&&"with-selection-column",x&&"dial-without-header-borders"),"aria-label":o,role:"region","aria-busy":w,children:f.jsx("div",{className:"ag-theme-balham-dark h-full overflow-x-auto",role:"table","aria-describedby":E,children:f.jsx(NO,{rowModelType:"clientSide",headerHeight:Em,rowHeight:Em,cellSelection:!1,theme:x4.withPart(QP).withParams({...A}),autoSizeStrategy:{type:"fitGridWidth"},columnDefs:ie,defaultColDef:we,selectionColumnDef:z,onGridSizeChanged:U,onGridReady:N,loading:w,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:oe,rowData:t,rowSelection:Te,onSelectionChanged:V,getRowId:ee,onRowDataUpdated:le,onBodyScroll:le,onFirstDataRendered:le,...s})})})};var ic=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(ic||{}),nc=(e=>(e.Mobile="mobile",e.Tablet="tablet",e))(nc||{});const rl=({tab:e,active:t,invalid:s,className:i,horizontal:n,onClick:o})=>{const r=J("rounded h-[38px] items-center flex flex-row border-transparent cursor-pointer dial-small-text hover:text-accent-primary",{"border-b-2 px-4":n,"border-l-2 px-3":!n}),a=J(r,{"bg-layer-4":n,"bg-layer-1 text-secondary pointer-events-none":e.disabled,"bg-accent-primary-alpha text-primary":t&&!e.disabled,"text-primary":!t&&!e.disabled,"border-b-accent-primary":t&&n&&!e.disabled,"border-l-accent-primary":t&&!n&&!e.disabled},i);return f.jsxs("button",{role:"tab",className:a,onClick:()=>o(e.id),disabled:e.disabled,children:[f.jsx(vt,{text:e.label,contentClassName:"max-w-[200px]",className:"max-w-[200px]"}),(s||e.invalid)&&f.jsx("div",{className:"text-error pl-1",children:f.jsx(j.IconExclamationCircle,{...te})}),e.warning&&f.jsx("div",{className:"text-warning pl-1",children:f.jsx(j.IconAlertTriangle,{...te})})]})},ZO=12,XO=()=>{const[e,t]=p.useState(()=>typeof window>"u"?Si.Desktop:lu());return p.useEffect(()=>{t(lu());const s=()=>t(lu());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},sb=({tabs:e,activeTab:t,onClick:s,orientation:i=ic.Horizontal,screenThreshold:n=nc.Tablet,smallScreenContainerClassName:o,smallScreenDropdownItemClassName:r,desktopDropdownClassName:a,desktopTabClassName:l})=>{const[c,d]=p.useState(!1),[u,h]=p.useState(!1),[g,m]=p.useState(!1),v=XO(),C=v===Si.Mobile||n===nc.Tablet&&v===Si.Tablet,w=i===ic.Horizontal,b=p.useRef(null),x=p.useRef(null),y=p.useRef(null),S=e.find(T=>T.id===t),F=p.useMemo(()=>ae("flex gap-2",w?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[w]),R=p.useCallback(()=>{const T=x.current;T&&m(T.scrollWidth>T.clientWidth)},[]),E=p.useCallback(()=>{const T=y.current,P=x.current;if(!T||!P)return;const k=T.getBoundingClientRect(),A=P.getBoundingClientRect();if(k.width===0||A.width===0)return;const U=ZO;let I=P.scrollLeft;if(k.left<A.left+U)I-=A.left+U-k.left;else if(k.right>A.right-U)I+=k.right-(A.right-U);else return;const H=Math.max(0,P.scrollWidth-P.clientWidth);I=Math.max(0,Math.min(I,H)),I!==P.scrollLeft&&P.scrollTo({left:I,behavior:"smooth"})},[]),D=p.useCallback(T=>{s(T),T===t&&E()},[s,t,E]);return p.useEffect(()=>{R();const T=new ResizeObserver(()=>R()),P=x.current;return P&&T.observe(P),()=>T.disconnect()},[e,R]),p.useEffect(()=>{E()},[t,E]),C?f.jsx("div",{role:"tablist",className:J("h-11 flex items-center bg-layer-3 px-4",o),children:f.jsx(Tt,{trigger:[Kt.Click],open:c,onOpenChange:d,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(T=>f.jsx(rl,{tab:T,active:T.id===t,onClick:P=>{D(P),d(!1)},className:J("w-full rounded-none h-11 items-center px-6",r)},T.id)),children:f.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[f.jsx(rl,{tab:S,active:!0,onClick:D,className:"rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"},t),f.jsx(Be,{icon:f.jsx(j.IconChevronDown,{size:ct.SM}),className:ae("text-primary transition-transform",c&&"rotate-180")})]})})}):f.jsxs("div",{ref:b,className:"flex w-full items-start",children:[f.jsx("div",{ref:x,role:"tablist",className:F,children:e.map(T=>f.jsx("div",{ref:t===T.id?y:void 0,className:"w-full",children:f.jsx(rl,{tab:T,active:t===T.id,onClick:D,horizontal:w,className:J("w-full",l)})},T.id))}),g&&f.jsx("div",{className:"flex items-center ml-2",children:f.jsx(Tt,{trigger:[Kt.Click],open:u,onOpenChange:h,placement:"bottom-end",renderOverlay:()=>e.map(T=>f.jsx(rl,{tab:T,active:T.id===t,onClick:P=>{D(P),h(!1)},className:"w-full rounded-none h-8 items-center px-3 py-2"},T.id)),children:f.jsx(us,{iconBefore:f.jsx(j.IconDotsVertical,{size:$t}),className:J("w-8 h-8 flex items-center justify-center rounded border",u?"bg-layer-4 border-transparent":"border-primary",a)})})})]})},QO="w-full overflow-hidden",JO="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",ib="flex items-center gap-2 min-w-0 shrink-0 dial-small-text",eN="basis-[20%] flex-none",tN="flex-1 min-w-0",Tm="inline-flex items-center gap-1 min-w-0 transition-colors",sN="text-secondary hover:text-accent-primary",iN="text-primary cursor-default",nb="flex-none inline-flex items-center leading-none text-secondary",nN="items-center gap-1 min-w-0 transition-colors text-secondary hover:text-accent-primary",ob=f.jsx(j.IconChevronRight,{size:ct.SM,"aria-hidden":"true"}),xr=({label:e,href:t,onClick:s,disabled:i,isLast:n,separator:o=ob,className:r,iconBefore:a,labelClassName:l,onBeforeNavigate:c,...d})=>{const u=async C=>{if(c&&!n&&!await c()){C.preventDefault();return}s&&s(C)},h=J(ib,n?tN:eN,r),g=(!!t||!!s)&&!n&&!i,m=g?J(Tm,sN):J(Tm,iN,i?"pointer-events-none opacity-75":""),v=typeof e=="string"?f.jsx(vt,{className:J("cursor-pointer",l),text:e,id:"breadcrumb-item-content"}):f.jsx("span",{className:J("flex-1 min-w-0 truncate cursor-pointer max-w-[300px]",l),"aria-label":"breadcrumb-item-content",children:e});return f.jsxs("li",{...d,className:h,"aria-label":d["aria-label"]||"breadcrumb-item",children:[g?f.jsxs("a",{href:t,onClick:u,className:m,children:[a,v]}):f.jsxs("span",{className:m,"aria-current":n?"page":void 0,"aria-disabled":i?"true":void 0,children:[a,v]}),!n&&f.jsx("span",{className:nb,"aria-label":"separator",children:o})]})},rb=({pathItems:e,separator:t=ob,ariaLabel:s="Breadcrumb",className:i,children:n,labelClassName:o,onBeforeNavigate:r})=>{const a=p.useMemo(()=>e?.length?e:p.Children.toArray(n).filter(p.isValidElement).map(d=>{const u=d.props,{labelClassName:h,isLast:g,separator:m,...v}=u;return v}),[e,n]),l=p.useCallback(async d=>{const u=parseInt(d.key,10),h=a[u];if(r&&!await r()){d.domEvent.preventDefault();return}h.onClick?h.onClick(d.domEvent):h.href&&(window.location.href=h.href)},[a,r]),c=p.useMemo(()=>{if(a.length===0)return null;if(a.length<=3)return a.map((v,C)=>p.createElement(xr,{...v,key:`item-${C}`,isLast:C===a.length-1,separator:t,labelClassName:o,onBeforeNavigate:r}));const d=a.at(0),u=a.slice(1,-2),h=a.at(-2),g=a.at(-1);if(!d||!h||!g)return null;const m=u.map((v,C)=>({key:String(C+1),label:typeof v.label=="string"?v.label:`Item ${C+1}`,disabled:v.disabled}));return f.jsxs(f.Fragment,{children:[p.createElement(xr,{...d,key:"item-0",separator:t,labelClassName:o,onBeforeNavigate:r}),f.jsxs("li",{className:J(ib),children:[f.jsx(Tt,{menu:{items:m,onClick:l},placement:"bottom-start",matchReferenceWidth:!1,children:f.jsx("button",{type:"button","aria-label":"More breadcrumbs",className:nN,children:f.jsx(j.IconDots,{size:ct.SM})})}),f.jsx("span",{className:nb,children:t})]}),p.createElement(xr,{...h,key:`item-${a.length-2}`,separator:t,labelClassName:o,onBeforeNavigate:r}),p.createElement(xr,{...g,key:`item-${a.length-1}`,isLast:!0,separator:t,labelClassName:o,onBeforeNavigate:r})]})},[a,t,o,l,r]);return f.jsx("nav",{"aria-label":s,className:J(QO,i),children:f.jsx("ol",{className:JO,children:c})})},$p=(e,t)=>({appearance:i,...n})=>f.jsx(us,{...n,variant:e,appearance:i||t}),ab=(e,t)=>({variant:i,...n})=>f.jsx(us,{...n,variant:i||t,appearance:e}),Hs=$p(Ye.Primary,Ae.Solid),Ws=$p(Ye.Neutral,Ae.Outlined),lb=$p(Ye.Error,Ae.Outlined),oN=ab(Ae.Link,Ye.Primary),qp=ab(Ae.Ghost,Ye.Primary),rN=({selected:e,className:t,...s})=>f.jsx(us,{...s,className:J("dial-neutral-rounded-button",e&&"selected",t)}),Vo=(e,t)=>({appearance:i,...n})=>f.jsx(Gs,{...n,variant:e,appearance:i||t}),aN=(e,t)=>({variant:i,...n})=>f.jsx(Gs,{...n,variant:i||t,appearance:e}),lN=Vo(Ye.Primary,Ae.Solid),cN=Vo(Ye.Neutral,Ae.Outlined),cb=Vo(Ye.Error,Ae.Outlined),dN=Vo(Ye.Secondary,Ae.Ghost),uN=Vo(Ye.Tertiary,Ae.Ghost),hN=Vo(Ye.Success,Ae.Ghost),db=aN(Ae.Ghost,Ye.Primary),Hc=({iconClassName:e,label:t,...s})=>t?f.jsx(lb,{...s,label:t,appearance:Ae.Ghost,iconBefore:f.jsx(j.IconTrashX,{...te,className:e||""})}):f.jsx(cb,{...s,appearance:Ae.Ghost,icon:f.jsx(j.IconTrashX,{...te,className:e||""})}),pN=({className:e,icon:t,tooltipProps:s,type:i="button",...n})=>{const o=J("dial-fab-button disabled:cursor-not-allowed focus-visible:outline outline-offset-0 disabled:text-controls-secondary-disable",e),r=f.jsx("button",{...n,type:i,className:o,"aria-label":n["aria-label"],children:t||f.jsx(j.IconArrowNarrowDown,{size:24,stroke:1.5})});return s?f.jsx(Ot,{...s,children:r}):r},gN=({className:e="",value:t,onChange:s,error:i,containerClassName:n,resize:o=!1,labelProps:r,caption:a,id:l,...c})=>{const d=J("dial-textarea dial-input px-3 py-2",c.invalid&&"dial-input-error",c.disabled&&"dial-input-disable",o?"resize":"resize-none",e);return f.jsxs("div",{className:J("flex flex-col gap-y-1",n),children:[r&&f.jsx(Pn,{...r,htmlFor:l}),f.jsx("textarea",{id:l,value:t||"",className:d,onChange:u=>s?.(u.currentTarget.value),...c}),f.jsx(ds,{text:i}),!i&&f.jsx(Jr,{text:a})]})},Gc=({label:e,switchId:t,isOn:s=!1,disabled:i,onChange:n,caption:o})=>{const r=ae("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",i?"pointer-events-none":"",i?s?"bg-controls-disable":"bg-layer-4":s?"bg-accent-primary":"bg-layer-4"),a=p.useCallback(l=>{l.stopPropagation(),n?.(!s)},[n,s]);return f.jsxs("div",{className:"flex flex-row items-start",role:"switch",children:[f.jsx("input",{type:"checkbox",onChange:a,id:t,disabled:i,className:"invisible size-0",checked:s}),f.jsx("label",{htmlFor:t,className:r,"aria-describedby":o&&"caption",children:f.jsx("span",{className:ae("size-3 rounded-full",i?"bg-controls-disable-accent":"bg-controls-enable-primary")})}),(e||o)&&f.jsxs("div",{className:"flex flex-col gap-1 ml-2",children:[e&&f.jsx("span",{className:ae("dial-small-text py-[1px]",i?"text-secondary":"text-primary"),"aria-label":"switch-title",children:e}),o&&f.jsx("span",{id:"caption",className:"dial-tiny-text text-secondary",children:o})]})]})};var Zt=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(Zt||{});const fN="z-[52] flex items-center justify-center bg-blackout md:p-4",km="divide-tertiary divide-y",mN="flex flex-row justify-between py-4 px-6 items-center",vN={[Zt.Sm]:"dial-sm-popup",[Zt.Md]:"dial-md-popup",[Zt.Lg]:"dial-lg-popup"},Mn=({open:e=!1,header:t,portalId:s,className:i,overlayClassName:n,titleClassName:o,headerClassName:r,dividers:a=!0,dividerFooter:l=!0,children:c,footer:d,onClose:u,size:h=Zt.Md,hideClose:g=!1,closeOnOutsideClick:m=!0,preventKeyboardOnOpen:v=!1})=>{const C=p.useRef(null),{refs:w,context:b}=De.useFloating({open:e,onOpenChange:E=>{E||u?.(null)}}),x=De.useRole(b,{role:"dialog"}),y=De.useDismiss(b,{outsidePress:m}),{getFloatingProps:S}=De.useInteractions([x,y]);if(!e)return null;const F=typeof t=="string"?"dial-popup-heading":void 0,R=E=>E?typeof E=="string"?f.jsx("h3",{id:F,className:ae("flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",o),children:f.jsx(Ot,{tooltip:E,children:E})}):E:f.jsx("span",{});return f.jsx(De.FloatingPortal,{id:s,children:f.jsx(De.FloatingOverlay,{className:ae(fN,n),children:f.jsx(De.FloatingFocusManager,{context:b,initialFocus:v?C:void 0,children:f.jsxs("div",{ref:w.setFloating,...S(),role:"dialog","aria-modal":"true","aria-labelledby":F,className:ae("dial-popup",vN[h],a&&km,i),children:[v&&f.jsx("div",{ref:C,tabIndex:-1,"aria-hidden":!0,className:"absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"}),f.jsxs("div",{className:J(mN,r),children:[R(t),!g&&f.jsx(_p,{ariaLabel:"Close dialog",onClose:E=>u?.(E)})]}),f.jsx("div",{className:"grow overflow-auto","aria-label":"popup-description",children:c}),l&&!d&&f.jsx("div",{className:km}),d]})})})})};var Mo=(e=>(e.Info="info",e.Danger="danger",e))(Mo||{});const CN="flex justify-end gap-2 px-6 py-4",wN="text-secondary dial-small-150 px-6 py-4",bN="Cancel",xN="Ok",cu={[Mo.Info]:{confirm:{variant:Ye.Primary,appearance:Ae.Solid},cancel:{variant:Ye.Neutral,appearance:Ae.Outlined}},[Mo.Danger]:{container:"dial-danger-popup",confirm:{variant:Ye.Error,appearance:Ae.Solid},cancel:{variant:Ye.Neutral,appearance:Ae.Outlined}}},ub=({header:e,description:t,descriptionClassName:s,open:i=!1,confirmLabel:n=xN,cancelLabel:o=bN,isLoading:r=!1,disableConfirmButton:a=!1,className:l,confirmClassName:c,onClose:d,onConfirm:u,onCancel:h,children:g,dividers:m=!1,variant:v=Mo.Info,size:C=Zt.Sm,footer:w})=>{const b=r?null:f.jsxs("div",{className:CN,children:[f.jsx(Ws,{label:o,onClick:()=>h?h():d?.()}),f.jsx(us,{variant:cu[v].confirm?.variant,appearance:cu[v].confirm?.appearance,className:c,label:n,disabled:a,onClick:()=>u()})]}),x=p.useCallback(()=>r?f.jsx("div",{className:"px-6 py-4 h-[120px]",children:f.jsx(ea,{size:50})}):g??(t?f.jsx("div",{className:ae(wN,s),children:t}):null),[g,t,r,s]);return f.jsx(Mn,{open:i,header:e,className:ae(cu[v].container,l),dividers:m,onClose:()=>d?.(),footer:w??b,size:C,children:x()})},du=8,yN=24,hb=({initialTags:e=[],label:t,required:s,elementId:i,placeholder:n,captionDescription:o,errorText:r,invalid:a,disabled:l,collapseTagOverflow:c=!1,readOnly:d=!1,containerClassName:u,tagClassName:h,onChange:g})=>{const m=p.useRef(null),v=p.useRef([]),C=p.useRef(null),[w,b]=p.useState(e),[x,y]=p.useState(""),[S,F]=p.useState(!1),[R,E]=p.useState(e.length),D=p.useCallback(W=>V=>{v.current[W]=V},[]),T=p.useCallback(()=>{if(!c)return;const W=m.current;if(!W)return;const V=W.offsetWidth;if(V===0)return;const Z=C.current?.offsetWidth??0,M=V-(d?0:yN)-du;let z=0,K=0;for(let ie=0;ie<w.length;ie++){const we=v.current[ie];if(!we)continue;const N=we.offsetWidth+du;if(z+N>M)break;z+=N,K++}if(K<w.length&&K>0)for(;z+Z>M&&K>0;){K--;const ie=v.current[K]?.offsetWidth??0;z-=ie+du}E(K)},[c,d,w.length]),P=W=>{const V=W.trim().replace(/,$/,"");if(V&&!w.includes(V)){const Z=[V,...w];b(Z),g?.(Z)}},k=W=>{(W.key===","||W.key==="Enter")&&(W.preventDefault(),P(x),y(""))},A=()=>{x.trim()&&(P(x),y(""))},U=W=>{const V=w.filter((Z,L)=>L!==W);b(V),g?.(V)},I=()=>r?f.jsx(ds,{text:r}):o?f.jsx(Jr,{text:o}):null;p.useEffect(()=>{if(c)return;const W=new ResizeObserver(()=>{if(m.current){const V=m.current.scrollHeight>m.current.clientHeight+10;F(V)}});return m.current&&W.observe(m.current),()=>W.disconnect()},[w,c]),p.useEffect(()=>{if(!c){E(w.length);return}E(w.length);const W=new ResizeObserver(()=>{T()}),V=m.current;return V&&W.observe(V),T(),()=>W.disconnect()},[c,T,w]),p.useEffect(()=>{b(e)},[JSON.stringify(e)]);const H=f.jsxs("div",{ref:m,className:ae("flex gap-2 items-center relative",c?"flex-nowrap overflow-hidden w-full min-w-0":ae("flex-wrap",S?"flex-col-reverse":"flex-row"),u),children:[(c?w.slice(0,R):w).map((W,V)=>f.jsx(io,{tag:W,className:h,remove:!l&&!d?()=>U(V):void 0},W+V)),c&&R<w.length&&f.jsx(Ot,{tooltip:w.slice(R).join(", "),triggerClassName:"inline-flex shrink-0 cursor-pointer",children:f.jsx(io,{tag:`+${w.length-R}`})}),!d&&f.jsx("input",{id:i,type:"text",value:x,onChange:W=>y(W.target.value),onKeyDown:k,onBlur:A,className:ae("dial-input outline-none !border-none w-full flex-1 !p-1 !h-auto",c?"min-w-0":"min-w-[100px]"),placeholder:n??"",disabled:l}),c&&f.jsxs("div",{className:"absolute left-0 top-0 invisible pointer-events-none h-0 overflow-hidden whitespace-nowrap","aria-hidden":!0,children:[w.map((W,V)=>f.jsx("div",{ref:D(V),className:"inline-flex shrink-0",children:f.jsx(io,{tag:W,className:h,remove:!l&&!d?()=>U(V):void 0})},`measure-${W}-${V}`)),f.jsx("div",{ref:C,className:"inline-flex shrink-0",children:f.jsx(io,{tag:`+${w.length}`})})]})]});return d?H:f.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f.jsx(Pn,{label:t,required:s,htmlFor:i}),f.jsx("div",{className:ae("dial-input min-h-[38px] p-[6px]",a&&"dial-input-error",l&&"dial-input-disable"),children:H}),I()]})},pb=({selectedItems:e,placeholder:t,collapseTagOverflow:s=!1,listClassName:i,listElementClassName:n})=>e?.length?f.jsx(hb,{readOnly:!0,initialTags:e,collapseTagOverflow:s,containerClassName:i,tagClassName:n}):t?f.jsx("span",{className:"text-secondary",children:t}):null,uu=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"})),gb=({children:e,open:t,disabled:s=!1,selectedValue:i,valueClassName:n,inputClassName:o,onOpen:r,elementId:a,errorText:l,invalid:c,emptyValueText:d,placeholder:u,editable:h=!1,onValueChange:g,collapseTagOverflow:m=!1,iconBefore:v})=>{const C=Array.isArray(i)&&i.length>0,w=typeof i=="string"&&!!i.trim(),b=C||w?i:u?void 0:d,x=s?void 0:r,y=p.useCallback(E=>{g?.(E.target.value)},[g]),S=()=>f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:ae("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between",o,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[f.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[v&&f.jsx(Be,{icon:v}),f.jsx("input",{type:"text",className:ae("flex-1 min-w-0 bg-transparent outline-none border-none p-0 dial-small-text text-primary placeholder:text-secondary",n),value:typeof i=="string"?i:"",placeholder:u||d,onChange:y,disabled:s,id:a,"aria-label":"input-popup-field"})]}),!s&&f.jsx("button",{type:"button",className:"shrink-0 cursor-pointer bg-transparent border-none p-0 ml-1",onClick:r,"aria-label":"open-popup",children:f.jsx(Be,{icon:f.jsx(uu,{role:"img",width:$t,height:$t})})})]}),f.jsx(ds,{text:l})]}),F=()=>f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"w-full",onClick:x,"aria-label":"open-popup",id:a,children:f.jsxs("div",{className:ae("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",o,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[f.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[v&&f.jsx(Be,{icon:v}),f.jsx(Ot,{tooltip:b==null?void 0:String(b),children:b||!u?f.jsx("span",{className:n,children:b}):f.jsx("span",{className:"text-secondary",children:u})})]}),!s&&f.jsx("div",{className:"shrink-0",children:f.jsx(Be,{icon:f.jsx(uu,{role:"img",width:$t,height:$t})})})]})}),f.jsx(ds,{text:l})]}),R=()=>f.jsx("div",{className:"w-full",onClick:x,children:f.jsxs("div",{className:ae("dial-input px-3 py-2 flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",s&&"dial-input-disable"),children:[f.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[v&&f.jsx(Be,{icon:v}),f.jsx(pb,{placeholder:u,selectedItems:b,collapseTagOverflow:m})]}),!s&&f.jsx("div",{className:"ml-1",children:f.jsx(Be,{icon:f.jsx(uu,{role:"img",width:$t,height:$t})})})]})});return f.jsxs(f.Fragment,{children:[C?R():h?S():F(),t&&Ao.createPortal(e,document.body)]})},SN=({label:e,htmlFor:t,disabled:s,selectedValue:i,radioButtons:n,customInputValue:o,valueClassName:r,inputClassName:a,emptyValueText:l,onClose:c,header:d,portalId:u,onApply:h,onCancel:g,cancelButtonTitle:m="Cancel",applyButtonTitle:v="Apply",isValid:C,selectedRadioValue:w,onChangeRadioField:b,id:x,size:y=Zt.Md})=>{const[S,F]=p.useState(!1),R=p.useCallback(()=>{s||F(!0)},[s]),E=p.useCallback(()=>{F(!1),c?.()},[c]),D=p.useCallback(()=>{g?.(),E()},[g,E]),T=p.useCallback(()=>{h(),E()},[h,E]);return f.jsxs("div",{className:"flex flex-col gap-1",children:[f.jsx(Pn,{label:e,htmlFor:t}),f.jsx(gb,{disabled:s,open:S,selectedValue:o??n.find(P=>P.id===i)?.name,valueClassName:r,inputClassName:ae(a,"py-2","px-3"),emptyValueText:l,onOpen:R,children:f.jsx(Mn,{open:S,onClose:D,header:d,portalId:u,size:y,footer:f.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[f.jsx(Ws,{label:m,onClick:D}),f.jsx(Hs,{label:v,onClick:T,disabled:!C})]}),children:f.jsx("div",{className:"px-6 py-4",children:f.jsx(Dl,{radioButtons:n,labelClassName:"dial-small-text",activeRadioButton:w,onChange:b,elementId:x,orientation:hn.Column})})})})]})},RN="Create",FN="Cancel",EN="flex items-center justify-end gap-2 px-6 py-3",DN=({header:e,open:t=!1,submitLabel:s=RN,cancelLabel:i=FN,isLoading:n=!1,disableSubmitButton:o=!1,className:r,submitClassName:a,onClose:l,onSubmit:c,onCancel:d,children:u,dividers:h=!0,size:g=Zt.Md,footer:m})=>{const v=n?null:f.jsxs("div",{className:EN,children:[f.jsx(Ws,{label:i,onClick:()=>d?d():l?.()}),f.jsx(Hs,{className:a,label:s,disabled:o,onClick:()=>c()})]}),C=p.useCallback(()=>n?f.jsx("div",{className:"px-6 py-4 h-[120px]",children:f.jsx(ea,{size:50})}):u??null,[u,n]);return f.jsx(Mn,{open:t,header:e,className:r,dividers:h,onClose:()=>l?.(),footer:m??v,size:g,children:C()})},PN="bg-layer-4 flex items-center justify-center enabled:text-secondary enabled:hover:text-accent-primary enabled:active:bg-controls-accent-primary-alpha-active enabled:hover:bg-accent-primary-alpha enabled:active:text-accent-primary",TN=({icon:e,onClick:t,disabled:s,size:i=nt.Standard})=>f.jsx("div",{className:ae("border-l border-tertiary",i===nt.Standard?"h-[40px] w-[44px]":"h-[24px] w-[32px]"),children:f.jsx(Gs,{className:ae(PN,i===nt.Small&&"p-1"),icon:e,onClick:t,disabled:s,size:i})}),kN=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],fb=(e,t,s,i)=>{if((t==="number"||s!==void 0||i!==void 0)&&!kN.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||i!==void 0){const o=e.currentTarget.value,r=e.currentTarget.selectionStart||0,a=o.slice(0,r)+e.key+o.slice(r),l=parseFloat(a);if(!isNaN(l)){if(s!==void 0&&l<+s){e.preventDefault();return}if(i!==void 0&&l>+i){e.preventDefault();return}}}}},oi=({labelProps:e,error:t,caption:s,id:i,containerClassName:n,...o})=>f.jsxs("div",{className:J("flex flex-col gap-y-1",n),children:[e&&f.jsx(Pn,{...e,htmlFor:i}),f.jsx(mb,{id:i,...o}),f.jsx(ds,{text:t}),!t&&f.jsx(Jr,{text:s})]}),mb=({invalid:e,disabled:t,prefix:s,className:i,postfix:n,iconBefore:o,iconAfter:r,wrapperClassName:a,type:l,inputRef:c,value:d,tooltipText:u,min:h,onChange:g,max:m,inputButtonProps:v,...C})=>{const w=p.useRef(null),b=De.useMergeRefs([c,w]);p.useEffect(()=>{const R=w.current;if(!R)return;const E=D=>{D.preventDefault()};return R.addEventListener("wheel",E,{passive:!1}),()=>{R.removeEventListener("wheel",E)}},[]);const x=l==="number"||h!==void 0||m!==void 0,y=R=>{fb(R,l,h,m)},S=R=>{const E=R.currentTarget.value;if(x&&E!==""){const D=parseFloat(E);if(isNaN(D)&&E!=="-"&&E!=="."||!isNaN(D)&&(h!==void 0&&D<+h||m!==void 0&&D>+m))return}g?.(E||void 0)},F=()=>f.jsxs("div",{className:J("dial-input flex flex-row items-center gap-x-2 justify-between py-2",e&&"dial-input-error",t&&"dial-input-disable",!s&&"pl-3",!v&&"pr-3",a),"aria-label":"input-container",children:[s&&f.jsx("div",{className:"border-r border-tertiary",children:f.jsx(mb,{wrapperClassName:"!rounded-r-none",className:"truncate",value:s,disabled:!0,id:`${s}_textBefore`})}),f.jsx(Be,{icon:o}),f.jsx("input",{ref:b,type:l,autoComplete:l==="password"?"new-password":"off",value:d??"",className:J("border-0 bg-transparent w-full truncate",t&&"cursor-not-allowed",i),onChange:S,onKeyDown:y,min:h,disabled:t,max:m,...C}),n&&f.jsxs("p",{className:"text-secondary dial-small-text",children:[" ",n]}),f.jsx(Be,{icon:r}),v&&f.jsx(TN,{...v,disabled:t})]});return t&&l!=="password"?f.jsx(Ot,{tooltip:u||d,children:F()}):F()},IN=/^0+\.(\d+)?$/,MN=/^0+/,fh=({integer:e,onChange:t,min:s,max:i,onKeyDown:n,onPaste:o,...r})=>{const a=d=>!d||d==="-"?d:String(d)?.match(IN)?String(d)?.replace(MN,"0"):Number(d),l=d=>{if([".","-","+","e","E"].includes(d.key)){d.preventDefault();return}fb(d,"number",s,i)},c=d=>{const u=d.clipboardData.getData("text"),h=u.replace(/\D/g,"");if(h!==u&&(d.preventDefault(),h)){const g=d.currentTarget,m=g.selectionStart??0,v=g.selectionEnd??0,C=g.value.slice(0,m)+h+g.value.slice(v);t?.(a(C))}};return f.jsx(oi,{type:"number",min:s,max:i,onChange:d=>t?.(a(d)),onKeyDown:e?l:n,onPaste:e?c:o,...r})},AN=({onClick:e})=>f.jsx(j.IconEyeOff,{...te,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),LN=({onClick:e})=>f.jsx(j.IconEye,{...te,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),vb=({...e})=>{const[t,s]=p.useState(!1),i=p.useCallback(n=>{s(n)},[]);return f.jsx(oi,{type:t?"text":"password",...e,iconAfter:e.disabled?null:t?f.jsx(AN,{onClick:()=>i(!1)}):f.jsx(LN,{onClick:()=>i(!0)})})},ON={[nt.Small]:{className:"dial-tiny-text",wrapperClassName:"pl-2 py-0",containerClassName:"h-[24px]",iconSize:16,iconStroke:1},[nt.Standard]:{className:"dial-small-text",wrapperClassName:"",containerClassName:"",iconSize:20,iconStroke:1.5}},Kp=({size:e=nt.Standard,placeholder:t="Search...",value:s,onChange:i,...n})=>{const[o,r]=p.useState(s||"");p.useEffect(()=>{r(s||"")},[s]);const a=p.useCallback(u=>{r(u||""),i?.(u||"")},[i]),l=ON[e],c=p.useCallback(()=>{a("")},[a]),d=p.useMemo(()=>{if(o)return{icon:f.jsx(j.IconX,{size:l.iconSize,"aria-label":"Clear search",role:"button"}),onClick:c,size:e}},[c,o,e,l.iconSize]);return f.jsx(oi,{placeholder:t,iconBefore:f.jsx(j.IconSearch,{size:l.iconSize,stroke:l.iconStroke}),value:o,onChange:a,inputButtonProps:d,containerClassName:l.containerClassName,className:l.className,wrapperClassName:l.wrapperClassName,...n})},Cb=({options:e,selectedValues:t,handleRemoveTag:s})=>f.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(i=>{const n=e.find(r=>r.value===i)?.label??i,o=e.find(r=>r.value===i)?.icon;return f.jsx(io,{tag:n,remove:r=>s?.(r,i),iconBefore:o?f.jsx(Be,{icon:o}):null,className:"max-w-full"},i)})});var oc=(e=>(e.Sm="sm",e.Md="md",e))(oc||{}),rc=(e=>(e.Primary="Primary",e.Secondary="Secondary",e))(rc||{});const NN="dial-input flex w-full items-center justify-between gap-2 dial-small-text cursor-pointer",HN="w-full rounded flex flex-col",Lr="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small-text text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none",GN="bg-accent-primary-alpha",mh="bg-accent-primary-alpha border-l border-accent-primary border-1",ac="opacity-75",BN=352,VN=4,zN=f.jsx(j.IconChevronDown,{size:ct.SM}),WN=({opt:e,selectedValues:t,onSelect:s})=>{const{isOpen:i,refs:n,floatingStyles:o,context:r,getReferenceProps:a,getFloatingProps:l}=X1(VN,"listbox",!!e.disabled),c=e.children?.some(d=>t.includes(d.value));return f.jsxs(f.Fragment,{children:[f.jsxs("button",{ref:n.setReference,type:"button",role:"option","aria-haspopup":"listbox","aria-expanded":i,"aria-selected":!!c,"aria-disabled":!!e.disabled,disabled:e.disabled,className:ae(Lr,c&&mh,e.disabled&&ac),...a(),children:[f.jsxs("div",{className:"flex items-center gap-2 w-full min-w-0",children:[e.icon&&f.jsx(Be,{icon:e.icon}),f.jsx(vt,{text:e.label})]}),f.jsx(j.IconChevronRight,{size:14,className:"shrink-0"})]}),i&&f.jsx(Q1,{refs:n,floatingStyles:o,context:r,getFloatingProps:l,role:"listbox",className:"w-max py-1",children:e.children.map(d=>{const u=t.includes(d.value);return f.jsx("button",{type:"button",role:"option","aria-selected":u,"aria-disabled":!!d.disabled,disabled:d.disabled,className:ae(Lr,u&&mh,d.disabled&&ac),onClick:()=>!d.disabled&&s(d.value),children:f.jsxs("div",{className:"flex items-center gap-2 w-full",children:[d.icon&&f.jsx(Be,{icon:d.icon}),f.jsx(vt,{text:d.label})]})},d.value)})})]})},Fn=({options:e,multiple:t=!1,elementId:s,value:i,defaultValue:n,variant:o=rc.Primary,size:r=oc.Md,prefix:a,customSelectedValue:l,placeholder:c="Select...",searchable:d=!1,searchPlaceholder:u,selectAll:h=!1,invalid:g,selectAllLabel:m="Select all",emptyStateTitle:v="No options available",emptyStateDescription:C,emptyStateIcon:w,disabled:b=!1,className:x,listClassName:y,closable:S=!1,header:F,footer:R,onClose:E,onChange:D,inlineSearch:T=!1,dismissRef:P,onFooterClick:k,open:A,onOpenChange:U,onInlineQueryChange:I,customMultiSelectTagsRenderer:H})=>{const W=p.useId(),[V,Z]=p.useState(!1),L=A!==void 0,M=L?!!A:V,z=p.useCallback(_=>{L||Z(_),U?.(_)},[L,U]),[K,ie]=p.useState(T&&l||""),we=p.useRef(null),N=p.useCallback(_=>{_!==K&&(ie(_||""),I?.(_||""))},[I,K]),oe=i!==void 0,[Te,ee]=p.useState(n),le=oe?i:Te,$=p.useMemo(()=>t?Array.isArray(le)?le:[]:typeof le=="string"?[le]:[],[le,t]),he=p.useMemo(()=>{const _=K.trim().toLowerCase();return _?e.filter(Ee=>Ee.label.toLowerCase().includes(_)):e},[e,K]);p.useEffect(()=>{!M&&!T&&N("")},[T,M,N]),p.useEffect(()=>{T&&!M&&l&&N(l||"")},[l,T,M,N]);const G=p.useCallback(_=>{oe||ee(_),D?.(_)},[oe,D]),ne=p.useCallback(_=>{if(t){const Ee=new Set($);Ee.has(_)?Ee.delete(_):Ee.add(_),G(Array.from(Ee));return}if(G(_),T){const Ee=e.find(Ft=>Ft.value===_)??e.flatMap(Ft=>Ft.children??[]).find(Ft=>Ft.value===_);Ee&&(N(Ee.label),I?.(Ee.label))}z(!1)},[t,G,T,z,$,e,N,I]),pe=p.useCallback((_,Ee)=>{if(_.stopPropagation(),!t){G("");return}const Ft=$.filter(Wo=>Wo!==Ee);G(Ft)},[t,$,G]),Fe=p.useMemo(()=>he.filter(_=>!_.disabled),[he]),Pe=p.useMemo(()=>Fe.filter(_=>$.includes(_.value)).length,[Fe,$]),ce=p.useCallback(_=>{T&&!t&&!_&&ne(K),z(_)},[ne,T,t,K,z]),{allSelectedInFiltered:Se,someSelectedInFiltered:ke}=p.useMemo(()=>{const _=Fe.length>0&&Pe===Fe.length;return{allSelectedInFiltered:_,someSelectedInFiltered:Pe>0&&!_}},[Fe,Pe]),Me=p.useCallback(()=>{if(!(!t||Fe.length===0))if(Se){const _=new Set(Fe.map(Ee=>Ee.value));G($.filter(Ee=>!_.has(Ee)))}else{const _=new Set($);Fe.forEach(Ee=>_.add(Ee.value)),G(Array.from(_))}},[Se,t,Fe,$,G]),be=$.length>0;p.useEffect(()=>{M&&T&&!t&&!b&&requestAnimationFrame(()=>{const _=we.current;if(!_)return;_.focus();const Ee=_.value?.length??0;_.setSelectionRange?.(Ee,Ee)})},[M,T,t,b]);const Ne=!t&&be?$[0]:void 0,Ve=p.useMemo(()=>Ne?e.find(_=>_.value===Ne)??e.flatMap(_=>_.children??[]).find(_=>_.value===Ne):void 0,[e,Ne]),St=p.useCallback(()=>t?be?H?.(e,$,pe)||f.jsx(Cb,{options:e,selectedValues:$,handleRemoveTag:pe}):f.jsx("span",{className:"text-secondary truncate",children:c}):Ve?f.jsxs(f.Fragment,{children:[Ve.icon&&f.jsx(Be,{icon:Ve.icon}),f.jsx(vt,{text:a?`${a} ${Ve.label}`:Ve.label}),Ve?.description&&f.jsx("div",{className:"text-secondary dial-small-text",children:Ve.description})]}):l&&i?l:f.jsx("span",{className:"text-secondary truncate",children:c}),[be,t,l,a,i,c,Ve,e,$,pe,H]);p.useImperativeHandle(P,()=>({dismiss:()=>{z(!1)}}));const _e=p.useCallback(()=>{N($.length===1?Ve?.label??K:"")},[K,$.length,N,Ve?.label]),Rt=p.useCallback(()=>{b||(z(!M),T&&!t&&(_e(),we.current?.focus()))},[b,T,M,t,_e,z]);return f.jsx(Tt,{open:M,onOpenChange:ce,disabled:b,closable:S,onClose:E,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],maxDropdownHeight:d?null:BN,listClassName:y,renderOverlay:()=>f.jsxs("div",{id:`list-${s||W}`,role:"listbox","aria-multiselectable":t||void 0,className:HN,children:[F&&f.jsx(f.Fragment,{children:typeof F=="function"?F():F}),(d||S)&&e.length>8&&f.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[d&&f.jsx(Kp,{placeholder:u,onChange:N,value:K,id:`search-${s||W}`,containerClassName:"w-full"}),S&&f.jsx(us,{"aria-label":"Close select",className:"shrink-0",iconBefore:f.jsx(j.IconX,{size:ct.SM}),onClick:_=>{E?.(_),z(!1)}})]}),t&&h&&Fe.length>0&&f.jsx("div",{className:ae(Lr,"mt-2"),children:f.jsx(yu,{id:`${s||W}-selectAll`,label:m,checked:Se,indeterminate:ke,onChange:Me,ariaLabel:m})}),f.jsx("div",{className:ae("overflow-y-auto max-h-[352px]",T&&he.length===0?"":"py-1"),children:he.length===0?!T&&f.jsx("div",{className:"px-2 py-3",children:f.jsx(ta,{icon:w??f.jsx(j.IconClipboardX,{size:ct.LG,stroke:.5}),title:v,description:C})}):he.map(_=>{const Ee=$.includes(_.value);return t?f.jsxs("div",{role:"option","aria-selected":Ee,"aria-disabled":!!_.disabled,className:ae(Lr,Ee&&GN,_.disabled&&ac,"w-full"),children:[f.jsx(yu,{id:`${s||W}-${_.value}`,label:f.jsxs("span",{className:"flex w-full flex-1 pl-2 min-w-0 items-center gap-2 text-primary",children:[_.icon&&f.jsx(Be,{icon:_.icon}),f.jsx("span",{className:"truncate",children:_.label})]}),checked:Ee,disabled:_.disabled,onChange:()=>!_.disabled&&ne(_.value),ariaLabel:_.label}),_.description&&f.jsx("div",{className:"text-secondary dial-small-text",children:_.description})]},_.value):_.children?.length?f.jsx(WN,{opt:_,selectedValues:$,onSelect:ne},_.value):f.jsx("button",{role:"option",type:"button","aria-selected":Ee,"aria-disabled":!!_.disabled,disabled:_.disabled,className:ae(Lr,Ee&&mh,_.disabled&&ac),onClick:()=>!_.disabled&&ne(_.value),children:f.jsxs("div",{className:"flex items-center gap-2 w-full",children:[_.icon&&f.jsx(Be,{icon:_.icon}),f.jsx(vt,{text:_.label}),_.description&&f.jsx("div",{className:"text-secondary dial-small-text",children:_.description})]})},_.value)})}),R&&f.jsx("div",{onClick:_=>{k?.(_),k&&z(!1)},children:typeof R=="function"?R():R})]}),children:f.jsxs("div",{role:"button",tabIndex:0,"aria-roledescription":"button to open select list","aria-haspopup":"listbox","aria-expanded":M,"aria-controls":`list-${s||W}`,className:J(NN,b&&"opacity-75 !cursor-not-allowed !border-primary",r===oc.Sm?"min-h-[25px] px-1.5 py-1":"min-h-[38px] px-3 py-2",g&&"dial-input-error",o===rc.Secondary?"!bg-layer-4 !h-auto":"",x),onMouseDown:_=>{b||T&&!t&&(_e(),_.preventDefault())},onClick:()=>{Rt()},onKeyDown:_=>{(_.key===" "||_.code==="Space")&&(_.preventDefault(),Rt())},children:[T&&!t?f.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary flex-1",children:f.jsx("input",{id:`inline-${s||W}`,type:"text",placeholder:u??c,value:K||"",onChange:_=>N(_.currentTarget.value.trimStart()),onFocus:()=>!b&&z(!0),onMouseDown:_=>{_e(),_.stopPropagation()},onClick:_=>{_.stopPropagation()},onKeyDown:_=>{_.stopPropagation()},className:"bg-transparent outline-none w-full dial-small-text",ref:we,disabled:b,"aria-disabled":b,autoComplete:"off"})}):f.jsx("div",{className:"flex w-full min-w-0 items-center gap-2 text-primary",children:St()}),!T&&f.jsx(Be,{icon:zN,className:ae("text-primary",M&&"rotate-180")})]})})},jN=({label:e,required:t,captionDescription:s,containerClassName:i,selectClassName:n,error:o,id:r,caption: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 f.jsx(Cb,{options:u.options,selectedValues:c});{const g=u.options?.find(m=>m.value===c);return f.jsx("span",{"aria-readonly":!0,className:"text-primary",children:g?.label||c})}},[c,u.options,d]);return f.jsx(cc,{id:r,label:e,required:t,description:a,error:o,captionDescription:s,className:i,readonly:l,value:h(),defaultEmptyText:d,children:f.jsx(Fn,{className:n,value:c,elementId:r,invalid:!!o,...u})})};function wb(e){let t=null;return()=>(t==null&&(t=e()),t)}function _N(e,t){return e.filter(s=>s!==t)}function UN(e,t){const s=new Set,i=o=>s.add(o);e.forEach(i),t.forEach(i);const n=[];return s.forEach(o=>n.push(o)),n}class $N{enter(t){const s=this.entered.length,i=n=>this.isNodeInDocument(n)&&(!n.contains||n.contains(t));return this.entered=UN(this.entered.filter(i),[t]),s===0&&this.entered.length>0}leave(t){const s=this.entered.length;return this.entered=_N(this.entered.filter(this.isNodeInDocument),t),s>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class qN{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(i=>{const n=this.config.exposeProperties[i];n!=null&&(s[i]={value:n(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 Yp="__NATIVE_FILE__",bb="__NATIVE_URL__",xb="__NATIVE_TEXT__",yb="__NATIVE_HTML__",Im=Object.freeze(Object.defineProperty({__proto__:null,FILE:Yp,HTML:yb,TEXT:xb,URL:bb},Symbol.toStringTag,{value:"Module"}));function hu(e,t,s){const i=t.reduce((n,o)=>n||e.getData(o),"");return i??s}const vh={[Yp]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[yb]:{exposeProperties:{html:(e,t)=>hu(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[bb]:{exposeProperties:{urls:(e,t)=>hu(e,t,"").split(`
68
+ If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Dr(d)}if(a.length>0&&n){const l=this.beans.frameworkOverrides.getDocLink(n);Dr(`to see all the valid ${i} properties please check: ${l}`)}}};function gL(e,t,s){const i={},n=e.filter(o=>!t.some(r=>r===o));if(n.length>0)for(const o of n)i[o]=Ju({inputValue:o,allSuggestions:s}).values;return i}var fL=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),mL={moduleName:"Validation",version:Q,beans:[pL]},vL={moduleName:"AllCommunity",version:Q,dependsOn:[uI,AI,C7,mL,r8,a8,l8,c8,d8,u8,h8,o8,s7,i7,n7,o7,t7,a7,l7,M7,vk,J7,vw,kk,Ik,R9,CI,tD,r9,eL,ZT,iL,SI,nL,R7,JT,m9,l1,E7,E9,eD,hI,A9]};function de(e,t={}){const s=Object.keys(t).map(i=>{const n=t[i];return n!=null?`${i}=${n}`:null}).filter(Boolean).join(";");return[e,s].filter(i=>i.length>0).join(":")}var re={grid(e){return de("ag-grid-root",{gridId:e})},headerGroupCell(e){return de("ag-header-group-cell",{colId:e})},headerCell(e){return de("ag-header-cell",{colId:e})},headerCheckbox(e){return de("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return de("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return de("ag-floating-filter",{colId:e})},floatingFilterButton(e){return de("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return de("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return de("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return de(`ag-${e.source}-picker-display`,ol(e))},numberFilterInstanceInput(e){return de(`ag-${e.source}-number-input`,ol(e))},textFilterInstanceInput(e){return de(`ag-${e.source}-text-input`,ol(e))},dateFilterInstanceInput(e){return de(`ag-${e.source}-date-input`,ol(e))},setFilterInstanceMiniFilterInput(e){return de(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return de(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return de(`ag-${e.source}-set-filter-apply-panel-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},filterConditionRadioButton(e,t){return de(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return de("ag-advanced-filter-input")},advancedFilterButton(e){return de("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return de("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return de("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return de("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return de("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return de("ag-advanced-filter-builder-add-item-button")},rowNode(e){return de("ag-row",{"row-id":e})},cell(e,t){return de("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return re.cell(e,xi)},checkbox(e,t){return de("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return re.checkbox(e,$h)},autoGroupColumnCheckbox(e){return re.checkbox(e,xi)},dragHandle(e,t){return de("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return de("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return de("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return re.groupContracted(e,xi)},autoGroupExpanded(e){return re.groupExpanded(e,xi)},rowNumber(e){return re.cell(e,qh)},menu(){return de("ag-menu")},menuOption(e){return de("ag-menu-option",{option:e})},sideBar(){return de("ag-side-bar")},sideBarButton(e){return de("ag-side-button",{label:e})},columnToolPanel(){return de("ag-column-panel")},pivotModeSelect(){return de("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return de("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return de("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return de("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return de("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return de("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,s){return de("ag-column-drop-cell-drag-handle",{source:e,area:t,label:s})},columnDropCellCancelButton(e,t,s){return de("ag-column-drop-cell-cancel",{source:e,area:t,label:s})},columnDropArea(e,t){return de("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return de("ag-filter-panel")},filterToolPanelAddFilterButton(){return de("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return de("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return de("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return de("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return de("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return de("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return de("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return de("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return de("ag-status-bar-selected-row-count")},statusBarAggregations(){return de("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return de("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return de("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return de("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return de("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return de("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return de("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return de("ag-paging-page-summary-panel-total-page",{value:e})},fillHandle(){return de("ag-fill-handle")},columnChooserCloseButton(){return de("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return de("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return de("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return de("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return de("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return de("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return de("ag-overlay")}};function CL(e,t){const s={};for(const i of Object.keys(e))t[i]!==null&&(s[t[i]??i]=e[i]);return s}function wL(e){return e.source!=="floating-filter"?{index:0,...e}:e}function ol(e){return CL(wL(e),{colLabel:"label"})}var G1="data-testid";function ge(e,t){e?.setAttribute(G1,t)}function bL(e){G1=e}var xL=class extends B{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=ht(this,()=>this.setupAllTestIds(),500),t=ht(this,()=>{this.setupAllTestIds(),e()},0);this.addManagedEventListeners({firstDataRendered:t,displayedRowsChanged:t,displayedColumnsChanged:t,displayedColumnsWidthChanged:t,virtualColumnsChanged:t,columnMenuVisibleChanged:t,contextMenuVisibleChanged:t,advancedFilterBuilderVisibleChanged:t,fieldPickerValueSelected:t,modelUpdated:t,sideBarUpdated:t,pinnedHeightChanged:t,gridReady:t,overlayExclusiveChanged:t,rowGroupOpened:t,scrollVisibilityChanged:t,gridSizeChanged:t,filterOpened:t,filterChanged:t,cellSelectionChanged:t})}setupAllTestIds(){const e=ms(this.beans),t=ew(this.beans),s=e.querySelector(`[grid-id="${t}"]`);ge(s,re.grid(t)),e.querySelectorAll(".ag-header-group-cell").forEach(o=>{ge(o,re.headerGroupCell(o.getAttribute("col-id")))}),e.querySelectorAll(".ag-header-cell").forEach(o=>{const r=o.getAttribute("col-id"),l=o.classList.contains("ag-floating-filter")?re.floatingFilter(r):re.headerCell(r);ge(o,l),ge(o.querySelector(".ag-header-cell-filter-button"),re.headerFilterButton(r)),ge(o.querySelector(".ag-header-cell-menu-button"),re.headerCellMenuButton(r)),ge(o.querySelector(".ag-header-cell-resize"),re.headerResizeHandle(r)),ge(o.querySelector(".ag-checkbox input[type=checkbox]"),re.headerCheckbox(r)),ge(o.querySelector(".ag-floating-filter-button button"),re.floatingFilterButton(r)),this.setupFilterInstance(o.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:r})});const i=e.querySelector(".ag-filter-menu");this.setupFilterInstance(i,{source:"column-filter"}),ge(e.querySelector(".ag-advanced-filter input[type=text]"),re.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(o=>{ge(o,re.advancedFilterButton(o.textContent))}),ge(e.querySelector("button.ag-advanced-filter-builder-button"),re.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((o,r)=>{ge(o,r===0?re.advancedFilterPanelMaximiseButton():re.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-lable="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(o=>{ge(o,re.advancedFilterPill(o.querySelector(".ag-picker-field-display")?.textContent))}),ge(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),re.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row").forEach(o=>{const r=o.getAttribute("row-id");ge(o,re.rowNode(r)),o.querySelectorAll(".ag-cell").forEach(a=>{const l=a.getAttribute("col-id");ge(a,re.cell(r,l)),ge(a.querySelector(".ag-selection-checkbox input[type=checkbox]"),re.checkbox(r,l)),ge(a.querySelector(".ag-drag-handle"),re.dragHandle(r,l)),ge(a.querySelector(".ag-group-contracted"),re.groupContracted(r,l)),ge(a.querySelector(".ag-group-expanded"),re.groupExpanded(r,l))})}),e.querySelectorAll(".ag-menu-list").forEach(o=>{ge(o,re.menu()),o.querySelectorAll(".ag-menu-option").forEach(r=>{ge(r,re.menuOption(r.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(o=>{ge(o,re.sideBar()),o.querySelectorAll(".ag-side-button button").forEach(r=>{ge(r,re.sideBarButton(r.querySelector(".ag-side-button-label")?.textContent))}),o.querySelectorAll(".ag-column-panel").forEach(r=>{ge(r,re.columnToolPanel()),ge(r.querySelector(".ag-pivot-mode-select input[type=checkbox]"),re.pivotModeSelect()),ge(r.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),re.columnPanelSelectHeaderCheckbox()),ge(r.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),re.columnPanelSelectHeaderFilter()),r.querySelectorAll(".ag-column-select-list").forEach(a=>{a.querySelectorAll(".ag-column-select-virtual-list-item").forEach(l=>{const c=l.getAttribute("aria-label");ge(l.querySelector(".ag-column-group-closed-icon"),re.columnSelectListItemGroupClosedIcon(c)),ge(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),re.columnSelectListItemCheckbox(c)),ge(l.querySelector(".ag-drag-handle"),re.columnSelectListItemDragHandle(c))})}),this.setupColumnDropArea(r,"toolbar")}),o.querySelectorAll(".ag-filter-panel").forEach(r=>{ge(r,re.filterToolPanel()),ge(r.querySelector("button.ag-filter-add-button"),re.filterToolPanelAddFilterButton()),r.querySelectorAll(".ag-filter-card").forEach(a=>{const l=a.querySelector(".ag-filter-card-title")?.textContent,c=a.querySelector(".ag-filter-type-select");ge(c,re.filterToolPanelFilterTypeSelector(l)),a.querySelectorAll(".ag-filter").forEach(d=>this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:l}))})}),o.querySelectorAll(".ag-filter-toolpanel").forEach(r=>{ge(r.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),re.filterToolPanelSearchInput()),r.querySelectorAll(".ag-filter-toolpanel-group").forEach(a=>{const l=a.querySelector(".ag-filter-toolpanel-group-title")?.textContent;ge(a,re.filterToolPanelGroup(l)),ge(a.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),re.filterToolPanelGroupCollapsedIcon(l));const c=a.querySelector(".ag-filter-toolpanel-instance-filter");c&&this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:l})})})}),ge(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),re.statusBarTotalAndFilteredRowCount()),ge(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),re.statusBarTotalRowCount()),ge(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),re.statusBarFilteredRowCount()),ge(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),re.statusBarSelectedRowCount()),ge(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),re.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(o=>{ge(o.querySelector(".ag-paging-page-size .ag-picker-field-display"),re.paginationPanelSizePickerDisplay(o.querySelector(".ag-paging-page-size .ag-picker-field-display")?.textContent)),o.querySelectorAll(".ag-paging-row-summary-panel-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbFirstRowOnPage":ge(r,re.paginationPanelFirstRowOnPage(r.textContent));break;case"lbLastRowOnPage":ge(r,re.paginationPanelLastRowOnPage(r.textContent));break;case"lbRecordCount":ge(r,re.paginationPanelRecordCount(r.textContent));break}}),o.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(r=>{ge(r,re.paginationSummaryPanelButton(r.getAttribute("aria-label")?.toLowerCase()))}),o.querySelectorAll(".ag-paging-page-summary-panel .ag-paging-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbCurrent":ge(r,re.paginationSummaryPanelCurrentPage(r.textContent));break;case"lbTotal":ge(r,re.paginationSummaryPanelTotalPage(r.textContent));break}})}),ge(e.querySelector(".ag-fill-handle"),re.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(o=>{ge(o.querySelector(".ag-panel-title-bar-button-icon"),re.columnChooserCloseButton()),ge(o.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),re.columnChooserSearchBarCheckbox()),ge(o.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),re.columnChooserSearchBarFilter()),o.querySelectorAll(".ag-column-select-list").forEach(r=>{r.querySelectorAll(".ag-column-select-virtual-list-item").forEach(a=>{const l=a.getAttribute("aria-label");ge(a.querySelector(".ag-column-group-closed-icon"),re.columnChooserListItemGroupClosedIcon(l)),ge(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),re.columnChooserListItemCheckbox(l)),ge(a.querySelector(".ag-drag-handle"),re.columnChooserListItemDragHandle(l))})})}),ge(e.querySelector(".ag-overlay-wrapper"),re.overlay());const n=e.querySelector(".ag-column-drop-wrapper");n&&this.setupColumnDropArea(n,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(n=>{ge(n,re.filterInstancePickerDisplay(t))});const s=t.source==="floating-filter"?".ag-floating-filter-body":".ag-filter-body";e.querySelectorAll(`${s} .ag-input-field:not(.ag-hidden) input[type="number"]`).forEach((n,o,r)=>{const l=r.length>1?{...t,index:o}:t;ge(n,re.numberFilterInstanceInput(l))}),e.querySelectorAll(`${s} .ag-input-field:not(.ag-hidden) input[type="text"]`).forEach((n,o,r)=>{const l=r.length>1?{...t,index:o}:t;ge(n,re.textFilterInstanceInput(l))}),e.querySelectorAll(`${s} .ag-input-field:not(.ag-hidden) input[type="date"]`).forEach((n,o,r)=>{const l=r.length>1?{...t,index:o}:t;ge(n,re.dateFilterInstanceInput(l))});const i=e.querySelector('.ag-mini-filter input[type="text"]');ge(i,re.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(n=>{const o=n.querySelector(".ag-checkbox-label")?.textContent,r=n.querySelector('input[type="checkbox"]');ge(r,re.setFilterInstanceItem(t,o))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(n=>{ge(n,re.setFilterApplyPanelButton(t,n.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(n=>{const o=n.querySelector(".ag-radio-button-label")?.textContent;ge(n.querySelector("input[type=radio]"),re.filterConditionRadioButton(t,o))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(s=>{const i=s.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");ge(s,re.columnDropArea(t,i)),s.querySelectorAll(".ag-column-drop-cell").forEach(n=>{const o=n.querySelector(".ag-column-drop-cell-text")?.textContent;ge(n.querySelector(".ag-drag-handle"),re.columnDropCellDragHandle(t,i,o)),ge(n.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),re.columnDropCellCancelButton(t,i,o))})})}},yL={moduleName:"Testing",version:Q,beans:[xL]};function SL({testIdAttribute:e}={}){e&&bL(e),Qv.registerModules([yL])}var RL=class{wrap(e,t,s,i){const n=this.createWrapper(e,i);for(const o of t??[])this.createMethod(n,o,!0);for(const o of s??[])this.createMethod(n,o,!1);return n}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&&q(49,{methodName:t}),null)}}},FL=class extends QC{constructor(e){super(e,Xh)}},kt=p.createContext({}),B1=p.createContext("default"),ca=(e,t,s,i)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const o=e.newAgStackInstance();let r,a,l=!1;return o.then(c=>{if(l){t.destroyBean(c);return}r=c,a=r.getGui(),s.appendChild(a),wm(i,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),i&&wm(i,void 0))}},wm=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const s=e;s.current=t}},is=(...e)=>e.filter(s=>s!=null&&s!=="").join(" "),cs=class V1{constructor(...t){this.classesMap={};for(const s of t)this.classesMap[s]=!0}setClass(t,s){if(!!this.classesMap[t]==s)return this;const n=new V1;return n.classesMap={...this.classesMap},n.classesMap[t]=s,n}toString(){return Object.keys(this.classesMap).filter(s=>this.classesMap[s]).join(" ")}},Bo=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()},hh=p.version?.split(".")[0],z1=hh==="16"||hh==="17";function EL(){return hh==="19"}var Sl=!1;function DL(e){return Sl||setTimeout(()=>Sl=!1,0),Sl=!0,e()}var Zr=(e,t)=>{!z1&&e&&!Sl?Ao.flushSync(t):t()},PL=e=>{z1?e():p.startTransition(e)};function TL(e,t,s){return p.useSyncExternalStore?p.useSyncExternalStore(e,t):s}function sc(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 i=[],n=[],o=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];o.set(l.instanceId,l),r.has(l.instanceId)&&i.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;o.has(c)||n.push(l)}return i.length===e.length&&n.length===0?e:i.length===0&&n.length===t.length?t:i.length===0?n:n.length===0?i:[...i,...n]}var W1=p.forwardRef((e,t)=>{const{registry:s,context:i}=p.useContext(kt),n=p.useRef(null),o=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(),[m,v]=p.useState(),[C,w]=p.useState(()=>new cs),[b,x]=p.useState(()=>new cs("ag-hidden")),[y,S]=p.useState(()=>new cs("ag-hidden")),[F,R]=p.useState(()=>new cs("ag-invisible"));p.useImperativeHandle(t,()=>({refresh(){return!1}})),p.useLayoutEffect(()=>ca(d,i,o.current),[d]);const E=p.useCallback(W=>{if(n.current=W,!W||i.isDestroyed()){c.current=i.destroyBean(c.current);return}const V={setInnerRenderer:(L,M)=>{u(L),v(M)},setChildCount:L=>g(L),toggleCss:(L,M)=>w(z=>z.setClass(L,M)),setContractedDisplayed:L=>S(M=>M.setClass("ag-hidden",!L)),setExpandedDisplayed:L=>x(M=>M.setClass("ag-hidden",!L)),setCheckboxVisible:L=>R(M=>M.setClass("ag-invisible",!L)),setCheckboxSpacing:L=>R(M=>M.setClass("ag-group-checkbox-spacing",L))},Z=s.createDynamicBean("groupCellRendererCtrl",!0);Z&&(c.current=i.createBean(Z),c.current.init(V,W,r.current,a.current,l.current,W1,e))},[]),D=p.useMemo(()=>`ag-cell-wrapper ${C.toString()}`,[C]),T=p.useMemo(()=>`ag-group-expanded ${b.toString()}`,[b]),P=p.useMemo(()=>`ag-group-contracted ${y.toString()}`,[y]),k=p.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),A=d?.componentFromFramework,U=A?d.componentClass:void 0,I=d==null&&m!=null,H=Oo(m);return p.createElement("span",{className:D,ref:E,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},p.createElement("span",{className:T,ref:a}),p.createElement("span",{className:P,ref:l}),p.createElement("span",{className:k,ref:r}),p.createElement("span",{className:"ag-group-value",ref:o},I?H:A?p.createElement(U,{...d.params}):null),p.createElement("span",{className:"ag-group-child-count"},h))}),bm=W1,Wp=p.createContext({setMethods:()=>{}}),kL=e=>{const{initialProps:t,addUpdateCallback:s,CustomComponentClass:i,setMethods:n}=e,[{key:o,...r},a]=p.useState(t);return p.useEffect(()=>{s(l=>a(l))},[]),p.createElement(Wp.Provider,{value:{setMethods:n}},p.createElement(i,{key:o,...r}))},IL=p.memo(kL),ML=0;function xm(){return`agPortalKey_${++ML}`}var j1=class{constructor(e,t,s,i){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=s,this.suppressFallbackMethods=!!i,this.statelessComponent=this.isStateless(this.reactComponent),this.key=xm(),this.portalKey=xm(),this.instanceCreated=this.isStatelessComponent()?Oe.resolve(!1):new Oe(n=>{this.resolveInstanceCreated=n})}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 i=s[e];if(i)return i.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 Oe(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=Ao.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 Oc(e,t,s){for(const i of e){const n=t[i];n&&(s[i]=n)}}var ps=class extends j1{constructor(){super(...arguments),this.awaitUpdateCallback=new Oe(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=IL}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 Oe(i=>{setTimeout(()=>{i()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,Oc(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new Oe(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},AL=class extends ps{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},LL=class extends ps{refresh(e){this.sourceParams=e,this.refreshProps()}},OL=class extends ps{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}},NL=class extends ps{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:i}=this;return e.label=t,e.icon=s,e.shake=i,e}},HL=class extends ps{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 Oe(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 Oe(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}},GL=class extends ps{constructor(){super(...arguments),this.awaitSetMethodsCallback=new Oe(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 _1(e,t){e.parentFilterInstance(s=>{(s.setModel(t)||Oe.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var BL=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){Oc(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),_1(this.floatingFilterParams,e)}},VL=class extends ps{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(),_1(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},zL=class extends ps{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},WL=class extends ps{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},jL=class extends ps{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}},_L=class extends ps{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},UL=class extends ps{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 jp(){q(231)}var $L=1e3,qL=class{constructor(e,t,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=s||$L}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){Zr(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,s)})}}},KL=p.createContext([]),YL=p.createContext(void 0),ZL=({ctrl:e})=>{const t=e.isAlive(),{context:s}=p.useContext(kt),[i,n]=p.useState(),[o,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 sa(()=>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 Go);const b=()=>{const y=e.getSelectAllGui();y&&(c.current?.insertAdjacentElement("afterend",y),a.current.addDestroyFunc(()=>y.remove()))},x={setWidth:y=>{l.current&&(l.current.style.width=y)},toggleCss:(y,S)=>h.current.toggleCss(y,S),setUserStyles:y=>r(y),setAriaSort:y=>{l.current&&(y?S2(l.current,y):R2(l.current))},setUserCompDetails:y=>n(y),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:b,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(x,w,c.current,d.current,a.current),b()},[]);p.useLayoutEffect(()=>ca(i,s,d.current,u),[i]),p.useEffect(()=>{e.setDragSource(l.current)},[i]);const m=p.useMemo(()=>!!(i?.componentFromFramework&&Bo(i.componentClass)),[i]),v=i?.componentFromFramework,C=i?.componentClass;return p.createElement("div",{ref:g,style:o,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"},v?m?p.createElement(C,{...i.params}):p.createElement(C,{...i.params,ref:u}):null))},XL=p.memo(ZL),QL=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){Oc(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},JL=({ctrl:e})=>{const{context:t,gos:s}=p.useContext(kt),[i,n]=p.useState(),[o,r]=p.useState(()=>new cs("ag-header-cell","ag-floating-filter")),[a,l]=p.useState(()=>new cs),[c,d]=p.useState(()=>new cs("ag-floating-filter-button","ag-hidden")),[u,h]=p.useState("false"),[g,m]=p.useState(),[,v]=p.useState(1),C=p.useRef(),w=p.useRef(null),b=p.useRef(null),x=p.useRef(null),y=p.useRef(null),S=p.useRef(),F=p.useRef(),R=L=>{L!=null&&S.current?.(L)},E=p.useCallback(L=>{if(w.current=L,!L||!e.isAlive()||t.isDestroyed()){C.current=t.destroyBean(C.current);return}C.current=t.createBean(new Go),F.current=new Oe(z=>{S.current=z});const M={toggleCss:(z,K)=>r(ie=>ie.setClass(z,K)),setUserStyles:z=>n(z),addOrRemoveBodyCssClass:(z,K)=>l(ie=>ie.setClass(z,K)),setButtonWrapperDisplayed:z=>{d(K=>K.setClass("ag-hidden",!z)),h(z?"false":"true")},setWidth:z=>{w.current&&(w.current.style.width=z)},setCompDetails:z=>m(z),getFloatingFilterComp:()=>F.current?F.current:null,setMenuIcon:z=>y.current?.appendChild(z)};e.setComp(M,L,y.current,b.current,C.current)},[]);p.useLayoutEffect(()=>ca(g,t,b.current,R),[g]);const D=p.useMemo(()=>o.toString(),[o]),T=p.useMemo(()=>a.toString(),[a]),P=p.useMemo(()=>c.toString(),[c]),k=p.useMemo(()=>!!(g&&g.componentFromFramework&&Bo(g.componentClass)),[g]),A=p.useMemo(()=>s.get("reactiveCustomComponents"),[]),U=p.useMemo(()=>s.get("enableFilterHandlers"),[]),[I,H]=p.useState();p.useEffect(()=>{if(g?.componentFromFramework)if(A){const L=U?QL:BL,M=new L(g.params,()=>v(z=>z+1));R(M),H(M)}else jp()},[g]);const W=I?.getProps(),V=g?.componentFromFramework,Z=g?.componentClass;return p.createElement("div",{ref:E,style:i,className:D,role:"gridcell"},p.createElement("div",{ref:b,className:T,role:"presentation"},V?A?W&&p.createElement(Wp.Provider,{value:{setMethods:L=>I.setMethods(L)}},p.createElement(Z,{...W})):p.createElement(Z,{...g.params,ref:k?()=>{}:R}):null),p.createElement("div",{ref:x,"aria-hidden":u,className:P,role:"presentation"},p.createElement("button",{ref:y,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},eO=p.memo(JL),tO=({ctrl:e})=>{const{context:t}=p.useContext(kt),[s,i]=p.useState(),[n,o]=p.useState(()=>new cs),[r,a]=p.useState(()=>new cs),[l,c]=p.useState("false"),[d,u]=p.useState(),[h,g]=p.useState(),m=p.useRef(),v=p.useRef(null),C=p.useRef(null),w=p.useRef(null),b=p.useRef(),x=p.useCallback(D=>{if(v.current=D,!D||!e.isAlive()||t.isDestroyed()){m.current=t.destroyBean(m.current);return}m.current=t.createBean(new Go);const T={setWidth:P=>{v.current&&(v.current.style.width=P)},toggleCss:(P,k)=>o(A=>A.setClass(P,k)),setUserStyles:P=>i(P),setHeaderWrapperHidden:P=>{const k=w.current;k&&(P?k.style.setProperty("display","none"):k.style.removeProperty("display"))},setHeaderWrapperMaxHeight:P=>{const k=w.current;k&&(P!=null?k.style.setProperty("max-height",`${P}px`):k.style.removeProperty("max-height"),k.classList.toggle("ag-header-cell-comp-wrapper-limited-height",P!=null))},setUserCompDetails:P=>g(P),setResizableDisplayed:P=>{a(k=>k.setClass("ag-hidden",!P)),c(P?"false":"true")},setAriaExpanded:P=>u(P),getUserCompInstance:()=>b.current||void 0};e.setComp(T,D,C.current,w.current,m.current)},[]);p.useLayoutEffect(()=>ca(h,t,w.current),[h]),p.useEffect(()=>{v.current&&e.setDragSource(v.current)},[h]);const y=p.useMemo(()=>!!(h?.componentFromFramework&&Bo(h.componentClass)),[h]),S=p.useMemo(()=>"ag-header-group-cell "+n.toString(),[n]),F=p.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),R=h?.componentFromFramework,E=h?.componentClass;return p.createElement("div",{ref:x,style:s,className:S,role:"columnheader","aria-expanded":d},p.createElement("div",{ref:w,className:"ag-header-cell-comp-wrapper",role:"presentation"},R?y?p.createElement(E,{...h.params}):p.createElement(E,{...h.params,ref:b}):null),p.createElement("div",{ref:C,"aria-hidden":l,className:F}))},sO=p.memo(tO),iO=({ctrl:e})=>{const{gos:t,context:s}=p.useContext(kt),{topOffset:i,rowHeight:n}=p.useMemo(()=>e.getTopAndHeight(),[]),o=p.useMemo(()=>t.get("tabIndex"),[]),[r,a]=p.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=p.useState(()=>n+"px"),[u,h]=p.useState(()=>i+"px"),g=p.useRef(null),[m,v]=p.useState(()=>e.getUpdatedHeaderCtrls()),C=p.useRef(),w=p.useRef(null),b=p.useCallback(S=>{if(w.current=S,!S||!e.isAlive()||s.isDestroyed()){C.current=s.destroyBean(C.current);return}C.current=s.createBean(new Go);const F={setHeight:R=>d(R),setTop:R=>h(R),setHeaderCtrls:(R,E,D)=>{const T=g.current,P=sc(T,R,E);P!==T&&(g.current=P,Zr(D,()=>v(P)))},setWidth:R=>{w.current&&(w.current.style.width=R)},setRowIndex:R=>{a(R)}};e.setComp(F,C.current,!1)},[]),x=p.useMemo(()=>({height:c,top:u}),[c,u]),y=p.useCallback(S=>{switch(e.type){case"group":return p.createElement(sO,{ctrl:S,key:S.instanceId});case"filter":return p.createElement(eO,{ctrl:S,key:S.instanceId});default:return p.createElement(XL,{ctrl:S,key:S.instanceId})}},[]);return p.createElement("div",{ref:b,className:l,role:"row",style:x,tabIndex:o,"aria-rowindex":r},m.map(y))},nO=p.memo(iO),oO=({pinned:e})=>{const[t,s]=p.useState(!0),[i,n]=p.useState([]),{context:o}=p.useContext(kt),r=p.useRef(null),a=p.useRef(null),l=p.useRef(),c=e==="left",d=e==="right",u=!c&&!d,h=p.useCallback(v=>{if(r.current=v,!v||o.isDestroyed()){l.current=o.destroyBean(l.current);return}l.current=o.createBean(new HF(e));const C={setDisplayed:s,setCtrls:w=>n(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(C,r.current)},[]),g=t?"":"ag-hidden",m=()=>i.map(v=>p.createElement(nO,{ctrl:v,key:v.instanceId}));return c?p.createElement("div",{ref:h,className:"ag-pinned-left-header "+g,"aria-hidden":!t,role:"rowgroup"},m()):d?p.createElement("div",{ref:h,className:"ag-pinned-right-header "+g,"aria-hidden":!t,role:"rowgroup"},m()):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"},m())):null},ou=p.memo(oO),rO=()=>{const[e,t]=p.useState(()=>new cs),[s,i]=p.useState(),{context:n}=p.useContext(kt),o=p.useRef(null),r=p.useRef(),a=p.useCallback(d=>{if(o.current=d,!d||n.isDestroyed()){r.current=n.destroyBean(r.current);return}r.current=n.createBean(new TF);const u={toggleCss:(h,g)=>t(m=>m.setClass(h,g)),setHeightAndMinHeight:h=>i(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(ou,{pinned:"left"}),p.createElement(ou,{pinned:null}),p.createElement(ou,{pinned:"right"}))},aO=p.memo(rO),lO=(e,t)=>{p.useEffect(()=>{const s=t.current;if(s){const i=s.parentElement;if(i){const n=document.createComment(e);return i.insertBefore(n,s),()=>{n.remove()}}}},[e])},Qi=lO,cO=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new Oe(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){Oc(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()}},dO=e=>{const t=p.useRef(e),s=p.useRef(),i=p.useRef(!1),n=p.useRef(!1),[,o]=p.useState(0);i.current&&(n.current=!0),p.useEffect(()=>(i.current||(s.current=t.current(),i.current=!0),o(r=>r+1),()=>{n.current&&s.current?.()}),[])},uO=e=>{const[t,s]=p.useState(),i=p.useContext(kt),{context:n,popupSvc:o,gos:r,editSvc:a}=i,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return dO(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let g,m;if(!n.isDestroyed()){m=n.createBean(a.createPopupEditorWrapper(u.params));const v=m.getGui();if(e.jsChildComp){const S=e.jsChildComp.getGui();S&&v.appendChild(S)}const{column:C,rowNode:w}=c,b={column:C,rowNode:w,type:"popupCellEditor",eventSource:d,ePopup:v,position:l.popupPosition,keepWithinBounds:!0},x=o?.positionPopupByComponent.bind(o,b),y=o?.addPopup({modal:h,eChild:v,closeOnEsc:!0,closedCallback:S=>{c.onPopupEditorClosed(S)},anchorToElement:d,positionCallback:x,ariaOwns:d});g=y?y.hideFunc:void 0,s(m),e.jsChildComp?.afterGuiAttached?.()}return()=>{g?.(),n.destroyBean(m)}}),p.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(et(i))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?Ao.createPortal(e.wrappedContent,t.getGui()):null},ym=p.memo(uO),hO=(e,t,s)=>{const{compProxy:i}=e;s(i);const n=i.getProps(),o=Bo(t);return p.createElement(Wp.Provider,{value:{setMethods:r=>i.setMethods(r)}},o?p.createElement(t,{...n}):p.createElement(t,{...n,ref:r=>i.setRef(r)}))},Sm=(e,t,s)=>e.compProxy?hO(e,t,s):p.createElement(t,{...e.compDetails.params,ref:s}),pO=(e,t,s,i,n)=>{const o=e.compDetails,r=o.componentClass,a=o.componentFromFramework&&!e.popup,l=o.componentFromFramework&&e.popup,c=!o.componentFromFramework&&e.popup;return a?Sm(e,r,t):l?p.createElement(ym,{editDetails:e,cellCtrl:i,eParentCell:s,wrappedContent:Sm(e,r,t)}):c&&n?p.createElement(ym,{editDetails:e,cellCtrl:i,eParentCell:s,jsChildComp:n}):null},gO=(e,t,s,i,n,o,r=!1)=>{const{context:a}=p.useContext(kt),l=p.useCallback(()=>{const c=n.current;if(!c)return;const d=c.getGui();d&&d.parentElement&&d.remove(),a.destroyBean(c),n.current=void 0},[]);p.useEffect(()=>{const c=e!=null&&!r,d=e?.compDetails&&!e.compDetails.componentFromFramework,u=t&&s==null;if(!(c&&d&&!u)){l();return}const g=e.compDetails;if(n.current){const v=n.current,w=v.refresh!=null&&e.force==!1?v.refresh(g.params):!1;if(w===!0||w===void 0)return;l()}g.newAgStackInstance().then(v=>{if(!v)return;const C=v.getGui();if(!C)return;(t?s:o.current).appendChild(C),n.current=v})},[e,t,i,r]),p.useEffect(()=>l,[])},U1=gO,fO=({cellCtrl:e,parent:t})=>{const s=p.useRef(),i=p.useMemo(()=>{const{loadingComp:n}=e.getDeferLoadingCellRenderer();return n?{value:void 0,compDetails:n,force:!1}:void 0},[e]);if(U1(i,!1,void 0,1,s,t),i?.compDetails?.componentFromFramework){const n=i.compDetails.componentClass;return p.createElement(n,{...i.compDetails.params})}return p.createElement(p.Fragment,null)},mO=({cellCtrl:e,printLayout:t,editingCell:s})=>{const i=p.useContext(kt),{context:n}=i,{column:{colIdSanitised:o},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),[m,v]=p.useState(),[C,w]=p.useState(!1),[b,x]=p.useState(!1),[y,S]=p.useState(!1),F=p.useRef(null),[R,E]=p.useState(),D=p.useMemo(()=>e.isForceWrapper(),[e]),T=p.useMemo(()=>e.getCellAriaRole(),[e]),P=p.useRef(null),k=p.useRef(null),A=p.useRef(null),U=p.useRef(),I=p.useRef(),H=p.useRef(),W=p.useRef([]),V=p.useRef(),Z=p.useRef(),[L,M]=p.useState(0),z=p.useCallback(ce=>{Z.current=ce,M(Se=>Se+1)},[]),K=l!=null&&(C||y||b)&&(d==null||!!d.popup),ie=D||K,we=p.useMemo(()=>e.getCellValueClass(),[e]),N=p.useCallback(ce=>{if(I.current=ce,ce){const Se=ce.isCancelBeforeStart&&ce.isCancelBeforeStart();setTimeout(()=>{Se?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(ce))})}},[e]),oe=p.useRef();oe.current||(oe.current=new sa(()=>P.current));const Te=!!d&&!d.popup;U1(l,ie,Z.current,L,U,P,Te);const ee=p.useRef();p.useLayoutEffect(()=>{const ce=ee.current,Se=l;if(ee.current=l,ce==null||ce.compDetails==null||Se==null||Se.compDetails==null)return;V.current?.refreshVisibility();const ke=ce.compDetails,Me=Se.compDetails;if(ke.componentClass!=Me.componentClass||A.current?.refresh==null)return;A.current.refresh(Me.params)!=!0&&g(Ne=>Ne+1)},[l]),p.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||n.isDestroyed())return;const Se=d.compDetails,ke=d.popup===!0,Me=Se.newAgStackInstance();return Me.then(be=>{if(!be)return;const Ne=be.getGui();N(be),ke||((D?H:P).current?.appendChild(Ne),be.afterGuiAttached?.()),E(be)}),()=>{Me.then(be=>{const Ne=be.getGui();e.disableEditorTooltipFeature(),n.destroyBean(be),N(void 0),E(void 0),Ne?.remove()})}},[d]);const le=p.useCallback(ce=>{if(H.current=ce,!ce||n.isDestroyed()||!e.isAlive()){const Me=W.current;W.current=[];for(const be of Me)be();return}let Se;const ke=Me=>{Me&&(ce.insertAdjacentElement("afterbegin",Me.getGui()),W.current.push(()=>{si(Me.getGui()),n.destroyBean(Me),V.current===Se&&(V.current=void 0)}))};C&&ke(e.createSelectionCheckbox()),y&&ke(e.createDndSource()),b&&(Se=e.createRowDragComp(),V.current=Se,Se&&(ke(Se),Se.refreshVisibility()))},[e,n,y,b,C]),$=p.useCallback(()=>{const ce=!e.isCellSpanning()||k.current,Se=P.current;if(!Se||!ce||!e||!e.isAlive()||n.isDestroyed()){a.current=n.destroyBean(a.current);return}a.current=n.createBean(new Go);const ke={toggleCss:(be,Ne)=>oe.current.toggleCss(be,Ne),setUserStyles:be=>v(be),getFocusableElement:()=>P.current,setIncludeSelection:be=>w(be),setIncludeRowDrag:be=>x(be),setIncludeDndSource:be=>S(be),setRowResizerElement:be=>{F.current&&si(F.current),F.current=be,be&&P.current&&P.current.appendChild(be)},getCellEditor:()=>I.current??null,getCellRenderer:()=>A.current??U.current,getParentOfValue:()=>Z.current??H.current??P.current,setRenderDetails:(be,Ne,Ve)=>{const St=()=>{c(_e=>_e?.compDetails!==be||_e?.value!==Ne||_e?.force!==Ve?{value:Ne,compDetails:be,force:Ve}:_e)};if(be?.params?.deferRender&&!e.rowNode.group){const{loadingComp:_e,onReady:Rt}=e.getDeferLoadingCellRenderer();if(_e){c({value:void 0,compDetails:_e,force:!1}),Rt.then(()=>PL(St));return}}St()},setEditDetails:(be,Ne,Ve,St)=>{if(be){let _e;be.componentFromFramework&&(St?_e=new cO(be.params,()=>g(Rt=>Rt+1)):jp()),u({compDetails:be,popup:Ne,popupPosition:Ve,compProxy:_e}),Ne||c(void 0)}else e.hasBrowserFocus()&&ke.getFocusableElement().focus({preventScroll:!0}),I.current=void 0,u(void 0)},refreshEditStyles:(be,Ne)=>{if(!P.current)return;const{current:Ve}=oe;Ve.toggleCss("ag-cell-value",!ie),Ve.toggleCss("ag-cell-inline-editing",!!be&&!Ne),Ve.toggleCss("ag-cell-popup-editing",!!be&&!!Ne),Ve.toggleCss("ag-cell-not-inline-editing",!be||!!Ne)}},Me=H.current||void 0;e.setComp(ke,Se,k.current??void 0,Me,t,s,a.current)},[]),he=p.useCallback(ce=>{P.current=ce,$()},[]),G=p.useCallback(ce=>{k.current=ce,$()},[]),ne=p.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&Bo(l.compDetails.componentClass)),[l]);p.useLayoutEffect(()=>{if(!P.current)return;const{current:ce}=oe;ce.toggleCss("ag-cell-value",!ie),ce.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),ce.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),ce.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});const pe=()=>{const{compDetails:ce,value:Se}=l;if(!ce)return Se?.toString?.()??Se;if(ce.componentFromFramework){const ke=ce.componentClass;return p.createElement(p.Suspense,{fallback:p.createElement(fO,{cellCtrl:e,parent:P})},ne?p.createElement(ke,{...ce.params,key:h}):p.createElement(ke,{...ce.params,key:h,ref:A}))}},Fe=()=>{const ce=()=>l==null?null:ie?p.createElement("span",{role:"presentation",id:`cell-${r}`,className:we,ref:z},pe()):pe(),Se=ke=>pO(ke,N,P.current,e,R);return d!=null?d.popup?p.createElement(p.Fragment,null,ce(),Se(d)):Se(d):ce()},Pe=()=>p.createElement("div",{ref:he,style:m,role:T,"col-id":o},ie?p.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:le},Fe()):Fe());return e.isCellSpanning()?p.createElement("div",{ref:G,className:"ag-spanned-cell-wrapper",role:"presentation"},Pe()):Pe()},vO=p.memo(mO),CO=({rowCtrl:e,containerType:t})=>{const{context:s,gos:i,editSvc:n}=p.useContext(kt),o=p.useContext(B1)==="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),[m,v]=p.useState(()=>e.businessKey),[C,w]=p.useState(()=>e.rowStyles),b=p.useRef(null),[x,y]=p.useState(()=>null),[S,F]=p.useState(),[R,E]=p.useState(()=>c?e.getInitialRowTop(t):void 0),[D,T]=p.useState(()=>c?e.getInitialTransform(t):void 0),P=p.useRef(null),k=p.useRef(),A=p.useRef(),U=p.useRef(!1),[I,H]=p.useState(0);p.useEffect(()=>{if(U.current||!S||I>10)return;const le=P.current?.firstChild;le?(e.setupDetailRowAutoHeight(le),U.current=!0):H($=>$+1)},[S,I]);const W=p.useRef();W.current||(W.current=new sa(()=>P.current));const V=p.useRef(()=>{}),Z=p.useCallback(le=>(V.current=le,()=>{V.current=()=>{}}),[]),L=TL(Z,()=>b.current,[]),M=o?L:x,z=p.useCallback(le=>{if(P.current=le,r.current=le?s.createBean(new Go):s.destroyBean(r.current),!le){e.unsetComp(t);return}if(!e.isAlive()||s.isDestroyed())return;const $={setTop:E,setTransform:T,toggleCss:(he,G)=>W.current.toggleCss(he,G),setDomOrder:he=>a.current=he,setRowIndex:u,setRowId:g,setRowBusinessKey:v,setUserStyles:w,setCellCtrls:(he,G)=>{const ne=b.current,pe=sc(ne,he,a.current);pe!==ne&&(b.current=pe,o?V.current():Zr(G,()=>y(pe)))},showFullWidth:he=>{A.current=he.params,F(he)},getFullWidthCellRenderer:()=>k.current,getFullWidthCellRendererParams:()=>A.current,refreshFullWidth:he=>{const G=he();return A.current=G,oe.current?(F(ne=>({...ne,params:G})),!0):!k.current||!k.current.refresh?!1:k.current.refresh(G)}};e.setComp($,le,t,r.current)},[]);p.useLayoutEffect(()=>ca(S,s,P.current,k),[S]);const K=p.useMemo(()=>{const le={top:R,transform:D};return Object.assign(le,C),le},[R,D,C]),ie=l&&S?.componentFromFramework,we=!l&&M!=null,N=p.useMemo(()=>!!(S?.componentFromFramework&&Bo(S.componentClass)),[S]),oe=p.useRef(!1);p.useEffect(()=>{oe.current=N&&!!S&&!!i.get("reactiveCustomComponents")},[N,S]);const Te=()=>M?.map(le=>p.createElement(vO,{cellCtrl:le,editingCell:n?.isEditing(le,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:le.instanceId})),ee=()=>{const le=S.componentClass;return N?p.createElement(le,{...S.params}):p.createElement(le,{...S.params,ref:k})};return p.createElement("div",{ref:z,role:"row",style:K,"row-index":d,"row-id":h,"row-business-key":m},we?Te():ie?ee():null)},Rm=p.memo(CO),wO=({name:e})=>{const{context:t,gos:s}=p.useContext(kt),i=p.useMemo(()=>ra(e),[e]),n=p.useRef(null),o=p.useRef(null),r=p.useRef(null),a=p.useRef([]),l=p.useRef([]),[c,d]=p.useState(()=>[]),u=!!s.get("enableCellSpan")&&!!i.getSpannedRowCtrls,h=p.useRef([]),g=p.useRef([]),[m,v]=p.useState(()=>[]),C=p.useRef(!1),w=p.useRef(),b=p.useMemo(()=>is("ag-viewport",KC(e)),[e]),x=p.useMemo(()=>is(YC(e)),[e]),y=p.useMemo(()=>is("ag-spanning-container",QF(e)),[e]),S=i.type==="center"||u,F=S?n:o;Qi(" AG Row Container "+e+" ",F);const R=p.useCallback(()=>{const I=!S||n.current!=null,H=o.current!=null,W=!u||r.current!=null;return I&&H&&W},[]),E=p.useCallback(()=>n.current==null&&o.current==null&&r.current==null,[]),D=p.useCallback(()=>{if(E()&&(w.current=t.destroyBean(w.current)),!t.isDestroyed()&&R()){const I=V=>{const Z=sc(l.current,a.current,C.current);Z!==l.current&&(l.current=Z,Zr(V,()=>d(Z)))},H=V=>{const Z=sc(g.current,h.current,C.current);Z!==g.current&&(g.current=Z,Zr(V,()=>v(Z)))},W={setHorizontalScroll:V=>{n.current&&(n.current.scrollLeft=V)},setViewportHeight:V=>{n.current&&(n.current.style.height=V)},setRowCtrls:({rowCtrls:V,useFlushSync:Z})=>{const L=!!Z&&a.current.length>0&&V.length>0;a.current=V,I(L)},setSpannedRowCtrls:(V,Z)=>{const L=!!Z&&h.current.length>0&&V.length>0;h.current=V,H(L)},setDomOrder:V=>{C.current!=V&&(C.current=V,I(!1))},setContainerWidth:V=>{o.current&&(o.current.style.width=V)},setOffsetTop:V=>{o.current&&(o.current.style.transform=`translateY(${V})`)}};w.current=t.createBean(new lE(e)),w.current.setComp(W,o.current,r.current??void 0,n.current)}},[R,E]),T=p.useCallback(I=>{o.current=I,D()},[D]),P=p.useCallback(I=>{r.current=I,D()},[D]),k=p.useCallback(I=>{n.current=I,D()},[D]),A=()=>p.createElement("div",{className:x,ref:T,role:S?"presentation":"rowgroup"},c.map(I=>p.createElement(Rm,{rowCtrl:I,containerType:i.type,key:I.instanceId})));if(!S)return A();const U=()=>p.createElement("div",{className:y,ref:P,role:"presentation"},m.map(I=>p.createElement(Rm,{rowCtrl:I,containerType:i.type,key:I.instanceId})));return p.createElement("div",{className:b,ref:k,role:"rowgroup"},A(),u?U():null)},bO=p.memo(wO),xO=()=>{const e=p.useContext(kt),{context:t,overlays:s}=e,[i,n]=p.useState(""),[o,r]=p.useState(0),[a,l]=p.useState(0),[c,d]=p.useState("0px"),[u,h]=p.useState("0px"),[g,m]=p.useState("100%"),[v,C]=p.useState("0px"),[w,b]=p.useState("0px"),[x,y]=p.useState("100%"),[S,F]=p.useState(!0),[R,E]=p.useState(!0),[D,T]=p.useState(null),[P,k]=p.useState(""),[A,U]=p.useState(null),[I,H]=p.useState("ag-layout-normal"),W=p.useRef();W.current||(W.current=new sa(()=>V.current));const V=p.useRef(null),Z=p.useRef(null),L=p.useRef(null),M=p.useRef(null),z=p.useRef(null),K=p.useRef(null),ie=p.useRef(null),we=p.useRef([]),N=p.useRef([]);Qi(" AG Grid Body ",V),Qi(" AG Pinned Top ",Z),Qi(" AG Sticky Top ",L),Qi(" AG Middle ",K),Qi(" AG Pinned Bottom ",ie);const oe=p.useCallback(Me=>{if(V.current=Me,!Me||t.isDestroyed()){we.current=t.destroyBeans(we.current);for(const _ of N.current)_();N.current=[];return}const be=(_,Ee)=>{_.appendChild(Ee),N.current.push(()=>Ee.remove())},Ne=_=>{const Ee=t.createBean(new _);return we.current.push(Ee),Ee},Ve=(_,Ee,Ft)=>{be(_,document.createComment(Ft)),be(_,Ne(Ee).getGui())};Ve(Me,BF," AG Fake Horizontal Scroll ");const St=s?.getOverlayWrapperCompClass();St&&Ve(Me,St," AG Overlay Wrapper "),z.current&&Ve(z.current,zF," AG Fake Vertical Scroll ");const _e={setRowAnimationCssOnBodyViewport:n,setColumnCount:_=>{V.current&&x2(V.current,_)},setRowCount:_=>{V.current&&w2(V.current,_)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:m,setTopInvisible:F,setBottomInvisible:E,setColumnMovingCss:(_,Ee)=>W.current.toggleCss(_,Ee),updateLayoutClasses:H,setAlwaysVerticalScrollClass:T,setPinnedTopBottomOverflowY:k,setCellSelectableCss:(_,Ee)=>U(Ee?_:null),setBodyViewportWidth:_=>{K.current&&(K.current.style.width=_)},registerBodyViewportResizeListener:_=>{if(K.current){const Ee=ri(e,K.current,_);N.current.push(()=>Ee())}},setStickyBottomHeight:C,setStickyBottomBottom:b,setStickyBottomWidth:y,setGridRootRole:_=>Me.setAttribute("role",_)},Rt=t.createBean(new hE);we.current.push(Rt),Rt.setComp(_e,Me,K.current,Z.current,ie.current,L.current,M.current)},[]),Te=p.useMemo(()=>is("ag-root","ag-unselectable",I),[I]),ee=p.useMemo(()=>is("ag-body-viewport",i,I,D,A),[i,I,D,A]),le=p.useMemo(()=>is("ag-body",I),[I]),$=p.useMemo(()=>is("ag-floating-top",S?"ag-invisible":null,A),[A,S]),he=p.useMemo(()=>is("ag-sticky-top",A),[A]),G=p.useMemo(()=>is("ag-sticky-bottom",v==="0px"?"ag-invisible":null,A),[A,v]),ne=p.useMemo(()=>is("ag-floating-bottom",R?"ag-invisible":null,A),[A,R]),pe=p.useMemo(()=>({height:o,minHeight:o,overflowY:P}),[o,P]),Fe=p.useMemo(()=>({height:c,top:u,width:g}),[c,u,g]),Pe=p.useMemo(()=>({height:v,bottom:w,width:x}),[v,w,x]),ce=p.useMemo(()=>({height:a,minHeight:a,overflowY:P}),[a,P]),Se=Me=>p.createElement(bO,{name:Me,key:`${Me}-container`}),ke=({section:Me,children:be,className:Ne,style:Ve})=>p.createElement("div",{ref:Me,className:Ne,role:"presentation",style:Ve},be.map(Se));return p.createElement("div",{ref:oe,className:Te},p.createElement(aO,null),ke({section:Z,className:$,style:pe,children:["topLeft","topCenter","topRight","topFullWidth"]}),p.createElement("div",{className:le,ref:z,role:"presentation"},ke({section:K,className:ee,children:["left","center","right","fullWidth"]})),ke({section:L,className:he,style:Fe,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),ke({section:M,className:G,style:Pe,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),ke({section:ie,className:ne,style:ce,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},yO=p.memo(xO),SO=(e,t)=>{const{children:s,eFocusableElement:i,onTabKeyDown:n,gridCtrl:o,forceFocusOutWhenTabGuardsAreEmpty:r,isEmpty:a}=e,{context:l}=p.useContext(kt),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 x of[c,d])b===void 0?x.current?.removeAttribute("tabindex"):x.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 x={setTabIndex:h};u.current=l.createBean(new FL({comp:x,eTopGuard:w,eBottomGuard:b,eFocusableElement:i,onTabKeyDown:n,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:y=>o.focusInnerElement(y),isEmpty:a}))}},[]),m=p.useCallback(w=>{c.current=w,g()},[g]),v=p.useCallback(w=>{d.current=w,g()},[g]),C=w=>{const b=w==="top"?Co.TAB_GUARD_TOP:Co.TAB_GUARD_BOTTOM;return p.createElement("div",{className:`${Co.TAB_GUARD} ${b}`,role:"presentation",ref:w==="top"?m:v})};return p.createElement(p.Fragment,null,C("top"),s,C("bottom"))},RO=p.forwardRef(SO),FO=p.memo(RO),EO=({context:e})=>{const[t,s]=p.useState(""),[i,n]=p.useState(""),[o,r]=p.useState(null),[a,l]=p.useState(null),[c,d]=p.useState(!1),[u,h]=p.useState(),g=p.useRef(),m=p.useRef(null),v=p.useRef(),[C,w]=p.useState(null),b=p.useRef(()=>{}),x=p.useRef(),y=p.useRef([]),S=p.useCallback(()=>{},[]);Qi(" AG Grid ",m);const F=p.useCallback(k=>{if(m.current=k,g.current=k?e.createBean(new vE):e.destroyBean(g.current),!k||e.isDestroyed())return;const A=g.current;b.current=A.focusInnerElement.bind(A);const U={destroyGridUi:()=>{},setRtlClass:s,forceFocusOutOfContainer:I=>{if(!I&&x.current?.isDisplayed()){x.current.forceFocusOutOfContainer(I);return}v.current?.forceFocusOutOfContainer(I)},updateLayoutClasses:n,getFocusableContainers:()=>{const I=[],H=[],W=m.current?.querySelector(".ag-root");for(const Z of y.current){if(!Z.isDisplayed())continue;const L=Z.getFocusableContainerName();if(L==="rowGroupToolbar"||L==="pivotToolbar"){I.push(Z);continue}H.push(Z)}const V=[...I];return W&&V.push({getGui:()=>W,getFocusableContainerName:()=>"gridBody"}),V.push(...H),V},setCursor:r,setUserSelect:l};A.setComp(U,k,k),d(!0)},[]);p.useEffect(()=>{const k=g.current,A=m.current;if(!u||!k||!C||!A||e.isDestroyed())return;const U=[];y.current=[],x.current=void 0;const{watermarkSelector:I,paginationSelector:H,sideBarSelector:W,statusBarSelector:V,gridHeaderDropZonesSelector:Z}=k.getOptionalSelectors(),L=[];if(Z){const z=e.createBean(new Z.component),K=z.getGui();A.insertAdjacentElement("afterbegin",K),L.push(K),U.push(z),y.current.push(...z.getFocusableContainers?.()??[])}if(W){const z=e.createBean(new W.component),K=z.getGui(),ie=C.querySelector(".ag-tab-guard-bottom");ie&&(ie.insertAdjacentElement("beforebegin",K),L.push(K)),U.push(z),y.current.push(z)}const M=z=>{const K=e.createBean(new z),ie=K.getGui();return A.insertAdjacentElement("beforeend",ie),L.push(ie),U.push(K),K};if(V){const z=M(V.component);y.current.push(z)}if(H){const z=M(H.component);x.current=z,y.current.push(z)}return I&&M(I.component),()=>{e.destroyBeans(U),y.current=[],x.current=void 0;for(const z of L)z.remove()}},[u,C,e]);const R=p.useMemo(()=>is("ag-root-wrapper",t,i),[t,i]),E=p.useMemo(()=>is("ag-root-wrapper-body","ag-focus-managed",i),[i]),D=p.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:o??""}),[a,o]),T=p.useCallback(k=>{v.current=k,h(k!==null)},[]),P=p.useCallback(()=>!g.current?.isFocusable(),[]);return p.createElement("div",{ref:F,className:R,style:D,role:"presentation"},p.createElement("div",{className:E,ref:w,role:"presentation"},c&&C&&!e.isDestroyed()&&p.createElement(kt.Provider,{value:e.getBeans()},p.createElement(FO,{ref:T,eFocusableElement:C,onTabKeyDown:S,gridCtrl:g.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:P},p.createElement(yO,null)))))},DO=p.memo(EO),PO=class extends B{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))}},TO=typeof window>"u"?p.useEffect:p.useLayoutEffect,$1={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},kO={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...$1},q1=new Set(Object.keys(kO)),IO=new Set(Object.keys($1)),K1=e=>{const t=p.useContext(KL),s=p.useContext(YL),i=p.useRef(),n=p.useRef(null),o=p.useRef(null),r=p.useRef([]),a=p.useRef([]),l=p.useRef(e),c=p.useRef(),d=p.useRef(),u=p.useRef(!1),[h,g]=p.useState(void 0),[,m]=p.useState(0),v=p.useRef(),C=S=>{const F=n.current?.classList,R=(E="")=>E.trim().split(/\s+/g).filter(Boolean);if(v.current!==S){for(const E of R(v.current))F?.contains(E)&&F.remove(E);for(const E of R(S))F?.contains(E)||F?.add(E);v.current=S}};TO(()=>{C(e.className)},[e.className]);const w=p.useCallback(S=>{if(n.current=S,C(e.className),!S){for(const I of r.current)I();r.current.length=0;return}const F=[...e.modules??[],...t??[]];s&&Jv(F)?.setLicenseKey(s),o.current||(o.current=new qL(()=>m(I=>I+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),r.current.push(()=>{o.current?.destroy(),o.current=null}));const R=ER(e.gridOptions,e,Object.keys(e).filter(I=>!q1.has(I))),E=()=>{if(u.current){const I=()=>c.current?.shouldQueueUpdates()?void 0:a.current.shift();let H=I();for(;H;)H(),H=I()}},D=new OO(E);c.current=D;const T=new PO,P={providedBeanInstances:{frameworkCompWrapper:new AO(o.current,R),renderStatus:T},modules:F,frameworkOverrides:D,setThemeOnGridDiv:!0},k=I=>{g(I),I.createBean(T),r.current.push(()=>{I.destroy()}),I.getBean("ctrlsSvc").whenReady({addDestroyFunc:H=>{r.current.push(H)}},()=>{if(I.isDestroyed())return;const H=i.current;H&&e.passGridApi?.(H)})},A=I=>{I.getBean("ctrlsSvc").whenReady({addDestroyFunc:H=>{r.current.push(H)}},()=>{for(const H of a.current)H();a.current.length=0,u.current=!0})},U=new pk;R.gridId??(R.gridId=d.current),i.current=U.create(S,R,k,A,P),r.current.push(()=>{i.current=void 0}),i.current&&(d.current=i.current.getGridId())},[]),b=p.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),x=p.useCallback(S=>{u.current&&!c.current?.shouldQueueUpdates()?S():a.current.push(S)},[]);p.useEffect(()=>{const S=MO(l.current,e);l.current=e,x(()=>{i.current&&DR(S,i.current)})},[e]);const y=!p.useSyncExternalStore||gl(e,"renderingMode")==="legacy"?"legacy":"default";return p.createElement("div",{style:b,ref:w},p.createElement(B1.Provider,{value:y},h&&!h.isDestroyed()?p.createElement(DO,{key:h.instanceId,context:h}):null,o.current?.getPortals()??null))};function MO(e,t){const s={};for(const i of Object.keys(t)){if(q1.has(i)){IO.has(i)&&q(274,{prop:i});continue}const n=t[i];e[i]!==n&&(s[i]=n)}return s}var AO=class extends RL{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const s=this.gridOptions;if(gl(s,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return gl(s,"enableFilterHandlers")?GL:HL;case"floatingFilterComponent":return gl(s,"enableFilterHandlers")?zL:VL;case"dateComponent":return OL;case"dragAndDropImageComponent":return NL;case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":return LL;case"statusPanel":return _L;case"toolPanel":return UL;case"menuItem":return jL;case"cellRenderer":return AL;case"innerHeaderComponent":return WL}})(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"activeOverlay":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":jp();break}const n=!t.cellRenderer&&t.name!=="toolPanel";return new j1(e,this.parent,t,n)}},LO=p.forwardRef((e,t)=>{const s=p.useContext(kt),{registry:i,context:n,gos:o,rowModel:r}=s,[a,l]=p.useState(()=>new cs),[c,d]=p.useState(()=>new cs),[u,h]=p.useState(),[g,m]=p.useState(),v=p.useRef(),C=p.useRef(null),w=p.useRef(),b=p.useMemo(()=>sR(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),x=p.useMemo(()=>a.toString()+" ag-details-row",[a]),y=p.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&p.useImperativeHandle(t,()=>({refresh(){return v.current?.refresh()??!1}})),e.template&&q(230);const S=p.useCallback(R=>{if(C.current=R,!R||n.isDestroyed()){v.current=n.destroyBean(v.current),w.current?.();return}const E={toggleCss:(T,P)=>l(k=>k.setClass(T,P)),toggleDetailGridCss:(T,P)=>d(k=>k.setClass(T,P)),setDetailGrid:T=>h(T),setRowData:T=>m(T),getGui:()=>C.current},D=i.createDynamicBean("detailCellRendererCtrl",!0);if(D&&(n.createBean(D),D.init(E,e),v.current=D,o.get("detailRowAutoHeight"))){const T=()=>{if(C.current==null)return;const P=C.current.clientHeight;P!=null&&P>0&&setTimeout(()=>{e.node.setRowHeight(P),(it(o)||No(o))&&r.onRowHeightChanged()},0)};w.current=ri(s,R,T),T()}},[]),F=p.useCallback(R=>{v.current?.registerDetailWithMaster(R)},[]);return p.createElement("div",{className:x,ref:S},u&&p.createElement(K1,{className:y,...u,modules:b,rowData:g,passGridApi:F}))}),OO=class extends Xw{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:bm,agGroupRowRenderer:bm,agDetailCellRenderer:LO},this.wrapIncoming=(t,s)=>s==="ensureVisible"?DL(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 EL()}},NO=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(K1,{...this.props,passGridApi:this.setGridApi})}},Y1=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(Y1||{}),Kt=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(Kt||{}),Io=(e=>(e.Item="item",e.Divider="divider",e.PlainText="plainText",e))(Io||{});const HO=ae("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),GO=ae("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none"),ph=ae("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-text h-[34px] rounded text-primary"),gh="opacity-75 !cursor-not-allowed",Z1="text-error",BO="my-1 border-t border-hover border-secondary",so=4,VO=f.jsx(j.IconChevronRight,{size:14}),_p=({ariaLabel:e,className:t,size:s=24,onClose:i,...n})=>f.jsx(Gs,{"aria-label":e,className:J("text-secondary hover:enabled:text-accent-primary",t,"w-auto h-auto"),onClick:i,icon:f.jsx(j.IconX,{size:s}),...n});function X1(e,t="menu",s=!1){const[i,n]=p.useState(!1),{refs:o,floatingStyles:r,context:a}=De.useFloating({placement:"right-start",open:i,onOpenChange:n,whileElementsMounted:De.autoUpdate,middleware:[De.offset({mainAxis:0,crossAxis:-4}),De.flip({padding:e}),De.shift({padding:e})]}),l=De.useHover(a,{enabled:!s,move:!1,delay:{open:80,close:80}}),c=De.useDismiss(a,{bubbles:!0}),d=De.useRole(a,{role:t}),{getReferenceProps:u,getFloatingProps:h}=De.useInteractions([l,c,d]);return{isOpen:i,refs:o,floatingStyles:r,context:a,getReferenceProps:u,getFloatingProps:h}}const Q1=({refs:e,floatingStyles:t,context:s,getFloatingProps:i,role:n,className:o,children:r})=>f.jsx(De.FloatingPortal,{children:f.jsx(De.FloatingFocusManager,{context:s,modal:!1,initialFocus:-1,returnFocus:!1,children:f.jsx("div",{ref:e.setFloating,style:t,role:n,className:ae("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none",o),...i(),children:r})})}),zO=({item:e,onRootClose:t})=>{const{isOpen:s,refs:i,floatingStyles:n,context:o,getReferenceProps:r,getFloatingProps:a}=X1(so,"menu",!!e.disabled),l=p.useCallback(c=>d=>{c.disabled||(c.onClick?.({key:c.key,domEvent:d}),t())},[t]);return f.jsxs(f.Fragment,{children:[f.jsxs("button",{ref:i.setReference,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":s,"aria-disabled":!!e.disabled,disabled:e.disabled,className:ae(ph,e.disabled&&gh,e.className),...r(),children:[e.icon&&f.jsx("span",{className:ae(e.disabled&&"text-secondary"),children:f.jsx(Be,{icon:e.icon})}),f.jsx("span",{className:ae("flex-1 truncate text-left",e.disabled&&"text-secondary"),children:e.label}),f.jsx("span",{className:ae("ml-auto shrink-0",e.disabled&&"text-secondary"),children:VO})]}),s&&f.jsx(Q1,{refs:i,floatingStyles:n,context:o,getFloatingProps:a,role:"menu",className:"w-max",children:f.jsx("div",{role:"none",className:"py-1",children:e.children.map(c=>f.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!c.disabled,disabled:c.disabled,className:ae(ph,c.disabled&&gh,c.danger&&Z1,c.className),onClick:l(c),children:[c.icon&&f.jsx("span",{className:ae(c.danger&&"text-error",c.disabled&&"text-secondary"),children:f.jsx(Be,{icon:c.icon})}),f.jsx("span",{className:ae("flex-1 truncate text-left",c.danger&&"text-error",c.disabled&&"text-secondary"),children:c.label})]},c.key))})})]})},WO=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,Tt=({children:e,menu:t,renderOverlay:s,trigger:i=[Kt.Click],placement:n,disabled:o=!1,open:r,defaultOpen:a=!1,onOpenChange:l,closable:c=!1,onClose:d,className:u,listClassName:h,outsidePressIgnoreRef:g,outsideClosable:m=!0,allowedPlacements:v,anchorToMouse:C=!1,matchReferenceWidth:w=!0,maxDropdownHeight:b})=>{const[x,y]=p.useState(a),S=r!==void 0,F=S?!!r:x,R=p.useRef(null),E=p.useCallback(N=>{S||y(N),l?.(N)},[S,l]),D=p.useId(),T=n===void 0,{refs:P,floatingStyles:k,context:A}=De.useFloating({placement:n,open:F,onOpenChange:E,whileElementsMounted:De.autoUpdate,middleware:[De.offset({mainAxis:so,crossAxis:0}),T?De.autoPlacement({alignment:"start",crossAxis:!0,padding:so,allowedPlacements:v}):De.flip({padding:so}),De.shift({padding:so}),De.size({padding:so,apply({availableWidth:N,availableHeight:oe,elements:Te}){const ee=Te.floating,le=WO(Te.reference);ee.style.setProperty("--fui-available-height",`${Math.floor(oe)}px`),ee.style.setProperty("--reference-width",w?`${Math.round(le)}px`:"0px"),w?ee.style.minWidth=`${Math.round(le)}px`:ee.style.removeProperty("min-width"),ee.style.maxWidth=`${Math.floor(N)}px`;const $=Math.floor(oe);ee.style.maxHeight=`${b?Math.min($,b):$}px`}})]}),U=De.useClick(A,{enabled:i.includes(Kt.Click)&&!o}),I=De.useHover(A,{enabled:i.includes(Kt.Hover)&&!o,move:!1,restMs:40,delay:{open:80,close:80}}),H=De.useDismiss(A,{bubbles:!0,referencePress:!1,outsidePress:N=>{if(!m)return!1;const oe=N.target;return!(g?.current&&oe instanceof Node&&g.current.contains(oe))}}),W=De.useRole(A,{role:"menu"}),{getReferenceProps:V,getFloatingProps:Z}=De.useInteractions([U,I,H,W]),L=p.useCallback((N,oe)=>{P.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:N,y:oe,top:oe,left:N,right:N,bottom:oe})})},[P]),M=p.useCallback(N=>{!i.includes(Kt.ContextMenu)||o||(N.preventDefault(),C&&(L(N.clientX,N.clientY),R.current=document.elementFromPoint(N.clientX,N.clientY)),E(!0))},[C,o,E,L,i]),z=p.useCallback(N=>{!C||o||(i.includes(Kt.ContextMenu)&&F&&E(!1),L(N.clientX,N.clientY),R.current=document.elementFromPoint(N.clientX,N.clientY))},[C,o,L,F,i,E]);p.useEffect(()=>{o&&F&&E(!1)},[o,F,E]);const K=p.useCallback(N=>oe=>{N.disabled||(N.onClick?.({key:N.key,domEvent:oe}),t?.onClick?.({key:N.key,domEvent:oe}),E(!1))},[t,E]),ie=p.useMemo(()=>s?s():t?f.jsxs(f.Fragment,{children:[t.header&&f.jsx(f.Fragment,{children:typeof t.header=="function"?t.header():t.header}),f.jsx("div",{role:"none",className:"py-1","aria-label":"dropdown",children:t.items.map(N=>N.type===Io.Divider?f.jsx("div",{role:"separator",className:BO},N.key):N.type===Io.PlainText?f.jsx("div",{className:J("px-3 py-2 text-secondary dial-caption",N.className),children:N.label},N.key):N.children?.length?f.jsx(zO,{item:N,onRootClose:()=>E(!1)},N.key):f.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!N.disabled,className:ae(ph,N.disabled&&gh,N.danger&&Z1,N.className),disabled:N.disabled,onClick:K(N),children:[N.icon&&f.jsx("span",{className:ae(N.danger&&"text-error",N.disabled&&"text-secondary"),children:f.jsx(Be,{icon:N.icon})}),f.jsx("span",{className:ae("flex-1 truncate text-left",N.danger&&"text-error",N.disabled&&"text-secondary"),"aria-labelledby":"item-text",children:N.label})]},N.key))}),t.footer&&f.jsx(f.Fragment,{children:typeof t.footer=="function"?t.footer():t.footer})]}):null,[K,t,s,E]),we=V({onContextMenu:M,onMouseDown:z});return p.useEffect(()=>{if(!F)return;const N=P.reference.current;let oe=null;if(N instanceof Element?oe=N:R.current instanceof Element&&(oe=R.current),!oe)return;const Te=new IntersectionObserver(([ee])=>{ee.isIntersecting||E(!1)},{root:null,threshold:0});return Te.observe(oe),()=>Te.disconnect()},[F,P.reference,E]),f.jsxs(f.Fragment,{children:[f.jsx("span",{ref:P.setReference,className:ae(HO,o&&"!cursor-not-allowed opacity-75",u),"aria-haspopup":"menu","aria-expanded":F,"aria-controls":D,...we,children:e}),F&&f.jsx(De.FloatingPortal,{children:f.jsx(De.FloatingFocusManager,{context:A,modal:!1,initialFocus:-1,returnFocus:!0,children:f.jsxs("div",{id:D,ref:P.setFloating,style:k,className:ae(GO,!w&&"w-max",h),...Z(),children:[c&&f.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:f.jsx(_p,{ariaLabel:"Close dropdown",onClose:N=>{d?.(N),E(!1)}})}),ie]})})})]})},jO="h-full w-full",Fm=".ag-checkbox-input",ru={accentColor:"var(--controls-bg-accent, #5C8DEA)",backgroundColor:"var(--bg-layer-3, #1D2439)",oddRowBackgroundColor:"var(--bg-layer-2, #161B2D)",selectedRowBackgroundColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderColor:"var(--bg-layer-4, #242C42)",rowBorder:"1px solid var(--stroke-tertiary, #0C101D)",rowHoverColor:"var(--bg-accent-primary-alpha, #7DA4FF26)",borderRadius:3,browserColorScheme:"dark",chromeBackgroundColor:"var(--bg-layer-1, #0C101D)",foregroundColor:"var(--text-primary, #EEF1F7)",headerFontSize:14,headerFontWeight:600,headerTextColor:"var(--text-secondary, #7F8792)",spacing:4,wrapperBorderRadius:3,fontSize:14,fontFamily:"var(--theme-font, var(--font-inter))"},Em=40;var Zi=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(Zi||{});const _O=(e,t,s,i,n)=>{const o=typeof e=="string"?e.toLowerCase():e,r=typeof t=="string"?t.toLowerCase():t;return o===r?0:o?r?o>r?1:-1:n?1:-1:n?-1:1};var Ar=(e=>(e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e))(Ar||{});const J1="en-US",eb={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},UO="text-primary",au=40,tb={minWidth:au,width:au,maxWidth:au},$O={cellClass:"ag-grid-no-checkbox",...tb},qO={...tb};function KO(e,t){let s=null;return(...i)=>{s&&clearTimeout(s),s=setTimeout(()=>e(...i),t)}}var Si=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(Si||{});const Dm=()=>typeof window<"u"&&window.innerWidth<1279,Pm=()=>typeof window<"u"&&window.innerWidth<640,lu=()=>{if(typeof window>"u")return Si.Undefined;const e=window.innerWidth;return e>=1024?Si.Desktop:e<640?Si.Mobile:Si.Tablet},Nc=()=>{const[e,t]=p.useState(Pm());return p.useEffect(()=>{const s=()=>t(Pm());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},YO=()=>{const[e,t]=p.useState(Dm());return p.useEffect(()=>{const s=()=>t(Dm());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e};SL({testIdAttribute:"dataQA"});Qv.registerModules([vL]);const Up=({columnDefs:e,rowData:t,additionalGridOptions:s,getContextMenuItems:i,className:n,ariaLabel:o="Data grid",wrapCustomCellRenderers:r=!0,disabledRowIds:a,selectedRowIds:l,onSelectionChange:c,onGridApiChange:d,getRowId:u=F=>String(F.id??JSON.stringify(F)),alternateOddRowColors:h=!1,filterPlaceholder:g="Enter value",emptyStateIcon:m,emptyStateTitle:v="No results found",emptyStateDescription:C="Sorry, we couldn't find any results for your search.",loading:w=!1,wrapperBorder:b=!0,withoutHeaderBorders:x=!1,allowDisabledContextMenu:y=!1,selectionMode:S})=>{const[F,R]=p.useState(),E=p.useId(),D=Nc(),T=YO(),P=p.useRef(new Set),k=p.useRef(void 0),A=p.useMemo(()=>({...ru,oddRowBackgroundColor:h?ru.oddRowBackgroundColor:ru.backgroundColor,wrapperBorder:b}),[h,b]),U=p.useCallback($=>{$.api.sizeColumnsToFit()},[]),I=p.useCallback($=>{if($.data){const he=u($.data),G=a?.has(he)??!1,ne=G&&!y,pe=$.value==null?"":String($.value),Fe=i?.($.data)??[];return f.jsx(Tt,{trigger:[Kt.ContextMenu],menu:{items:Fe},anchorToMouse:!0,matchReferenceWidth:!0,className:"w-full",disabled:ne,children:f.jsx("span",{className:"block min-w-0 h-full max-w-full",children:f.jsx(vt,{text:pe,className:"max-w-full h-full",hideTooltip:G})})})}},[i,a,u,y]),H=p.useCallback($=>$===Zi.API||$===Zi.ROW_DATA_CHANGED,[]),W=p.useCallback($=>{if(!F)return;const G=($.selectedNodes||[]).map(pe=>pe.data),ne=new Set(G.map(u));P.current=ne,k.current=$.source,H($.source)||c?.(ne,G)},[F,u,H,c]),V=p.useMemo(()=>KO($=>W?.($),100),[W]),Z=p.useCallback($=>{if(!$.data)return null;const he=u($.data),G=$.node.isSelected(),ne=a?.has(he),pe=`row-select-${he}`;return f.jsx("div",{className:"size-6 flex items-center justify-center",children:f.jsx(nn,{className:"size-[18px]",inputId:pe,checked:G,disabled:ne,name:"gridradiobutton",value:"selected",onChange:()=>{ne||($.node.setSelected(!0,!0,Zi.CHECKBOX_SELECTED),$.api.refreshCells({columns:[$.column?.getColId()]}))}})})},[u,a]),L=p.useCallback(()=>{const $="dial-row-select",he="dial-row-select-visible";return D||T||l&&l.size>0?`${$} ${he}`:!l||l.size===0?$:`${$} ${he}`},[D,T,l]),M=p.useCallback(()=>D||T?L():!l||l.size===0?"dial-row-not-select-header":L(),[L,D,T,l]),z=p.useMemo(()=>{if(S===Ar.SINGLE)return{...$O,cellRenderer:Z};if(S===Ar.MULTIPLE)return{...qO,headerClass:()=>M(),cellClass:$=>{const he=$.data?u($.data):null;let G=L();return he&&a?.has(he)&&(G+=" opacity-50 pointer-events-none"),G}}},[S,Z,M,u,L,a]),K=p.useCallback($=>{const he=typeof r=="function"?r($):!!r;if(!$.cellRenderer)return{...$,cellRenderer:I};if(!he)return $;const G=$.cellRenderer;return{...$,cellRenderer:pe=>{const Fe=pe.data?i?.(pe.data)??[]:[];let Pe=null;if(typeof G=="function"){const ke=G;Pe=f.jsx(ke,{...pe})}else Pe=I(pe);const ce=pe.data?u(pe.data):null,Se=ce?a?.has(ce):!1;return f.jsx(Tt,{trigger:[Kt.ContextMenu],menu:{items:Fe},anchorToMouse:!0,matchReferenceWidth:!0,className:ae("w-full h-full",Se&&"!cursor-not-allowed opacity-75"),disabled:Se&&!y,children:f.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:Pe})})}}},[a,i,u,I,r,y]),ie=p.useMemo(()=>r?(e??[]).map(K):e??[],[e,r,r?K:null]),we=p.useMemo(()=>({minWidth:150,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:g,buttons:["reset"]},comparator:_O.bind(void 0)}),[g]),N=$=>{const he=document.querySelector(Fm);he&&he.setAttribute("aria-description",xu);const G=ie.map(ne=>({...ne,sort:void 0}));$.api.updateGridOptions({columnDefs:G,rowData:t}),$.api.sizeColumnsToFit(),R($.api),s?.onGridReady?.($),d?.($.api)};p.useEffect(()=>{F&&t&&F.setGridOption("rowData",t)},[F,t]);const oe=p.useCallback(()=>f.jsx(ta,{title:v,description:C,containerClassName:"gap-3",titleClassName:"mt-2 !text-lg",icon:m||f.jsx(j.IconZoomCancel,{size:100,stroke:.5,className:"text-secondary"})}),[v,C,m]),Te=p.useMemo(()=>{if(S)return{mode:S===Ar.SINGLE?"singleRow":"multiRow",isRowSelectable:$=>{const he=$.data?u($.data):null;return he?!a?.has(he):!0}}},[a,u,S]);p.useEffect(()=>{F&&t&&P.current.size&&P.current.forEach($=>{const he=F.getRowNode($);he&&!he.isSelected()&&he.setSelected(!0,!1,Zi.API)})},[F,t]),p.useEffect(()=>{F&&l&&(F.deselectAll("all",Zi.API),l.forEach($=>{const he=F.getRowNode($);he&&!he.isSelected()&&he.setSelected(!0,!1,Zi.API)}))},[F,l]);const ee=p.useCallback($=>$.data?u($.data):"",[u]),le=p.useCallback(()=>{document.querySelectorAll(`.ag-row ${Fm}`).forEach($=>{$.setAttribute("aria-description",xu)})},[]);return p.useEffect(()=>{const $=H(k.current);if(F&&l?.size&&$){const he=Array.from(l)[0];if(he){const G=F.getRowNode(he);G&&F.ensureNodeVisible(G)}}},[F,H,l]),f.jsx("div",{className:ae(jO,n,S&&"with-selection-column",x&&"dial-without-header-borders"),"aria-label":o,role:"region","aria-busy":w,children:f.jsx("div",{className:"ag-theme-balham-dark h-full overflow-x-auto",role:"table","aria-describedby":E,children:f.jsx(NO,{rowModelType:"clientSide",headerHeight:Em,rowHeight:Em,cellSelection:!1,theme:x4.withPart(QP).withParams({...A}),autoSizeStrategy:{type:"fitGridWidth"},columnDefs:ie,defaultColDef:we,selectionColumnDef:z,onGridSizeChanged:U,onGridReady:N,loading:w,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:oe,rowData:t,rowSelection:Te,onSelectionChanged:V,getRowId:ee,onRowDataUpdated:le,onBodyScroll:le,onFirstDataRendered:le,...s})})})};var ic=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(ic||{}),nc=(e=>(e.Mobile="mobile",e.Tablet="tablet",e))(nc||{});const rl=({tab:e,active:t,invalid:s,className:i,horizontal:n,onClick:o})=>{const r=J("rounded h-[38px] items-center flex flex-row border-transparent cursor-pointer dial-small-text hover:text-accent-primary",{"border-b-2 px-4":n,"border-l-2 px-3":!n}),a=J(r,{"bg-layer-4":n,"bg-layer-1 text-secondary pointer-events-none":e.disabled,"bg-accent-primary-alpha text-primary":t&&!e.disabled,"text-primary":!t&&!e.disabled,"border-b-accent-primary":t&&n&&!e.disabled,"border-l-accent-primary":t&&!n&&!e.disabled},i);return f.jsxs("button",{role:"tab",className:a,onClick:()=>o(e.id),disabled:e.disabled,children:[f.jsx(vt,{text:e.label,contentClassName:"max-w-[200px]",className:"max-w-[200px]"}),(s||e.invalid)&&f.jsx("div",{className:"text-error pl-1",children:f.jsx(j.IconExclamationCircle,{...te})}),e.warning&&f.jsx("div",{className:"text-warning pl-1",children:f.jsx(j.IconAlertTriangle,{...te})})]})},ZO=12,XO=()=>{const[e,t]=p.useState(()=>typeof window>"u"?Si.Desktop:lu());return p.useEffect(()=>{t(lu());const s=()=>t(lu());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},sb=({tabs:e,activeTab:t,onClick:s,orientation:i=ic.Horizontal,screenThreshold:n=nc.Tablet,smallScreenContainerClassName:o,smallScreenDropdownItemClassName:r,desktopDropdownClassName:a,desktopTabClassName:l})=>{const[c,d]=p.useState(!1),[u,h]=p.useState(!1),[g,m]=p.useState(!1),v=XO(),C=v===Si.Mobile||n===nc.Tablet&&v===Si.Tablet,w=i===ic.Horizontal,b=p.useRef(null),x=p.useRef(null),y=p.useRef(null),S=e.find(T=>T.id===t),F=p.useMemo(()=>ae("flex gap-2",w?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[w]),R=p.useCallback(()=>{const T=x.current;T&&m(T.scrollWidth>T.clientWidth)},[]),E=p.useCallback(()=>{const T=y.current,P=x.current;if(!T||!P)return;const k=T.getBoundingClientRect(),A=P.getBoundingClientRect();if(k.width===0||A.width===0)return;const U=ZO;let I=P.scrollLeft;if(k.left<A.left+U)I-=A.left+U-k.left;else if(k.right>A.right-U)I+=k.right-(A.right-U);else return;const H=Math.max(0,P.scrollWidth-P.clientWidth);I=Math.max(0,Math.min(I,H)),I!==P.scrollLeft&&P.scrollTo({left:I,behavior:"smooth"})},[]),D=p.useCallback(T=>{s(T),T===t&&E()},[s,t,E]);return p.useEffect(()=>{R();const T=new ResizeObserver(()=>R()),P=x.current;return P&&T.observe(P),()=>T.disconnect()},[e,R]),p.useEffect(()=>{E()},[t,E]),C?f.jsx("div",{role:"tablist",className:J("h-11 flex items-center bg-layer-3 px-4",o),children:f.jsx(Tt,{trigger:[Kt.Click],open:c,onOpenChange:d,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(T=>f.jsx(rl,{tab:T,active:T.id===t,onClick:P=>{D(P),d(!1)},className:J("w-full rounded-none h-11 items-center px-6",r)},T.id)),children:f.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[f.jsx(rl,{tab:S,active:!0,onClick:D,className:"rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"},t),f.jsx(Be,{icon:f.jsx(j.IconChevronDown,{size:ct.SM}),className:ae("text-primary transition-transform",c&&"rotate-180")})]})})}):f.jsxs("div",{ref:b,className:"flex w-full items-start",children:[f.jsx("div",{ref:x,role:"tablist",className:F,children:e.map(T=>f.jsx("div",{ref:t===T.id?y:void 0,className:"w-full",children:f.jsx(rl,{tab:T,active:t===T.id,onClick:D,horizontal:w,className:J("w-full",l)})},T.id))}),g&&f.jsx("div",{className:"flex items-center ml-2",children:f.jsx(Tt,{trigger:[Kt.Click],open:u,onOpenChange:h,placement:"bottom-end",renderOverlay:()=>e.map(T=>f.jsx(rl,{tab:T,active:T.id===t,onClick:P=>{D(P),h(!1)},className:"w-full rounded-none h-8 items-center px-3 py-2"},T.id)),children:f.jsx(us,{iconBefore:f.jsx(j.IconDotsVertical,{size:$t}),className:J("w-8 h-8 flex items-center justify-center rounded border",u?"bg-layer-4 border-transparent":"border-primary",a)})})})]})},QO="w-full overflow-hidden",JO="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",ib="flex items-center gap-2 min-w-0 shrink-0 dial-small-text",eN="basis-[20%] flex-none",tN="flex-1 min-w-0",Tm="inline-flex items-center gap-1 min-w-0 transition-colors",sN="text-secondary hover:text-accent-primary",iN="text-primary cursor-default",nb="flex-none inline-flex items-center leading-none text-secondary",nN="items-center gap-1 min-w-0 transition-colors text-secondary hover:text-accent-primary",ob=f.jsx(j.IconChevronRight,{size:ct.SM,"aria-hidden":"true"}),xr=({label:e,href:t,onClick:s,disabled:i,isLast:n,separator:o=ob,className:r,iconBefore:a,labelClassName:l,onBeforeNavigate:c,...d})=>{const u=async C=>{if(c&&!n&&!await c()){C.preventDefault();return}s&&s(C)},h=J(ib,n?tN:eN,r),g=(!!t||!!s)&&!n&&!i,m=g?J(Tm,sN):J(Tm,iN,i?"pointer-events-none opacity-75":""),v=typeof e=="string"?f.jsx(vt,{className:J("cursor-pointer",l),text:e,id:"breadcrumb-item-content"}):f.jsx("span",{className:J("flex-1 min-w-0 truncate cursor-pointer max-w-[300px]",l),"aria-label":"breadcrumb-item-content",children:e});return f.jsxs("li",{...d,className:h,"aria-label":d["aria-label"]||"breadcrumb-item",children:[g?f.jsxs("a",{href:t,onClick:u,className:m,children:[a,v]}):f.jsxs("span",{className:m,"aria-current":n?"page":void 0,"aria-disabled":i?"true":void 0,children:[a,v]}),!n&&f.jsx("span",{className:nb,"aria-label":"separator",children:o})]})},rb=({pathItems:e,separator:t=ob,ariaLabel:s="Breadcrumb",className:i,children:n,labelClassName:o,onBeforeNavigate:r})=>{const a=p.useMemo(()=>e?.length?e:p.Children.toArray(n).filter(p.isValidElement).map(d=>{const u=d.props,{labelClassName:h,isLast:g,separator:m,...v}=u;return v}),[e,n]),l=p.useCallback(async d=>{const u=parseInt(d.key,10),h=a[u];if(r&&!await r()){d.domEvent.preventDefault();return}h.onClick?h.onClick(d.domEvent):h.href&&(window.location.href=h.href)},[a,r]),c=p.useMemo(()=>{if(a.length===0)return null;if(a.length<=3)return a.map((v,C)=>p.createElement(xr,{...v,key:`item-${C}`,isLast:C===a.length-1,separator:t,labelClassName:o,onBeforeNavigate:r}));const d=a.at(0),u=a.slice(1,-2),h=a.at(-2),g=a.at(-1);if(!d||!h||!g)return null;const m=u.map((v,C)=>({key:String(C+1),label:typeof v.label=="string"?v.label:`Item ${C+1}`,disabled:v.disabled}));return f.jsxs(f.Fragment,{children:[p.createElement(xr,{...d,key:"item-0",separator:t,labelClassName:o,onBeforeNavigate:r}),f.jsxs("li",{className:J(ib),children:[f.jsx(Tt,{menu:{items:m,onClick:l},placement:"bottom-start",matchReferenceWidth:!1,children:f.jsx("button",{type:"button","aria-label":"More breadcrumbs",className:nN,children:f.jsx(j.IconDots,{size:ct.SM})})}),f.jsx("span",{className:nb,children:t})]}),p.createElement(xr,{...h,key:`item-${a.length-2}`,separator:t,labelClassName:o,onBeforeNavigate:r}),p.createElement(xr,{...g,key:`item-${a.length-1}`,isLast:!0,separator:t,labelClassName:o,onBeforeNavigate:r})]})},[a,t,o,l,r]);return f.jsx("nav",{"aria-label":s,className:J(QO,i),children:f.jsx("ol",{className:JO,children:c})})},$p=(e,t)=>({appearance:i,...n})=>f.jsx(us,{...n,variant:e,appearance:i||t}),ab=(e,t)=>({variant:i,...n})=>f.jsx(us,{...n,variant:i||t,appearance:e}),Hs=$p(Ye.Primary,Ae.Solid),Ws=$p(Ye.Neutral,Ae.Outlined),lb=$p(Ye.Danger,Ae.Outlined),oN=ab(Ae.Link,Ye.Primary),qp=ab(Ae.Ghost,Ye.Primary),rN=({selected:e,className:t,...s})=>f.jsx(us,{...s,className:J("dial-neutral-rounded-button",e&&"selected",t)}),Vo=(e,t)=>({appearance:i,...n})=>f.jsx(Gs,{...n,variant:e,appearance:i||t}),aN=(e,t)=>({variant:i,...n})=>f.jsx(Gs,{...n,variant:i||t,appearance:e}),lN=Vo(Ye.Primary,Ae.Solid),cN=Vo(Ye.Neutral,Ae.Outlined),cb=Vo(Ye.Danger,Ae.Outlined),dN=Vo(Ye.Secondary,Ae.Ghost),uN=Vo(Ye.Tertiary,Ae.Ghost),hN=Vo(Ye.Success,Ae.Ghost),db=aN(Ae.Ghost,Ye.Primary),Hc=({iconClassName:e,label:t,...s})=>t?f.jsx(lb,{...s,label:t,appearance:Ae.Ghost,iconBefore:f.jsx(j.IconTrashX,{...te,className:e||""})}):f.jsx(cb,{...s,appearance:Ae.Ghost,icon:f.jsx(j.IconTrashX,{...te,className:e||""})}),pN=({className:e,icon:t,tooltipProps:s,type:i="button",...n})=>{const o=J("dial-fab-button disabled:cursor-not-allowed focus-visible:outline outline-offset-0 disabled:text-controls-secondary-disable",e),r=f.jsx("button",{...n,type:i,className:o,"aria-label":n["aria-label"],children:t||f.jsx(j.IconArrowNarrowDown,{size:24,stroke:1.5})});return s?f.jsx(Ot,{...s,children:r}):r},gN=({className:e="",value:t,onChange:s,error:i,containerClassName:n,resize:o=!1,labelProps:r,caption:a,id:l,...c})=>{const d=J("dial-textarea dial-input px-3 py-2",c.invalid&&"dial-input-error",c.disabled&&"dial-input-disable",o?"resize":"resize-none",e);return f.jsxs("div",{className:J("flex flex-col gap-y-1",n),children:[r&&f.jsx(Pn,{...r,htmlFor:l}),f.jsx("textarea",{id:l,value:t||"",className:d,onChange:u=>s?.(u.currentTarget.value),...c}),f.jsx(ds,{text:i}),!i&&f.jsx(Jr,{text:a})]})},Gc=({label:e,switchId:t,isOn:s=!1,disabled:i,onChange:n,caption:o})=>{const r=ae("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",i?"pointer-events-none":"",i?s?"bg-controls-disable":"bg-layer-4":s?"bg-accent-primary":"bg-layer-4"),a=p.useCallback(l=>{l.stopPropagation(),n?.(!s)},[n,s]);return f.jsxs("div",{className:"flex flex-row items-start",role:"switch",children:[f.jsx("input",{type:"checkbox",onChange:a,id:t,disabled:i,className:"invisible size-0",checked:s}),f.jsx("label",{htmlFor:t,className:r,"aria-describedby":o&&"caption",children:f.jsx("span",{className:ae("size-3 rounded-full",i?"bg-controls-disable-accent":"bg-controls-enable-primary")})}),(e||o)&&f.jsxs("div",{className:"flex flex-col gap-1 ml-2",children:[e&&f.jsx("span",{className:ae("dial-small-text py-[1px]",i?"text-secondary":"text-primary"),"aria-label":"switch-title",children:e}),o&&f.jsx("span",{id:"caption",className:"dial-tiny-text text-secondary",children:o})]})]})};var Zt=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(Zt||{});const fN="z-[52] flex items-center justify-center bg-blackout md:p-4",km="divide-tertiary divide-y",mN="flex flex-row justify-between py-4 px-6 items-center",vN={[Zt.Sm]:"dial-sm-popup",[Zt.Md]:"dial-md-popup",[Zt.Lg]:"dial-lg-popup"},Mn=({open:e=!1,header:t,portalId:s,className:i,overlayClassName:n,titleClassName:o,headerClassName:r,dividers:a=!0,dividerFooter:l=!0,children:c,footer:d,onClose:u,size:h=Zt.Md,hideClose:g=!1,closeOnOutsideClick:m=!0,preventKeyboardOnOpen:v=!1})=>{const C=p.useRef(null),{refs:w,context:b}=De.useFloating({open:e,onOpenChange:E=>{E||u?.(null)}}),x=De.useRole(b,{role:"dialog"}),y=De.useDismiss(b,{outsidePress:m}),{getFloatingProps:S}=De.useInteractions([x,y]);if(!e)return null;const F=typeof t=="string"?"dial-popup-heading":void 0,R=E=>E?typeof E=="string"?f.jsx("h3",{id:F,className:ae("flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",o),children:f.jsx(Ot,{tooltip:E,children:E})}):E:f.jsx("span",{});return f.jsx(De.FloatingPortal,{id:s,children:f.jsx(De.FloatingOverlay,{className:ae(fN,n),children:f.jsx(De.FloatingFocusManager,{context:b,initialFocus:v?C:void 0,children:f.jsxs("div",{ref:w.setFloating,...S(),role:"dialog","aria-modal":"true","aria-labelledby":F,className:ae("dial-popup",vN[h],a&&km,i),children:[v&&f.jsx("div",{ref:C,tabIndex:-1,"aria-hidden":!0,className:"absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"}),f.jsxs("div",{className:J(mN,r),children:[R(t),!g&&f.jsx(_p,{ariaLabel:"Close dialog",onClose:E=>u?.(E)})]}),f.jsx("div",{className:"grow overflow-auto","aria-label":"popup-description",children:c}),l&&!d&&f.jsx("div",{className:km}),d]})})})})};var Mo=(e=>(e.Info="info",e.Danger="danger",e))(Mo||{});const CN="flex justify-end gap-2 px-6 py-4",wN="text-secondary dial-small-150 px-6 py-4",bN="Cancel",xN="Ok",cu={[Mo.Info]:{confirm:{variant:Ye.Primary,appearance:Ae.Solid},cancel:{variant:Ye.Neutral,appearance:Ae.Outlined}},[Mo.Danger]:{container:"dial-danger-popup",confirm:{variant:Ye.Danger,appearance:Ae.Solid},cancel:{variant:Ye.Neutral,appearance:Ae.Outlined}}},ub=({header:e,description:t,descriptionClassName:s,open:i=!1,confirmLabel:n=xN,cancelLabel:o=bN,isLoading:r=!1,disableConfirmButton:a=!1,className:l,confirmClassName:c,onClose:d,onConfirm:u,onCancel:h,children:g,dividers:m=!1,variant:v=Mo.Info,size:C=Zt.Sm,footer:w})=>{const b=r?null:f.jsxs("div",{className:CN,children:[f.jsx(Ws,{label:o,onClick:()=>h?h():d?.()}),f.jsx(us,{variant:cu[v].confirm?.variant,appearance:cu[v].confirm?.appearance,className:c,label:n,disabled:a,onClick:()=>u()})]}),x=p.useCallback(()=>r?f.jsx("div",{className:"px-6 py-4 h-[120px]",children:f.jsx(ea,{size:50})}):g??(t?f.jsx("div",{className:ae(wN,s),children:t}):null),[g,t,r,s]);return f.jsx(Mn,{open:i,header:e,className:ae(cu[v].container,l),dividers:m,onClose:()=>d?.(),footer:w??b,size:C,children:x()})},du=8,yN=24,hb=({initialTags:e=[],label:t,required:s,elementId:i,placeholder:n,captionDescription:o,errorText:r,invalid:a,disabled:l,collapseTagOverflow:c=!1,readOnly:d=!1,containerClassName:u,tagClassName:h,onChange:g})=>{const m=p.useRef(null),v=p.useRef([]),C=p.useRef(null),[w,b]=p.useState(e),[x,y]=p.useState(""),[S,F]=p.useState(!1),[R,E]=p.useState(e.length),D=p.useCallback(W=>V=>{v.current[W]=V},[]),T=p.useCallback(()=>{if(!c)return;const W=m.current;if(!W)return;const V=W.offsetWidth;if(V===0)return;const Z=C.current?.offsetWidth??0,M=V-(d?0:yN)-du;let z=0,K=0;for(let ie=0;ie<w.length;ie++){const we=v.current[ie];if(!we)continue;const N=we.offsetWidth+du;if(z+N>M)break;z+=N,K++}if(K<w.length&&K>0)for(;z+Z>M&&K>0;){K--;const ie=v.current[K]?.offsetWidth??0;z-=ie+du}E(K)},[c,d,w.length]),P=W=>{const V=W.trim().replace(/,$/,"");if(V&&!w.includes(V)){const Z=[V,...w];b(Z),g?.(Z)}},k=W=>{(W.key===","||W.key==="Enter")&&(W.preventDefault(),P(x),y(""))},A=()=>{x.trim()&&(P(x),y(""))},U=W=>{const V=w.filter((Z,L)=>L!==W);b(V),g?.(V)},I=()=>r?f.jsx(ds,{text:r}):o?f.jsx(Jr,{text:o}):null;p.useEffect(()=>{if(c)return;const W=new ResizeObserver(()=>{if(m.current){const V=m.current.scrollHeight>m.current.clientHeight+10;F(V)}});return m.current&&W.observe(m.current),()=>W.disconnect()},[w,c]),p.useEffect(()=>{if(!c){E(w.length);return}E(w.length);const W=new ResizeObserver(()=>{T()}),V=m.current;return V&&W.observe(V),T(),()=>W.disconnect()},[c,T,w]),p.useEffect(()=>{b(e)},[JSON.stringify(e)]);const H=f.jsxs("div",{ref:m,className:ae("flex gap-2 items-center relative",c?"flex-nowrap overflow-hidden w-full min-w-0":ae("flex-wrap",S?"flex-col-reverse":"flex-row"),u),children:[(c?w.slice(0,R):w).map((W,V)=>f.jsx(io,{tag:W,className:h,remove:!l&&!d?()=>U(V):void 0},W+V)),c&&R<w.length&&f.jsx(Ot,{tooltip:w.slice(R).join(", "),triggerClassName:"inline-flex shrink-0 cursor-pointer",children:f.jsx(io,{tag:`+${w.length-R}`})}),!d&&f.jsx("input",{id:i,type:"text",value:x,onChange:W=>y(W.target.value),onKeyDown:k,onBlur:A,className:ae("dial-input outline-none !border-none w-full flex-1 !p-1 !h-auto",c?"min-w-0":"min-w-[100px]"),placeholder:n??"",disabled:l}),c&&f.jsxs("div",{className:"absolute left-0 top-0 invisible pointer-events-none h-0 overflow-hidden whitespace-nowrap","aria-hidden":!0,children:[w.map((W,V)=>f.jsx("div",{ref:D(V),className:"inline-flex shrink-0",children:f.jsx(io,{tag:W,className:h,remove:!l&&!d?()=>U(V):void 0})},`measure-${W}-${V}`)),f.jsx("div",{ref:C,className:"inline-flex shrink-0",children:f.jsx(io,{tag:`+${w.length}`})})]})]});return d?H:f.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f.jsx(Pn,{label:t,required:s,htmlFor:i}),f.jsx("div",{className:ae("dial-input min-h-[38px] p-[6px]",a&&"dial-input-error",l&&"dial-input-disable"),children:H}),I()]})},pb=({selectedItems:e,placeholder:t,collapseTagOverflow:s=!1,listClassName:i,listElementClassName:n})=>e?.length?f.jsx(hb,{readOnly:!0,initialTags:e,collapseTagOverflow:s,containerClassName:i,tagClassName:n}):t?f.jsx("span",{className:"text-secondary",children:t}):null,uu=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.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"})),gb=({children:e,open:t,disabled:s=!1,selectedValue:i,valueClassName:n,inputClassName:o,onOpen:r,elementId:a,errorText:l,invalid:c,emptyValueText:d,placeholder:u,editable:h=!1,onValueChange:g,collapseTagOverflow:m=!1,iconBefore:v})=>{const C=Array.isArray(i)&&i.length>0,w=typeof i=="string"&&!!i.trim(),b=C||w?i:u?void 0:d,x=s?void 0:r,y=p.useCallback(E=>{g?.(E.target.value)},[g]),S=()=>f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:ae("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between",o,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[f.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[v&&f.jsx(Be,{icon:v}),f.jsx("input",{type:"text",className:ae("flex-1 min-w-0 bg-transparent outline-none border-none p-0 dial-small-text text-primary placeholder:text-secondary",n),value:typeof i=="string"?i:"",placeholder:u||d,onChange:y,disabled:s,id:a,"aria-label":"input-popup-field"})]}),!s&&f.jsx("button",{type:"button",className:"shrink-0 cursor-pointer bg-transparent border-none p-0 ml-1",onClick:r,"aria-label":"open-popup",children:f.jsx(Be,{icon:f.jsx(uu,{role:"img",width:$t,height:$t})})})]}),f.jsx(ds,{text:l})]}),F=()=>f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"w-full",onClick:x,"aria-label":"open-popup",id:a,children:f.jsxs("div",{className:ae("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",o,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[f.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[v&&f.jsx(Be,{icon:v}),f.jsx(Ot,{tooltip:b==null?void 0:String(b),children:b||!u?f.jsx("span",{className:n,children:b}):f.jsx("span",{className:"text-secondary",children:u})})]}),!s&&f.jsx("div",{className:"shrink-0",children:f.jsx(Be,{icon:f.jsx(uu,{role:"img",width:$t,height:$t})})})]})}),f.jsx(ds,{text:l})]}),R=()=>f.jsx("div",{className:"w-full",onClick:x,children:f.jsxs("div",{className:ae("dial-input px-3 py-2 flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",s&&"dial-input-disable"),children:[f.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[v&&f.jsx(Be,{icon:v}),f.jsx(pb,{placeholder:u,selectedItems:b,collapseTagOverflow:m})]}),!s&&f.jsx("div",{className:"ml-1",children:f.jsx(Be,{icon:f.jsx(uu,{role:"img",width:$t,height:$t})})})]})});return f.jsxs(f.Fragment,{children:[C?R():h?S():F(),t&&Ao.createPortal(e,document.body)]})},SN=({label:e,htmlFor:t,disabled:s,selectedValue:i,radioButtons:n,customInputValue:o,valueClassName:r,inputClassName:a,emptyValueText:l,onClose:c,header:d,portalId:u,onApply:h,onCancel:g,cancelButtonTitle:m="Cancel",applyButtonTitle:v="Apply",isValid:C,selectedRadioValue:w,onChangeRadioField:b,id:x,size:y=Zt.Md})=>{const[S,F]=p.useState(!1),R=p.useCallback(()=>{s||F(!0)},[s]),E=p.useCallback(()=>{F(!1),c?.()},[c]),D=p.useCallback(()=>{g?.(),E()},[g,E]),T=p.useCallback(()=>{h(),E()},[h,E]);return f.jsxs("div",{className:"flex flex-col gap-1",children:[f.jsx(Pn,{label:e,htmlFor:t}),f.jsx(gb,{disabled:s,open:S,selectedValue:o??n.find(P=>P.id===i)?.name,valueClassName:r,inputClassName:ae(a,"py-2","px-3"),emptyValueText:l,onOpen:R,children:f.jsx(Mn,{open:S,onClose:D,header:d,portalId:u,size:y,footer:f.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[f.jsx(Ws,{label:m,onClick:D}),f.jsx(Hs,{label:v,onClick:T,disabled:!C})]}),children:f.jsx("div",{className:"px-6 py-4",children:f.jsx(Dl,{radioButtons:n,labelClassName:"dial-small-text",activeRadioButton:w,onChange:b,elementId:x,orientation:hn.Column})})})})]})},RN="Create",FN="Cancel",EN="flex items-center justify-end gap-2 px-6 py-3",DN=({header:e,open:t=!1,submitLabel:s=RN,cancelLabel:i=FN,isLoading:n=!1,disableSubmitButton:o=!1,className:r,submitClassName:a,onClose:l,onSubmit:c,onCancel:d,children:u,dividers:h=!0,size:g=Zt.Md,footer:m})=>{const v=n?null:f.jsxs("div",{className:EN,children:[f.jsx(Ws,{label:i,onClick:()=>d?d():l?.()}),f.jsx(Hs,{className:a,label:s,disabled:o,onClick:()=>c()})]}),C=p.useCallback(()=>n?f.jsx("div",{className:"px-6 py-4 h-[120px]",children:f.jsx(ea,{size:50})}):u??null,[u,n]);return f.jsx(Mn,{open:t,header:e,className:r,dividers:h,onClose:()=>l?.(),footer:m??v,size:g,children:C()})},PN="bg-layer-4 flex items-center justify-center enabled:text-secondary enabled:hover:text-accent-primary enabled:active:bg-controls-accent-primary-alpha-active enabled:hover:bg-accent-primary-alpha enabled:active:text-accent-primary",TN=({icon:e,onClick:t,disabled:s,size:i=nt.Standard})=>f.jsx("div",{className:ae("border-l border-tertiary",i===nt.Standard?"h-[40px] w-[44px]":"h-[24px] w-[32px]"),children:f.jsx(Gs,{className:ae(PN,i===nt.Small&&"p-1"),icon:e,onClick:t,disabled:s,size:i})}),kN=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],fb=(e,t,s,i)=>{if((t==="number"||s!==void 0||i!==void 0)&&!kN.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||i!==void 0){const o=e.currentTarget.value,r=e.currentTarget.selectionStart||0,a=o.slice(0,r)+e.key+o.slice(r),l=parseFloat(a);if(!isNaN(l)){if(s!==void 0&&l<+s){e.preventDefault();return}if(i!==void 0&&l>+i){e.preventDefault();return}}}}},oi=({labelProps:e,error:t,caption:s,id:i,containerClassName:n,...o})=>f.jsxs("div",{className:J("flex flex-col gap-y-1",n),children:[e&&f.jsx(Pn,{...e,htmlFor:i}),f.jsx(mb,{id:i,...o}),f.jsx(ds,{text:t}),!t&&f.jsx(Jr,{text:s})]}),mb=({invalid:e,disabled:t,prefix:s,className:i,postfix:n,iconBefore:o,iconAfter:r,wrapperClassName:a,type:l,inputRef:c,value:d,tooltipText:u,min:h,onChange:g,max:m,inputButtonProps:v,...C})=>{const w=p.useRef(null),b=De.useMergeRefs([c,w]);p.useEffect(()=>{const R=w.current;if(!R)return;const E=D=>{D.preventDefault()};return R.addEventListener("wheel",E,{passive:!1}),()=>{R.removeEventListener("wheel",E)}},[]);const x=l==="number"||h!==void 0||m!==void 0,y=R=>{fb(R,l,h,m)},S=R=>{const E=R.currentTarget.value;if(x&&E!==""){const D=parseFloat(E);if(isNaN(D)&&E!=="-"&&E!=="."||!isNaN(D)&&(h!==void 0&&D<+h||m!==void 0&&D>+m))return}g?.(E||void 0)},F=()=>f.jsxs("div",{className:J("dial-input flex flex-row items-center gap-x-2 justify-between py-2",e&&"dial-input-error",t&&"dial-input-disable",!s&&"pl-3",!v&&"pr-3",a),"aria-label":"input-container",children:[s&&f.jsx("div",{className:"border-r border-tertiary",children:f.jsx(mb,{wrapperClassName:"!rounded-r-none",className:"truncate",value:s,disabled:!0,id:`${s}_textBefore`})}),f.jsx(Be,{icon:o}),f.jsx("input",{ref:b,type:l,autoComplete:l==="password"?"new-password":"off",value:d??"",className:J("border-0 bg-transparent w-full truncate",t&&"cursor-not-allowed",i),onChange:S,onKeyDown:y,min:h,disabled:t,max:m,...C}),n&&f.jsxs("p",{className:"text-secondary dial-small-text",children:[" ",n]}),f.jsx(Be,{icon:r}),v&&f.jsx(TN,{...v,disabled:t})]});return t&&l!=="password"?f.jsx(Ot,{tooltip:u||d,children:F()}):F()},IN=/^0+\.(\d+)?$/,MN=/^0+/,fh=({integer:e,onChange:t,min:s,max:i,onKeyDown:n,onPaste:o,...r})=>{const a=d=>!d||d==="-"?d:String(d)?.match(IN)?String(d)?.replace(MN,"0"):Number(d),l=d=>{if([".","-","+","e","E"].includes(d.key)){d.preventDefault();return}fb(d,"number",s,i)},c=d=>{const u=d.clipboardData.getData("text"),h=u.replace(/\D/g,"");if(h!==u&&(d.preventDefault(),h)){const g=d.currentTarget,m=g.selectionStart??0,v=g.selectionEnd??0,C=g.value.slice(0,m)+h+g.value.slice(v);t?.(a(C))}};return f.jsx(oi,{type:"number",min:s,max:i,onChange:d=>t?.(a(d)),onKeyDown:e?l:n,onPaste:e?c:o,...r})},AN=({onClick:e})=>f.jsx(j.IconEyeOff,{...te,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),LN=({onClick:e})=>f.jsx(j.IconEye,{...te,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),vb=({...e})=>{const[t,s]=p.useState(!1),i=p.useCallback(n=>{s(n)},[]);return f.jsx(oi,{type:t?"text":"password",...e,iconAfter:e.disabled?null:t?f.jsx(AN,{onClick:()=>i(!1)}):f.jsx(LN,{onClick:()=>i(!0)})})},ON={[nt.Small]:{className:"dial-tiny-text",wrapperClassName:"pl-2 py-0",containerClassName:"h-[24px]",iconSize:16,iconStroke:1},[nt.Standard]:{className:"dial-small-text",wrapperClassName:"",containerClassName:"",iconSize:20,iconStroke:1.5}},Kp=({size:e=nt.Standard,placeholder:t="Search...",value:s,onChange:i,...n})=>{const[o,r]=p.useState(s||"");p.useEffect(()=>{r(s||"")},[s]);const a=p.useCallback(u=>{r(u||""),i?.(u||"")},[i]),l=ON[e],c=p.useCallback(()=>{a("")},[a]),d=p.useMemo(()=>{if(o)return{icon:f.jsx(j.IconX,{size:l.iconSize,"aria-label":"Clear search",role:"button"}),onClick:c,size:e}},[c,o,e,l.iconSize]);return f.jsx(oi,{placeholder:t,iconBefore:f.jsx(j.IconSearch,{size:l.iconSize,stroke:l.iconStroke}),value:o,onChange:a,inputButtonProps:d,containerClassName:l.containerClassName,className:l.className,wrapperClassName:l.wrapperClassName,...n})},Cb=({options:e,selectedValues:t,handleRemoveTag:s})=>f.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(i=>{const n=e.find(r=>r.value===i)?.label??i,o=e.find(r=>r.value===i)?.icon;return f.jsx(io,{tag:n,remove:r=>s?.(r,i),iconBefore:o?f.jsx(Be,{icon:o}):null,className:"max-w-full"},i)})});var oc=(e=>(e.Sm="sm",e.Md="md",e))(oc||{}),rc=(e=>(e.Primary="Primary",e.Secondary="Secondary",e))(rc||{});const NN="dial-input flex w-full items-center justify-between gap-2 dial-small-text cursor-pointer",HN="w-full rounded flex flex-col",Lr="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small-text text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none",GN="bg-accent-primary-alpha",mh="bg-accent-primary-alpha border-l border-accent-primary border-1",ac="opacity-75",BN=352,VN=4,zN=f.jsx(j.IconChevronDown,{size:ct.SM}),WN=({opt:e,selectedValues:t,onSelect:s})=>{const{isOpen:i,refs:n,floatingStyles:o,context:r,getReferenceProps:a,getFloatingProps:l}=X1(VN,"listbox",!!e.disabled),c=e.children?.some(d=>t.includes(d.value));return f.jsxs(f.Fragment,{children:[f.jsxs("button",{ref:n.setReference,type:"button",role:"option","aria-haspopup":"listbox","aria-expanded":i,"aria-selected":!!c,"aria-disabled":!!e.disabled,disabled:e.disabled,className:ae(Lr,c&&mh,e.disabled&&ac),...a(),children:[f.jsxs("div",{className:"flex items-center gap-2 w-full min-w-0",children:[e.icon&&f.jsx(Be,{icon:e.icon}),f.jsx(vt,{text:e.label})]}),f.jsx(j.IconChevronRight,{size:14,className:"shrink-0"})]}),i&&f.jsx(Q1,{refs:n,floatingStyles:o,context:r,getFloatingProps:l,role:"listbox",className:"w-max py-1",children:e.children.map(d=>{const u=t.includes(d.value);return f.jsx("button",{type:"button",role:"option","aria-selected":u,"aria-disabled":!!d.disabled,disabled:d.disabled,className:ae(Lr,u&&mh,d.disabled&&ac),onClick:()=>!d.disabled&&s(d.value),children:f.jsxs("div",{className:"flex items-center gap-2 w-full",children:[d.icon&&f.jsx(Be,{icon:d.icon}),f.jsx(vt,{text:d.label})]})},d.value)})})]})},Fn=({options:e,multiple:t=!1,elementId:s,value:i,defaultValue:n,variant:o=rc.Primary,size:r=oc.Md,prefix:a,customSelectedValue:l,placeholder:c="Select...",searchable:d=!1,searchPlaceholder:u,selectAll:h=!1,invalid:g,selectAllLabel:m="Select all",emptyStateTitle:v="No options available",emptyStateDescription:C,emptyStateIcon:w,disabled:b=!1,className:x,listClassName:y,closable:S=!1,header:F,footer:R,onClose:E,onChange:D,inlineSearch:T=!1,dismissRef:P,onFooterClick:k,open:A,onOpenChange:U,onInlineQueryChange:I,customMultiSelectTagsRenderer:H})=>{const W=p.useId(),[V,Z]=p.useState(!1),L=A!==void 0,M=L?!!A:V,z=p.useCallback(_=>{L||Z(_),U?.(_)},[L,U]),[K,ie]=p.useState(T&&l||""),we=p.useRef(null),N=p.useCallback(_=>{_!==K&&(ie(_||""),I?.(_||""))},[I,K]),oe=i!==void 0,[Te,ee]=p.useState(n),le=oe?i:Te,$=p.useMemo(()=>t?Array.isArray(le)?le:[]:typeof le=="string"?[le]:[],[le,t]),he=p.useMemo(()=>{const _=K.trim().toLowerCase();return _?e.filter(Ee=>Ee.label.toLowerCase().includes(_)):e},[e,K]);p.useEffect(()=>{!M&&!T&&N("")},[T,M,N]),p.useEffect(()=>{T&&!M&&l&&N(l||"")},[l,T,M,N]);const G=p.useCallback(_=>{oe||ee(_),D?.(_)},[oe,D]),ne=p.useCallback(_=>{if(t){const Ee=new Set($);Ee.has(_)?Ee.delete(_):Ee.add(_),G(Array.from(Ee));return}if(G(_),T){const Ee=e.find(Ft=>Ft.value===_)??e.flatMap(Ft=>Ft.children??[]).find(Ft=>Ft.value===_);Ee&&(N(Ee.label),I?.(Ee.label))}z(!1)},[t,G,T,z,$,e,N,I]),pe=p.useCallback((_,Ee)=>{if(_.stopPropagation(),!t){G("");return}const Ft=$.filter(Wo=>Wo!==Ee);G(Ft)},[t,$,G]),Fe=p.useMemo(()=>he.filter(_=>!_.disabled),[he]),Pe=p.useMemo(()=>Fe.filter(_=>$.includes(_.value)).length,[Fe,$]),ce=p.useCallback(_=>{T&&!t&&!_&&ne(K),z(_)},[ne,T,t,K,z]),{allSelectedInFiltered:Se,someSelectedInFiltered:ke}=p.useMemo(()=>{const _=Fe.length>0&&Pe===Fe.length;return{allSelectedInFiltered:_,someSelectedInFiltered:Pe>0&&!_}},[Fe,Pe]),Me=p.useCallback(()=>{if(!(!t||Fe.length===0))if(Se){const _=new Set(Fe.map(Ee=>Ee.value));G($.filter(Ee=>!_.has(Ee)))}else{const _=new Set($);Fe.forEach(Ee=>_.add(Ee.value)),G(Array.from(_))}},[Se,t,Fe,$,G]),be=$.length>0;p.useEffect(()=>{M&&T&&!t&&!b&&requestAnimationFrame(()=>{const _=we.current;if(!_)return;_.focus();const Ee=_.value?.length??0;_.setSelectionRange?.(Ee,Ee)})},[M,T,t,b]);const Ne=!t&&be?$[0]:void 0,Ve=p.useMemo(()=>Ne?e.find(_=>_.value===Ne)??e.flatMap(_=>_.children??[]).find(_=>_.value===Ne):void 0,[e,Ne]),St=p.useCallback(()=>t?be?H?.(e,$,pe)||f.jsx(Cb,{options:e,selectedValues:$,handleRemoveTag:pe}):f.jsx("span",{className:"text-secondary truncate",children:c}):Ve?f.jsxs(f.Fragment,{children:[Ve.icon&&f.jsx(Be,{icon:Ve.icon}),f.jsx(vt,{text:a?`${a} ${Ve.label}`:Ve.label}),Ve?.description&&f.jsx("div",{className:"text-secondary dial-small-text",children:Ve.description})]}):l&&i?l:f.jsx("span",{className:"text-secondary truncate",children:c}),[be,t,l,a,i,c,Ve,e,$,pe,H]);p.useImperativeHandle(P,()=>({dismiss:()=>{z(!1)}}));const _e=p.useCallback(()=>{N($.length===1?Ve?.label??K:"")},[K,$.length,N,Ve?.label]),Rt=p.useCallback(()=>{b||(z(!M),T&&!t&&(_e(),we.current?.focus()))},[b,T,M,t,_e,z]);return f.jsx(Tt,{open:M,onOpenChange:ce,disabled:b,closable:S,onClose:E,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],maxDropdownHeight:d?null:BN,listClassName:y,renderOverlay:()=>f.jsxs("div",{id:`list-${s||W}`,role:"listbox","aria-multiselectable":t||void 0,className:HN,children:[F&&f.jsx(f.Fragment,{children:typeof F=="function"?F():F}),(d||S)&&e.length>8&&f.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[d&&f.jsx(Kp,{placeholder:u,onChange:N,value:K,id:`search-${s||W}`,containerClassName:"w-full"}),S&&f.jsx(us,{"aria-label":"Close select",className:"shrink-0",iconBefore:f.jsx(j.IconX,{size:ct.SM}),onClick:_=>{E?.(_),z(!1)}})]}),t&&h&&Fe.length>0&&f.jsx("div",{className:ae(Lr,"mt-2"),children:f.jsx(yu,{id:`${s||W}-selectAll`,label:m,checked:Se,indeterminate:ke,onChange:Me,ariaLabel:m})}),f.jsx("div",{className:ae("overflow-y-auto max-h-[352px]",T&&he.length===0?"":"py-1"),children:he.length===0?!T&&f.jsx("div",{className:"px-2 py-3",children:f.jsx(ta,{icon:w??f.jsx(j.IconClipboardX,{size:ct.LG,stroke:.5}),title:v,description:C})}):he.map(_=>{const Ee=$.includes(_.value);return t?f.jsxs("div",{role:"option","aria-selected":Ee,"aria-disabled":!!_.disabled,className:ae(Lr,Ee&&GN,_.disabled&&ac,"w-full"),children:[f.jsx(yu,{id:`${s||W}-${_.value}`,label:f.jsxs("span",{className:"flex w-full flex-1 pl-2 min-w-0 items-center gap-2 text-primary",children:[_.icon&&f.jsx(Be,{icon:_.icon}),f.jsx("span",{className:"truncate",children:_.label})]}),checked:Ee,disabled:_.disabled,onChange:()=>!_.disabled&&ne(_.value),ariaLabel:_.label}),_.description&&f.jsx("div",{className:"text-secondary dial-small-text",children:_.description})]},_.value):_.children?.length?f.jsx(WN,{opt:_,selectedValues:$,onSelect:ne},_.value):f.jsx("button",{role:"option",type:"button","aria-selected":Ee,"aria-disabled":!!_.disabled,disabled:_.disabled,className:ae(Lr,Ee&&mh,_.disabled&&ac),onClick:()=>!_.disabled&&ne(_.value),children:f.jsxs("div",{className:"flex items-center gap-2 w-full",children:[_.icon&&f.jsx(Be,{icon:_.icon}),f.jsx(vt,{text:_.label}),_.description&&f.jsx("div",{className:"text-secondary dial-small-text",children:_.description})]})},_.value)})}),R&&f.jsx("div",{onClick:_=>{k?.(_),k&&z(!1)},children:typeof R=="function"?R():R})]}),children:f.jsxs("div",{role:"button",tabIndex:0,"aria-roledescription":"button to open select list","aria-haspopup":"listbox","aria-expanded":M,"aria-controls":`list-${s||W}`,className:J(NN,b&&"opacity-75 !cursor-not-allowed !border-primary",r===oc.Sm?"min-h-[25px] px-1.5 py-1":"min-h-[38px] px-3 py-2",g&&"dial-input-error",o===rc.Secondary?"!bg-layer-4 !h-auto":"",x),onMouseDown:_=>{b||T&&!t&&(_e(),_.preventDefault())},onClick:()=>{Rt()},onKeyDown:_=>{(_.key===" "||_.code==="Space")&&(_.preventDefault(),Rt())},children:[T&&!t?f.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary flex-1",children:f.jsx("input",{id:`inline-${s||W}`,type:"text",placeholder:u??c,value:K||"",onChange:_=>N(_.currentTarget.value.trimStart()),onFocus:()=>!b&&z(!0),onMouseDown:_=>{_e(),_.stopPropagation()},onClick:_=>{_.stopPropagation()},onKeyDown:_=>{_.stopPropagation()},className:"bg-transparent outline-none w-full dial-small-text",ref:we,disabled:b,"aria-disabled":b,autoComplete:"off"})}):f.jsx("div",{className:"flex w-full min-w-0 items-center gap-2 text-primary",children:St()}),!T&&f.jsx(Be,{icon:zN,className:ae("text-primary",M&&"rotate-180")})]})})},jN=({label:e,required:t,captionDescription:s,containerClassName:i,selectClassName:n,error:o,id:r,caption: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 f.jsx(Cb,{options:u.options,selectedValues:c});{const g=u.options?.find(m=>m.value===c);return f.jsx("span",{"aria-readonly":!0,className:"text-primary",children:g?.label||c})}},[c,u.options,d]);return f.jsx(cc,{id:r,label:e,required:t,description:a,error:o,captionDescription:s,className:i,readonly:l,value:h(),defaultEmptyText:d,children:f.jsx(Fn,{className:n,value:c,elementId:r,invalid:!!o,...u})})};function wb(e){let t=null;return()=>(t==null&&(t=e()),t)}function _N(e,t){return e.filter(s=>s!==t)}function UN(e,t){const s=new Set,i=o=>s.add(o);e.forEach(i),t.forEach(i);const n=[];return s.forEach(o=>n.push(o)),n}class $N{enter(t){const s=this.entered.length,i=n=>this.isNodeInDocument(n)&&(!n.contains||n.contains(t));return this.entered=UN(this.entered.filter(i),[t]),s===0&&this.entered.length>0}leave(t){const s=this.entered.length;return this.entered=_N(this.entered.filter(this.isNodeInDocument),t),s>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class qN{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(i=>{const n=this.config.exposeProperties[i];n!=null&&(s[i]={value:n(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 Yp="__NATIVE_FILE__",bb="__NATIVE_URL__",xb="__NATIVE_TEXT__",yb="__NATIVE_HTML__",Im=Object.freeze(Object.defineProperty({__proto__:null,FILE:Yp,HTML:yb,TEXT:xb,URL:bb},Symbol.toStringTag,{value:"Module"}));function hu(e,t,s){const i=t.reduce((n,o)=>n||e.getData(o),"");return i??s}const vh={[Yp]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[yb]:{exposeProperties:{html:(e,t)=>hu(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[bb]:{exposeProperties:{urls:(e,t)=>hu(e,t,"").split(`
69
69
  `),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[xb]:{exposeProperties:{text:(e,t)=>hu(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function KN(e,t){const s=vh[e];if(!s)throw new Error(`native type ${e} has no configuration`);const i=new qN(s);return i.loadDataTransfer(t),i}function pu(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(vh).filter(s=>{const i=vh[s];return i?.matchesTypes?i.matchesTypes.some(n=>t.indexOf(n)>-1):!1})[0]||null}const YN=wb(()=>/firefox/i.test(navigator.userAgent)),Sb=wb(()=>!!window.safari);class Mm{interpolate(t){const{xs:s,ys:i,c1s:n,c2s:o,c3s:r}=this;let a=s.length-1;if(t===s[a])return i[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 i[d]}a=Math.max(0,c);const u=t-s[a],h=u*u;return i[a]+n[a]*u+o[a]*h+r[a]*u*h}constructor(t,s){const{length:i}=t,n=[];for(let g=0;g<i;g++)n.push(g);n.sort((g,m)=>t[g]<t[m]?-1:1);const o=[],r=[];let a,l;for(let g=0;g<i-1;g++)a=t[g+1]-t[g],l=s[g+1]-s[g],o.push(a),r.push(l/a);const c=[r[0]];for(let g=0;g<o.length-1;g++){const m=r[g],v=r[g+1];if(m*v<=0)c.push(0);else{a=o[g];const C=o[g+1],w=a+C;c.push(3*w/((w+C)/m+(w+a)/v))}}c.push(r[r.length-1]);const d=[],u=[];let h;for(let g=0;g<c.length-1;g++){h=r[g];const m=c[g],v=1/o[g],C=m+c[g+1]-h-h;d.push((h-m-C)*v),u.push(C*v*v)}this.xs=t,this.ys=s,this.c1s=c,this.c2s=d,this.c3s=u}}const ZN=1;function Rb(e){const t=e.nodeType===ZN?e:e.parentElement;if(!t)return null;const{top:s,left:i}=t.getBoundingClientRect();return{x:i,y:s}}function al(e){return{x:e.clientX,y:e.clientY}}function XN(e){var t;return e.nodeName==="IMG"&&(YN()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function QN(e,t,s,i){let n=e?t.width:s,o=e?t.height:i;return Sb()&&e&&(o/=window.devicePixelRatio,n/=window.devicePixelRatio),{dragPreviewWidth:n,dragPreviewHeight:o}}function JN(e,t,s,i,n){const o=XN(t),a=Rb(o?e:t),l={x:s.x-a.x,y:s.y-a.y},{offsetWidth:c,offsetHeight:d}=e,{anchorX:u,anchorY:h}=i,{dragPreviewWidth:g,dragPreviewHeight:m}=QN(o,t,c,d),v=()=>{let F=new Mm([0,.5,1],[l.y,l.y/d*m,l.y+m-d]).interpolate(h);return Sb()&&o&&(F+=(window.devicePixelRatio-1)*m),F},C=()=>new Mm([0,.5,1],[l.x,l.x/c*g,l.x+g-c]).interpolate(u),{offsetX:w,offsetY:b}=n,x=w===0||w,y=b===0||b;return{x:x?w:C(),y:y?b:v()}}class eH{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 tH(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Am(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable}))),i.forEach(function(n){tH(e,n,s[n])})}return e}class sH{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,i){return this.sourcePreviewNodeOptions.set(t,i),this.sourcePreviewNodes.set(t,s),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,s,i){this.sourceNodes.set(t,s),this.sourceNodeOptions.set(t,i);const n=r=>this.handleDragStart(r,t),o=r=>this.handleSelectStart(r);return s.setAttribute("draggable","true"),s.addEventListener("dragstart",n),s.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),s.removeEventListener("dragstart",n),s.removeEventListener("selectstart",o),s.setAttribute("draggable","false")}}connectDropTarget(t,s){const i=r=>this.handleDragEnter(r,t),n=r=>this.handleDragOver(r,t),o=r=>this.handleDrop(r,t);return s.addEventListener("dragenter",i),s.addEventListener("dragover",n),s.addEventListener("drop",o),()=>{s.removeEventListener("dragenter",i),s.removeEventListener("dragover",n),s.removeEventListener("drop",o)}}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 Am({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 Am({anchorX:.5,anchorY:.5,captureDraggingState:!1},s||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Im).some(s=>Im[s]===t)}beginDragNativeItem(t,s){this.clearCurrentDragSourceNode(),this.currentNativeSource=KN(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 i;return(i=this.rootElement)===null||i===void 0?void 0:i.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,i){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=n=>{const o=this.sourceNodes.get(n);return o&&Rb(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=n=>!!(n&&this.document&&this.document.body&&this.document.body.contains(n)),this.endDragIfSourceWasRemovedFromDOM=()=>{const n=this.currentDragSourceNode;n==null||this.isNodeInDocument(n)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=n=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(n||[],{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=n=>{if(n.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const r=al(n);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:a}=n,l=pu(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:m,offsetX:v,offsetY:C}=this.getCurrentSourcePreviewNodeOptions(),x=JN(u,h,r,{anchorX:g,anchorY:m},{offsetX:v,offsetY:C});a.setDragImage(h,x.x,x.y)}}try{a?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(n.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&&(n.target&&!n.target.hasAttribute||!n.target.hasAttribute("draggable")))return;n.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=n=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(n.dataTransfer)}if(!this.enterLeaveCounter.enter(n.target)||this.monitor.isDragging())return;const{dataTransfer:a}=n,l=pu(a);l&&this.beginDragNativeItem(l,a)},this.handleTopDragEnter=n=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=n.altKey,o.length>0&&this.actions.hover(o,{clientOffset:al(n)}),o.some(a=>this.monitor.canDropOnTarget(a))&&(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=n=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(n.dataTransfer)}},this.handleTopDragOver=n=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="none");return}this.altKeyPressed=n.altKey,this.lastClientOffset=al(n),this.scheduleHover(o),(o||[]).some(a=>this.monitor.canDropOnTarget(a))?(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?n.preventDefault():(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=n=>{this.isDraggingNativeItem()&&n.preventDefault(),this.enterLeaveCounter.leave(n.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=n=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;n.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(n.dataTransfer)}else pu(n.dataTransfer)&&n.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=n=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:al(n)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=n=>{const o=n.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(n.preventDefault(),o.dragDrop()))},this.options=new eH(s,i),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new $N(this.isNodeInDocument)}}const iH=function(t,s,i){return new sH(t,s,i)},nH=({onChange:e,emptyTextFirstLine:t,emptyTextSecondLine:s,emptyButtonLabel:i,acceptTypes:n,maxFilesCount:o,multiple:r,fileFormatError:a,fileCountError:l,fileSizeError:c,getIsFileFormatError:d,getIsFileSizeError:u})=>{const h=p.useRef(null),g=p.useRef(null),[m,v]=p.useState([]),[C,w]=p.useState(!1),[b,x]=p.useState(!1),y=p.useCallback(H=>{const W=H.target.files;if(W&&W.length>0){const V=Array.from(W),Z=d?.(V),L=u?.(V);Z?w(!0):L?x(!0):e(V)}},[d,u,e]),S=p.useCallback(H=>o&&H?.length>o,[o]),F=p.useMemo(()=>C||b||S(m),[C,b,S,m]),R=()=>{v([]),w(!1),x(!1)},E=p.useMemo(()=>C?f.jsx(ds,{text:a}):b?f.jsx(ds,{text:c}):S(m)?f.jsx(ds,{text:l}):null,[l,a,c,m,S,C,b]);p.useEffect(()=>{R()},[n]);const[{isOver:D,canDrop:T},P]=Ev(()=>({accept:[Yp],drop(H){const W=H.files;!d?.(W)&&!u?.(W)&&!S(W)&&e(W),R()},collect:H=>({isOver:H.isOver(),canDrop:H.canDrop()})}),[y]),k=H=>{(H.key==="Enter"||H.key==="Space")&&(H.preventDefault(),g.current?.click())},A=H=>{H?.preventDefault();const W=Array.from(H.dataTransfer?.items??[]);w(!!d?.(W)),x(!!u?.(W)),v(W)},U=H=>{H.target===H.currentTarget&&R()},I=ae("border border-dashed rounded w-full cursor-pointer relative h-full hover:border-hover",!T&&!F&&"border-primary",T&&(D?"border-accent-primary":"border-hover"),F&&"border-error");return P(h),f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:I,ref:h,onDragOver:A,onDragLeave:U,children:[f.jsxs("label",{htmlFor:"file",tabIndex:0,onKeyDown:k,className:"flex flex-col items-center cursor-pointer size-full text-secondary dial-tiny-text justify-center",children:[t&&f.jsx("p",{className:"mb-1",children:t}),s&&f.jsx("p",{className:"mb-0.5",children:s}),i&&f.jsx(Hs,{appearance:Ae.Ghost,label:i,onClick:()=>g.current?.click()})]}),f.jsx("input",{multiple:r,id:"file",type:"file",ref:g,hidden:!0,accept:n,onChange:y})]}),f.jsx(f.Fragment,{children:E})]})},oH=({iconBefore:e,className:t,...s})=>{const i=s.invalid,n=()=>f.jsx("div",{className:"mr-2",children:i?f.jsx(j.IconExclamationCircle,{...te,className:"text-error"}):e});return f.jsx(oi,{...s,iconBefore:n(),containerClassName:"h-[40px] p-0",className:ae("rounded-r-none border-r-0",i&&"text-error",t)})},Fb=e=>{const{files:t,iconBeforeInput:s,dynamicIcon:i,onChange:n,isInvalid:o,errorText:r,removeButtonAriaLabel:a,getIsMultiFilesSizeError:l,multiFilesSizeError:c}=e,d=(g,m)=>{g.stopPropagation(),n(t?.filter(v=>v.name!==m)||[])},u=g=>f.jsx(Hc,{"aria-label":a,onClick:m=>d(m,g)}),h=g=>{n(g)};return!t||t.length===0?f.jsx(nS,{backend:iH,children:f.jsx(nH,{...e,onChange:h})}):f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"flex-1 min-h-0 border border-solid border-primary rounded p-2 overflow-y-auto",children:t&&t.length>0&&f.jsx("div",{className:"flex flex-col gap-y-1",children:t.map((g,m)=>f.jsx(oH,{id:g.name,value:g.name,iconAfter:u(g.name),iconBefore:s||i?.(g.name),invalid:o?.(g),error:o?.(g)?r:""},g.name+m))})}),l?.(t)&&f.jsx(ds,{text:c})]})},rH=({onChange:e,fieldTitle:t,elementId:s,files:i,maxFilesCount:n,maxFileSize:o,maxMultiFilesSize:r,fileFormatError:a,fileCountError:l,fileSizeError:c,multiFilesSizeError:d,multiple:u=!0,acceptTypes:h,deleteAllButtonLabel:g,addButtonLabel:m,additionalActionButtons:v,...C})=>{const w=p.useRef(null),b=()=>w.current?.click(),x=()=>{e([])},y=p.useCallback(E=>E?.some(D=>!(h==="/"||h?.toLowerCase()?.includes(D?.type?.toLowerCase()))),[h]),S=p.useCallback(E=>{if(!o)return!1;const D=o*(1024*1024);return E?.some(T=>{const P=T.size;return!!P&&P>D})},[o]),F=p.useCallback(E=>{if(!r||!u)return!1;const D=r*1024*1024;return E.reduce((P,k)=>P+k.size,0)>D},[r,u]),R=p.useCallback(E=>{const D=E.target.files;if(D&&D.length>0){const T=Array.from(D),P=y(T),k=S(T);!P&&!k&&e([...i||[],...T])}},[y,S,e,i]);return f.jsxs("div",{className:"h-full flex flex-col",children:[f.jsxs("div",{className:"flex justify-between items-center pb-1 min-h-[42px]",children:[f.jsx(Pn,{label:`${t}: ${u?i?.length||0:""}`,htmlFor:s}),u&&!!i?.length&&f.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[f.jsx(Ws,{label:g,iconBefore:f.jsx(j.IconTrashX,{...te}),onClick:x}),(n?n>i?.length:!0)&&f.jsx(Hs,{appearance:Ae.Ghost,iconBefore:f.jsx(j.IconPlus,{...te}),label:m,onClick:b}),v]})]}),i&&i.length>0&&f.jsx("input",{id:"file",type:"file",multiple:u,ref:w,hidden:!0,accept:h,onChange:R}),f.jsx(Fb,{files:i,onChange:e,acceptTypes:h,maxFilesCount:n,multiple:u,fileFormatError:a,fileCountError:l,fileSizeError:c,multiFilesSizeError:d,getIsFileFormatError:y,getIsFileSizeError:S,getIsMultiFilesSizeError:F,...C})]})},aH=f.jsx(j.IconChevronDown,{size:ct.SM}),lH=f.jsx(j.IconChevronUp,{size:ct.SM}),Ch=({variant:e,appearance:t,items:s,...i})=>{const[n,o]=p.useState(!1),r=p.useMemo(()=>n?lH:aH,[n]);return f.jsx("div",{children:f.jsx(Tt,{menu:{items:s},onOpenChange:a=>o(a),children:f.jsx(us,{...i,iconAfter:r,variant:e||Ye.Primary,appearance:t||Ae.Solid})})})},cH=({menu:e,icon:t,ariaLabel:s,size:i=nt.Standard,disabled:n=!1,className:o,buttonClassName:r,iconClassName:a,caretIcon:l=f.jsx(j.IconChevronDown,{size:ct.SM}),showCaret:c=!0,placement:d="bottom-start",matchReferenceWidth:u=!1,open:h,onOpenChange:g,defaultOpen:m=!1,...v})=>{const C=i===nt.Small,[w,b]=p.useState(m),x=h??w,y=C?"w-8 px-0":"w-10 px-0",S=F=>{b(F),g?.(F)};return f.jsx(Tt,{...v,menu:e,disabled:n,placement:d,matchReferenceWidth:u,className:o,open:x,onOpenChange:S,defaultOpen:m,children:f.jsxs("button",{type:"button","aria-label":s,disabled:n,className:J("group flex items-center justify-center rounded border border-transparent bg-layer-4 text-primary","enabled:hover:bg-accent-primary-alpha enabled:active:bg-controls-accent-primary-alpha-active","focus-visible:border-focus focus-visible:outline-none disabled:cursor-not-allowed disabled:text-controls-secondary-disable disabled:opacity-75",C?"h-8 px-2":"h-10 px-2",c?void 0:y,r),children:[f.jsx(Be,{icon:t,className:J("flex items-center justify-center text-inherit",C?"size-5":"size-6",c&&"-mr-2",a)}),c&&f.jsxs("div",{className:"relative z-10 inline-grid size-5 shrink-0 place-items-center",children:[f.jsx("div",{className:"absolute inset-0 rounded-full bg-layer-4"}),f.jsx(Be,{icon:l,className:J("relative flex items-center justify-center text-secondary transition-transform group-hover:text-primary group-disabled:text-controls-secondary-disable",x&&"rotate-180")})]})]})})},Eb=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.1812 1.2002H2.80615C2.43319 1.2002 2.07551 1.34835 1.81178 1.61208C1.54806 1.8758 1.3999 2.23348 1.3999 2.60645V5.48145C1.3999 5.85441 1.54806 6.21209 1.81178 6.47581C2.07551 6.73954 2.43319 6.8877 2.80615 6.8877H15.1812C15.5541 6.8877 15.9118 6.73954 16.1755 6.47581C16.4392 6.21209 16.5874 5.85441 16.5874 5.48145V2.60645C16.5874 2.23348 16.4392 1.8758 16.1755 1.61208C15.9118 1.34835 15.5541 1.2002 15.1812 1.2002ZM14.8999 5.2002H3.0874V2.8877H14.8999V5.2002ZM12 7.80017C12.3107 7.80017 12.5625 8.05201 12.5625 8.36267V11.7377H15.9375C16.2482 11.7377 16.5 11.9895 16.5 12.3002C16.5 12.6108 16.2482 12.8627 15.9375 12.8627H12.5625V16.2377C12.5625 16.5483 12.3107 16.8002 12 16.8002C11.6893 16.8002 11.4375 16.5483 11.4375 16.2377V12.8627H8.0625C7.75184 12.8627 7.5 12.6108 7.5 12.3002C7.5 11.9895 7.75184 11.7377 8.0625 11.7377H11.4375V8.36267C11.4375 8.05201 11.6893 7.80017 12 7.80017ZM2.41188 12.5883C2.14816 12.3246 2 11.9669 2 11.5939V9.00018H3.6875V11.3127H6.1001V13.0002H3.40625C3.03329 13.0002 2.6756 12.852 2.41188 12.5883Z",fill:"currentColor"})),Db=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.createElement("path",{d:"M9.00049 7.7998C9.3108 7.80007 9.56279 8.05198 9.56299 8.3623V11.7373H12.938C13.2483 11.7376 13.5003 11.9895 13.5005 12.2998C13.5005 12.6103 13.2484 12.862 12.938 12.8623H9.56299V16.2373C9.56299 16.5478 9.31092 16.7995 9.00049 16.7998C8.68983 16.7998 8.43799 16.548 8.43799 16.2373V12.8623H5.06299C4.75233 12.8623 4.50049 12.6105 4.50049 12.2998C4.50069 11.9893 4.75245 11.7373 5.06299 11.7373H8.43799V8.3623C8.43819 8.05181 8.68995 7.7998 9.00049 7.7998ZM15.1812 1.2002C15.5541 1.2002 15.9116 1.34858 16.1753 1.6123C16.439 1.87603 16.5874 2.23348 16.5874 2.60645V5.48145C16.5874 5.85441 16.439 6.21186 16.1753 6.47559C15.9116 6.73931 15.5541 6.8877 15.1812 6.8877H2.80615C2.43319 6.8877 2.07573 6.73931 1.81201 6.47559C1.54829 6.21186 1.3999 5.85441 1.3999 5.48145V2.60645C1.3999 2.23348 1.54829 1.87603 1.81201 1.6123C2.07573 1.34858 2.43319 1.2002 2.80615 1.2002H15.1812ZM3.0874 2.8877V5.2002H14.8999V2.8877H3.0874Z",fill:"currentColor"})),Zp=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.createElement("path",{d:"M3.009 12.5527C2.77901 12.4216 2.5877 12.2321 2.45443 12.0034C2.32116 11.7746 2.25064 11.5147 2.25 11.25V3.75C2.25 2.925 2.925 2.25 3.75 2.25H11.25C11.8125 2.25 12.1185 2.53875 12.375 3M10.5 15.75H7.25025C6.98757 15.75 6.72747 15.6983 6.48479 15.5977C6.24211 15.4972 6.0216 15.3499 5.83586 15.1641C5.65012 14.9784 5.50278 14.7579 5.40226 14.5152C5.30174 14.2725 5.25 14.0124 5.25 13.7498V7.25025C5.25 6.71975 5.46074 6.21098 5.83586 5.83586C6.21098 5.46074 6.71975 5.25 7.25025 5.25H13.7498C14.0124 5.25 14.2725 5.30174 14.5152 5.40226C14.7579 5.50278 14.9784 5.65012 15.1641 5.83586C15.3499 6.0216 15.4972 6.24211 15.5977 6.48479C15.6983 6.72747 15.75 6.98757 15.75 7.25025V10.5M12.75 16.5L16.5 12.75M16.5 12.75V16.125M16.5 12.75H13.125",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Xp=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.createElement("path",{d:"M9.75 14.25H3.75C3.35218 14.25 2.97064 14.092 2.68934 13.8107C2.40804 13.5294 2.25 13.1478 2.25 12.75V4.5C2.25 4.10218 2.40804 3.72064 2.68934 3.43934C2.97064 3.15804 3.35218 3 3.75 3H6.75L9 5.25H14.25C14.6478 5.25 15.0294 5.40804 15.3107 5.68934C15.592 5.97064 15.75 6.35218 15.75 6.75V9.75M12 16.5L15.75 12.75M15.75 12.75V16.125M15.75 12.75H12.375",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Qp=e=>ye.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ye.createElement("path",{d:"M4.5 15.75V14.25C4.5 13.4544 4.81607 12.6913 5.37868 12.1287C5.94129 11.5661 6.70435 11.25 7.5 11.25H9.75M15.75 12.75L12 16.5M12 16.5V13.125M12 16.5H15.375M6 5.25C6 6.04565 6.31607 6.80871 6.87868 7.37132C7.44129 7.93393 8.20435 8.25 9 8.25C9.79565 8.25 10.5587 7.93393 11.1213 7.37132C11.6839 6.80871 12 6.04565 12 5.25C12 4.45435 11.6839 3.69129 11.1213 3.12868C10.5587 2.56607 9.79565 2.25 9 2.25C8.20435 2.25 7.44129 2.56607 6.87868 3.12868C6.31607 3.69129 6 4.45435 6 5.25Z",stroke:"#7F8792",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));var lo=(e=>(e.MyFiles="my_files",e.Shared="shared",e.Organization="organization",e.Review="review",e))(lo||{}),Y=(e=>(e.AddSibling="addSibling",e.AddChild="addChild",e.Duplicate="duplicate",e.Copy="copy",e.Move="move",e.Download="download",e.Delete="delete",e.Rename="rename",e.Info="info",e.Unshare="unshare",e.RemoveAccess="removeAccess",e.ManagePermissions="managePermissions",e.Preview="preview",e.OpenInNewTab="openInNewTab",e))(Y||{}),gt=(e=>(e.Replace="replace",e.Duplicate="duplicate",e.Cancel="cancel",e))(gt||{}),Ut=(e=>(e.ReplaceAll="replaceAll",e.DuplicateAll="duplicateAll",e.DecideForEach="decideForEach",e))(Ut||{}),ft=(e=>(e.Copy="copy",e.Move="move",e))(ft||{}),xo=(e=>(e.Tree="tree",e.Grid="grid",e))(xo||{}),Ji=(e=>(e.Tree="tree",e.Grid="grid",e))(Ji||{}),fs=(e=>(e.Folder="folder",e.Child="child",e.Sibling="sibling",e))(fs||{}),mt=(e=>(e.Name="name",e.UpdatedAt="updatedAt",e.Size="size",e.Author="author",e.Owner="owner",e.Path="path",e.Actions="__actions",e.Version="version",e))(mt||{});const dH="w-full h-full grid grid-rows-[auto_1fr] gap-5 p-6 overflow-hidden min-w-0 bg-layer-1",Lm="w-full text-secondary flex items-center gap-2",uH="flex min-h-0 min-w-0 h-full gap-4 overflow-hidden",hH="flex flex-col flex-1 min-h-0 min-w-0 h-full gap-4",pH="h-full rounded bg-layer-3 text-secondary min-w-0",gH="flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0",fH="opacity-0 pointer-events-none group-hover/grid-row:opacity-100 group-hover/grid-row:pointer-events-auto",mH=280,vH="Files",Ri=20,CH="Files",gu=".dial_folder",Om="New folder",wH=280,bH=460,Nm=44,xH=800,yH=[mt.Name,mt.UpdatedAt,mt.Size,mt.Author,mt.Actions];var Ce=(e=>(e.ITEM="item",e.FOLDER="folder",e))(Ce||{}),Jp=(e=>(e.FILE="FILE",e.PROMPT="PROMPT",e.CONVERSATION="CONVERSATION",e.APPLICATION="APPLICATION",e.TOOLSET="TOOL_SET",e))(Jp||{}),An=(e=>(e.READ="READ",e.WRITE="WRITE",e.SHARE="SHARE",e))(An||{});const Hm=({open:e,onClose:t,onReplace:s,onDuplicate:i,onDecideForEach:n,conflictingFiles:o,singleFileTitle:r="Replace Or Duplicate Item",multipleFilesTitle:a="Replace Or Duplicate Items",message:l,actionLabels:c,strategyLabels:d,confirmLabel:u="Confirm",cancelLabel:h="Cancel",nameColumnLabel:g="Name",actionColumnLabel:m="Action"})=>{const v=o.length===1,C=v?o[0]?.name:"",w=c?.[gt.Replace]??"Replace",b=c?.[gt.Duplicate]??"Duplicate",x=c?.[gt.Cancel]??"Cancel",y=d?.[Ut.ReplaceAll]??"Replace all",S=d?.[Ut.DuplicateAll]??"Duplicate all",F=d?.[Ut.DecideForEach]??"Decide for each",[R,E]=p.useState(gt.Replace),[D,T]=p.useState(Ut.ReplaceAll),[P,k]=p.useState(new Map(o.map(N=>[N.path,gt.Replace]))),[A,U]=p.useState(void 0),I=v?r:a,H=f.jsxs(f.Fragment,{children:["Item with the name ",f.jsxs("span",{className:"text-primary",children:['"',C,'"']})," ","already exists in this destination."]}),W=`${o.length} items with the same names already exist in this destination.`,V=l??(v?H:W),Z=p.useMemo(()=>[{id:gt.Replace,name:w},{id:gt.Duplicate,name:b}],[w,b]),L=p.useMemo(()=>o.map(N=>({id:N.path,name:N.name,path:N.path,nodeType:N.nodeType??Ce.ITEM,action:P.get(N.path)||gt.Replace})),[o,P]),M=p.useMemo(()=>[{field:"name",headerName:g,flex:1,minWidth:200,floatingFilter:!1,filter:!1,resizable:!1,cellRenderer:N=>N.data?.nodeType===Ce.FOLDER?f.jsx(vc,{name:N.data.name,iconSize:Ri}):f.jsx(mc,{name:N.data.name,iconSize:Ri})},{field:"action",headerName:m,width:140,suppressSizeToFit:!0,sortable:!1,filter:!1,floatingFilter:!1,resizable:!1,cellRenderer:N=>{if(!N.data)return null;const oe=[{key:gt.Replace,label:w,icon:f.jsx(j.IconCircleFilled,{size:10,className:"text-accent-tertiary"})},{key:gt.Duplicate,label:b,icon:f.jsx(j.IconCircleFilled,{size:10,className:"text-accent-secondary"})},{key:gt.Cancel,label:x,icon:f.jsx(j.IconCircleFilled,{size:10,className:"text-error"})}],Te=oe.find(le=>le.key===N.data.action),ee=A===N.data.path;return f.jsx("div",{className:"flex items-center h-full",children:f.jsx(Tt,{trigger:[Kt.Click],open:ee,menu:{items:oe,onClick:({key:le})=>{k($=>{const he=new Map($);return he.set(N.data.path,le),he}),U(void 0)}},placement:"bottom-start",matchReferenceWidth:!1,allowedPlacements:["bottom-start","top-start"],onOpenChange:le=>{U(le?N.data.path:void 0)},children:f.jsxs("button",{type:"button",className:"flex items-center gap-2",children:[f.jsxs("span",{className:"flex items-center gap-2",children:[Te?.icon,Te?.label??w]}),f.jsx(j.IconChevronDown,{size:ct.SM,className:ae("text-secondary transition-transform",ee&&"rotate-180")})]})})})}}],[g,m,w,b,x,A]),z=p.useMemo(()=>[{id:Ut.ReplaceAll,name:y},{id:Ut.DuplicateAll,name:S},{id:Ut.DecideForEach,name:F,content:D===Ut.DecideForEach?f.jsx("div",{className:"mt-4",children:f.jsx(Up,{columnDefs:M,rowData:L,getRowId:N=>N.id,wrapCustomCellRenderers:!1,alternateOddRowColors:!1,additionalGridOptions:{domLayout:"autoHeight"}})}):void 0}],[y,S,F,D,M,L]),K=p.useCallback(()=>{E(gt.Replace),T(Ut.ReplaceAll),k(new Map(o.map(N=>[N.path,gt.Replace])))},[o]),ie=p.useCallback(()=>{K(),t()},[K,t]),we=p.useCallback(()=>{if(K(),v)R===gt.Replace?s():i();else if(D===Ut.ReplaceAll)s();else if(D===Ut.DuplicateAll)i();else if(D===Ut.DecideForEach&&n){const N=o.map(oe=>({file:oe,action:P.get(oe.path)||gt.Replace}));n(N)}},[K,v,R,s,i,D,n,o,P]);return f.jsx(Mn,{open:e,onClose:ie,size:v?Zt.Sm:Zt.Md,className:ae([!v&&"w-[600px]"]),header:I,dividers:!1,preventKeyboardOnOpen:!0,footer:f.jsxs("div",{className:"flex justify-end gap-3 py-4 px-6 border-t border-tertiary",children:[f.jsx(Ws,{onClick:ie,label:h}),f.jsx(Hs,{onClick:we,label:u})]}),children:f.jsxs("div",{className:"px-6 py-4",children:[f.jsx("p",{className:"text-secondary mb-4 break-words",children:V}),v?f.jsx(Dl,{elementId:"single-file-conflict",radioButtons:Z,activeRadioButton:R,orientation:hn.Column,onChange:N=>E(N)}):f.jsx(Dl,{elementId:"multiple-files-conflict",radioButtons:z,activeRadioButton:D,orientation:hn.Column,onChange:N=>T(N),formItemChildrenClassName:"gap-3"})]})})},SH=({getContextMenuItems:e,isRowDisabled:t,allowedFileTypes:s,maxSelectableFileSize:i,buttonClassName:n})=>{const o=p.useRef(e);p.useEffect(()=>{o.current=e},[e]);const r=p.useCallback(l=>{if(!l.data||t(l.data,s,i))return null;const d=l.data?o.current?.(l.data)??[]:[];return d.length?f.jsx(Tt,{placement:"bottom-start",allowedPlacements:["top-start","top-end","bottom-start"],menu:{items:d},className:J("sticky right-0",n),children:f.jsx(Be,{className:"text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary cursor-default",icon:f.jsx(j.IconDotsVertical,{...te})})}):null},[s,i,n,t]);return{actionsColumnDef:p.useMemo(()=>({colId:"__actions",headerName:"",width:44,minWidth:44,maxWidth:44,suppressSizeToFit:!0,sortable:!1,resizable:!1,filter:!1,floatingFilter:!1,cellRenderer:r}),[r])}},RH=({onRename:e})=>{const[t,s]=p.useState(xo.Grid),i=p.useCallback(o=>{e(o),s(xo.Grid)},[e]),n=p.useCallback(o=>{e(o),s(xo.Tree)},[e]);return{renameTriggerView:t,onGridRename:i,onTreeRename:n}};function FH(e,t){const s=p.useRef(null),[i,n]=p.useState(!1);return p.useEffect(()=>{if(!s.current)return;const o=new ResizeObserver(([r])=>{const a=r.contentRect.width;n(a<e)});return o.observe(t?.current||s?.current),()=>o.disconnect()},[e,t]),{containerRef:s,isBelowBreakpoint:i}}var fu={};const EH={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/ace+json":{source:"iana",compressible:!0},"application/ace-groupcomm+cbor":{source:"iana"},"application/ace-trl+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/aif+cbor":{source:"iana"},"application/aif+json":{source:"iana",compressible:!0},"application/alto-cdni+json":{source:"iana",compressible:!0},"application/alto-cdnifilter+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-propmap+json":{source:"iana",compressible:!0},"application/alto-propmapparams+json":{source:"iana",compressible:!0},"application/alto-tips+json":{source:"iana",compressible:!0},"application/alto-tipsparams+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/appinstaller":{compressible:!1,extensions:["appinstaller"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/appx":{compressible:!1,extensions:["appx"]},"application/appxbundle":{compressible:!1,extensions:["appxbundle"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/automationml-aml+xml":{source:"iana",compressible:!0,extensions:["aml"]},"application/automationml-amlx+zip":{source:"iana",compressible:!1,extensions:["amlx"]},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/bufr":{source:"iana"},"application/c2pa":{source:"iana"},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/ce+cbor":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/cid-edhoc+cbor-seq":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/city+json-seq":{source:"iana"},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-eap":{source:"iana"},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/concise-problem-details+cbor":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cose-x509":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwl":{source:"iana",extensions:["cwl"]},"application/cwl+json":{source:"iana",compressible:!0},"application/cwl+yaml":{source:"iana"},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana",extensions:["dcm"]},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dpop+jwt":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/eat+cwt":{source:"iana"},"application/eat+jwt":{source:"iana"},"application/eat-bun+cbor":{source:"iana"},"application/eat-bun+json":{source:"iana",compressible:!0},"application/eat-ucs+cbor":{source:"iana"},"application/eat-ucs+json":{source:"iana",compressible:!0},"application/ecmascript":{source:"apache",compressible:!0,extensions:["ecma"]},"application/edhoc+cbor-seq":{source:"iana"},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.legacyesn+json":{source:"iana",compressible:!0},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/entity-statement+jwt":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdf":{source:"iana",extensions:["fdf"]},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geopose+json":{source:"iana",compressible:!0},"application/geoxacml+json":{source:"iana",compressible:!0},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gnap-binding-jws":{source:"iana"},"application/gnap-binding-jwsd":{source:"iana"},"application/gnap-binding-rotation-jws":{source:"iana"},"application/gnap-binding-rotation-jwsd":{source:"iana"},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/grib":{source:"iana"},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"iana",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"apache",charset:"UTF-8",compressible:!0,extensions:["js"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/jscontact+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jsonpath":{source:"iana"},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwk-set+jwt":{source:"iana"},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/linkset":{source:"iana"},"application/linkset+json":{source:"iana",compressible:!0},"application/load-control+xml":{source:"iana",compressible:!0},"application/logout+jwt":{source:"iana"},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4","mpg4","mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msix":{compressible:!1,extensions:["msix"]},"application/msixbundle":{compressible:!1,extensions:["msixbundle"]},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!0,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/ohttp-keys":{source:"iana"},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg","one","onea"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["sig","asc"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/private-token-issuer-directory":{source:"iana"},"application/private-token-request":{source:"iana"},"application/private-token-response":{source:"iana"},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/provided-claims+jwt":{source:"iana"},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.implied-document+xml":{source:"iana",compressible:!0},"application/prs.implied-executable":{source:"iana"},"application/prs.implied-object+json":{source:"iana",compressible:!0},"application/prs.implied-object+json-seq":{source:"iana"},"application/prs.implied-object+yaml":{source:"iana"},"application/prs.implied-structure":{source:"iana"},"application/prs.mayfile":{source:"iana"},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.vcfbzip2":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0,extensions:["xsf"]},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"apache"},"application/reputon+json":{source:"iana",compressible:!0},"application/resolve-response+jwt":{source:"iana"},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-checklist":{source:"iana"},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-signed-tal":{source:"iana"},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"apache"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana",extensions:["sql"]},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/sslkeylogfile":{source:"iana"},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/st2110-41":{source:"iana"},"application/stix+json":{source:"iana",compressible:!0},"application/stratum":{source:"iana"},"application/swid+cbor":{source:"iana"},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tm+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/toc+cbor":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{source:"iana",compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/trust-chain+json":{source:"iana",compressible:!0},"application/trust-mark+jwt":{source:"iana"},"application/trust-mark-delegation+jwt":{source:"iana"},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/uccs+cbor":{source:"iana"},"application/ujcs+json":{source:"iana",compressible:!0},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vc":{source:"iana"},"application/vc+cose":{source:"iana"},"application/vc+jwt":{source:"iana"},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.1ob":{source:"iana"},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3a+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ach+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc8+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.5gsa2x":{source:"iana"},"application/vnd.3gpp.5gsa2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gsv2x":{source:"iana"},"application/vnd.3gpp.5gsv2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.crs+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.current-location-discovery+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-regroup+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-regroup+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-regroup+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.pinapp-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.seal-group-doc+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-network-qos-management-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-ue-config-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-unicast-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-user-profile-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.v2x":{source:"iana"},"application/vnd.3gpp.vae-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acm.addressxfer+json":{source:"iana",compressible:!0},"application/vnd.acm.chatbot+json":{source:"iana",compressible:!0},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"apache",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"apache"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.parquet":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.apexlang":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"apache"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autodesk.fbx":{extensions:["fbx"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.belightsoft.lhzd+zip":{source:"iana",compressible:!1},"application/vnd.belightsoft.lhzl+zip":{source:"iana",compressible:!1},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.bzip3":{source:"iana"},"application/vnd.c3voc.schedule+xml":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.cncf.helm.chart.content.v1.tar+gzip":{source:"iana"},"application/vnd.cncf.helm.chart.provenance.v1.prov":{source:"iana"},"application/vnd.cncf.helm.config.v1+json":{source:"iana",compressible:!0},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datalog":{source:"iana"},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.dcmp+xml":{source:"iana",compressible:!0,extensions:["dcmp"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.eln+zip":{source:"iana",compressible:!1},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.erofs":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"apache",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.fdsn.stationxml+xml":{source:"iana",charset:"XML-BASED",compressible:!0},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.freelog.comic":{source:"iana"},"application/vnd.frogans.fnc":{source:"apache",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"apache",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.ga4gh.passport+jwt":{source:"iana"},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.genozip":{source:"iana"},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.gentoo.catmetadata+xml":{source:"iana",compressible:!0},"application/vnd.gentoo.ebuild":{source:"iana"},"application/vnd.gentoo.eclass":{source:"iana"},"application/vnd.gentoo.gpkg":{source:"iana"},"application/vnd.gentoo.manifest":{source:"iana"},"application/vnd.gentoo.pkgmetadata+xml":{source:"iana",compressible:!0},"application/vnd.gentoo.xpak":{source:"iana"},"application/vnd.geo+json":{source:"apache",compressible:!0},"application/vnd.geocube+xml":{source:"apache",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.pinboard":{source:"iana"},"application/vnd.geogebra.slides":{source:"iana",extensions:["ggs"]},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.gnu.taler.exchange+json":{source:"iana",compressible:!0},"application/vnd.gnu.taler.merchant+json":{source:"iana",compressible:!0},"application/vnd.google-apps.audio":{},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.drawing":{compressible:!1,extensions:["gdraw"]},"application/vnd.google-apps.drive-sdk":{compressible:!1},"application/vnd.google-apps.file":{},"application/vnd.google-apps.folder":{compressible:!1},"application/vnd.google-apps.form":{compressible:!1,extensions:["gform"]},"application/vnd.google-apps.fusiontable":{},"application/vnd.google-apps.jam":{compressible:!1,extensions:["gjam"]},"application/vnd.google-apps.mail-layout":{},"application/vnd.google-apps.map":{compressible:!1,extensions:["gmap"]},"application/vnd.google-apps.photo":{},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.script":{compressible:!1,extensions:["gscript"]},"application/vnd.google-apps.shortcut":{},"application/vnd.google-apps.site":{compressible:!1,extensions:["gsite"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-apps.unknown":{},"application/vnd.google-apps.video":{},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"apache",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0,extensions:["xdcf"]},"application/vnd.gpxsee.map+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.hsl":{source:"iana"},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"apache"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"apache",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"apache"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.ipfs.ipns-record":{source:"iana"},"application/vnd.ipld.car":{source:"iana"},"application/vnd.ipld.dag-cbor":{source:"iana"},"application/vnd.ipld.dag-json":{source:"iana"},"application/vnd.ipld.raw":{source:"iana"},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kdl":{source:"iana"},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.keyman.kmp+zip":{source:"iana",compressible:!1},"application/vnd.keyman.kmx":{source:"iana"},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.ldev.productlicensing":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.mdl":{source:"iana"},"application/vnd.mdl-mbsdf":{source:"iana"},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.medicalholodeck.recordxr":{source:"iana"},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mermaid":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.modl":{source:"iana"},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-visio.viewer":{extensions:["vdx"]},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msgpack":{source:"iana"},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.nato.bindingdataobject+cbor":{source:"iana"},"application/vnd.nato.bindingdataobject+json":{source:"iana",compressible:!0},"application/vnd.nato.bindingdataobject+xml":{source:"iana",compressible:!0,extensions:["bdo"]},"application/vnd.nato.openxmlformats-package.iepd+zip":{source:"iana",compressible:!1},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"apache",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oai.workflows":{source:"iana"},"application/vnd.oai.workflows+json":{source:"iana",compressible:!0},"application/vnd.oai.workflows+yaml":{source:"iana"},"application/vnd.oasis.opendocument.base":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"apache",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-master-template":{source:"iana"},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"apache",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"apache",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.onvif.metadata":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openvpi.dspx+json":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.procrate.brushset":{extensions:["brushset"]},"application/vnd.procreate.brush":{extensions:["brush"]},"application/vnd.procreate.dream":{extensions:["drm"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.pt.mundusmundi":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0,extensions:["xhtm"]},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.relpipe":{source:"iana"},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.sketchometry":{source:"iana"},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.smintio.portals.archive":{source:"iana"},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sybyl.mol2":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uic.osdm+json":{source:"iana",compressible:!0},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml","uo"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.veraison.tsm-report+cbor":{source:"iana"},"application/vnd.veraison.tsm-report+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw","vsdx","vtx"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vocalshaper.vsp4":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.wasmflow.wafl":{source:"iana"},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordlift":{source:"iana"},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xarin.cpj":{source:"iana"},"application/vnd.xecrets-encrypted":{source:"iana"},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/voucher-jws+json":{source:"iana",compressible:!0},"application/vp":{source:"iana"},"application/vp+cose":{source:"iana"},"application/vp+jwt":{source:"iana"},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blender":{extensions:["blend"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-compressed":{extensions:["rar"]},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-ipynb+json":{compressible:!0,extensions:["ipynb"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zip-compressed":{extensions:["zip"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xfdf":{source:"iana",extensions:["xfdf"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yaml":{source:"iana"},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+cbor":{source:"iana"},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yang-sid+json":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zip+dotlottie":{extensions:["lottie"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana",extensions:["adts","aac"]},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flac":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/matroska":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/midi-clip":{source:"iana"},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a","m4b"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"apache"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{source:"iana",compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp","dib"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/dpx":{source:"iana",extensions:["dpx"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/j2c":{source:"iana"},"image/jaii":{source:"iana",extensions:["jaii"]},"image/jais":{source:"iana",extensions:["jais"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpg","jpeg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm","jpgm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxl":{source:"iana",extensions:["jxl"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1,extensions:["jfif"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif","btf"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.clip":{source:"iana"},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"iana",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-adobe-dng":{extensions:["dng"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-emf":{source:"iana"},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-wmf":{source:"iana"},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/bhttp":{source:"iana"},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/mls":{source:"iana"},"message/news":{source:"apache"},"message/ohttp-req":{source:"iana"},"message/ohttp-res":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime","mht","mhtml"]},"message/s-http":{source:"apache"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"apache"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/jt":{source:"iana",extensions:["jt"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/prc":{source:"iana",extensions:["prc"]},"model/step":{source:"iana",extensions:["step","stp","stpnc","p21","210"]},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/u3d":{source:"iana",extensions:["u3d"]},"model/vnd.bary":{source:"iana",extensions:["bary"]},"model/vnd.cld":{source:"iana",extensions:["cld"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana",extensions:["pyo","pyox"]},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usda":{source:"iana",extensions:["usda"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"apache"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/hl7v2":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["md","markdown"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/prs.texi":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.exchangeable":{source:"iana"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"apache"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.vcf":{source:"iana"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vnd.zoo.kcl":{source:"iana"},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/wgsl":{source:"iana",extensions:["wgsl"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/evc":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/h266":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/lottie+json":{source:"iana",compressible:!0},"video/matroska":{source:"iana"},"video/matroska-3d":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts","m2t","m2ts","mts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.planar":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"apache"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}};var mu,Gm;function DH(){return Gm||(Gm=1,mu=EH),mu}const PH={},TH=Object.freeze(Object.defineProperty({__proto__:null,default:PH},Symbol.toStringTag,{value:"Module"})),kH=m0(TH);var vu,Bm;function IH(){if(Bm)return vu;Bm=1;var e={"prs.":100,"x-":200,"x.":300,"vnd.":400,default:900},t={nginx:10,apache:20,iana:40,default:30},s={application:1,font:2,audio:2,video:3,default:0};return vu=function(n,o="default"){if(n==="application/octet-stream")return 0;const[r,a]=n.split("/"),l=a.replace(/(\.|x-).*/,"$1"),c=e[l]||e.default,d=t[o]||t.default,u=s[r]||s.default,h=1-n.length/100;return c+d+u+h},vu}var Vm;function MH(){return Vm||(Vm=1,(function(e){var t=DH(),s=kH.extname,i=IH(),n=/^\s*([^;\s]*)(?:;|\s|$)/,o=/^text\//i;e.charset=r,e.charsets={lookup:r},e.contentType=a,e.extension=l,e.extensions=Object.create(null),e.lookup=c,e.types=Object.create(null),e._extensionConflicts=[],d(e.extensions,e.types);function r(g){if(!g||typeof g!="string")return!1;var m=n.exec(g),v=m&&t[m[1].toLowerCase()];return v&&v.charset?v.charset:m&&o.test(m[1])?"UTF-8":!1}function a(g){if(!g||typeof g!="string")return!1;var m=g.indexOf("/")===-1?e.lookup(g):g;if(!m)return!1;if(m.indexOf("charset")===-1){var v=e.charset(m);v&&(m+="; charset="+v.toLowerCase())}return m}function l(g){if(!g||typeof g!="string")return!1;var m=n.exec(g),v=m&&e.extensions[m[1].toLowerCase()];return!v||!v.length?!1:v[0]}function c(g){if(!g||typeof g!="string")return!1;var m=s("x."+g).toLowerCase().slice(1);return m&&e.types[m]||!1}function d(g,m){Object.keys(t).forEach(function(C){var w=t[C],b=w.extensions;if(!(!b||!b.length)){g[C]=b;for(var x=0;x<b.length;x++){var y=b[x];m[y]=u(y,m[y],C);const S=h(y,m[y],C);S!==m[y]&&e._extensionConflicts.push([y,S,m[y]])}}})}function u(g,m,v){var C=m?i(m,t[m].source):0,w=v?i(v,t[v].source):0;return C>w?m:v}function h(g,m,v){var C=["nginx","apache",void 0,"iana"],w=m?C.indexOf(t[m].source):0,b=v?C.indexOf(t[v].source):0;return e.types[l]!=="application/octet-stream"&&(w>b||w===b&&e.types[l]?.slice(0,12)==="application/")||w>b?m:v}})(fu)),fu}var zm=MH();const ti=(e,t)=>{if(!(!e||!e.length||!t))for(const s of e){if(s.path===t)return s;const i=ti(s.items,t);if(i)return i}},yo=(e,t)=>{if(!e?.length)return;if(!t)return e[0];const s=ti(e,t);if(s&&s.nodeType===Ce.FOLDER)return s;const i=t.split("/").filter(Boolean);if(i.length<=1)return e[0];const n="/"+i.slice(0,i.length-1).join("/");return ti(e,n)??e[0]},So=e=>(e??"").toLowerCase(),AH=e=>So(e).replace(/^\./,""),LH=e=>{if(!e)return[];const t=[],s=i=>{const n=i.items??[];for(const o of n)t.push(o),o.nodeType===Ce.FOLDER&&s(o)};return s(e),t},Pb=e=>(e.name??e.path.split("/").pop()??"").startsWith("."),Xr=e=>{if(!e)return"0 bytes";const t=1024,s=t*1024;return e>=s?`${(e/s).toFixed(1)} MB`:e>=t?`${(e/t).toFixed(0)} KB`:`${e} bytes`},OH=(e,t="en-US",s={year:"numeric",month:"short",day:"2-digit"})=>{if(!e)return"";try{return new Intl.DateTimeFormat(t,s).format(new Date(e))}catch{return e}};function eg(e,t,s){if(!e||e.includes("*/*"))return!0;const i=t.toLowerCase(),n=s&&s.includes(".")?`.${s.split(".").at(-1).toLowerCase()}`:void 0;return e.some(o=>{const r=o.toLowerCase();if(r.startsWith("."))return n===r;if(r.endsWith("/*")){const a=r.slice(0,-1);return i.startsWith(a)}return i===r})}const NH=e=>e?.map(t=>t.endsWith("/*")?t.replace("/*","s"):HH(t).flat().map(s=>`.${s}`)).flat().join(", ")||"",HH=e=>{const[t,s]=e.split("/");return t==="*"?["all"]:s==="*"?Object.entries(zm.extensions).reduce((i,[n,o])=>{const[r]=n.split("/");return r===t&&i.push(...o),i},[]):zm.extensions[e]||[]},Bc=e=>{if(!e)return;const t=e.flags.replace(/[gy]/g,"");return new RegExp(e.source,t)};function tg(e,t,s){if(t&&Bc(t)?.test(e.name))return s??`This ${e.isFolder?"folder":"file"} contains forbidden characters in its name. Please rename it.`}const GH=e=>{const t=e.lastIndexOf("/");return t>=0?{parent:e.slice(0,t),name:e.slice(t+1)}:{parent:"",name:e}},BH=(e,t,s)=>{const i=!e.contentLength||s==null||e.contentLength<=s,n=!e.contentType||eg(t,e.contentType,e.name);return i&&n},VH=(e,t,s,i,n)=>{if(e.nodeType===Ce.FOLDER)return;const o=!e.contentLength||s==null||e.contentLength<=s;if(!(!e.contentType||eg(t,e.contentType,e.name)))return i??(t?.length?`Unsupported file type. Supported types: ${NH(t)}.`:"Unsupported file type.");if(!o)return n??`File is too large. Maximum size: ${Xr(s)}.`},gr=e=>{const t=`${Om} `,s=new RegExp(`^${Om} (\\d+)$`),i=new Set(e.map(a=>a.name.toLowerCase())),n=e.map(a=>{const l=a.name.match(s);return l?parseInt(l[1],10):0}).reduce((a,l)=>Math.max(a,l),0);let o=`${t}${n+1}`,r=n+1;for(;i.has(o.toLowerCase());)r++,o=`${t}${r}`;return o},zH=e=>{const[t,s]=p.useState(e?.showHiddenFiles??!1),i=!!e?.onShowHiddenFilesChange,n=i?e.showHiddenFiles??!1:t,o=p.useCallback(a=>{i?e?.onShowHiddenFilesChange?.(a):s(a)},[i,e]),r=p.useCallback(()=>{const a=!n;i?e?.onShowHiddenFilesChange?.(a):s(a)},[n,i,e]);return{areHiddenFilesVisible:n,toggleHiddenFilesVisibility:r,setAreHiddenFilesVisible:o}},WH=e=>{const[t,s]=p.useState(e?.collapsed??!1),i=!!e?.onCollapseChange,n=i?e.collapsed??!1:t,o=p.useCallback(a=>{i?e?.onCollapseChange?.(a):s(a)},[i,e]),r=p.useCallback(()=>{const a=!n;i?e?.onCollapseChange?.(a):s(a)},[n,i,e]);return{isTreeCollapsed:n,toggleTreeCollapse:r,setIsTreeCollapsed:o}},Wm=(e,t,s)=>{if(!t.has(e))return e;const i=s===Ce.FOLDER?(n,o)=>`${n} (${o})`:(n,o)=>{const r=n.lastIndexOf("."),a=r>0,l=a?n.slice(0,r):n,c=a?n.slice(r):"";return`${l} (${o})${c}`};for(let n=1;;n++){const o=i(e,n);if(!t.has(o))return o}},Cu=e=>e.name,Tb=({getDestinationFiles:e,onResolve:t})=>{const[s,i]=p.useState([]),[n,o]=p.useState(!1),[r,a]=p.useState(null),l=p.useRef(!1),c=p.useCallback(x=>{l.current=!0,i(x),o(!0)},[]),d=p.useCallback(()=>{l.current=!1,o(!1),i([]),a(null)},[]),u=p.useCallback((x,y)=>{const S=e(x),F=new Set(S.map(Cu)),R=y.filter(E=>F.has(E.name));return{hasConflicts:R.length>0,conflicts:R}},[e]),h=p.useCallback((x,y,S,F)=>{const R=e(x),E=new Set(R.map(Cu));return y.map(D=>{const T=D.name,P=E.has(T),k=S&&P?T:Wm(T,E,D.nodeType);return(!S||!P)&&E.add(k),{sourceUrl:D.path,destinationUrl:`${x}/${k}`,overwrite:S&&P,nodeType:D.nodeType??Ce.ITEM,...F??{}}})},[e]),g=p.useCallback((x,y,S,F)=>{const R=e(x),E=new Set(R.map(Cu));return y.filter(T=>S.get(T.path)!==gt.Cancel).map(T=>{const P=S.get(T.path),k=E.has(T.name),A=P===gt.Replace&&k,U=A?T.name:Wm(T.name,E,T.nodeType);return A||E.add(U),{sourceUrl:T.path,destinationUrl:`${x}/${U}`,overwrite:A,nodeType:T.nodeType??Ce.ITEM,...F??{}}})},[e]),m=p.useCallback((x,y,S)=>{const F=u(x,y);return F.hasConflicts&&(a({files:y,destinationFolder:x,metadata:S}),c(F.conflicts)),F},[u,c]),v=p.useCallback(()=>{if(!r)return;const{files:x,destinationFolder:y,metadata:S}=r,F=h(y,x,!0,S);t?.(F,y),d()},[r,h,t,d]),C=p.useCallback(()=>{if(!r)return;const{files:x,destinationFolder:y,metadata:S}=r,F=h(y,x,!1,S);t?.(F,y),d()},[r,h,t,d]),w=p.useCallback(()=>{if(!r)return;const{files:x,destinationFolder:y,metadata:S}=r,F=g(y,x,new Map(s.map(R=>[R.path,gt.Cancel])),S);t?.(F,y),d()},[d,s,t,r,g]),b=p.useCallback(x=>{if(!r)return;const{files:y,destinationFolder:S,metadata:F}=r,R=new Map(x.map(D=>[D.file.path,D.action])),E=g(S,y,R,F);t?.(E,S),d()},[r,g,t,d]);return{conflictingFiles:s,conflictResolutionOpen:n,hasActiveConflictRef:l,checkForConflicts:u,startConflictResolution:m,resolveConflictsWithStrategy:h,resolveConflictsWithDecisions:g,openConflictResolution:c,closeConflictResolution:d,handleReplaceAll:v,handleDuplicateAll:C,handleCancelAll:w,handleDecideForEach:b}},jH=({getDestinationFiles:e,onCopyFiles:t,onMoveToFiles:s,onCopySuccess:i,onMoveSuccess:n,onDuplicateSuccess:o,getCopyHeader:r,getMoveHeader:a})=>{const[l,c]=p.useState(!1),[d,u]=p.useState([]),[h,g]=p.useState([]),[m,v]=p.useState(ft.Copy),[C,w]=p.useState(),[b,x]=p.useState(null),{conflictingFiles:y,conflictResolutionOpen:S,hasActiveConflictRef:F,startConflictResolution:R,resolveConflictsWithStrategy:E,closeConflictResolution:D,openConflictResolution:T,handleReplaceAll:P,handleDuplicateAll:k,handleCancelAll:A,handleDecideForEach:U}=Tb({getDestinationFiles:e,onResolve:(ee,le)=>{ee?.length&&(b?.type===ft.Copy?(t?.(ee,le),i?.()):b?.type===ft.Move&&b.sourceFolder&&(s?.(ee,b.sourceFolder,le),n?.()))}}),I=p.useCallback(()=>{u([]),g([]),x(null),w(void 0)},[]),H=p.useCallback(ee=>{const le=R(ee,d,{type:ft.Copy});if(x({type:ft.Copy}),!le.hasConflicts){const $=E(ee,d,!1);t?.($,ee),i?.(),I()}},[d,R,E,t,i,I]),W=p.useCallback((ee,le)=>{const $=le||(b?.sourceFolder??"/");if(!R(ee,h,{type:ft.Move,sourceFolderPath:$}).hasConflicts){const G=E(ee,h,!0);s?.(G,$,ee),n?.(),I()}},[h,R,E,s,n,I,b]),V=p.useCallback(()=>{P(),I()},[P,I]),Z=p.useCallback(()=>{k(),I()},[k,I]),L=p.useCallback(()=>{A(),I()},[A,I]),M=p.useCallback(ee=>{U(ee),I()},[U,I]),z=p.useCallback(ee=>{const le=ee.at(0)?.parentPath??"/",$=E(le,ee,!1);t?.($,le),o?.()},[t,o,E]),K=p.useCallback(ee=>{v(ee),c(!0)},[]),ie=p.useCallback(()=>{c(!1),F.current||I()},[I,F]),[we,N]=p.useState(),oe=p.useCallback(ee=>{u(ee);const le=ee[0]?.parentPath??ee[0]?.folderId;w(le),r&&ee.length>0?N(r(ee.length,ee[0]?.name)):N(void 0)},[r]),Te=p.useCallback(ee=>{g(ee);const le=ee[0]?.parentPath??ee[0]?.folderId;w(le),x({type:ft.Move,sourceFolder:le}),a&&ee.length>0?N(a(ee.length,ee[0]?.name)):N(void 0)},[a]);return{handleDuplicate:z,handleCloseDestinationFolderPopup:ie,handleOpenDestinationFolderPopup:K,handleCopyTo:H,handleMoveTo:W,openDestinationFolderPopup:l,destinationFolderMode:m,destinationFolderTitle:we,handleSetCopiedFiles:oe,handleSetMovedFiles:Te,clearState:I,conflictingFiles:y,conflictResolutionOpen:S,openConflictResolution:T,closeConflictResolution:D,handleConflictReplace:V,handleConflictCancel:L,handleConflictDuplicate:Z,handleConflictDecideForEach:M,sourceFolder:C}},_H=({path:e,defaultPath:t,onPathChange:s,onSelectionClear:i})=>{const n=e!==void 0,[o,r]=p.useState(t),a=n?e:o,l=p.useCallback(d=>{n||r(d),s?.(d)},[n,s]),c=p.useCallback(d=>{l(d),i?.()},[l,i]);return{currentPath:a,setCurrentPath:l,handlePathChange:c}},UH=({onDeleteFiles:e,onDeleteSuccess:t})=>{const[s,i]=p.useState(!1),[n,o]=p.useState([]),[r,a]=p.useState(""),l=p.useCallback((u,h)=>{o(u),a(h),i(!0)},[]),c=p.useCallback(()=>{i(!1),o([])},[]),d=p.useCallback(()=>{if(e&&n.length>0){const u=n.map(h=>({sourceUrl:h.path,nodeType:h.nodeType}));e(u,r),t?.()}c()},[n,e,t,c,r]);return{deleteConfirmationOpen:s,itemsToDelete:n,openDeleteConfirmation:l,closeDeleteConfirmation:c,confirmDelete:d}},$H=({onDownloadFiles:e,customDownloadItemsAction:t,onDownloadSuccess:s})=>({handleDownloadFiles:p.useCallback(n=>{t&&n.length>0?t(n):e&&n.length>0&&(e(n),s?.())},[e,s,t])}),qH=e=>"dataTransfer"in e&&e.dataTransfer!==null,KH=({onUploadFiles:e,onValidateUpload:t,maxFileSize:s,allowedFileTypes:i,validationMessages:n={},onUploadArchive:o,uploadEnabled:r=!0,currentFolder:a}={})=>{const[l,c]=p.useState(!1),[d,u]=p.useState(!1),[h,g]=p.useState(),m=p.useRef(null),v=p.useRef(""),C=p.useRef([]),w=p.useMemo(()=>!!a?.permissions?.includes(An.WRITE),[a]),[b,x]=p.useState(new Map),[y,S]=p.useState(null),F=p.useCallback(G=>!i||i.includes("*/*")?G:G.filter(({fileContent:ne,name:pe})=>eg(i,ne.type,pe)),[i]),R=p.useCallback(()=>{x(new Map),S(null)},[]),{conflictingFiles:E,conflictResolutionOpen:D,hasActiveConflictRef:T,startConflictResolution:P,closeConflictResolution:k,openConflictResolution:A,handleReplaceAll:U,handleDuplicateAll:I,handleCancelAll:H,handleDecideForEach:W}=Tb({getDestinationFiles:()=>C.current,onResolve:(G,ne)=>{if(!r||!w){R();return}if(!y)return;const pe=G.map(Fe=>{const Pe=b.get(Fe.sourceUrl);if(!Pe)return;const ce=Fe.destinationUrl.split("/").pop();return{fileContent:Pe.fileContent,name:ce}}).filter(Boolean);if(pe[0]?.fileContent?.type==="application/zip"){const{fileContent:Fe,name:Pe}=pe[0];o?.(Fe,Pe,ne)}else pe.length>0&&e?.(pe,ne);R()}});p.useEffect(()=>{r&&w||(c(!1),u(!1),g(void 0),k(),R())},[r,k,R,w]),p.useEffect(()=>{if(!r||!w)return;let G=0;const ne=ce=>{qH(ce)&&ce.dataTransfer.types.includes(CH)&&(G++,u(!0))},pe=()=>{G--,G===0&&u(!1)},Fe=()=>{G=0,u(!1)},Pe=ce=>{ce.preventDefault()};return window.addEventListener("dragenter",ne),window.addEventListener("dragleave",pe),window.addEventListener("drop",Fe),window.addEventListener("dragover",Pe),()=>{window.removeEventListener("dragenter",ne),window.removeEventListener("dragleave",pe),window.removeEventListener("drop",Fe),window.removeEventListener("dragover",Pe)}},[r,w]);const V=p.useCallback(G=>s?G.filter(ne=>ne.fileContent.size>s).map(ne=>ne.name):[],[s]),Z=p.useCallback((G,ne)=>G.map(pe=>({id:pe.name,name:pe.name,folderId:ne,path:pe.name,nodeType:Ce.ITEM,parentPath:ne,contentLength:pe.fileContent.size})),[]),L=p.useCallback(async(G,ne,pe)=>{if(!r||!w)return!1;g(void 0),C.current=pe;const Fe=V(G);if(Fe.length>0){const ke=s?(s/1048576).toFixed(2):0,Me=n.oversizedFiles||`Files exceed maximum size (${ke}MB): ${Fe.join(", ")}`;return g(Me),!1}if(t)try{const ke=await t(G,pe,ne);if(!ke.valid)return g(ke.message||n.validationFailed||"Validation failed"),!1}catch{return g(n.validationError||"Validation error occurred"),!1}const Pe=new Map(G.map(ke=>[ke.name,ke]));x(Pe);const ce=Z(G,ne);return S({destinationFolder:ne}),P(ne,ce,{destinationFolder:ne}).hasConflicts?!1:(e?.(G,ne),R(),!0)},[r,e,t,V,s,n,Z,P,R,w]),M=p.useCallback(()=>{U(),R()},[U,R]),z=p.useCallback(()=>{I(),R()},[I,R]),K=p.useCallback(()=>{H(),R()},[H,R]),ie=p.useCallback(G=>{W(G),R()},[W,R]),we=p.useCallback(()=>{k(),T.current||R()},[k,T,R]),N=p.useCallback(G=>{!r||!w||(G.preventDefault(),G.stopPropagation(),G.dataTransfer.types.includes("Files")&&c(!0))},[r,w]),oe=p.useCallback(G=>{if(!r||!w)return;G.preventDefault(),G.stopPropagation();const ne=G.currentTarget.getBoundingClientRect(),pe=G.clientX,Fe=G.clientY;(pe<=ne.left||pe>=ne.right||Fe<=ne.top||Fe>=ne.bottom)&&c(!1)},[r,w]),Te=p.useCallback(G=>{!r||!w||(G.preventDefault(),G.stopPropagation(),G.dataTransfer.types.includes("Files")&&(G.dataTransfer.dropEffect="copy"))},[r,w]),ee=p.useCallback(async(G,ne,pe)=>{if(!r||!w||(G.preventDefault(),G.stopPropagation(),c(!1),!G.dataTransfer.types.includes("Files")))return;const Fe=Array.from(G.dataTransfer.items||[]),Pe=[];let ce=!1;if(Fe.length>0&&Fe.forEach(Me=>{if(Me.kind==="file"){if(Me.webkitGetAsEntry?.()?.isDirectory){ce=!0;return}const Ne=Me.getAsFile?.();Ne&&Pe.push(Ne)}}),Pe.length===0&&G.dataTransfer.files?.length&&Pe.push(...Array.from(G.dataTransfer.files)),Pe.length===0){ce&&g(n.foldersNotSupported||"Folder upload is not supported");return}const Se=Pe.map(Me=>({fileContent:Me,name:Me.name})),ke=F(Se);if(ke.length===0){g(n.unsupportedFiles||"Selected files are not supported");return}await L(ke,ne,pe)},[r,F,L,n,w]);p.useEffect(()=>{let G=m.current;G||(G=document.createElement("input"),G.type="file",G.multiple=!0,G.style.display="none",document.body.appendChild(G),m.current=G),i&&i.length>0?G.accept=i.join(","):G.removeAttribute("accept");const ne=async()=>{if(!r||!w){G&&(G.value="");return}if(!G?.files?.length)return;const Fe=Array.from(G.files).map(ce=>({fileContent:ce,name:ce.name})),Pe=F(Fe);if(Pe.length===0){g(n.unsupportedFiles||"Selected files are not supported"),G.value="";return}await L(Pe,v.current,C.current),G.value=""};return G.addEventListener("change",ne),()=>{G&&(G.removeEventListener("change",ne),m.current===G&&(document.body.removeChild(G),m.current=null))}},[r,i,F,L,n,w]);const le=p.useCallback((G,ne)=>{!r||!w||(v.current=G,C.current=ne,m.current&&m.current.click())},[r,w]),$=p.useCallback((G,ne)=>{if(!o||!r||!w)return;const pe=document.createElement("input");pe.type="file",pe.accept=".zip,application/zip",pe.multiple=!1,pe.style.display="none";const Fe=()=>{const Pe=pe.files?.[0];if(!Pe){document.body.removeChild(pe);return}const ce=Pe.name.replace(/\.zip$/i,""),Se={id:ce,name:ce,folderId:G,path:`${G}/${ce}`,nodeType:Ce.FOLDER,parentPath:G,contentLength:Pe.size,contentType:Pe.type};if(C.current=ne,S({destinationFolder:G}),x(new Map([[Se.path,{fileContent:Pe,name:ce}]])),P(G,[Se],{destinationFolder:G}).hasConflicts){document.body.removeChild(pe);return}try{o(Pe,ce,G)}finally{document.body.removeChild(pe)}};pe.addEventListener("change",Fe),document.body.appendChild(pe),pe.click()},[o,r,w,P]),he=p.useCallback(()=>{g(void 0)},[]);return{isDragging:l,isDraggingOverWindow:d,uploadError:h,handleDragEnter:N,handleDragLeave:oe,handleDragOver:Te,handleDrop:ee,clearError:he,handleUpload:L,openFileDialog:le,openArchiveDialog:$,fileInputRef:m,uploadConflictingFiles:E,uploadConflictResolutionOpen:D,hasActiveUploadConflictRef:T,openUploadConflictResolution:A,closeUploadConflictResolution:we,handleUploadConflictReplace:M,handleUploadConflictDuplicate:z,handleUploadConflictCancel:K,handleUploadConflictDecideForEach:ie}},kb=p.createContext(void 0),Ib={hiddenItemWarning:`${rs.Warning}__A dot at the start of the name will make the item hidden`},YH={emptyName:"Name cannot be empty",duplicateName:"An item with this name already exists",hiddenItemWarning:Ib.hiddenItemWarning};function ZH(e){let t=e.length;for(;t>0&&e[t-1]==="/";)t--;return e.slice(0,t)}function XH(e,t){const s=ZH(e),i=s.lastIndexOf("/");return i===-1?t:s.slice(0,i+1)+t}function QH(e){const t=e.lastIndexOf(".");return t===-1||t===0?e:e.substring(0,t)}function jm(e){const t=e.lastIndexOf(".");return t===-1||t===0?"":e.substring(t)}const JH=({items:e,onRenameValidate:t,validationMessages:s,onMoveToFiles:i})=>{const[n,o]=p.useState(),r=p.useMemo(()=>({...YH,...s}),[s]),a=p.useMemo(()=>n?.path,[n]),l=p.useCallback(g=>{const m=ti(e,g);m&&o(m)},[e]),c=p.useCallback(()=>{o(void 0)},[]),d=p.useCallback(g=>{if(!n||!i){o(void 0);return}const m=n.nodeType===Ce.ITEM;let v=g.trim();if(m){const x=jm(n.name);x&&!v.endsWith(x)&&(v=v+x)}if(v===n.name){o(void 0);return}const C=XH(n.path,v),w=n.parentPath;if(!w){o(void 0);return}const b={sourceUrl:n.path,destinationUrl:C,nodeType:n.nodeType};i([b],w,w),o(void 0)},[n,i]),u=p.useCallback((g,m)=>{const v=g.trim();if(!v)return r.emptyName;if(v.startsWith("."))return r.hiddenItemWarning;const C=m.nodeType===Ce.ITEM;let w=v;if(C){const x=jm(m.name);x&&!w.endsWith(x)&&(w=w+x)}const b=m.parentPath;if(b){const x=ti(e,b);if(x&&new Set((x.items??[]).filter(S=>S.path!==m.path).map(S=>S.name.toLowerCase())).has(w.toLowerCase()))return r.duplicateName}if(t){const x=t(w,m);if(x)return x}return null},[t,r,e]),h=p.useCallback(g=>g.nodeType===Ce.ITEM?QH(g.name):g.name,[]);return{renamedPath:a,renamedItem:n,renameHandler:l,renameSaveHandler:d,renameCancelHandler:c,renameValidateHandler:u,getDisplayName:h}},Mb=e=>{const[t,s]=p.useState(e?.expandedPaths??new Set),i=p.useMemo(()=>!!e?.onExpandedPathsChange,[e?.onExpandedPathsChange]),n=p.useMemo(()=>i?e?.expandedPaths??new Set:t,[i,e?.expandedPaths,t]);p.useEffect(()=>{i&&e?.expandedPaths&&s(new Set(e.expandedPaths))},[i,e?.expandedPaths]);const o=p.useCallback(d=>{i?e?.onExpandedPathsChange?.(d):s(d)},[i,e]),r=p.useCallback(d=>{const u=new Set(n);u.has(d)?u.delete(d):u.add(d),o(u)},[n,o]),a=p.useCallback(()=>{o(new Set)},[o]),l=p.useCallback(d=>{const u=new Set(n);u.add(d),o(u)},[n,o]),c=p.useCallback(d=>{const u=new Set(n);u.delete(d),o(u)},[n,o]);return{expandedPaths:n,setExpandedPaths:o,togglePath:r,collapseAll:a,expandPath:l,collapsePath:c,isControlled:i}},eG=({newActions:e,currentFolder:t,onUploadFiles:s,onCreateFolder:i,onUploadArchive:n,onCreateNewItem:o,isNewButtonDisabled:r})=>{const a=p.useMemo(()=>{const d=[];return e&&(e.newFolder&&d.push({key:"new-folder",label:e.newFolder.label,icon:e?.newFolder?.icon!==void 0?e?.newFolder?.icon:f.jsx(j.IconFolder,{...te,className:"text-secondary"}),onClick:()=>{i&&i()}}),e.newItem&&d.push({key:"new-item",label:e.newItem.label,icon:e?.newItem?.icon!==void 0?e?.newItem?.icon:f.jsx(j.IconPlus,{...te,className:"text-secondary"}),onClick:()=>{o&&o()}}),e.uploadFiles&&d.push({key:"upload-file",label:e.uploadFiles.label,icon:e?.uploadFiles?.icon!==void 0?e?.uploadFiles?.icon:f.jsx(j.IconFile,{...te,className:"text-secondary"}),onClick:()=>{s&&s()}}),e.uploadArchive&&d.push({key:"upload-archive",label:e.uploadArchive.label,icon:e?.uploadArchive?.icon!==void 0?e?.uploadArchive?.icon:f.jsx(j.IconFileZip,{...te,className:"text-secondary"}),onClick:()=>{n&&n()}})),d},[e,i,s,n,o]),l=p.useMemo(()=>a?.length>0,[a]),c=p.useMemo(()=>!t?.permissions?.includes(An.WRITE)||!!r,[t,r]);return{newActions:a,isNewButtonVisible:l,isNewButtonDisabled:c}},tG={emptyName:"Folder name cannot be empty",duplicateName:"A folder with this name already exists",hiddenItemWarning:Ib.hiddenItemWarning},sG=({currentFolder:e,onCreateFolder:t,onValidateFolderName:s,validationMessages:i,items:n=[]})=>{const[o,r]=p.useState(!1),[a,l]=p.useState(null),[c,d]=p.useState(fs.Folder),[u,h]=p.useState(null),[g,m]=p.useState(null),[v,C]=p.useState(""),w=p.useRef(e?.path),b=p.useMemo(()=>({...tG,...i}),[i]),x=p.useMemo(()=>{if(c===fs.Folder)return e;if(c===fs.Sibling&&u){const k=yo(n,u.parentPath||"");return{path:u.parentPath,items:k?.items||[],nodeType:Ce.FOLDER,name:u?.parentPath?.split("/")?.pop()||"",folderId:""}}return c===fs.Child?u:e},[c,u,e,n]);p.useEffect(()=>{const k=x?.path;w.current!==k&&o&&(r(!1),l(null),C("")),w.current=k},[x?.path,o]);const y=p.useCallback(()=>{if(o)return;w.current=e?.path||"/";const k=`__new_folder_${Date.now()}`,A=(e?.items??[]).filter(I=>I.nodeType===Ce.FOLDER),U=gr(A);l(k),C(U),r(!0),d(fs.Folder),h(e||null)},[o,e]),S=p.useCallback(k=>{if(o)return;w.current=k?.parentPath||"/";const A=`__new_folder_${Date.now()}`,I=(yo(n,k?.parentPath||"/")?.items??[]).filter(W=>W.nodeType===Ce.FOLDER),H=gr(I);C(H),l(A),r(!0),d(fs.Sibling),h(k),m(k?.parentPath||"/")},[o,n]),F=p.useCallback(k=>{if(o)return;w.current=k.path;const A=`__new_folder_${Date.now()}`,U=(k?.items??[]).filter(H=>H.nodeType===Ce.FOLDER),I=gr(U);C(I),l(A),r(!0),d(fs.Child),h(k),m(k?.path||"/")},[o]),R=p.useCallback(k=>{if(o)return;w.current=k?.parentPath||"/";const U=(yo(n,k?.parentPath||"/")?.items??[]).filter(H=>H.nodeType===Ce.FOLDER),I=gr(U);C(I),d(fs.Sibling),h(k),m(k?.parentPath||"/"),r(!0)},[o,n]),E=p.useCallback(k=>{if(o)return;w.current=k.path;const A=(k?.items??[]).filter(I=>I.nodeType===Ce.FOLDER),U=gr(A);C(U),d(fs.Child),h(k),m(k?.path||"/"),r(!0)},[o]),D=p.useCallback(()=>{r(!1),l(null),d(fs.Folder),h(null),m(null),w.current=void 0,C("")},[]),T=p.useCallback(k=>{const A=k.trim();if(!A)return b.emptyName;if(A.startsWith(".")&&A.length>1)return b.hiddenItemWarning;if(x&&x.items&&new Set((x.items??[]).filter(I=>I.nodeType===Ce.FOLDER).map(I=>I.name.toLowerCase())).has(A.toLowerCase()))return b.duplicateName;if(s&&x){const U=s(A,x);if(U)return U}return null},[x,s,b]),P=p.useCallback(async k=>{const A=k.trim();if(!A)return;D();const I=`${x?.path??"/"}/${A}`,H=`${I}/${gu}`,V={fileContent:new File([],gu,{type:"text/plain"}),name:gu};t&&await t(V,I,H)},[x,t,D]);return{isCreatingFolder:o,createdFolderPath:g,newFolderTempId:a,newFolderDefaultName:v,startFolderCreation:y,startGridSiblingFolderCreation:S,startTreeSiblingFolderCreation:R,startGridChildFolderCreation:F,startTreeChildFolderCreation:E,cancelFolderCreation:D,saveFolderCreation:P,validateFolderName:T}},iG=({additionalButtons:e,expandedPathsLength:t,collapseAll:s})=>{const i=t===0;return{additionalButtons:p.useMemo(()=>{const o=J(["hover:text-accent-primary",i&&"controls-secondary-disable hover:controls-secondary-disable disabled:hover:cursor-default"]);return f.jsxs(f.Fragment,{children:[e,f.jsx(Gs,{disabled:i,className:o,size:nt.Small,onClick:s,icon:f.jsx(j.IconCopyMinus,{size:ct.LG,stroke:1.5}),"aria-label":"collapse-all"})]})},[e,i,s])}},nG=({onGetInfo:e})=>{const[t,s]=p.useState(!1),[i,n]=p.useState(void 0),o=p.useCallback(async a=>{n(a),s(!0),e&&await e(a)},[e]),r=p.useCallback(()=>{s(!1),n(void 0)},[]);return{isMetadataPopupOpen:t,selectedFileForMetadata:i,openMetadataPopup:o,closeMetadataPopup:r}};function oG(e){const t=[];function s(i){for(const n of i)t.push(n),n.items&&s(n.items)}return s(e),t}function _m(e,t){const s=So(t);return e.filter(i=>So(i.name).includes(s))}function rG({onSearchFiles:e,clearSearchResults:t,currentPath:s,searchResults:i=[],searchInProgress:n=!1,navigationPanelValue:o,onNavigationPanelSearchChange:r,allItems:a=[],activeTab:l}){const[c,d]=p.useState(""),u=p.useRef(!1),h=p.useRef(!1),g=p.useRef([]),m=p.useRef(s),v=p.useRef(l);p.useEffect(()=>{o!=null&&d(String(o))},[o]);const C=String(o??c??"").trim(),w=h.current&&(n||i.length>0||C!==""),b=p.useCallback(F=>{const R=F.trim();if(!R){h.current=!1,u.current=!1;return}h.current=!0,e&&s&&!u.current&&(u.current=!0,e(s,R))},[e,s]),x=p.useCallback(()=>{u.current=!1,h.current=!1,g.current=[],d(""),r?.(""),t?.()},[t,r]),y=p.useCallback(F=>{const R=String(F??"");d(R),r?.(R),R.trim()?b(R):x()},[r,b,x]);p.useEffect(()=>{(m.current!==s||v.current!==l)&&(m.current=s,v.current=l,u.current=!1,h.current=!1,g.current=[],d(""),r?.(""),t?.())},[s,l,r,t]),p.useEffect(()=>{n||(g.current=i)},[i,n]);const S=p.useMemo(()=>{if(e){const R=n?g.current:i;return!C||R.length===0?R:_m(R,C)}if(!C||!a.length)return[];const F=oG(a);return _m(F,C)},[e,i,n,C,a]);return{isSearchMode:w,searchValue:c,effectiveSearchValue:C,setSearchValue:d,handleSearchChange:y,handleSearchActivate:b,handleSearchClear:x,searchResultsRows:S}}function aG({selectedPaths:e,defaultSelectedPaths:t,onSelectedPathsChange:s}){const i=e!==void 0,[n,o]=p.useState(()=>t??new Set),r=p.useMemo(()=>i?e:n,[i,e,n]),a=p.useCallback(c=>{const d=new Set(c);s?.(d),i||o(d)},[i,s]),l=p.useCallback(()=>{a(new Set)},[a]);return{selectedPaths:r,setSelectedPaths:a,clearSelection:l,isControlled:i}}const Ab=':;,=/{}%&\\"',sg=`(\r
70
70
  |
71
- |\r| )|[\0-]`,lG=`[${Ab.replace(/\\/g,"\\\\")}]`,Lb=new RegExp(`${lG}|${sg}`),cG=new RegExp(sg),Ob=({managerLabel:e,children:t,className:s,items:i=[],rootItem:n,path:o,defaultPath:r,filesLoading:a,selectedPaths:l,defaultSelectedPaths:c,onSelectedPathsChange:d,showHiddenFiles:u,onShowHiddenFilesChange:h,treeOptions:g,showNavigationPanel:m=!0,navigationPanelOptions:v,deleteConfirmationOptions:C,gridOptions:w,toolbarOptions:b,bulkActionsToolbarOptions:x,destinationFolderPopupOptions:y,conflictResolutionPopupOptions:S,onPathChange:F,onTableFileClick:R,handleSelectionClick:E,onGridApiChange:D,onCopyFiles:T,onMoveToFiles:P,onDeleteFiles:k,onDownloadFiles:A,onRenameValidate:U,renameValidationMessages:I,forbiddenSymbolsRegExp:H=Lb,forbiddenSymbolsTooltip:W,onUploadFiles:V,onValidateUpload:Z,uploadEnabled:L,uploadValidationMessages:M,maxFileSize:z,onUploadArchive:K,onCreateFolder:ie,onCreateFolderValidate:we,folderCreationValidationMessages:N,fileMetadataPopupOptions:oe,onGetInfo:Te,onUnshareFiles:ee,onRemoveFilesAccess:le,actionsRef:$,sharedByMePaths:he,onSearchFiles:G,searchResults:ne,searchInProgress:pe,clearSearchResults:Fe,allowedFileTypes:Pe,maxSelectableFileSize:ce,getDisabledTooltip:Se,fileTooLargeTooltip:ke,unsupportedFileTypeTooltip:Me,emptyStateIcon:be,emptyStateTitle:Ne,emptyStateDescription:Ve,sharedWithMeIds:St,onFolderPopupPathChange:_e,onManagePermissions:Rt,onPreview:_,onOpenInNewTab:Ee,previewExtensions:Ft,isRenameFileAvailable:Wo,isDuplicateFolderAvailable:Wc,customUploadFileAction:Ln,customCreateNewItemAction:da,customDuplicateAction:jo,customDeleteItemsAction:jc,customDownloadItemsAction:_c,customBreakpointRef:ua,gridClassName:ha,nonClickableTableColumns:pa,hideSearchPathItemName:ga,showHiddenFileSwitcherInDestinationPopup:li,autoSelectUploadedItems:gs=!1})=>{const{selectedPaths:Rs,clearSelection:Fs,setSelectedPaths:Vi}=aG({selectedPaths:l,defaultSelectedPaths:c,onSelectedPathsChange:d}),ci=p.useRef(null),Uc=p.useCallback((ve,We,qe)=>{if(gs){const{parent:qs,name:vd}=GH(We);ci.current={fileNames:new Set([vd]),destinationFolder:qs}}ie?.(ve,We,qe)},[ie,gs]),$c=p.useCallback((ve,We)=>{gs&&(ci.current={fileNames:new Set(ve.map(qe=>qe.name)),destinationFolder:We}),V?.(ve,We)},[V,gs]),qc=p.useCallback((ve,We,qe)=>{gs&&(ci.current={fileNames:new Set([We]),destinationFolder:qe}),K?.(ve,We,qe)},[K,gs]),Kc=p.useMemo(()=>{const ve=new Map;return Rs.forEach(We=>{const qe=ti(i,We);qe&&ve.set(We,qe)}),ve},[Rs,i]);p.useEffect(()=>{if(Rs.size===0)return;let ve=!1;for(const We of Rs)if(!ti(i,We)){ve=!0;break}if(ve){const We=new Set;for(const qe of Rs)ti(i,qe)&&We.add(qe);Vi(We)}},[i,Rs,Vi]);const{currentPath:rt,setCurrentPath:zi,handlePathChange:_s}=_H({path:o,defaultPath:r,onPathChange:F,onSelectionClear:Fs}),_o=p.useMemo(()=>{const{showFiles:ve=!0,showFolders:We=!0,...qe}=w||{};return{showFiles:ve,showFolders:We,...qe}},[w]),Uo=_o.showFiles,$o=_o.showFolders,[Yc,Es]=p.useState(),Zc=y?.destinationFolderPath??Yc,qo=p.useCallback(ve=>{y?.setDestinationFolderPath?y.setDestinationFolderPath(ve):Es(ve)},[y]),{areHiddenFilesVisible:On,toggleHiddenFilesVisibility:Nn}=zH({showHiddenFiles:u,onShowHiddenFilesChange:h}),{isTreeCollapsed:Hn,toggleTreeCollapse:Xc,setIsTreeCollapsed:fa}=WH({collapsed:g?.collapsed,onCollapseChange:g?.onCollapseChange}),{renamedPath:Gn,renamedItem:ma,renameHandler:va,renameSaveHandler:Ca,renameCancelHandler:Bn,renameValidateHandler:Qc,getDisplayName:Vn}=JH({items:i,onRenameValidate:U,validationMessages:I,onMoveToFiles:P}),{isSearchMode:Ko,searchValue:Jc,effectiveSearchValue:Yo,setSearchValue:ed,handleSearchChange:td,handleSearchClear:Xe,searchResultsRows:Zo}=rG({onSearchFiles:G,clearSearchResults:Fe,currentPath:rt,searchResults:ne,searchInProgress:pe,navigationPanelValue:v?.value,onNavigationPanelSearchChange:v?.onSearchChange,allItems:i,activeTab:b?.activeTab}),dt=p.useMemo(()=>yo(i,rt)??i[0],[i,rt]),{handleCopyTo:sd,handleMoveTo:Xo,handleDuplicate:Qo,handleOpenDestinationFolderPopup:id,handleCloseDestinationFolderPopup:zn,openDestinationFolderPopup:Jo,handleSetCopiedFiles:wa,handleSetMovedFiles:ba,destinationFolderMode:xa,destinationFolderTitle:ya,conflictingFiles:Wn,conflictResolutionOpen:Sa,closeConflictResolution:jn,handleConflictReplace:nd,handleConflictDuplicate:Ra,handleConflictCancel:Fa,handleConflictDecideForEach:od,sourceFolder:Ea}=jH({getDestinationFiles:ve=>yo(i,ve)?.items??[],onCopyFiles:T,onMoveToFiles:P,onCopySuccess:Fs,onMoveSuccess:Fs,onDuplicateSuccess:Fs,getCopyHeader:y?.getCopyHeader,getMoveHeader:y?.getMoveHeader});p.useEffect(()=>{Jo||qo(void 0)},[Jo,qo]);const{deleteConfirmationOpen:rd,itemsToDelete:Da,openDeleteConfirmation:er,closeDeleteConfirmation:ad,confirmDelete:ld}=UH({onDeleteFiles:k,onDeleteSuccess:Fs}),{handleDownloadFiles:cd}=$H({onDownloadFiles:A,customDownloadItemsAction:_c,onDownloadSuccess:Fs}),{isDragging:dd,isDraggingOverWindow:ud,uploadError:Pa,handleDragEnter:Ta,handleDragLeave:ka,handleDragOver:_n,handleDrop:Us,clearError:hd,openFileDialog:_t,fileInputRef:pd,openArchiveDialog:Un,uploadConflictingFiles:$n,uploadConflictResolutionOpen:Wi,closeUploadConflictResolution:Ia,handleUploadConflictReplace:Ma,handleUploadConflictDuplicate:Aa,handleUploadConflictCancel:La,handleUploadConflictDecideForEach:Oa}=KH({onUploadFiles:$c,onValidateUpload:Z,maxFileSize:z,onUploadArchive:qc,allowedFileTypes:Pe,validationMessages:M,uploadEnabled:L,currentFolder:dt}),gd=p.useCallback(ve=>{Xe();const We=rt??"",qe=dt?.items??[];Us(ve,We,qe)},[rt,dt,Us,Xe]),Na=p.useCallback(()=>{Xe();const ve=rt??"",We=dt?.items??[];_t(ve,We)},[rt,dt,_t,Xe]),Ha=p.useCallback(()=>{Xe();const ve=rt??"",We=dt?.items??[];Un(ve,We)},[rt,dt,Un,Xe]),tr=p.useCallback(()=>{Xe(),Ln?.(rt,dt)},[Ln,rt,dt,Xe]),fd=p.useCallback(()=>{Xe(),da?.(rt,dt)},[da,rt,dt,Xe]),md=p.useCallback(ve=>{jo?.(ve)},[jo]),{isCreatingFolder:di,newFolderTempId:$s,createdFolderPath:Ga,newFolderDefaultName:ji,startFolderCreation:sr,startGridSiblingFolderCreation:ir,startTreeSiblingFolderCreation:Ba,startGridChildFolderCreation:X,startTreeChildFolderCreation:Ze,cancelFolderCreation:tt,saveFolderCreation:es,validateFolderName:_i}=sG({currentFolder:dt,onCreateFolder:Uc,onValidateFolderName:we,validationMessages:N,items:i}),rg=p.useCallback(()=>{Xe(),sr()},[Xe,sr]),{newActions:Yb,isNewButtonVisible:Zb,isNewButtonDisabled:Xb}=eG({newActions:b?.newActions,currentFolder:dt,onUploadFiles:Ln?tr:Na,onUploadArchive:Ha,onCreateFolder:rg,onCreateNewItem:fd,isNewButtonDisabled:b?.isNewButtonDisabled}),Qb=p.useMemo(()=>{if(Ko){let He=Zo;Uo||(He=He.filter(Qe=>Qe.nodeType!==Ce.ITEM)),$o||(He=He.filter(Qe=>Qe.nodeType!==Ce.FOLDER)),On||(He=He.filter(Qe=>!Qe.path.split("/").filter(Boolean).some(rr=>rr.startsWith("."))));const or=He.map(Qe=>({...Qe,id:Qe.id??Qe.path,name:Qe.name??Qe.path.split("/").pop()??"",updatedAt:Qe.updatedAt,size:Qe.contentLength,contentLength:Qe.contentLength,author:Qe.author,path:Qe.path,nodeType:Qe.nodeType,extension:Qe.extension,isTemporary:!1,owner:Qe.owner,folderId:Qe.folderId}));return di&&$s&&or.unshift({id:$s,name:ji,updatedAt:void 0,author:void 0,path:rt??"/",nodeType:Ce.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),or}const ve=So(Yo).trim(),We=dt?.items??[];let qe=ve?LH(dt):We;Uo||(qe=qe.filter(He=>He.nodeType!==Ce.ITEM)),$o||(qe=qe.filter(He=>He.nodeType!==Ce.FOLDER)),On||(qe=qe.filter(He=>ve?!He.path.split("/").filter(Boolean).some(Qe=>Qe.startsWith(".")):!Pb(He)));const qs=qe.map(He=>({...He,id:He.id??He.path,name:He.name??He.path.split("/").pop()??"",updatedAt:He.updatedAt,size:He.contentLength,author:He.author,path:He.path,nodeType:He.nodeType,extension:He.extension,isTemporary:!1,owner:He.owner,contentType:He.contentType,contentLength:He.contentLength,folderId:He.folderId}));if(di&&$s&&!ve&&qs.unshift({id:$s,name:ji,updatedAt:void 0,author:void 0,path:rt??"/",nodeType:Ce.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),!ve)return qs;const vd=ve.split(/\s+/).filter(Boolean);return qs.filter(He=>{if(He.isTemporary)return!0;const or=So(He.name),Qe=So(He.author),lg=AH(He.extension);return vd.every(rr=>or.includes(rr)||Qe.includes(rr)||lg.includes(rr))})},[Ko,Zo,dt,Yo,On,di,$s,ji,Uo,$o,rt]);p.useEffect(()=>{const ve=ci.current;if(!ve)return;if((rt??"")!==ve.destinationFolder){ci.current=null;return}const We=yo(i,ve.destinationFolder);if(!We?.items)return;const qe=new Set;for(const qs of We.items)ve.fileNames.has(qs.name)&&BH(qs,Pe,ce)&&qe.add(qs.path);qe.size>0&&(Vi(qe),ci.current=null)},[i,rt,Vi,Pe,ce]);const Jb=p.useCallback(ve=>{_s(ve.path)},[_s]),e0=p.useCallback(ve=>{_s(ve)},[_s]),t0=p.useCallback(ve=>{ve.nodeType===Ce.FOLDER?_s(ve.path):R?.(ve)},[_s,R]),{expandedPaths:qn,setExpandedPaths:nr,collapseAll:s0}=Mb({expandedPaths:g?.expandedPaths,onExpandedPathsChange:g?.onExpandedPathsChange}),{additionalButtons:i0}=iG({collapseAll:s0,expandedPathsLength:qn.size,additionalButtons:g?.additionalButtons}),n0=p.useCallback(ve=>{ve.length>0&&(Xe(),ir(ve[0]))},[Xe,ir]),o0=p.useCallback(ve=>{ve.length>0&&(Xe(),zi(ve[0].path),nr(new Set(qn).add(ve[0].path||"/")),X(ve[0]))},[Xe,X,qn,nr,zi]),r0=p.useCallback(ve=>{ve.length>0&&(Xe(),Ba(ve[0]))},[Xe,Ba]),a0=p.useCallback(ve=>{ve.length>0&&(Xe(),zi(ve[0].path),nr(new Set(qn).add(ve[0].path||"/")),Ze(ve[0]))},[Xe,Ze,zi,qn,nr]),{isMetadataPopupOpen:l0,selectedFileForMetadata:c0,openMetadataPopup:d0,closeMetadataPopup:ag}=nG({onGetInfo:Te}),u0=p.useCallback(()=>{ag(),oe?.clearMetadata?.()},[ag,oe]),h0=p.useMemo(()=>{if(H)return Bc(H)},[H]),p0={managerLabel:e,className:s,items:i,allowedFileTypes:Pe,maxSelectableFileSize:ce,rootItem:n,filesLoading:a,treeOptions:{...g,expandedPaths:qn,onExpandedPathsChange:nr,additionalButtons:i0},showNavigationPanel:m,navigationPanelOptions:v,gridOptions:_o,toolbarOptions:b,bulkActionsToolbarOptions:x,deleteConfirmationOptions:C,destinationFolderPopupOptions:{...y,destinationFolderPath:Zc,setDestinationFolderPath:qo,header:ya,onCreateFolder:ie,onCreateFolderValidate:we,folderCreationValidationMessages:N,sourceFolder:Ea},currentPath:rt,setCurrentPath:zi,searchValue:Jc,effectiveSearchValue:Yo,setSearchValue:ed,areHiddenFilesVisible:On,toggleHiddenFilesVisibility:Nn,isTreeCollapsed:Hn,toggleTreeCollapse:Xc,setIsTreeCollapsed:fa,selectedPaths:Rs,selectedFiles:Kc,setSelectedPaths:Vi,clearSelection:Fs,currentFolder:dt,gridRows:Qb,handleCopyTo:sd,handleMoveTo:Xo,handleDuplicate:jo?md:Qo,handleSetCopiedFiles:wa,handleSetMovedFiles:ba,openDestinationFolderPopup:Jo,handleCloseDestinationFolderPopup:zn,handleOpenDestinationFolderPopup:id,destinationFolderMode:xa,handleGridAddSibling:n0,handleGridAddChild:o0,handleTreeAddSibling:r0,handleTreeAddChild:a0,handleDownloadFiles:cd,renamedPath:Gn,renamedItem:ma,forbiddenSymbolsRegExp:h0,forbiddenSymbolsTooltip:W,onRename:va,onRenameSave:Ca,onRenameCancel:Bn,onRenameValidate:Qc,getDisplayName:Vn,openDeleteConfirmation:jc||er,closeDeleteConfirmation:ad,confirmDelete:ld,deleteConfirmationOpen:rd,itemsToDelete:Da,handlePathChange:_s,handleTreeItemClick:Jb,handleBreadcrumbItemClick:e0,handleSearchChange:td,handleTableRowClick:t0,onTableFileClick:R,handleSelectionClick:E,onGridApiChange:D,isDragging:dd,uploadError:Pa,handleDragEnter:Ta,handleDragLeave:ka,handleDragOver:_n,handleDrop:gd,clearUploadError:hd,onUploadFiles:V,onValidateUpload:Z,maxFileSize:z,isDraggingOverWindow:ud,openFileDialog:Na,fileInputRef:pd,newActions:Yb,isNewButtonVisible:Zb,isNewButtonDisabled:Xb,isCreatingFolder:di,newFolderTempId:$s,createdFolderPath:Ga,newFolderDefaultName:ji,startFolderCreation:rg,cancelFolderCreation:tt,saveFolderCreation:es,validateFolderName:_i,conflictResolutionPopupOptions:S,conflictingFiles:Wn,conflictResolutionOpen:Sa,closeConflictResolution:jn,handleConflictReplace:nd,handleConflictDuplicate:Ra,handleConflictCancel:Fa,handleConflictDecideForEach:od,uploadConflictingFiles:$n,uploadConflictResolutionOpen:Wi,closeUploadConflictResolution:Ia,handleUploadConflictReplace:Ma,handleUploadConflictDuplicate:Aa,handleUploadConflictCancel:La,handleUploadConflictDecideForEach:Oa,fileMetadataPopupOptions:oe,isMetadataPopupOpen:l0,selectedFileForMetadata:c0,openMetadataPopup:d0,closeMetadataPopup:u0,onGetInfo:Te,onUnshareFiles:ee,onRemoveFilesAccess:le,actionsRef:$,sharedByMePaths:he,onSearchFiles:G,searchInProgress:pe,searchResults:ne,clearSearchResults:Fe,isSearchMode:Ko,emptyStateIcon:be,emptyStateTitle:Ne,emptyStateDescription:Ve,gridClassName:ha,sharedWithMeIds:St,onFolderPopupPathChange:_e,onManagePermissions:Rt,onPreview:_,onOpenInNewTab:Ee,previewExtensions:Ft,isRenameFileAvailable:Wo,isDuplicateFolderAvailable:Wc,customUploadFileAction:Ln,customBreakpointRef:ua,nonClickableTableColumns:pa,hideSearchPathItemName:ga,getDisabledTooltip:Se,fileTooLargeTooltip:ke,unsupportedFileTypeTooltip:Me,showHiddenFileSwitcherInDestinationPopup:li};return f.jsx(kb.Provider,{value:p0,children:t})},dG=({disabledGridRowIds:e,gridRows:t,getDisabledTooltip:s,getRowDisabledTooltip:i,allowedFileTypes:n,maxSelectableFileSize:o})=>{const[r,a]=p.useState(null),[l,c]=p.useState(null);p.useEffect(()=>{const h=()=>{a(null),c(null)};return window.addEventListener("scroll",h,!0),()=>window.removeEventListener("scroll",h,!0)},[]),p.useEffect(()=>{const h=v=>{const w=v.target.closest(".ag-row");if(!w){a(x=>x&&null);return}const b=new DOMParser().parseFromString(w.getAttribute("row-id")||"","text/html").documentElement.textContent;b&&e.has(b)?a(x=>x!==b?(c(w.getBoundingClientRect()),b):x):a(x=>x&&null)},g=()=>{a(null),c(null)},m=document.querySelector('[aria-label="File Manager Grid View"]');if(m)return m.addEventListener("mousemove",h),m.addEventListener("mouseleave",g),()=>{m.removeEventListener("mousemove",h),m.removeEventListener("mouseleave",g)}},[e]);const d=p.useMemo(()=>{if(r)return t.find(h=>h.path===r)},[r,t]),u=p.useMemo(()=>{if(d){if(s){const h=s(d);if(h)return h}return i(d,n,o)}},[d,s,i,n,o]);return f.jsx(f.Fragment,{children:u&&l&&Ao.createPortal(f.jsxs(xh,{open:!0,placement:"top",children:[f.jsx(Sh,{asChild:!0,children:f.jsx("div",{className:ae("fixed z-[-1]",u&&"pointer-events-none"),style:{top:l.top,left:l.left,width:l.width,height:l.height}})}),f.jsx(yh,{className:"max-w-[300px] rounded border border-ui-outline-primary bg-ui-popover px-3 py-1.5 text-center text-primary shadow-md fill-ui-popover",children:u})]}),document.body)})},Nb=({onClose:e,onConfirm:t,onFolderPopupPathChange:s,setDestinationFolderPath:i,open:n,copyLabel:o="Copy",moveLabel:r="Move",addFolderLabel:a="Add folder",mode:l=ft.Copy,hiddenFilesSwitcherLabel:c="Show hidden files",showHiddenFileSwitcher:d=!0,onUploadFiles:u,onValidateUpload:h,maxFileSize:g,header:m,sourceFolder:v,disabledPathTooltip:C="Unavailable for the original path. Please select another folder",path:w,collapsedFileTree:b=!1,alertProps:x,...y})=>{const[S,F]=p.useState(!1),[R,E]=p.useState(!1),D=p.useRef(null),T=Nc(),P=p.useCallback(H=>{F(H)},[]),k=p.useMemo(()=>{const H=[{key:"add-folder",label:a,icon:f.jsx(j.IconFolderPlus,{...te,className:"text-secondary"}),onClick:()=>{D.current?.createFolder(),E(!1)}}];return d&&H.push({key:"show-hidden-files",label:c,icon:f.jsx(j.IconEye,{...te,className:"text-secondary"}),onClick:()=>{F(W=>!W),E(!1)}}),H},[a,c,d]),A=p.useCallback(H=>{H&&(s?.(H),i?.(H))},[s,i]),U=l===ft.Copy?"Copy to":"Move to",I=p.useMemo(()=>!w||!v?!1:v===w,[w,v]);return f.jsx(Mn,{open:n,onClose:()=>{e()},size:Zt.Lg,dividerFooter:!0,dividers:!1,className:"md:!h-[800px] !bg-layer-2",footer:f.jsxs("div",{className:"flex justify-between items-center gap-2 p-4 md:px-6",children:[f.jsx("div",{className:"flex items-center gap-4 min-w-0",children:T?f.jsx(Tt,{menu:{items:k},open:R,onOpenChange:E,children:f.jsx(us,{className:"size-9 shrink-0","aria-label":"More options",iconBefore:f.jsx(j.IconDotsVertical,{...te,className:"text-secondary"})})}):f.jsxs(f.Fragment,{children:[f.jsx(Hs,{label:a,appearance:Ae.Ghost,iconBefore:f.jsx(j.IconFolderPlus,{...te}),onClick:()=>{D.current?.createFolder()}}),d&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"w-px h-[26px] bg-controls-disable-accent my-2"}),f.jsx("div",{className:"inline-flex items-center cursor-pointer",children:f.jsx(Gc,{label:c,isOn:S,onChange:P,switchId:"hidden-files-switch-modal"})})]})]})}),f.jsxs("div",{className:"flex space-x-4 items-center",children:[f.jsx(Ws,{onClick:e,label:"Cancel"}),I?f.jsx(Ot,{tooltip:C,children:f.jsx(Hs,{onClick:t,label:l==="copy"?o:r,disabled:I,"aria-disabled":I})}):f.jsx(Hs,{onClick:t,label:l==="copy"?o:r})]})]}),header:m??U,children:f.jsxs("div",{className:"bg-layer-2 h-full flex flex-col",children:[x&&f.jsx("div",{className:"px-6 mb-4 pt-4",children:f.jsx(hv,{...x})}),f.jsx("div",{className:"flex-1 min-h-0",children:f.jsx(jb,{...y,gridClassName:"size-full",className:J(y.className,"bg-layer-2 h-full flex pt-0"),actionsRef:D,path:w,showHiddenFiles:S,onShowHiddenFilesChange:P,treeOptions:{...y.treeOptions,collapsed:b,expandedPaths:new Set([y.rootItem?.path||"/"]),header:y.treeOptions?.header},gridOptions:{...y.gridOptions,selectionMode:void 0},navigationPanelOptions:{elementId:"file-manager-destination-search",...y.navigationPanelOptions},onUploadFiles:u,onValidateUpload:h,onPathChange:A,maxFileSize:g})})]})})},uG=12,hG=8;var tn=(e=>(e.Normal="normal",e.Reverse="reverse",e))(tn||{});function pG({actions:e,direction:t=tn.Normal,moreButtonWidth:s=$t,actionsGap:i=8,containerPadding:n=8,dependencies:o=[]}){const r=p.useRef(null),a=p.useRef(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef([]),[u,h]=p.useState(0),g=p.useCallback((C,w)=>{const b=l.current?.offsetWidth??0,x=c.current?.offsetWidth??0,y=b+x,F=w.getBoundingClientRect().width-y-s-i*2-n*2;let R=0,E=0;if(t===tn.Reverse)for(let D=C.length-1;D>=0&&(R+=C[D]+i,!(R>F));D--)E++;else for(const D of C){if(R+=D+i,R>F)break;E++}h(E)},[i,n,t,s]);p.useLayoutEffect(()=>{if(!a.current||!r.current)return;const w=Array.from(a.current.children).map(b=>Math.ceil(b.getBoundingClientRect().width));d.current=w,w.length!==0&&g(w,r.current)},[e,g,...o]),p.useEffect(()=>{if(!r.current)return;let C=null;const w=()=>{C&&cancelAnimationFrame(C),C=requestAnimationFrame(()=>{if(!r.current)return;const x=r.current,y=d.current;y.length!==0&&g(y,x)})},b=new ResizeObserver(w);return b.observe(r.current),w(),()=>{C&&cancelAnimationFrame(C),b.disconnect()}},[e.length,g,...o]);const m=t===tn.Reverse?e.slice(0,e.length-u):e.slice(u);return{visibleActions:t===tn.Reverse?e.slice(e.length-u):e.slice(0,u),hiddenActions:m,refs:{containerRef:r,measureRef:a,leftSectionRef:l,rightSectionRef:c}}}const gG=({getSelectionLabel:e,onClearSelection:t,actions:s,selectedCount:i})=>{const n=Nc(),{refs:{containerRef:o,leftSectionRef:r,measureRef:a},visibleActions:l,hiddenActions:c}=pG({actions:s,direction:tn.Reverse,dependencies:[n],actionsGap:uG,containerPadding:hG}),d=e(i);return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:a,className:"absolute top-0 left-0 invisible pointer-events-none overflow-hidden whitespace-nowrap flex gap-3",children:s.map(({key:u,icon:h,title:g})=>f.jsx(Ws,{iconBefore:h,label:g,hideTitleOnMobile:!0},u))}),f.jsxs("div",{ref:o,className:"rounded bg-layer-0 p-2 flex justify-between items-center w-full",role:"toolbar","aria-label":"File bulk actions",children:[f.jsx("div",{ref:r,children:f.jsx(Hs,{label:d,onClick:t,textClassName:"text-accent-primary whitespace-nowrap",appearance:Ae.Ghost,iconBefore:f.jsx(j.IconX,{...te,className:"text-accent-primary"})})}),f.jsxs("div",{className:"flex flex-1 w-full gap-3 items-center justify-end",children:[c.length>0&&f.jsx(Tt,{menu:{items:c},allowedPlacements:["bottom","bottom-start"],children:f.jsx(us,{className:"h-[38px]",iconBefore:f.jsx(j.IconDotsVertical,{...te,className:"text-secondary hover:text-accent-primary"})})}),l.map(({key:u,icon:h,tooltip:g,title:m,onClick:v,disabled:C})=>f.jsx(Ws,{className:"!p-[9px]",iconBefore:h,label:m,hideTitleOnMobile:!0,disabled:C,tooltipProps:{tooltip:g},onClick:w=>v?.({key:u,domEvent:w})},u))]})]})]})},fG=({open:e,itemsToDelete:t,onClose:s,onConfirm:i,cancelLabel:n="Cancel",confirmLabel:o="Delete",titleRenderer:r,contentRenderer:a})=>{const l=t.map(g=>g.name),d=r?.(l)||"Confirm Deleting Items",u=f.jsxs("div",{className:"px-6 py-3 dial-small-text",children:[f.jsx("p",{className:"text-secondary mb-3",children:t.length===1?f.jsxs(f.Fragment,{children:["Do you want to delete file or folder"," ",f.jsxs("span",{className:"text-primary break-all",children:['"',t[0].name,'"']}),"?"]}):f.jsxs(f.Fragment,{children:["Do you want to delete the following"," ",f.jsx("span",{className:"text-primary",children:t.length})," items?"]})}),t.length>1&&f.jsx(f.Fragment,{children:t.length<=10?f.jsx("ul",{className:"space-y-1 text-primary list-none",children:t.map(g=>f.jsx("li",{className:"truncate",children:g.name},g.path))}):f.jsxs(f.Fragment,{children:[f.jsx("ul",{className:"space-y-1 text-primary list-none mb-2",children:t.slice(0,10).map(g=>f.jsx("li",{className:"truncate",children:g.name},g.path))}),f.jsxs("p",{className:"text-secondary italic",children:["... and ",t.length-10," more"]})]})})]}),h=a?.(l)||u;return f.jsx(ub,{open:e,header:d,confirmLabel:o,cancelLabel:n,variant:Mo.Danger,onClose:s,onConfirm:i,children:h})},Um=e=>e.split("/").map(t=>t.trim()).filter(Boolean),mG="w-full flex items-center justify-between gap-4",vG="min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-3 px-3 flex items-center rounded",CG="w-[260px]",wG=({ariaLabel:e="Breadcrumb",labelClassName:t,onItemClick:s,path:i,makeHref:n,rootItemPath:o,rootItemLabel:r,breadcrumbsHiddenPathPart:a,className:l,breadcrumbClassName:c,searchable:d=!0,value:u,elementId:h="file-manager-search",disabled:g,invalid:m,onSearchChange:v,searchClassName:C,searchContainerClassName:w,isCompactView:b=!1})=>{const x=p.useMemo(()=>{if(!i)return;let D=Um(i);const T=[...D];let P=0;if(a){const A=Um(a);if(A.length){const U=D.findIndex((I,H)=>A.every((W,V)=>D[H+V]===W));U!==-1&&(P=A.length,D=[...D.slice(0,U),...D.slice(U+A.length)])}}if(!D.length)return[{label:"/"}];const k=D.map((A,U)=>{const I=U<D.length-P?U:U+P,H=T.slice(0,I+1),W=typeof n=="function"?n(H,I):void 0;return{label:A,href:W,onClick:s?V=>{V.preventDefault(),s(W)}:void 0}});if(o&&r){const A=o.split("/").filter(Boolean),U=i.split("/").filter(Boolean);if(A.every((H,W)=>U[W]===H)&&k.length>0){const H=k.slice(A.length);return[{label:r,href:o,onClick:s?W=>{W.preventDefault(),s(o)}:void 0},...H]}}return k},[i,a,o,r,n,s]),[y,S]=p.useState(!1),F=p.useCallback(()=>{if(b&&!y){S(!0);const D=document.getElementById(h);D&&D.focus()}},[h,y,b]),R=p.useCallback(()=>{(!u||String(u).trim()==="")&&v?.("")},[u,v]),E=p.useCallback(()=>b&&y?f.jsx(Ws,{className:"!p-[9px]",iconBefore:f.jsx(j.IconArrowLeft,{...te}),onClick:()=>{S(!1),v?.("")}}):f.jsx("div",{className:vG,children:f.jsx(rb,{pathItems:x,ariaLabel:e,labelClassName:t,className:c})}),[e,c,x,y,b,t,v]);return f.jsxs("div",{className:J(mG,{"gap-3":b},l),"aria-label":"navigation-panel",children:[E(),d&&f.jsx("div",{className:J(CG,{"w-[40px]":b&&!y,"w-full":b&&y}),role:"search","aria-label":"Search",onClick:F,children:f.jsx(Kp,{id:h,value:u??"",onChange:v,disabled:g,onBlur:R,invalid:m,className:C,wrapperClassName:b&&!y?"pl-2.5":"",containerClassName:w})})]})},bG=({tabs:e,activeTab:t,onTabChange:s,areHiddenFilesVisible:i,onToggleHiddenFiles:n,isNewButtonVisible:o,isNewButtonDisabled:r,newButtonVariant:a=Ye.Primary,newButtonDropdownItems:l=[],newButtonLabel:c="New",hiddenFilesSwitcherLabel:d="Hidden files",showHiddenFilesLabel:u="Show hidden files",hideHiddenFilesLabel:h="Hide hidden files",showHiddenFilesToggle:g=!0,disabledNewButtonTooltip:m})=>{const v=Nc(),C=p.useMemo(()=>[{key:"hidden-files-switch",label:i?h:u,icon:i?f.jsx(j.IconEyeOff,{...te,className:"text-secondary"}):f.jsx(j.IconEye,{...te,className:"text-secondary"}),onClick:()=>n?.(!i)}],[i,h,u,n]),w=()=>e&&t&&s?f.jsx(sb,{tabs:e,activeTab:t,onClick:y=>s(y),screenThreshold:nc.Tablet,smallScreenContainerClassName:"w-fit bg-transparent h-[38px] overflow-hidden",smallScreenDropdownItemClassName:"px-3 h-[38px]"}):null,b=()=>f.jsxs(f.Fragment,{children:[g&&f.jsxs(f.Fragment,{children:[f.jsx(Gc,{switchId:"hidden-files-switch",label:d,isOn:i,onChange:n}),f.jsx("div",{className:"h-6 border-l border-primary"})]}),o&&f.jsx(Ot,{tooltip:r&&m?m:void 0,children:f.jsx(Ch,{label:c,variant:a,items:l,disabled:r})})]}),x=()=>f.jsxs(f.Fragment,{children:[f.jsx(Tt,{menu:{items:C},allowedPlacements:["bottom","bottom-start"],children:f.jsx(db,{size:nt.Small,icon:f.jsx(j.IconDotsVertical,{stroke:2,size:ct.SM})})}),o?f.jsx(Ot,{tooltip:r&&m?m:void 0,children:f.jsx(Ch,{label:c,variant:a,items:l,disabled:r})}):null]});return f.jsxs("div",{className:"flex w-full justify-between gap-4 items-center overflow-x-auto",children:[f.jsx("div",{className:"flex-1 min-w-0",children:w()}),f.jsx("div",{className:"flex gap-2 shrink-0 items-center",children:v?x():b()})]})},xG=100,fr=16,Ts="text-secondary",ll="text-primary min-w-0",yG="text-primary break-words min-w-0",mr="bg-layer-2",SG=({open:e,onClose:t,fileMetadata:s,loading:i=!1,header:n="Information",nameLabel:o="Name:",pathLabel:r="Path:",modifiedDateLabel:a="Modified Date:",sizeLabel:l="Size:",authorLabel:c="Author:",dateLocale:d="en-US",dateOptions:u})=>f.jsx(Mn,{open:e,onClose:t,size:Zt.Sm,header:n,dividers:!1,children:f.jsx("div",{className:"px-6 py-4",children:f.jsx("div",{className:"grid gap-4 items-center dial-small-text",style:{gridTemplateColumns:`${xG}px 1fr`},children:i?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Ts,children:o}),f.jsx(Jn,{variant:as.Text,width:"100%",height:fr,className:mr}),f.jsx("div",{className:Ts,children:a}),f.jsx(Jn,{variant:as.Text,width:"90%",height:fr,className:mr}),f.jsx("div",{className:Ts,children:l}),f.jsx(Jn,{variant:as.Text,width:"60%",height:fr,className:mr}),f.jsx("div",{className:Ts,children:c}),f.jsx(Jn,{variant:as.Text,width:"80%",height:fr,className:mr}),f.jsx("div",{className:Ts,children:r}),f.jsx(Jn,{variant:as.Text,width:"70%",height:fr,className:mr})]}):s?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Ts,children:o}),f.jsx("div",{className:ll,children:f.jsx(vt,{text:s.name})}),f.jsx("div",{className:Ts,children:a}),f.jsx("div",{className:ll,children:f.jsx(vt,{text:OH(s.updatedAt,d,u)})}),f.jsx("div",{className:Ts,children:l}),f.jsx("div",{className:ll,children:f.jsx(vt,{text:Xr(s.contentLength)})}),f.jsx("div",{className:Ts,children:c}),f.jsx("div",{className:ll,children:f.jsx(vt,{text:s.author||"—"})}),f.jsx("div",{className:Ts,children:r}),f.jsx("div",{className:yG,children:decodeURIComponent(s.path)})]}):null})})}),RG={size:10,stroke:2},FG=26,vr="__new_folder";var Xt=(e=>(e.File="file",e.Folder="folder",e))(Xt||{});const EG=({name:e,type:t,shared:s=!1,loading:i=!1,sharedIndicatorClassName:n,sharedIndicatorTooltip:o,fileExtension:r,...a})=>{const l=c=>f.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[c,s&&f.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:f.jsx(Hr,{className:n,sharedIndicatorTooltip:o})})]});if(i)return l(f.jsx(ea,{}));if(t===Xt.File){const c=r||(e.includes(".")?e.split(".").pop():void 0);return f.jsx(kh,{...a,extension:c??"",className:"text-secondary",indicator:s?f.jsx(Hr,{className:n,sharedIndicatorTooltip:o}):null,label:"File type icon"})}return t===Xt.Folder?l(f.jsx(Be,{icon:f.jsx(j.IconFolder,{className:a.className,size:a.size??te.size,stroke:a.stroke??te.stroke}),className:"inline-block align-middle"})):null},DG=({name:e,type:t,elementId:s,loading:i=!1,shared:n=!1,iconClassName:o,iconIndicator:r,iconLabel:a,iconSize:l,iconStroke:c,inputInvalid:d,inputInvalidMessage:u,inputContainerClassName:h,inputIconAfter:g,inputRef:m,onChange:v,sharedIndicatorClassName:C,sharedIndicatorTooltip:w,fileExtension:b})=>{const x=()=>{const y=u?.startsWith(`${rs.Warning}__`);if(!d&&!y)return null;const S=u?.replace(`${rs.Warning}__`,"");return f.jsx(Ot,{tooltip:S,children:g||(y?f.jsx(j.IconAlertTriangleFilled,{...te,className:"text-warning-icon","aria-label":"warning"}):f.jsx(j.IconAlertCircleFilled,{...te,className:"text-error","aria-label":"alert"}))})};return f.jsxs("div",{className:"flex gap-2 items-center",children:[f.jsx(EG,{name:e,type:t,label:a,className:o,indicator:r,size:l,stroke:c,loading:i,shared:n,fileExtension:b,sharedIndicatorClassName:C,sharedIndicatorTooltip:w}),f.jsx(oi,{containerClassName:J("!h-6 py-[1px] pl-[7px] pr-[7px]",h),id:s,value:e,onChange:v,invalid:d,iconAfter:x(),inputRef:m})]})};function Hb({value:e,isEditing:t,isCreating:s,isLoading:i=!1,restoreOnCancel:n=!0,onValidate:o,onSave:r,onCancel:a,onCreateFolderSave:l,onCreateFolderCancel:c}){const[d,u]=p.useState(e),[h,g]=p.useState(!1),[m,v]=p.useState(""),C=p.useRef(null),w=p.useRef(!1),b=p.useCallback((R=!1,E="")=>{g(R),v(E)},[]),x=p.useCallback(R=>{if(!o)return b(),!0;const E=o(R);return E?E.startsWith(`${rs.Warning}__`)?(b(!1,E),!0):(b(!0,E),!1):(b(),!0)},[o,b]),y=p.useCallback(R=>{const E=R??"";u(E),x(E)},[x]),S=p.useCallback(()=>{x(d)?s&&!w.current&&!i?l?.(d):!s&&t&&r?.(d):C.current?.focus(),w.current=!1},[x,r,d,l,s,t,i]),F=p.useCallback(()=>{n&&u(e),s?c?.():a?.(),w.current=!0,b()},[e,a,n,b,c,s]);return p.useEffect(()=>{!t&&!s||(w.current=!1,u(e),b(),requestAnimationFrame(()=>{C.current?.focus(),C.current?.select()}))},[t,s,e,b]),p.useEffect(()=>{const R=C.current;if(!t&&!s||!R)return;const E=D=>{D.key==="Enter"?(D.preventDefault(),C.current?.blur()):D.key==="Escape"&&(D.preventDefault(),F())};return R.addEventListener("keydown",E),()=>R.removeEventListener("keydown",E)},[t,s,S,F]),p.useEffect(()=>{if(!t&&!s)return;const R=C.current;if(!R)return;const E=D=>{const T=D.relatedTarget;!(T&&R.contains(T))&&!i&&(x(d)?S():R.focus())};return R.addEventListener("blur",E),()=>{R.removeEventListener("blur",E)}},[t,s,d,x,S,i]),{inputRef:C,value:d,onChange:y,invalid:h,invalidMessage:m}}const lc=({name:e,type:t,elementId:s,editing:i=!1,loading:n=!1,creating:o=!1,shared:r=!1,iconSize:a=$t,validate:l,onSave:c,fileExtension:d,onCancel:u,onCreateFolderCancel:h,onCreateFolderSave:g,inputContainerClassName:m,sharedIndicatorClassName:v,sharedIndicatorTooltip:C,hideTooltip:w=!1,forbiddenSymbolsRegExp:b,forbiddenSymbolsTooltip:x,...y})=>{const{value:S,invalid:F,invalidMessage:R,onChange:E,inputRef:D}=Hb({value:e,isEditing:i,isCreating:o,isLoading:n,onValidate:l,onCancel:u,onSave:c,onCreateFolderCancel:h,onCreateFolderSave:g});if(!i&&!o){const T=tg({name:e,isFolder:t===Xt.Folder},b,x),P=!!T;return t===Xt.Folder?f.jsx(vc,{name:e,loading:n,shared:r,iconSize:a,className:"max-w-[428px] truncate",sharedIndicatorClassName:v,hideTooltip:w,isInvalidName:P,tooltipContent:T}):f.jsx(mc,{className:"max-w-[428px]",...y,name:e,shared:r,iconSize:a,sharedIndicatorClassName:v,hideTooltip:w,isInvalidName:P,tooltipContent:T})}return f.jsx(DG,{type:t,name:S,elementId:s,inputInvalid:F,inputInvalidMessage:R,inputRef:D,onChange:E,iconSize:a,fileExtension:d,inputContainerClassName:m,sharedIndicatorTooltip:C,sharedIndicatorClassName:v})},PG=({items:e,showFiles:t=!1,expandedPaths:s,loadingPaths:i=new Set,loadedPaths:n=new Set,sharedByMePaths:o=new Set,selectedPath:r,emptyStateTitle:a="No Folders",emptyStateDescription:l,emptyStateIcon:c,areHiddenFilesVisible:d=!1,renamedPath:u,createdFolderPath:h,rootItemLabel:g,rootItemPath:m,onItemClick:v,getContextMenuItems:C,onRenameSave:w,onRenameCancel:b,onRenameValidate:x,onExpandedPathsChange:y,onCreateFolderSave:S,onCreateFolderCancel:F,forbiddenSymbolsRegExp:R,forbiddenSymbolsTooltip:E,newFolderDefaultName:D})=>{const{expandedPaths:T,togglePath:P}=Mb({expandedPaths:s??new Set,onExpandedPathsChange:y}),k=U=>{v?.(U),P(U.path)},A=(U,I,H)=>{let W=U;return H&&H.path===h&&(W=[{folderId:vr,id:vr,items:[],name:D||"",nodeType:Ce.FOLDER,parentPath:h,path:`${h}/${vr}`},...U]),W.map(V=>{const{path:Z,nodeType:L,name:M,items:z}=V,K=L===Ce.FOLDER;if(!d&&Pb(V))return null;if(!K&&!t)return;const ie=Array.isArray(z)&&z.length>0&&z.some(Fe=>Fe.nodeType===Ce.FOLDER||t),we=T.has(Z),N=r===Z,oe=i.has(Z),Te=u===Z||Z===`${h}/${vr}`,ee=n.has(Z),le=o.has(Z),$=m&&g&&Z===m&&K,he=x&&(Fe=>x(Fe,V)),G=N?"bg-accent-primary-alpha border-l-2 border-l-accent-primary rounded":"border-l-2 border-l-transparent",ne=$?[]:C?.(V)??[],pe=R?tg({name:V.name,isFolder:K},R,E):void 0;return f.jsx("div",{className:"cursor-pointer text-secondary",children:f.jsxs("div",{className:"flex flex-col w-full","aria-label":"folder",children:[f.jsx(Tt,{trigger:[Kt.ContextMenu],className:"w-full",anchorToMouse:!0,menu:{items:ne},children:f.jsxs("div",{style:{paddingLeft:`${I*FG}px`},className:J("py-1 gap-[2px] dial-small-text flex justify-between hover:bg-accent-primary-alpha rounded group/item w-full mb-[2px] relative",G),"aria-selected":N,children:[!Te&&f.jsx("div",{className:"absolute size-full left-0 top-0 z-0",onClick:()=>k(V)}),f.jsx("div",{className:"relative flex flex-row truncate items-center w-fit h-6 gap-x-1 pl-1",onClick:()=>!Te&&k(V),children:f.jsxs(f.Fragment,{children:[K&&f.jsx(j.IconCaretRightFilled,{...RG,className:ae("flex-shrink-0",we&&"rotate-90 transition-all",ee&&!ie&&"text-transparent")}),f.jsx(lc,{elementId:`${Z}-tree-item`,name:$?g:M,type:K?Xt.Folder:Xt.File,loading:oe,shared:le,sharedIndicatorClassName:J("group-hover/item:bg-accent-primary-alpha",N&&"bg-accent-primary-alpha"),iconSize:Ri,forbiddenSymbolsRegExp:R,forbiddenSymbolsTooltip:pe,...!$&&{editing:Te,creating:Z===`${h}/${vr}`,onSave:w,onCancel:b,validate:he,onCreateFolderSave:S,onCreateFolderCancel:F}})]})}),ne.length>0&&!Te&&!$&&f.jsx("div",{className:"flex-1 flex justify-end",children:f.jsx(Tt,{placement:"bottom-start",allowedPlacements:["top-start","top-end"],menu:{items:ne},className:"sticky right-0",children:f.jsx(Be,{className:"invisible group-hover/item:visible text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary",icon:f.jsx(j.IconDotsVertical,{...te})})})})]})}),we&&(z||V?.path===h)&&A(z||[],I+1,V)]})},`${Z}-children`)})};return f.jsx("div",{className:"flex-1 size-full overflow-y-auto","aria-label":"folders-tree",children:e.length>0?A(e,0):f.jsx(ta,{title:a,description:l,icon:c})})},TG=({selectedFiles:e,actionLabels:t,onDuplicate:s,onCopy:i,onMove:n,onDownload:o,onUnshare:r,onRemoveAccess:a,onDelete:l,getCurrentFolderPath:c,sharedWithMeIds:d,sharedByMePaths:u,onClearSelection:h,forbiddenSymbolsRegExp:g})=>p.useMemo(()=>{const m=[],v=Array.from(e.values());if(!v.length||!t)return m;const C=Bc(g),w=C?v.some(b=>C.test(b.name)):!1;if(t[Y.RemoveAccess]&&a){const b=v.some(x=>!u?.has(x.path));m.push({key:Y.RemoveAccess,label:t[Y.RemoveAccess],title:t[Y.RemoveAccess],disabled:b,icon:f.jsx(j.IconUserX,{size:te.size,className:"text-secondary"}),onClick:()=>{a(v),h()}})}if(t[Y.Move]&&!w&&m.push({key:Y.Move,label:t[Y.Move],title:t[Y.Move],icon:f.jsx(Xp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>n(v)}),t[Y.Copy]&&!w&&m.push({key:Y.Copy,label:t[Y.Copy],title:t[Y.Copy],icon:f.jsx(Zp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>i(v)}),t[Y.Duplicate]&&!w&&m.push({key:Y.Duplicate,label:t[Y.Duplicate],title:t[Y.Duplicate],icon:f.jsx(j.IconCopy,{...te,className:"text-secondary"}),onClick:()=>s(v)}),t[Y.Delete]){const b=v.some(x=>x.permissions&&!x.permissions.includes(An.WRITE));m.push({key:Y.Delete,label:t[Y.Delete],title:t[Y.Delete],icon:f.jsx(j.IconTrashX,{...te,className:"text-secondary"}),disabled:b,tooltip:b?"Selected items contain item which can not be deleted":void 0,onClick:()=>{const x=c();l(v,x)}})}if(t[Y.Download]&&!w&&m.push({key:Y.Download,label:t[Y.Download],title:t[Y.Download],icon:f.jsx(j.IconDownload,{...te,className:"text-secondary"}),onClick:()=>o(v)}),t[Y.Unshare]&&r){const b=v.some(x=>!d?.includes(x.path));m.push({key:Y.Unshare,label:t[Y.Unshare],title:t[Y.Unshare],disabled:b,tooltip:b?"Selected items contain item which can not be unshared":void 0,icon:f.jsx(Qp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>{r(v),h()}})}return m},[e,t,r,a,n,i,s,c,l,o,d,h,u,g]);function ig(e){if(!e)return null;if(e instanceof Date)return isFinite(e.getTime())?e:null;if(typeof e=="number"){const t=new Date(e);return isFinite(t.getTime())?t:null}if(typeof e=="string"){const t=e.trim();if(/^-?\d+$/.test(t)){const i=Number(t);return ig(i)}const s=new Date(t);return isFinite(s.getTime())?s:null}return null}const Gb=({value:e,locale:t=J1,options:s=eb,emptyPlaceholder:i,className:n,hideTooltip:o=!1})=>{const r=ig(e),a=p.useMemo(()=>r?new Intl.DateTimeFormat(t,s).format(r):i,[r,i,t,s]),l=r?r.toISOString():void 0;return f.jsx(vt,{text:l?f.jsx("time",{dateTime:l,children:a}):f.jsx("span",{children:a}),className:ae(UO,n),hideTooltip:o})},kG=({id:e,name:t,nodeType:s,size:i,updatedAt:n,dateLocale:o,dateOptions:r,shared:a,sharedIndicatorClassName:l,hideTooltip:c=!1,forbiddenSymbolsRegExp:d,forbiddenSymbolsTooltip:u})=>f.jsx("div",{className:"flex",children:f.jsx("div",{className:"flex flex-1 min-w-0",children:f.jsx(lc,{type:s===Ce.FOLDER?Xt.Folder:Xt.File,name:t,elementId:e,shared:a,iconSize:Ri,sharedIndicatorClassName:l,hideTooltip:c,forbiddenSymbolsRegExp:d,forbiddenSymbolsTooltip:u,details:f.jsxs("div",{className:"flex items-center gap-1 dial-tiny-text text-secondary",children:[f.jsx("span",{children:s===Ce.ITEM?Xr(i):""}),n&&i&&f.jsx(j.IconCircleFilled,{size:2,className:"text-secondary"}),n?f.jsx("span",{children:f.jsx(Gb,{value:n,locale:o?.toString(),options:r,className:"dial-tiny-text text-secondary",hideTooltip:c})}):null]})})})}),Bb=e=>(t,s,i)=>({colId:mt.Name,field:"name",headerName:e,flex:1,minWidth:200,cellRenderer:n=>{const o=n.data.nodeType,{saveFolderCreation:r,validateFolderName:a,cancelFolderCreation:l,newFolderTempId:c,sharedByMePaths:d,selectedPaths:u,disabledRowIds:h,filesLoading:g}=n.context,m=d?.has(n.data.path),v=u?.has(n.data.path),C=h?.has(n.data.path)??!1,w=J(["group-hover/grid-row:bg-accent-primary-alpha",v&&"bg-accent-primary-alpha"]);if(n.data?.isTemporary&&n.data.id===c)return f.jsx(lc,{name:n.data.name,type:Xt.Folder,elementId:`new-folder-${n.data.id}`,editing:!0,creating:!0,loading:g,shared:m,sharedIndicatorClassName:w,iconSize:Ri,validate:a,onSave:r,onCancel:l,onCreateFolderSave:r,onCreateFolderCancel:l,inputContainerClassName:J(["!h-9",i&&o===Ce.ITEM&&"!h-10"])});const{renameTriggerView:b,renamedPath:x,renamedItem:y,getDisplayName:S,onRenameValidate:F,onRenameSave:R,onRenameCancel:E}=n.context;if(b===xo.Grid&&x===n.data?.path&&y&&n.data){const P=S(y);return f.jsx(lc,{name:P,type:o===Ce.FOLDER?Xt.Folder:Xt.File,fileExtension:y.name.split(".").pop(),elementId:`rename-${n.data.id}`,editing:!0,shared:m,sharedIndicatorClassName:w,iconSize:Ri,validate:k=>F(k,y),onSave:R,onCancel:E,inputContainerClassName:J(["!h-9",i&&o===Ce.ITEM&&"!h-10"]),forbiddenSymbolsRegExp:n.context.forbiddenSymbolsRegExp})}if(i)return f.jsx(kG,{id:n.data.id,name:n.data.name,nodeType:o,size:n.data.size,shared:m,sharedIndicatorClassName:w,updatedAt:n.data.updatedAt,dateLocale:t,dateOptions:s,hideTooltip:C,forbiddenSymbolsRegExp:n.context.forbiddenSymbolsRegExp,forbiddenSymbolsTooltip:n.context.forbiddenSymbolsTooltip});const T=tg({name:n.data.name,isFolder:o===Ce.FOLDER},n.context.forbiddenSymbolsRegExp,n.context.forbiddenSymbolsTooltip);return o===Ce.FOLDER?f.jsx(vc,{name:n.data.name,shared:m,sharedIndicatorClassName:w,iconSize:Ri,hideTooltip:C,isInvalidName:!!T,tooltipContent:T}):f.jsx(mc,{name:n.data.name,shared:m,sharedIndicatorClassName:w,iconSize:Ri,hideTooltip:C,isInvalidName:!!T,tooltipContent:T})}}),Vb=e=>(t,s)=>({colId:mt.UpdatedAt,field:"updatedAt",headerName:e,width:168,suppressSizeToFit:!0,cellRenderer:i=>{const n=i.context?.disabledRowIds?.has(i.data?.path)??!1;return f.jsx(Gb,{...i,hideTooltip:n})},cellRendererParams:{locale:t,options:s},filterValueGetter:i=>{const n=i.data[i.colDef.field||""],o=ig(n);return o?new Intl.DateTimeFormat(t||J1,s||eb).format(o):""}}),zb=e=>({colId:mt.Size,field:"size",headerName:e,width:120,suppressSizeToFit:!0,cellRenderer:t=>t.data.nodeType===Ce.ITEM?Xr(t.data.contentLength):"",filterValueGetter:t=>t.data.nodeType===Ce.ITEM?Xr(t.data.contentLength):""}),IG=e=>{const t=e.event;if(!(t?.target??null)?.closest("input")||!t)return!1;switch(t.key){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":case"Home":case"End":return!0;default:return!1}};function MG({userColumnDefs:e,filterable:t,dateLocale:s,dateOptions:i,effectiveVisibleColumns:n,isCompactView:o,hasActions:r,actionsColumnDef:a,rootItemLabel:l,rootItemPath:c}){const d=p.useMemo(()=>[Bb("Name")(s,i,o),{colId:mt.Path,field:"path",headerName:"Path",flex:1,minWidth:200,cellRenderer:h=>{const g=h.context?.disabledRowIds?.has(h.data.path)??!1;let m=h.data.path;if(h.context?.hideSearchPathItemName&&(h.data.parentPath?m=h.data.parentPath:m=m.replace(/\/[^/]+\/?$/,"")||"/"),!c||!l)return f.jsx(vt,{text:m,hideTooltip:g});const v=m.replace(c,l);return f.jsx(vt,{text:v,hideTooltip:g})}},Vb("Modified Date")(s,i),zb("Size"),{colId:mt.Author,field:"author",headerName:"Author",width:200,suppressSizeToFit:!0,cellRenderer:h=>h.data.author},{colId:mt.Owner,field:"owner",headerName:"Owner",width:200,suppressSizeToFit:!0,cellRenderer:h=>h.data.owner}],[s,i,o,l,c]);return{columnDefs:p.useMemo(()=>{const h=e?.map(v=>typeof v=="function"?v(s,i,o):v);let g=h??d;h||(g=g.filter(v=>v.colId&&n.includes(v.colId))),r&&(o&&(g=g.slice(0,1)),g.push(a));const m=v=>v.colId===mt.Name;return g.map(v=>{const C={...v,filter:t?v.filter:!1,floatingFilter:t?v.floatingFilter:!1};return m(v)&&!v.suppressKeyboardEvent&&(C.suppressKeyboardEvent=IG),C})},[a,s,i,d,n,t,r,o,e])}}const Wb=()=>{const e=p.useContext(kb);if(!e)throw new Error("useFileManagerContext must be used within <FileManagerProvider>");return e},AG=({actionLabels:e,onDuplicate:t,onCopy:s,onMove:i,onDownload:n,onRename:o,onDelete:r,onInfo:a,onUnshare:l,onRemoveAccess:c,sharedWithMeIds:d,sharedByMePaths:u,onManagePermissions:h,onPreview:g,onOpenInNewTab:m,previewExtensions:v,isRenameFileAvailable:C=!0,isDuplicateFolderAvailable:w=!0,forbiddenSymbolsRegExp:b,onGridCreateSiblingFolder:x,onGridCreateChildFolder:y})=>p.useMemo(()=>S=>{const F=[];if(!e)return F;const R=Bc(b)?.test(S.name);e[Y.AddSibling]&&S.nodeType===Ce.FOLDER&&F.push({key:"addSibling",label:e[Y.AddSibling],icon:f.jsx(Db,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>x([S])}),e[Y.AddChild]&&S.nodeType===Ce.FOLDER&&!R&&F.push({key:"addChild",label:e[Y.AddChild],icon:f.jsx(Eb,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>y([S])},{key:"divider",type:Io.Divider}),e[Y.OpenInNewTab]&&typeof m=="function"&&S.nodeType===Ce.ITEM&&!R&&F.push({key:Y.OpenInNewTab,label:e[Y.OpenInNewTab],icon:f.jsx(j.IconExternalLink,{...te,className:"text-secondary"}),onClick:()=>m?.(S)});const E=S.nodeType===Ce.ITEM||S.nodeType===Ce.FOLDER&&w;e[Y.Duplicate]&&E&&!R&&F.push({key:Y.Duplicate,label:e[Y.Duplicate],icon:f.jsx(j.IconCopy,{...te,className:"text-secondary"}),onClick:()=>t(S)}),e[Y.Copy]&&!R&&F.push({key:Y.Copy,label:e[Y.Copy],icon:f.jsx(Zp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>s(S)}),e[Y.Move]&&!R&&F.push({key:Y.Move,label:e[Y.Move],icon:f.jsx(Xp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>i(S)}),e[Y.Download]&&!R&&F.push({key:Y.Download,label:e[Y.Download],icon:f.jsx(j.IconDownload,{...te,className:"text-secondary"}),onClick:()=>n(S)}),e[Y.ManagePermissions]&&typeof h=="function"&&S.nodeType===Ce.FOLDER&&!R&&F.push({key:Y.ManagePermissions,label:e[Y.ManagePermissions],icon:f.jsx(j.IconExternalLink,{...te,className:"text-secondary"}),onClick:()=>h?.(S.path)});const D=S.name.split("."),T=D.length>1?D[D.length-1]:"",P=T&&v?.includes(`.${T}`);e[Y.Preview]&&typeof g=="function"&&S.nodeType===Ce.ITEM&&P&&!R&&F.push({key:Y.Preview,label:e[Y.Preview],icon:f.jsx(j.IconEye,{...te,className:"text-secondary"}),onClick:()=>g?.(S.path)});const k=!S.permissions||S.permissions.includes(An.WRITE);e[Y.Delete]&&k&&F.push({key:Y.Delete,label:e[Y.Delete],icon:f.jsx(j.IconTrashX,{...te,className:"text-secondary"}),onClick:()=>r(S,S.parentPath??"")});const A=S.nodeType===Ce.FOLDER||S.nodeType===Ce.ITEM&&C;return e[Y.Rename]&&A&&k&&F.push({key:Y.Rename,label:e[Y.Rename],icon:f.jsx(j.IconPencilMinus,{...te,className:"text-secondary"}),onClick:()=>o(S.path)}),e[Y.Info]&&S.nodeType===Ce.ITEM&&!R&&F.push({key:Y.Info,label:e[Y.Info],icon:f.jsx(j.IconInfoCircle,{...te,className:"text-secondary"}),onClick:()=>a(S)}),e[Y.Unshare]&&d?.includes(S.path)&&F.push({key:Y.Unshare,label:e[Y.Unshare],icon:f.jsx(Qp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>l(S)}),e[Y.RemoveAccess]&&u?.has(S.path)&&c&&F.push({key:Y.RemoveAccess,label:e[Y.RemoveAccess],icon:f.jsx(j.IconUserX,{size:te.size,className:"text-secondary"}),onClick:()=>c(S)}),F},[e,t,s,i,n,r,o,a,l,c,d,u,h,g,m,v,C,w,b,y,x]),LG=({onGridAddSibling:e,onGridAddChild:t,onTreeAddSibling:s,onTreeAddChild:i})=>{const[n,o]=p.useState(Ji.Grid),r=p.useCallback(d=>{e?.(d),o(Ji.Grid)},[e]),a=p.useCallback(d=>{s?.(d),o(Ji.Tree)},[s]),l=p.useCallback(d=>{t?.(d),o(Ji.Grid)},[t]),c=p.useCallback(d=>{i?.(d),o(Ji.Tree)},[i]);return{createFolderTriggerView:n,onGridCreateSiblingFolder:r,onTreeCreateSiblingFolder:a,onGridCreateChildFolder:l,onTreeCreateChildFolder:c}},jb=e=>f.jsx(Ob,{...e,children:f.jsx(OG,{})}),OG=()=>{const{managerLabel:e,className:t,items:s,rootItem:i,filesLoading:n,treeOptions:o,showNavigationPanel:r,navigationPanelOptions:a,gridOptions:l,toolbarOptions:c,bulkActionsToolbarOptions:d,deleteConfirmationOptions:u,destinationFolderPopupOptions:h,conflictResolutionPopupOptions:g,compactViewWidthBreakpoint:m=xH,customBreakpointRef:v,sharedByMePaths:C,allowedFileTypes:w,maxSelectableFileSize:b,areHiddenFilesVisible:x,toggleHiddenFilesVisibility:y,isTreeCollapsed:S,toggleTreeCollapse:F,currentPath:R,gridRows:E,selectedPaths:D,selectedFiles:T,clearSelection:P,setSelectedPaths:k,effectiveSearchValue:A,handleBreadcrumbItemClick:U,handleSearchChange:I,handleTreeItemClick:H,handleTableRowClick:W,handleSelectionClick:V,onGridApiChange:Z,handleOpenDestinationFolderPopup:L,handleCloseDestinationFolderPopup:M,openDestinationFolderPopup:z,destinationFolderMode:K,handleSetCopiedFiles:ie,handleSetMovedFiles:we,handleDuplicate:N,handleCopyTo:oe,handleMoveTo:Te,handleGridAddSibling:ee,handleGridAddChild:le,handleTreeAddSibling:$,handleTreeAddChild:he,handleDownloadFiles:G,openDeleteConfirmation:ne,closeDeleteConfirmation:pe,confirmDelete:Fe,deleteConfirmationOpen:Pe,itemsToDelete:ce,renamedPath:Se,renamedItem:ke,onRename:Me,onRenameSave:be,onRenameCancel:Ne,onRenameValidate:Ve,createdFolderPath:St,forbiddenSymbolsRegExp:_e,forbiddenSymbolsTooltip:Rt,getDisplayName:_,isDragging:Ee,isDraggingOverWindow:Ft,handleDragEnter:Wo,handleDragLeave:Wc,handleDragOver:Ln,handleDrop:da,onUploadFiles:jo,onValidateUpload:jc,maxFileSize:_c,newActions:ua,isNewButtonVisible:ha,isNewButtonDisabled:pa,newFolderTempId:ga,cancelFolderCreation:li,saveFolderCreation:gs,validateFolderName:Rs,startFolderCreation:Fs,conflictingFiles:Vi,conflictResolutionOpen:ci,handleConflictReplace:Uc,handleConflictDuplicate:$c,handleConflictCancel:qc,handleConflictDecideForEach:Kc,uploadConflictingFiles:rt,uploadConflictResolutionOpen:zi,handleUploadConflictReplace:_s,handleUploadConflictDuplicate:_o,handleUploadConflictCancel:Uo,handleUploadConflictDecideForEach:$o,openMetadataPopup:Yc,fileMetadataPopupOptions:Es,isMetadataPopupOpen:Zc,selectedFileForMetadata:qo,closeMetadataPopup:On,onUnshareFiles:Nn,onRemoveFilesAccess:Hn,actionsRef:Xc,searchInProgress:fa,isSearchMode:Gn,emptyStateIcon:ma,emptyStateTitle:va="You don't have any files",emptyStateDescription:Ca="Upload or drag and drop files",sharedWithMeIds:Bn,onFolderPopupPathChange:Qc,onManagePermissions:Vn,onPreview:Ko,onOpenInNewTab:Jc,previewExtensions:Yo,isRenameFileAvailable:ed,isDuplicateFolderAvailable:td,getDisabledTooltip:Xe,fileTooLargeTooltip:Zo,unsupportedFileTypeTooltip:dt,gridClassName:sd,nonClickableTableColumns:Xo,hideSearchPathItemName:Qo,showHiddenFileSwitcherInDestinationPopup:id,newFolderDefaultName:zn}=Wb(),{width:Jo=mH,header:wa=vH,containerClassName:ba=pH,additionalButtons:xa,...ya}=o??{},[Wn,Sa]=p.useState(Jo),{renameTriggerView:jn,onGridRename:nd,onTreeRename:Ra}=RH({onRename:Me}),{createFolderTriggerView:Fa,onGridCreateSiblingFolder:od,onTreeCreateSiblingFolder:Ea,onGridCreateChildFolder:rd,onTreeCreateChildFolder:Da}=LG({onGridAddSibling:ee,onGridAddChild:le,onTreeAddSibling:$,onTreeAddChild:he}),er=p.useRef(null),ad=X=>{er.current===null&&(er.current=requestAnimationFrame(()=>{Sa(X),er.current=null}))},{columnDefs:ld,filterable:cd=!0,dateLocale:dd,dateOptions:ud,selectionMode:Pa,wrapCustomCellRenderers:Ta,visibleColumns:ka=yH,allowDisabledContextMenu:_n=!1,...Us}=l??{},{containerRef:hd,isBelowBreakpoint:_t}=FH(m,v),pd=p.useMemo(()=>Gn?[mt.Name,mt.Path,mt.Actions]:ka,[Gn,ka]),Un=p.useCallback((X,Ze,tt)=>VH(X,Ze,tt,dt,Zo),[Zo,dt]),$n=p.useCallback((X,Ze,tt)=>!!Xe?.(X)||!!Un(X,Ze,tt),[Un,Xe]),Wi=p.useMemo(()=>{const X=new Set;for(const Ze of E)$n(Ze,w,b)&&X.add(Ze.path);return X},[w,b,E,$n]),Ia=p.useCallback(X=>{const Ze=[],tt=[],es=!X.parentPath,_i=_e?.test(X.name);return o?.actionLabels&&(o.actionLabels[Y.AddSibling]&&X.nodeType===Ce.FOLDER&&!es&&Ze.push({key:"addSibling",label:o.actionLabels[Y.AddSibling],icon:f.jsx(Db,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>Ea([X])}),o.actionLabels[Y.AddChild]&&X.nodeType===Ce.FOLDER&&!_i&&Ze.push({key:"addChild",label:o.actionLabels[Y.AddChild],icon:f.jsx(Eb,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>Da([X])}),o.actionLabels[Y.Duplicate]&&!es&&!_i&&tt.push({key:"duplicate",label:o.actionLabels[Y.Duplicate],icon:f.jsx(j.IconCopy,{...te,className:"text-secondary"}),onClick:()=>N([X])}),o.actionLabels[Y.Copy]&&!es&&!_i&&tt.push({key:ft.Copy,label:o.actionLabels[Y.Copy],icon:f.jsx(Zp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>{ie([X]),L(ft.Copy)}}),o.actionLabels[Y.Move]&&!es&&!_i&&tt.push({key:ft.Move,label:o.actionLabels[Y.Move],icon:f.jsx(Xp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>{we([X]),L(ft.Move)}}),o.actionLabels[Y.Download]&&!es&&!_i&&tt.push({key:"download",label:o.actionLabels[Y.Download],icon:f.jsx(j.IconDownload,{...te,className:"text-secondary"}),onClick:()=>G([X])}),o.actionLabels[Y.Rename]&&!es&&tt.push({key:"rename",label:o.actionLabels[Y.Rename],icon:f.jsx(j.IconPencilMinus,{...te,className:"text-secondary"}),onClick:()=>Ra(X.path)}),o.actionLabels[Y.Unshare]&&Bn?.includes(X.path)&&!es&&tt.push({key:"unshare",label:o.actionLabels[Y.Unshare],icon:f.jsx(Qp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>Nn?.([X])}),o.actionLabels[Y.RemoveAccess]&&C?.has(X.path)&&!es&&tt.push({key:Y.RemoveAccess,label:o.actionLabels[Y.RemoveAccess],icon:f.jsx(j.IconUserX,{size:te.size,className:"text-secondary"}),onClick:()=>Hn?.([X])}),o.actionLabels[Y.ManagePermissions]&&typeof Vn=="function"&&X.nodeType===Ce.FOLDER&&!es&&tt.push({key:Y.ManagePermissions,label:o.actionLabels[Y.ManagePermissions],icon:f.jsx(j.IconExternalLink,{...te,className:"text-secondary"}),onClick:()=>Vn?.(X.path)}),o.actionLabels[Y.Delete]&&X.permissions?.includes(An.WRITE)&&!es&&tt.push({key:"delete",label:o.actionLabels[Y.Delete],icon:f.jsx(j.IconTrashX,{...te,className:"text-secondary"}),onClick:()=>ne([X],X.parentPath??"")})),Ze.length?tt.length===0?Ze:Ze.length===0?tt:[...Ze,{key:"divider",type:Io.Divider},...tt]:tt},[o?.actionLabels,_e,Vn,N,ie,L,we,G,Ra,Nn,Hn,Bn,C,ne,Da,Ea]),Ma=p.useMemo(()=>{const X=new Set;return T.forEach((Ze,tt)=>X.add(tt)),X},[T]),Aa=p.useCallback((X,Ze)=>{k(X),V?.(Ze)},[V,k]),La=TG({selectedFiles:T,actionLabels:d?.actionLabels,onDuplicate:N,onCopy:X=>{ie(X),L(ft.Copy)},onMove:X=>{we(X),L(ft.Move)},onDownload:G,onDelete:ne,onUnshare:Nn,onRemoveAccess:Hn,getCurrentFolderPath:()=>R??"/",sharedWithMeIds:Bn,sharedByMePaths:C,onClearSelection:P,forbiddenSymbolsRegExp:_e}),Oa=p.useCallback(X=>{c?.onTabChange?.(X),li()},[c,li]),gd=p.useCallback(()=>c&&D.size===0?f.jsxs("div",{className:Lm,role:"toolbar","aria-label":"File Manager Toolbar",children:[e,f.jsx(bG,{...c,onTabChange:Oa,areHiddenFilesVisible:x,onToggleHiddenFiles:y,isNewButtonVisible:ha,isNewButtonDisabled:pa,newButtonDropdownItems:ua})]}):D.size>0&&d?f.jsx("div",{className:Lm,role:"toolbar","aria-label":"File Manager Toolbar",children:f.jsx(gG,{...d,selectedCount:D.size,onClearSelection:P,actions:La})}):null,[Oa,d,D,P,La,x,y,c,ha,pa,ua,e]);p.useImperativeHandle(Xc,()=>({createFolder:Fs}),[Fs]);const Na=p.useCallback(()=>_t?null:f.jsx("aside",{role:"region","aria-label":"File Manager Tree Navigation",className:"min-h-0 min-w-0 h-full flex-none",children:f.jsx(Pv,{defaultWidth:Wn,width:Wn,onResizeStop:Sa,onResize:ad,minWidth:wH,maxWidth:bH,enabled:!S,children:f.jsx(gv,{width:Wn,title:wa,containerClassName:ba,titleClassName:"dial-body-text text-primary",additionalButtons:xa,isOpened:!S,onToggle:F,children:f.jsx(PG,{...ya,items:s,rootItemPath:i?.path,rootItemLabel:i?.label,selectedPath:R,sharedByMePaths:C,forbiddenSymbolsRegExp:_e,forbiddenSymbolsTooltip:Rt,onItemClick:H,areHiddenFilesVisible:x,getContextMenuItems:Ia,renamedPath:jn===xo.Tree?Se:void 0,onRenameSave:be,onRenameCancel:Ne,onRenameValidate:Ve,createdFolderPath:Fa===Ji.Tree?St:null,onCreateFolderCancel:li,onCreateFolderSave:gs,newFolderDefaultName:zn})})})}),[_t,Wn,S,wa,ba,xa,F,ya,s,i?.path,i?.label,R,C,_e,Rt,H,x,Ia,jn,Fa,Se,be,Ne,Ve,St,li,gs,zn]),Ha=AG({actionLabels:l?.actionLabels,onDuplicate:X=>N([X]),onCopy:X=>{ie([X]),L(ft.Copy)},onMove:X=>{we([X]),L(ft.Move)},onDownload:X=>G([X]),onRename:nd,onDelete:(X,Ze)=>ne([X],Ze),onInfo:X=>Yc(X),onUnshare:X=>Nn?.([X]),onRemoveAccess:X=>Hn?.([X]),sharedWithMeIds:Bn,sharedByMePaths:C,onManagePermissions:X=>Vn?.(X),onPreview:X=>Ko?.(X),onOpenInNewTab:X=>Jc?.(X),previewExtensions:Yo,isRenameFileAvailable:ed,isDuplicateFolderAvailable:td,forbiddenSymbolsRegExp:_e,onGridCreateSiblingFolder:od,onGridCreateChildFolder:rd}),tr=p.useCallback(X=>{const Ze=ti(s,X.path);return Ze?Ha(Ze):[]},[s,Ha]),fd=p.useCallback((X,Ze,tt)=>_n?!1:$n(X,Ze,tt),[_n,$n]),{actionsColumnDef:md}=SH({getContextMenuItems:tr,isRowDisabled:fd,allowedFileTypes:w,buttonClassName:_t?"":fH}),{columnDefs:di}=MG({userColumnDefs:ld,filterable:cd,dateLocale:dd,dateOptions:ud,effectiveVisibleColumns:pd,isCompactView:_t,hasActions:!!l?.actionLabels,actionsColumnDef:md,rootItemLabel:i?.label,rootItemPath:i?.path}),$s=p.useCallback(X=>{X.colDef.colId==="ag-Grid-SelectionColumn"||X.colDef.colId===mt.Actions||Se&&X.data?.path===Se||X.data?.isTemporary||Xo&&Xo.includes(X.colDef.colId)||X.data&&W(X.data)},[Se,W,Xo]),Ga=p.useCallback(()=>f.jsx(ta,{title:va,description:Ca,descriptionClassName:"text-sm",containerClassName:"gap-3 size-full bg-layer-2 border rounded-[4px] border-primary",titleClassName:"mt-2 !text-lg",icon:ma||f.jsx(j.IconFileDescription,{size:100,stroke:.5,className:"text-secondary"})}),[Ca,ma,va]),ji=p.useMemo(()=>X=>X.path,[]),sr=p.useMemo(()=>ae("min-h-[248px] overflow-auto md:min-h-[266px]",Ee?"border border-dashed border-accent-primary":"",Ft&&!Ee?"border border-dashed border-primary":""),[Ee,Ft]),ir=p.useMemo(()=>({...Us.additionalGridOptions,onCellClicked:$s,headerHeight:Nm,rowHeight:Nm,rowClass:"group/grid-row",defaultColDef:{...Us.additionalGridOptions?.defaultColDef,floatingFilter:a?.searchable?!1:Us.additionalGridOptions?.defaultColDef?.floatingFilter},context:{cancelFolderCreation:li,saveFolderCreation:gs,getDisplayName:_,onRenameCancel:Ne,onRenameSave:be,onRenameValidate:Ve,renameTriggerView:jn,validateFolderName:Rs,renamedItem:ke,renamedPath:Se,createdFolderPath:St,newFolderTempId:ga,sharedByMePaths:C,selectedPaths:D,disabledRowIds:Wi,forbiddenSymbolsRegExp:_e,forbiddenSymbolsTooltip:Rt,hideSearchPathItemName:Qo,newFolderDefaultName:zn,filesLoading:n}}),[Us.additionalGridOptions,$s,a?.searchable,li,gs,_,Ne,be,Ve,jn,Rs,ke,Se,St,ga,C,D,Wi,_e,Rt,Qo,zn,n]),Ba=p.useMemo(()=>E.length===0&&!Gn&&!n?Ga():f.jsx(Up,{columnDefs:di,rowData:E,getRowId:ji,loading:n||fa,getContextMenuItems:tr,withoutHeaderBorders:_t,onGridApiChange:Z,className:sr,...Us,selectionMode:Pa,wrapCustomCellRenderers:Ta,additionalGridOptions:ir,selectedRowIds:Ma,onSelectionChange:Aa,wrapperBorder:!Ee&&!Ft,disabledRowIds:Wi,allowDisabledContextMenu:_n}),[E,Gn,n,Ga,di,ji,fa,tr,_t,Z,sr,Us,Pa,Ta,ir,Ma,Aa,Ee,Ft,Wi,_n]);return f.jsx("section",{ref:hd,className:"size-full",children:f.jsxs("div",{className:J(dH,{"gap-3 pt-4":d&&D.size>0,"gap-4 p-3 pt-4":_t,"gap-2 pt-2":_t&&d&&D.size>0},t),children:[gd(),f.jsxs("div",{className:J(uH,sd),children:[Na(),f.jsxs("div",{className:J(hH,{"gap-3":_t}),children:[r&&f.jsx(wG,{...a??{},makeHref:X=>X.join("/"),path:R,onItemClick:U,rootItemPath:i?.path,rootItemLabel:i?.label,value:A,onSearchChange:I,isCompactView:_t,labelClassName:"dial-tiny-text"}),f.jsxs("section",{role:"region","aria-label":"File Manager Grid View",className:J(gH,"relative"),onDragEnter:Wo,onDragLeave:Wc,onDragOver:Ln,onDrop:da,children:[Ba,f.jsx(dG,{disabledGridRowIds:Wi,gridRows:E,getDisabledTooltip:Xe,getRowDisabledTooltip:Un,allowedFileTypes:w,maxSelectableFileSize:b})]})]})]}),f.jsx(fG,{...u,open:Pe,itemsToDelete:ce,onClose:pe,onConfirm:Fe}),f.jsx(Nb,{...h,open:z,onClose:M,onConfirm:()=>{const X=h?.destinationFolderPath??"/";K===ft.Copy?oe(X):Te(X),M()},mode:K,items:s,rootItem:i,gridOptions:{columnDefs:di.filter(X=>X.colId!==mt.Actions),loading:n},onUploadFiles:jo,onValidateUpload:jc,maxFileSize:_c,path:h?.destinationFolderPath??h?.sourceFolder??R,onPathChange:X=>{h?.setDestinationFolderPath?.(X)},sourceFolder:h?.sourceFolder??R,treeOptions:{header:o?.header},onFolderPopupPathChange:Qc,showHiddenFileSwitcher:id,hideSearchPathItemName:Qo}),f.jsx(Hm,{...g,open:ci,onClose:qc,onReplace:Uc,onDuplicate:$c,onDecideForEach:Kc,conflictingFiles:Vi}),f.jsx(Hm,{...g,open:zi,onClose:Uo,onReplace:_s,onDuplicate:_o,onDecideForEach:$o,conflictingFiles:rt}),f.jsx(SG,{open:Zc,onClose:On,fileMetadata:Es?.fileMetadata??qo,loading:Es?.loading,header:Es?.header,nameLabel:Es?.nameLabel,pathLabel:Es?.pathLabel,modifiedDateLabel:Es?.modifiedDateLabel,sizeLabel:Es?.sizeLabel,authorLabel:Es?.authorLabel,dateLocale:l?.dateLocale,dateOptions:l?.dateOptions})]})})},NG=(e,t=lo.MyFiles)=>{const s=Object.values(lo).includes(t)?t:lo.MyFiles,[i,n]=p.useState(s),o=a=>{n(a)},r=p.useMemo(()=>{if(e)return Object.values(lo).map(a=>({id:a,label:e?.[a]||a.replace("_"," ")}))},[e]);return{activeTab:i,handleTabChange:o,tabs:r}},HG="application/octet-stream";function GG(e,t){if(!e||e.length===0)return[];const s=e.find(l=>l.parentPath===""&&l.nodeType==="FOLDER");if(!s)return[];const i=s.path||s.url||"",n=wu(i,!0),o=e.filter(l=>l!==s).map(l=>{const c=l.path||l.url||"",d=BG(l.nodeType),u=d===Ce.FOLDER,h=wu(c,u);let g;return l.parentPath===null||l.parentPath===void 0?g=n:l.parentPath===""?g="":g=wu(l.parentPath,!0),{...l,originalPath:c,path:h,parentPath:g,nodeType:d}}),r=new Map;o.forEach(l=>{const c={...l,id:l.originalPath,name:l.name,path:l.path,parentPath:l.parentPath,nodeType:l.nodeType,resourceType:VG(l.resourceType),folderId:t,updatedAt:l.updatedAt?new Date(l.updatedAt).toISOString():new Date().toISOString(),items:l.nodeType===Ce.FOLDER?[]:void 0};l.nodeType===Ce.ITEM&&(c.extension=zG(l.name),c.contentType=l.contentType||HG,c.contentLength=l.contentLength||0),r.set(l.path,c)});const a=[];return r.forEach(l=>{if(l.parentPath===n)a.push(l);else{const c=l.path.lastIndexOf(l.name||""),d=l.path.slice(0,c),u=r.get(d);u&&u.nodeType===Ce.FOLDER?(u.items=u.items||[],u.items.push(l)):a.push(l)}}),a}function wu(e,t){try{let s=decodeURIComponent(e);return t?s.endsWith("/")||(s+="/"):s.endsWith("/")&&(s=s.slice(0,-1)),s}catch{return t&&!e.endsWith("/")?e+"/":!t&&e.endsWith("/")?e.slice(0,-1):e}}function BG(e){return e.toUpperCase()==="FOLDER"?Ce.FOLDER:Ce.ITEM}function VG(e){if(!e)return;const t=e.toUpperCase();return Object.values(Jp).find(i=>i.toUpperCase()===t)}function zG(e){const t=e.split(".");return t.length>1?t[t.length-1]:""}function WG(e,t="Prompts",s="prompts/public/",i="root"){const n=GG(e,i);return[{id:i,name:t,path:s,parentPath:"",nodeType:Ce.FOLDER,folderId:i,items:n}]}var Or=(e=>(e.Sections="sections",e.Flat="flat",e.FlatSections="flat-sections",e))(Or||{}),Qr=(e=>(e.Select="select",e.Radio="radio",e))(Qr||{}),Vc=(e=>(e.Row="row",e.Column="column",e))(Vc||{}),Ue=(e=>(e.String="string",e.Number="number",e.Integer="integer",e.Boolean="boolean",e.Object="object",e.Array="array",e.Null="null",e))(Ue||{});const jG={noItemSchema:"No item schema defined.",noItemsYet:"No items yet. Add one below.",addItem:"Add Item",selectTypeToAdd:"Select type to add…",noConfigurableProperties:"No configurable properties.",noFieldsYet:"No fields yet. Add one below.",keyColumnHeader:"Key",valueColumnHeader:"Value",addField:"Add Field",keyInputPlaceholder:"Enter key",stringInputPlaceholder:"Enter a value",integerInputPlaceholder:"Enter a whole number",numberInputPlaceholder:"Enter a number",enumSelectPlaceholder:"Select an option",selectTypePlaceholder:"Select type",removeItemAriaLabel:"Remove item",removeFieldAriaLabel:"Remove field"},_b=p.createContext(null);function Bi(){const e=p.useContext(_b);if(!e)throw new Error("useSchemaContext must be used inside DialSchemaRenderer");return e}function Ge(e,t,s=0){if(!e.$ref||s>10)return e;const i=e.$ref.replace(/^#\//,"").split("/");let n=t;for(const c of i)n=n?.[c];if(!n||typeof n!="object")return e;const{$ref:o,...r}=e,a=n;return{...a.$ref?Ge(a,t,s+1):a,...r}}function zc(e){return e==null||e===""}function zo(e){return e.type===Ue.Object||e.properties!=null&&e.oneOf==null&&e.anyOf==null&&e.type==null}function ng(e){return e.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function Ub(e,t){return e.type===Ue.Null?"null":e.$ref?Ge(e,t).title??e.$ref.split("/").pop()??"Option":e.title?e.title:e.type?Array.isArray(e.type)?e.type.join(" | "):e.type:e.discriminator?Object.keys(e.discriminator.mapping).join(" | "):e.const!=null?String(e.const):e.oneOf?"One of options":"Option"}function En(e,t,s=0){if(s>15)return;const i=Ge(e,t);if("default"in i)return i.default;if(zo(i)&&i.properties){const n={};let o=!1;for(const[r,a]of Object.entries(i.properties)){const l=En(a,t,s+1);l!==void 0&&(n[r]=l,o=!0)}return o?n:void 0}}function sn(e,t,s,i="",n=0){if(n>15)return[];const o=[],r=Ge(t,s);if(r.anyOf){const c=r.anyOf.filter(d=>d.type!==Ue.Null);return e!=null&&c.length===1?sn(e,c[0],s,i,n+1):o}if(r.oneOf&&r.discriminator){const c=r.discriminator.propertyName,d=e?.[c];if(d&&r.discriminator.mapping[d]){const u={$ref:r.discriminator.mapping[d]},h=Ge(u,s);return sn(e,h,s,i,n+1)}return o}if(r.type===Ue.Array||!r.type&&Array.isArray(e)){if(Array.isArray(e)&&r.items)for(let c=0;c<e.length;c++){const d=sn(e[c],r.items,s,`${i}[${c}]`,n+1);o.push(...d)}return o}if(!zo(r))return o;const a=r.required??[],l=e;for(const c of a){const d=r.properties?.[c];if(d&&Ge(d,s).isHidden)continue;const u=i?`${i}.${c}`:c,h=l?.[c];if(zc(h)){const g=d?.title??ng(c);o.push({path:u,message:`${g} is required`})}}if(l&&r.properties)for(const[c,d]of Object.entries(r.properties)){if(Ge(d,s).isHidden)continue;const u=i?`${i}.${c}`:c,h=l[c];if(h!=null){const g=sn(h,d,s,u,n+1);o.push(...g)}}return o}function $b(e,t,s){const i=Ge(t,s);if(Array.isArray(e))return`${e.length} item${e.length!==1?"s":""}`;if(zo(i)&&i.properties){const n=Object.entries(i.properties).filter(([,l])=>!Ge(l,s).isHidden),o=n.length,r=e;return`${n.filter(([l])=>{const c=r?.[l];return c!=null&&c!==""}).length}/${o} fields`}return""}function _G(e,t,s){if(e==null){const i=t.findIndex(n=>n.type===Ue.Null);return i>=0?i:0}if(Array.isArray(e)){const i=t.findIndex(n=>Ge(n,s).type===Ue.Array);return i>=0?i:0}if(typeof e=="boolean"){const i=t.findIndex(n=>Ge(n,s).type===Ue.Boolean);return i>=0?i:0}if(typeof e=="number"){const i=t.findIndex(n=>{const o=Ge(n,s);return o.type===Ue.Number||o.type===Ue.Integer});return i>=0?i:0}if(typeof e=="string"){const i=t.findIndex(n=>Ge(n,s).type===Ue.String);return i>=0?i:0}if(typeof e=="object"){const i=e;for(let n=0;n<t.length;n++){const o=Ge(t[n],s);if(o.discriminator&&o.discriminator.propertyName in i)return n}for(let n=0;n<t.length;n++){const o=Ge(t[n],s);if(zo(o)||o.oneOf)return n}return 0}return 0}function UG(e,t,s){if(t&&typeof e=="object"&&e!==null){const i=e[t];if(i)return`Item ${s+1}: ${i}`}if(typeof e=="object"&&e!==null){const i=e,n=i.name??i.title??i.id;if(n)return`Item ${s+1}: ${n}`}return`Item ${s+1}`}function $G(e){switch(Array.isArray(e.type)?e.type[0]:e.type){case Ue.String:return"";case Ue.Boolean:return!1;case Ue.Array:return[];case Ue.Integer:case Ue.Number:return;default:return{}}}const og=({title:e,description:t,summary:s,errorCount:i=0,level:n=0,children:o,onRemove:r,defaultExpanded:a=!0,removeItemAriaLabel:l="Remove item"})=>{const[c,d]=p.useState(a),u=n===0,h="rounded border border-secondary",g=J("flex items-center gap-2 cursor-pointer select-none transition-colors",u?"px-4 py-3 bg-layer-3 hover:bg-layer-4":"px-3 py-2 bg-layer-4 hover:bg-layer-3",c?"rounded-t":"rounded"),m=J("border-t border-secondary",u?"p-4":"p-3");return f.jsxs("div",{className:h,children:[f.jsxs("div",{className:g,onClick:()=>d(v=>!v),role:"button","aria-expanded":c,children:[f.jsx("span",{className:"shrink-0 text-secondary",children:c?f.jsx(j.IconChevronDown,{size:16,stroke:2}):f.jsx(j.IconChevronRight,{size:16,stroke:2})}),f.jsx("span",{className:J("flex-1 truncate",u?"dial-small-semi-text text-primary":"dial-small-text text-primary"),children:e}),t&&f.jsx(dv,{caption:t}),s&&f.jsx("span",{className:"dial-tiny-text text-secondary whitespace-nowrap ml-2",children:s}),i>0?f.jsxs("span",{className:"flex items-center gap-1 dial-tiny-text text-error whitespace-nowrap",children:[f.jsx(Be,{icon:f.jsx(j.IconAlertTriangle,{size:13,stroke:2})}),i," error",i>1?"s":""]}):f.jsx(Be,{icon:f.jsx(j.IconCheck,{size:13,stroke:2}),className:"text-success shrink-0"}),r&&f.jsx(Hc,{size:nt.Small,onClick:v=>{v.stopPropagation(),r()},"aria-label":l,className:"ml-1 shrink-0 p-0.5"})]}),c&&f.jsx("div",{className:m,children:o})]})},qb=({schema:e,value:t,onChange:s,path:i,level:n=0,required:o,label:r})=>{const{rootSchema:a,defaultExpanded:l=!0,touchedPaths:c=new Set,skipUntouched:d=!1}=Bi(),u=Ge(e,a),h=zo(u),g=u.type===Ue.Array;if(h||g){const C=$b(t,u,a),w=sn(t,u,a,i.join(".")),b=i.join("."),x=b+".",y=!d||c.has(b)||[...c].some(S=>S.startsWith(x));return f.jsx(og,{title:r??u.title??i[i.length-1]??"Section",description:u.description,level:n,summary:C,errorCount:y?w.length:0,defaultExpanded:l,children:f.jsx(Mi,{schema:u,value:t,onChange:s,path:i,level:n+1,required:o})})}const v=(!d||c.has(i.join(".")))&&o&&zc(t)?`${r??"Field"} is required`:void 0;return f.jsx(cc,{label:r,required:o,description:u.description,error:v,children:f.jsx(Mi,{schema:u,value:t,onChange:s,path:i,level:n,required:o,suppressInlineError:!0})})},Rl=({schema:e,value:t,onChange:s,path:i,level:n})=>{const{rootSchema:o,texts:r}=Bi(),a=Ge(e,o),l=Object.entries(a.properties??{}).filter(([,u])=>!Ge(u,o).isHidden),c=a.required??[],d=t??{};return l.length===0?f.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noConfigurableProperties}):f.jsx("div",{className:"flex flex-col gap-4",children:l.map(([u,h])=>{const m=Ge(h,o).title??h.title??ng(u),v=c.includes(u);return f.jsx(qb,{schema:h,value:d[u],onChange:C=>s({...d,[u]:C}),path:[...i,u],level:n,required:v,label:m},u)})})},qG=({schema:e,value:t,onChange:s,path:i,level:n})=>{const{rootSchema:o,texts:r,readonly:a=!1,defaultExpanded:l=!0}=Bi(),c=Array.isArray(t)?t:[],d=e.items,[u,h]=p.useState(void 0);if(!d)return f.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noItemSchema});const g=p.useMemo(()=>Ge(d,o),[d,o]),m=p.useMemo(()=>g.discriminator,[g]),v=p.useMemo(()=>m?.propertyName,[m]),C=p.useMemo(()=>m?Object.keys(m.mapping).map(y=>({value:y,label:y})):[],[m]),w=()=>{const y=u??C[0]?.value;let S;if(m&&y){const F=Ge({$ref:m.mapping[y]},o);S={...En(F,o)??{},[m.propertyName]:y}}else S=En(g,o)??$G(g);s([...c,S])},b=y=>{s(c.filter((S,F)=>F!==y))},x=(y,S)=>{s(c.map((F,R)=>R===y?S:F))};return f.jsxs("div",{className:"flex flex-col gap-3",children:[c.length===0&&f.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noItemsYet}),c.map((y,S)=>{const F=UG(y,v,S),R=$b(y,g,o),E=sn(y,g,o,`${i.join(".")}[${S}]`);return f.jsx(og,{title:F,level:n,summary:R,errorCount:E.length,onRemove:a?void 0:()=>b(S),defaultExpanded:l,removeItemAriaLabel:r.removeItemAriaLabel,children:f.jsx(Mi,{schema:d,value:y,onChange:D=>x(S,D),path:[...i,String(S)],level:n+1})},S)}),!a&&f.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[C.length>0&&f.jsx("div",{className:"flex-1 max-w-[280px]",children:f.jsx(Fn,{options:C,value:u??C[0]?.value,placeholder:r.selectTypeToAdd,onChange:y=>{const S=typeof y=="string"?y:y[0];h(S)}})}),f.jsx(qp,{label:r.addItem,iconBefore:f.jsx(j.IconPlus,{size:16,stroke:2}),onClick:w})]})]})},KG=({schema:e,value:t,onChange:s,path:i,level:n})=>{const{rootSchema:o,texts:r,readonly:a=!1}=Bi(),l=p.useId(),c=e.discriminator;if(c){const C=c.propertyName,w=c.mapping,b=Object.keys(w).map(F=>({value:F,label:F})),x=typeof t=="object"&&t!==null?t[C]:void 0,y=x?Ge({$ref:w[x]},o):void 0,S=F=>{const R=Ge({$ref:w[F]},o),E=En(R,o)??{};s({...E,[C]:F})};if(e.discriminatorDisplay===Qr.Radio){const F=e.discriminatorOrientation===Vc.Row,R=x?(()=>{const E=Ge({$ref:w[x]},o),{[C]:D,...T}=E.properties??{};return{...E,properties:T}})():void 0;return F?f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("div",{role:"radiogroup",className:"flex flex-row flex-wrap gap-4",children:Object.keys(w).map(E=>{const D=Ge({$ref:w[E]},o);return f.jsx(nn,{name:l,value:E,inputId:`${l}-${E}`,label:D.title??E,checked:x===E,disabled:a,onChange:()=>S(E)},E)})}),R&&f.jsx(Rl,{schema:R,value:t,onChange:s,path:i,level:n})]}):f.jsx("div",{role:"radiogroup",className:"flex flex-col gap-2",children:Object.keys(w).map(E=>{const D=Ge({$ref:w[E]},o),T=x===E,{[C]:P,...k}=D.properties??{},A={...D,properties:k};return f.jsxs("div",{className:"flex flex-col",children:[f.jsx(nn,{name:l,value:E,inputId:`${l}-${E}`,label:D.title??E,checked:T,disabled:a,onChange:()=>S(E)}),T&&f.jsx("div",{className:"ml-6 mt-2",children:f.jsx(Rl,{schema:A,value:t,onChange:s,path:i,level:n})})]},E)})})}return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("div",{className:"flex-1 max-w-[280px]",children:f.jsx(Fn,{options:b,value:x,placeholder:r.selectTypePlaceholder,disabled:a,onChange:F=>{const R=typeof F=="string"?F:F[0];R&&S(R)}})}),y&&f.jsx("div",{className:"pl-3",children:f.jsx(Rl,{schema:y,value:t,onChange:s,path:i,level:n})})]})}const d=e.oneOf??[],h=(()=>{if(t==null)return 0;if(typeof t=="object"&&!Array.isArray(t)){for(let C=0;C<d.length;C++)if(Ge(d[C],o).required?.every(b=>b in t))return C}return 0})(),g=C=>{const w=Ge(d[C],o),b=En(w,o);s(b??null)},m=d[h];if(e.discriminatorDisplay===Qr.Radio)return f.jsx("div",{role:"radiogroup",className:"flex flex-col gap-2",children:d.map((C,w)=>{const b=Ge(C,o),x=Ub(C,o)??`Option ${w+1}`,y=h===w;return f.jsxs("div",{className:"flex flex-col",children:[f.jsx(nn,{name:l,value:String(w),inputId:`${l}-${w}`,label:x,checked:y,disabled:a,onChange:()=>g(w)}),y&&b&&f.jsx("div",{className:"ml-6 mt-2",children:f.jsx(Mi,{schema:b,value:t,onChange:s,path:i,level:n})})]},w)})});const v=d.map((C,w)=>{const b=Ge(C,o);return{value:String(w),label:b.title??`Option ${w+1}`}});return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("div",{className:"flex-1 max-w-[280px]",children:f.jsx(Fn,{options:v,value:String(h),disabled:a,onChange:C=>{const w=typeof C=="string"?C:C[0];g(Number(w))}})}),m&&f.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:f.jsx(Mi,{schema:m,value:t,onChange:s,path:i,level:n})})]})},YG=({schema:e,value:t,onChange:s,path:i,level:n})=>{const{rootSchema:o,readonly:r=!1}=Bi(),a=e.anyOf??[],l=a.map((m,v)=>({value:String(v),label:Ub(m,o)})),c=_G(t,a,o),d=a[c],h=Ge(d,o).type===Ue.Null,g=m=>{const v=Ge(a[m],o);if(v.type===Ue.Null){s(null);return}const C=En(v,o);if(C!==void 0){s(C);return}switch(v.type){case Ue.Array:s([]);break;case Ue.String:s("");break;case Ue.Boolean:s(!1);break;case Ue.Integer:case Ue.Number:s(0);break;default:s({});break}};return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("div",{className:"flex-1 max-w-[280px]",children:f.jsx(Fn,{options:l,value:String(c),disabled:r,onChange:m=>{const v=typeof m=="string"?m:m[0];g(Number(v))}})}),!h&&d&&f.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:f.jsx(Mi,{schema:d,value:t,onChange:s,path:i,level:n})})]})},Kb=({schema:e,value:t,onChange:s,invalid:i})=>{const n=p.useId(),{texts:o,readonly:r=!1,inputClassName:a}=Bi(),l=e.const!==void 0,c=Array.isArray(e.enum)&&e.enum.length>0;if(l)return f.jsx(oi,{value:String(e.const??""),disabled:!0,onChange:void 0,className:"opacity-60"});if(c&&e.enumDisplay===Qr.Radio){const d=e.enumOrientation===Vc.Row;return f.jsx("div",{role:"radiogroup",className:d?"flex flex-row flex-wrap gap-x-4 gap-y-2":"flex flex-col gap-2",children:e.enum.map(u=>{const h=String(u);return f.jsx(nn,{name:n,value:h,inputId:`${n}-${h}`,label:h,checked:t!=null?String(t)===h:!1,disabled:r,onChange:g=>s(g)},h)})})}if(c){const d=e.enum.map(u=>({value:String(u),label:String(u)}));return f.jsx(Fn,{options:d,value:t!=null?String(t):void 0,invalid:i,disabled:r,onChange:u=>s(typeof u=="string"?u:u[0]),placeholder:o.enumSelectPlaceholder})}switch(e.type){case Ue.Boolean:return f.jsx(Gc,{switchId:n,isOn:!!t,disabled:r,onChange:d=>s(d)});case Ue.Integer:return f.jsx(fh,{integer:!0,value:t!=null?String(t):"",invalid:i,disabled:r,onChange:d=>s(d!==void 0?Number(d):void 0),placeholder:o.integerInputPlaceholder,containerClassName:a});case Ue.Number:return f.jsx(fh,{value:t!=null?String(t):"",invalid:i,disabled:r,onChange:d=>s(d!==void 0?Number(d):void 0),placeholder:o.numberInputPlaceholder,containerClassName:a});default:return e.isProtected?f.jsx(vb,{value:t!=null?String(t):"",invalid:i,disabled:r,onChange:d=>s(d??void 0),placeholder:o.stringInputPlaceholder,containerClassName:a}):f.jsx(oi,{value:t!=null?String(t):"",invalid:i,disabled:r,onChange:d=>s(d??void 0),placeholder:o.stringInputPlaceholder,containerClassName:a})}},$m=(e,t)=>({id:Math.random().toString(36).slice(2),key:e,value:t}),ZG=({pairKey:e,pairValue:t,valueSchema:s,onKeyChange:i,onValueChange:n,onRemove:o,keyInputPlaceholder:r,removeFieldAriaLabel:a,readonly:l=!1,inputClassName:c})=>{const[d,u]=p.useState(e);return f.jsxs("div",{className:"flex gap-2 items-center",children:[f.jsx("div",{className:"w-2/5 min-w-0",children:f.jsx(oi,{value:d,disabled:l,onChange:h=>u(h??""),onBlur:()=>{d!==e&&i(d)},placeholder:r,containerClassName:c})}),f.jsx("div",{className:"flex-1 min-w-0",children:f.jsx(Kb,{schema:s,value:t,onChange:n})}),!l&&f.jsx(Hc,{size:nt.Small,onClick:o,"aria-label":a,className:"shrink-0 p-1"})]})},XG=({schema:e,value:t,onChange:s})=>{const{texts:i,readonly:n=!1,inputClassName:o}=Bi(),r=e.additionalProperties===!0||e.additionalProperties==null?{type:"string"}:typeof e.additionalProperties=="object"?e.additionalProperties:{type:"string"},[a,l]=p.useState(()=>Object.entries(t??{}).map(([m,v])=>$m(m,v))),c=m=>Object.fromEntries(m.filter(v=>v.key!=="").map(v=>[v.key,v.value])),d=(m,v)=>{const C=a.map((w,b)=>b===m?{...w,key:v}:w);l(C),s(c(C))},u=(m,v)=>{const C=a.map((w,b)=>b===m?{...w,value:v}:w);l(C),s(c(C))},h=()=>{l(m=>[...m,$m("","")])},g=m=>{const v=a.filter((C,w)=>w!==m);l(v),s(c(v))};return f.jsxs("div",{className:"flex flex-col gap-2",children:[a.length===0&&f.jsx("p",{className:"dial-tiny-text text-secondary italic",children:i.noFieldsYet}),a.length>0&&f.jsxs("div",{className:"flex gap-2 mb-1 pr-7",children:[f.jsx("span",{className:"w-2/5 dial-tiny-text text-secondary font-medium",children:i.keyColumnHeader}),f.jsx("span",{className:"flex-1 dial-tiny-text text-secondary font-medium",children:i.valueColumnHeader})]}),a.map((m,v)=>f.jsx(ZG,{pairKey:m.key,pairValue:m.value,valueSchema:r,onKeyChange:C=>d(v,C),onValueChange:C=>u(v,C),onRemove:()=>g(v),keyInputPlaceholder:i.keyInputPlaceholder,removeFieldAriaLabel:i.removeFieldAriaLabel,readonly:n,inputClassName:o},m.id)),!n&&f.jsx("div",{className:"pt-1",children:f.jsx(qp,{label:i.addField,iconBefore:f.jsx(j.IconPlus,{size:16,stroke:2}),onClick:h})})]})},Mi=({schema:e,value:t,onChange:s,path:i,level:n,required:o,suppressInlineError:r=!1})=>{const{rootSchema:a,renderField:l,markTouched:c=()=>{},touchedPaths:d=new Set,skipUntouched:u=!1}=Bi(),h=Ge(e,a),g=C=>{c(i.join(".")),s(C)},m=!u||d.has(i.join("."));let v;if(h.oneOf)v=f.jsx(KG,{schema:h,value:t,onChange:g,path:i,level:n});else if(h.anyOf)v=f.jsx(YG,{schema:h,value:t,onChange:g,path:i,level:n});else if(zo(h)){const C=h.additionalProperties!=null&&h.additionalProperties!==!1,w=!h.properties||Object.keys(h.properties).length===0;C&&w?v=f.jsx(XG,{schema:h,value:t,onChange:g}):v=f.jsx(Rl,{schema:h,value:t,onChange:g,path:i,level:n})}else if(h.type===Ue.Array)v=f.jsx(qG,{schema:h,value:t,onChange:g,path:i,level:n});else{const C=m&&o&&zc(t),w=!r&&C?`${h.title??"Field"} is required`:void 0;v=f.jsxs(f.Fragment,{children:[f.jsx(Kb,{schema:h,value:t,onChange:g,invalid:C}),f.jsx(ds,{text:w})]})}return l?l(i,h,v):v},QG=({schema:e,defaultValue:t,texts:s,className:i,readonly:n=!1,defaultExpanded:o=!0,inputClassName:r,variant:a=Or.Sections,onChange:l,onPropertyChange:c,onDefaultValues:d,renderField:u,skipUntouched:h=!1})=>{const g=p.useMemo(()=>({...jG,...s}),[s]),m=p.useMemo(()=>t||(En(e,e)??{}),[]),[v,C]=p.useState(m),[w,b]=p.useState(new Set),x=p.useCallback(R=>{b(E=>E.has(R)?E:new Set([...E,R]))},[]);p.useEffect(()=>{d?.(m)},[]);const y=(R,E)=>{const D={...v,[R]:E};C(D),l?.(D),c?.(R,E)},S=Object.entries(e.properties??{}).filter(([,R])=>!Ge(R,e).isHidden),F=e.required??[];return f.jsx(_b.Provider,{value:{rootSchema:e,texts:g,readonly:n,defaultExpanded:o,inputClassName:r,renderField:u,touchedPaths:w,markTouched:x,skipUntouched:h},children:f.jsx("div",{className:J("flex flex-col gap-4",i),children:S.map(([R,E])=>{const D=Ge(E,e),T=D.title??E.title??ng(R),P=F.includes(R),k=v[R];if(a===Or.Flat)return f.jsx(qb,{schema:E,value:k,onChange:H=>y(R,H),path:[R],level:0,required:P,label:T},R);if(a===Or.FlatSections)return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("h2",{className:"dial-small-semi-text text-primary",children:T}),f.jsx(Mi,{schema:E,value:k,onChange:H=>y(R,H),path:[R],level:0,required:P})]},R);const A=sn(k,D,e,R),U=R+".",I=!h||w.has(R)||[...w].some(H=>H.startsWith(U));return f.jsx(og,{title:T,description:D.description,level:0,defaultExpanded:o,errorCount:I?P&&zc(k)?Math.max(A.length,1):A.length:0,children:f.jsx(Mi,{schema:E,value:k,onChange:H=>y(R,H),path:[R],level:1,required:P})},R)})})})},JG=()=>Promise.resolve().then(()=>require("./JsonEditor-D9i1Icn9.cjs")),eB=()=>Promise.resolve().then(()=>require("./MarkdownEditor-Df9W4VL7.cjs"));exports.AlertVariant=rs;exports.BASE_ICON_PROPS=te;exports.BASE_ICON_SIZE=$t;exports.ButtonAppearance=Ae;exports.ButtonVariant=Ye;exports.ConfirmationPopupVariant=Mo;exports.DIAL_ICON_SIZE=ct;exports.DialAlert=hv;exports.DialAutocompleteInputValue=pb;exports.DialBreadcrumb=rb;exports.DialBreadcrumbItem=xr;exports.DialButton=us;exports.DialButtonDropdown=Ch;exports.DialCaptionText=Jr;exports.DialCheckbox=yu;exports.DialCloseButton=_p;exports.DialCollapsibleSidebar=gv;exports.DialConditionalResizableContainer=Pv;exports.DialConfirmationPopup=ub;exports.DialDestinationFolderPopup=Nb;exports.DialDraggableItem=BS;exports.DialDropdown=Tt;exports.DialDropdownIcon=cH;exports.DialEllipsisTooltip=vt;exports.DialErrorButton=lb;exports.DialErrorIconButton=cb;exports.DialErrorText=ds;exports.DialFabButton=pN;exports.DialFileIcon=kh;exports.DialFileManager=jb;exports.DialFileManagerActions=Y;exports.DialFileManagerTabs=lo;exports.DialFileName=mc;exports.DialFileNodeType=Ce;exports.DialFilePermission=An;exports.DialFileResourceType=Jp;exports.DialFolderName=vc;exports.DialFormItem=cc;exports.DialFormPopup=DN;exports.DialGhostButton=qp;exports.DialGhostIconButton=db;exports.DialGrid=Up;exports.DialIcon=Be;exports.DialIconButton=Gs;exports.DialInput=oi;exports.DialInputPopup=gb;exports.DialItemType=Xt;exports.DialLabel=Pn;exports.DialLabelledText=Nx;exports.DialLinkButton=oN;exports.DialLoadFileArea=Fb;exports.DialLoadFileAreaField=rH;exports.DialLoader=ea;exports.DialNeutralButton=Ws;exports.DialNeutralIconButton=cN;exports.DialNoDataContent=ta;exports.DialNumberInput=fh;exports.DialPagination=Fx;exports.DialPasswordInput=vb;exports.DialPopup=Mn;exports.DialPrimaryButton=Hs;exports.DialPrimaryIconButton=lN;exports.DialProgressBar=bx;exports.DialProgressBarSize=pv;exports.DialRadioButton=nn;exports.DialRadioGroup=Dl;exports.DialRadioGroupPopupField=SN;exports.DialRemoveButton=Hc;exports.DialResizableContainer=Dv;exports.DialRoundedButton=rN;exports.DialSchemaRenderer=QG;exports.DialSearch=Kp;exports.DialSecondaryIconButton=dN;exports.DialSelect=Fn;exports.DialSelectField=jN;exports.DialSharedEntityIndicator=Hr;exports.DialSkeleton=Jn;exports.DialSkeletonAvatarShape=Pl;exports.DialSkeletonAvatarSize=Sr;exports.DialSkeletonVariant=as;exports.DialSpinner=uv;exports.DialSteps=kx;exports.DialSuccessIconButton=hN;exports.DialSwitch=Gc;exports.DialTabs=sb;exports.DialTag=io;exports.DialTagInput=hb;exports.DialTertiaryIconButton=uN;exports.DialTextarea=gN;exports.DialTooltip=Ot;exports.DropdownItemType=Io;exports.DropdownTrigger=Kt;exports.DropdownType=Y1;exports.ElementSize=nt;exports.FileManagerColumnKey=mt;exports.FileManagerProvider=Ob;exports.FlexibleActionsDirection=tn;exports.FormItemOrientation=Nr;exports.GridSelectionMode=Ar;exports.JsonSchemaType=Ue;exports.LazyDialJsonEditor=JG;exports.LazyDialMarkdownEditor=eB;exports.NAME_COLUMN=Bb;exports.NOT_ALLOWED_SPACES=sg;exports.NOT_ALLOWED_SPACES_REGEXP=cG;exports.NOT_ALLOWED_SYMBOLS=Ab;exports.NOT_ALLOWED_SYMBOLS_REGEXP=Lb;exports.PopupSize=Zt;exports.RadioGroupOrientation=hn;exports.ResizableContainerSide=Gr;exports.SIZE_COLUMN=zb;exports.SchemaDisplayMode=Qr;exports.SchemaOrientation=Vc;exports.SchemaRendererVariant=Or;exports.SelectSize=oc;exports.SelectVariant=rc;exports.StepStatus=Yt;exports.TabOrientation=ic;exports.TagVariant=dc;exports.UPDATED_AT_COLUMN=Vb;exports.jsxRuntimeExports=f;exports.mergeClasses=J;exports.useDialFileManagerTabs=NG;exports.useEditableItem=Hb;exports.useFileManagerContext=Wb;exports.wrapInRootFolder=WG;
71
+ |\r| )|[\0-]`,lG=`[${Ab.replace(/\\/g,"\\\\")}]`,Lb=new RegExp(`${lG}|${sg}`),cG=new RegExp(sg),Ob=({managerLabel:e,children:t,className:s,items:i=[],rootItem:n,path:o,defaultPath:r,filesLoading:a,selectedPaths:l,defaultSelectedPaths:c,onSelectedPathsChange:d,showHiddenFiles:u,onShowHiddenFilesChange:h,treeOptions:g,showNavigationPanel:m=!0,navigationPanelOptions:v,deleteConfirmationOptions:C,gridOptions:w,toolbarOptions:b,bulkActionsToolbarOptions:x,destinationFolderPopupOptions:y,conflictResolutionPopupOptions:S,onPathChange:F,onTableFileClick:R,handleSelectionClick:E,onGridApiChange:D,onCopyFiles:T,onMoveToFiles:P,onDeleteFiles:k,onDownloadFiles:A,onRenameValidate:U,renameValidationMessages:I,forbiddenSymbolsRegExp:H=Lb,forbiddenSymbolsTooltip:W,onUploadFiles:V,onValidateUpload:Z,uploadEnabled:L,uploadValidationMessages:M,maxFileSize:z,onUploadArchive:K,onCreateFolder:ie,onCreateFolderValidate:we,folderCreationValidationMessages:N,fileMetadataPopupOptions:oe,onGetInfo:Te,onUnshareFiles:ee,onRemoveFilesAccess:le,actionsRef:$,sharedByMePaths:he,onSearchFiles:G,searchResults:ne,searchInProgress:pe,clearSearchResults:Fe,allowedFileTypes:Pe,maxSelectableFileSize:ce,getDisabledTooltip:Se,fileTooLargeTooltip:ke,unsupportedFileTypeTooltip:Me,emptyStateIcon:be,emptyStateTitle:Ne,emptyStateDescription:Ve,sharedWithMeIds:St,onFolderPopupPathChange:_e,onManagePermissions:Rt,onPreview:_,onOpenInNewTab:Ee,previewExtensions:Ft,isRenameFileAvailable:Wo,isDuplicateFolderAvailable:Wc,customUploadFileAction:Ln,customCreateNewItemAction:da,customDuplicateAction:jo,customDeleteItemsAction:jc,customDownloadItemsAction:_c,customBreakpointRef:ua,gridClassName:ha,nonClickableTableColumns:pa,hideSearchPathItemName:ga,showHiddenFileSwitcherInDestinationPopup:li,autoSelectUploadedItems:gs=!1})=>{const{selectedPaths:Rs,clearSelection:Fs,setSelectedPaths:Vi}=aG({selectedPaths:l,defaultSelectedPaths:c,onSelectedPathsChange:d}),ci=p.useRef(null),Uc=p.useCallback((ve,We,qe)=>{if(gs){const{parent:qs,name:vd}=GH(We);ci.current={fileNames:new Set([vd]),destinationFolder:qs}}ie?.(ve,We,qe)},[ie,gs]),$c=p.useCallback((ve,We)=>{gs&&(ci.current={fileNames:new Set(ve.map(qe=>qe.name)),destinationFolder:We}),V?.(ve,We)},[V,gs]),qc=p.useCallback((ve,We,qe)=>{gs&&(ci.current={fileNames:new Set([We]),destinationFolder:qe}),K?.(ve,We,qe)},[K,gs]),Kc=p.useMemo(()=>{const ve=new Map;return Rs.forEach(We=>{const qe=ti(i,We);qe&&ve.set(We,qe)}),ve},[Rs,i]);p.useEffect(()=>{if(Rs.size===0)return;let ve=!1;for(const We of Rs)if(!ti(i,We)){ve=!0;break}if(ve){const We=new Set;for(const qe of Rs)ti(i,qe)&&We.add(qe);Vi(We)}},[i,Rs,Vi]);const{currentPath:rt,setCurrentPath:zi,handlePathChange:_s}=_H({path:o,defaultPath:r,onPathChange:F,onSelectionClear:Fs}),_o=p.useMemo(()=>{const{showFiles:ve=!0,showFolders:We=!0,...qe}=w||{};return{showFiles:ve,showFolders:We,...qe}},[w]),Uo=_o.showFiles,$o=_o.showFolders,[Yc,Es]=p.useState(),Zc=y?.destinationFolderPath??Yc,qo=p.useCallback(ve=>{y?.setDestinationFolderPath?y.setDestinationFolderPath(ve):Es(ve)},[y]),{areHiddenFilesVisible:On,toggleHiddenFilesVisibility:Nn}=zH({showHiddenFiles:u,onShowHiddenFilesChange:h}),{isTreeCollapsed:Hn,toggleTreeCollapse:Xc,setIsTreeCollapsed:fa}=WH({collapsed:g?.collapsed,onCollapseChange:g?.onCollapseChange}),{renamedPath:Gn,renamedItem:ma,renameHandler:va,renameSaveHandler:Ca,renameCancelHandler:Bn,renameValidateHandler:Qc,getDisplayName:Vn}=JH({items:i,onRenameValidate:U,validationMessages:I,onMoveToFiles:P}),{isSearchMode:Ko,searchValue:Jc,effectiveSearchValue:Yo,setSearchValue:ed,handleSearchChange:td,handleSearchClear:Xe,searchResultsRows:Zo}=rG({onSearchFiles:G,clearSearchResults:Fe,currentPath:rt,searchResults:ne,searchInProgress:pe,navigationPanelValue:v?.value,onNavigationPanelSearchChange:v?.onSearchChange,allItems:i,activeTab:b?.activeTab}),dt=p.useMemo(()=>yo(i,rt)??i[0],[i,rt]),{handleCopyTo:sd,handleMoveTo:Xo,handleDuplicate:Qo,handleOpenDestinationFolderPopup:id,handleCloseDestinationFolderPopup:zn,openDestinationFolderPopup:Jo,handleSetCopiedFiles:wa,handleSetMovedFiles:ba,destinationFolderMode:xa,destinationFolderTitle:ya,conflictingFiles:Wn,conflictResolutionOpen:Sa,closeConflictResolution:jn,handleConflictReplace:nd,handleConflictDuplicate:Ra,handleConflictCancel:Fa,handleConflictDecideForEach:od,sourceFolder:Ea}=jH({getDestinationFiles:ve=>yo(i,ve)?.items??[],onCopyFiles:T,onMoveToFiles:P,onCopySuccess:Fs,onMoveSuccess:Fs,onDuplicateSuccess:Fs,getCopyHeader:y?.getCopyHeader,getMoveHeader:y?.getMoveHeader});p.useEffect(()=>{Jo||qo(void 0)},[Jo,qo]);const{deleteConfirmationOpen:rd,itemsToDelete:Da,openDeleteConfirmation:er,closeDeleteConfirmation:ad,confirmDelete:ld}=UH({onDeleteFiles:k,onDeleteSuccess:Fs}),{handleDownloadFiles:cd}=$H({onDownloadFiles:A,customDownloadItemsAction:_c,onDownloadSuccess:Fs}),{isDragging:dd,isDraggingOverWindow:ud,uploadError:Pa,handleDragEnter:Ta,handleDragLeave:ka,handleDragOver:_n,handleDrop:Us,clearError:hd,openFileDialog:_t,fileInputRef:pd,openArchiveDialog:Un,uploadConflictingFiles:$n,uploadConflictResolutionOpen:Wi,closeUploadConflictResolution:Ia,handleUploadConflictReplace:Ma,handleUploadConflictDuplicate:Aa,handleUploadConflictCancel:La,handleUploadConflictDecideForEach:Oa}=KH({onUploadFiles:$c,onValidateUpload:Z,maxFileSize:z,onUploadArchive:qc,allowedFileTypes:Pe,validationMessages:M,uploadEnabled:L,currentFolder:dt}),gd=p.useCallback(ve=>{Xe();const We=rt??"",qe=dt?.items??[];Us(ve,We,qe)},[rt,dt,Us,Xe]),Na=p.useCallback(()=>{Xe();const ve=rt??"",We=dt?.items??[];_t(ve,We)},[rt,dt,_t,Xe]),Ha=p.useCallback(()=>{Xe();const ve=rt??"",We=dt?.items??[];Un(ve,We)},[rt,dt,Un,Xe]),tr=p.useCallback(()=>{Xe(),Ln?.(rt,dt)},[Ln,rt,dt,Xe]),fd=p.useCallback(()=>{Xe(),da?.(rt,dt)},[da,rt,dt,Xe]),md=p.useCallback(ve=>{jo?.(ve)},[jo]),{isCreatingFolder:di,newFolderTempId:$s,createdFolderPath:Ga,newFolderDefaultName:ji,startFolderCreation:sr,startGridSiblingFolderCreation:ir,startTreeSiblingFolderCreation:Ba,startGridChildFolderCreation:X,startTreeChildFolderCreation:Ze,cancelFolderCreation:tt,saveFolderCreation:es,validateFolderName:_i}=sG({currentFolder:dt,onCreateFolder:Uc,onValidateFolderName:we,validationMessages:N,items:i}),rg=p.useCallback(()=>{Xe(),sr()},[Xe,sr]),{newActions:Yb,isNewButtonVisible:Zb,isNewButtonDisabled:Xb}=eG({newActions:b?.newActions,currentFolder:dt,onUploadFiles:Ln?tr:Na,onUploadArchive:Ha,onCreateFolder:rg,onCreateNewItem:fd,isNewButtonDisabled:b?.isNewButtonDisabled}),Qb=p.useMemo(()=>{if(Ko){let He=Zo;Uo||(He=He.filter(Qe=>Qe.nodeType!==Ce.ITEM)),$o||(He=He.filter(Qe=>Qe.nodeType!==Ce.FOLDER)),On||(He=He.filter(Qe=>!Qe.path.split("/").filter(Boolean).some(rr=>rr.startsWith("."))));const or=He.map(Qe=>({...Qe,id:Qe.id??Qe.path,name:Qe.name??Qe.path.split("/").pop()??"",updatedAt:Qe.updatedAt,size:Qe.contentLength,contentLength:Qe.contentLength,author:Qe.author,path:Qe.path,nodeType:Qe.nodeType,extension:Qe.extension,isTemporary:!1,owner:Qe.owner,folderId:Qe.folderId}));return di&&$s&&or.unshift({id:$s,name:ji,updatedAt:void 0,author:void 0,path:rt??"/",nodeType:Ce.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),or}const ve=So(Yo).trim(),We=dt?.items??[];let qe=ve?LH(dt):We;Uo||(qe=qe.filter(He=>He.nodeType!==Ce.ITEM)),$o||(qe=qe.filter(He=>He.nodeType!==Ce.FOLDER)),On||(qe=qe.filter(He=>ve?!He.path.split("/").filter(Boolean).some(Qe=>Qe.startsWith(".")):!Pb(He)));const qs=qe.map(He=>({...He,id:He.id??He.path,name:He.name??He.path.split("/").pop()??"",updatedAt:He.updatedAt,size:He.contentLength,author:He.author,path:He.path,nodeType:He.nodeType,extension:He.extension,isTemporary:!1,owner:He.owner,contentType:He.contentType,contentLength:He.contentLength,folderId:He.folderId}));if(di&&$s&&!ve&&qs.unshift({id:$s,name:ji,updatedAt:void 0,author:void 0,path:rt??"/",nodeType:Ce.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),!ve)return qs;const vd=ve.split(/\s+/).filter(Boolean);return qs.filter(He=>{if(He.isTemporary)return!0;const or=So(He.name),Qe=So(He.author),lg=AH(He.extension);return vd.every(rr=>or.includes(rr)||Qe.includes(rr)||lg.includes(rr))})},[Ko,Zo,dt,Yo,On,di,$s,ji,Uo,$o,rt]);p.useEffect(()=>{const ve=ci.current;if(!ve)return;if((rt??"")!==ve.destinationFolder){ci.current=null;return}const We=yo(i,ve.destinationFolder);if(!We?.items)return;const qe=new Set;for(const qs of We.items)ve.fileNames.has(qs.name)&&BH(qs,Pe,ce)&&qe.add(qs.path);qe.size>0&&(Vi(qe),ci.current=null)},[i,rt,Vi,Pe,ce]);const Jb=p.useCallback(ve=>{_s(ve.path)},[_s]),e0=p.useCallback(ve=>{_s(ve)},[_s]),t0=p.useCallback(ve=>{ve.nodeType===Ce.FOLDER?_s(ve.path):R?.(ve)},[_s,R]),{expandedPaths:qn,setExpandedPaths:nr,collapseAll:s0}=Mb({expandedPaths:g?.expandedPaths,onExpandedPathsChange:g?.onExpandedPathsChange}),{additionalButtons:i0}=iG({collapseAll:s0,expandedPathsLength:qn.size,additionalButtons:g?.additionalButtons}),n0=p.useCallback(ve=>{ve.length>0&&(Xe(),ir(ve[0]))},[Xe,ir]),o0=p.useCallback(ve=>{ve.length>0&&(Xe(),zi(ve[0].path),nr(new Set(qn).add(ve[0].path||"/")),X(ve[0]))},[Xe,X,qn,nr,zi]),r0=p.useCallback(ve=>{ve.length>0&&(Xe(),Ba(ve[0]))},[Xe,Ba]),a0=p.useCallback(ve=>{ve.length>0&&(Xe(),zi(ve[0].path),nr(new Set(qn).add(ve[0].path||"/")),Ze(ve[0]))},[Xe,Ze,zi,qn,nr]),{isMetadataPopupOpen:l0,selectedFileForMetadata:c0,openMetadataPopup:d0,closeMetadataPopup:ag}=nG({onGetInfo:Te}),u0=p.useCallback(()=>{ag(),oe?.clearMetadata?.()},[ag,oe]),h0=p.useMemo(()=>{if(H)return Bc(H)},[H]),p0={managerLabel:e,className:s,items:i,allowedFileTypes:Pe,maxSelectableFileSize:ce,rootItem:n,filesLoading:a,treeOptions:{...g,expandedPaths:qn,onExpandedPathsChange:nr,additionalButtons:i0},showNavigationPanel:m,navigationPanelOptions:v,gridOptions:_o,toolbarOptions:b,bulkActionsToolbarOptions:x,deleteConfirmationOptions:C,destinationFolderPopupOptions:{...y,destinationFolderPath:Zc,setDestinationFolderPath:qo,header:ya,onCreateFolder:ie,onCreateFolderValidate:we,folderCreationValidationMessages:N,sourceFolder:Ea},currentPath:rt,setCurrentPath:zi,searchValue:Jc,effectiveSearchValue:Yo,setSearchValue:ed,areHiddenFilesVisible:On,toggleHiddenFilesVisibility:Nn,isTreeCollapsed:Hn,toggleTreeCollapse:Xc,setIsTreeCollapsed:fa,selectedPaths:Rs,selectedFiles:Kc,setSelectedPaths:Vi,clearSelection:Fs,currentFolder:dt,gridRows:Qb,handleCopyTo:sd,handleMoveTo:Xo,handleDuplicate:jo?md:Qo,handleSetCopiedFiles:wa,handleSetMovedFiles:ba,openDestinationFolderPopup:Jo,handleCloseDestinationFolderPopup:zn,handleOpenDestinationFolderPopup:id,destinationFolderMode:xa,handleGridAddSibling:n0,handleGridAddChild:o0,handleTreeAddSibling:r0,handleTreeAddChild:a0,handleDownloadFiles:cd,renamedPath:Gn,renamedItem:ma,forbiddenSymbolsRegExp:h0,forbiddenSymbolsTooltip:W,onRename:va,onRenameSave:Ca,onRenameCancel:Bn,onRenameValidate:Qc,getDisplayName:Vn,openDeleteConfirmation:jc||er,closeDeleteConfirmation:ad,confirmDelete:ld,deleteConfirmationOpen:rd,itemsToDelete:Da,handlePathChange:_s,handleTreeItemClick:Jb,handleBreadcrumbItemClick:e0,handleSearchChange:td,handleTableRowClick:t0,onTableFileClick:R,handleSelectionClick:E,onGridApiChange:D,isDragging:dd,uploadError:Pa,handleDragEnter:Ta,handleDragLeave:ka,handleDragOver:_n,handleDrop:gd,clearUploadError:hd,onUploadFiles:V,onValidateUpload:Z,maxFileSize:z,isDraggingOverWindow:ud,openFileDialog:Na,fileInputRef:pd,newActions:Yb,isNewButtonVisible:Zb,isNewButtonDisabled:Xb,isCreatingFolder:di,newFolderTempId:$s,createdFolderPath:Ga,newFolderDefaultName:ji,startFolderCreation:rg,cancelFolderCreation:tt,saveFolderCreation:es,validateFolderName:_i,conflictResolutionPopupOptions:S,conflictingFiles:Wn,conflictResolutionOpen:Sa,closeConflictResolution:jn,handleConflictReplace:nd,handleConflictDuplicate:Ra,handleConflictCancel:Fa,handleConflictDecideForEach:od,uploadConflictingFiles:$n,uploadConflictResolutionOpen:Wi,closeUploadConflictResolution:Ia,handleUploadConflictReplace:Ma,handleUploadConflictDuplicate:Aa,handleUploadConflictCancel:La,handleUploadConflictDecideForEach:Oa,fileMetadataPopupOptions:oe,isMetadataPopupOpen:l0,selectedFileForMetadata:c0,openMetadataPopup:d0,closeMetadataPopup:u0,onGetInfo:Te,onUnshareFiles:ee,onRemoveFilesAccess:le,actionsRef:$,sharedByMePaths:he,onSearchFiles:G,searchInProgress:pe,searchResults:ne,clearSearchResults:Fe,isSearchMode:Ko,emptyStateIcon:be,emptyStateTitle:Ne,emptyStateDescription:Ve,gridClassName:ha,sharedWithMeIds:St,onFolderPopupPathChange:_e,onManagePermissions:Rt,onPreview:_,onOpenInNewTab:Ee,previewExtensions:Ft,isRenameFileAvailable:Wo,isDuplicateFolderAvailable:Wc,customUploadFileAction:Ln,customBreakpointRef:ua,nonClickableTableColumns:pa,hideSearchPathItemName:ga,getDisabledTooltip:Se,fileTooLargeTooltip:ke,unsupportedFileTypeTooltip:Me,showHiddenFileSwitcherInDestinationPopup:li};return f.jsx(kb.Provider,{value:p0,children:t})},dG=({disabledGridRowIds:e,gridRows:t,getDisabledTooltip:s,getRowDisabledTooltip:i,allowedFileTypes:n,maxSelectableFileSize:o})=>{const[r,a]=p.useState(null),[l,c]=p.useState(null);p.useEffect(()=>{const h=()=>{a(null),c(null)};return window.addEventListener("scroll",h,!0),()=>window.removeEventListener("scroll",h,!0)},[]),p.useEffect(()=>{const h=v=>{const w=v.target.closest(".ag-row");if(!w){a(x=>x&&null);return}const b=new DOMParser().parseFromString(w.getAttribute("row-id")||"","text/html").documentElement.textContent;b&&e.has(b)?a(x=>x!==b?(c(w.getBoundingClientRect()),b):x):a(x=>x&&null)},g=()=>{a(null),c(null)},m=document.querySelector('[aria-label="File Manager Grid View"]');if(m)return m.addEventListener("mousemove",h),m.addEventListener("mouseleave",g),()=>{m.removeEventListener("mousemove",h),m.removeEventListener("mouseleave",g)}},[e]);const d=p.useMemo(()=>{if(r)return t.find(h=>h.path===r)},[r,t]),u=p.useMemo(()=>{if(d){if(s){const h=s(d);if(h)return h}return i(d,n,o)}},[d,s,i,n,o]);return f.jsx(f.Fragment,{children:u&&l&&Ao.createPortal(f.jsxs(xh,{open:!0,placement:"top",children:[f.jsx(Sh,{asChild:!0,children:f.jsx("div",{className:ae("fixed z-[-1]",u&&"pointer-events-none"),style:{top:l.top,left:l.left,width:l.width,height:l.height}})}),f.jsx(yh,{className:"max-w-[300px] rounded border border-ui-outline-primary bg-ui-popover px-3 py-1.5 text-center text-primary shadow-md fill-ui-popover",children:u})]}),document.body)})},Nb=({onClose:e,onConfirm:t,onFolderPopupPathChange:s,setDestinationFolderPath:i,open:n,copyLabel:o="Copy",moveLabel:r="Move",addFolderLabel:a="Add folder",mode:l=ft.Copy,hiddenFilesSwitcherLabel:c="Show hidden files",showHiddenFileSwitcher:d=!0,onUploadFiles:u,onValidateUpload:h,maxFileSize:g,header:m,sourceFolder:v,disabledPathTooltip:C="Unavailable for the original path. Please select another folder",path:w,collapsedFileTree:b=!1,alertProps:x,...y})=>{const[S,F]=p.useState(!1),[R,E]=p.useState(!1),D=p.useRef(null),T=Nc(),P=p.useCallback(H=>{F(H)},[]),k=p.useMemo(()=>{const H=[{key:"add-folder",label:a,icon:f.jsx(j.IconFolderPlus,{...te,className:"text-secondary"}),onClick:()=>{D.current?.createFolder(),E(!1)}}];return d&&H.push({key:"show-hidden-files",label:c,icon:f.jsx(j.IconEye,{...te,className:"text-secondary"}),onClick:()=>{F(W=>!W),E(!1)}}),H},[a,c,d]),A=p.useCallback(H=>{H&&(s?.(H),i?.(H))},[s,i]),U=l===ft.Copy?"Copy to":"Move to",I=p.useMemo(()=>!w||!v?!1:v===w,[w,v]);return f.jsx(Mn,{open:n,onClose:()=>{e()},size:Zt.Lg,dividerFooter:!0,dividers:!1,className:"md:!h-[800px] !bg-layer-2",footer:f.jsxs("div",{className:"flex justify-between items-center gap-2 p-4 md:px-6",children:[f.jsx("div",{className:"flex items-center gap-4 min-w-0",children:T?f.jsx(Tt,{menu:{items:k},open:R,onOpenChange:E,children:f.jsx(us,{className:"size-9 shrink-0","aria-label":"More options",iconBefore:f.jsx(j.IconDotsVertical,{...te,className:"text-secondary"})})}):f.jsxs(f.Fragment,{children:[f.jsx(Hs,{label:a,appearance:Ae.Ghost,iconBefore:f.jsx(j.IconFolderPlus,{...te}),onClick:()=>{D.current?.createFolder()}}),d&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"w-px h-[26px] bg-controls-disable-accent my-2"}),f.jsx("div",{className:"inline-flex items-center cursor-pointer",children:f.jsx(Gc,{label:c,isOn:S,onChange:P,switchId:"hidden-files-switch-modal"})})]})]})}),f.jsxs("div",{className:"flex space-x-4 items-center",children:[f.jsx(Ws,{onClick:e,label:"Cancel"}),I?f.jsx(Ot,{tooltip:C,children:f.jsx(Hs,{onClick:t,label:l==="copy"?o:r,disabled:I,"aria-disabled":I})}):f.jsx(Hs,{onClick:t,label:l==="copy"?o:r})]})]}),header:m??U,children:f.jsxs("div",{className:"bg-layer-2 h-full flex flex-col",children:[x&&f.jsx("div",{className:"px-6 mb-4 pt-4",children:f.jsx(hv,{...x})}),f.jsx("div",{className:"flex-1 min-h-0",children:f.jsx(jb,{...y,gridClassName:"size-full",className:J(y.className,"bg-layer-2 h-full flex pt-0"),actionsRef:D,path:w,showHiddenFiles:S,onShowHiddenFilesChange:P,treeOptions:{...y.treeOptions,collapsed:b,expandedPaths:new Set([y.rootItem?.path||"/"]),header:y.treeOptions?.header},gridOptions:{...y.gridOptions,selectionMode:void 0},navigationPanelOptions:{elementId:"file-manager-destination-search",...y.navigationPanelOptions},onUploadFiles:u,onValidateUpload:h,onPathChange:A,maxFileSize:g})})]})})},uG=12,hG=8;var tn=(e=>(e.Normal="normal",e.Reverse="reverse",e))(tn||{});function pG({actions:e,direction:t=tn.Normal,moreButtonWidth:s=$t,actionsGap:i=8,containerPadding:n=8,dependencies:o=[]}){const r=p.useRef(null),a=p.useRef(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef([]),[u,h]=p.useState(0),g=p.useCallback((C,w)=>{const b=l.current?.offsetWidth??0,x=c.current?.offsetWidth??0,y=b+x,F=w.getBoundingClientRect().width-y-s-i*2-n*2;let R=0,E=0;if(t===tn.Reverse)for(let D=C.length-1;D>=0&&(R+=C[D]+i,!(R>F));D--)E++;else for(const D of C){if(R+=D+i,R>F)break;E++}h(E)},[i,n,t,s]);p.useLayoutEffect(()=>{if(!a.current||!r.current)return;const w=Array.from(a.current.children).map(b=>Math.ceil(b.getBoundingClientRect().width));d.current=w,w.length!==0&&g(w,r.current)},[e,g,...o]),p.useEffect(()=>{if(!r.current)return;let C=null;const w=()=>{C&&cancelAnimationFrame(C),C=requestAnimationFrame(()=>{if(!r.current)return;const x=r.current,y=d.current;y.length!==0&&g(y,x)})},b=new ResizeObserver(w);return b.observe(r.current),w(),()=>{C&&cancelAnimationFrame(C),b.disconnect()}},[e.length,g,...o]);const m=t===tn.Reverse?e.slice(0,e.length-u):e.slice(u);return{visibleActions:t===tn.Reverse?e.slice(e.length-u):e.slice(0,u),hiddenActions:m,refs:{containerRef:r,measureRef:a,leftSectionRef:l,rightSectionRef:c}}}const gG=({getSelectionLabel:e,onClearSelection:t,actions:s,selectedCount:i})=>{const n=Nc(),{refs:{containerRef:o,leftSectionRef:r,measureRef:a},visibleActions:l,hiddenActions:c}=pG({actions:s,direction:tn.Reverse,dependencies:[n],actionsGap:uG,containerPadding:hG}),d=e(i);return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:a,className:"absolute top-0 left-0 invisible pointer-events-none overflow-hidden whitespace-nowrap flex gap-3",children:s.map(({key:u,icon:h,title:g})=>f.jsx(Ws,{iconBefore:h,label:g,hideTitleOnMobile:!0},u))}),f.jsxs("div",{ref:o,className:"rounded bg-layer-0 p-2 flex justify-between items-center w-full",role:"toolbar","aria-label":"File bulk actions",children:[f.jsx("div",{ref:r,children:f.jsx(Hs,{label:d,onClick:t,textClassName:"text-accent-primary whitespace-nowrap",appearance:Ae.Ghost,iconBefore:f.jsx(j.IconX,{...te,className:"text-accent-primary"})})}),f.jsxs("div",{className:"flex flex-1 w-full gap-3 items-center justify-end",children:[c.length>0&&f.jsx(Tt,{menu:{items:c},allowedPlacements:["bottom","bottom-start"],children:f.jsx(us,{className:"h-[38px]",iconBefore:f.jsx(j.IconDotsVertical,{...te,className:"text-secondary hover:text-accent-primary"})})}),l.map(({key:u,icon:h,tooltip:g,title:m,onClick:v,disabled:C})=>f.jsx(Ws,{className:"!p-[9px]",iconBefore:h,label:m,hideTitleOnMobile:!0,disabled:C,tooltipProps:{tooltip:g},onClick:w=>v?.({key:u,domEvent:w})},u))]})]})]})},fG=({open:e,itemsToDelete:t,onClose:s,onConfirm:i,cancelLabel:n="Cancel",confirmLabel:o="Delete",titleRenderer:r,contentRenderer:a})=>{const l=t.map(g=>g.name),d=r?.(l)||"Confirm Deleting Items",u=f.jsxs("div",{className:"px-6 py-3 dial-small-text",children:[f.jsx("p",{className:"text-secondary mb-3",children:t.length===1?f.jsxs(f.Fragment,{children:["Do you want to delete file or folder"," ",f.jsxs("span",{className:"text-primary break-all",children:['"',t[0].name,'"']}),"?"]}):f.jsxs(f.Fragment,{children:["Do you want to delete the following"," ",f.jsx("span",{className:"text-primary",children:t.length})," items?"]})}),t.length>1&&f.jsx(f.Fragment,{children:t.length<=10?f.jsx("ul",{className:"space-y-1 text-primary list-none",children:t.map(g=>f.jsx("li",{className:"truncate",children:g.name},g.path))}):f.jsxs(f.Fragment,{children:[f.jsx("ul",{className:"space-y-1 text-primary list-none mb-2",children:t.slice(0,10).map(g=>f.jsx("li",{className:"truncate",children:g.name},g.path))}),f.jsxs("p",{className:"text-secondary italic",children:["... and ",t.length-10," more"]})]})})]}),h=a?.(l)||u;return f.jsx(ub,{open:e,header:d,confirmLabel:o,cancelLabel:n,variant:Mo.Danger,onClose:s,onConfirm:i,children:h})},Um=e=>e.split("/").map(t=>t.trim()).filter(Boolean),mG="w-full flex items-center justify-between gap-4",vG="min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-3 px-3 flex items-center rounded",CG="w-[260px]",wG=({ariaLabel:e="Breadcrumb",labelClassName:t,onItemClick:s,path:i,makeHref:n,rootItemPath:o,rootItemLabel:r,breadcrumbsHiddenPathPart:a,className:l,breadcrumbClassName:c,searchable:d=!0,value:u,elementId:h="file-manager-search",disabled:g,invalid:m,onSearchChange:v,searchClassName:C,searchContainerClassName:w,isCompactView:b=!1})=>{const x=p.useMemo(()=>{if(!i)return;let D=Um(i);const T=[...D];let P=0;if(a){const A=Um(a);if(A.length){const U=D.findIndex((I,H)=>A.every((W,V)=>D[H+V]===W));U!==-1&&(P=A.length,D=[...D.slice(0,U),...D.slice(U+A.length)])}}if(!D.length)return[{label:"/"}];const k=D.map((A,U)=>{const I=U<D.length-P?U:U+P,H=T.slice(0,I+1),W=typeof n=="function"?n(H,I):void 0;return{label:A,href:W,onClick:s?V=>{V.preventDefault(),s(W)}:void 0}});if(o&&r){const A=o.split("/").filter(Boolean),U=i.split("/").filter(Boolean);if(A.every((H,W)=>U[W]===H)&&k.length>0){const H=k.slice(A.length);return[{label:r,href:o,onClick:s?W=>{W.preventDefault(),s(o)}:void 0},...H]}}return k},[i,a,o,r,n,s]),[y,S]=p.useState(!1),F=p.useCallback(()=>{if(b&&!y){S(!0);const D=document.getElementById(h);D&&D.focus()}},[h,y,b]),R=p.useCallback(()=>{(!u||String(u).trim()==="")&&v?.("")},[u,v]),E=p.useCallback(()=>b&&y?f.jsx(Ws,{className:"!p-[9px]",iconBefore:f.jsx(j.IconArrowLeft,{...te}),onClick:()=>{S(!1),v?.("")}}):f.jsx("div",{className:vG,children:f.jsx(rb,{pathItems:x,ariaLabel:e,labelClassName:t,className:c})}),[e,c,x,y,b,t,v]);return f.jsxs("div",{className:J(mG,{"gap-3":b},l),"aria-label":"navigation-panel",children:[E(),d&&f.jsx("div",{className:J(CG,{"w-[40px]":b&&!y,"w-full":b&&y}),role:"search","aria-label":"Search",onClick:F,children:f.jsx(Kp,{id:h,value:u??"",onChange:v,disabled:g,onBlur:R,invalid:m,className:C,wrapperClassName:b&&!y?"pl-2.5":"",containerClassName:w})})]})},bG=({tabs:e,activeTab:t,onTabChange:s,areHiddenFilesVisible:i,onToggleHiddenFiles:n,isNewButtonVisible:o,isNewButtonDisabled:r,newButtonVariant:a=Ye.Primary,newButtonDropdownItems:l=[],newButtonLabel:c="New",hiddenFilesSwitcherLabel:d="Hidden files",showHiddenFilesLabel:u="Show hidden files",hideHiddenFilesLabel:h="Hide hidden files",showHiddenFilesToggle:g=!0,disabledNewButtonTooltip:m})=>{const v=Nc(),C=p.useMemo(()=>[{key:"hidden-files-switch",label:i?h:u,icon:i?f.jsx(j.IconEyeOff,{...te,className:"text-secondary"}):f.jsx(j.IconEye,{...te,className:"text-secondary"}),onClick:()=>n?.(!i)}],[i,h,u,n]),w=()=>e&&t&&s?f.jsx(sb,{tabs:e,activeTab:t,onClick:y=>s(y),screenThreshold:nc.Tablet,smallScreenContainerClassName:"w-fit bg-transparent h-[38px] overflow-hidden",smallScreenDropdownItemClassName:"px-3 h-[38px]"}):null,b=()=>f.jsxs(f.Fragment,{children:[g&&f.jsxs(f.Fragment,{children:[f.jsx(Gc,{switchId:"hidden-files-switch",label:d,isOn:i,onChange:n}),f.jsx("div",{className:"h-6 border-l border-primary"})]}),o&&f.jsx(Ot,{tooltip:r&&m?m:void 0,children:f.jsx(Ch,{label:c,variant:a,items:l,disabled:r})})]}),x=()=>f.jsxs(f.Fragment,{children:[f.jsx(Tt,{menu:{items:C},allowedPlacements:["bottom","bottom-start"],children:f.jsx(db,{size:nt.Small,icon:f.jsx(j.IconDotsVertical,{stroke:2,size:ct.SM})})}),o?f.jsx(Ot,{tooltip:r&&m?m:void 0,children:f.jsx(Ch,{label:c,variant:a,items:l,disabled:r})}):null]});return f.jsxs("div",{className:"flex w-full justify-between gap-4 items-center overflow-x-auto",children:[f.jsx("div",{className:"flex-1 min-w-0",children:w()}),f.jsx("div",{className:"flex gap-2 shrink-0 items-center",children:v?x():b()})]})},xG=100,fr=16,Ts="text-secondary",ll="text-primary min-w-0",yG="text-primary break-words min-w-0",mr="bg-layer-2",SG=({open:e,onClose:t,fileMetadata:s,loading:i=!1,header:n="Information",nameLabel:o="Name:",pathLabel:r="Path:",modifiedDateLabel:a="Modified Date:",sizeLabel:l="Size:",authorLabel:c="Author:",dateLocale:d="en-US",dateOptions:u})=>f.jsx(Mn,{open:e,onClose:t,size:Zt.Sm,header:n,dividers:!1,children:f.jsx("div",{className:"px-6 py-4",children:f.jsx("div",{className:"grid gap-4 items-center dial-small-text",style:{gridTemplateColumns:`${xG}px 1fr`},children:i?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Ts,children:o}),f.jsx(Jn,{variant:as.Text,width:"100%",height:fr,className:mr}),f.jsx("div",{className:Ts,children:a}),f.jsx(Jn,{variant:as.Text,width:"90%",height:fr,className:mr}),f.jsx("div",{className:Ts,children:l}),f.jsx(Jn,{variant:as.Text,width:"60%",height:fr,className:mr}),f.jsx("div",{className:Ts,children:c}),f.jsx(Jn,{variant:as.Text,width:"80%",height:fr,className:mr}),f.jsx("div",{className:Ts,children:r}),f.jsx(Jn,{variant:as.Text,width:"70%",height:fr,className:mr})]}):s?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Ts,children:o}),f.jsx("div",{className:ll,children:f.jsx(vt,{text:s.name})}),f.jsx("div",{className:Ts,children:a}),f.jsx("div",{className:ll,children:f.jsx(vt,{text:OH(s.updatedAt,d,u)})}),f.jsx("div",{className:Ts,children:l}),f.jsx("div",{className:ll,children:f.jsx(vt,{text:Xr(s.contentLength)})}),f.jsx("div",{className:Ts,children:c}),f.jsx("div",{className:ll,children:f.jsx(vt,{text:s.author||"—"})}),f.jsx("div",{className:Ts,children:r}),f.jsx("div",{className:yG,children:decodeURIComponent(s.path)})]}):null})})}),RG={size:10,stroke:2},FG=26,vr="__new_folder";var Xt=(e=>(e.File="file",e.Folder="folder",e))(Xt||{});const EG=({name:e,type:t,shared:s=!1,loading:i=!1,sharedIndicatorClassName:n,sharedIndicatorTooltip:o,fileExtension:r,...a})=>{const l=c=>f.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[c,s&&f.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:f.jsx(Hr,{className:n,sharedIndicatorTooltip:o})})]});if(i)return l(f.jsx(ea,{}));if(t===Xt.File){const c=r||(e.includes(".")?e.split(".").pop():void 0);return f.jsx(kh,{...a,extension:c??"",className:"text-secondary",indicator:s?f.jsx(Hr,{className:n,sharedIndicatorTooltip:o}):null,label:"File type icon"})}return t===Xt.Folder?l(f.jsx(Be,{icon:f.jsx(j.IconFolder,{className:a.className,size:a.size??te.size,stroke:a.stroke??te.stroke}),className:"inline-block align-middle"})):null},DG=({name:e,type:t,elementId:s,loading:i=!1,shared:n=!1,iconClassName:o,iconIndicator:r,iconLabel:a,iconSize:l,iconStroke:c,inputInvalid:d,inputInvalidMessage:u,inputContainerClassName:h,inputIconAfter:g,inputRef:m,onChange:v,sharedIndicatorClassName:C,sharedIndicatorTooltip:w,fileExtension:b})=>{const x=()=>{const y=u?.startsWith(`${rs.Warning}__`);if(!d&&!y)return null;const S=u?.replace(`${rs.Warning}__`,"");return f.jsx(Ot,{tooltip:S,children:g||(y?f.jsx(j.IconAlertTriangleFilled,{...te,className:"text-warning-icon","aria-label":"warning"}):f.jsx(j.IconAlertCircleFilled,{...te,className:"text-error","aria-label":"alert"}))})};return f.jsxs("div",{className:"flex gap-2 items-center",children:[f.jsx(EG,{name:e,type:t,label:a,className:o,indicator:r,size:l,stroke:c,loading:i,shared:n,fileExtension:b,sharedIndicatorClassName:C,sharedIndicatorTooltip:w}),f.jsx(oi,{containerClassName:J("!h-6 py-[1px] pl-[7px] pr-[7px]",h),id:s,value:e,onChange:v,invalid:d,iconAfter:x(),inputRef:m})]})};function Hb({value:e,isEditing:t,isCreating:s,isLoading:i=!1,restoreOnCancel:n=!0,onValidate:o,onSave:r,onCancel:a,onCreateFolderSave:l,onCreateFolderCancel:c}){const[d,u]=p.useState(e),[h,g]=p.useState(!1),[m,v]=p.useState(""),C=p.useRef(null),w=p.useRef(!1),b=p.useCallback((R=!1,E="")=>{g(R),v(E)},[]),x=p.useCallback(R=>{if(!o)return b(),!0;const E=o(R);return E?E.startsWith(`${rs.Warning}__`)?(b(!1,E),!0):(b(!0,E),!1):(b(),!0)},[o,b]),y=p.useCallback(R=>{const E=R??"";u(E),x(E)},[x]),S=p.useCallback(()=>{x(d)?s&&!w.current&&!i?l?.(d):!s&&t&&r?.(d):C.current?.focus(),w.current=!1},[x,r,d,l,s,t,i]),F=p.useCallback(()=>{n&&u(e),s?c?.():a?.(),w.current=!0,b()},[e,a,n,b,c,s]);return p.useEffect(()=>{!t&&!s||(w.current=!1,u(e),b(),requestAnimationFrame(()=>{C.current?.focus(),C.current?.select()}))},[t,s,e,b]),p.useEffect(()=>{const R=C.current;if(!t&&!s||!R)return;const E=D=>{D.key==="Enter"?(D.preventDefault(),C.current?.blur()):D.key==="Escape"&&(D.preventDefault(),F())};return R.addEventListener("keydown",E),()=>R.removeEventListener("keydown",E)},[t,s,S,F]),p.useEffect(()=>{if(!t&&!s)return;const R=C.current;if(!R)return;const E=D=>{const T=D.relatedTarget;!(T&&R.contains(T))&&!i&&(x(d)?S():R.focus())};return R.addEventListener("blur",E),()=>{R.removeEventListener("blur",E)}},[t,s,d,x,S,i]),{inputRef:C,value:d,onChange:y,invalid:h,invalidMessage:m}}const lc=({name:e,type:t,elementId:s,editing:i=!1,loading:n=!1,creating:o=!1,shared:r=!1,iconSize:a=$t,validate:l,onSave:c,fileExtension:d,onCancel:u,onCreateFolderCancel:h,onCreateFolderSave:g,inputContainerClassName:m,sharedIndicatorClassName:v,sharedIndicatorTooltip:C,hideTooltip:w=!1,forbiddenSymbolsRegExp:b,forbiddenSymbolsTooltip:x,...y})=>{const{value:S,invalid:F,invalidMessage:R,onChange:E,inputRef:D}=Hb({value:e,isEditing:i,isCreating:o,isLoading:n,onValidate:l,onCancel:u,onSave:c,onCreateFolderCancel:h,onCreateFolderSave:g});if(!i&&!o){const T=tg({name:e,isFolder:t===Xt.Folder},b,x),P=!!T;return t===Xt.Folder?f.jsx(vc,{name:e,loading:n,shared:r,iconSize:a,className:"max-w-[428px] truncate",sharedIndicatorClassName:v,hideTooltip:w,isInvalidName:P,tooltipContent:T}):f.jsx(mc,{className:"max-w-[428px]",...y,name:e,shared:r,iconSize:a,sharedIndicatorClassName:v,hideTooltip:w,isInvalidName:P,tooltipContent:T})}return f.jsx(DG,{type:t,name:S,elementId:s,inputInvalid:F,inputInvalidMessage:R,inputRef:D,onChange:E,iconSize:a,fileExtension:d,inputContainerClassName:m,sharedIndicatorTooltip:C,sharedIndicatorClassName:v})},PG=({items:e,showFiles:t=!1,expandedPaths:s,loadingPaths:i=new Set,loadedPaths:n=new Set,sharedByMePaths:o=new Set,selectedPath:r,emptyStateTitle:a="No Folders",emptyStateDescription:l,emptyStateIcon:c,areHiddenFilesVisible:d=!1,renamedPath:u,createdFolderPath:h,rootItemLabel:g,rootItemPath:m,onItemClick:v,getContextMenuItems:C,onRenameSave:w,onRenameCancel:b,onRenameValidate:x,onExpandedPathsChange:y,onCreateFolderSave:S,onCreateFolderCancel:F,forbiddenSymbolsRegExp:R,forbiddenSymbolsTooltip:E,newFolderDefaultName:D})=>{const{expandedPaths:T,togglePath:P}=Mb({expandedPaths:s??new Set,onExpandedPathsChange:y}),k=U=>{v?.(U),P(U.path)},A=(U,I,H)=>{let W=U;return H&&H.path===h&&(W=[{folderId:vr,id:vr,items:[],name:D||"",nodeType:Ce.FOLDER,parentPath:h,path:`${h}/${vr}`},...U]),W.map(V=>{const{path:Z,nodeType:L,name:M,items:z}=V,K=L===Ce.FOLDER;if(!d&&Pb(V))return null;if(!K&&!t)return;const ie=Array.isArray(z)&&z.length>0&&z.some(Fe=>Fe.nodeType===Ce.FOLDER||t),we=T.has(Z),N=r===Z,oe=i.has(Z),Te=u===Z||Z===`${h}/${vr}`,ee=n.has(Z),le=o.has(Z),$=m&&g&&Z===m&&K,he=x&&(Fe=>x(Fe,V)),G=N?"bg-accent-primary-alpha border-l-2 border-l-accent-primary rounded":"border-l-2 border-l-transparent",ne=$?[]:C?.(V)??[],pe=R?tg({name:V.name,isFolder:K},R,E):void 0;return f.jsx("div",{className:"cursor-pointer text-secondary",children:f.jsxs("div",{className:"flex flex-col w-full","aria-label":"folder",children:[f.jsx(Tt,{trigger:[Kt.ContextMenu],className:"w-full",anchorToMouse:!0,menu:{items:ne},children:f.jsxs("div",{style:{paddingLeft:`${I*FG}px`},className:J("py-1 gap-[2px] dial-small-text flex justify-between hover:bg-accent-primary-alpha rounded group/item w-full mb-[2px] relative",G),"aria-selected":N,children:[!Te&&f.jsx("div",{className:"absolute size-full left-0 top-0 z-0",onClick:()=>k(V)}),f.jsx("div",{className:"relative flex flex-row truncate items-center w-fit h-6 gap-x-1 pl-1",onClick:()=>!Te&&k(V),children:f.jsxs(f.Fragment,{children:[K&&f.jsx(j.IconCaretRightFilled,{...RG,className:ae("flex-shrink-0",we&&"rotate-90 transition-all",ee&&!ie&&"text-transparent")}),f.jsx(lc,{elementId:`${Z}-tree-item`,name:$?g:M,type:K?Xt.Folder:Xt.File,loading:oe,shared:le,sharedIndicatorClassName:J("group-hover/item:bg-accent-primary-alpha",N&&"bg-accent-primary-alpha"),iconSize:Ri,forbiddenSymbolsRegExp:R,forbiddenSymbolsTooltip:pe,...!$&&{editing:Te,creating:Z===`${h}/${vr}`,onSave:w,onCancel:b,validate:he,onCreateFolderSave:S,onCreateFolderCancel:F}})]})}),ne.length>0&&!Te&&!$&&f.jsx("div",{className:"flex-1 flex justify-end",children:f.jsx(Tt,{placement:"bottom-start",allowedPlacements:["top-start","top-end"],menu:{items:ne},className:"sticky right-0",children:f.jsx(Be,{className:"invisible group-hover/item:visible text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary",icon:f.jsx(j.IconDotsVertical,{...te})})})})]})}),we&&(z||V?.path===h)&&A(z||[],I+1,V)]})},`${Z}-children`)})};return f.jsx("div",{className:"flex-1 size-full overflow-y-auto","aria-label":"folders-tree",children:e.length>0?A(e,0):f.jsx(ta,{title:a,description:l,icon:c})})},TG=({selectedFiles:e,actionLabels:t,onDuplicate:s,onCopy:i,onMove:n,onDownload:o,onUnshare:r,onRemoveAccess:a,onDelete:l,getCurrentFolderPath:c,sharedWithMeIds:d,sharedByMePaths:u,onClearSelection:h,forbiddenSymbolsRegExp:g})=>p.useMemo(()=>{const m=[],v=Array.from(e.values());if(!v.length||!t)return m;const C=Bc(g),w=C?v.some(b=>C.test(b.name)):!1;if(t[Y.RemoveAccess]&&a){const b=v.some(x=>!u?.has(x.path));m.push({key:Y.RemoveAccess,label:t[Y.RemoveAccess],title:t[Y.RemoveAccess],disabled:b,icon:f.jsx(j.IconUserX,{size:te.size,className:"text-secondary"}),onClick:()=>{a(v),h()}})}if(t[Y.Move]&&!w&&m.push({key:Y.Move,label:t[Y.Move],title:t[Y.Move],icon:f.jsx(Xp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>n(v)}),t[Y.Copy]&&!w&&m.push({key:Y.Copy,label:t[Y.Copy],title:t[Y.Copy],icon:f.jsx(Zp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>i(v)}),t[Y.Duplicate]&&!w&&m.push({key:Y.Duplicate,label:t[Y.Duplicate],title:t[Y.Duplicate],icon:f.jsx(j.IconCopy,{...te,className:"text-secondary"}),onClick:()=>s(v)}),t[Y.Delete]){const b=v.some(x=>x.permissions&&!x.permissions.includes(An.WRITE));m.push({key:Y.Delete,label:t[Y.Delete],title:t[Y.Delete],icon:f.jsx(j.IconTrashX,{...te,className:"text-secondary"}),disabled:b,tooltip:b?"Selected items contain item which can not be deleted":void 0,onClick:()=>{const x=c();l(v,x)}})}if(t[Y.Download]&&!w&&m.push({key:Y.Download,label:t[Y.Download],title:t[Y.Download],icon:f.jsx(j.IconDownload,{...te,className:"text-secondary"}),onClick:()=>o(v)}),t[Y.Unshare]&&r){const b=v.some(x=>!d?.includes(x.path));m.push({key:Y.Unshare,label:t[Y.Unshare],title:t[Y.Unshare],disabled:b,tooltip:b?"Selected items contain item which can not be unshared":void 0,icon:f.jsx(Qp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>{r(v),h()}})}return m},[e,t,r,a,n,i,s,c,l,o,d,h,u,g]);function ig(e){if(!e)return null;if(e instanceof Date)return isFinite(e.getTime())?e:null;if(typeof e=="number"){const t=new Date(e);return isFinite(t.getTime())?t:null}if(typeof e=="string"){const t=e.trim();if(/^-?\d+$/.test(t)){const i=Number(t);return ig(i)}const s=new Date(t);return isFinite(s.getTime())?s:null}return null}const Gb=({value:e,locale:t=J1,options:s=eb,emptyPlaceholder:i,className:n,hideTooltip:o=!1})=>{const r=ig(e),a=p.useMemo(()=>r?new Intl.DateTimeFormat(t,s).format(r):i,[r,i,t,s]),l=r?r.toISOString():void 0;return f.jsx(vt,{text:l?f.jsx("time",{dateTime:l,children:a}):f.jsx("span",{children:a}),className:ae(UO,n),hideTooltip:o})},kG=({id:e,name:t,nodeType:s,size:i,updatedAt:n,dateLocale:o,dateOptions:r,shared:a,sharedIndicatorClassName:l,hideTooltip:c=!1,forbiddenSymbolsRegExp:d,forbiddenSymbolsTooltip:u})=>f.jsx("div",{className:"flex",children:f.jsx("div",{className:"flex flex-1 min-w-0",children:f.jsx(lc,{type:s===Ce.FOLDER?Xt.Folder:Xt.File,name:t,elementId:e,shared:a,iconSize:Ri,sharedIndicatorClassName:l,hideTooltip:c,forbiddenSymbolsRegExp:d,forbiddenSymbolsTooltip:u,details:f.jsxs("div",{className:"flex items-center gap-1 dial-tiny-text text-secondary",children:[f.jsx("span",{children:s===Ce.ITEM?Xr(i):""}),n&&i&&f.jsx(j.IconCircleFilled,{size:2,className:"text-secondary"}),n?f.jsx("span",{children:f.jsx(Gb,{value:n,locale:o?.toString(),options:r,className:"dial-tiny-text text-secondary",hideTooltip:c})}):null]})})})}),Bb=e=>(t,s,i)=>({colId:mt.Name,field:"name",headerName:e,flex:1,minWidth:200,cellRenderer:n=>{const o=n.data.nodeType,{saveFolderCreation:r,validateFolderName:a,cancelFolderCreation:l,newFolderTempId:c,sharedByMePaths:d,selectedPaths:u,disabledRowIds:h,filesLoading:g}=n.context,m=d?.has(n.data.path),v=u?.has(n.data.path),C=h?.has(n.data.path)??!1,w=J(["group-hover/grid-row:bg-accent-primary-alpha",v&&"bg-accent-primary-alpha"]);if(n.data?.isTemporary&&n.data.id===c)return f.jsx(lc,{name:n.data.name,type:Xt.Folder,elementId:`new-folder-${n.data.id}`,editing:!0,creating:!0,loading:g,shared:m,sharedIndicatorClassName:w,iconSize:Ri,validate:a,onSave:r,onCancel:l,onCreateFolderSave:r,onCreateFolderCancel:l,inputContainerClassName:J(["!h-9",i&&o===Ce.ITEM&&"!h-10"])});const{renameTriggerView:b,renamedPath:x,renamedItem:y,getDisplayName:S,onRenameValidate:F,onRenameSave:R,onRenameCancel:E}=n.context;if(b===xo.Grid&&x===n.data?.path&&y&&n.data){const P=S(y);return f.jsx(lc,{name:P,type:o===Ce.FOLDER?Xt.Folder:Xt.File,fileExtension:y.name.split(".").pop(),elementId:`rename-${n.data.id}`,editing:!0,shared:m,sharedIndicatorClassName:w,iconSize:Ri,validate:k=>F(k,y),onSave:R,onCancel:E,inputContainerClassName:J(["!h-9",i&&o===Ce.ITEM&&"!h-10"]),forbiddenSymbolsRegExp:n.context.forbiddenSymbolsRegExp})}if(i)return f.jsx(kG,{id:n.data.id,name:n.data.name,nodeType:o,size:n.data.size,shared:m,sharedIndicatorClassName:w,updatedAt:n.data.updatedAt,dateLocale:t,dateOptions:s,hideTooltip:C,forbiddenSymbolsRegExp:n.context.forbiddenSymbolsRegExp,forbiddenSymbolsTooltip:n.context.forbiddenSymbolsTooltip});const T=tg({name:n.data.name,isFolder:o===Ce.FOLDER},n.context.forbiddenSymbolsRegExp,n.context.forbiddenSymbolsTooltip);return o===Ce.FOLDER?f.jsx(vc,{name:n.data.name,shared:m,sharedIndicatorClassName:w,iconSize:Ri,hideTooltip:C,isInvalidName:!!T,tooltipContent:T}):f.jsx(mc,{name:n.data.name,shared:m,sharedIndicatorClassName:w,iconSize:Ri,hideTooltip:C,isInvalidName:!!T,tooltipContent:T})}}),Vb=e=>(t,s)=>({colId:mt.UpdatedAt,field:"updatedAt",headerName:e,width:168,suppressSizeToFit:!0,cellRenderer:i=>{const n=i.context?.disabledRowIds?.has(i.data?.path)??!1;return f.jsx(Gb,{...i,hideTooltip:n})},cellRendererParams:{locale:t,options:s},filterValueGetter:i=>{const n=i.data[i.colDef.field||""],o=ig(n);return o?new Intl.DateTimeFormat(t||J1,s||eb).format(o):""}}),zb=e=>({colId:mt.Size,field:"size",headerName:e,width:120,suppressSizeToFit:!0,cellRenderer:t=>t.data.nodeType===Ce.ITEM?Xr(t.data.contentLength):"",filterValueGetter:t=>t.data.nodeType===Ce.ITEM?Xr(t.data.contentLength):""}),IG=e=>{const t=e.event;if(!(t?.target??null)?.closest("input")||!t)return!1;switch(t.key){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":case"Home":case"End":return!0;default:return!1}};function MG({userColumnDefs:e,filterable:t,dateLocale:s,dateOptions:i,effectiveVisibleColumns:n,isCompactView:o,hasActions:r,actionsColumnDef:a,rootItemLabel:l,rootItemPath:c}){const d=p.useMemo(()=>[Bb("Name")(s,i,o),{colId:mt.Path,field:"path",headerName:"Path",flex:1,minWidth:200,cellRenderer:h=>{const g=h.context?.disabledRowIds?.has(h.data.path)??!1;let m=h.data.path;if(h.context?.hideSearchPathItemName&&(h.data.parentPath?m=h.data.parentPath:m=m.replace(/\/[^/]+\/?$/,"")||"/"),!c||!l)return f.jsx(vt,{text:m,hideTooltip:g});const v=m.replace(c,l);return f.jsx(vt,{text:v,hideTooltip:g})}},Vb("Modified Date")(s,i),zb("Size"),{colId:mt.Author,field:"author",headerName:"Author",width:200,suppressSizeToFit:!0,cellRenderer:h=>h.data.author},{colId:mt.Owner,field:"owner",headerName:"Owner",width:200,suppressSizeToFit:!0,cellRenderer:h=>h.data.owner}],[s,i,o,l,c]);return{columnDefs:p.useMemo(()=>{const h=e?.map(v=>typeof v=="function"?v(s,i,o):v);let g=h??d;h||(g=g.filter(v=>v.colId&&n.includes(v.colId))),r&&(o&&(g=g.slice(0,1)),g.push(a));const m=v=>v.colId===mt.Name;return g.map(v=>{const C={...v,filter:t?v.filter:!1,floatingFilter:t?v.floatingFilter:!1};return m(v)&&!v.suppressKeyboardEvent&&(C.suppressKeyboardEvent=IG),C})},[a,s,i,d,n,t,r,o,e])}}const Wb=()=>{const e=p.useContext(kb);if(!e)throw new Error("useFileManagerContext must be used within <FileManagerProvider>");return e},AG=({actionLabels:e,onDuplicate:t,onCopy:s,onMove:i,onDownload:n,onRename:o,onDelete:r,onInfo:a,onUnshare:l,onRemoveAccess:c,sharedWithMeIds:d,sharedByMePaths:u,onManagePermissions:h,onPreview:g,onOpenInNewTab:m,previewExtensions:v,isRenameFileAvailable:C=!0,isDuplicateFolderAvailable:w=!0,forbiddenSymbolsRegExp:b,onGridCreateSiblingFolder:x,onGridCreateChildFolder:y})=>p.useMemo(()=>S=>{const F=[];if(!e)return F;const R=Bc(b)?.test(S.name);e[Y.AddSibling]&&S.nodeType===Ce.FOLDER&&F.push({key:"addSibling",label:e[Y.AddSibling],icon:f.jsx(Db,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>x([S])}),e[Y.AddChild]&&S.nodeType===Ce.FOLDER&&!R&&F.push({key:"addChild",label:e[Y.AddChild],icon:f.jsx(Eb,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>y([S])},{key:"divider",type:Io.Divider}),e[Y.OpenInNewTab]&&typeof m=="function"&&S.nodeType===Ce.ITEM&&!R&&F.push({key:Y.OpenInNewTab,label:e[Y.OpenInNewTab],icon:f.jsx(j.IconExternalLink,{...te,className:"text-secondary"}),onClick:()=>m?.(S)});const E=S.nodeType===Ce.ITEM||S.nodeType===Ce.FOLDER&&w;e[Y.Duplicate]&&E&&!R&&F.push({key:Y.Duplicate,label:e[Y.Duplicate],icon:f.jsx(j.IconCopy,{...te,className:"text-secondary"}),onClick:()=>t(S)}),e[Y.Copy]&&!R&&F.push({key:Y.Copy,label:e[Y.Copy],icon:f.jsx(Zp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>s(S)}),e[Y.Move]&&!R&&F.push({key:Y.Move,label:e[Y.Move],icon:f.jsx(Xp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>i(S)}),e[Y.Download]&&!R&&F.push({key:Y.Download,label:e[Y.Download],icon:f.jsx(j.IconDownload,{...te,className:"text-secondary"}),onClick:()=>n(S)}),e[Y.ManagePermissions]&&typeof h=="function"&&S.nodeType===Ce.FOLDER&&!R&&F.push({key:Y.ManagePermissions,label:e[Y.ManagePermissions],icon:f.jsx(j.IconExternalLink,{...te,className:"text-secondary"}),onClick:()=>h?.(S.path)});const D=S.name.split("."),T=D.length>1?D[D.length-1]:"",P=T&&v?.includes(`.${T}`);e[Y.Preview]&&typeof g=="function"&&S.nodeType===Ce.ITEM&&P&&!R&&F.push({key:Y.Preview,label:e[Y.Preview],icon:f.jsx(j.IconEye,{...te,className:"text-secondary"}),onClick:()=>g?.(S.path)});const k=!S.permissions||S.permissions.includes(An.WRITE);e[Y.Delete]&&k&&F.push({key:Y.Delete,label:e[Y.Delete],icon:f.jsx(j.IconTrashX,{...te,className:"text-secondary"}),onClick:()=>r(S,S.parentPath??"")});const A=S.nodeType===Ce.FOLDER||S.nodeType===Ce.ITEM&&C;return e[Y.Rename]&&A&&k&&F.push({key:Y.Rename,label:e[Y.Rename],icon:f.jsx(j.IconPencilMinus,{...te,className:"text-secondary"}),onClick:()=>o(S.path)}),e[Y.Info]&&S.nodeType===Ce.ITEM&&!R&&F.push({key:Y.Info,label:e[Y.Info],icon:f.jsx(j.IconInfoCircle,{...te,className:"text-secondary"}),onClick:()=>a(S)}),e[Y.Unshare]&&d?.includes(S.path)&&F.push({key:Y.Unshare,label:e[Y.Unshare],icon:f.jsx(Qp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>l(S)}),e[Y.RemoveAccess]&&u?.has(S.path)&&c&&F.push({key:Y.RemoveAccess,label:e[Y.RemoveAccess],icon:f.jsx(j.IconUserX,{size:te.size,className:"text-secondary"}),onClick:()=>c(S)}),F},[e,t,s,i,n,r,o,a,l,c,d,u,h,g,m,v,C,w,b,y,x]),LG=({onGridAddSibling:e,onGridAddChild:t,onTreeAddSibling:s,onTreeAddChild:i})=>{const[n,o]=p.useState(Ji.Grid),r=p.useCallback(d=>{e?.(d),o(Ji.Grid)},[e]),a=p.useCallback(d=>{s?.(d),o(Ji.Tree)},[s]),l=p.useCallback(d=>{t?.(d),o(Ji.Grid)},[t]),c=p.useCallback(d=>{i?.(d),o(Ji.Tree)},[i]);return{createFolderTriggerView:n,onGridCreateSiblingFolder:r,onTreeCreateSiblingFolder:a,onGridCreateChildFolder:l,onTreeCreateChildFolder:c}},jb=e=>f.jsx(Ob,{...e,children:f.jsx(OG,{})}),OG=()=>{const{managerLabel:e,className:t,items:s,rootItem:i,filesLoading:n,treeOptions:o,showNavigationPanel:r,navigationPanelOptions:a,gridOptions:l,toolbarOptions:c,bulkActionsToolbarOptions:d,deleteConfirmationOptions:u,destinationFolderPopupOptions:h,conflictResolutionPopupOptions:g,compactViewWidthBreakpoint:m=xH,customBreakpointRef:v,sharedByMePaths:C,allowedFileTypes:w,maxSelectableFileSize:b,areHiddenFilesVisible:x,toggleHiddenFilesVisibility:y,isTreeCollapsed:S,toggleTreeCollapse:F,currentPath:R,gridRows:E,selectedPaths:D,selectedFiles:T,clearSelection:P,setSelectedPaths:k,effectiveSearchValue:A,handleBreadcrumbItemClick:U,handleSearchChange:I,handleTreeItemClick:H,handleTableRowClick:W,handleSelectionClick:V,onGridApiChange:Z,handleOpenDestinationFolderPopup:L,handleCloseDestinationFolderPopup:M,openDestinationFolderPopup:z,destinationFolderMode:K,handleSetCopiedFiles:ie,handleSetMovedFiles:we,handleDuplicate:N,handleCopyTo:oe,handleMoveTo:Te,handleGridAddSibling:ee,handleGridAddChild:le,handleTreeAddSibling:$,handleTreeAddChild:he,handleDownloadFiles:G,openDeleteConfirmation:ne,closeDeleteConfirmation:pe,confirmDelete:Fe,deleteConfirmationOpen:Pe,itemsToDelete:ce,renamedPath:Se,renamedItem:ke,onRename:Me,onRenameSave:be,onRenameCancel:Ne,onRenameValidate:Ve,createdFolderPath:St,forbiddenSymbolsRegExp:_e,forbiddenSymbolsTooltip:Rt,getDisplayName:_,isDragging:Ee,isDraggingOverWindow:Ft,handleDragEnter:Wo,handleDragLeave:Wc,handleDragOver:Ln,handleDrop:da,onUploadFiles:jo,onValidateUpload:jc,maxFileSize:_c,newActions:ua,isNewButtonVisible:ha,isNewButtonDisabled:pa,newFolderTempId:ga,cancelFolderCreation:li,saveFolderCreation:gs,validateFolderName:Rs,startFolderCreation:Fs,conflictingFiles:Vi,conflictResolutionOpen:ci,handleConflictReplace:Uc,handleConflictDuplicate:$c,handleConflictCancel:qc,handleConflictDecideForEach:Kc,uploadConflictingFiles:rt,uploadConflictResolutionOpen:zi,handleUploadConflictReplace:_s,handleUploadConflictDuplicate:_o,handleUploadConflictCancel:Uo,handleUploadConflictDecideForEach:$o,openMetadataPopup:Yc,fileMetadataPopupOptions:Es,isMetadataPopupOpen:Zc,selectedFileForMetadata:qo,closeMetadataPopup:On,onUnshareFiles:Nn,onRemoveFilesAccess:Hn,actionsRef:Xc,searchInProgress:fa,isSearchMode:Gn,emptyStateIcon:ma,emptyStateTitle:va="You don't have any files",emptyStateDescription:Ca="Upload or drag and drop files",sharedWithMeIds:Bn,onFolderPopupPathChange:Qc,onManagePermissions:Vn,onPreview:Ko,onOpenInNewTab:Jc,previewExtensions:Yo,isRenameFileAvailable:ed,isDuplicateFolderAvailable:td,getDisabledTooltip:Xe,fileTooLargeTooltip:Zo,unsupportedFileTypeTooltip:dt,gridClassName:sd,nonClickableTableColumns:Xo,hideSearchPathItemName:Qo,showHiddenFileSwitcherInDestinationPopup:id,newFolderDefaultName:zn}=Wb(),{width:Jo=mH,header:wa=vH,containerClassName:ba=pH,additionalButtons:xa,...ya}=o??{},[Wn,Sa]=p.useState(Jo),{renameTriggerView:jn,onGridRename:nd,onTreeRename:Ra}=RH({onRename:Me}),{createFolderTriggerView:Fa,onGridCreateSiblingFolder:od,onTreeCreateSiblingFolder:Ea,onGridCreateChildFolder:rd,onTreeCreateChildFolder:Da}=LG({onGridAddSibling:ee,onGridAddChild:le,onTreeAddSibling:$,onTreeAddChild:he}),er=p.useRef(null),ad=X=>{er.current===null&&(er.current=requestAnimationFrame(()=>{Sa(X),er.current=null}))},{columnDefs:ld,filterable:cd=!0,dateLocale:dd,dateOptions:ud,selectionMode:Pa,wrapCustomCellRenderers:Ta,visibleColumns:ka=yH,allowDisabledContextMenu:_n=!1,...Us}=l??{},{containerRef:hd,isBelowBreakpoint:_t}=FH(m,v),pd=p.useMemo(()=>Gn?[mt.Name,mt.Path,mt.Actions]:ka,[Gn,ka]),Un=p.useCallback((X,Ze,tt)=>VH(X,Ze,tt,dt,Zo),[Zo,dt]),$n=p.useCallback((X,Ze,tt)=>!!Xe?.(X)||!!Un(X,Ze,tt),[Un,Xe]),Wi=p.useMemo(()=>{const X=new Set;for(const Ze of E)$n(Ze,w,b)&&X.add(Ze.path);return X},[w,b,E,$n]),Ia=p.useCallback(X=>{const Ze=[],tt=[],es=!X.parentPath,_i=_e?.test(X.name);return o?.actionLabels&&(o.actionLabels[Y.AddSibling]&&X.nodeType===Ce.FOLDER&&!es&&Ze.push({key:"addSibling",label:o.actionLabels[Y.AddSibling],icon:f.jsx(Db,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>Ea([X])}),o.actionLabels[Y.AddChild]&&X.nodeType===Ce.FOLDER&&!_i&&Ze.push({key:"addChild",label:o.actionLabels[Y.AddChild],icon:f.jsx(Eb,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>Da([X])}),o.actionLabels[Y.Duplicate]&&!es&&!_i&&tt.push({key:"duplicate",label:o.actionLabels[Y.Duplicate],icon:f.jsx(j.IconCopy,{...te,className:"text-secondary"}),onClick:()=>N([X])}),o.actionLabels[Y.Copy]&&!es&&!_i&&tt.push({key:ft.Copy,label:o.actionLabels[Y.Copy],icon:f.jsx(Zp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>{ie([X]),L(ft.Copy)}}),o.actionLabels[Y.Move]&&!es&&!_i&&tt.push({key:ft.Move,label:o.actionLabels[Y.Move],icon:f.jsx(Xp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>{we([X]),L(ft.Move)}}),o.actionLabels[Y.Download]&&!es&&!_i&&tt.push({key:"download",label:o.actionLabels[Y.Download],icon:f.jsx(j.IconDownload,{...te,className:"text-secondary"}),onClick:()=>G([X])}),o.actionLabels[Y.Rename]&&!es&&tt.push({key:"rename",label:o.actionLabels[Y.Rename],icon:f.jsx(j.IconPencilMinus,{...te,className:"text-secondary"}),onClick:()=>Ra(X.path)}),o.actionLabels[Y.Unshare]&&Bn?.includes(X.path)&&!es&&tt.push({key:"unshare",label:o.actionLabels[Y.Unshare],icon:f.jsx(Qp,{width:te.size,height:te.size,className:"text-secondary"}),onClick:()=>Nn?.([X])}),o.actionLabels[Y.RemoveAccess]&&C?.has(X.path)&&!es&&tt.push({key:Y.RemoveAccess,label:o.actionLabels[Y.RemoveAccess],icon:f.jsx(j.IconUserX,{size:te.size,className:"text-secondary"}),onClick:()=>Hn?.([X])}),o.actionLabels[Y.ManagePermissions]&&typeof Vn=="function"&&X.nodeType===Ce.FOLDER&&!es&&tt.push({key:Y.ManagePermissions,label:o.actionLabels[Y.ManagePermissions],icon:f.jsx(j.IconExternalLink,{...te,className:"text-secondary"}),onClick:()=>Vn?.(X.path)}),o.actionLabels[Y.Delete]&&X.permissions?.includes(An.WRITE)&&!es&&tt.push({key:"delete",label:o.actionLabels[Y.Delete],icon:f.jsx(j.IconTrashX,{...te,className:"text-secondary"}),onClick:()=>ne([X],X.parentPath??"")})),Ze.length?tt.length===0?Ze:Ze.length===0?tt:[...Ze,{key:"divider",type:Io.Divider},...tt]:tt},[o?.actionLabels,_e,Vn,N,ie,L,we,G,Ra,Nn,Hn,Bn,C,ne,Da,Ea]),Ma=p.useMemo(()=>{const X=new Set;return T.forEach((Ze,tt)=>X.add(tt)),X},[T]),Aa=p.useCallback((X,Ze)=>{k(X),V?.(Ze)},[V,k]),La=TG({selectedFiles:T,actionLabels:d?.actionLabels,onDuplicate:N,onCopy:X=>{ie(X),L(ft.Copy)},onMove:X=>{we(X),L(ft.Move)},onDownload:G,onDelete:ne,onUnshare:Nn,onRemoveAccess:Hn,getCurrentFolderPath:()=>R??"/",sharedWithMeIds:Bn,sharedByMePaths:C,onClearSelection:P,forbiddenSymbolsRegExp:_e}),Oa=p.useCallback(X=>{c?.onTabChange?.(X),li()},[c,li]),gd=p.useCallback(()=>c&&D.size===0?f.jsxs("div",{className:Lm,role:"toolbar","aria-label":"File Manager Toolbar",children:[e,f.jsx(bG,{...c,onTabChange:Oa,areHiddenFilesVisible:x,onToggleHiddenFiles:y,isNewButtonVisible:ha,isNewButtonDisabled:pa,newButtonDropdownItems:ua})]}):D.size>0&&d?f.jsx("div",{className:Lm,role:"toolbar","aria-label":"File Manager Toolbar",children:f.jsx(gG,{...d,selectedCount:D.size,onClearSelection:P,actions:La})}):null,[Oa,d,D,P,La,x,y,c,ha,pa,ua,e]);p.useImperativeHandle(Xc,()=>({createFolder:Fs}),[Fs]);const Na=p.useCallback(()=>_t?null:f.jsx("aside",{role:"region","aria-label":"File Manager Tree Navigation",className:"min-h-0 min-w-0 h-full flex-none",children:f.jsx(Pv,{defaultWidth:Wn,width:Wn,onResizeStop:Sa,onResize:ad,minWidth:wH,maxWidth:bH,enabled:!S,children:f.jsx(gv,{width:Wn,title:wa,containerClassName:ba,titleClassName:"dial-body-text text-primary",additionalButtons:xa,isOpened:!S,onToggle:F,children:f.jsx(PG,{...ya,items:s,rootItemPath:i?.path,rootItemLabel:i?.label,selectedPath:R,sharedByMePaths:C,forbiddenSymbolsRegExp:_e,forbiddenSymbolsTooltip:Rt,onItemClick:H,areHiddenFilesVisible:x,getContextMenuItems:Ia,renamedPath:jn===xo.Tree?Se:void 0,onRenameSave:be,onRenameCancel:Ne,onRenameValidate:Ve,createdFolderPath:Fa===Ji.Tree?St:null,onCreateFolderCancel:li,onCreateFolderSave:gs,newFolderDefaultName:zn})})})}),[_t,Wn,S,wa,ba,xa,F,ya,s,i?.path,i?.label,R,C,_e,Rt,H,x,Ia,jn,Fa,Se,be,Ne,Ve,St,li,gs,zn]),Ha=AG({actionLabels:l?.actionLabels,onDuplicate:X=>N([X]),onCopy:X=>{ie([X]),L(ft.Copy)},onMove:X=>{we([X]),L(ft.Move)},onDownload:X=>G([X]),onRename:nd,onDelete:(X,Ze)=>ne([X],Ze),onInfo:X=>Yc(X),onUnshare:X=>Nn?.([X]),onRemoveAccess:X=>Hn?.([X]),sharedWithMeIds:Bn,sharedByMePaths:C,onManagePermissions:X=>Vn?.(X),onPreview:X=>Ko?.(X),onOpenInNewTab:X=>Jc?.(X),previewExtensions:Yo,isRenameFileAvailable:ed,isDuplicateFolderAvailable:td,forbiddenSymbolsRegExp:_e,onGridCreateSiblingFolder:od,onGridCreateChildFolder:rd}),tr=p.useCallback(X=>{const Ze=ti(s,X.path);return Ze?Ha(Ze):[]},[s,Ha]),fd=p.useCallback((X,Ze,tt)=>_n?!1:$n(X,Ze,tt),[_n,$n]),{actionsColumnDef:md}=SH({getContextMenuItems:tr,isRowDisabled:fd,allowedFileTypes:w,buttonClassName:_t?"":fH}),{columnDefs:di}=MG({userColumnDefs:ld,filterable:cd,dateLocale:dd,dateOptions:ud,effectiveVisibleColumns:pd,isCompactView:_t,hasActions:!!l?.actionLabels,actionsColumnDef:md,rootItemLabel:i?.label,rootItemPath:i?.path}),$s=p.useCallback(X=>{X.colDef.colId==="ag-Grid-SelectionColumn"||X.colDef.colId===mt.Actions||Se&&X.data?.path===Se||X.data?.isTemporary||Xo&&Xo.includes(X.colDef.colId)||X.data&&W(X.data)},[Se,W,Xo]),Ga=p.useCallback(()=>f.jsx(ta,{title:va,description:Ca,descriptionClassName:"text-sm",containerClassName:"gap-3 size-full bg-layer-2 border rounded-[4px] border-primary",titleClassName:"mt-2 !text-lg",icon:ma||f.jsx(j.IconFileDescription,{size:100,stroke:.5,className:"text-secondary"})}),[Ca,ma,va]),ji=p.useMemo(()=>X=>X.path,[]),sr=p.useMemo(()=>ae("min-h-[248px] overflow-auto md:min-h-[266px]",Ee?"border border-dashed border-accent-primary":"",Ft&&!Ee?"border border-dashed border-primary":""),[Ee,Ft]),ir=p.useMemo(()=>({...Us.additionalGridOptions,onCellClicked:$s,headerHeight:Nm,rowHeight:Nm,rowClass:"group/grid-row",defaultColDef:{...Us.additionalGridOptions?.defaultColDef,floatingFilter:a?.searchable?!1:Us.additionalGridOptions?.defaultColDef?.floatingFilter},context:{cancelFolderCreation:li,saveFolderCreation:gs,getDisplayName:_,onRenameCancel:Ne,onRenameSave:be,onRenameValidate:Ve,renameTriggerView:jn,validateFolderName:Rs,renamedItem:ke,renamedPath:Se,createdFolderPath:St,newFolderTempId:ga,sharedByMePaths:C,selectedPaths:D,disabledRowIds:Wi,forbiddenSymbolsRegExp:_e,forbiddenSymbolsTooltip:Rt,hideSearchPathItemName:Qo,newFolderDefaultName:zn,filesLoading:n}}),[Us.additionalGridOptions,$s,a?.searchable,li,gs,_,Ne,be,Ve,jn,Rs,ke,Se,St,ga,C,D,Wi,_e,Rt,Qo,zn,n]),Ba=p.useMemo(()=>E.length===0&&!Gn&&!n?Ga():f.jsx(Up,{columnDefs:di,rowData:E,getRowId:ji,loading:n||fa,getContextMenuItems:tr,withoutHeaderBorders:_t,onGridApiChange:Z,className:sr,...Us,selectionMode:Pa,wrapCustomCellRenderers:Ta,additionalGridOptions:ir,selectedRowIds:Ma,onSelectionChange:Aa,wrapperBorder:!Ee&&!Ft,disabledRowIds:Wi,allowDisabledContextMenu:_n}),[E,Gn,n,Ga,di,ji,fa,tr,_t,Z,sr,Us,Pa,Ta,ir,Ma,Aa,Ee,Ft,Wi,_n]);return f.jsx("section",{ref:hd,className:"size-full",children:f.jsxs("div",{className:J(dH,{"gap-3 pt-4":d&&D.size>0,"gap-4 p-3 pt-4":_t,"gap-2 pt-2":_t&&d&&D.size>0},t),children:[gd(),f.jsxs("div",{className:J(uH,sd),children:[Na(),f.jsxs("div",{className:J(hH,{"gap-3":_t}),children:[r&&f.jsx(wG,{...a??{},makeHref:X=>X.join("/"),path:R,onItemClick:U,rootItemPath:i?.path,rootItemLabel:i?.label,value:A,onSearchChange:I,isCompactView:_t,labelClassName:"dial-tiny-text"}),f.jsxs("section",{role:"region","aria-label":"File Manager Grid View",className:J(gH,"relative"),onDragEnter:Wo,onDragLeave:Wc,onDragOver:Ln,onDrop:da,children:[Ba,f.jsx(dG,{disabledGridRowIds:Wi,gridRows:E,getDisabledTooltip:Xe,getRowDisabledTooltip:Un,allowedFileTypes:w,maxSelectableFileSize:b})]})]})]}),f.jsx(fG,{...u,open:Pe,itemsToDelete:ce,onClose:pe,onConfirm:Fe}),f.jsx(Nb,{...h,open:z,onClose:M,onConfirm:()=>{const X=h?.destinationFolderPath??"/";K===ft.Copy?oe(X):Te(X),M()},mode:K,items:s,rootItem:i,gridOptions:{columnDefs:di.filter(X=>X.colId!==mt.Actions),loading:n},onUploadFiles:jo,onValidateUpload:jc,maxFileSize:_c,path:h?.destinationFolderPath??h?.sourceFolder??R,onPathChange:X=>{h?.setDestinationFolderPath?.(X)},sourceFolder:h?.sourceFolder??R,treeOptions:{header:o?.header},onFolderPopupPathChange:Qc,showHiddenFileSwitcher:id,hideSearchPathItemName:Qo}),f.jsx(Hm,{...g,open:ci,onClose:qc,onReplace:Uc,onDuplicate:$c,onDecideForEach:Kc,conflictingFiles:Vi}),f.jsx(Hm,{...g,open:zi,onClose:Uo,onReplace:_s,onDuplicate:_o,onDecideForEach:$o,conflictingFiles:rt}),f.jsx(SG,{open:Zc,onClose:On,fileMetadata:Es?.fileMetadata??qo,loading:Es?.loading,header:Es?.header,nameLabel:Es?.nameLabel,pathLabel:Es?.pathLabel,modifiedDateLabel:Es?.modifiedDateLabel,sizeLabel:Es?.sizeLabel,authorLabel:Es?.authorLabel,dateLocale:l?.dateLocale,dateOptions:l?.dateOptions})]})})},NG=(e,t=lo.MyFiles)=>{const s=Object.values(lo).includes(t)?t:lo.MyFiles,[i,n]=p.useState(s),o=a=>{n(a)},r=p.useMemo(()=>{if(e)return Object.values(lo).map(a=>({id:a,label:e?.[a]||a.replace("_"," ")}))},[e]);return{activeTab:i,handleTabChange:o,tabs:r}},HG="application/octet-stream";function GG(e,t){if(!e||e.length===0)return[];const s=e.find(l=>l.parentPath===""&&l.nodeType==="FOLDER");if(!s)return[];const i=s.path||s.url||"",n=wu(i,!0),o=e.filter(l=>l!==s).map(l=>{const c=l.path||l.url||"",d=BG(l.nodeType),u=d===Ce.FOLDER,h=wu(c,u);let g;return l.parentPath===null||l.parentPath===void 0?g=n:l.parentPath===""?g="":g=wu(l.parentPath,!0),{...l,originalPath:c,path:h,parentPath:g,nodeType:d}}),r=new Map;o.forEach(l=>{const c={...l,id:l.originalPath,name:l.name,path:l.path,parentPath:l.parentPath,nodeType:l.nodeType,resourceType:VG(l.resourceType),folderId:t,updatedAt:l.updatedAt?new Date(l.updatedAt).toISOString():new Date().toISOString(),items:l.nodeType===Ce.FOLDER?[]:void 0};l.nodeType===Ce.ITEM&&(c.extension=zG(l.name),c.contentType=l.contentType||HG,c.contentLength=l.contentLength||0),r.set(l.path,c)});const a=[];return r.forEach(l=>{if(l.parentPath===n)a.push(l);else{const c=l.path.lastIndexOf(l.name||""),d=l.path.slice(0,c),u=r.get(d);u&&u.nodeType===Ce.FOLDER?(u.items=u.items||[],u.items.push(l)):a.push(l)}}),a}function wu(e,t){try{let s=decodeURIComponent(e);return t?s.endsWith("/")||(s+="/"):s.endsWith("/")&&(s=s.slice(0,-1)),s}catch{return t&&!e.endsWith("/")?e+"/":!t&&e.endsWith("/")?e.slice(0,-1):e}}function BG(e){return e.toUpperCase()==="FOLDER"?Ce.FOLDER:Ce.ITEM}function VG(e){if(!e)return;const t=e.toUpperCase();return Object.values(Jp).find(i=>i.toUpperCase()===t)}function zG(e){const t=e.split(".");return t.length>1?t[t.length-1]:""}function WG(e,t="Prompts",s="prompts/public/",i="root"){const n=GG(e,i);return[{id:i,name:t,path:s,parentPath:"",nodeType:Ce.FOLDER,folderId:i,items:n}]}var Or=(e=>(e.Sections="sections",e.Flat="flat",e.FlatSections="flat-sections",e))(Or||{}),Qr=(e=>(e.Select="select",e.Radio="radio",e))(Qr||{}),Vc=(e=>(e.Row="row",e.Column="column",e))(Vc||{}),Ue=(e=>(e.String="string",e.Number="number",e.Integer="integer",e.Boolean="boolean",e.Object="object",e.Array="array",e.Null="null",e))(Ue||{});const jG={noItemSchema:"No item schema defined.",noItemsYet:"No items yet. Add one below.",addItem:"Add Item",selectTypeToAdd:"Select type to add…",noConfigurableProperties:"No configurable properties.",noFieldsYet:"No fields yet. Add one below.",keyColumnHeader:"Key",valueColumnHeader:"Value",addField:"Add Field",keyInputPlaceholder:"Enter key",stringInputPlaceholder:"Enter a value",integerInputPlaceholder:"Enter a whole number",numberInputPlaceholder:"Enter a number",enumSelectPlaceholder:"Select an option",selectTypePlaceholder:"Select type",removeItemAriaLabel:"Remove item",removeFieldAriaLabel:"Remove field"},_b=p.createContext(null);function Bi(){const e=p.useContext(_b);if(!e)throw new Error("useSchemaContext must be used inside DialSchemaRenderer");return e}function Ge(e,t,s=0){if(!e.$ref||s>10)return e;const i=e.$ref.replace(/^#\//,"").split("/");let n=t;for(const c of i)n=n?.[c];if(!n||typeof n!="object")return e;const{$ref:o,...r}=e,a=n;return{...a.$ref?Ge(a,t,s+1):a,...r}}function zc(e){return e==null||e===""}function zo(e){return e.type===Ue.Object||e.properties!=null&&e.oneOf==null&&e.anyOf==null&&e.type==null}function ng(e){return e.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function Ub(e,t){return e.type===Ue.Null?"null":e.$ref?Ge(e,t).title??e.$ref.split("/").pop()??"Option":e.title?e.title:e.type?Array.isArray(e.type)?e.type.join(" | "):e.type:e.discriminator?Object.keys(e.discriminator.mapping).join(" | "):e.const!=null?String(e.const):e.oneOf?"One of options":"Option"}function En(e,t,s=0){if(s>15)return;const i=Ge(e,t);if("default"in i)return i.default;if(zo(i)&&i.properties){const n={};let o=!1;for(const[r,a]of Object.entries(i.properties)){const l=En(a,t,s+1);l!==void 0&&(n[r]=l,o=!0)}return o?n:void 0}}function sn(e,t,s,i="",n=0){if(n>15)return[];const o=[],r=Ge(t,s);if(r.anyOf){const c=r.anyOf.filter(d=>d.type!==Ue.Null);return e!=null&&c.length===1?sn(e,c[0],s,i,n+1):o}if(r.oneOf&&r.discriminator){const c=r.discriminator.propertyName,d=e?.[c];if(d&&r.discriminator.mapping[d]){const u={$ref:r.discriminator.mapping[d]},h=Ge(u,s);return sn(e,h,s,i,n+1)}return o}if(r.type===Ue.Array||!r.type&&Array.isArray(e)){if(Array.isArray(e)&&r.items)for(let c=0;c<e.length;c++){const d=sn(e[c],r.items,s,`${i}[${c}]`,n+1);o.push(...d)}return o}if(!zo(r))return o;const a=r.required??[],l=e;for(const c of a){const d=r.properties?.[c];if(d&&Ge(d,s).isHidden)continue;const u=i?`${i}.${c}`:c,h=l?.[c];if(zc(h)){const g=d?.title??ng(c);o.push({path:u,message:`${g} is required`})}}if(l&&r.properties)for(const[c,d]of Object.entries(r.properties)){if(Ge(d,s).isHidden)continue;const u=i?`${i}.${c}`:c,h=l[c];if(h!=null){const g=sn(h,d,s,u,n+1);o.push(...g)}}return o}function $b(e,t,s){const i=Ge(t,s);if(Array.isArray(e))return`${e.length} item${e.length!==1?"s":""}`;if(zo(i)&&i.properties){const n=Object.entries(i.properties).filter(([,l])=>!Ge(l,s).isHidden),o=n.length,r=e;return`${n.filter(([l])=>{const c=r?.[l];return c!=null&&c!==""}).length}/${o} fields`}return""}function _G(e,t,s){if(e==null){const i=t.findIndex(n=>n.type===Ue.Null);return i>=0?i:0}if(Array.isArray(e)){const i=t.findIndex(n=>Ge(n,s).type===Ue.Array);return i>=0?i:0}if(typeof e=="boolean"){const i=t.findIndex(n=>Ge(n,s).type===Ue.Boolean);return i>=0?i:0}if(typeof e=="number"){const i=t.findIndex(n=>{const o=Ge(n,s);return o.type===Ue.Number||o.type===Ue.Integer});return i>=0?i:0}if(typeof e=="string"){const i=t.findIndex(n=>Ge(n,s).type===Ue.String);return i>=0?i:0}if(typeof e=="object"){const i=e;for(let n=0;n<t.length;n++){const o=Ge(t[n],s);if(o.discriminator&&o.discriminator.propertyName in i)return n}for(let n=0;n<t.length;n++){const o=Ge(t[n],s);if(zo(o)||o.oneOf)return n}return 0}return 0}function UG(e,t,s){if(t&&typeof e=="object"&&e!==null){const i=e[t];if(i)return`Item ${s+1}: ${i}`}if(typeof e=="object"&&e!==null){const i=e,n=i.name??i.title??i.id;if(n)return`Item ${s+1}: ${n}`}return`Item ${s+1}`}function $G(e){switch(Array.isArray(e.type)?e.type[0]:e.type){case Ue.String:return"";case Ue.Boolean:return!1;case Ue.Array:return[];case Ue.Integer:case Ue.Number:return;default:return{}}}const og=({title:e,description:t,summary:s,errorCount:i=0,level:n=0,children:o,onRemove:r,defaultExpanded:a=!0,removeItemAriaLabel:l="Remove item"})=>{const[c,d]=p.useState(a),u=n===0,h="rounded border border-secondary",g=J("flex items-center gap-2 cursor-pointer select-none transition-colors",u?"px-4 py-3 bg-layer-3 hover:bg-layer-4":"px-3 py-2 bg-layer-4 hover:bg-layer-3",c?"rounded-t":"rounded"),m=J("border-t border-secondary",u?"p-4":"p-3");return f.jsxs("div",{className:h,children:[f.jsxs("div",{className:g,onClick:()=>d(v=>!v),role:"button","aria-expanded":c,children:[f.jsx("span",{className:"shrink-0 text-secondary",children:c?f.jsx(j.IconChevronDown,{size:16,stroke:2}):f.jsx(j.IconChevronRight,{size:16,stroke:2})}),f.jsx("span",{className:J("flex-1 truncate",u?"dial-small-semi-text text-primary":"dial-small-text text-primary"),children:e}),t&&f.jsx(dv,{caption:t}),s&&f.jsx("span",{className:"dial-tiny-text text-secondary whitespace-nowrap ml-2",children:s}),i>0?f.jsxs("span",{className:"flex items-center gap-1 dial-tiny-text text-error whitespace-nowrap",children:[f.jsx(Be,{icon:f.jsx(j.IconAlertTriangle,{size:13,stroke:2})}),i," error",i>1?"s":""]}):f.jsx(Be,{icon:f.jsx(j.IconCheck,{size:13,stroke:2}),className:"text-success shrink-0"}),r&&f.jsx(Hc,{size:nt.Small,onClick:v=>{v.stopPropagation(),r()},"aria-label":l,className:"ml-1 shrink-0 p-0.5"})]}),c&&f.jsx("div",{className:m,children:o})]})},qb=({schema:e,value:t,onChange:s,path:i,level:n=0,required:o,label:r})=>{const{rootSchema:a,defaultExpanded:l=!0,touchedPaths:c=new Set,skipUntouched:d=!1}=Bi(),u=Ge(e,a),h=zo(u),g=u.type===Ue.Array;if(h||g){const C=$b(t,u,a),w=sn(t,u,a,i.join(".")),b=i.join("."),x=b+".",y=!d||c.has(b)||[...c].some(S=>S.startsWith(x));return f.jsx(og,{title:r??u.title??i[i.length-1]??"Section",description:u.description,level:n,summary:C,errorCount:y?w.length:0,defaultExpanded:l,children:f.jsx(Mi,{schema:u,value:t,onChange:s,path:i,level:n+1,required:o})})}const v=(!d||c.has(i.join(".")))&&o&&zc(t)?`${r??"Field"} is required`:void 0;return f.jsx(cc,{label:r,required:o,description:u.description,error:v,children:f.jsx(Mi,{schema:u,value:t,onChange:s,path:i,level:n,required:o,suppressInlineError:!0})})},Rl=({schema:e,value:t,onChange:s,path:i,level:n})=>{const{rootSchema:o,texts:r}=Bi(),a=Ge(e,o),l=Object.entries(a.properties??{}).filter(([,u])=>!Ge(u,o).isHidden),c=a.required??[],d=t??{};return l.length===0?f.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noConfigurableProperties}):f.jsx("div",{className:"flex flex-col gap-4",children:l.map(([u,h])=>{const m=Ge(h,o).title??h.title??ng(u),v=c.includes(u);return f.jsx(qb,{schema:h,value:d[u],onChange:C=>s({...d,[u]:C}),path:[...i,u],level:n,required:v,label:m},u)})})},qG=({schema:e,value:t,onChange:s,path:i,level:n})=>{const{rootSchema:o,texts:r,readonly:a=!1,defaultExpanded:l=!0}=Bi(),c=Array.isArray(t)?t:[],d=e.items,[u,h]=p.useState(void 0);if(!d)return f.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noItemSchema});const g=p.useMemo(()=>Ge(d,o),[d,o]),m=p.useMemo(()=>g.discriminator,[g]),v=p.useMemo(()=>m?.propertyName,[m]),C=p.useMemo(()=>m?Object.keys(m.mapping).map(y=>({value:y,label:y})):[],[m]),w=()=>{const y=u??C[0]?.value;let S;if(m&&y){const F=Ge({$ref:m.mapping[y]},o);S={...En(F,o)??{},[m.propertyName]:y}}else S=En(g,o)??$G(g);s([...c,S])},b=y=>{s(c.filter((S,F)=>F!==y))},x=(y,S)=>{s(c.map((F,R)=>R===y?S:F))};return f.jsxs("div",{className:"flex flex-col gap-3",children:[c.length===0&&f.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noItemsYet}),c.map((y,S)=>{const F=UG(y,v,S),R=$b(y,g,o),E=sn(y,g,o,`${i.join(".")}[${S}]`);return f.jsx(og,{title:F,level:n,summary:R,errorCount:E.length,onRemove:a?void 0:()=>b(S),defaultExpanded:l,removeItemAriaLabel:r.removeItemAriaLabel,children:f.jsx(Mi,{schema:d,value:y,onChange:D=>x(S,D),path:[...i,String(S)],level:n+1})},S)}),!a&&f.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[C.length>0&&f.jsx("div",{className:"flex-1 max-w-[280px]",children:f.jsx(Fn,{options:C,value:u??C[0]?.value,placeholder:r.selectTypeToAdd,onChange:y=>{const S=typeof y=="string"?y:y[0];h(S)}})}),f.jsx(qp,{label:r.addItem,iconBefore:f.jsx(j.IconPlus,{size:16,stroke:2}),onClick:w})]})]})},KG=({schema:e,value:t,onChange:s,path:i,level:n})=>{const{rootSchema:o,texts:r,readonly:a=!1}=Bi(),l=p.useId(),c=e.discriminator;if(c){const C=c.propertyName,w=c.mapping,b=Object.keys(w).map(F=>({value:F,label:F})),x=typeof t=="object"&&t!==null?t[C]:void 0,y=x?Ge({$ref:w[x]},o):void 0,S=F=>{const R=Ge({$ref:w[F]},o),E=En(R,o)??{};s({...E,[C]:F})};if(e.discriminatorDisplay===Qr.Radio){const F=e.discriminatorOrientation===Vc.Row,R=x?(()=>{const E=Ge({$ref:w[x]},o),{[C]:D,...T}=E.properties??{};return{...E,properties:T}})():void 0;return F?f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("div",{role:"radiogroup",className:"flex flex-row flex-wrap gap-4",children:Object.keys(w).map(E=>{const D=Ge({$ref:w[E]},o);return f.jsx(nn,{name:l,value:E,inputId:`${l}-${E}`,label:D.title??E,checked:x===E,disabled:a,onChange:()=>S(E)},E)})}),R&&f.jsx(Rl,{schema:R,value:t,onChange:s,path:i,level:n})]}):f.jsx("div",{role:"radiogroup",className:"flex flex-col gap-2",children:Object.keys(w).map(E=>{const D=Ge({$ref:w[E]},o),T=x===E,{[C]:P,...k}=D.properties??{},A={...D,properties:k};return f.jsxs("div",{className:"flex flex-col",children:[f.jsx(nn,{name:l,value:E,inputId:`${l}-${E}`,label:D.title??E,checked:T,disabled:a,onChange:()=>S(E)}),T&&f.jsx("div",{className:"ml-6 mt-2",children:f.jsx(Rl,{schema:A,value:t,onChange:s,path:i,level:n})})]},E)})})}return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("div",{className:"flex-1 max-w-[280px]",children:f.jsx(Fn,{options:b,value:x,placeholder:r.selectTypePlaceholder,disabled:a,onChange:F=>{const R=typeof F=="string"?F:F[0];R&&S(R)}})}),y&&f.jsx("div",{className:"pl-3",children:f.jsx(Rl,{schema:y,value:t,onChange:s,path:i,level:n})})]})}const d=e.oneOf??[],h=(()=>{if(t==null)return 0;if(typeof t=="object"&&!Array.isArray(t)){for(let C=0;C<d.length;C++)if(Ge(d[C],o).required?.every(b=>b in t))return C}return 0})(),g=C=>{const w=Ge(d[C],o),b=En(w,o);s(b??null)},m=d[h];if(e.discriminatorDisplay===Qr.Radio)return f.jsx("div",{role:"radiogroup",className:"flex flex-col gap-2",children:d.map((C,w)=>{const b=Ge(C,o),x=Ub(C,o)??`Option ${w+1}`,y=h===w;return f.jsxs("div",{className:"flex flex-col",children:[f.jsx(nn,{name:l,value:String(w),inputId:`${l}-${w}`,label:x,checked:y,disabled:a,onChange:()=>g(w)}),y&&b&&f.jsx("div",{className:"ml-6 mt-2",children:f.jsx(Mi,{schema:b,value:t,onChange:s,path:i,level:n})})]},w)})});const v=d.map((C,w)=>{const b=Ge(C,o);return{value:String(w),label:b.title??`Option ${w+1}`}});return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("div",{className:"flex-1 max-w-[280px]",children:f.jsx(Fn,{options:v,value:String(h),disabled:a,onChange:C=>{const w=typeof C=="string"?C:C[0];g(Number(w))}})}),m&&f.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:f.jsx(Mi,{schema:m,value:t,onChange:s,path:i,level:n})})]})},YG=({schema:e,value:t,onChange:s,path:i,level:n})=>{const{rootSchema:o,readonly:r=!1}=Bi(),a=e.anyOf??[],l=a.map((m,v)=>({value:String(v),label:Ub(m,o)})),c=_G(t,a,o),d=a[c],h=Ge(d,o).type===Ue.Null,g=m=>{const v=Ge(a[m],o);if(v.type===Ue.Null){s(null);return}const C=En(v,o);if(C!==void 0){s(C);return}switch(v.type){case Ue.Array:s([]);break;case Ue.String:s("");break;case Ue.Boolean:s(!1);break;case Ue.Integer:case Ue.Number:s(0);break;default:s({});break}};return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("div",{className:"flex-1 max-w-[280px]",children:f.jsx(Fn,{options:l,value:String(c),disabled:r,onChange:m=>{const v=typeof m=="string"?m:m[0];g(Number(v))}})}),!h&&d&&f.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:f.jsx(Mi,{schema:d,value:t,onChange:s,path:i,level:n})})]})},Kb=({schema:e,value:t,onChange:s,invalid:i})=>{const n=p.useId(),{texts:o,readonly:r=!1,inputClassName:a}=Bi(),l=e.const!==void 0,c=Array.isArray(e.enum)&&e.enum.length>0;if(l)return f.jsx(oi,{value:String(e.const??""),disabled:!0,onChange:void 0,className:"opacity-60"});if(c&&e.enumDisplay===Qr.Radio){const d=e.enumOrientation===Vc.Row;return f.jsx("div",{role:"radiogroup",className:d?"flex flex-row flex-wrap gap-x-4 gap-y-2":"flex flex-col gap-2",children:e.enum.map(u=>{const h=String(u);return f.jsx(nn,{name:n,value:h,inputId:`${n}-${h}`,label:h,checked:t!=null?String(t)===h:!1,disabled:r,onChange:g=>s(g)},h)})})}if(c){const d=e.enum.map(u=>({value:String(u),label:String(u)}));return f.jsx(Fn,{options:d,value:t!=null?String(t):void 0,invalid:i,disabled:r,onChange:u=>s(typeof u=="string"?u:u[0]),placeholder:o.enumSelectPlaceholder})}switch(e.type){case Ue.Boolean:return f.jsx(Gc,{switchId:n,isOn:!!t,disabled:r,onChange:d=>s(d)});case Ue.Integer:return f.jsx(fh,{integer:!0,value:t!=null?String(t):"",invalid:i,disabled:r,onChange:d=>s(d!==void 0?Number(d):void 0),placeholder:o.integerInputPlaceholder,containerClassName:a});case Ue.Number:return f.jsx(fh,{value:t!=null?String(t):"",invalid:i,disabled:r,onChange:d=>s(d!==void 0?Number(d):void 0),placeholder:o.numberInputPlaceholder,containerClassName:a});default:return e.isProtected?f.jsx(vb,{value:t!=null?String(t):"",invalid:i,disabled:r,onChange:d=>s(d??void 0),placeholder:o.stringInputPlaceholder,containerClassName:a}):f.jsx(oi,{value:t!=null?String(t):"",invalid:i,disabled:r,onChange:d=>s(d??void 0),placeholder:o.stringInputPlaceholder,containerClassName:a})}},$m=(e,t)=>({id:Math.random().toString(36).slice(2),key:e,value:t}),ZG=({pairKey:e,pairValue:t,valueSchema:s,onKeyChange:i,onValueChange:n,onRemove:o,keyInputPlaceholder:r,removeFieldAriaLabel:a,readonly:l=!1,inputClassName:c})=>{const[d,u]=p.useState(e);return f.jsxs("div",{className:"flex gap-2 items-center",children:[f.jsx("div",{className:"w-2/5 min-w-0",children:f.jsx(oi,{value:d,disabled:l,onChange:h=>u(h??""),onBlur:()=>{d!==e&&i(d)},placeholder:r,containerClassName:c})}),f.jsx("div",{className:"flex-1 min-w-0",children:f.jsx(Kb,{schema:s,value:t,onChange:n})}),!l&&f.jsx(Hc,{size:nt.Small,onClick:o,"aria-label":a,className:"shrink-0 p-1"})]})},XG=({schema:e,value:t,onChange:s})=>{const{texts:i,readonly:n=!1,inputClassName:o}=Bi(),r=e.additionalProperties===!0||e.additionalProperties==null?{type:"string"}:typeof e.additionalProperties=="object"?e.additionalProperties:{type:"string"},[a,l]=p.useState(()=>Object.entries(t??{}).map(([m,v])=>$m(m,v))),c=m=>Object.fromEntries(m.filter(v=>v.key!=="").map(v=>[v.key,v.value])),d=(m,v)=>{const C=a.map((w,b)=>b===m?{...w,key:v}:w);l(C),s(c(C))},u=(m,v)=>{const C=a.map((w,b)=>b===m?{...w,value:v}:w);l(C),s(c(C))},h=()=>{l(m=>[...m,$m("","")])},g=m=>{const v=a.filter((C,w)=>w!==m);l(v),s(c(v))};return f.jsxs("div",{className:"flex flex-col gap-2",children:[a.length===0&&f.jsx("p",{className:"dial-tiny-text text-secondary italic",children:i.noFieldsYet}),a.length>0&&f.jsxs("div",{className:"flex gap-2 mb-1 pr-7",children:[f.jsx("span",{className:"w-2/5 dial-tiny-text text-secondary font-medium",children:i.keyColumnHeader}),f.jsx("span",{className:"flex-1 dial-tiny-text text-secondary font-medium",children:i.valueColumnHeader})]}),a.map((m,v)=>f.jsx(ZG,{pairKey:m.key,pairValue:m.value,valueSchema:r,onKeyChange:C=>d(v,C),onValueChange:C=>u(v,C),onRemove:()=>g(v),keyInputPlaceholder:i.keyInputPlaceholder,removeFieldAriaLabel:i.removeFieldAriaLabel,readonly:n,inputClassName:o},m.id)),!n&&f.jsx("div",{className:"pt-1",children:f.jsx(qp,{label:i.addField,iconBefore:f.jsx(j.IconPlus,{size:16,stroke:2}),onClick:h})})]})},Mi=({schema:e,value:t,onChange:s,path:i,level:n,required:o,suppressInlineError:r=!1})=>{const{rootSchema:a,renderField:l,markTouched:c=()=>{},touchedPaths:d=new Set,skipUntouched:u=!1}=Bi(),h=Ge(e,a),g=C=>{c(i.join(".")),s(C)},m=!u||d.has(i.join("."));let v;if(h.oneOf)v=f.jsx(KG,{schema:h,value:t,onChange:g,path:i,level:n});else if(h.anyOf)v=f.jsx(YG,{schema:h,value:t,onChange:g,path:i,level:n});else if(zo(h)){const C=h.additionalProperties!=null&&h.additionalProperties!==!1,w=!h.properties||Object.keys(h.properties).length===0;C&&w?v=f.jsx(XG,{schema:h,value:t,onChange:g}):v=f.jsx(Rl,{schema:h,value:t,onChange:g,path:i,level:n})}else if(h.type===Ue.Array)v=f.jsx(qG,{schema:h,value:t,onChange:g,path:i,level:n});else{const C=m&&o&&zc(t),w=!r&&C?`${h.title??"Field"} is required`:void 0;v=f.jsxs(f.Fragment,{children:[f.jsx(Kb,{schema:h,value:t,onChange:g,invalid:C}),f.jsx(ds,{text:w})]})}return l?l(i,h,v):v},QG=({schema:e,defaultValue:t,texts:s,className:i,readonly:n=!1,defaultExpanded:o=!0,inputClassName:r,variant:a=Or.Sections,onChange:l,onPropertyChange:c,onDefaultValues:d,renderField:u,skipUntouched:h=!1})=>{const g=p.useMemo(()=>({...jG,...s}),[s]),m=p.useMemo(()=>t||(En(e,e)??{}),[]),[v,C]=p.useState(m),[w,b]=p.useState(new Set),x=p.useCallback(R=>{b(E=>E.has(R)?E:new Set([...E,R]))},[]);p.useEffect(()=>{d?.(m)},[]);const y=(R,E)=>{const D={...v,[R]:E};C(D),l?.(D),c?.(R,E)},S=Object.entries(e.properties??{}).filter(([,R])=>!Ge(R,e).isHidden),F=e.required??[];return f.jsx(_b.Provider,{value:{rootSchema:e,texts:g,readonly:n,defaultExpanded:o,inputClassName:r,renderField:u,touchedPaths:w,markTouched:x,skipUntouched:h},children:f.jsx("div",{className:J("flex flex-col gap-4",i),children:S.map(([R,E])=>{const D=Ge(E,e),T=D.title??E.title??ng(R),P=F.includes(R),k=v[R];if(a===Or.Flat)return f.jsx(qb,{schema:E,value:k,onChange:H=>y(R,H),path:[R],level:0,required:P,label:T},R);if(a===Or.FlatSections)return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("h2",{className:"dial-small-semi-text text-primary",children:T}),f.jsx(Mi,{schema:E,value:k,onChange:H=>y(R,H),path:[R],level:0,required:P})]},R);const A=sn(k,D,e,R),U=R+".",I=!h||w.has(R)||[...w].some(H=>H.startsWith(U));return f.jsx(og,{title:T,description:D.description,level:0,defaultExpanded:o,errorCount:I?P&&zc(k)?Math.max(A.length,1):A.length:0,children:f.jsx(Mi,{schema:E,value:k,onChange:H=>y(R,H),path:[R],level:1,required:P})},R)})})})},JG=()=>Promise.resolve().then(()=>require("./JsonEditor-C8-2iXSe.cjs")),eB=()=>Promise.resolve().then(()=>require("./MarkdownEditor-BOYHP5ay.cjs"));exports.AlertVariant=rs;exports.BASE_ICON_PROPS=te;exports.BASE_ICON_SIZE=$t;exports.ButtonAppearance=Ae;exports.ButtonVariant=Ye;exports.ConfirmationPopupVariant=Mo;exports.DIAL_ICON_SIZE=ct;exports.DialAlert=hv;exports.DialAutocompleteInputValue=pb;exports.DialBreadcrumb=rb;exports.DialBreadcrumbItem=xr;exports.DialButton=us;exports.DialButtonDropdown=Ch;exports.DialCaptionText=Jr;exports.DialCheckbox=yu;exports.DialCloseButton=_p;exports.DialCollapsibleSidebar=gv;exports.DialConditionalResizableContainer=Pv;exports.DialConfirmationPopup=ub;exports.DialDangerButton=lb;exports.DialDangerIconButton=cb;exports.DialDestinationFolderPopup=Nb;exports.DialDraggableItem=BS;exports.DialDropdown=Tt;exports.DialDropdownIcon=cH;exports.DialEllipsisTooltip=vt;exports.DialErrorText=ds;exports.DialFabButton=pN;exports.DialFileIcon=kh;exports.DialFileManager=jb;exports.DialFileManagerActions=Y;exports.DialFileManagerTabs=lo;exports.DialFileName=mc;exports.DialFileNodeType=Ce;exports.DialFilePermission=An;exports.DialFileResourceType=Jp;exports.DialFolderName=vc;exports.DialFormItem=cc;exports.DialFormPopup=DN;exports.DialGhostButton=qp;exports.DialGhostIconButton=db;exports.DialGrid=Up;exports.DialIcon=Be;exports.DialIconButton=Gs;exports.DialInput=oi;exports.DialInputPopup=gb;exports.DialItemType=Xt;exports.DialLabel=Pn;exports.DialLabelledText=Nx;exports.DialLinkButton=oN;exports.DialLoadFileArea=Fb;exports.DialLoadFileAreaField=rH;exports.DialLoader=ea;exports.DialNeutralButton=Ws;exports.DialNeutralIconButton=cN;exports.DialNoDataContent=ta;exports.DialNumberInput=fh;exports.DialPagination=Fx;exports.DialPasswordInput=vb;exports.DialPopup=Mn;exports.DialPrimaryButton=Hs;exports.DialPrimaryIconButton=lN;exports.DialProgressBar=bx;exports.DialProgressBarSize=pv;exports.DialRadioButton=nn;exports.DialRadioGroup=Dl;exports.DialRadioGroupPopupField=SN;exports.DialRemoveButton=Hc;exports.DialResizableContainer=Dv;exports.DialRoundedButton=rN;exports.DialSchemaRenderer=QG;exports.DialSearch=Kp;exports.DialSecondaryIconButton=dN;exports.DialSelect=Fn;exports.DialSelectField=jN;exports.DialSharedEntityIndicator=Hr;exports.DialSkeleton=Jn;exports.DialSkeletonAvatarShape=Pl;exports.DialSkeletonAvatarSize=Sr;exports.DialSkeletonVariant=as;exports.DialSpinner=uv;exports.DialSteps=kx;exports.DialSuccessIconButton=hN;exports.DialSwitch=Gc;exports.DialTabs=sb;exports.DialTag=io;exports.DialTagInput=hb;exports.DialTertiaryIconButton=uN;exports.DialTextarea=gN;exports.DialTooltip=Ot;exports.DropdownItemType=Io;exports.DropdownTrigger=Kt;exports.DropdownType=Y1;exports.ElementSize=nt;exports.FileManagerColumnKey=mt;exports.FileManagerProvider=Ob;exports.FlexibleActionsDirection=tn;exports.FormItemOrientation=Nr;exports.GridSelectionMode=Ar;exports.JsonSchemaType=Ue;exports.LazyDialJsonEditor=JG;exports.LazyDialMarkdownEditor=eB;exports.NAME_COLUMN=Bb;exports.NOT_ALLOWED_SPACES=sg;exports.NOT_ALLOWED_SPACES_REGEXP=cG;exports.NOT_ALLOWED_SYMBOLS=Ab;exports.NOT_ALLOWED_SYMBOLS_REGEXP=Lb;exports.PopupSize=Zt;exports.RadioGroupOrientation=hn;exports.ResizableContainerSide=Gr;exports.SIZE_COLUMN=zb;exports.SchemaDisplayMode=Qr;exports.SchemaOrientation=Vc;exports.SchemaRendererVariant=Or;exports.SelectSize=oc;exports.SelectVariant=rc;exports.StepStatus=Yt;exports.TabOrientation=ic;exports.TagVariant=dc;exports.UPDATED_AT_COLUMN=Vb;exports.jsxRuntimeExports=f;exports.mergeClasses=J;exports.useDialFileManagerTabs=NG;exports.useEditableItem=Hb;exports.useFileManagerContext=Wb;exports.wrapInRootFolder=WG;